From owner-p4-projects Sun Mar 23 18:41:10 2003 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 93B6837B404; Sun, 23 Mar 2003 18:41:06 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 160AA37B401 for ; Sun, 23 Mar 2003 18:41:06 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 16F3A43FF3 for ; Sun, 23 Mar 2003 18:40:57 -0800 (PST) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h2O2eu0U010662 for ; Sun, 23 Mar 2003 18:40:56 -0800 (PST) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h2O2euqu010659 for perforce@freebsd.org; Sun, 23 Mar 2003 18:40:56 -0800 (PST) Date: Sun, 23 Mar 2003 18:40:56 -0800 (PST) Message-Id: <200303240240.h2O2euqu010659@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar Subject: PERFORCE change 27272 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://perforce.freebsd.org/chv.cgi?CH=27272 Change 27272 by marcel@marcel_nfs on 2003/03/23 18:40:56 Implement _set_caller_saved This function restores the non-FP, non-stacked scratch registers. It's used in the same context as _get_caller_saved, however things are slughly different. Since the details are not fixed, I assume for now that this function cannot follow the runtime specification but still use RP to branch back (we have no other branch registers free). We have to revisit this when we know how we save and restore the trapframe... Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/context.s#4 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/context.s#4 (text+ko) ==== @@ -426,10 +426,85 @@ /* * _set_caller_saved * - * PRECONDITION: Must be called with register bank 1 selected - * POSTCONDITION: Will return with register bank 0 selected + * Does not follow runtime specification: + * inputs: r16 = pointer to struct _caller_saved + * r17 = return address (no call/ret semantics) + * precondition: Must be called with register bank 1 selected, + * + * postcondition: Will return with register bank 0 selected. */ -ENTRY(_set_caller_saved, 1) +ENTRY(_set_caller_saved, 0) + ld8 r8=[r16] // nat (after) + add r2=40,r16 + add r3=48,r16 + ;; + mov ar.unat=r8 + mov r8=r16 + mov r9=r17 + ;; + ld8.fill r10=[r2],16 // r10 + ld8.fill r11=[r3],16 // r11 + nop 0 + ;; + ld8.fill r14=[r2],16 // r14 + ld8.fill r15=[r3],16 // r15 + nop 1 + ;; + ld8.fill r16=[r2],16 // r16 + ld8.fill r17=[r3],16 // r17 + nop 2 + ;; + ld8.fill r18=[r2],16 // r18 + ld8.fill r19=[r3],16 // r19 + nop 3 + ;; + ld8.fill r20=[r2],16 // r20 + ld8.fill r21=[r3],16 // r21 + nop 4 + ;; + ld8.fill r22=[r2],16 // r22 + ld8.fill r23=[r3],16 // r23 + nop 5 + ;; + ld8.fill r24=[r2],16 // r24 + ld8.fill r25=[r3],16 // r25 + nop 6 + ;; + ld8.fill r26=[r2],16 // r26 + ld8.fill r27=[r3],16 // r27 + nop 7 + ;; + ld8.fill r28=[r2],16 // r28 + ld8.fill r29=[r3],16 // r29 + nop 8 + ;; + ld8.fill r30=[r2],16 // r30 + ld8.fill r31=[r3],16 // r31 + bsw.0 + ;; + /* We're using register bank 0 now. */ + + ld8 r18=[r2] // unat (before) + add r16=8,r8 + add r17=16,r8 + ld8 r19=[r3] // b6 + add r20=16,r2 + add r21=16,r3 + ;; + ld8.fill r2=[r16],16 // r2 + ld8.fill r3=[r17],16 // r3 + mov rp=r9 + ;; + ld8 r16=[r20] // b7 + ld8 r17=[r21] // ccv + mov b6=r19 + ;; + ld8.fill r8=[r16] // r8 + ld8.fill r9=[r17] // r9 + mov b7=r16 + ;; + mov ar.unat=r18 + mov ar.ccv=r17 br.ret.sptk rp ;; END(_get_called_saved) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message