Date: Wed, 20 Nov 2002 17:43:53 -0800 (PST) From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 21325 for review Message-ID: <200211210143.gAL1hrm1021458@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=21325 Change 21325 by marcel@marcel_nfs on 2002/11/20 17:43:03 Commit a couple of new routines for saving and restoring register sets. This is as far as I go in this direction. We have a release coming up and if I want to go through with this, I will not have anything in the end. Affected files ... .. //depot/projects/ia64/sys/ia64/ia64/syscall.s#3 edit Differences ... ==== //depot/projects/ia64/sys/ia64/ia64/syscall.s#3 (text+ko) ==== @@ -83,83 +83,129 @@ /* - * _{get|set}_special + * _{get|set}_special_sync * Do not follow runtime convention! */ /* * inputs: r16 struct _special * r17 return address */ -ENTRY(_get_special, 0) +ENTRY(_get_special_sync, 0) { .mii flushrs - add r2=8,r16 - add r3=16,r16 - ;; -} -{ .mmi - .mem.offset 0,0 - st8.spill [r2]=r1,16 // gp - .mem.offset 8,0 - st8.spill [r3]=r12,16 // sp mov b6=r17 + add r17=8,r16 ;; } { .mmi - .mem.offset 16,0 - st8.spill [r2]=r13,16 // tp - mov r17=ar.rsc + st8 [r16]=r1,16 // gp + st8 [r17]=r12,16 // sp mov r18=b0 ;; } { .mmi - st8 [r3]=r18,16 // rp - mov ar.rsc=0 - mov r19=pr + st8 [r16]=r13,16 // tp + mov r19=ar.rsc + mov r20=pr ;; } { .mmi - st8 [r2]=r19,16 // pr - mov r20=ar.unat + st8 [r17]=r18,16 // rp + mov ar.rsc=0 mov r21=ar.pfs ;; } -{ .mmi - st8 [r16]=r20 // nat - st8 [r3]=r17,16 // ar.rsc +{ .mmb + st8 [r16]=r20,16 // pr + st8 [r17]=r19,16 // ar.rsc nop 0 + ;; } { .mmi - st8 [r2]=r21,16 // ar.pfs + st8 [r16]=r21,16 // ar.pfs mov r22=ar.bsp nop 1 ;; } -{ .mmi - st8 [r3]=r22,16 // ar.bspstore +{ .mmb + st8 [r17]=r22,16 // ar.bspstore mov r23=ar.rnat nop 2 ;; } { .mmi - st8 [r2]=r23 // ar.rnat + st8 [r16]=r23 // ar.rnat mov r24=ar.fpsr nop 3 ;; } { .mmb - st8 [r3]=r24 // ar.fpsr - mov ar.rsc=r17 + st8 [r17]=r24 // ar.fpsr + mov ar.rsc=r19 br.sptk b6 ;; } -END(_get_special) +END(_get_special_sync) /* * inputs: r16 struct _special */ -ENTRY(_set_special, 0) -END(_set_special) +ENTRY(_set_special_sync, 0) +{ .mmi + invala + mov ar.rsc=0 + add r17=8,r16 + ;; +} +{ .mmb + ld8 r1=[r16],16 // gp + ld8 r12=[r17],16 // sp + nop 0 + ;; +} +{ .mmb + ld8 r13=[r16],16 // tp + ld8 r18=[r17],16 // rp + nop 1 + ;; +} +{ .mmi + ld8 r19=[r16],16 // pr + ld8 r20=[r17],16 // ar.rsc + mov b0=r18 + ;; +} +{ .mmi + loadrs + ld8 r21=[r16],16 // ar.pfs + mov pr=r19,0x1fffe + ;; +} +{ .mmi + ld8 r22=[r17],16 // ar.bspstore + ld8 r23=[r16] // ar.rnat + mov ar.pfs=r21 + ;; +} +{ .mmb + ld8 r24=[r17] // ar.fpsr + mov ar.bspstore=r22 + nop 2 + ;; +} +{ .mmb + mov ar.rnat=r23 + mov ar.rsc=r20 + nop 3 + ;; +} +{ .mib + mov ar.fpsr=r24 + nop 4 + br.ret.sptk rp + ;; +} +END(_set_special_sync) /* * _{get|set}_callee_saved @@ -276,3 +322,78 @@ ;; } END(_set_callee_saved) + +/* + * _{get|set}_callee_saved + */ +ENTRY(_get_callee_saved_fp, 1) + add r31=16,r32 + stf.spill [r32]=f2,32 + ;; + stf.spill [r31]=f3,32 + stf.spill [r32]=f4,32 + ;; + stf.spill [r31]=f5,32 + stf.spill [r32]=f16,32 + ;; + stf.spill [r31]=f17,32 + stf.spill [r32]=f18,32 + ;; + stf.spill [r31]=f19,32 + stf.spill [r32]=f20,32 + ;; + stf.spill [r31]=f21,32 + stf.spill [r32]=f22,32 + ;; + stf.spill [r31]=f23,32 + stf.spill [r32]=f24,32 + ;; + stf.spill [r31]=f25,32 + stf.spill [r32]=f26,32 + ;; + stf.spill [r31]=f27,32 + stf.spill [r32]=f28,32 + ;; + stf.spill [r31]=f29,32 + stf.spill [r32]=f30 + ;; + stf.spill [r31]=f31 + br.ret.sptk rp + ;; +END(_get_callee_saved_fp) + +ENTRY(_set_callee_saved_fp, 1) + add r31=16,r32 + ldf.fill f2=[r32],32 + ;; + ldf.fill f3=[r31],32 + ldf.fill f4=[r32],32 + ;; + ldf.fill f5=[r31],32 + ldf.fill f16=[r32],32 + ;; + ldf.fill f17=[r31],32 + ldf.fill f18=[r32],32 + ;; + ldf.fill f19=[r31],32 + ldf.fill f20=[r32],32 + ;; + ldf.fill f21=[r31],32 + ldf.fill f22=[r32],32 + ;; + ldf.fill f23=[r31],32 + ldf.fill f24=[r32],32 + ;; + ldf.fill f25=[r31],32 + ldf.fill f26=[r32],32 + ;; + ldf.fill f27=[r31],32 + ldf.fill f28=[r32],32 + ;; + ldf.fill f29=[r31],32 + ldf.fill f30=[r32] + ;; + ldf.fill f31=[r31] + br.ret.sptk rp + ;; +END(_set_callee_saved_fp) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211210143.gAL1hrm1021458>