PERFORCE change 27696 for review

Marcel Moolenaar marcel at FreeBSD.org
Sun Mar 30 20:49:49 PST 2003


http://perforce.freebsd.org/chv.cgi?CH=27696

Change 27696 by marcel at marcel_nfs on 2003/03/30 20:49:01

	Add new symbols for offsets into mcontext_t and stop
	using a single symbol for when two are better: ie
	don't use UC_MCONTEXT_MC_SPECIAL, when you can add
	UC_MCONTEXT to MC_SPECIAL to get the same without
	combinatorial explosions. We probably want to do the
	same with MC_SPECIAL_RNAT later.

Affected files ...

.. //depot/projects/ia64_epc/sys/ia64/ia64/genassym.c#5 edit
.. //depot/projects/ia64_epc/sys/ia64/ia64/locore.s#3 edit

Differences ...

==== //depot/projects/ia64_epc/sys/ia64/ia64/genassym.c#5 (text+ko) ====

@@ -83,6 +83,12 @@
 
 ASSYM(KSTACK_PAGES,	KSTACK_PAGES);
 
+ASSYM(MC_PRESERVED,	offsetof(mcontext_t, mc_preserved));
+ASSYM(MC_PRESERVED_FP,	offsetof(mcontext_t, mc_preserved_fp));
+ASSYM(MC_SPECIAL,	offsetof(mcontext_t, mc_special));
+ASSYM(MC_SPECIAL_BSPSTORE, offsetof(mcontext_t, mc_special.bspstore));
+ASSYM(MC_SPECIAL_RNAT,	offsetof(mcontext_t, mc_special.rnat));
+
 ASSYM(PAGE_SHIFT,	PAGE_SHIFT);
 ASSYM(PAGE_SIZE,	PAGE_SIZE);
 
@@ -115,9 +121,6 @@
 ASSYM(TF_SPECIAL_PFS,	offsetof(struct trapframe, tf_special.pfs));
 ASSYM(TF_SPECIAL_PSR,	offsetof(struct trapframe, tf_special.psr));
 
-ASSYM(UC_MCONTEXT_MC_SPECIAL_BSPSTORE,
-    offsetof(ucontext_t, uc_mcontext.mc_special.bspstore));
-ASSYM(UC_MCONTEXT_MC_SPECIAL_RNAT,
-    offsetof(ucontext_t, uc_mcontext.mc_special.rnat));
+ASSYM(UC_MCONTEXT,	offsetof(ucontext_t, uc_mcontext));
 
 ASSYM(VM_MAX_ADDRESS,	VM_MAX_ADDRESS);

==== //depot/projects/ia64_epc/sys/ia64/ia64/locore.s#3 (text+ko) ====

@@ -267,7 +267,7 @@
 	mov	b6=r8			// transfer to a branch register
 	cover
 	;;
-	add	r8=UC_MCONTEXT_MC_SPECIAL_BSPSTORE,r16 // address or mc_ar_bsp
+	add	r8=UC_MCONTEXT+MC_SPECIAL_BSPSTORE,r16 // address or mc_ar_bsp
 	mov	r9=ar.bsp		// save ar.bsp
 	;;
 	st8	[r8]=r9
@@ -275,7 +275,7 @@
 (p1)	br.cond.sptk.few 1f		// branch if not switching
 	flushrs				// flush out to old bs
 	mov	ar.rsc=0		// switch off RSE
-	add	r8=UC_MCONTEXT_MC_SPECIAL_RNAT,r16 // address of mc_ar_rnat
+	add	r8=UC_MCONTEXT+MC_SPECIAL_RNAT,r16 // address of mc_ar_rnat
 	;;
 	mov	r9=ar.rnat		// value of ar.rnat after flush
 	mov	ar.bspstore=r18		// point at new bs
@@ -298,11 +298,11 @@
 	;; 
 (p1)	br.cond.sptk.few 2f		// note: p1 is preserved
 	mov	ar.rsc=0
-	add	r8=UC_MCONTEXT_MC_SPECIAL_RNAT,r4 // address of mc_ar_rnat
+	add	r8=UC_MCONTEXT+MC_SPECIAL_RNAT,r4 // address of mc_ar_rnat
 	;;
 	ld8	r9=[r8]
 	;; 
-	add	r8=UC_MCONTEXT_MC_SPECIAL_BSPSTORE,r4 // address of mc_ar_bsp
+	add	r8=UC_MCONTEXT+MC_SPECIAL_BSPSTORE,r4 // address of mc_ar_bsp
 	;;
 	ld8	r10=[r8]
 	;;


More information about the p4-projects mailing list