Magellan Linux

Diff of /trunk/mkinitrd-magellan/klibc/usr/klibc/arch/sh/syscall.S

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1121 by niro, Sat Sep 1 22:45:15 2007 UTC revision 1122 by niro, Wed Aug 18 21:11:40 2010 UTC
# Line 5  Line 5 
5   * r4..r7 contain arguments 0-3 per the standard calling convention,   * r4..r7 contain arguments 0-3 per the standard calling convention,
6   * and arguments 4-5 are passed in r0 and r1.   * and arguments 4-5 are passed in r0 and r1.
7   *   *
8   * The return value is in r3 rather than standard r0.   * The return value is in r0.
9   */   */
10    
11   .section ".text.syscall","ax"   .section ".text.syscall","ax"
# Line 16  __syscall_common: Line 16  __syscall_common:
16   mov.l @(0,sp),r0   mov.l @(0,sp),r0
17   mov.l @(4,sp),r1   mov.l @(4,sp),r1
18   trapa #0x15   trapa #0x15
19   mov.l 1f,r0   mov.l 1f,r1
20   cmp/hs r0,r3   cmp/hs r0,r1
21   bt/s 3f   bt/s 3f
22    neg r3,r4    neg r0,r1
23   mov.l 2f,r5   mov.l 2f,r2
24   mov.l r4,@r5   mov.l r1,@r2
25   rts   rts
26    mov #-1,r0    mov #-1,r0
27  3:  3:
28   rts   rts
29    mov r3,r0    nop
30    
31   .align 2   .align 2
32  1: .long -4096 /* Errno limit */  1: .long -4096 /* Errno limit */

Legend:
Removed from v.1121  
changed lines
  Added in v.1122