Open witbring opened 4 months ago
The movmskpd and movmskb is for compatibility with binutils assembler. In 64-bit mode, the instructions do write all 64 bits of the register since that's how 64-bit mode works.
lar also looks like it is compatible with binutils.
tpause and umwait are not compatible with binutils. https://godbolt.org/z/3YKo6bPeP
@llvm/issue-subscribers-backend-x86
Author: Hyungseok Kim (witbring)
Thank you for your response.
As you pointed out, there are compatibility issues with the tpause
and umwait
instructions.
However, I believe Clang should also address the syntax checker errors on lar
, movmskpd
, and pmovmskb
instructions.
This is because GAS might update their syntax checker, which could lead to compatibility issues.
However, I believe Clang should also address the syntax checker errors on
lar
,movmskpd
, andpmovmskb
instructions. This is because GAS might update their syntax checker, which could lead to compatibility issues.
But we don't want to reject code that gas accepts. That hurts people migrating from gas to clang.
I respect your opinion. So, are you planning to fix those two?
I respect your opinion. So, are you planning to fix those two?
I defer to @phoebewang. I'm not involved in X86 anymore.
Okay. Thanks.
I discovered that Clang changes register types without any warning when processing invalid assembly code. I believe Clang should more accurately verify assembly syntax.
You can reproduce the bug through godbolt. https://godbolt.org/z/WofxMjWqG