guile-commits
[Top][All Lists]
Advanced

[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();
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]