aboutsummaryrefslogtreecommitdiff
path: root/frida_mode/src
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2021-12-27 15:26:10 +0100
committerGitHub <noreply@github.com>2021-12-27 15:26:10 +0100
commitbe00dbc2ac87bcb37742a7c2a0028b3f73fe7356 (patch)
tree6eecdcd926903ce65e3a89e5fb311dbd8fd95be2 /frida_mode/src
parent7bd2899f2e911e968f2901e1f56f249492f60ff5 (diff)
parent65ffa4b4725532169deb6b19a849c1f95d9df731 (diff)
downloadafl++-be00dbc2ac87bcb37742a7c2a0028b3f73fe7356.tar.gz
Merge pull request #1230 from WorksButNotTested/frida
Further optimization of AARCH64 code
Diffstat (limited to 'frida_mode/src')
-rw-r--r--frida_mode/src/instrument/instrument_arm64.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/frida_mode/src/instrument/instrument_arm64.c b/frida_mode/src/instrument/instrument_arm64.c
index 360806f5..32e44e92 100644
--- a/frida_mode/src/instrument/instrument_arm64.c
+++ b/frida_mode/src/instrument/instrument_arm64.c
@@ -27,7 +27,7 @@ typedef struct {
// prev_location = cur_location >> 1;
// stp x0, x1, [sp, #-160]
- // adrp x0, 0x7fb7ff4000
+ // adrp x0, 0x7fb7738000
// ldr x1, [x0]
// mov x0, #0x18b8
// eor x0, x1, x0
@@ -35,10 +35,10 @@ typedef struct {
// add x0, x1, x0
// ldrb w1, [x0]
// add w1, w1, #0x1
- // tbz w1, #8, 0x7fb6f0dec8
- // mov w1, #0x1
+ // add x1, x1, x1, lsr #8
+ // uxtb w1, w1
// strb w1, [x0]
- // adrp x0, 0x7fb7ff4000
+ // adrp x0, 0x7fb7738000
// mov x1, #0xc5c
// str x1, [x0]
// ldp x0, x1, [sp, #-160]
@@ -57,8 +57,8 @@ typedef struct {
uint32_t ldrb_w1_x0; /* ldrb w1, [x0] */
uint32_t add_w1_w1_1; /* add w1, w1, #1 */
- uint32_t tbz_w1_8_8; /* tbz w1, #8, #8 */
- uint32_t mov_w1_1; /* mov w1, #1 */
+ uint32_t add_w1_w1_w1_lsr_8; /* add x1, x1, x1, lsr #8 */
+ uint32_t uxtb_w1_w1; /* uxtb w1, w1 */
uint32_t strb_w1_ptr_x0; /* strb w1, [x0] */
@@ -99,8 +99,8 @@ static const afl_log_code_asm_t template =
.ldrb_w1_x0 = 0x39400001,
.add_w1_w1_1 = 0x11000421,
- .tbz_w1_8_8 = 0x36400041,
- .mov_w1_1 = 0x52800021,
+ .add_w1_w1_w1_lsr_8 = 0x8b412021,
+ .uxtb_w1_w1 = 0x53001c21,
.strb_w1_ptr_x0 = 0x39000001,