aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/CommandLineTest.cpp
diff options
context:
space:
mode:
authorWeining Lu <luweining@loongson.cn>2022-10-31 09:15:29 +0800
committerWeining Lu <luweining@loongson.cn>2022-10-31 09:56:41 +0800
commite415cb1d61e798b6d69b5960a90f00518ca5008f (patch)
treedd8aa70f4e9749b3dbeb46730ac68607948a72b4 /llvm/unittests/Support/CommandLineTest.cpp
parentbe8a2b98da582d4cfd96be3b2cf561679a72bbb0 (diff)
downloadllvm-e415cb1d61e798b6d69b5960a90f00518ca5008f.zip
llvm-e415cb1d61e798b6d69b5960a90f00518ca5008f.tar.gz
llvm-e415cb1d61e798b6d69b5960a90f00518ca5008f.tar.bz2
[LoongArch] Support inline asm operand modifier 'z'
Print $zero register if operand is zero, otherwise print it normally. Clang is highly compatible [1] with GCC inline assembly extensions, allowing the same set of constraints, modifiers and operands as GCC inline assembly. This patch tries to make it compatible regarding LoongArch specific operand modifiers. GCC supports many modifiers [2], but it seems that only x86 and msp430 are documented [3][4]. I don't know if any other modifiers are being used except the 'z' in Linux [5]. [1]: https://clang.llvm.org/compatibility.html#inline-asm [2]: https://github.com/gcc-mirror/gcc/blob/master/gcc/config/loongarch/loongarch.cc#L4884-L4911 [3]: https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#x86Operandmodifiers [4]: https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#msp430Operandmodifiers [5]: https://github.com/torvalds/linux/blob/master/arch/loongarch/include/asm/cmpxchg.h#L17 Differential Revision: https://reviews.llvm.org/D136841
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
0 files changed, 0 insertions, 0 deletions