PERFORCE change 116213 for review

Oleksandr Tymoshenko gonzo at FreeBSD.org
Tue Mar 20 16:35:03 UTC 2007


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

Change 116213 by gonzo at gonzo_jeeves on 2007/03/20 16:34:09

	o Ged rid of extra-newlines and unnecessary XXXMIPS
	o Add DO_AST macros. It's purpose - perform preliminary 
	    checks and call ast if conditions (usermode and either
	    TDF_ASTPENDING or TDF_NEEDRESCHED is set) are met.

Affected files ...

.. //depot/projects/mips2/src/sys/mips/include/asm.h#10 edit

Differences ...

==== //depot/projects/mips2/src/sys/mips/include/asm.h#10 (text+ko) ====

@@ -147,13 +147,13 @@
 #define AENT(x)								\
 	.aent   x, 0
 
-
 /*
  * WEAK_ALIAS: create a weak alias.
  */
 #define	WEAK_ALIAS(alias,sym)						\
 	.weak alias;							\
 	alias = sym
+
 /*
  * STRONG_ALIAS: create a strong alias.
  */
@@ -236,6 +236,25 @@
 #define END(x) \
 	.end _C_LABEL(x)
 
+/*
+ * Call ast if required
+ */
+#define DO_AST							\
+	lw	k1, pcpup;					\
+	lw	k1, PC_CURTHREAD(k1);				\
+	lw	k1, TD_FRAME(k1);				\
+	lw	t0, TF_REG_SR(k1);				\
+	and	t0, t0, MIPS_SR_KSU_USER;			\
+	beq	t0, zero, 27f;					\
+	nop;							\
+	lw	t0, TD_FLAGS(k1);				\
+	and	t0, t0, (TDF_ASTPENDING|TDF_NEEDRESCHED);	\
+	beq	t0, zero, 27f;					\
+	nop;							\
+	move	a0, k1;						\
+	jal	ast;						\
+	nop;							\
+27:					
 
 /*
  *  standard callframe {
@@ -289,7 +308,6 @@
 #define _OFFSETOF_SC_MASK       460
 #endif
 
-/* XXXMIPS: end */
 #define RCSID(x)	.text; .asciz x
 
 #undef __FBSDID


More information about the p4-projects mailing list