From 093ddb2c954f2691cf5ca112a1ea6770c78a461b Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Fri, 15 Jun 2012 18:01:29 +0200 Subject: Fix hipe bif calling bug on ARM Bug introduced in R15. --- erts/emulator/hipe/hipe_arm_bifs.m4 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'erts/emulator/hipe/hipe_arm_bifs.m4') diff --git a/erts/emulator/hipe/hipe_arm_bifs.m4 b/erts/emulator/hipe/hipe_arm_bifs.m4 index e0c6f09796..1453f32f85 100644 --- a/erts/emulator/hipe/hipe_arm_bifs.m4 +++ b/erts/emulator/hipe/hipe_arm_bifs.m4 @@ -173,7 +173,8 @@ $1: /* Save caller-save registers and call the C function. */ SAVE_CONTEXT_GC - bl $2 + /* ignore empty BIF__ARGS */ + CALL_BIF($2) TEST_GOT_MBUF(0) /* Restore registers. */ @@ -195,7 +196,9 @@ $1: /* Save caller-save registers and call the C function. */ SAVE_CONTEXT_GC - bl $2 + str r1, [r0, #P_ARG0] /* Store BIF__ARGS in def_arg_reg[] */ + add r1, r0, #P_ARG0 + CALL_BIF($2) TEST_GOT_MBUF(1) /* Restore registers. Check for exception. */ @@ -220,7 +223,10 @@ $1: /* Save caller-save registers and call the C function. */ SAVE_CONTEXT_GC - bl $2 + str r1, [r0, #P_ARG0] /* Store BIF__ARGS in def_arg_reg[] */ + str r2, [r0, #P_ARG1] + add r1, r0, #P_ARG0 + CALL_BIF($2) TEST_GOT_MBUF(2) /* Restore registers. Check for exception. */ -- cgit v1.2.3