1# RUN: llvm-mc %s -arch=mips -mcpu=mips32r2 | \
2# RUN:   FileCheck %s -check-prefix=CHECK-ASM
3#
4# RUN: llvm-mc %s -arch=mips -mcpu=mips32r2 -filetype=obj -o - | \
5# RUN:   llvm-readobj -sections -section-data -section-relocations - | \
6# RUN:     FileCheck %s -check-prefix=CHECK-OBJ
7
8# CHECK-ASM: .4byte 3735929054
9# CHECK-ASM: .8byte -2401050962867405073
10# CHECK-ASM: .2byte 49374
11# CHECK-ASM: .4byte label
12# CHECK-ASM: .8byte label
13# CHECK-ASM: .2byte label
14
15# Checking if the data and reloations were correctly emitted
16# CHECK-OBJ:  Section {
17# CHECK-OBJ:    Name: .data
18# CHECK-OBJ:    SectionData (
19# CHECK-OBJ:      0000: DEADC0DE DEADC0DE DEADBEEF C0DE0000
20# CHECK-OBJ:      0010: 00000000 00000000
21# CHECK-OBJ:    )
22# CHECK-OBJ:  }
23
24# CHECK-OBJ:  Section {
25# CHECK-OBJ:    Name: .rel.data
26# CHECK-OBJ:    Relocations [
27# CHECK-OBJ:      0xE R_MIPS_32 .data 0x0
28# CHECK-OBJ:      0x12 R_MIPS_64 .data 0x0
29# CHECK-OBJ:      0x1A R_MIPS_16 .data 0x0
30# CHECK-OBJ:    ]
31# CHECK-OBJ:  }
32
33.data
34label:
35        .word 0xdeadc0de
36        .dword 0xdeadc0dedeadbeef
37        .hword 0xc0de
38
39        .word label
40        .dword label
41        .hword label
42