diff gen/llvmhelpers.h @ 524:ca2dfe98036c

Binary ops had the wrong result type for real op imaginary. Fixes: run/creal_03
author Christian Kamm <kamm incasoftware de>
date Sun, 17 Aug 2008 12:21:53 +0200
parents 837af2a63564
children cecfee2d01a8
line wrap: on
line diff
--- a/gen/llvmhelpers.h	Sun Aug 17 11:39:36 2008 +0200
+++ b/gen/llvmhelpers.h	Sun Aug 17 12:21:53 2008 +0200
@@ -95,9 +95,11 @@
 // binary operations
 DValue* DtoBinAdd(DValue* lhs, DValue* rhs);
 DValue* DtoBinSub(DValue* lhs, DValue* rhs);
-DValue* DtoBinMul(DValue* lhs, DValue* rhs);
-DValue* DtoBinDiv(DValue* lhs, DValue* rhs);
-DValue* DtoBinRem(DValue* lhs, DValue* rhs);
+// these binops need an explicit result type to handling
+// to give 'ifloat op float' and 'float op ifloat' the correct type
+DValue* DtoBinMul(Type* resulttype, DValue* lhs, DValue* rhs);
+DValue* DtoBinDiv(Type* resulttype, DValue* lhs, DValue* rhs);
+DValue* DtoBinRem(Type* resulttype, DValue* lhs, DValue* rhs);
 
 // target stuff
 void findDefaultTarget();