Changeset 14188


Ignore:
Timestamp:
Aug 14, 2010, 2:11:41 PM (9 years ago)
Author:
gb
Message:

Ensure that stack pointer is aligned on an 8-byte boundary when calling
into lisp (the iOS ABI doesn't ensure this.)

Location:
trunk/source/lisp-kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/arm-spentry.s

    r14119 r14188  
    30323032        __(blx r12)
    30333033        __(mov rcontext,r0)
     3034        __(tst sp,#4)
     3035        __(mov imm2,sp)
     3036        __(strne imm2,[sp,#-4]!)
     3037        __(streq imm2,[sp,#-8]!)
    30343038        __(ldr imm2,[rcontext,#tcr.last_lisp_frame])
    30353039        __(sub imm0,imm2,sp)
     
    30593063        __(mov imm0,#TCR_STATE_FOREIGN)
    30603064        __(str imm0,[rcontext,#tcr.valence])
    3061         __(add sp,sp,#node_size*2)   /* drop the ivector that hides foreign stack contents */
     3065        __(ldr sp,[sp,#node_size*2])   /* drop the ivector that hides foreign stack contents and restore (possibly misaligned) sp */
    30623066        __(ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr})
    30633067        __(ldmia sp!,{r0,r1})
  • trunk/source/lisp-kernel/arm-subprims.s

    r14119 r14188  
    6363        __(stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr})
    6464        __(mov rcontext,r0)
     65        __(mov r0,sp)
     66        __(tst sp,#4)
     67        __(strne r0,[sp,#-4]!)
     68        __(streq r0,[sp,#-8]!)
    6569        __(mov arg_z,#0)
    6670        __(mov arg_y,#0)
     
    8791        __(str imm0,[rcontext,#tcr.valence])
    8892        __(mov imm0,#nil_value)
     93        __(ldr sp,[sp])
    8994        __(ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr})
    9095        __(bx lr)
Note: See TracChangeset for help on using the changeset viewer.