PERFORCE change 29181 for review
Marcel Moolenaar
marcel at FreeBSD.org
Fri Apr 18 00:44:22 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=29181
Change 29181 by marcel at marcel_nfs on 2003/04/18 00:43:24
We don't preserve the non-local registers in the register
window, and since we turn all input registers into output
registers, as part of the syscall code, we cannot use any
inputs after the syscall. Note that this is completely
in accordance with the runtime specs. Save registers in
the memory stack scratch area if we need them after the
syscall.
Affected files ...
.. //depot/projects/ia64_epc/lib/libc/ia64/sys/brk.S#3 edit
.. //depot/projects/ia64_epc/lib/libc/ia64/sys/pipe.S#3 edit
.. //depot/projects/ia64_epc/lib/libc/ia64/sys/sbrk.S#3 edit
Differences ...
==== //depot/projects/ia64_epc/lib/libc/ia64/sys/brk.S#3 (text+ko) ====
@@ -45,11 +45,13 @@
ld8 r14=[r14] ;;
ld8 r14=[r14] ;;
cmp.ltu p6,p0=r32,r14 ;;
-(p6) mov r32=r14
+(p6) mov r32=r14 ;;
+ st8 [sp]=r32
CALLSYS_ERROR(break)
+ ld8 r15=[sp]
add r14=@ltoff(curbrk),gp ;;
ld8 r14=[r14] ;;
- st8 [r14]=r32
+ st8 [r14]=r15
mov ret0=0
br.ret.sptk.few rp
END(brk)
==== //depot/projects/ia64_epc/lib/libc/ia64/sys/pipe.S#3 (text+ko) ====
@@ -32,10 +32,16 @@
#include "SYS.h"
-SYSCALL(pipe)
- .regstk 1,0,0,0
- st4 [in0]=ret0,4 ;;
- st4 [in0]=ret1
- mov ret0=0
+ENTRY(__sys_pipe, 1)
+ WEAK_ALIAS(pipe, __sys_pipe)
+ WEAK_ALIAS(_pipe, __sys_pipe)
+ st8 [sp]=r32
+ CALLSYS_ERROR(pipe)
+ ld8 r14=[sp]
+ ;;
+ st4 [r14]=ret0,4
+ ;;
+ st4 [r14]=ret1
+ mov ret0=0
br.ret.sptk.few rp
-END(pipe)
+END(__sys_pipe)
==== //depot/projects/ia64_epc/lib/libc/ia64/sys/sbrk.S#3 (text+ko) ====
@@ -49,12 +49,15 @@
(p6) br.ret.sptk.few rp
;;
add r32 = ret0, r32
+ ;;
+ st8 [sp] = r32
CALLSYS_ERROR(break)
+ ld8 r15 = [sp]
add r14 = @ltoff(curbrk), gp
;;
ld8 r14 = [r14]
;;
ld8 ret0 = [r14]
- st8 [r14] = r32
+ st8 [r14] = r15
br.ret.sptk.few rp
END(sbrk)
More information about the p4-projects
mailing list