This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[applied patch] add overflow checking comments to mips.igen
- From: cgd at broadcom dot com
- To: gdb-patches at sources dot redhat dot com
- Date: 11 Feb 2002 14:49:47 -0800
- Subject: [applied patch] add overflow checking comments to mips.igen
originally from:
http://sources.redhat.com/ml/gdb-patches/2000-12/msg00117.html
split out and recycled for your pleasure. 8-)
These aren't just no-op comments; they tell people that overflow
checking really is being done, and where. (And, obviously, somebody
thought it appropriate to put this in in ... one of the 6 places,
previous. "hmm.")
cgd
===================================================================
2002-02-11 Chris Demetriou <cgd@broadcom.com>
* mips.igen (ADD, ADDI, DADDI, DSUB, SUB): Add comment
indicating that ALU32_END or ALU64_END are there to check
for overflow.
(DADD): Likewise, but also remove previous comment about
overflow checking.
Index: mips.igen
===================================================================
RCS file: /cvs/src/src/sim/mips/mips.igen,v
retrieving revision 1.9
diff -u -r1.9 mips.igen
--- mips.igen 2002/02/11 06:13:49 1.9
+++ mips.igen 2002/02/11 22:45:39
@@ -237,7 +237,7 @@
{
ALU32_BEGIN (GPR[RS]);
ALU32_ADD (GPR[RT]);
- ALU32_END (GPR[RD]);
+ ALU32_END (GPR[RD]); /* This checks for overflow. */
}
TRACE_ALU_RESULT (GPR[RD]);
}
@@ -255,7 +255,7 @@
{
ALU32_BEGIN (GPR[RS]);
ALU32_ADD (EXTEND16 (IMMEDIATE));
- ALU32_END (GPR[RT]);
+ ALU32_END (GPR[RT]); /* This checks for overflow. */
}
TRACE_ALU_RESULT (GPR[RT]);
}
@@ -709,12 +709,11 @@
*vr4100:
*vr5000:
{
- /* this check's for overflow */
TRACE_ALU_INPUT2 (GPR[RS], GPR[RT]);
{
ALU64_BEGIN (GPR[RS]);
ALU64_ADD (GPR[RT]);
- ALU64_END (GPR[RD]);
+ ALU64_END (GPR[RD]); /* This checks for overflow. */
}
TRACE_ALU_RESULT (GPR[RD]);
}
@@ -732,7 +731,7 @@
{
ALU64_BEGIN (GPR[RS]);
ALU64_ADD (EXTEND16 (IMMEDIATE));
- ALU64_END (GPR[RT]);
+ ALU64_END (GPR[RT]); /* This checks for overflow. */
}
TRACE_ALU_RESULT (GPR[RT]);
}
@@ -1181,7 +1180,7 @@
{
ALU64_BEGIN (GPR[RS]);
ALU64_SUB (GPR[RT]);
- ALU64_END (GPR[RD]);
+ ALU64_END (GPR[RD]); /* This checks for overflow. */
}
TRACE_ALU_RESULT (GPR[RD]);
}
@@ -2210,7 +2209,7 @@
{
ALU32_BEGIN (GPR[RS]);
ALU32_SUB (GPR[RT]);
- ALU32_END (GPR[RD]);
+ ALU32_END (GPR[RD]); /* This checks for overflow. */
}
TRACE_ALU_RESULT (GPR[RD]);
}