(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
[glibc.git] / sysdeps / mach / mips / syscall.S
blobf2fc29df156c577c94d009c1867d945aa55ea3fa
1 /* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
2    This file is part of the GNU C Library.
4    The GNU C Library is free software; you can redistribute it and/or
5    modify it under the terms of the GNU Lesser General Public
6    License as published by the Free Software Foundation; either
7    version 2.1 of the License, or (at your option) any later version.
9    The GNU C Library is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    Lesser General Public License for more details.
14    You should have received a copy of the GNU Lesser General Public
15    License along with the GNU C Library; if not, write to the Free
16    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17    02111-1307 USA.  */
19 #include <sysdep.h>
21 #ifdef PIC
22         .option pic2
23 #endif
24 ENTRY (syscall)
25         move    v0, a0          /* Load system call number from first arg.  */
26         move    a0, a1          /* Move the next three args up a register.  */
27         move    a1, a2
28         move    a2, a3
29         /* Load the remaining possible args (up to 11) from the stack.  */
30 #ifdef __mips64
31         ld      t0,4*8(sp)
32         ld      t1,5*8(sp)
33         ld      t2,6*8(sp)
34         ld      t3,7*8(sp)
35         ld      t4,8*8(sp)
36         ld      t5,9*8(sp)
37         ld      t6,10*8(sp)
38 #else
39         lw      t0,4*4(sp)
40         lw      t1,5*4(sp)
41         lw      t2,6*4(sp)
42         lw      t3,7*4(sp)
43         lw      t4,8*4(sp)
44         lw      t5,9*4(sp)
45         lw      t6,10*4(sp)
46 #endif
47         syscall                 /* Do the system call.  */
48         j ra                    /* Return to caller.  */