This change is necessary to set correct EFlags according to the options (-m*-float and -mabi=) passed to clang when input is assembly. Note: `-mabi=` is not documented by `as`. ``` $ as --version GNU assembler (GNU Binutils) 2.40.50.20230316 ... $ as --target-help LARCH options: ``` But we can see gcc invokes `as` and passes the `-mabi=` option when compiling C or assembly. ``` $ gcc -c a.c -v 2>&1 -msoft-float | grep "as -v" as -v -mabi=lp64s -o a.o /tmp/ccFrxzZi.s $ gcc -c a.s -v 2>&1 -msoft-float | grep "as -v" as -v -mabi=lp64s -o a.o a.s ``` Reviewed By: xen0n Differential Revision: https://reviews.llvm.org/D150537
16 lines
688 B
ArmAsm
16 lines
688 B
ArmAsm
/// This file checks options are correctly passed to as for LoongArch targets.
|
|
|
|
/// Check `-mabi`.
|
|
// RUN: %clang --target=loongarch64 -### -fno-integrated-as -c %s 2>&1 | \
|
|
// RUN: FileCheck -DABI=lp64d --check-prefix=ABI %s
|
|
// RUN: %clang --target=loongarch64 -mabi=lp64d -### -fno-integrated-as -c %s 2>&1 | \
|
|
// RUN: FileCheck -DABI=lp64d --check-prefix=ABI %s
|
|
// RUN: %clang --target=loongarch64 -mabi=lp64f -### -fno-integrated-as -c %s 2>&1 | \
|
|
// RUN: FileCheck -DABI=lp64f --check-prefix=ABI %s
|
|
// RUN: %clang --target=loongarch64 -mabi=lp64s -### -fno-integrated-as -c %s 2>&1 | \
|
|
// RUN: FileCheck -DABI=lp64s --check-prefix=ABI %s
|
|
|
|
// ALL: as
|
|
|
|
// ABI: "-mabi=[[ABI]]"
|