From ef9d8a30bcc527557db75a63f0c3f82b782ceef3 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Fri, 30 Sep 2016 00:46:45 +0300 Subject: [PATCH] WASM: fix translation of binary operations --- .../teavm/backend/wasm/generate/WasmGenerationVisitor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/teavm/backend/wasm/generate/WasmGenerationVisitor.java b/core/src/main/java/org/teavm/backend/wasm/generate/WasmGenerationVisitor.java index 12bf7720e..034af0397 100644 --- a/core/src/main/java/org/teavm/backend/wasm/generate/WasmGenerationVisitor.java +++ b/core/src/main/java/org/teavm/backend/wasm/generate/WasmGenerationVisitor.java @@ -158,10 +158,10 @@ class WasmGenerationVisitor implements StatementVisitor, ExprVisitor { generateBinary(WasmIntBinaryOperation.ADD, WasmFloatBinaryOperation.ADD, expr); break; case SUBTRACT: - generateBinary(WasmIntBinaryOperation.SUB, WasmFloatBinaryOperation.ADD, expr); + generateBinary(WasmIntBinaryOperation.SUB, WasmFloatBinaryOperation.SUB, expr); break; case MULTIPLY: - generateBinary(WasmIntBinaryOperation.MUL, WasmFloatBinaryOperation.ADD, expr); + generateBinary(WasmIntBinaryOperation.MUL, WasmFloatBinaryOperation.MUL, expr); break; case DIVIDE: generateBinary(WasmIntBinaryOperation.DIV_SIGNED, WasmFloatBinaryOperation.DIV, expr);