From 69c2eee786d9d877f2f74251832dbfafa00a90fa Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Tue, 9 Oct 2007 22:26:28 +0000 Subject: [PATCH] * src/base/cl_low.h: Add missing linefeeds in SPARC 64 inline assembler. * src/base/low/cl_low_div.cc (divu_6464_6464_): Fix a copy-paste typo. Reported by Sven Verdoolaege . --- ChangeLog | 6 ++++++ src/base/cl_low.h | 10 +++++----- src/base/low/cl_low_div.cc | 4 ++-- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8ab639c..fb54cb4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-10-10 Richard B. Kreckel + + * src/base/cl_low.h: Add missing linefeeds in SPARC 64 inline assembler. + * src/base/low/cl_low_div.cc (divu_6464_6464_): Fix a copy-paste typo. + Reported by Sven Verdoolaege . + 2007-10-02 Richard B. Kreckel On popular demand (Debian bug #286266, Ubuntu bug #128851): diff --git a/src/base/cl_low.h b/src/base/cl_low.h index e11f0ad..81d7b05 100644 --- a/src/base/cl_low.h +++ b/src/base/cl_low.h @@ -439,7 +439,7 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) __asm__ __volatile__ ( \ "wr %%g0,%%g0,%%y\n\t" \ "udiv %2,%3,%0\n\t" \ - "umul %0,%3,%1" \ + "umul %0,%3,%1\n\t" \ "sub %2,%1,%1" \ : "=&r" (__q), "=&r" (__r) \ : "r" (__x), "r" (__y)); \ @@ -528,7 +528,7 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) __asm__ __volatile__ ( \ "wr %%g0,%%g0,%%y\n\t" \ "udiv %2,%3,%0\n\t" \ - "umul %0,%3,%1" \ + "umul %0,%3,%1\n\t" \ "sub %2,%1,%1" \ : "=&r" (__q), "=&r" (__r) \ : "r" (__x), "r" (__y)); \ @@ -578,7 +578,7 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) __asm__ __volatile__ ( \ "wr %%g0,%%g0,%%y\n\t" \ "udiv %2,%3,%0\n\t" \ - "umul %0,%3,%1" \ + "umul %0,%3,%1\n\t" \ "sub %2,%1,%1" \ : "=&r" (__q), "=&r" (__r) \ : "r" (__x), "r" (__y)); \ @@ -690,7 +690,7 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) __asm__ __volatile__ ( \ "wr %2,%%g0,%%y\n\t" \ "udiv %3,%4,%0\n\t" \ - "umul %0,%4,%1" \ + "umul %0,%4,%1\n\t" \ "sub %3,%1,%1" \ : "=&r" (__q), "=&r" (__r) \ : "r" (__xhi), "r" (__xlo), "r" (__y)); \ @@ -791,7 +791,7 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) __asm__ __volatile__ ( \ "wr %2,%%g0,%%y\n\t" \ "udiv %3,%4,%0\n\t" \ - "umul %0,%4,%1" \ + "umul %0,%4,%1\n\t" \ "sub %3,%1,%1" \ : "=&r" (__q), "=&r" (__r) \ : "r" (__xhi), "r" (__xlo), "r" (__y)); \ diff --git a/src/base/low/cl_low_div.cc b/src/base/low/cl_low_div.cc index 41550d6..b2c7544 100644 --- a/src/base/low/cl_low_div.cc +++ b/src/base/low/cl_low_div.cc @@ -259,9 +259,9 @@ uint64 divu_6464_6464_(uint64 x, uint64 y) } // q = floor(x1/(y1+1)) // x-q*y bilden (eine 32-mal-64-Bit-Multiplikation ohne Überlauf): - x -= highlow64_0(mulu32_64(q,high32(y))); // q * high32(y) * beta + x -= highlow64_0(mulu32_w(q,high32(y))); // q * high32(y) * beta // gefahrlos, da q*high32(y) <= q*y/beta <= x/beta < beta - x -= mulu32_64(q,low32(y)); // q * low32(y) + x -= mulu32_w(q,low32(y)); // q * low32(y) // gefahrlos, da q*high32(y)*beta + q*low32(y) = q*y <= x // Noch höchstens 2 mal y abziehen: if (x >= y)