summaryrefslogtreecommitdiff
path: root/lib/Target/Hexagon/InstPrinter
diff options
context:
space:
mode:
authorBrendon Cahoon <bcahoon@codeaurora.org>2012-05-14 19:35:42 +0000
committerBrendon Cahoon <bcahoon@codeaurora.org>2012-05-14 19:35:42 +0000
commit5262abb2682a4d09cda3563a55f27caffb57466c (patch)
treea59df261ddc8a08bd502df1082c8770e4141e882 /lib/Target/Hexagon/InstPrinter
parenta6063c6e29746d9425bdf46d680e28a48dcf58f9 (diff)
downloadllvm-5262abb2682a4d09cda3563a55f27caffb57466c.tar.gz
llvm-5262abb2682a4d09cda3563a55f27caffb57466c.tar.bz2
llvm-5262abb2682a4d09cda3563a55f27caffb57466c.tar.xz
Revert 156634 upon request until code improvement changes are made.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156775 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Hexagon/InstPrinter')
-rw-r--r--lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp27
1 files changed, 3 insertions, 24 deletions
diff --git a/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp b/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp
index 6d969619f7..035afe88d5 100644
--- a/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp
+++ b/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp
@@ -13,7 +13,6 @@
#define DEBUG_TYPE "asm-printer"
#include "Hexagon.h"
-#include "HexagonConstExtInfo.h"
#include "HexagonAsmPrinter.h"
#include "HexagonInstPrinter.h"
#include "HexagonMCInst.h"
@@ -108,10 +107,7 @@ void HexagonInstPrinter::printImmOperand(const MCInst *MI, unsigned OpNo,
void HexagonInstPrinter::printExtOperand(const MCInst *MI, unsigned OpNo,
raw_ostream &O) const {
- if (isConstExtended(MI))
- O << "#" << MI->getOperand(OpNo).getImm();
- else
- O << MI->getOperand(OpNo).getImm();
+ O << MI->getOperand(OpNo).getImm();
}
void HexagonInstPrinter::printUnsignedImmOperand(const MCInst *MI,
@@ -121,7 +117,7 @@ void HexagonInstPrinter::printUnsignedImmOperand(const MCInst *MI,
void HexagonInstPrinter::printNegImmOperand(const MCInst *MI, unsigned OpNo,
raw_ostream &O) const {
- O << -MI->getOperand(OpNo).getImm();
+ O << -MI->getOperand(OpNo).getImm();
}
void HexagonInstPrinter::printNOneImmOperand(const MCInst *MI, unsigned OpNo,
@@ -135,10 +131,7 @@ void HexagonInstPrinter::printMEMriOperand(const MCInst *MI, unsigned OpNo,
const MCOperand& MO1 = MI->getOperand(OpNo + 1);
O << getRegisterName(MO0.getReg());
- if (isConstExtended(MI))
- O << " + ##" << MO1.getImm();
- else
- O << " + #" << MO1.getImm();
+ O << " + #" << MO1.getImm();
}
void HexagonInstPrinter::printFrameIndexOperand(const MCInst *MI, unsigned OpNo,
@@ -203,17 +196,3 @@ void HexagonInstPrinter::printSymbol(const MCInst *MI, unsigned OpNo,
}
O << ')';
}
-
-bool HexagonInstPrinter::isConstExtended(const MCInst *MI) const{
- unsigned short Opcode = MI->getOpcode();
- short ExtOpNum = HexagonConstExt::getCExtOpNum(Opcode);
- int MinValue = HexagonConstExt::getMinValue(Opcode);
- int MaxValue = HexagonConstExt::getMaxValue(Opcode);
-
- // Instruction has no constant extended operand
- if (ExtOpNum == -1)
- return false;
-
- int ImmValue = MI->getOperand(ExtOpNum).getImm();
- return (ImmValue < MinValue || ImmValue > MaxValue);
-}