Fix mac m1 incompatibility for cmplog in frida mode (#914)

For some reason, Apple's aarch64 processor throws a SIGILL when encountering LDP x5, x5 (or any other repeating register). STP works, but I changed both for symmetry.
This commit is contained in:
omergreen 2022-11-25 02:31:22 +02:00 committed by GitHub
parent 3f627aaf0b
commit 889161e55e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -187,23 +187,23 @@ impl CmpLogRuntime {
macro_rules! tbz_masking {
($ops:ident) => {dynasm!($ops
; .arch aarch64
; stp x5, x5, [sp, #-0x10]!
; stp x5, xzr, [sp, #-0x10]!
; mov x5, #1
; lsl x5, x5, x1
; eor x5, x5, #255
; orr x1, x0, x5
; ldp x5, x5, [sp], #0x10
; ldp x5, xzr, [sp], #0x10
);};
}
macro_rules! tbnz_masking {
($ops:ident) => {dynasm!($ops
; .arch aarch64
; stp x5, x5, [sp, #-0x10]!
; stp x5, xzr, [sp, #-0x10]!
; mov x5, #1
; lsl x5, x5, x1
; orr x1, x0, x5
; ldp x5, x5, [sp], #0x10
; ldp x5, xzr, [sp], #0x10
);};
}