mirror of
https://github.com/fluencelabs/wasmer
synced 2025-04-25 10:22:19 +00:00
cargo fmt
This commit is contained in:
parent
cf3d2a830d
commit
cafcfd3b50
@ -2342,13 +2342,14 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
|
|||||||
Location::Imm32(0),
|
Location::Imm32(0),
|
||||||
),
|
),
|
||||||
Operator::I32Clz => {
|
Operator::I32Clz => {
|
||||||
let loc = get_location_released(a, &mut self.machine, self.value_stack.pop().unwrap());
|
let loc =
|
||||||
|
get_location_released(a, &mut self.machine, self.value_stack.pop().unwrap());
|
||||||
let src = match loc {
|
let src = match loc {
|
||||||
Location::Imm32(_) | Location::Memory(_, _) => {
|
Location::Imm32(_) | Location::Memory(_, _) => {
|
||||||
let tmp = self.machine.acquire_temp_gpr().unwrap();
|
let tmp = self.machine.acquire_temp_gpr().unwrap();
|
||||||
a.emit_mov(Size::S32, loc, Location::GPR(tmp));
|
a.emit_mov(Size::S32, loc, Location::GPR(tmp));
|
||||||
tmp
|
tmp
|
||||||
},
|
}
|
||||||
Location::GPR(reg) => reg,
|
Location::GPR(reg) => reg,
|
||||||
_ => unreachable!(),
|
_ => unreachable!(),
|
||||||
};
|
};
|
||||||
@ -2361,7 +2362,7 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
|
|||||||
self.value_stack.push(ret);
|
self.value_stack.push(ret);
|
||||||
|
|
||||||
let dst = match ret {
|
let dst = match ret {
|
||||||
Location::Memory(_, _) => { self.machine.acquire_temp_gpr().unwrap() },
|
Location::Memory(_, _) => self.machine.acquire_temp_gpr().unwrap(),
|
||||||
Location::GPR(reg) => reg,
|
Location::GPR(reg) => reg,
|
||||||
_ => unreachable!(),
|
_ => unreachable!(),
|
||||||
};
|
};
|
||||||
@ -2381,17 +2382,17 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
|
|||||||
match loc {
|
match loc {
|
||||||
Location::Imm32(_) | Location::Memory(_, _) => {
|
Location::Imm32(_) | Location::Memory(_, _) => {
|
||||||
self.machine.release_temp_gpr(src);
|
self.machine.release_temp_gpr(src);
|
||||||
},
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
};
|
};
|
||||||
match ret {
|
match ret {
|
||||||
Location::Memory(_, _) => {
|
Location::Memory(_, _) => {
|
||||||
a.emit_mov(Size::S32, Location::GPR(dst), ret);
|
a.emit_mov(Size::S32, Location::GPR(dst), ret);
|
||||||
self.machine.release_temp_gpr(dst);
|
self.machine.release_temp_gpr(dst);
|
||||||
},
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
};
|
};
|
||||||
},
|
}
|
||||||
Operator::I32Ctz => Self::emit_xcnt_i32(
|
Operator::I32Ctz => Self::emit_xcnt_i32(
|
||||||
a,
|
a,
|
||||||
&mut self.machine,
|
&mut self.machine,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user