Commit 9fe2319e by Rask Ingemann Lambertsen Committed by Rask Ingemann Lambertsen

longlong.h (add_ssaaaa): Support Intel asm syntax in i386 and x86_64 versions.

	* longlong.h (add_ssaaaa): Support Intel asm syntax in i386 and
	x86_64 versions.
	(sub_ddmmss): Likewise.
	(umul_ppmm): Likewise.
	(udiv_qrnnd): Likewise.

From-SVN: r129756
parent 9f143763
2007-10-29 Rask Ingemann Lambertsen <rask@sygehus.dk>
* longlong.h (add_ssaaaa): Support Intel asm syntax in i386 and
x86_64 versions.
(sub_ddmmss): Likewise.
(umul_ppmm): Likewise.
(udiv_qrnnd): Likewise.
2007-10-29 Janis Johnson <janis187@us.ibm.com> 2007-10-29 Janis Johnson <janis187@us.ibm.com>
PR testsuite/24841 PR testsuite/24841
...@@ -319,7 +319,7 @@ UDItype __umulsidi3 (USItype, USItype); ...@@ -319,7 +319,7 @@ UDItype __umulsidi3 (USItype, USItype);
#if (defined (__i386__) || defined (__i486__)) && W_TYPE_SIZE == 32 #if (defined (__i386__) || defined (__i486__)) && W_TYPE_SIZE == 32
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
__asm__ ("addl %5,%1\n\tadcl %3,%0" \ __asm__ ("add{l} {%5,%1|%1,%5}\n\tadc{l} {%3,%0|%0,%3}" \
: "=r" ((USItype) (sh)), \ : "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \ "=&r" ((USItype) (sl)) \
: "%0" ((USItype) (ah)), \ : "%0" ((USItype) (ah)), \
...@@ -327,7 +327,7 @@ UDItype __umulsidi3 (USItype, USItype); ...@@ -327,7 +327,7 @@ UDItype __umulsidi3 (USItype, USItype);
"%1" ((USItype) (al)), \ "%1" ((USItype) (al)), \
"g" ((USItype) (bl))) "g" ((USItype) (bl)))
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
__asm__ ("subl %5,%1\n\tsbbl %3,%0" \ __asm__ ("sub{l} {%5,%1|%1,%5}\n\tsbb{l} {%3,%0|%0,%3}" \
: "=r" ((USItype) (sh)), \ : "=r" ((USItype) (sh)), \
"=&r" ((USItype) (sl)) \ "=&r" ((USItype) (sl)) \
: "0" ((USItype) (ah)), \ : "0" ((USItype) (ah)), \
...@@ -335,13 +335,13 @@ UDItype __umulsidi3 (USItype, USItype); ...@@ -335,13 +335,13 @@ UDItype __umulsidi3 (USItype, USItype);
"1" ((USItype) (al)), \ "1" ((USItype) (al)), \
"g" ((USItype) (bl))) "g" ((USItype) (bl)))
#define umul_ppmm(w1, w0, u, v) \ #define umul_ppmm(w1, w0, u, v) \
__asm__ ("mull %3" \ __asm__ ("mul{l} %3" \
: "=a" ((USItype) (w0)), \ : "=a" ((USItype) (w0)), \
"=d" ((USItype) (w1)) \ "=d" ((USItype) (w1)) \
: "%0" ((USItype) (u)), \ : "%0" ((USItype) (u)), \
"rm" ((USItype) (v))) "rm" ((USItype) (v)))
#define udiv_qrnnd(q, r, n1, n0, dv) \ #define udiv_qrnnd(q, r, n1, n0, dv) \
__asm__ ("divl %4" \ __asm__ ("div{l} %4" \
: "=a" ((USItype) (q)), \ : "=a" ((USItype) (q)), \
"=d" ((USItype) (r)) \ "=d" ((USItype) (r)) \
: "0" ((USItype) (n0)), \ : "0" ((USItype) (n0)), \
...@@ -355,7 +355,7 @@ UDItype __umulsidi3 (USItype, USItype); ...@@ -355,7 +355,7 @@ UDItype __umulsidi3 (USItype, USItype);
#if (defined (__x86_64__) || defined (__i386__)) && W_TYPE_SIZE == 64 #if (defined (__x86_64__) || defined (__i386__)) && W_TYPE_SIZE == 64
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
__asm__ ("addq %5,%1\n\tadcq %3,%0" \ __asm__ ("add{q} {%5,%1|%1,%5}\n\tadc{q} {%3,%0|%0,%3}" \
: "=r" ((UDItype) (sh)), \ : "=r" ((UDItype) (sh)), \
"=&r" ((UDItype) (sl)) \ "=&r" ((UDItype) (sl)) \
: "%0" ((UDItype) (ah)), \ : "%0" ((UDItype) (ah)), \
...@@ -363,7 +363,7 @@ UDItype __umulsidi3 (USItype, USItype); ...@@ -363,7 +363,7 @@ UDItype __umulsidi3 (USItype, USItype);
"%1" ((UDItype) (al)), \ "%1" ((UDItype) (al)), \
"rme" ((UDItype) (bl))) "rme" ((UDItype) (bl)))
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
__asm__ ("subq %5,%1\n\tsbbq %3,%0" \ __asm__ ("sub{q} {%5,%1|%1,%5}\n\tsbb{q} {%3,%0|%0,%3}" \
: "=r" ((UDItype) (sh)), \ : "=r" ((UDItype) (sh)), \
"=&r" ((UDItype) (sl)) \ "=&r" ((UDItype) (sl)) \
: "0" ((UDItype) (ah)), \ : "0" ((UDItype) (ah)), \
...@@ -371,13 +371,13 @@ UDItype __umulsidi3 (USItype, USItype); ...@@ -371,13 +371,13 @@ UDItype __umulsidi3 (USItype, USItype);
"1" ((UDItype) (al)), \ "1" ((UDItype) (al)), \
"rme" ((UDItype) (bl))) "rme" ((UDItype) (bl)))
#define umul_ppmm(w1, w0, u, v) \ #define umul_ppmm(w1, w0, u, v) \
__asm__ ("mulq %3" \ __asm__ ("mul{q} %3" \
: "=a" ((UDItype) (w0)), \ : "=a" ((UDItype) (w0)), \
"=d" ((UDItype) (w1)) \ "=d" ((UDItype) (w1)) \
: "%0" ((UDItype) (u)), \ : "%0" ((UDItype) (u)), \
"rm" ((UDItype) (v))) "rm" ((UDItype) (v)))
#define udiv_qrnnd(q, r, n1, n0, dv) \ #define udiv_qrnnd(q, r, n1, n0, dv) \
__asm__ ("divq %4" \ __asm__ ("div{q} %4" \
: "=a" ((UDItype) (q)), \ : "=a" ((UDItype) (q)), \
"=d" ((UDItype) (r)) \ "=d" ((UDItype) (r)) \
: "0" ((UDItype) (n0)), \ : "0" ((UDItype) (n0)), \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment