From b64b82ca5182cfec170b79ae7e8a23d6c088632d Mon Sep 17 00:00:00 2001 From: Paulo Andrade Date: Thu, 22 Feb 2018 13:17:28 -0300 Subject: [PATCH] Always set t12 to address of called function * lib/jit_alpha-cpu.c: Always set t12 to the address of the current function, to properly work on all systems. Previously the shortcut did only work on Tru64. For Linux and glibc the change is required. --- ChangeLog | 7 +++++++ lib/jit_alpha-cpu.c | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2c0a4ae01..660f01809 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2018-02-22 Paulo Andrade + + * lib/jit_alpha-cpu.c: Always set t12 to the address of the + current function, to properly work on all systems. Previously + the shortcut did only work on Tru64. For Linux and glibc the + change is required. + 2018-02-22 Paulo Andrade * lib/jit_aarch64.c, lib/jit_alpha.c, lib/jit_arm.c, diff --git a/lib/jit_alpha-cpu.c b/lib/jit_alpha-cpu.c index 89755aa28..afc22bb44 100644 --- a/lib/jit_alpha-cpu.c +++ b/lib/jit_alpha-cpu.c @@ -2550,6 +2550,8 @@ _callr(jit_state_t *_jit, jit_int32_t r0) static void _calli(jit_state_t *_jit, jit_word_t i0) { + /* FIXME use a small buffer to load constants - using gp */ +#if 0 jit_word_t w; jit_word_t d; w = _jit->pc.w; @@ -2558,6 +2560,10 @@ _calli(jit_state_t *_jit, jit_word_t i0) BSR(_RA_REGNO, d); else (void)calli_p(i0); +#else + movi(_PV_REGNO, i0); + callr(_PV_REGNO); +#endif } static jit_word_t