mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-20 04:06:30 +00:00
Add .clone() to fix singlepass.
This commit is contained in:
@ -557,6 +557,7 @@ impl X64FunctionCode {
|
||||
fsm.trappable_offsets.insert(
|
||||
offset,
|
||||
OffsetInfo {
|
||||
end_offset: offset + 1,
|
||||
activate_offset: offset,
|
||||
diff_id: state_diff_id,
|
||||
},
|
||||
@ -1179,7 +1180,7 @@ impl X64FunctionCode {
|
||||
let used_gprs = m.get_used_gprs();
|
||||
for r in used_gprs.iter() {
|
||||
a.emit_push(Size::S64, Location::GPR(*r));
|
||||
let content = m.state.register_values[X64Register::GPR(*r).to_index().0];
|
||||
let content = m.state.register_values[X64Register::GPR(*r).to_index().0].clone();
|
||||
assert!(content != MachineValue::Undefined);
|
||||
m.state.stack_values.push(content);
|
||||
}
|
||||
@ -1204,7 +1205,7 @@ impl X64FunctionCode {
|
||||
);
|
||||
}
|
||||
for r in used_xmms.iter().rev() {
|
||||
let content = m.state.register_values[X64Register::XMM(*r).to_index().0];
|
||||
let content = m.state.register_values[X64Register::XMM(*r).to_index().0].clone();
|
||||
assert!(content != MachineValue::Undefined);
|
||||
m.state.stack_values.push(content);
|
||||
}
|
||||
@ -1244,7 +1245,8 @@ impl X64FunctionCode {
|
||||
Location::Memory(_, _) => {
|
||||
match *param {
|
||||
Location::GPR(x) => {
|
||||
let content = m.state.register_values[X64Register::GPR(x).to_index().0];
|
||||
let content =
|
||||
m.state.register_values[X64Register::GPR(x).to_index().0].clone();
|
||||
// FIXME: There might be some corner cases (release -> emit_call_sysv -> acquire?) that cause this assertion to fail.
|
||||
// Hopefully nothing would be incorrect at runtime.
|
||||
|
||||
@ -1252,7 +1254,8 @@ impl X64FunctionCode {
|
||||
m.state.stack_values.push(content);
|
||||
}
|
||||
Location::XMM(x) => {
|
||||
let content = m.state.register_values[X64Register::XMM(x).to_index().0];
|
||||
let content =
|
||||
m.state.register_values[X64Register::XMM(x).to_index().0].clone();
|
||||
//assert!(content != MachineValue::Undefined);
|
||||
m.state.stack_values.push(content);
|
||||
}
|
||||
@ -1335,6 +1338,7 @@ impl X64FunctionCode {
|
||||
fsm.call_offsets.insert(
|
||||
offset,
|
||||
OffsetInfo {
|
||||
end_offset: offset + 1,
|
||||
activate_offset: offset,
|
||||
diff_id: state_diff_id,
|
||||
},
|
||||
@ -1694,6 +1698,7 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
|
||||
self.fsm.loop_offsets.insert(
|
||||
a.get_offset().0,
|
||||
OffsetInfo {
|
||||
end_offset: a.get_offset().0 + 1,
|
||||
activate_offset,
|
||||
diff_id: state_diff_id,
|
||||
},
|
||||
@ -3958,6 +3963,7 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
|
||||
self.fsm.loop_offsets.insert(
|
||||
a.get_offset().0,
|
||||
OffsetInfo {
|
||||
end_offset: a.get_offset().0 + 1,
|
||||
activate_offset,
|
||||
diff_id: state_diff_id,
|
||||
},
|
||||
|
Reference in New Issue
Block a user