From e55409a2151f7717f4e7e705305e1a60ad374b60 Mon Sep 17 00:00:00 2001 From: John van Groningen Date: Wed, 23 Oct 2013 11:42:14 +0000 Subject: remove casts in asm statement in umul_hl macro for clang --- cginstructions.c | 13 +++++++++++-- 1 file 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 -- cgit v1.2.3