summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn van Groningen2013-10-23 11:42:14 +0000
committerJohn van Groningen2013-10-23 11:42:14 +0000
commite55409a2151f7717f4e7e705305e1a60ad374b60 (patch)
treed8bf0b481da1214421fd456f053faec8e5db6df0
parentuse offset 0 instead of -4 of PC_RELATIVE_LONG_WORD_RELOCATION (diff)
remove casts in asm statement in umul_hl macro for clang
-rw-r--r--cginstructions.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/cginstructions.c b/cginstructions.c
index ebbbf8f..aa75489 100644
--- a/cginstructions.c
+++ b/cginstructions.c
@@ -1841,12 +1841,21 @@ UW _umul128 (UW multiplier, UW multiplicand, UW* highproduct);
#ifdef A64
# ifdef __GNUC__
-# define umul_hl(h,l,a,b) \
- __asm__ ("mulq %3" \
+# ifdef __clang__
+# define umul_hl(h,l,a,b) \
+ __asm__ ("mulq %3" \
+ : "=a" (l), \
+ "=d" (h) \
+ : "%0" (a), \
+ "rm" (b))
+# else
+# define umul_hl(h,l,a,b) \
+ __asm__ ("mulq %3" \
: "=a" ((UW)(l)), \
"=d" ((UW)(h)) \
: "%0" ((UW)(a)), \
"rm" ((UW)(b)))
+# endif
# else
# define umul_hl(h,l,a,b) l=_umul128 (a,b,&h)
# endif