summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/eigccx86.h
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-02-19 09:27:39 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-02-19 09:27:39 +0000
commitf391dd8ed47cc00d9d67785bc7d321064018c1b3 (patch)
tree8de9b613231465def4aa81ec73ab811d695ee8d7 /src/emu/eigccx86.h
parent08c3ff61e0146b865c2e118361279ab0588bbb60 (diff)
From: KO Myung-Hun [mailto:komh@chollian.net]
Subject: _mul_32x32_hi() and _mulu_32x32_hi() patch Hi/2. I've attached patches to fix validation fail of '_mul_32x32_hi()' and '_mulu_32x32_hi()' inline function when compiled GCC v3.3.5 with I686 optimization in according to advice of 'Vas Crabb'
Diffstat (limited to 'src/emu/eigccx86.h')
-rw-r--r--src/emu/eigccx86.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/emu/eigccx86.h b/src/emu/eigccx86.h
index fb8fe8ec261..5d01bd9d3ba 100644
--- a/src/emu/eigccx86.h
+++ b/src/emu/eigccx86.h
@@ -87,13 +87,14 @@ _mulu_32x32(UINT32 a, UINT32 b)
INLINE INT32 __attribute__((const, always_inline))
_mul_32x32_hi(INT32 a, INT32 b)
{
- register INT32 result;
+ register INT32 result, temp;
__asm__ (
" imull %[b] ;"
: [result] "=d" (result) /* result in edx */
- , [a] "+%a" (a) /* 'a' should be in eax on entry (clobbered) */
- : [b] "rm" (b) /* 'b' can be memory or register */
+ , [temp] "=a" (temp) /* This is effectively a clobber */
+ : [a] "%1" (a) /* 'a' should be in eax on entry */
+ , [b] "rm" (b) /* 'b' can be memory or register */
: "%cc" /* Clobbers condition codes */
);
@@ -111,13 +112,14 @@ _mul_32x32_hi(INT32 a, INT32 b)
INLINE UINT32 __attribute__((const, always_inline))
_mulu_32x32_hi(UINT32 a, UINT32 b)
{
- register UINT32 result;
+ register UINT32 result, temp;
__asm__ (
" mull %[b] ;"
: [result] "=d" (result) /* result in edx */
- , [a] "+%a" (a) /* 'a' should be in eax on entry (clobbered) */
- : [b] "rm" (b) /* 'b' can be memory or register */
+ , [temp] "=a" (temp) /* This is effectively a clobber */
+ : [a] "%1" (a) /* 'a' should be in eax on entry */
+ , [b] "rm" (b) /* 'b' can be memory or register */
: "%cc" /* Clobbers condition codes */
);