xref: /aosp_15_r20/external/llvm/test/MC/Mips/nooddspreg-cmdarg.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc %s -arch=mips -mcpu=mips32 -mattr=+fp64,+nooddspreg | \
2*9880d681SAndroid Build Coastguard Worker# RUN:   FileCheck %s -check-prefix=CHECK-ASM
3*9880d681SAndroid Build Coastguard Worker#
4*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc %s -arch=mips -mcpu=mips32 -mattr=+fp64,+nooddspreg -filetype=obj -o - | \
5*9880d681SAndroid Build Coastguard Worker# RUN:   llvm-readobj -sections -section-data -section-relocations - | \
6*9880d681SAndroid Build Coastguard Worker# RUN:     FileCheck %s -check-prefix=CHECK-OBJ
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Worker# RUN: not llvm-mc %s -arch=mips -mcpu=mips64 -target-abi n32 -mattr=+nooddspreg 2> %t0
9*9880d681SAndroid Build Coastguard Worker# RUN: FileCheck %s -check-prefix=INVALID < %t0
10*9880d681SAndroid Build Coastguard Worker#
11*9880d681SAndroid Build Coastguard Worker# RUN: not llvm-mc %s -arch=mips -mcpu=mips64 -target-abi n64 -mattr=+nooddspreg 2> %t0
12*9880d681SAndroid Build Coastguard Worker# RUN: FileCheck %s -check-prefix=INVALID < %t0
13*9880d681SAndroid Build Coastguard Worker#
14*9880d681SAndroid Build Coastguard Worker# CHECK-ASM-NOT: .module nooddspreg
15*9880d681SAndroid Build Coastguard Worker
16*9880d681SAndroid Build Coastguard Worker# Checking if the Mips.abiflags were correctly emitted.
17*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ:       Section {
18*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ:         Index: 5
19*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-LABEL:   Name: .MIPS.abiflags (12)
20*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ:         Type: SHT_MIPS_ABIFLAGS (0x7000002A)
21*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ:          Flags [ (0x2)
22*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ:           SHF_ALLOC (0x2)
23*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ:         ]
24*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ:         Address: 0x0
25*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ:         Size: 24
26*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ:         Link: 0
27*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ:         Info: 0
28*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ:         AddressAlignment: 8
29*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ:         EntrySize: 24
30*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ:         Relocations [
31*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ:         ]
32*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ:         SectionData (
33*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ:           0000: 00002001 01020007 00000000 00000000  |.. .............|
34*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ:           0010: 00000000 00000000                    |........|
35*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ:         )
36*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-LABEL: }
37*9880d681SAndroid Build Coastguard Worker
38*9880d681SAndroid Build Coastguard Worker# INVALID: ERROR: -mno-odd-spreg requires the O32 ABI
39*9880d681SAndroid Build Coastguard Worker
40*9880d681SAndroid Build Coastguard Worker# FIXME: Test should include gnu_attributes directive when implemented.
41*9880d681SAndroid Build Coastguard Worker#        An explicit .gnu_attribute must be checked against the effective
42*9880d681SAndroid Build Coastguard Worker#        command line options and any inconsistencies reported via a warning.
43