[PATCH] D76580: [X86InstPrinter] Change printPCRelImm to print the target address in hexadecimal form
Andrea Di Biagio via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 24 11:17:01 PDT 2020
andreadb added inline comments.
================
Comment at: llvm/test/tools/llvm-mca/X86/show-encoding.s:58
# NORMAL-NEXT: 1 1 0.50 cmpl %r8d, %esi
-# NORMAL-NEXT: 1 1 0.50 jl -90
+# NORMAL-NEXT: 1 1 0.50 jl 0xffffffffffffffa6
----------------
I find the `jl 0xffffffffffffffa6` less readable than the old `jl -90` to be honest.
For cases like this where the address of the next instruction is unknown (and therefore set to zero), I suggest that we fall back to the old behavior.
This case in is particularly annoying here because the Imm value is negative.
Note that this is quite a common pattern for code snippets processed by mca.
The branch at the end of a mca code snippet is often a backedge.
I don't know the motivations for this change. However, can we at least avoid to change the value if the PC value is unknown? Just an idea.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76580/new/
https://reviews.llvm.org/D76580
More information about the llvm-commits
mailing list