File: reloc-directive.s

package info (click to toggle)
llvm-toolchain-6.0 1%3A6.0.1-10
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 598,080 kB
  • sloc: cpp: 3,046,253; ansic: 595,057; asm: 271,965; python: 128,926; objc: 106,554; sh: 21,906; lisp: 10,191; pascal: 6,094; ml: 5,544; perl: 5,265; makefile: 2,227; cs: 2,027; xml: 686; php: 212; csh: 117
file content (53 lines) | stat: -rw-r--r-- 2,264 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# RUN: llvm-mc -triple mips-unknown-linux < %s -show-encoding -target-abi=o32 \
# RUN:     | FileCheck -check-prefix=ASM %s
# RUN: llvm-mc -triple mips64-unknown-linux < %s -show-encoding -target-abi=n32 \
# RUN:     | FileCheck -check-prefix=ASM %s
# RUN: llvm-mc -triple mips64-unknown-linux < %s -show-encoding -target-abi=n64 \
# RUN:     | FileCheck -check-prefix=ASM %s
# RUN: llvm-mc -triple mips-unknown-linux < %s -show-encoding -target-abi=o32 \
# RUN:     -filetype=obj | llvm-readobj -sections -section-data -r | \
# RUN:     FileCheck -check-prefix=OBJ-O32 %s
# RUN: llvm-mc -triple mips64-unknown-linux < %s -show-encoding -target-abi=n32 \
# RUN:     -filetype=obj | llvm-readobj -sections -section-data -r | \
# RUN:     FileCheck -check-prefix=OBJ-N32 %s
# RUN: llvm-mc -triple mips64-unknown-linux < %s -show-encoding -target-abi=n64 \
# RUN:     -filetype=obj | llvm-readobj -sections -section-data -r | \
# RUN:     FileCheck -check-prefix=OBJ-N64 %s
	.text
foo:
	.reloc 4, R_MIPS_NONE, foo   # ASM: .reloc 4, R_MIPS_NONE, foo
	.reloc 0, R_MIPS_NONE, foo+4 # ASM: .reloc 0, R_MIPS_NONE, foo+4
	.reloc 8, R_MIPS_32, foo+8   # ASM: .reloc 8, R_MIPS_32, foo+8
	nop
	nop
	nop
	.reloc 12, R_MIPS_NONE       # ASM: .reloc 12, R_MIPS_NONE{{$}}
        nop

# OBJ-O32-LABEL: Name: .text
# OBJ-O32:       0000: 00000000 00000000 00000008
# OBJ-O32-LABEL: }
# OBJ-O32-LABEL: Relocations [
# OBJ-O32:       0x0 R_MIPS_NONE .text 0x0
# OBJ-O32:       0x4 R_MIPS_NONE .text 0x0
# OBJ-O32:       0x8 R_MIPS_32 .text 0x0
# OBJ-O32:       0xC R_MIPS_NONE -   0x0

# OBJ-N32-LABEL: Name: .text
# OBJ-N32:       0000: 00000000 00000000 00000000
# OBJ-N32-LABEL: }
# OBJ-N32-LABEL: Relocations [

# OBJ-N32:       0x4 R_MIPS_NONE .text 0x0
# OBJ-N32:       0x0 R_MIPS_NONE .text 0x4
# OBJ-N32:       0x8 R_MIPS_32   .text 0x8
# OBJ-N32:       0xC R_MIPS_NONE -     0x0

# OBJ-N64-LABEL: Name: .text
# OBJ-N64:       0000: 00000000 00000000 00000000
# OBJ-N64-LABEL: }
# OBJ-N64-LABEL: Relocations [
# OBJ-N64:       0x4 R_MIPS_NONE/R_MIPS_NONE/R_MIPS_NONE .text 0x0
# OBJ-N64:       0x0 R_MIPS_NONE/R_MIPS_NONE/R_MIPS_NONE .text 0x4
# OBJ-N64:       0x8 R_MIPS_32/R_MIPS_NONE/R_MIPS_NONE .text 0x8
# OBJ-N64:       0xC R_MIPS_NONE/R_MIPS_NONE/R_MIPS_NONE -   0x0