1# RUN: llvm-mc %s -arch=mips -mcpu=mips32r2 -filetype=asm | \
2# RUN:   FileCheck %s -check-prefix=ASMOUT
3
4# RUN: llvm-mc %s -arch=mips -mcpu=mips32r2 -filetype=obj -o - | \
5# RUN:   llvm-readobj -s -section-data | \
6# RUN:     FileCheck %s -check-prefix=OBJOUT
7
8# ASMOUT: .text
9# ASMOUT:        .type _local_foo,@function
10# ASMOUT:        .ent _local_foo
11# ASMOUT:_local_foo:
12# ASMOUT:        .frame $fp,16,$ra
13# ASMOUT:        .mask 0x10101010,-4
14# ASMOUT:        .fmask 0x01010101,-8
15# ASMOUT:        .end _local_foo
16# ASMOUT:        .size local_foo,
17
18# OBJOUT: Section {
19# OBJOUT:     Name: .pdr
20# OBJOUT:     Type: SHT_PROGBITS (0x1)
21# OBJOUT:     Flags [ (0xB)
22# OBJOUT:       SHF_ALLOC (0x2)
23# OBJOUT:       SHF_WRITE (0x1)
24# OBJOUT:     ]
25# OBJOUT:     Size: 64
26# OBJOUT:     SectionData (
27# OBJOUT:       0000: 00000000 10101010 FFFFFFFC 01010101
28# OBJOUT:       0010: FFFFFFF8 00000010 0000001E 0000001F
29# OBJOUT:       0020: 00000000 10101010 FFFFFFFC 01010101
30# OBJOUT:       0030: FFFFFFF8 00000010 0000001E 0000001F
31# OBJOUT:     )
32# OBJOUT:   }
33
34# We should also check if relocation information was correctly generated.
35# OBJOUT:   Section {
36# OBJOUT:     Name: .rel.pdr
37# OBJOUT:     Type: SHT_REL (0x9)
38# OBJOUT:     Flags [ (0x0)
39# OBJOUT:     ]
40# OBJOUT:     Size: 16
41# OBJOUT:     SectionData (
42# OBJOUT:       0000: 00000000 00000202 00000020 00000802
43# OBJOUT:     )
44# OBJOUT:   }
45
46.text
47        .type _local_foo,@function
48        .ent _local_foo
49_local_foo:
50        .frame $fp,16,$ra
51        .mask 0x10101010,-4
52        .fmask 0x01010101,-8
53        .end _local_foo
54        .size local_foo,.-_local_foo
55
56        .globl _global_foo
57        .type _global_foo,@function
58        .ent _global_foo
59_global_foo:
60        .frame $fp,16,$ra
61        .mask 0x10101010,-4
62        .fmask 0x01010101,-8
63        .end _global_foo
64        .size global_foo,.-_global_foo
65