1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 21:10:27 +02:00

IA64: Correct code to save/restore r2 used as lightning JIT_FP.

* lib/jit_ia64-cpu.c: Correct incorrect logic when restoring
	the value of the "r2" callee save register.
This commit is contained in:
pcpa 2013-09-10 21:17:44 -03:00
parent c6ced6662d
commit 183ed91756
2 changed files with 9 additions and 3 deletions

View file

@ -5126,7 +5126,7 @@ _prolog(jit_state_t *_jit, jit_node_t *node)
break;
}
_jitc->breg = rn(reg) + 1;
_jitc->rout = _jitc->breg + 4;
_jitc->rout = _jitc->breg + 5;
ruse = _jitc->rout - GR_32;
/* How many out argument registers required? */
@ -5147,6 +5147,7 @@ _prolog(jit_state_t *_jit, jit_node_t *node)
MOV(_jitc->breg + 3, GR_1);
/* lightning specific, use r4 as frame pointer */
MOV(_jitc->breg + 4, GR_4);
addi(GR_4, GR_12, -(stack_framesize + params_offset));
/* adjust stack pointer */
@ -5207,8 +5208,8 @@ _epilog(jit_state_t *_jit, jit_node_t *node)
MOV_I_ar_rn(AR_PFS, _jitc->breg + 1);
MOV_br_rn(BR_0, _jitc->breg);
MOV(GR_12, _jitc->breg + 2);
/* Restore r4 with known offset from saved sp */
addi(GR_4, GR_12, stack_framesize + params_offset);
/* Restore lightning specific r4 as frame pointer */
MOV(GR_4, _jitc->breg + 4);
BR_RET(BR_0);
flush();
}