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_ppc.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/jit_ppc.c')
-rw-r--r--lib/jit_ppc.c 20
1 files changed, 14 insertions, 6 deletions
diff --git a/lib/jit_ppc.c b/lib/jit_ppc.c
index cbc5dda..8ef6119 100644
--- a/lib/jit_ppc.c
+++ b/lib/jit_ppc.c
@@ -778,11 +778,19 @@ _emit_code(jit_state_t *_jit)
#if __powerpc__
undo.prolog_offset = 0;
- /* code may start with a jump so add an initial function descriptor */
- word = _jit->pc.w + sizeof(void*) * 3;
- iw(word); /* addr */
- iw(0); /* toc */
- iw(0); /* env */
+ for (node = _jitc->head; node; node = node->next)
+ if (node->code != jit_code_label &&
+ node->code != jit_code_note &&
+ node->code != jit_code_name)
+ break;
+ if (node && (node->code != jit_code_prolog ||
+ !(_jitc->functions.ptr + node->w.w)->assume_frame)) {
+ /* code may start with a jump so add an initial function descriptor */
+ word = _jit->pc.w + sizeof(void*) * 3;
+ iw(word); /* addr */
+ iw(0); /* toc */
+ iw(0); /* env */
+ }
#endif
#define case_rr(name, type) \
@@ -1262,7 +1270,7 @@ _emit_code(jit_state_t *_jit)
}
}
else
- jmpi(node->u.w);
+ (void)jmpi_p(node->u.w);
break;
case jit_code_callr:
callr(rn(node->u.w));
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月25日 17:16:20 +0000

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