Linux LoongArch port [1] uses `-msoft-float` (implies no FPU) in its `cflags` while it also uses floating-point insns in asm sources [2]. GAS allows this usage while IAS currently does not. This patch removes `AssemblerPredicate`s for floating-point insns so that to make IAS compitable with GAS. Similarly, also remove `AssemblerPredicate`s for other ISA extensions, i.e. lsx/las/lvz/lbt. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/loongarch/Makefile?h=v6.4-rc1#n49 [2]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/loongarch/kernel/fpu.S?h=v6.4-rc1#n29 Reviewed By: xen0n, hev Differential Revision: https://reviews.llvm.org/D150196
40 lines
1.2 KiB
ArmAsm
40 lines
1.2 KiB
ArmAsm
# RUN: llvm-mc %s --triple=loongarch32 --show-encoding \
|
|
# RUN: | FileCheck --check-prefixes=ASM-AND-OBJ,ASM %s
|
|
# RUN: llvm-mc %s --triple=loongarch64 --show-encoding --defsym=LA64=1 \
|
|
# RUN: | FileCheck --check-prefixes=ASM-AND-OBJ,ASM,ASM-AND-OBJ64,ASM64 %s
|
|
# RUN: llvm-mc %s --triple=loongarch32 --filetype=obj \
|
|
# RUN: | llvm-objdump -d - \
|
|
# RUN: | FileCheck --check-prefix=ASM-AND-OBJ %s
|
|
# RUN: llvm-mc %s --triple=loongarch64 --filetype=obj --defsym=LA64=1 \
|
|
# RUN: | llvm-objdump -d - \
|
|
# RUN: | FileCheck --check-prefixes=ASM-AND-OBJ,ASM-AND-OBJ64 %s
|
|
|
|
## Support for the 'D' extension implies support for 'F'
|
|
# ASM-AND-OBJ: fmov.s $ft5, $ft15
|
|
# ASM: encoding: [0xed,0x96,0x14,0x01]
|
|
fmov.s $ft5, $ft15
|
|
|
|
# ASM-AND-OBJ: fmov.d $fs6, $ft1
|
|
# ASM: encoding: [0x3e,0x99,0x14,0x01]
|
|
fmov.d $fs6, $ft1
|
|
|
|
# ASM-AND-OBJ: fsel $ft10, $ft12, $ft13, $fcc4
|
|
# ASM: encoding: [0x92,0x56,0x02,0x0d]
|
|
fsel $ft10, $ft12, $ft13, $fcc4
|
|
|
|
# ASM-AND-OBJ64: movgr2frh.w $ft15, $s3
|
|
# ASM64: encoding: [0x57,0xaf,0x14,0x01]
|
|
movgr2frh.w $ft15, $s3
|
|
|
|
.ifdef LA64
|
|
|
|
# ASM-AND-OBJ64: movgr2fr.d $fs6, $a7
|
|
# ASM64: encoding: [0x7e,0xa9,0x14,0x01]
|
|
movgr2fr.d $fs6, $a7
|
|
|
|
# ASM-AND-OBJ64: movfr2gr.d $s3, $ft9
|
|
# ASM64: encoding: [0x3a,0xba,0x14,0x01]
|
|
movfr2gr.d $s3, $ft9
|
|
|
|
.endif
|