1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/lib
Fangrui Song 7f7bfe12ea [MCInstPrinter] Pass Address parameter to MCOI::OPERAND_PCREL typed operands. NFC
Follow-up of D72172 and D72180

This patch passes `uint64_t Address` to print methods of PC-relative
operands so that subsequent target specific patches can change
`*InstPrinter::print{Operand,PCRelImm,...}` to customize the output.

Add MCInstPrinter::PrintBranchImmAsAddress which is set to true by
llvm-objdump.

```
// Current llvm-objdump -d output
aarch64: 20000: bl #0
ppc:     20000: bl .+4
x86:     20000: callq 0

// Ideal output
aarch64: 20000: bl 0x20000
ppc:     20000: bl 0x20004
x86:     20000: callq 0x20005

// GNU objdump -d. The lack of 0x is not ideal because the result cannot be re-assembled
aarch64: 20000: bl 20000
ppc:     20000: bl 0x20004
x86:     20000: callq 20005
```

In `lib/Target/X86/X86GenAsmWriter1.inc` (generated by `llvm-tblgen -gen-asm-writer`):

```
   case 12:
     // CALL64pcrel32, CALLpcrel16, CALLpcrel32, EH_SjLj_Setup, JCXZ, JECXZ, J...
-    printPCRelImm(MI, 0, O);
+    printPCRelImm(MI, Address, 0, O);
     return;
```

Some targets have 2 `printOperand` overloads, one without `Address` and
one with `Address`. They should annotate derived `Operand` properly with
`let OperandType = "OPERAND_PCREL"`.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D76574
2020-03-26 08:21:15 -07:00
..
Analysis [CFG/BasicBlock] Rename succ_const to const_succ. [NFC] 2020-03-25 12:40:55 -07:00
AsmParser Add debug info support for Swift/Clang APINotes. 2020-03-11 18:47:30 -07:00
BinaryFormat [DebugInfo]: Added DWARFv5 macro header flags and corresponding helper 2020-03-07 17:53:01 +05:30
Bitcode Add debug info support for Swift/Clang APINotes. 2020-03-11 18:47:30 -07:00
Bitstream
CodeGen [GlobalISel] add helper function to create arbitrary libcalls 2020-03-26 16:11:13 +01:00
DebugInfo Suppress a few -Wunreachable-code warnings. 2020-03-25 13:55:42 -04:00
Demangle
DWARFLinker Add an -object-path-prefix option to dsymutil 2020-03-24 17:13:42 -07:00
ExecutionEngine [CFG/BasicBlock] Rename succ_const to const_succ. [NFC] 2020-03-25 12:40:55 -07:00
Frontend [OpenMP][NFC] Reduce instantiation time with different data structure 2020-03-23 14:23:46 -05:00
Fuzzer
FuzzMutate Remove CompositeType class. 2020-03-18 13:53:17 -07:00
IR Use optimal layout and preserve alloca alignment in coroutine frames. 2020-03-26 00:51:09 -04:00
IRReader
LineEditor
Linker
LTO [LTO] onfig::addSaveTemps: clear ResolutionFile upon an error 2020-03-02 17:49:04 -08:00
MC Revert rGd5d8569df14e95e2c53d167bd1b37995bcbec565 "Fix static analysis warnings about classes with virtual methods not having virtual destructors" 2020-03-21 11:39:34 +00:00
MCA
Object [WebAssembly] Move event section before global section 2020-03-25 11:49:03 -07:00
ObjectYAML [WebAssembly] Move event section before global section 2020-03-25 11:49:03 -07:00
Option
Passes [memtag] Plug in stack safety analysis. 2020-03-16 16:35:25 -07:00
ProfileData [Coverage] Collect all function records in an object (D69471 followup) 2020-03-02 12:01:09 -08:00
Remarks
Support Tools emit the bug report URL on crash 2020-03-26 10:26:59 +00:00
TableGen Explicitly include <cassert> when using assert 2020-03-02 22:45:28 +01:00
Target [MCInstPrinter] Pass Address parameter to MCOI::OPERAND_PCREL typed operands. NFC 2020-03-26 08:21:15 -07:00
Testing
TextAPI Suppress a few -Wunreachable-code warnings. 2020-03-25 13:55:42 -04:00
ToolDrivers
Transforms [InstCombine] Fix a code-sinking bug after D73832/f1a9efabcb9b 2020-03-25 22:50:53 -07:00
WindowsManifest Try to fix WindowsManifest CMake logic on Windows 2020-02-28 17:24:03 -08:00
XRay
CMakeLists.txt
LLVMBuild.txt