Correct wrong test and update of arm thumb offset information. - lightning.git - Portable just-in-time compiler library

index : lightning.git
Portable just-in-time compiler library
summary refs log tree commit diff
path: root/lib/jit_arm-cpu.c
diff options
context:
space:
mode:
authorpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2013年08月29日 17:08:05 -0300
committerpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2013年08月29日 17:08:05 -0300
commitb8770059dc1872567e76a827d461e45dc67f6462 (patch)
treeac657e22e976c620aab59b4b03bf7ce92ce3dd74 /lib/jit_arm-cpu.c
parentba182b139aa53fa70dd44fea9f74f777f3c683f7 (diff)
downloadlightning-b8770059dc1872567e76a827d461e45dc67f6462.tar.gz
Correct wrong test and update of arm thumb offset information.
* lib/jit_arm-cpu.c, lib/jit_arm.c: Correct wrong test and update of the thumb offset information, when checking if needing to patch a jump from arm to thumb mode. The problem would happen when remapping the code buffer, and the new address being lower than the previous one.
Diffstat (limited to 'lib/jit_arm-cpu.c')
-rw-r--r--lib/jit_arm-cpu.c 2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/jit_arm-cpu.c b/lib/jit_arm-cpu.c
index c324f00..71d178d 100644
--- a/lib/jit_arm-cpu.c
+++ b/lib/jit_arm-cpu.c
@@ -3755,7 +3755,7 @@ _patch_at(jit_state_t *_jit,
} u;
u.w = instr;
if (kind == arm_patch_jump) {
- if (jit_thumb_p() && instr >= _jitc->thumb) {
+ if (jit_thumb_p() && (jit_uword_t)instr >= _jitc->thumb) {
code2thumb(thumb.s[0], thumb.s[1], u.s[0], u.s[1]);
if ((thumb.i & THUMB2_B) == THUMB2_B) {
d = ((label - instr) >> 1) - 2;
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月13日 23:47:33 +0000

AltStyle によって変換されたページ (->オリジナル) /