translator: double operator fix

This commit is contained in:
Alexey Stepanov
2016-08-17 17:10:18 +03:00
parent cb248253c8
commit 334ce2e661
@@ -8,11 +8,11 @@ class LLVMDoubleType() : LLVMType() {
//TODO switch by types: int + double = int
override fun operatorMinus(firstOp: LLVMSingleValue, secondOp: LLVMSingleValue): LLVMExpression =
LLVMExpression(LLVMDoubleType(), "fsub double i32 $firstOp, $secondOp")
LLVMExpression(LLVMDoubleType(), "fsub double $firstOp, $secondOp")
//TODO switch by types: int + double = int
override fun operatorTimes(firstOp: LLVMSingleValue, secondOp: LLVMSingleValue): LLVMExpression =
LLVMExpression(LLVMDoubleType(), "fmul double i32 $firstOp, $secondOp")
LLVMExpression(LLVMDoubleType(), "fmul double $firstOp, $secondOp")
//TODO switch by types: int + double = int
override fun operatorPlus(firstOp: LLVMSingleValue, secondOp: LLVMSingleValue): LLVMExpression =