| Matheus Almeida | ab5633b | 2014-03-26 15:44:18 +0000 | [diff] [blame] | 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 |
| Scott Egerton | d1aeb05 | 2016-02-15 16:11:51 +0000 | [diff] [blame] | 10 | # CHECK-ASM: .2byte 49374 |
| Matheus Almeida | ab5633b | 2014-03-26 15:44:18 +0000 | [diff] [blame] | 11 | # CHECK-ASM: .4byte label |
| 12 | # CHECK-ASM: .8byte label |
| Scott Egerton | d1aeb05 | 2016-02-15 16:11:51 +0000 | [diff] [blame] | 13 | # CHECK-ASM: .2byte label |
| Matheus Almeida | ab5633b | 2014-03-26 15:44:18 +0000 | [diff] [blame] | 14 | |
| 15 | # Checking if the data and reloations were correctly emitted |
| 16 | # CHECK-OBJ: Section { |
| Rafael Espindola | 95ee81d | 2015-05-22 21:37:13 +0000 | [diff] [blame] | 17 | # CHECK-OBJ: Name: .data |
| Matheus Almeida | ab5633b | 2014-03-26 15:44:18 +0000 | [diff] [blame] | 18 | # CHECK-OBJ: SectionData ( |
| Scott Egerton | d1aeb05 | 2016-02-15 16:11:51 +0000 | [diff] [blame] | 19 | # CHECK-OBJ: 0000: DEADC0DE DEADC0DE DEADBEEF C0DE0000 |
| Matheus Almeida | ab5633b | 2014-03-26 15:44:18 +0000 | [diff] [blame] | 20 | # CHECK-OBJ: 0010: 00000000 00000000 |
| 21 | # CHECK-OBJ: ) |
| 22 | # CHECK-OBJ: } |
| 23 | |
| 24 | # CHECK-OBJ: Section { |
| Rafael Espindola | 95ee81d | 2015-05-22 21:37:13 +0000 | [diff] [blame] | 25 | # CHECK-OBJ: Name: .rel.data |
| Matheus Almeida | ab5633b | 2014-03-26 15:44:18 +0000 | [diff] [blame] | 26 | # CHECK-OBJ: Relocations [ |
| Scott Egerton | d1aeb05 | 2016-02-15 16:11:51 +0000 | [diff] [blame] | 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 |
| Matheus Almeida | ab5633b | 2014-03-26 15:44:18 +0000 | [diff] [blame] | 30 | # CHECK-OBJ: ] |
| 31 | # CHECK-OBJ: } |
| 32 | |
| 33 | .data |
| 34 | label: |
| 35 | .word 0xdeadc0de |
| 36 | .dword 0xdeadc0dedeadbeef |
| Scott Egerton | d1aeb05 | 2016-02-15 16:11:51 +0000 | [diff] [blame] | 37 | .hword 0xc0de |
| Matheus Almeida | ab5633b | 2014-03-26 15:44:18 +0000 | [diff] [blame] | 38 | |
| 39 | .word label |
| 40 | .dword label |
| Scott Egerton | d1aeb05 | 2016-02-15 16:11:51 +0000 | [diff] [blame] | 41 | .hword label |