OSDN Git Service

a81f3114030535862a1fe862c502b682969281a3
[uclinux-h8/uClibc.git] / libc / sysdeps / linux / cris / syscall.S
1 /* Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
2    This file is part of the GNU C Library.
3
4    The GNU C Library is free software; you can redistribute it and/or
5    modify it under the terms of the GNU Library General Public License as
6    published by the Free Software Foundation; either version 2 of the
7    License, or (at your option) any later version.
8
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    Library General Public License for more details.
13
14    You should have received a copy of the GNU Library General Public
15    License along with the GNU C Library; see the file COPYING.LIB.  If not,
16    see <http://www.gnu.org/licenses/>.  */
17
18 #include "sysdep.h"
19
20         .syntax no_register_prefix
21
22 /* Make syscall (callno, ...) into a system call.  */
23
24 ENTRY (syscall)
25 #ifdef __arch_v32
26         subq    4,sp
27         move.d  r10,r9
28         move    srp,[sp]
29         addoq   8,sp,acr
30         move.d  r11,r10
31         move    [acr],mof
32         addoq   12,sp,acr
33         move.d  r12,r11
34         move    [acr],srp
35         addoq   4,sp,acr
36         move.d  r13,r12
37         move.d  [acr],r13
38         break   13
39         cmps.w  -4096,r10
40         bhs     0f
41         move    [sp+],srp
42         Ret
43         nop
44 #else
45         push    srp
46         move.d  r10,r9
47         move.d  r11,r10
48         move.d  r12,r11
49         move.d  r13,r12
50         move.d  [sp+4],r13
51         move    [sp+8],mof
52         move    [sp+12],srp
53         break   13
54         cmps.w  -4096,r10
55         bhs     0f
56         pop     srp
57         Ret
58         nop
59 #endif
60 PSEUDO_END (syscall)