]> granicus.if.org Git - llvm/commit
[MCA] Add support for printing immedate values as hex. Also enable lexing of masm...
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Fri, 2 Aug 2019 10:38:25 +0000 (10:38 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Fri, 2 Aug 2019 10:38:25 +0000 (10:38 +0000)
commit72bac317eacd82d6befc194f15930937f4c39086
tree088c185b9f34e23ee7db76eaf3727d219be2c8ca
parentb5c77aec5492a9d98bcbb57b5216cf11452552a8
[MCA] Add support for printing immedate values as hex. Also enable lexing of masm binary and hex literals.

This patch adds a new llvm-mca flag named -print-imm-hex.

By default, the instruction printer prints immediate operands as decimals. Flag
-print-imm-hex enables the instruction printer to print those operands in hex.

This patch also adds support for MASM binary and hex literal numbers (example
0FFh, 101b).
Added tests to verify the behavior of the new flag. Tests also verify that masm
numeric literal operands are now recognized.

Differential Revision: https://reviews.llvm.org/D65588

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367671 91177308-0d34-0410-b5e6-96231b3b80d8
docs/CommandGuide/llvm-mca.rst
test/tools/llvm-mca/X86/print-imm-hex-1.s [new file with mode: 0644]
test/tools/llvm-mca/X86/print-imm-hex-2.s [new file with mode: 0644]
tools/llvm-mca/CodeRegionGenerator.cpp
tools/llvm-mca/llvm-mca.cpp