diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-11-22 16:15:34 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-11-22 16:15:34 +0000 |
commit | 7751ad92daeea5a3502fbc266ae814baec5c03e6 (patch) | |
tree | e8fe5ac64eef58c1c5313b6c94b8037be8d04aa4 /lib/Target/ARM | |
parent | 253174bf50c932abaa680f465e2888c0e5272267 (diff) | |
download | external_llvm-7751ad92daeea5a3502fbc266ae814baec5c03e6.zip external_llvm-7751ad92daeea5a3502fbc266ae814baec5c03e6.tar.gz external_llvm-7751ad92daeea5a3502fbc266ae814baec5c03e6.tar.bz2 |
Make a convenient helper for printing offsets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59872 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM')
-rw-r--r-- | lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp | 11 | ||||
-rw-r--r-- | lib/Target/ARM/AsmPrinter/Makefile | 4 |
2 files changed, 6 insertions, 9 deletions
diff --git a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp index 36cd98e..ae6c354 100644 --- a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp +++ b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp @@ -300,12 +300,9 @@ void ARMAsmPrinter::printOperand(const MachineInstr *MI, int opNum, FnStubs.insert(Name); } else O << Name; - - if (MO.getOffset() > 0) - O << '+' << MO.getOffset(); - else if (MO.getOffset() < 0) - O << MO.getOffset(); - + + printOffset(MO.getOffset()); + if (isCallOp && Subtarget->isTargetELF() && TM.getRelocationModel() == Reloc::PIC_) O << "(PLT)"; @@ -345,7 +342,7 @@ static void printSOImm(raw_ostream &O, int64_t V, const TargetAsmInfo *TAI) { assert(V < (1 << 12) && "Not a valid so_imm value!"); unsigned Imm = ARM_AM::getSOImmValImm(V); unsigned Rot = ARM_AM::getSOImmValRot(V); - + // Print low-level immediate formation info, per // A5.1.3: "Data-processing operands - Immediate". if (Rot) { diff --git a/lib/Target/ARM/AsmPrinter/Makefile b/lib/Target/ARM/AsmPrinter/Makefile index a896681..4063036 100644 --- a/lib/Target/ARM/AsmPrinter/Makefile +++ b/lib/Target/ARM/AsmPrinter/Makefile @@ -1,4 +1,4 @@ -##===- lib/Target/X86/Makefile -----------------------------*- Makefile -*-===## +##===- lib/Target/ARM/Makefile -----------------------------*- Makefile -*-===## # # The LLVM Compiler Infrastructure # @@ -9,7 +9,7 @@ LEVEL = ../../../.. LIBRARYNAME = LLVMARMAsmPrinter -# Hack: we need to include 'main' x86 target directory to grab private headers +# Hack: we need to include 'main' arm target directory to grab private headers CPPFLAGS = -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/.. include $(LEVEL)/Makefile.common |