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

« back to all changes in this revision

Viewing changes to erts/emulator/hipe/hipe_x86_glue.h

  • 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:
202
202
    return x86_throw_to_native(p);
203
203
}
204
204
 
205
 
/* Native called a BIF which failed with RESCHEDULE.
206
 
   Move the parameters to a safe place. */
207
 
static __inline__ void hipe_reschedule_from_native(Process *p)
208
 
{
209
 
#if NR_ARG_REGS == 0
210
 
    ASSERT(p->arity == 0);
211
 
#else
212
 
    if (p->arg_reg != p->def_arg_reg) {
213
 
        unsigned int i;
214
 
        for (i = 0; i < p->arity; ++i)
215
 
            p->arg_reg[i] = p->def_arg_reg[i];
216
 
    }
217
 
#endif
218
 
}
219
 
 
220
 
/* Resume a BIF call which had failed with RESCHEDULE. */
221
 
static __inline__ unsigned int
222
 
hipe_reschedule_to_native(Process *p, unsigned int arity, Eterm reg[])
223
 
{
224
 
#if NR_ARG_REGS == 0
225
 
    ASSERT(arity == 0);
226
 
    return x86_tailcall_to_native(p);
227
 
#else
228
 
    p->arity = 0;
229
 
    return hipe_tailcall_to_native(p, arity, reg);
230
 
#endif
231
 
}
232
 
 
233
205
/* Return the address of a stub switching a native closure call to BEAM. */
234
206
static __inline__ void *hipe_closure_stub_address(unsigned int arity)
235
207
{