mirror of
https://github.com/holub/mame
synced 2025-06-05 20:33:45 +03:00
Corrected syntax in some inline assembly [Balrog]
This commit is contained in:
parent
80fc8698e7
commit
497927733d
@ -44,7 +44,7 @@ _mul_32x32(INT32 a, INT32 b)
|
||||
: [result] "=A" (result) /* result in edx:eax */
|
||||
: [a] "%a" (a) /* 'a' should also be in eax on entry */
|
||||
, [b] "rm" (b) /* 'b' can be memory or register */
|
||||
: "%cc" /* Clobbers condition codes */
|
||||
: "cc" /* Clobbers condition codes */
|
||||
);
|
||||
|
||||
return result;
|
||||
@ -70,7 +70,7 @@ _mulu_32x32(UINT32 a, UINT32 b)
|
||||
: [result] "=A" (result) /* result in edx:eax */
|
||||
: [a] "%a" (a) /* 'a' should also be in eax on entry */
|
||||
, [b] "rm" (b) /* 'b' can be memory or register */
|
||||
: "%cc" /* Clobbers condition codes */
|
||||
: "cc" /* Clobbers condition codes */
|
||||
);
|
||||
|
||||
return result;
|
||||
@ -96,7 +96,7 @@ _mul_32x32_hi(INT32 a, INT32 b)
|
||||
, [temp] "=a" (temp) /* This is effectively a clobber */
|
||||
: [a] "a" (a) /* 'a' should be in eax on entry */
|
||||
, [b] "rm" (b) /* 'b' can be memory or register */
|
||||
: "%cc" /* Clobbers condition codes */
|
||||
: "cc" /* Clobbers condition codes */
|
||||
);
|
||||
|
||||
return result;
|
||||
@ -121,7 +121,7 @@ _mulu_32x32_hi(UINT32 a, UINT32 b)
|
||||
, [temp] "=a" (temp) /* This is effectively a clobber */
|
||||
: [a] "a" (a) /* 'a' should be in eax on entry */
|
||||
, [b] "rm" (b) /* 'b' can be memory or register */
|
||||
: "%cc" /* Clobbers condition codes */
|
||||
: "cc" /* Clobbers condition codes */
|
||||
);
|
||||
|
||||
return result;
|
||||
@ -150,7 +150,7 @@ _mul_32x32_shift(INT32 a, INT32 b, UINT8 shift)
|
||||
: [a] "%0" (a) /* 'a' should also be in eax on entry */
|
||||
, [b] "rm" (b) /* 'b' can be memory or register */
|
||||
, [shift] "Ic" (shift) /* 'shift' must be constant in 0-31 range or in cl */
|
||||
: "%edx", "%cc" /* clobbers edx and condition codes */
|
||||
: "%edx", "cc" /* clobbers edx and condition codes */
|
||||
);
|
||||
|
||||
return result;
|
||||
@ -180,7 +180,7 @@ _mulu_32x32_shift(UINT32 a, UINT32 b, UINT8 shift)
|
||||
: [a] "%0" (a) /* 'a' should also be in eax on entry */
|
||||
, [b] "rm" (b) /* 'b' can be memory or register */
|
||||
, [shift] "Ic" (shift) /* 'shift' must be constant in 0-31 range or in cl */
|
||||
: "%edx", "%cc" /* clobbers edx and condition codes */
|
||||
: "%edx", "cc" /* clobbers edx and condition codes */
|
||||
);
|
||||
|
||||
return result;
|
||||
@ -207,7 +207,7 @@ _div_64x32(INT64 a, INT32 b)
|
||||
, [temp] "=d" (temp) /* This is effectively a clobber */
|
||||
: [a] "A" (a) /* 'a' in edx:eax */
|
||||
, [b] "rm" (b) /* 'b' in register or memory */
|
||||
: "%cc" /* Clobbers condition codes */
|
||||
: "cc" /* Clobbers condition codes */
|
||||
);
|
||||
|
||||
return result;
|
||||
@ -234,7 +234,7 @@ _divu_64x32(UINT64 a, UINT32 b)
|
||||
, [temp] "=d" (temp) /* This is effectively a clobber */
|
||||
: [a] "A" (a) /* 'a' in edx:eax */
|
||||
, [b] "rm" (b) /* 'b' in register or memory */
|
||||
: "%cc" /* Clobbers condition codes */
|
||||
: "cc" /* Clobbers condition codes */
|
||||
);
|
||||
|
||||
return result;
|
||||
@ -262,7 +262,7 @@ _div_64x32_rem(INT64 dividend, INT32 divisor, INT32 *remainder)
|
||||
, [remainder] "=d" (*remainder) /* Remainder ends up in edx */
|
||||
: [dividend] "A" (dividend) /* 'dividend' in edx:eax */
|
||||
, [divisor] "rm" (divisor) /* 'divisor' in register or memory */
|
||||
: "%cc" /* Clobbers condition codes */
|
||||
: "cc" /* Clobbers condition codes */
|
||||
);
|
||||
|
||||
return quotient;
|
||||
@ -290,7 +290,7 @@ _divu_64x32_rem(UINT64 dividend, UINT32 divisor, UINT32 *remainder)
|
||||
, [remainder] "=d" (*remainder) /* Remainder ends up in edx */
|
||||
: [dividend] "A" (dividend) /* 'dividend' in edx:eax */
|
||||
, [divisor] "rm" (divisor) /* 'divisor' in register or memory */
|
||||
: "%cc" /* Clobbers condition codes */
|
||||
: "cc" /* Clobbers condition codes */
|
||||
);
|
||||
|
||||
return quotient;
|
||||
@ -322,7 +322,7 @@ _div_32x32_shift(INT32 a, INT32 b, UINT8 shift)
|
||||
: [a] "0" (a) /* 'a' should also be in eax on entry */
|
||||
, [b] "rm" (b) /* 'b' can be memory or register */
|
||||
, [shift] "Ic" (shift) /* 'shift' must be constant in 0-31 range or in cl */
|
||||
: "%edx", "%cc" /* clobbers edx and condition codes */
|
||||
: "%edx", "cc" /* clobbers edx and condition codes */
|
||||
);
|
||||
|
||||
return result;
|
||||
@ -354,7 +354,7 @@ _divu_32x32_shift(UINT32 a, UINT32 b, UINT8 shift)
|
||||
: [a] "0" (a) /* 'a' should also be in eax on entry */
|
||||
, [b] "rm" (b) /* 'b' can be memory or register */
|
||||
, [shift] "Ic" (shift) /* 'shift' must be constant in 0-31 range or in cl */
|
||||
: "%edx", "%cc" /* clobbers edx and condition codes */
|
||||
: "%edx", "cc" /* clobbers edx and condition codes */
|
||||
);
|
||||
|
||||
return result;
|
||||
@ -381,7 +381,7 @@ _mod_64x32(INT64 a, INT32 b)
|
||||
, [temp] "=a" (temp) /* This is effectively a clobber */
|
||||
: [a] "A" (a) /* 'a' in edx:eax */
|
||||
, [b] "rm" (b) /* 'b' in register or memory */
|
||||
: "%cc" /* Clobbers condition codes */
|
||||
: "cc" /* Clobbers condition codes */
|
||||
);
|
||||
|
||||
return result;
|
||||
@ -408,7 +408,7 @@ _modu_64x32(UINT64 a, UINT32 b)
|
||||
, [temp] "=a" (temp) /* This is effectively a clobber */
|
||||
: [a] "A" (a) /* 'a' in edx:eax */
|
||||
, [b] "rm" (b) /* 'b' in register or memory */
|
||||
: "%cc" /* Clobbers condition codes */
|
||||
: "cc" /* Clobbers condition codes */
|
||||
);
|
||||
|
||||
return result;
|
||||
@ -458,7 +458,7 @@ _count_leading_zeros(UINT32 value)
|
||||
"1: xorl $31, %[result] ;"
|
||||
: [result] "=r" (result) /* result can be in any register */
|
||||
: [value] "rm" (value) /* 'value' can be register or memory */
|
||||
: "%cc" /* clobbers condition codes */
|
||||
: "cc" /* clobbers condition codes */
|
||||
);
|
||||
|
||||
return result;
|
||||
@ -485,7 +485,7 @@ _count_leading_ones(UINT32 value)
|
||||
"1: xorl $31, %[result] ;"
|
||||
: [result] "=r" (result) /* result can be in any register */
|
||||
: [value] "rmi" (value) /* 'value' can be register, memory or immediate */
|
||||
: "%cc" /* clobbers condition codes */
|
||||
: "cc" /* clobbers condition codes */
|
||||
);
|
||||
|
||||
return result;
|
||||
@ -516,7 +516,7 @@ _compare_exchange32(INT32 volatile *ptr, INT32 compare, INT32 exchange)
|
||||
, [result] "=a" (result)
|
||||
: [compare] "1" (compare)
|
||||
, [exchange] "q" (exchange)
|
||||
: "%cc"
|
||||
: "cc"
|
||||
);
|
||||
|
||||
return result;
|
||||
@ -543,7 +543,7 @@ _compare_exchange64(INT64 volatile *ptr, INT64 compare, INT64 exchange)
|
||||
, [result] "=a" (result)
|
||||
: [compare] "1" (compare)
|
||||
, [exchange] "q" (exchange)
|
||||
: "%cc"
|
||||
: "cc"
|
||||
);
|
||||
|
||||
return result;
|
||||
@ -591,7 +591,7 @@ _atomic_add32(INT32 volatile *ptr, INT32 delta)
|
||||
: [ptr] "+m" (*ptr)
|
||||
, [result] "+r" (result)
|
||||
:
|
||||
: "%cc"
|
||||
: "cc"
|
||||
);
|
||||
|
||||
return result + delta;
|
||||
@ -615,7 +615,7 @@ _atomic_increment32(INT32 volatile *ptr)
|
||||
: [ptr] "+m" (*ptr)
|
||||
, [result] "+r" (result)
|
||||
:
|
||||
: "%cc"
|
||||
: "cc"
|
||||
);
|
||||
|
||||
return result + 1;
|
||||
@ -639,7 +639,7 @@ _atomic_decrement32(INT32 volatile *ptr)
|
||||
: [ptr] "+m" (*ptr)
|
||||
, [result] "+r" (result)
|
||||
:
|
||||
: "%cc"
|
||||
: "cc"
|
||||
);
|
||||
|
||||
return result - 1;
|
||||
|
@ -118,7 +118,7 @@ INT32 osd_scalable_lock_acquire(osd_scalable_lock *lock)
|
||||
: [haslock] "+m" (lock->slot[myslot].haslock)
|
||||
, [tmp] "=&r" (tmp)
|
||||
:
|
||||
: "%cc"
|
||||
: "cc"
|
||||
);
|
||||
#elif defined(__ppc__) || defined (__PPC__) || defined(__ppc64__) || defined(__PPC64__)
|
||||
register INT32 tmp;
|
||||
@ -239,7 +239,7 @@ void osd_lock_acquire(osd_lock *lock)
|
||||
: [spin] "+c" (spin)
|
||||
, [tmp] "=&r" (tmp)
|
||||
: [holder] "m" (lock->holder)
|
||||
: "%cc"
|
||||
: "cc"
|
||||
);
|
||||
#elif defined(__ppc__) || defined(__PPC__)
|
||||
__asm__ __volatile__ (
|
||||
|
Loading…
Reference in New Issue
Block a user