mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 09:05:45 +00:00
Bug 1280411 - Wasm x64 doesn't know how to pass i64 constants, r=bbouvier
This commit is contained in:
parent
cb85a85a36
commit
ecdad783a4
@ -393,6 +393,11 @@ if (hasI64()) {
|
||||
(func (result i32) (call_import 0 (i64.const 0x123456789abcdef0)))
|
||||
(export "" 0))`, imp)(), 42);
|
||||
|
||||
assertEq(wasmEvalText(`(module
|
||||
(import "param" "" (param i64)(param i64)(param i64)(param i64)(param i64)(param i64)(param i64) (param i64) (result i32))
|
||||
(func (result i32) (call_import 0 (i64.const 0x123456789abcdef0)(i64.const 0x123456789abcdef0)(i64.const 0x123456789abcdef0)(i64.const 0x123456789abcdef0)(i64.const 0x123456789abcdef0)(i64.const 0x123456789abcdef0)(i64.const 0x123456789abcdef0)(i64.const 0x123456789abcdef0)))
|
||||
(export "" 0))`, imp)(), 42);
|
||||
|
||||
assertEqI64(wasmEvalText(`(module
|
||||
(import "result" "" (param i32) (result i64))
|
||||
(func (result i64) (call_import 0 (i32.const 3)))
|
||||
|
@ -274,7 +274,10 @@ CodeGeneratorX86Shared::visitAsmJSPassStackArg(LAsmJSPassStackArg* ins)
|
||||
const MAsmJSPassStackArg* mir = ins->mir();
|
||||
Address dst(StackPointer, mir->spOffset());
|
||||
if (ins->arg()->isConstant()) {
|
||||
masm.storePtr(ImmWord(ToInt32(ins->arg())), dst);
|
||||
if (mir->input()->type() == MIRType::Int64)
|
||||
masm.storePtr(ImmWord(ToInt64(ins->arg())), dst);
|
||||
else
|
||||
masm.storePtr(ImmWord(ToInt32(ins->arg())), dst);
|
||||
} else {
|
||||
if (ins->arg()->isGeneralReg()) {
|
||||
masm.storePtr(ToRegister(ins->arg()), dst);
|
||||
|
Loading…
Reference in New Issue
Block a user