aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe/hipe_bif0.c
diff options
context:
space:
mode:
authorMikael Pettersson <[email protected]>2015-01-11 16:29:47 +0100
committerMarcus Arendt <[email protected]>2015-01-26 15:43:08 +0100
commitf9886a6d15c396ae1e0e69a58fb265c4c338ac93 (patch)
treea8098537b6118de4aabc568ff3e2acc057e70c2b /erts/emulator/hipe/hipe_bif0.c
parente2001315febed13f8889ff1a33c046f36a4c8c54 (diff)
downloadotp-f9886a6d15c396ae1e0e69a58fb265c4c338ac93.tar.gz
otp-f9886a6d15c396ae1e0e69a58fb265c4c338ac93.tar.bz2
otp-f9886a6d15c396ae1e0e69a58fb265c4c338ac93.zip
hipe: remove HIPE_ALLOC_CODE macro
The HIPE_ALLOC_CODE macro in the HiPE runtime was introduced ages ago to allow x86 and amd64 to switch from erts_alloc() to an mmap() implementation with proper flag setting. Nowadays the macro is identical on all platforms, and serves no purpose. Delete the macro, move the hipe_alloc_code() prototype to hipe_arch.h, and simplify hipe_bifs_enter_code_2().
Diffstat (limited to 'erts/emulator/hipe/hipe_bif0.c')
-rw-r--r--erts/emulator/hipe/hipe_bif0.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/erts/emulator/hipe/hipe_bif0.c b/erts/emulator/hipe/hipe_bif0.c
index 9eb0b88ced..dc45e60411 100644
--- a/erts/emulator/hipe/hipe_bif0.c
+++ b/erts/emulator/hipe/hipe_bif0.c
@@ -397,15 +397,9 @@ BIF_RETTYPE hipe_bifs_enter_code_2(BIF_ALIST_2)
ASSERT(bitoffs == 0);
ASSERT(bitsize == 0);
trampolines = NIL;
-#ifdef HIPE_ALLOC_CODE
- address = HIPE_ALLOC_CODE(nrbytes, BIF_ARG_2, &trampolines, BIF_P);
+ address = hipe_alloc_code(nrbytes, BIF_ARG_2, &trampolines, BIF_P);
if (!address)
BIF_ERROR(BIF_P, BADARG);
-#else
- if (is_not_nil(BIF_ARG_2))
- BIF_ERROR(BIF_P, BADARG);
- address = erts_alloc(ERTS_ALC_T_HIPE, nrbytes);
-#endif
memcpy(address, bytes, nrbytes);
hipe_flush_icache_range(address, nrbytes);
hp = HAlloc(BIF_P, 3);