From 38a99af36f044459db40b76be2cc72c638eb6d98 Mon Sep 17 00:00:00 2001 From: bhuztez Date: Sun, 31 Dec 2017 14:07:49 +0800 Subject: make HiPE work on x86_64 when PIE is enabled Currently HiPE amd64 assumes the runtime system code is loaded into the low 2G of the address space. However, this is not the case when PIE is enabled, it is loaded into a random location. So trampolines are required to call BIFs, and also we have first to load the address of sse2_fnegate_mask to a regisiter before xorpd in fchs. --- lib/kernel/src/hipe_unified_loader.erl | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/kernel') diff --git a/lib/kernel/src/hipe_unified_loader.erl b/lib/kernel/src/hipe_unified_loader.erl index f8199fcf71..fd06f0f7d8 100644 --- a/lib/kernel/src/hipe_unified_loader.erl +++ b/lib/kernel/src/hipe_unified_loader.erl @@ -275,6 +275,7 @@ needs_trampolines(Architecture) -> arm -> true; powerpc -> true; ppc64 -> true; + amd64 -> true; _ -> false end. -- cgit v1.2.3