Commit e1b027fa by Richard Stallman

(perform_*): Rename macro args to arg0, arg1.

From-SVN: r3084
parent 63671b34
...@@ -64,50 +64,53 @@ ...@@ -64,50 +64,53 @@
call libgcc for these functions. But programs might be linked with call libgcc for these functions. But programs might be linked with
code compiled by gcc 1, and then these will be used. */ code compiled by gcc 1, and then these will be used. */
#define perform_udivsi3(a,b) \ /* The arg names used to be a and b, but `a' appears inside strings
and that confuses non-ANSI cpp. */
#define perform_udivsi3(arg0,arg1) \
{ \ { \
register int dx asm("dx"); \ register int dx asm("dx"); \
register int ax asm("ax"); \ register int ax asm("ax"); \
\ \
dx = 0; \ dx = 0; \
ax = a; \ ax = arg0; \
asm ("divl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b), "d" (dx)); \ asm ("divl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (arg1), "d" (dx)); \
return ax; \ return ax; \
} }
#define perform_divsi3(a,b) \ #define perform_divsi3(arg0,arg1) \
{ \ { \
register int dx asm("dx"); \ register int dx asm("dx"); \
register int ax asm("ax"); \ register int ax asm("ax"); \
\ \
ax = a; \ ax = arg0; \
asm ("cltd\n\tidivl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b)); \ asm ("cltd\n\tidivl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (arg1)); \
return ax; \ return ax; \
} }
#define perform_umodsi3(a,b) \ #define perform_umodsi3(arg0,arg1) \
{ \ { \
register int dx asm("dx"); \ register int dx asm("dx"); \
register int ax asm("ax"); \ register int ax asm("ax"); \
\ \
dx = 0; \ dx = 0; \
ax = a; \ ax = arg0; \
asm ("divl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b), "d" (dx)); \ asm ("divl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (arg1), "d" (dx)); \
return dx; \ return dx; \
} }
#define perform_modsi3(a,b) \ #define perform_modsi3(arg0,arg1) \
{ \ { \
register int dx asm("dx"); \ register int dx asm("dx"); \
register int ax asm("ax"); \ register int ax asm("ax"); \
\ \
ax = a; \ ax = arg0; \
asm ("cltd\n\tidivl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b)); \ asm ("cltd\n\tidivl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (arg1)); \
return dx; \ return dx; \
} }
#define perform_fixdfsi(a) \ #define perform_fixdfsi(arg0) \
{ \ { \
auto unsigned short ostatus; \ auto unsigned short ostatus; \
auto unsigned short nstatus; \ auto unsigned short nstatus; \
...@@ -122,7 +125,7 @@ ...@@ -122,7 +125,7 @@
asm volatile ("fnstcw %0" : "=m" (ostatus)); \ asm volatile ("fnstcw %0" : "=m" (ostatus)); \
nstatus = ostatus | 0x0c00; \ nstatus = ostatus | 0x0c00; \
asm volatile ("fldcw %0" : /* no outputs */ : "m" (nstatus)); \ asm volatile ("fldcw %0" : /* no outputs */ : "m" (nstatus)); \
tmp = a; \ tmp = arg0; \
asm volatile ("fldl %0" : /* no outputs */ : "m" (tmp)); \ asm volatile ("fldl %0" : /* no outputs */ : "m" (tmp)); \
asm volatile ("fistpl %0" : "=m" (ret)); \ asm volatile ("fistpl %0" : "=m" (ret)); \
asm volatile ("fldcw %0" : /* no outputs */ : "m" (ostatus)); \ asm volatile ("fldcw %0" : /* no outputs */ : "m" (ostatus)); \
......
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