fmt
This commit is contained in:
@@ -3234,15 +3234,13 @@ impl<'this, M: ModuleContext> Context<'this, M> {
|
|||||||
let val = self.pop();
|
let val = self.pop();
|
||||||
|
|
||||||
let out_val = match val {
|
let out_val = match val {
|
||||||
ValueLocation::Immediate(imm) =>
|
ValueLocation::Immediate(imm) => {
|
||||||
ValueLocation::Immediate(
|
ValueLocation::Immediate(imm.as_i32().unwrap().leading_zeros().into())
|
||||||
imm.as_i32().unwrap().leading_zeros().into()
|
}
|
||||||
),
|
|
||||||
ValueLocation::Stack(offset) => {
|
ValueLocation::Stack(offset) => {
|
||||||
let offset = self.adjusted_offset(offset);
|
let offset = self.adjusted_offset(offset);
|
||||||
let temp = self.take_reg(I32).unwrap();
|
let temp = self.take_reg(I32).unwrap();
|
||||||
|
|
||||||
|
|
||||||
if is_x86_feature_detected!("lzcnt") {
|
if is_x86_feature_detected!("lzcnt") {
|
||||||
dynasm!(self.asm
|
dynasm!(self.asm
|
||||||
; lzcnt Rd(temp.rq().unwrap()), [rsp + offset]
|
; lzcnt Rd(temp.rq().unwrap()), [rsp + offset]
|
||||||
@@ -3292,10 +3290,9 @@ impl<'this, M: ModuleContext> Context<'this, M> {
|
|||||||
let val = self.pop();
|
let val = self.pop();
|
||||||
|
|
||||||
let out_val = match val {
|
let out_val = match val {
|
||||||
ValueLocation::Immediate(imm) =>
|
ValueLocation::Immediate(imm) => {
|
||||||
ValueLocation::Immediate(
|
ValueLocation::Immediate(imm.as_i64().unwrap().leading_zeros().into())
|
||||||
imm.as_i64().unwrap().leading_zeros().into()
|
}
|
||||||
),
|
|
||||||
ValueLocation::Stack(offset) => {
|
ValueLocation::Stack(offset) => {
|
||||||
let offset = self.adjusted_offset(offset);
|
let offset = self.adjusted_offset(offset);
|
||||||
let temp = self.take_reg(I64).unwrap();
|
let temp = self.take_reg(I64).unwrap();
|
||||||
@@ -3349,10 +3346,9 @@ impl<'this, M: ModuleContext> Context<'this, M> {
|
|||||||
let val = self.pop();
|
let val = self.pop();
|
||||||
|
|
||||||
let out_val = match val {
|
let out_val = match val {
|
||||||
ValueLocation::Immediate(imm) =>
|
ValueLocation::Immediate(imm) => {
|
||||||
ValueLocation::Immediate(
|
ValueLocation::Immediate(imm.as_i32().unwrap().trailing_zeros().into())
|
||||||
imm.as_i32().unwrap().trailing_zeros().into()
|
}
|
||||||
),
|
|
||||||
ValueLocation::Stack(offset) => {
|
ValueLocation::Stack(offset) => {
|
||||||
let offset = self.adjusted_offset(offset);
|
let offset = self.adjusted_offset(offset);
|
||||||
let temp = self.take_reg(I32).unwrap();
|
let temp = self.take_reg(I32).unwrap();
|
||||||
@@ -3402,10 +3398,9 @@ impl<'this, M: ModuleContext> Context<'this, M> {
|
|||||||
let val = self.pop();
|
let val = self.pop();
|
||||||
|
|
||||||
let out_val = match val {
|
let out_val = match val {
|
||||||
ValueLocation::Immediate(imm) =>
|
ValueLocation::Immediate(imm) => {
|
||||||
ValueLocation::Immediate(
|
ValueLocation::Immediate(imm.as_i64().unwrap().trailing_zeros().into())
|
||||||
imm.as_i64().unwrap().trailing_zeros().into()
|
}
|
||||||
),
|
|
||||||
ValueLocation::Stack(offset) => {
|
ValueLocation::Stack(offset) => {
|
||||||
let offset = self.adjusted_offset(offset);
|
let offset = self.adjusted_offset(offset);
|
||||||
let temp = self.take_reg(I64).unwrap();
|
let temp = self.take_reg(I64).unwrap();
|
||||||
@@ -3426,8 +3421,6 @@ impl<'this, M: ModuleContext> Context<'this, M> {
|
|||||||
self.free_value(ValueLocation::Reg(temp_zero_val));
|
self.free_value(ValueLocation::Reg(temp_zero_val));
|
||||||
ValueLocation::Reg(temp)
|
ValueLocation::Reg(temp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
ValueLocation::Reg(_) | ValueLocation::Cond(_) => {
|
ValueLocation::Reg(_) | ValueLocation::Cond(_) => {
|
||||||
let reg = self.into_reg(GPRType::Rq, val).unwrap();
|
let reg = self.into_reg(GPRType::Rq, val).unwrap();
|
||||||
@@ -5482,4 +5475,3 @@ impl IntoLabel for (LabelValue, LabelValue) {
|
|||||||
Box::new(const_values(self.0, self.1))
|
Box::new(const_values(self.0, self.1))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user