mirror of
https://github.com/fluencelabs/wasmer
synced 2025-04-25 10:22:19 +00:00
Garbage in upper 32 bits shouldn't propagate to I64ExtendI32U's result.
This commit is contained in:
parent
77de93ec0e
commit
51e085a7ba
@ -4043,6 +4043,7 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
|
|||||||
false,
|
false,
|
||||||
)[0];
|
)[0];
|
||||||
self.value_stack.push(ret);
|
self.value_stack.push(ret);
|
||||||
|
|
||||||
Self::emit_relaxed_binop(
|
Self::emit_relaxed_binop(
|
||||||
a,
|
a,
|
||||||
&mut self.machine,
|
&mut self.machine,
|
||||||
@ -4051,6 +4052,16 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
|
|||||||
loc,
|
loc,
|
||||||
ret,
|
ret,
|
||||||
);
|
);
|
||||||
|
if let Location::Memory(base, off) = ret {
|
||||||
|
Self::emit_relaxed_binop(
|
||||||
|
a,
|
||||||
|
&mut self.machine,
|
||||||
|
Assembler::emit_mov,
|
||||||
|
Size::S32,
|
||||||
|
Location::Imm32(0),
|
||||||
|
Location::Memory(base, off + 4),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Operator::I64ExtendI32S => {
|
Operator::I64ExtendI32S => {
|
||||||
let loc =
|
let loc =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user