From 7f5f26269f7f70dfa78f032b42448b4fbd4ab501 Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Thu, 9 Apr 2020 20:37:12 +1200 Subject: [PATCH] Stop setting the thumb bit except on jumps to veneers Thanks to the previous commit, the jump targets should all be correct. --- lightening/arm-cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lightening/arm-cpu.c b/lightening/arm-cpu.c index 9f7876ee3..9b328adc5 100644 --- a/lightening/arm-cpu.c +++ b/lightening/arm-cpu.c @@ -323,7 +323,7 @@ read_jmp_offset(uint32_t *loc) static void patch_jmp_offset(uint32_t *loc, int32_t v) { - write_wide_thumb(loc, patch_thumb_jump(read_wide_thumb(loc), v | 1)); + write_wide_thumb(loc, patch_thumb_jump(read_wide_thumb(loc), v)); } static void @@ -406,7 +406,7 @@ read_jcc_offset(uint32_t *loc) static void patch_jcc_offset(uint32_t *loc, int32_t v) { - write_wide_thumb(loc, patch_thumb_cc_jump(read_wide_thumb(loc), v | 1)); + write_wide_thumb(loc, patch_thumb_cc_jump(read_wide_thumb(loc), v)); } static void