xref: /aosp_15_r20/external/llvm/test/MC/Mips/oddspreg.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc %s -arch=mips -mcpu=mips32 -mattr=+fp64 | \
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 -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-prefixes=CHECK-OBJ-ALL,CHECK-OBJ-O32
7*9880d681SAndroid Build Coastguard Worker#
8*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n32 | \
9*9880d681SAndroid Build Coastguard Worker# RUN:   FileCheck %s -check-prefix=CHECK-ASM
10*9880d681SAndroid Build Coastguard Worker#
11*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n32 -filetype=obj -o - | \
12*9880d681SAndroid Build Coastguard Worker# RUN:   llvm-readobj -sections -section-data -section-relocations - | \
13*9880d681SAndroid Build Coastguard Worker# RUN:     FileCheck %s -check-prefixes=CHECK-OBJ-ALL,CHECK-OBJ-N32
14*9880d681SAndroid Build Coastguard Worker
15*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc %s -arch=mips64 -mcpu=mips64 | \
16*9880d681SAndroid Build Coastguard Worker# RUN:   FileCheck %s -check-prefix=CHECK-ASM
17*9880d681SAndroid Build Coastguard Worker#
18*9880d681SAndroid Build Coastguard Worker# Repeat the -filetype=obj tests but this time use an empty assembly file. The
19*9880d681SAndroid Build Coastguard Worker# output should be unchanged.
20*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc /dev/null -arch=mips64 -mcpu=mips64 -filetype=obj -o - | \
21*9880d681SAndroid Build Coastguard Worker# RUN:   llvm-readobj -sections -section-data -section-relocations - | \
22*9880d681SAndroid Build Coastguard Worker# RUN:     FileCheck %s -check-prefixes=CHECK-OBJ-ALL,CHECK-OBJ-N64
23*9880d681SAndroid Build Coastguard Worker
24*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc /dev/null -arch=mips -mcpu=mips32 -mattr=+fp64 -filetype=obj -o - | \
25*9880d681SAndroid Build Coastguard Worker# RUN:   llvm-readobj -sections -section-data -section-relocations - | \
26*9880d681SAndroid Build Coastguard Worker# RUN:     FileCheck %s -check-prefixes=CHECK-OBJ-ALL,CHECK-OBJ-O32
27*9880d681SAndroid Build Coastguard Worker#
28*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc /dev/null -arch=mips64 -mcpu=mips64 -target-abi n32 -filetype=obj -o - | \
29*9880d681SAndroid Build Coastguard Worker# RUN:   llvm-readobj -sections -section-data -section-relocations - | \
30*9880d681SAndroid Build Coastguard Worker# RUN:     FileCheck %s -check-prefixes=CHECK-OBJ-ALL,CHECK-OBJ-N32
31*9880d681SAndroid Build Coastguard Worker
32*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc /dev/null -arch=mips64 -mcpu=mips64 -filetype=obj -o - | \
33*9880d681SAndroid Build Coastguard Worker# RUN:   llvm-readobj -sections -section-data -section-relocations - | \
34*9880d681SAndroid Build Coastguard Worker# RUN:     FileCheck %s -check-prefixes=CHECK-OBJ-ALL,CHECK-OBJ-N64
35*9880d681SAndroid Build Coastguard Worker
36*9880d681SAndroid Build Coastguard Worker# CHECK-ASM: .module oddspreg
37*9880d681SAndroid Build Coastguard Worker
38*9880d681SAndroid Build Coastguard Worker# Checking if the Mips.abiflags were correctly emitted.
39*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-ALL:       Section {
40*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-ALL:         Index: 5
41*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-ALL-LABEL:   Name: .MIPS.abiflags ({{[0-9]+}})
42*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-ALL:         Type: SHT_MIPS_ABIFLAGS (0x7000002A)
43*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-ALL:          Flags [ (0x2)
44*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-ALL:           SHF_ALLOC (0x2)
45*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-ALL:         ]
46*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-ALL:         Address: 0x0
47*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-ALL:         Size: 24
48*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-ALL:         Link: 0
49*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-ALL:         Info: 0
50*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-ALL:         AddressAlignment: 8
51*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-ALL:         EntrySize: 24
52*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-ALL:         Relocations [
53*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-ALL:         ]
54*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-ALL:         SectionData (
55*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-O32:           0000: 00002001 01020006 00000000 00000000  |.. .............|
56*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-O32:           0010: 00000001 00000000                    |........|
57*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-N32:           0000: 00004001 02020001 00000000 00000000  |..@.............|
58*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-N32:           0010: 00000001 00000000                    |........|
59*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-N64:           0000: 00004001 02020001 00000000 00000000  |..@.............|
60*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-N64:           0010: 00000001 00000000                    |........|
61*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-ALL:         )
62*9880d681SAndroid Build Coastguard Worker# CHECK-OBJ-ALL-LABEL: }
63*9880d681SAndroid Build Coastguard Worker
64*9880d681SAndroid Build Coastguard Worker        .module oddspreg
65*9880d681SAndroid Build Coastguard Worker        add.s $f3, $f1, $f5
66*9880d681SAndroid Build Coastguard Worker
67*9880d681SAndroid Build Coastguard Worker# FIXME: Test should include gnu_attributes directive when implemented.
68*9880d681SAndroid Build Coastguard Worker#        An explicit .gnu_attribute must be checked against the effective
69*9880d681SAndroid Build Coastguard Worker#        command line options and any inconsistencies reported via a warning.
70