~rdoering/ubuntu/karmic/erlang/fix-535090

« back to all changes in this revision

Viewing changes to erts/emulator/hipe/hipe_amd64_asm.m4

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-02-15 16:42:52 UTC
  • mfrom: (3.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090215164252-q5x4rcf8a5pbesb1
Tags: 1:12.b.5-dfsg-2
Upload to unstable after lenny is released.

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
 */
121
121
`#define TEMP_RV                %rbx'
122
122
 
123
 
/*
124
 
 * TEMP_ARG{0,1,2}:
125
 
 *      Used by NBIF_SAVE_RESCHED_ARGS to save argument
126
 
 *      registers in locations preserved by C.
127
 
 *      May be registers or process-private memory locations.
128
 
 *      Must not be C caller-save registers.
129
 
 *      Must not overlap with any Erlang global registers.
130
 
 */
131
 
`#define TEMP_ARG0      %r14'
132
 
`#define TEMP_ARG1      %r13'
133
 
`#define TEMP_ARG2      %rbx'
134
 
 
135
123
dnl XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
136
124
dnl X                                                           X
137
125
dnl X                   hipe_amd64_glue.S support               X
235
223
`/* #define NBIF_RET_3  'NBIF_RET(3)` */'
236
224
`/* #define NBIF_RET_5  'NBIF_RET(5)` */'
237
225
 
238
 
dnl
239
 
dnl NBIF_SAVE_RESCHED_ARGS(ARITY)
240
 
dnl Used in the expensive_bif_interface_{1,2,3}() macros to copy
241
 
dnl the argument registers to locations preserved by C.
242
 
dnl Currently, 1 <= ARITY <= 3, so this simply moves the argument
243
 
dnl registers to C callee-save registers.
244
 
dnl
245
 
define(NBIF_MIN,`ifelse(eval($1 > $2),0,$1,$2)')dnl
246
 
define(NBIF_SVA_1,`ifelse(eval($1 < NR_ARG_REGS),0,,`movq       ARG$1, TEMP_ARG$1; ')')dnl
247
 
define(NBIF_SVA_N,`ifelse(eval($1 >= 0),0,,`NBIF_SVA_N(eval($1-1))NBIF_SVA_1($1,ARG$1)')')dnl
248
 
define(NBIF_SAVE_RESCHED_ARGS,`NBIF_SVA_N(eval(NBIF_MIN($1,NR_ARG_REGS)-1))')dnl
249
 
`/* #define NBIF_SAVE_RESCHED_ARGS_1 'NBIF_SAVE_RESCHED_ARGS(1)` */'
250
 
`/* #define NBIF_SAVE_RESCHED_ARGS_2 'NBIF_SAVE_RESCHED_ARGS(2)` */'
251
 
`/* #define NBIF_SAVE_RESCHED_ARGS_3 'NBIF_SAVE_RESCHED_ARGS(3)` */'
252
 
 
253
226
`#endif /* HIPE_AMD64_ASM_H */'