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

« back to all changes in this revision

Viewing changes to erts/emulator/hipe/hipe_arm_glue.S

  • 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:
304
304
 
305
305
/*
306
306
 * We end up here when a BIF called from native signals an
307
 
 * exceptional condition, and RESCHEDULE cannot occur.
 
307
 * exceptional condition.
308
308
 * HP was just read from P.
309
309
 * NSP has not been saved in P.
310
310
 * TEMP_LR contains a copy of LR
323
323
        /*FALLTHROUGH*/
324
324
.nbif_simple_exception:
325
325
        ldr     r0, [P, #P_FREASON]
326
 
.nbif_simple_exception2:
327
326
        cmp     r0, #FREASON_TRAP
328
327
        beq     .handle_trap
329
328
        /*
355
354
        mov     r1, #0
356
355
.handle_trap:
357
356
        mov     r0, #HIPE_MODE_SWITCH_RES_TRAP
358
 
.bif_exit:
359
357
        str     NSP, [P, #P_NSP]
360
358
        str     r1, [P, #P_ARITY]
361
359
        str     TEMP_LR, [P, #P_NRA]
362
360
        b       .nosave_exit
363
361
 
364
362
/*
365
 
 * We end up here when a BIF called from native signals an
366
 
 * exceptional condition, and RESCHEDULE can occur.
367
 
 * r2 contains the address of the nbif which failed.
368
 
 * HP was just read from P.
369
 
 * NSP has not been saved in P.
370
 
 * TEMP_ARG0 is the first actual parameter, if NR_ARG_REGS > 0.
371
 
 * TEMP_ARG1 is the second actual parameter (if defined), if NR_ARG_REGS > 1.
372
 
 * TEMP_ARG2 is the third actual parameter (if defined), if NR_ARG_REGS > 2.
373
 
 */
374
 
        .global nbif_1_hairy_exception
375
 
nbif_1_hairy_exception:
376
 
        mov     r1, #1
377
 
        b       .nbif_hairy_exception
378
 
        .global nbif_2_hairy_exception
379
 
nbif_2_hairy_exception:
380
 
        mov     r1, #2
381
 
        b       .nbif_hairy_exception
382
 
        .global nbif_3_hairy_exception
383
 
nbif_3_hairy_exception:
384
 
        mov     r1, #3
385
 
        /*FALLTHROUGH*/
386
 
.nbif_hairy_exception:
387
 
        ldr     r0, [P, #P_FREASON]
388
 
        cmp     r0, #FREASON_RESCHEDULE
389
 
        bne     .nbif_simple_exception2
390
 
        /* handle reschedule */
391
 
        str     r2, [P, #P_NCALLEE]
392
 
        str     TEMP_ARG0, [P, #P_ARG0]
393
 
        str     TEMP_ARG1, [P, #P_ARG1]
394
 
        str     TEMP_ARG2, [P, #P_ARG2]
395
 
        mov     r0, #HIPE_MODE_SWITCH_RES_RESCHEDULE
396
 
        b       .bif_exit
397
 
 
398
 
/*
399
363
 * nbif_stack_trap_ra: trap return address for maintaining
400
364
 * the gray/white stack boundary
401
365
 */