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/lightning.c
diff options
context:
space:
mode:
authorpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2012年12月19日 18:07:12 -0200
committerpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2012年12月19日 18:07:12 -0200
commita74318a1d715a7f9ce9c99ae81c3038645efcc10 (patch)
tree5b13fe85aa14c298324b238c8e6140ee14f392b0 /lib/lightning.c
parentb43ea1f908866baaf14586e6d048bff4dbf6db1f (diff)
downloadlightning-a74318a1d715a7f9ce9c99ae81c3038645efcc10.tar.gz
Add new test case to check stack integrity on complex stack frames.
* check/stack.ok, check/stack.tst: New files to test data integrity on a deep chain of stack frames. * 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: Calculate _jit->function->stack in the emit stage, otherwise it will calculate it wrong if need to jit_allocai space to spill registers. * lib/lightning.c: Correct wrong offset when updating the "current" jit function pointer in the code that may need to allocate stack space to spill registers. * check/lightning.c: Correct off by one data space check. * check/Makefile.am: Update for new test case.
Diffstat (limited to 'lib/lightning.c')
-rw-r--r--lib/lightning.c 2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/lightning.c b/lib/lightning.c
index dc9dcd9..b9db321 100644
--- a/lib/lightning.c
+++ b/lib/lightning.c
@@ -2298,7 +2298,7 @@ _patch_registers(jit_state_t *_jit)
node->link = NULL;
break;
case jit_code_prolog:
- _jit->function = _jit->functions.ptr + node->u.w;
+ _jit->function = _jit->functions.ptr + node->w.w;
break;
case jit_code_epilog:
_jit->function = NULL;
generated by cgit v1.2.3 (git 2.25.1) at 2025年10月01日 13:04:07 +0000

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