aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe/hipe_arm.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2014-05-20 18:35:21 +0200
committerSverker Eriksson <[email protected]>2014-05-20 18:35:29 +0200
commit7d78f2563e4ef9f7f165b1ba06212c6f09167809 (patch)
tree3927758f799cd787a74bc655f4903371971f2605 /erts/emulator/hipe/hipe_arm.c
parent50556f5e37cd866ecba39be22d94c32e88d358cb (diff)
parent0799ae534f61aef1a47d751d48a09c8b49995e7a (diff)
downloadotp-7d78f2563e4ef9f7f165b1ba06212c6f09167809.tar.gz
otp-7d78f2563e4ef9f7f165b1ba06212c6f09167809.tar.bz2
otp-7d78f2563e4ef9f7f165b1ba06212c6f09167809.zip
Merge branch 'sverk/hipe-global-trace-bug'
OTP-11939 * sverk/hipe-global-trace-bug: erts: Remove some dead hipe specific code erts: Fix global tracing of beam function when called from hipe code erts: Save some space in process struct for hipe
Diffstat (limited to 'erts/emulator/hipe/hipe_arm.c')
-rw-r--r--erts/emulator/hipe/hipe_arm.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/erts/emulator/hipe/hipe_arm.c b/erts/emulator/hipe/hipe_arm.c
index 3db3ffe9b1..165eb543c8 100644
--- a/erts/emulator/hipe/hipe_arm.c
+++ b/erts/emulator/hipe/hipe_arm.c
@@ -260,9 +260,9 @@ int hipe_patch_insn(void *address, Uint32 value, Eterm type)
return 0;
}
-/* called from hipe_bif0.c:hipe_bifs_make_native_stub_2()
- and hipe_bif0.c:hipe_make_stub() */
-void *hipe_make_native_stub(void *beamAddress, unsigned int beamArity)
+/* Make stub for native code calling exported beam function
+*/
+void *hipe_make_native_stub(void *callee_exp, unsigned int beamArity)
{
unsigned int *code;
unsigned int *tramp_callemu;
@@ -272,9 +272,9 @@ void *hipe_make_native_stub(void *beamAddress, unsigned int beamArity)
* Native code calls BEAM via a stub looking as follows:
*
* mov r0, #beamArity
- * ldr r8, [pc,#0] // beamAddress
+ * ldr r8, [pc,#0] // callee_exp
* b nbif_callemu
- * .long beamAddress
+ * .long callee_exp
*
* I'm using r0 and r8 since they aren't used for
* parameter passing in native code. The branch to
@@ -292,12 +292,12 @@ void *hipe_make_native_stub(void *beamAddress, unsigned int beamArity)
/* mov r0, #beamArity */
code[0] = 0xE3A00000 | (beamArity & 0xFF);
- /* ldr r8, [pc,#0] // beamAddress */
+ /* ldr r8, [pc,#0] // callee_exp */
code[1] = 0xE59F8000;
/* b nbif_callemu */
code[2] = 0xEA000000 | (callemu_offset & 0x00FFFFFF);
- /* .long beamAddress */
- code[3] = (unsigned int)beamAddress;
+ /* .long callee_exp */
+ code[3] = (unsigned int)callee_exp;
hipe_flush_icache_range(code, 4*sizeof(int));