Changed checking for invalid register number - earlier it was uisng a contant
llvm-svn: 1293
diff --git a/llvm/lib/Target/Sparc/EmitAssembly.cpp b/llvm/lib/Target/Sparc/EmitAssembly.cpp
index 24efa26..618fb6d 100644
--- a/llvm/lib/Target/Sparc/EmitAssembly.cpp
+++ b/llvm/lib/Target/Sparc/EmitAssembly.cpp
@@ -227,7 +227,7 @@
int RegNum = (int)op.getAllocatedRegNum();
// ****this code is temporary till NULL Values are fixed
- if (RegNum == 10000) {
+ if (RegNum == Target.getRegInfo().getInvalidRegNum()) {
toAsm << "<NULL VALUE>";
} else {
toAsm << "%" << Target.getRegInfo().getUnifiedRegName(RegNum);