2 Copyright © 2011, The AROS Development Team. All rights reserved.
5 Desc: SuperstackSwap() - set up a new supervisor stack
8 This routine is expected to be called from Exec/Supervisor().
11 /*****************************************************************************
19 Sets up the new Supervisor stack
27 Must be called from Exec/Supervisor()
37 ******************************************************************************/
38 #include "aros/m68k/asm.h"
40 /* On entry, the stack looks like:
41 * UWORD 0x0020 (only on 68010+)
45 * A5 = void SuperstackSwap(void)
47 * D0/D1 and A0/A1 can be used as scratch
53 move.l %a6@(SysStkUpper),%a0
55 btst #0, %a6@(AttnFlags+1) // If 68010+, copy frame ID
57 subq.l #2,%d0 // Add 68010 space
61 move.w %sp@+,%a0@(%d0)