Correct inconsistency with jit_regno_patch - lightning.git - Portable just-in-time compiler library

index : lightning.git
Portable just-in-time compiler library
summary refs log tree commit diff
diff options
context:
space:
mode:
authorpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2015年02月16日 15:07:36 -0200
committerpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2015年02月16日 15:07:36 -0200
commit2597bf3c13e25907d9c8c96f9b39e711cf1f353d (patch)
treeecb7fc652e51755965fd79c0771797170a7c6c13
parent3a03feae5d5f0ad7766882f772e79a1c8b61bc39 (diff)
downloadlightning-2597bf3c13e25907d9c8c96f9b39e711cf1f353d.tar.gz
Correct inconsistency with jit_regno_patch
* lib/lightning.c: Remove the jit_regno_patch bitfield register fields before actual emit, as it is only really used before emit, otherwise, on special conditions it may consider live registers as dead during code emit.
Diffstat
-rw-r--r--ChangeLog 7
-rw-r--r--lib/lightning.c 8
2 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 59927ef..c1e93ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015年02月16日 Paulo Andrade <pcpa@gnu.org>
+
+ * lib/lightning.c: Remove the jit_regno_patch bitfield
+ register fields before actual emit, as it is only really
+ used before emit, otherwise, on special conditions it
+ may consider live registers as dead during code emit.
+
2015年02月15日 Paulo Andrade <pcpa@gnu.org>
* lib/jit_x86-cpu.c, lib/jit_x86-sse.c, lib/jit_x86-x87.c:
diff --git a/lib/lightning.c b/lib/lightning.c
index aab80f8..949deea 100644
--- a/lib/lightning.c
+++ b/lib/lightning.c
@@ -1501,6 +1501,13 @@ _jit_optimize(jit_state_t *_jit)
}
for (node = _jitc->head; node; node = node->next) {
+ mask = jit_classify(node->code);
+ if (mask & jit_cc_a0_reg)
+ node->u.w &= ~jit_regno_patch;
+ if (mask & jit_cc_a1_reg)
+ node->v.w &= ~jit_regno_patch;
+ if (mask & jit_cc_a2_reg)
+ node->w.w &= ~jit_regno_patch;
switch (node->code) {
case jit_code_prolog:
_jitc->function = _jitc->functions.ptr + node->w.w;
@@ -1515,7 +1522,6 @@ _jit_optimize(jit_state_t *_jit)
redundant_store(node, 0);
break;
default:
- mask = jit_classify(node->code);
#if JIT_HASH_CONSTS
if (mask & jit_cc_a1_flt) {
node->v.p = jit_data(&node->v.f, sizeof(jit_float32_t), 4);
generated by cgit v1.2.3 (git 2.39.1) at 2025年10月01日 20:09:31 +0000

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