Contents of /trunk/mkinitrd-magellan/klibc/usr/klibc/arch/parisc/syscall.S
Parent Directory | Revision Log
Revision 532 -
(show annotations)
(download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File size: 845 byte(s)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File size: 845 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd
1 | /* |
2 | * arch/parisc/syscall.S |
3 | * |
4 | * %r20 contains the system call number, %r2 contains whence we came |
5 | * |
6 | */ |
7 | |
8 | .text |
9 | .align 64 ; cache-width aligned |
10 | .globl __syscall_common |
11 | .type __syscall_common,@function |
12 | __syscall_common: |
13 | ldo 0x40(%sp),%sp |
14 | stw %rp,-0x54(%sp) ; save return pointer |
15 | |
16 | ldw -0x74(%sp),%r22 ; %arg4 |
17 | ldw -0x78(%sp),%r21 ; %arg5 |
18 | |
19 | ble 0x100(%sr2, %r0) ; jump to gateway page |
20 | nop ; can we move a load here? |
21 | |
22 | ldi -0x1000,%r19 ; %r19 = -4096 |
23 | sub %r0,%ret0,%r22 ; %r22 = -%ret0 |
24 | cmpb,>>=,n %r19,%ret0,1f ; if %ret0 >= -4096UL |
25 | ldi -1,%ret0 ; nullified on taken forward |
26 | |
27 | /* store %r22 to errno... */ |
28 | ldil L%errno,%r1 |
29 | ldo R%errno(%r1),%r1 |
30 | stw %r22,0(%r1) |
31 | 1: |
32 | ldw -0x54(%sp),%rp ; restore return pointer |
33 | bv %r0(%rp) ; jump back |
34 | ldo -0x40(%sp),%sp |
35 | |
36 | .size __syscall_common,.-__syscall_common |