aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe/hipe_amd64_asm.m4
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2010-02-08 15:39:26 +0000
committerErlang/OTP <[email protected]>2010-02-08 15:39:26 +0000
commit52f763526c95a7eb12fcfbdf07bb1216a1b756b4 (patch)
treeb0acc94c554812650f9974106490f2ef05f18234 /erts/emulator/hipe/hipe_amd64_asm.m4
parenta4e2377c72f2e6f018792dff10ed967f08cfac5f (diff)
parent56c0170c68a83634c6e2d955723b92c70b117c64 (diff)
downloadotp-52f763526c95a7eb12fcfbdf07bb1216a1b756b4.tar.gz
otp-52f763526c95a7eb12fcfbdf07bb1216a1b756b4.tar.bz2
otp-52f763526c95a7eb12fcfbdf07bb1216a1b756b4.zip
Merge branch 'gc/hipe_darwin_amd64' into ccase/r13b04_dev
* gc/hipe_darwin_amd64: Fix hipe memory allocation problems on darwin/amd64 Porting x86 darwin fixes to amd64 darwin hipe asm/m4 code Automatically enable hipe for darwin/amd64 builds Allow configure to enable_hipe for darwin/amd64 builds OTP-8416 HiPE now works in the 64-bit emulator on Mac OS X. (Thanks to Geoff Cant.)
Diffstat (limited to 'erts/emulator/hipe/hipe_amd64_asm.m4')
-rw-r--r--erts/emulator/hipe/hipe_amd64_asm.m433
1 files changed, 28 insertions, 5 deletions
diff --git a/erts/emulator/hipe/hipe_amd64_asm.m4 b/erts/emulator/hipe/hipe_amd64_asm.m4
index 9ce9b4fc5b..7f563c35d8 100644
--- a/erts/emulator/hipe/hipe_amd64_asm.m4
+++ b/erts/emulator/hipe/hipe_amd64_asm.m4
@@ -1,20 +1,20 @@
changecom(`/*', `*/')dnl
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 2004-2009. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 2004-2010. All Rights Reserved.
+ *
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
- *
+ *
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
- *
+ *
* %CopyrightEnd%
*/
/*
@@ -37,6 +37,29 @@ define(SIMULATE_NSP,0)dnl change to 1 to simulate call/ret insns
`#define LEAF_WORDS 'LEAF_WORDS
/*
+ * Workarounds for Darwin.
+ */
+ifelse(OPSYS,darwin,``
+/* Darwin */
+#define TEXT .text
+#define JOIN(X,Y) X##Y
+#define CSYM(NAME) JOIN(_,NAME)
+#define ASYM(NAME) CSYM(NAME)
+#define GLOBAL(NAME) .globl NAME
+#define SET_SIZE(NAME) /*empty*/
+#define TYPE_FUNCTION(NAME) /*empty*/
+'',``
+/* Not Darwin */
+#define TEXT .section ".text"
+#define CSYM(NAME) NAME
+#define ASYM(NAME) NAME
+#define GLOBAL(NAME) .global NAME
+#define SET_SIZE(NAME) .size NAME,.-NAME
+#define TYPE_FUNCTION(NAME) .type NAME,@function
+'')dnl
+
+
+/*
* Reserved registers.
*/
`#define P %rbp'