Skip to content

Commit e3ebd56

Browse files
committed
[SINGLEPASS] Add more ROR emitter to ARM64 backend (for #3647)
1 parent 6d33d57 commit e3ebd56

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/compiler-singlepass/src/emitter_arm64.rs

+10
Original file line numberDiff line numberDiff line change
@@ -1954,6 +1954,16 @@ impl EmitterARM64 for Assembler {
19541954
}
19551955
dynasm!(self ; ror X(dst), X(src1), imm);
19561956
}
1957+
(Size::S64, Location::GPR(src1), Location::Imm64(imm), Location::GPR(dst))
1958+
| (Size::S64, Location::Imm64(imm), Location::GPR(src1), Location::GPR(dst)) => {
1959+
let src1 = src1.into_index() as u32;
1960+
let imm = imm as u32;
1961+
let dst = dst.into_index() as u32;
1962+
if imm == 0 || imm > 63 {
1963+
codegen_error!("singlepass ROR with incompatible imm {}", imm);
1964+
}
1965+
dynasm!(self ; ror X(dst), X(src1), imm);
1966+
}
19571967
(Size::S32, Location::GPR(src1), Location::Imm32(imm), Location::GPR(dst))
19581968
| (Size::S32, Location::Imm32(imm), Location::GPR(src1), Location::GPR(dst)) => {
19591969
let src1 = src1.into_index() as u32;

0 commit comments

Comments
 (0)