Date: Fri, 18 Apr 2003 00:44:20 -0700 (PDT) From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 29181 for review Message-ID: <200304180744.h3I7iKgk040736@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=29181 Change 29181 by marcel@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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304180744.h3I7iKgk040736>