diff options
author | John van Groningen | 2013-10-23 11:42:14 +0000 |
---|---|---|
committer | John van Groningen | 2013-10-23 11:42:14 +0000 |
commit | e55409a2151f7717f4e7e705305e1a60ad374b60 (patch) | |
tree | d8bf0b481da1214421fd456f053faec8e5db6df0 | |
parent | use 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.c | 13 |
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 |