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.c
diff options
context:
space:
mode:
authorpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2012年12月03日 09:40:08 -0200
committerpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2012年12月03日 09:40:08 -0200
commit712877a5a4c967e0db6a6ce4e92162c9a9056192 (patch)
tree9746a00db98bdc684aa6c0e122e822c70eaef597 /lib/jit_arm.c
parente6f1df7124f6061f123881300560cf1899bf140b (diff)
downloadlightning-712877a5a4c967e0db6a6ce4e92162c9a9056192.tar.gz
Correct implementation problems on ix86.
* check/all.tst, check/lightning.c: Only declare or use 64 bit interfaces on 64 bit builds. * check/fib.tst: Use simpler logic to not need preprocessor conditionals for 32 or 64 bit. * include/lightning.h: Only declare 64 bit macros on a 64 bit build. Code using lightning must know about wordsize and the jit generation limitations, also, this way it generates a compile time failure, not a runtime assertion. * include/lightning/jit_x86.h: Correct typo in macro name. * lib/jit_arm.c, lib/jit_arm-cpu.c, lib/jit_mips.c, lib/jit_mips-cpu.c, lib/jit_ppc.c, lib/jit_ppc-cpu.c, lib/jit_x86.c, lib/jit_x86-cpu.c: Correct wrong code to get current jit function pointer. * lib/lightning.c: Move call to the simplify() optimization to after register liveness is known. Previous code did work by accident but now with proper test cases the problem was noticed. * lib/jit_disasm.c: Always cast bfd_vma to long long when passing it as printf argument.
Diffstat (limited to 'lib/jit_arm.c')
-rw-r--r--lib/jit_arm.c 3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/jit_arm.c b/lib/jit_arm.c
index 59eadd9..d75136a 100644
--- a/lib/jit_arm.c
+++ b/lib/jit_arm.c
@@ -1340,7 +1340,7 @@ _jit_emit(jit_state_t *_jit)
calli(node->u.w);
break;
case jit_code_prolog:
- _jit->function = _jit->functions.ptr + node->u.w;
+ _jit->function = _jit->functions.ptr + node->w.w;
undo.node = node;
undo.word = _jit->pc.w;
undo.data = _jit->consts.data;
@@ -1353,6 +1353,7 @@ _jit_emit(jit_state_t *_jit)
prolog(node);
break;
case jit_code_epilog:
+ assert(_jit->function == _jit->functions.ptr + node->w.w);
if (_jit->again) {
for (temp = undo.node->next;
temp != node; temp = temp->next) {
generated by cgit v1.2.3 (git 2.25.1) at 2025年09月14日 20:20:36 +0000

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