aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/IR/DominatorTreeTest.cpp
diff options
context:
space:
mode:
authorShengchen Kan <shengchen.kan@intel.com>2023-02-16 21:17:17 +0800
committerShengchen Kan <shengchen.kan@intel.com>2023-02-17 09:53:54 +0800
commitdf277ec67efd1bec3aa2fa8b02d84db0ea8b2f1c (patch)
tree00a37d00d427cf14c36fbd95305cc95928c62d95 /llvm/unittests/IR/DominatorTreeTest.cpp
parent7495a2e51bff6303fdb8f6113510012028e2d9bb (diff)
downloadllvm-df277ec67efd1bec3aa2fa8b02d84db0ea8b2f1c.zip
llvm-df277ec67efd1bec3aa2fa8b02d84db0ea8b2f1c.tar.gz
llvm-df277ec67efd1bec3aa2fa8b02d84db0ea8b2f1c.tar.bz2
[X86][MC] Fix the bug of -output-asm-variant=1 for intel syntax
Before this patch ``` $ echo "leal (,%r15), %eax" | llvm-mc --show-encoding --output-asm-variant=1 lea eax, [r15] # encoding: [0x42,0x8d,0x04,0x3d,0x00,0x00,0x00,0x00] $ echo "lea eax, [r15]" | llvm-mc --show-encoding -x86-asm-syntax=intel --output-asm-variant=1 lea eax, [r15] # encoding: [0x41,0x8d,0x07] ``` MC printed the register r15 as a base in intel syntax even when it's an index. Then we got a different encoding by using the assembly from the output of the first command. I believe the behavior is too weird to be called a feature. After this patch, we get ``` $ echo "leal (,%r15), %eax" | llvm-mc --show-encoding --output-asm-variant=1 lea eax, [1*r15] # encoding: [0x42,0x8d,0x04,0x3d,0x00,0x00,0x00,0x00] ``` Reviewed By: RKSimon, pengfei, MaskRay Differential Revision: https://reviews.llvm.org/D144183
Diffstat (limited to 'llvm/unittests/IR/DominatorTreeTest.cpp')
0 files changed, 0 insertions, 0 deletions