aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe/hipe_sparc_asm.m4
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2014-10-13 20:09:19 +0200
committerSverker Eriksson <[email protected]>2014-10-24 18:12:16 +0200
commitda3073e8d3d26ec6c63979a22c913d7758eeed71 (patch)
tree57f185f5c002e09f2a3532a1c703be0189fcafc6 /erts/emulator/hipe/hipe_sparc_asm.m4
parente45a4a8a3797a637a23ad5d660138c021f3ba1b1 (diff)
downloadotp-da3073e8d3d26ec6c63979a22c913d7758eeed71.tar.gz
otp-da3073e8d3d26ec6c63979a22c913d7758eeed71.tar.bz2
otp-da3073e8d3d26ec6c63979a22c913d7758eeed71.zip
erts: Extend usage of ASM macro to avoid including asm macros in C code
and reduce the probability of macro name collisions Catalyst: ppc macro "r0" conflicting with local variable in external.c
Diffstat (limited to 'erts/emulator/hipe/hipe_sparc_asm.m4')
-rw-r--r--erts/emulator/hipe/hipe_sparc_asm.m413
1 files changed, 10 insertions, 3 deletions
diff --git a/erts/emulator/hipe/hipe_sparc_asm.m4 b/erts/emulator/hipe/hipe_sparc_asm.m4
index 227d10ed80..c3c3bcb74a 100644
--- a/erts/emulator/hipe/hipe_sparc_asm.m4
+++ b/erts/emulator/hipe/hipe_sparc_asm.m4
@@ -29,6 +29,14 @@ define(LEAF_WORDS,16)dnl number of stack words for leaf functions
define(NR_ARG_REGS,4)dnl admissible values are 0 to 6, inclusive
`#define SPARC_LEAF_WORDS 'LEAF_WORDS
+`#define SPARC_NR_ARG_REGS 'NR_ARG_REGS
+`#define NR_ARG_REGS 'NR_ARG_REGS
+
+
+`#ifdef ASM'
+/*
+ * Only assembler stuff from here on (when included from *.S)
+ */
/*
* Reserved registers.
@@ -80,9 +88,6 @@ define(NR_ARG_REGS,4)dnl admissible values are 0 to 6, inclusive
/*
* Argument (parameter) registers.
*/
-`#define SPARC_NR_ARG_REGS 'NR_ARG_REGS
-`#define NR_ARG_REGS 'NR_ARG_REGS
-
define(defarg,`define(ARG$1,`$2')dnl
#`define ARG'$1 $2'
)dnl
@@ -210,4 +215,6 @@ define(QUICK_CALL_RET,`ba $1; NBIF_POP_N(eval(RET_POP($2)))')dnl
`/* #define QUICK_CALL_RET_F_3 'QUICK_CALL_RET(F,3)` */'
`/* #define QUICK_CALL_RET_F_5 'QUICK_CALL_RET(F,5)` */'
+`#endif /* ASM */'
+
`#endif /* HIPE_SPARC_ASM_H */'