Refactor x64::Insts that use an is_64 bool to use OperandSize.
This commit is contained in:
committed by
Andrew Brown
parent
3306408100
commit
7bd96c8e2f
@@ -42,7 +42,7 @@ pub enum Inst {
|
||||
// Integer instructions.
|
||||
/// Integer arithmetic/bit-twiddling: (add sub and or xor mul adc? sbb?) (32 64) (reg addr imm) reg
|
||||
AluRmiR {
|
||||
is_64: bool,
|
||||
size: OperandSize, // 4 or 8
|
||||
op: AluRmiROpcode,
|
||||
src: RegMemImm,
|
||||
dst: Writable<Reg>,
|
||||
@@ -111,14 +111,14 @@ pub enum Inst {
|
||||
/// Constant materialization: (imm32 imm64) reg.
|
||||
/// Either: movl $imm32, %reg32 or movabsq $imm64, %reg32.
|
||||
Imm {
|
||||
dst_is_64: bool,
|
||||
dst_size: OperandSize, // 4 or 8
|
||||
simm64: u64,
|
||||
dst: Writable<Reg>,
|
||||
},
|
||||
|
||||
/// GPR to GPR move: mov (64 32) reg reg.
|
||||
MovRR {
|
||||
is_64: bool,
|
||||
size: OperandSize, // 4 or 8
|
||||
src: Reg,
|
||||
dst: Writable<Reg>,
|
||||
},
|
||||
@@ -255,8 +255,7 @@ pub enum Inst {
|
||||
|
||||
/// Converts an unsigned int64 to a float32/float64.
|
||||
CvtUint64ToFloatSeq {
|
||||
/// Is the target a 64-bits or 32-bits register?
|
||||
to_f64: bool,
|
||||
dst_size: OperandSize, // 4 or 8
|
||||
/// A copy of the source register, fed by lowering. It is marked as modified during
|
||||
/// register allocation to make sure that the temporary registers differ from the src
|
||||
/// register, since both registers are live at the same time in the generated code
|
||||
@@ -308,8 +307,7 @@ pub enum Inst {
|
||||
/// XMM (scalar) conditional move.
|
||||
/// Overwrites the destination register if cc is set.
|
||||
XmmCmove {
|
||||
/// Whether the cmove is moving either 32 or 64 bits.
|
||||
is_64: bool,
|
||||
size: OperandSize, // 4 or 8
|
||||
cc: CC,
|
||||
src: RegMem,
|
||||
dst: Writable<Reg>,
|
||||
@@ -328,7 +326,7 @@ pub enum Inst {
|
||||
src: RegMem,
|
||||
dst: Writable<Reg>,
|
||||
imm: u8,
|
||||
is64: bool,
|
||||
size: OperandSize, // 4 or 8
|
||||
},
|
||||
|
||||
// =====================================
|
||||
@@ -575,19 +573,15 @@ impl Inst {
|
||||
}
|
||||
|
||||
pub(crate) fn alu_rmi_r(
|
||||
is_64: bool,
|
||||
size: OperandSize,
|
||||
op: AluRmiROpcode,
|
||||
src: RegMemImm,
|
||||
dst: Writable<Reg>,
|
||||
) -> Self {
|
||||
debug_assert!(size.is_one_of(&[OperandSize::Size32, OperandSize::Size64]));
|
||||
src.assert_regclass_is(RegClass::I64);
|
||||
debug_assert!(dst.to_reg().get_class() == RegClass::I64);
|
||||
Self::AluRmiR {
|
||||
is_64,
|
||||
op,
|
||||
src,
|
||||
dst,
|
||||
}
|
||||
Self::AluRmiR { size, op, src, dst }
|
||||
}
|
||||
|
||||
pub(crate) fn unary_rm_r(
|
||||
@@ -598,7 +592,7 @@ impl Inst {
|
||||
) -> Self {
|
||||
src.assert_regclass_is(RegClass::I64);
|
||||
debug_assert!(dst.to_reg().get_class() == RegClass::I64);
|
||||
debug_assert!(size.is_size(&[
|
||||
debug_assert!(size.is_one_of(&[
|
||||
OperandSize::Size16,
|
||||
OperandSize::Size32,
|
||||
OperandSize::Size64
|
||||
@@ -626,7 +620,7 @@ impl Inst {
|
||||
}
|
||||
|
||||
pub(crate) fn mul_hi(size: OperandSize, signed: bool, rhs: RegMem) -> Inst {
|
||||
debug_assert!(size.is_size(&[
|
||||
debug_assert!(size.is_one_of(&[
|
||||
OperandSize::Size16,
|
||||
OperandSize::Size32,
|
||||
OperandSize::Size64
|
||||
@@ -657,22 +651,27 @@ impl Inst {
|
||||
Inst::SignExtendData { size }
|
||||
}
|
||||
|
||||
pub(crate) fn imm(size: OperandSize, simm64: u64, dst: Writable<Reg>) -> Inst {
|
||||
pub(crate) fn imm(dst_size: OperandSize, simm64: u64, dst: Writable<Reg>) -> Inst {
|
||||
debug_assert!(dst_size.is_one_of(&[OperandSize::Size32, OperandSize::Size64]));
|
||||
debug_assert!(dst.to_reg().get_class() == RegClass::I64);
|
||||
// Try to generate a 32-bit immediate when the upper high bits are zeroed (which matches
|
||||
// the semantics of movl).
|
||||
let dst_is_64 = size == OperandSize::Size64 && simm64 > u32::max_value() as u64;
|
||||
let dst_size = match dst_size {
|
||||
OperandSize::Size64 if simm64 > u32::max_value() as u64 => OperandSize::Size64,
|
||||
_ => OperandSize::Size32,
|
||||
};
|
||||
Inst::Imm {
|
||||
dst_is_64,
|
||||
dst_size,
|
||||
simm64,
|
||||
dst,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn mov_r_r(is_64: bool, src: Reg, dst: Writable<Reg>) -> Inst {
|
||||
pub(crate) fn mov_r_r(size: OperandSize, src: Reg, dst: Writable<Reg>) -> Inst {
|
||||
debug_assert!(size.is_one_of(&[OperandSize::Size32, OperandSize::Size64]));
|
||||
debug_assert!(src.get_class() == RegClass::I64);
|
||||
debug_assert!(dst.to_reg().get_class() == RegClass::I64);
|
||||
Inst::MovRR { is_64, src, dst }
|
||||
Inst::MovRR { size, src, dst }
|
||||
}
|
||||
|
||||
// TODO Can be replaced by `Inst::move` (high-level) and `Inst::unary_rm_r` (low-level)
|
||||
@@ -723,7 +722,7 @@ impl Inst {
|
||||
) -> Inst {
|
||||
debug_assert!(src.get_class() == RegClass::V128);
|
||||
debug_assert!(dst.to_reg().get_class() == RegClass::I64);
|
||||
debug_assert!(dst_size.is_size(&[OperandSize::Size32, OperandSize::Size64]));
|
||||
debug_assert!(dst_size.is_one_of(&[OperandSize::Size32, OperandSize::Size64]));
|
||||
Inst::XmmToGpr {
|
||||
op,
|
||||
src,
|
||||
@@ -739,7 +738,7 @@ impl Inst {
|
||||
dst: Writable<Reg>,
|
||||
) -> Inst {
|
||||
src.assert_regclass_is(RegClass::I64);
|
||||
debug_assert!(src_size.is_size(&[OperandSize::Size32, OperandSize::Size64]));
|
||||
debug_assert!(src_size.is_one_of(&[OperandSize::Size32, OperandSize::Size64]));
|
||||
debug_assert!(dst.to_reg().get_class() == RegClass::V128);
|
||||
Inst::GprToXmm {
|
||||
op,
|
||||
@@ -756,12 +755,13 @@ impl Inst {
|
||||
}
|
||||
|
||||
pub(crate) fn cvt_u64_to_float_seq(
|
||||
to_f64: bool,
|
||||
dst_size: OperandSize,
|
||||
src: Writable<Reg>,
|
||||
tmp_gpr1: Writable<Reg>,
|
||||
tmp_gpr2: Writable<Reg>,
|
||||
dst: Writable<Reg>,
|
||||
) -> Inst {
|
||||
debug_assert!(dst_size.is_one_of(&[OperandSize::Size32, OperandSize::Size64]));
|
||||
debug_assert!(src.to_reg().get_class() == RegClass::I64);
|
||||
debug_assert!(tmp_gpr1.to_reg().get_class() == RegClass::I64);
|
||||
debug_assert!(tmp_gpr2.to_reg().get_class() == RegClass::I64);
|
||||
@@ -771,7 +771,7 @@ impl Inst {
|
||||
dst,
|
||||
tmp_gpr1,
|
||||
tmp_gpr2,
|
||||
to_f64,
|
||||
dst_size,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -784,8 +784,8 @@ impl Inst {
|
||||
tmp_gpr: Writable<Reg>,
|
||||
tmp_xmm: Writable<Reg>,
|
||||
) -> Inst {
|
||||
debug_assert!(src_size.is_size(&[OperandSize::Size32, OperandSize::Size64]));
|
||||
debug_assert!(dst_size.is_size(&[OperandSize::Size32, OperandSize::Size64]));
|
||||
debug_assert!(src_size.is_one_of(&[OperandSize::Size32, OperandSize::Size64]));
|
||||
debug_assert!(dst_size.is_one_of(&[OperandSize::Size32, OperandSize::Size64]));
|
||||
debug_assert!(src.to_reg().get_class() == RegClass::V128);
|
||||
debug_assert!(tmp_xmm.to_reg().get_class() == RegClass::V128);
|
||||
debug_assert!(tmp_gpr.to_reg().get_class() == RegClass::I64);
|
||||
@@ -810,8 +810,8 @@ impl Inst {
|
||||
tmp_gpr: Writable<Reg>,
|
||||
tmp_xmm: Writable<Reg>,
|
||||
) -> Inst {
|
||||
debug_assert!(src_size.is_size(&[OperandSize::Size32, OperandSize::Size64]));
|
||||
debug_assert!(dst_size.is_size(&[OperandSize::Size32, OperandSize::Size64]));
|
||||
debug_assert!(src_size.is_one_of(&[OperandSize::Size32, OperandSize::Size64]));
|
||||
debug_assert!(dst_size.is_one_of(&[OperandSize::Size32, OperandSize::Size64]));
|
||||
debug_assert!(src.to_reg().get_class() == RegClass::V128);
|
||||
debug_assert!(tmp_xmm.to_reg().get_class() == RegClass::V128);
|
||||
debug_assert!(tmp_gpr.to_reg().get_class() == RegClass::I64);
|
||||
@@ -833,7 +833,7 @@ impl Inst {
|
||||
lhs: Reg,
|
||||
rhs_dst: Writable<Reg>,
|
||||
) -> Inst {
|
||||
debug_assert!(size.is_size(&[OperandSize::Size32, OperandSize::Size64]));
|
||||
debug_assert!(size.is_one_of(&[OperandSize::Size32, OperandSize::Size64]));
|
||||
debug_assert_eq!(lhs.get_class(), RegClass::V128);
|
||||
debug_assert_eq!(rhs_dst.to_reg().get_class(), RegClass::V128);
|
||||
Inst::XmmMinMaxSeq {
|
||||
@@ -849,14 +849,15 @@ impl Inst {
|
||||
src: RegMem,
|
||||
dst: Writable<Reg>,
|
||||
imm: u8,
|
||||
is64: bool,
|
||||
size: OperandSize,
|
||||
) -> Inst {
|
||||
debug_assert!(size.is_one_of(&[OperandSize::Size32, OperandSize::Size64]));
|
||||
Inst::XmmRmRImm {
|
||||
op,
|
||||
src,
|
||||
dst,
|
||||
imm,
|
||||
is64,
|
||||
size,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -890,7 +891,7 @@ impl Inst {
|
||||
pub(crate) fn mov64_rm_r(src: RegMem, dst: Writable<Reg>) -> Inst {
|
||||
src.assert_regclass_is(RegClass::I64);
|
||||
match src {
|
||||
RegMem::Reg { reg } => Self::mov_r_r(true, reg, dst),
|
||||
RegMem::Reg { reg } => Self::mov_r_r(OperandSize::Size64, reg, dst),
|
||||
RegMem::Mem { addr } => Self::mov64_m_r(addr, dst),
|
||||
}
|
||||
}
|
||||
@@ -969,7 +970,7 @@ impl Inst {
|
||||
}
|
||||
|
||||
pub(crate) fn cmove(size: OperandSize, cc: CC, src: RegMem, dst: Writable<Reg>) -> Inst {
|
||||
debug_assert!(size.is_size(&[
|
||||
debug_assert!(size.is_one_of(&[
|
||||
OperandSize::Size16,
|
||||
OperandSize::Size32,
|
||||
OperandSize::Size64
|
||||
@@ -978,15 +979,11 @@ impl Inst {
|
||||
Inst::Cmove { size, cc, src, dst }
|
||||
}
|
||||
|
||||
pub(crate) fn xmm_cmove(is_64: bool, cc: CC, src: RegMem, dst: Writable<Reg>) -> Inst {
|
||||
pub(crate) fn xmm_cmove(size: OperandSize, cc: CC, src: RegMem, dst: Writable<Reg>) -> Inst {
|
||||
debug_assert!(size.is_one_of(&[OperandSize::Size32, OperandSize::Size64]));
|
||||
src.assert_regclass_is(RegClass::V128);
|
||||
debug_assert!(dst.to_reg().get_class() == RegClass::V128);
|
||||
Inst::XmmCmove {
|
||||
is_64,
|
||||
cc,
|
||||
src,
|
||||
dst,
|
||||
}
|
||||
Inst::XmmCmove { size, cc, src, dst }
|
||||
}
|
||||
|
||||
pub(crate) fn push64(src: RegMemImm) -> Inst {
|
||||
@@ -1187,12 +1184,20 @@ impl Inst {
|
||||
types::I16X8 | types::B16X8 => Inst::xmm_rm_r(SseOpcode::Pcmpeqw, from, to),
|
||||
types::I32X4 | types::B32X4 => Inst::xmm_rm_r(SseOpcode::Pcmpeqd, from, to),
|
||||
types::I64X2 | types::B64X2 => Inst::xmm_rm_r(SseOpcode::Pcmpeqq, from, to),
|
||||
types::F32X4 => {
|
||||
Inst::xmm_rm_r_imm(SseOpcode::Cmpps, from, to, FcmpImm::Equal.encode(), false)
|
||||
}
|
||||
types::F64X2 => {
|
||||
Inst::xmm_rm_r_imm(SseOpcode::Cmppd, from, to, FcmpImm::Equal.encode(), false)
|
||||
}
|
||||
types::F32X4 => Inst::xmm_rm_r_imm(
|
||||
SseOpcode::Cmpps,
|
||||
from,
|
||||
to,
|
||||
FcmpImm::Equal.encode(),
|
||||
OperandSize::Size32,
|
||||
),
|
||||
types::F64X2 => Inst::xmm_rm_r_imm(
|
||||
SseOpcode::Cmppd,
|
||||
from,
|
||||
to,
|
||||
FcmpImm::Equal.encode(),
|
||||
OperandSize::Size32,
|
||||
),
|
||||
_ => unimplemented!("unimplemented type for Inst::equals: {}", ty),
|
||||
}
|
||||
}
|
||||
@@ -1257,34 +1262,30 @@ impl PrettyPrint for Inst {
|
||||
ljustify(s1 + &s2)
|
||||
}
|
||||
|
||||
fn suffix_lq(is_64: bool) -> String {
|
||||
(if is_64 { "q" } else { "l" }).to_string()
|
||||
}
|
||||
|
||||
fn suffix_lqb(is_64: bool, is_8: bool) -> String {
|
||||
match (is_64, is_8) {
|
||||
(_, true) => "b".to_string(),
|
||||
(true, false) => "q".to_string(),
|
||||
(false, false) => "l".to_string(),
|
||||
fn suffix_lq(size: OperandSize) -> String {
|
||||
match size {
|
||||
OperandSize::Size32 => "l",
|
||||
OperandSize::Size64 => "q",
|
||||
_ => unreachable!(),
|
||||
}
|
||||
.to_string()
|
||||
}
|
||||
|
||||
fn size_lq(is_64: bool) -> u8 {
|
||||
if is_64 {
|
||||
8
|
||||
} else {
|
||||
4
|
||||
fn suffix_lqb(size: OperandSize, is_8: bool) -> String {
|
||||
match (size, is_8) {
|
||||
(_, true) => "b",
|
||||
(OperandSize::Size32, false) => "l",
|
||||
(OperandSize::Size64, false) => "q",
|
||||
_ => unreachable!(),
|
||||
}
|
||||
.to_string()
|
||||
}
|
||||
|
||||
fn size_lqb(is_64: bool, is_8: bool) -> u8 {
|
||||
fn size_lqb(size: OperandSize, is_8: bool) -> u8 {
|
||||
if is_8 {
|
||||
1
|
||||
} else if is_64 {
|
||||
8
|
||||
} else {
|
||||
4
|
||||
return 1;
|
||||
}
|
||||
size.to_bytes()
|
||||
}
|
||||
|
||||
fn suffix_bwlq(size: OperandSize) -> String {
|
||||
@@ -1299,16 +1300,11 @@ impl PrettyPrint for Inst {
|
||||
match self {
|
||||
Inst::Nop { len } => format!("{} len={}", ljustify("nop".to_string()), len),
|
||||
|
||||
Inst::AluRmiR {
|
||||
is_64,
|
||||
op,
|
||||
src,
|
||||
dst,
|
||||
} => format!(
|
||||
Inst::AluRmiR { size, op, src, dst } => format!(
|
||||
"{} {}, {}",
|
||||
ljustify2(op.to_string(), suffix_lqb(*is_64, op.is_8bit())),
|
||||
src.show_rru_sized(mb_rru, size_lqb(*is_64, op.is_8bit())),
|
||||
show_ireg_sized(dst.to_reg(), mb_rru, size_lqb(*is_64, op.is_8bit())),
|
||||
ljustify2(op.to_string(), suffix_lqb(*size, op.is_8bit())),
|
||||
src.show_rru_sized(mb_rru, size_lqb(*size, op.is_8bit())),
|
||||
show_ireg_sized(dst.to_reg(), mb_rru, size_lqb(*size, op.is_8bit())),
|
||||
),
|
||||
|
||||
Inst::UnaryRmR { src, dst, op, size } => format!(
|
||||
@@ -1426,14 +1422,18 @@ impl PrettyPrint for Inst {
|
||||
src,
|
||||
dst,
|
||||
imm,
|
||||
is64,
|
||||
size,
|
||||
..
|
||||
} => format!(
|
||||
"{} ${}, {}, {}",
|
||||
ljustify(format!(
|
||||
"{}{}",
|
||||
op.to_string(),
|
||||
if *is64 { ".w" } else { "" }
|
||||
if *size == OperandSize::Size64 {
|
||||
".w"
|
||||
} else {
|
||||
""
|
||||
}
|
||||
)),
|
||||
imm,
|
||||
src.show_rru(mb_rru),
|
||||
@@ -1483,12 +1483,16 @@ impl PrettyPrint for Inst {
|
||||
),
|
||||
|
||||
Inst::CvtUint64ToFloatSeq {
|
||||
src, dst, to_f64, ..
|
||||
src, dst, dst_size, ..
|
||||
} => format!(
|
||||
"{} {}, {}",
|
||||
ljustify(format!(
|
||||
"u64_to_{}_seq",
|
||||
if *to_f64 { "f64" } else { "f32" }
|
||||
if *dst_size == OperandSize::Size64 {
|
||||
"f64"
|
||||
} else {
|
||||
"f32"
|
||||
}
|
||||
)),
|
||||
show_ireg_sized(src.to_reg(), mb_rru, 8),
|
||||
dst.show_rru(mb_rru),
|
||||
@@ -1529,11 +1533,11 @@ impl PrettyPrint for Inst {
|
||||
),
|
||||
|
||||
Inst::Imm {
|
||||
dst_is_64,
|
||||
dst_size,
|
||||
simm64,
|
||||
dst,
|
||||
} => {
|
||||
if *dst_is_64 {
|
||||
if *dst_size == OperandSize::Size64 {
|
||||
format!(
|
||||
"{} ${}, {}",
|
||||
ljustify("movabsq".to_string()),
|
||||
@@ -1550,11 +1554,11 @@ impl PrettyPrint for Inst {
|
||||
}
|
||||
}
|
||||
|
||||
Inst::MovRR { is_64, src, dst } => format!(
|
||||
Inst::MovRR { size, src, dst } => format!(
|
||||
"{} {}, {}",
|
||||
ljustify2("mov".to_string(), suffix_lq(*is_64)),
|
||||
show_ireg_sized(*src, mb_rru, size_lq(*is_64)),
|
||||
show_ireg_sized(dst.to_reg(), mb_rru, size_lq(*is_64))
|
||||
ljustify2("mov".to_string(), suffix_lq(*size)),
|
||||
show_ireg_sized(*src, mb_rru, size.to_bytes()),
|
||||
show_ireg_sized(dst.to_reg(), mb_rru, size.to_bytes())
|
||||
),
|
||||
|
||||
Inst::MovzxRmR {
|
||||
@@ -1665,19 +1669,17 @@ impl PrettyPrint for Inst {
|
||||
show_ireg_sized(dst.to_reg(), mb_rru, size.to_bytes())
|
||||
),
|
||||
|
||||
Inst::XmmCmove {
|
||||
is_64,
|
||||
cc,
|
||||
src,
|
||||
dst,
|
||||
} => {
|
||||
let size = if *is_64 { 8 } else { 4 };
|
||||
Inst::XmmCmove { size, cc, src, dst } => {
|
||||
format!(
|
||||
"j{} $next; mov{} {}, {}; $next: ",
|
||||
cc.invert().to_string(),
|
||||
if *is_64 { "sd" } else { "ss" },
|
||||
src.show_rru_sized(mb_rru, size),
|
||||
show_ireg_sized(dst.to_reg(), mb_rru, size)
|
||||
if *size == OperandSize::Size64 {
|
||||
"sd"
|
||||
} else {
|
||||
"ss"
|
||||
},
|
||||
src.show_rru_sized(mb_rru, size.to_bytes()),
|
||||
show_ireg_sized(dst.to_reg(), mb_rru, size.to_bytes())
|
||||
)
|
||||
}
|
||||
|
||||
@@ -2482,9 +2484,9 @@ impl MachInst for Inst {
|
||||
// out the upper 32 bits of the destination. For example, we could
|
||||
// conceivably use `movl %reg, %reg` to zero out the top 32 bits of
|
||||
// %reg.
|
||||
Self::MovRR {
|
||||
is_64, src, dst, ..
|
||||
} if *is_64 => Some((*dst, *src)),
|
||||
Self::MovRR { size, src, dst, .. } if *size == OperandSize::Size64 => {
|
||||
Some((*dst, *src))
|
||||
}
|
||||
// Note as well that MOVS[S|D] when used in the `XmmUnaryRmR` context are pure moves of
|
||||
// scalar floating-point values (and annotate `dst` as `def`s to the register allocator)
|
||||
// whereas the same operation in a packed context, e.g. `XMM_RM_R`, is used to merge a
|
||||
@@ -2559,7 +2561,7 @@ impl MachInst for Inst {
|
||||
// If this isn't true, we have gone way off the rails.
|
||||
debug_assert!(rc_dst == rc_src);
|
||||
match rc_dst {
|
||||
RegClass::I64 => Inst::mov_r_r(true, src_reg, dst_reg),
|
||||
RegClass::I64 => Inst::mov_r_r(OperandSize::Size64, src_reg, dst_reg),
|
||||
RegClass::V128 => {
|
||||
// The Intel optimization manual, in "3.5.1.13 Zero-Latency MOV Instructions",
|
||||
// doesn't include MOVSS/MOVSD as instructions with zero-latency. Use movaps for
|
||||
@@ -2691,20 +2693,22 @@ impl MachInst for Inst {
|
||||
|| ty == types::R32
|
||||
|| ty == types::R64
|
||||
);
|
||||
// Immediates must be 32 or 64 bits.
|
||||
// Smaller types are widened.
|
||||
let size = match OperandSize::from_ty(ty) {
|
||||
OperandSize::Size64 => OperandSize::Size64,
|
||||
_ => OperandSize::Size32,
|
||||
};
|
||||
if value == 0 {
|
||||
ret.push(Inst::alu_rmi_r(
|
||||
ty == types::I64,
|
||||
size,
|
||||
AluRmiROpcode::Xor,
|
||||
RegMemImm::reg(to_reg.to_reg()),
|
||||
to_reg,
|
||||
));
|
||||
} else {
|
||||
let value = value as u64;
|
||||
ret.push(Inst::imm(
|
||||
OperandSize::from_bytes(ty.bytes()),
|
||||
value.into(),
|
||||
to_reg,
|
||||
));
|
||||
ret.push(Inst::imm(size, value.into(), to_reg));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user