summaryrefslogtreecommitdiff
path: root/src/passes/LegalizeJSInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/LegalizeJSInterface.cpp')
-rw-r--r--src/passes/LegalizeJSInterface.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/passes/LegalizeJSInterface.cpp b/src/passes/LegalizeJSInterface.cpp
index 1c2685b10..c9cada3c0 100644
--- a/src/passes/LegalizeJSInterface.cpp
+++ b/src/passes/LegalizeJSInterface.cpp
@@ -180,7 +180,7 @@ private:
type->params.push_back(i32);
type->params.push_back(i32);
} else if (param == f32) {
- call->operands.push_back(builder.makeUnary(PromoteFloat32, builder.makeGetLocal(func->params.size(), f64)));
+ call->operands.push_back(builder.makeUnary(PromoteFloat32, builder.makeGetLocal(func->params.size(), f32)));
type->params.push_back(f64);
} else {
call->operands.push_back(builder.makeGetLocal(func->params.size(), param));
@@ -198,7 +198,7 @@ private:
type->result = i32;
} else if (im->functionType->result == f32) {
call->type = f64;
- func->body = builder.makeUnary(PromoteFloat32, call);
+ func->body = builder.makeUnary(DemoteFloat64, call);
type->result = f64;
} else {
call->type = im->functionType->result;