aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorSverker Eriksson <sverker@erlang.org>2012-06-15 18:01:29 +0200
committerSverker Eriksson <sverker@erlang.org>2012-06-25 18:24:47 +0200
commit093ddb2c954f2691cf5ca112a1ea6770c78a461b (patch)
tree87076f9f82d9ac98f01942b78ad38e1724b435de /erts
parent04dd1c6d4e5893928c6d7552fc92ec2cfac6344f (diff)
downloadotp-093ddb2c954f2691cf5ca112a1ea6770c78a461b.tar.gz
otp-093ddb2c954f2691cf5ca112a1ea6770c78a461b.tar.bz2
otp-093ddb2c954f2691cf5ca112a1ea6770c78a461b.zip
Fix hipe bif calling bug on ARM
Bug introduced in R15.
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/hipe/hipe_arm_bifs.m412
1 files changed, 9 insertions, 3 deletions
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. */