From 093210d4dc1fa495d901b7689ecba36c7b5e2fc3 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 20 Dec 2013 13:40:28 -0800 Subject: fix parens in ashr/lshr --- lib/Target/CppBackend/CPPBackend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Target') diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp index 2ca1e92d25..c7b2feb30a 100644 --- a/lib/Target/CppBackend/CPPBackend.cpp +++ b/lib/Target/CppBackend/CPPBackend.cpp @@ -837,7 +837,7 @@ std::string JSWriter::generateInstruction(const Instruction *I) { case Instruction::LShr: { std::string Input = getValueAsStr(I->getOperand(0)); if (I->getType()->getIntegerBitWidth() < 32) { - Input = getParenCast(Input, I->getType(), opcode == Instruction::AShr ? ASM_SIGNED : ASM_UNSIGNED); // fill in high bits, as shift needs those and is done in 32-bit + Input = '(' + getCast(Input, I->getType(), opcode == Instruction::AShr ? ASM_SIGNED : ASM_UNSIGNED) + ')'; // fill in high bits, as shift needs those and is done in 32-bit } text += Input + (opcode == Instruction::AShr ? " >> " : " >>> ") + getValueAsStr(I->getOperand(1)); break; -- cgit v1.2.3-18-g5258