Allow one argument for asm_switchstackandcall
authorstefan <none@none>
Mon, 3 Feb 2003 11:32:13 +0000 (11:32 +0000)
committerstefan <none@none>
Mon, 3 Feb 2003 11:32:13 +0000 (11:32 +0000)
alpha/asmpart.S

index 2f0318c0cf2dc7aef192eb3604af18640de47289..1f294fe2801fcc33b099ae0c8f9d32afb3ddcc61 100644 (file)
@@ -1064,12 +1064,14 @@ asm_perform_threadswitch:
 
 /********************* function asm_switchstackandcall *************************
 *                                                                              *
-*  void asm_switchstackandcall (void *stack, void *func, void **stacktopsave); *
+*  void *asm_switchstackandcall (void *stack, void *func, void **stacktopsave, *
+*                               void *p);                                      *
 *                                                                              *
 *   Switches to a new stack, calls a function and switches back.               *
 *       a0      new stack pointer                                              *
 *       a1      function pointer                                               *
 *              a2              pointer to variable where stack top should be stored           *
+*              a3      pointer to user data, is passed to the function                *
 *                                                                              *
 *******************************************************************************/
 
@@ -1083,6 +1085,7 @@ asm_switchstackandcall:
        mov     a0,sp           /* switch to new stack                                */
        
        mov     a1,pv           /* load function pointer                              */
+       mov a3,a0           /* pass pointer */
        jmp     ra,(pv)         /* and call function                                  */
 
        ldq     ra,0(sp)        /* load return address                                */