aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2004-04-19 18:53:43 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2004-04-19 18:53:43 +0000
commit03b562aecb29807a4d144fbf7a1e9ed7a4b7dcd4 (patch)
treea4d17fbd87fb5f31e80bc326f119f1d9202e20f3 /lib
parent854db8a29ad38fcaa069f1f9bfb9a26975810769 (diff)
downloadexternal_llvm-03b562aecb29807a4d144fbf7a1e9ed7a4b7dcd4.zip
external_llvm-03b562aecb29807a4d144fbf7a1e9ed7a4b7dcd4.tar.gz
external_llvm-03b562aecb29807a4d144fbf7a1e9ed7a4b7dcd4.tar.bz2
Tighten up SparcV9FloatCCRegClass::getRegName()'s assertion - if you ask it for
the name of %fsr (as the comment in SparcV9RegClassInfo.h used to suggest) you would walk off the end of the FloatCCRegName array. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13070 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/SparcV9/SparcV9RegInfo.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Target/SparcV9/SparcV9RegInfo.cpp b/lib/Target/SparcV9/SparcV9RegInfo.cpp
index dd5a02d..b6da2e6 100644
--- a/lib/Target/SparcV9/SparcV9RegInfo.cpp
+++ b/lib/Target/SparcV9/SparcV9RegInfo.cpp
@@ -106,7 +106,6 @@ const char * const SparcV9FloatRegClass::getRegName(unsigned reg) const {
return FloatRegNames[reg];
}
-
static const char * const IntCCRegNames[] = {
"xcc", "icc", "ccr"
};
@@ -121,7 +120,7 @@ static const char * const FloatCCRegNames[] = {
};
const char * const SparcV9FloatCCRegClass::getRegName(unsigned reg) const {
- assert (reg < 5);
+ assert (reg < 4);
return FloatCCRegNames[reg];
}