aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-10 05:16:44 +0000
committerChris Lattner <sabre@nondot.org>2004-02-10 05:16:44 +0000
commit21e79cbacd7b25101ca17ba3e1b29bc02e0dbf8e (patch)
treeaebb17bdcb90d360ab6cf24aa1181aa2638e1536
parent9f4b90de91ba6a70dd8f9217b9396a5666719695 (diff)
downloadexternal_llvm-21e79cbacd7b25101ca17ba3e1b29bc02e0dbf8e.zip
external_llvm-21e79cbacd7b25101ca17ba3e1b29bc02e0dbf8e.tar.gz
external_llvm-21e79cbacd7b25101ca17ba3e1b29bc02e0dbf8e.tar.bz2
Fix PR228: [sparc] Boolean constants are emitted as true and false
I will observe that the concept of using WriteAsOperand is completely broken, but then we all knew that, didn't we? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11255 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/SparcV9/SparcV9AsmPrinter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp
index 863ffd7..277da69 100644
--- a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp
+++ b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp
@@ -340,6 +340,8 @@ void AsmPrinter::printSingleConstantValue(const Constant* CV) {
toAsm << "\t! " << CV->getType()->getDescription()
<< " value: " << Val << "\n";
+ } else if (const ConstantBool *CB = dyn_cast<ConstantBool>(CV)) {
+ toAsm << (int)CB->getValue() << "\n";
} else {
WriteAsOperand(toAsm, CV, false, false) << "\n";
}