mirror of
https://github.com/fluencelabs/wasmer
synced 2025-04-02 07:51:03 +00:00
Correct this test and simplify.
This commit is contained in:
parent
07b5991080
commit
be181f9119
@ -1512,9 +1512,9 @@ impl X64FunctionCode {
|
|||||||
a.emit_add(Size::S64, Location::GPR(tmp_base), Location::GPR(tmp_bound));
|
a.emit_add(Size::S64, Location::GPR(tmp_base), Location::GPR(tmp_bound));
|
||||||
a.emit_mov(Size::S32, addr, Location::GPR(tmp_addr));
|
a.emit_mov(Size::S32, addr, Location::GPR(tmp_addr));
|
||||||
|
|
||||||
if offset != 0 && value_size != 0 {
|
|
||||||
// This branch is used for emitting "faster" code for the special case of (offset + value_size) not exceeding u32 range.
|
// This branch is used for emitting "faster" code for the special case of (offset + value_size) not exceeding u32 range.
|
||||||
match (offset as u32).checked_add(value_size as u32) {
|
match (offset as u32).checked_add(value_size as u32) {
|
||||||
|
Some(0) => {}
|
||||||
Some(x) => {
|
Some(x) => {
|
||||||
a.emit_add(Size::S64, Location::Imm32(x), Location::GPR(tmp_addr));
|
a.emit_add(Size::S64, Location::Imm32(x), Location::GPR(tmp_addr));
|
||||||
}
|
}
|
||||||
@ -1531,7 +1531,6 @@ impl X64FunctionCode {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Trap if the end address of the requested area is above that of the linear memory.
|
// Trap if the end address of the requested area is above that of the linear memory.
|
||||||
a.emit_add(Size::S64, Location::GPR(tmp_base), Location::GPR(tmp_addr));
|
a.emit_add(Size::S64, Location::GPR(tmp_base), Location::GPR(tmp_addr));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user