1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test/LTO/Resolution/X86
Fangrui Song 3d2508df1f [X86InstPrinter] Change printPCRelImm to print the target address in hexadecimal form
```
// llvm-objdump -d output (before)
400000: e8 0b 00 00 00   callq 11
400005: e8 0b 00 00 00   callq 11

// llvm-objdump -d output (after)
400000: e8 0b 00 00 00  callq 0x400010
400005: e8 0b 00 00 00  callq 0x400015

// GNU objdump -d. The lack of 0x is not ideal because the result cannot be re-assembled
400000: e8 0b 00 00 00  callq 400010
400005: e8 0b 00 00 00  callq 400015
```

In llvm-objdump, we pass the address of the next MCInst. Ideally we
should just thread the address of the current address, unfortunately we
cannot call X86MCCodeEmitter::encodeInstruction (X86MCCodeEmitter
requires MCInstrInfo and MCContext) to get the length of the MCInst.

MCInstPrinter::printInst has other callers (e.g llvm-mc -filetype=asm, llvm-mca) which set Address to 0.
They leave MCInstPrinter::PrintBranchImmAsAddress as false and this change is a no-op for them.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D76580
2020-03-26 08:28:59 -07:00
..
Inputs
alias-alias.ll
alias.ll
appending-var.ll
asm-output.ll [llvm-objdump] -d: print 00000000 <foo>: instead of 00000000 foo: 2020-03-05 18:05:28 -08:00
available-externally.ll
cache-dso-local2.ll
cache-dso-local.ll
cache-prevailing.ll
comdat-mixed-lto.ll
comdat.ll
common2.ll
commons.ll
dead-strip-alias.ll
dead-strip-fulllto.ll
diagnostic-handler-remarks-with-hotness.ll
diagnostic-handler-remarks.ll
empty-bitcode.test
export-jumptable.ll
function-alias-non-prevailing.ll
ifunc2.ll
ifunc.ll
intrinsic.ll
link-odr-availextern.ll
linker-redef-thin.ll
linker-redef.ll
linkonce.ll
lit.local.cfg
load-sample-prof-icp.ll
load-sample-prof-lto.ll
load-sample-prof.ll
local-def-dllimport.ll
lowertypetests.ll
lto-unit-check.ll
mixed_lto.ll
mod-asm-used.ll
multi-thinlto.ll
not-prevailing-alias.ll [llvm-objdump] -d: print 00000000 <foo>: instead of 00000000 foo: 2020-03-05 18:05:28 -08:00
not-prevailing-variables.ll ThinLTOBitcodeWriter: drop dso_local when a GlobalVariable is converted to a declaration 2020-03-05 18:09:33 -08:00
not-prevailing-weak-aliasee.ll
not-prevailing.ll [X86InstPrinter] Change printPCRelImm to print the target address in hexadecimal form 2020-03-26 08:28:59 -07:00
setting-dso-local.ll
symtab-elf.ll
symtab.ll
type-checked-load.ll