PERFORCE change 30839 for review

Marcel Moolenaar marcel at FreeBSD.org
Thu May 8 23:40:53 PDT 2003


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

Change 30839 by marcel at marcel_nfs on 2003/05/08 23:40:17

	Fix the calculation of the number of nat collections between BSP
	and BSP-regs. The regs term is in bytes...

Affected files ...

.. //depot/projects/ia64_epc/sys/ia64/ia64/db_interface.c#7 edit

Differences ...

==== //depot/projects/ia64_epc/sys/ia64/ia64/db_interface.c#7 (text+ko) ====

@@ -235,7 +235,7 @@
 	bsp = ddb_regs.tf_special.bspstore + ddb_regs.tf_special.ndirty;
 	regno = (db_expr_t)vp->valuep - 32;
 	sof = ddb_regs.tf_special.cfm & 0x7f;
-	nats = (sof - regno + 62 - ((bsp >> 3) & 0x3f)) / 63;
+	nats = (((sof - regno) << 3) + 62 - ((bsp >> 3) & 0x3f)) / 63;
 
 	reg = (void*)(bsp - ((sof - regno + nats) << 3));
 
@@ -469,7 +469,7 @@
 		bsp = regs->tf_special.bspstore + regs->tf_special.ndirty;
 		regno -= 32;
 		sof = regs->tf_special.cfm & 0x7f;
-		nats = (sof - regno + 62 - ((bsp >> 3) & 0x3f)) / 63;
+		nats = (((sof - regno) << 3) + 62 - ((bsp >> 3) & 0x3f)) / 63;
 		rsp = (void*)(bsp - ((sof - regno + nats) << 3));
 		if (regno < sof)
 			return (*rsp);


More information about the p4-projects mailing list