[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 240/437: Correct wrong test and update of arm thumb offs
From: |
Andy Wingo |
Subject: |
[Guile-commits] 240/437: Correct wrong test and update of arm thumb offset information. |
Date: |
Mon, 2 Jul 2018 05:14:29 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit b8770059dc1872567e76a827d461e45dc67f6462
Author: pcpa <address@hidden>
Date: Thu Aug 29 17:08:05 2013 -0300
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.
---
ChangeLog | 8 ++++++++
lib/jit_arm-cpu.c | 2 +-
lib/jit_arm.c | 1 +
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index d1407a2..f16d30c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-08-29 Paulo Andrade <address@hidden>
+
+ * 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.
+
2013-08-26 Paulo Andrade <address@hidden>
* configure.ac: Extend FreeBSD test to also handle NetBSD.
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;
diff --git a/lib/jit_arm.c b/lib/jit_arm.c
index 59c9d93..1cc444f 100644
--- a/lib/jit_arm.c
+++ b/lib/jit_arm.c
@@ -810,6 +810,7 @@ _emit_code(jit_state_t *_jit)
} undo;
_jitc->function = NULL;
+ _jitc->thumb = 0;
jit_reglive_setup();
- [Guile-commits] 323/437: misc: Make jit_note and related functions take a const argument, (continued)
- [Guile-commits] 323/437: misc: Make jit_note and related functions take a const argument, Andy Wingo, 2018/07/02
- [Guile-commits] 429/437: Remove disassembler support from lightning, Andy Wingo, 2018/07/02
- [Guile-commits] 346/437: PPC: Build and pass all tests in powerpcle, Andy Wingo, 2018/07/02
- [Guile-commits] 180/437: Correct C sequence point problem., Andy Wingo, 2018/07/02
- [Guile-commits] 370/437: Add missing ellipsis in allocar.tst, Andy Wingo, 2018/07/02
- [Guile-commits] 337/437: Remove a wrong optimization of callee save registers, Andy Wingo, 2018/07/02
- [Guile-commits] 437/437: Wire up lightning into libguile build, Andy Wingo, 2018/07/02
- [Guile-commits] 362/437: Avoid problems if JIT_INSTR_MAX is miscalculated, Andy Wingo, 2018/07/02
- [Guile-commits] 183/437: Correct qmul and qdiv in ppc., Andy Wingo, 2018/07/02
- [Guile-commits] 235/437: Correct build on FreeBSD/amd64, Andy Wingo, 2018/07/02
- [Guile-commits] 240/437: Correct wrong test and update of arm thumb offset information.,
Andy Wingo <=
- [Guile-commits] 215/437: Add functional hppa port. All tests pass., Andy Wingo, 2018/07/02
- [Guile-commits] 369/437: Correct typo in x87.nodata test list, Andy Wingo, 2018/07/02
- [Guile-commits] 307/437: x86: Build and pass all tests on 32 bit cygwin, Andy Wingo, 2018/07/02
- [Guile-commits] 401/437: Implement a correct generation of Fibonacci numbers., Andy Wingo, 2018/07/02
- [Guile-commits] 318/437: Add label predicates, Andy Wingo, 2018/07/02
- [Guile-commits] 373/437: Update copyright date, Andy Wingo, 2018/07/02
- [Guile-commits] 403/437: Correct wrong movr simplification, Andy Wingo, 2018/07/02
- [Guile-commits] 324/437: misc: Enable silent rules to make warnings stick out, Andy Wingo, 2018/07/02
- [Guile-commits] 175/437: Make JIT_RET, JIT_FRET and JIT_SP private., Andy Wingo, 2018/07/02
- [Guile-commits] 430/437: Remove special cflags for obsolete Lightning targets, Andy Wingo, 2018/07/02