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