Refactor the InstSize enum in the AArch64 backend
The main issue with the InstSize enum was that it was used both for GPR and SIMD & FP operands, even though machine instructions do not mix them in general (as in a destination register is either a GPR or not). As a result it had methods such as sf_bit() that made sense only for one type of operand. Another issue was that the enum name was not reflecting its purpose accurately - it was meant to represent an instruction operand size, not an instruction size, which is fixed in A64 (always 4 bytes). Now the enum is split into one for GPR operands and another for scalar SIMD & FP operands. Copyright (c) 2020, Arm Limited.
This commit is contained in:
@@ -1808,7 +1808,7 @@ fn test_aarch64_binemit() {
|
||||
));
|
||||
insns.push((
|
||||
Inst::CCmpImm {
|
||||
size: InstSize::Size64,
|
||||
size: OperandSize::Size64,
|
||||
rn: xreg(22),
|
||||
imm: UImm5::maybe_from_u8(5).unwrap(),
|
||||
nzcv: NZCV::new(false, false, true, true),
|
||||
@@ -1819,7 +1819,7 @@ fn test_aarch64_binemit() {
|
||||
));
|
||||
insns.push((
|
||||
Inst::CCmpImm {
|
||||
size: InstSize::Size32,
|
||||
size: OperandSize::Size32,
|
||||
rn: xreg(3),
|
||||
imm: UImm5::maybe_from_u8(30).unwrap(),
|
||||
nzcv: NZCV::new(true, true, true, true),
|
||||
@@ -3022,7 +3022,7 @@ fn test_aarch64_binemit() {
|
||||
rd: writable_vreg(1),
|
||||
rn: vreg(30),
|
||||
idx: 2,
|
||||
ty: F32,
|
||||
size: ScalarSize::Size32,
|
||||
},
|
||||
"C107145E",
|
||||
"mov s1, v30.s[2]",
|
||||
@@ -3033,7 +3033,7 @@ fn test_aarch64_binemit() {
|
||||
rd: writable_vreg(23),
|
||||
rn: vreg(11),
|
||||
idx: 0,
|
||||
ty: F64,
|
||||
size: ScalarSize::Size64,
|
||||
},
|
||||
"7705085E",
|
||||
"mov d23, v11.d[0]",
|
||||
|
||||
Reference in New Issue
Block a user