annotate lld/test/ELF/mips-micro-jal.s @ 192:d7606dcf6fce

Added tag llvm10 for changeset 0572611fdcc8
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 14 Dec 2020 18:01:34 +0900
parents 0572611fdcc8
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 # REQUIRES: mips
anatofuz
parents:
diff changeset
2 # Check PLT creation for microMIPS to microMIPS calls.
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 # RUN: echo "SECTIONS { \
anatofuz
parents:
diff changeset
5 # RUN: . = 0x20000; .text ALIGN(0x100) : { *(.text) } \
anatofuz
parents:
diff changeset
6 # RUN: . = 0x20300; .plt : { *(.plt) } \
anatofuz
parents:
diff changeset
7 # RUN: }" > %t.script
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
anatofuz
parents:
diff changeset
10 # RUN: -mattr=micromips %S/Inputs/mips-micro.s -o %t1eb.o
anatofuz
parents:
diff changeset
11 # RUN: ld.lld -shared -soname=teb.so -o %teb.so %t1eb.o
anatofuz
parents:
diff changeset
12 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
anatofuz
parents:
diff changeset
13 # RUN: -mattr=micromips %s -o %t2eb.o
anatofuz
parents:
diff changeset
14 # RUN: ld.lld --script %t.script -o %teb.exe %t2eb.o %teb.so
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
15 # RUN: llvm-objdump -d --mattr=micromips --no-show-raw-insn %teb.exe \
150
anatofuz
parents:
diff changeset
16 # RUN: | FileCheck --check-prefix=R2 %s
anatofuz
parents:
diff changeset
17 # RUN: llvm-readelf -A %teb.exe | FileCheck --check-prefix=PLT %s
anatofuz
parents:
diff changeset
18
anatofuz
parents:
diff changeset
19 # RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-linux \
anatofuz
parents:
diff changeset
20 # RUN: -mattr=micromips %S/Inputs/mips-micro.s -o %t1el.o
anatofuz
parents:
diff changeset
21 # RUN: ld.lld -shared -soname=tel.so -o %tel.so %t1el.o
anatofuz
parents:
diff changeset
22 # RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-linux \
anatofuz
parents:
diff changeset
23 # RUN: -mattr=micromips %s -o %t2el.o
anatofuz
parents:
diff changeset
24 # RUN: ld.lld --script %t.script -o %tel.exe %t2el.o %tel.so
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
25 # RUN: llvm-objdump -d --mattr=micromips --no-show-raw-insn %tel.exe \
150
anatofuz
parents:
diff changeset
26 # RUN: | FileCheck --check-prefix=R2 %s
anatofuz
parents:
diff changeset
27 # RUN: llvm-readelf -A %tel.exe | FileCheck --check-prefix=PLT %s
anatofuz
parents:
diff changeset
28
anatofuz
parents:
diff changeset
29 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
anatofuz
parents:
diff changeset
30 # RUN: -mattr=micromips -mcpu=mips32r6 %S/Inputs/mips-micro.s -o %t1eb.o
anatofuz
parents:
diff changeset
31 # RUN: ld.lld -shared -soname=teb.so -o %teb.so %t1eb.o
anatofuz
parents:
diff changeset
32 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
anatofuz
parents:
diff changeset
33 # RUN: -mattr=micromips -mcpu=mips32r6 %s -o %t2eb.o
anatofuz
parents:
diff changeset
34 # RUN: ld.lld --script %t.script -o %teb.exe %t2eb.o %teb.so
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
35 # RUN: llvm-objdump -d --mattr=micromips %teb.exe --no-show-raw-insn \
150
anatofuz
parents:
diff changeset
36 # RUN: | FileCheck --check-prefix=R6 %s
anatofuz
parents:
diff changeset
37
anatofuz
parents:
diff changeset
38 # RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-linux \
anatofuz
parents:
diff changeset
39 # RUN: -mattr=micromips -mcpu=mips32r6 %S/Inputs/mips-micro.s -o %t1el.o
anatofuz
parents:
diff changeset
40 # RUN: ld.lld -shared -soname=tel.so -o %tel.so %t1el.o
anatofuz
parents:
diff changeset
41 # RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-linux \
anatofuz
parents:
diff changeset
42 # RUN: -mattr=micromips -mcpu=mips32r6 %s -o %t2el.o
anatofuz
parents:
diff changeset
43 # RUN: ld.lld --script %t.script -o %tel.exe %t2el.o %tel.so
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
44 # RUN: llvm-objdump -d --mattr=micromips --no-show-raw-insn %tel.exe \
150
anatofuz
parents:
diff changeset
45 # RUN: | FileCheck --check-prefix=R6 %s
anatofuz
parents:
diff changeset
46
anatofuz
parents:
diff changeset
47 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
anatofuz
parents:
diff changeset
48 # RUN: -mattr=micromips %S/Inputs/mips-micro.s -o %t1eb.o
anatofuz
parents:
diff changeset
49 # RUN: ld.lld -shared -soname=teb.so -o %teb.so %t1eb.o
anatofuz
parents:
diff changeset
50 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
anatofuz
parents:
diff changeset
51 # RUN: %S/Inputs/mips-fpic.s -o %t-reg.o
anatofuz
parents:
diff changeset
52 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
anatofuz
parents:
diff changeset
53 # RUN: -mattr=micromips %s -o %t2eb.o
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
54 # RUN: ld.lld --script %t.script -o %teb.exe %t-reg.o %t2eb.o %teb.so
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
55 # RUN: llvm-objdump -d --mattr=micromips --no-show-raw-insn %teb.exe \
150
anatofuz
parents:
diff changeset
56 # RUN: | FileCheck --check-prefix=R2 %s
anatofuz
parents:
diff changeset
57
anatofuz
parents:
diff changeset
58 # R2: .plt:
anatofuz
parents:
diff changeset
59 # R2: 20300: addiupc $3, 52
anatofuz
parents:
diff changeset
60 # R2-NEXT: lw $25, 0($3)
anatofuz
parents:
diff changeset
61 # R2-NEXT: subu16 $2, $2, $3
anatofuz
parents:
diff changeset
62 # R2-NEXT: srl16 $2, $2, 2
anatofuz
parents:
diff changeset
63 # R2-NEXT: addiu $24, $2, -2
anatofuz
parents:
diff changeset
64 # R2-NEXT: move $15, $ra
anatofuz
parents:
diff changeset
65 # R2-NEXT: jalrs16 $25
anatofuz
parents:
diff changeset
66 # R2-NEXT: move $gp, $3
anatofuz
parents:
diff changeset
67 # R2-NEXT: nop
anatofuz
parents:
diff changeset
68 # R2-NEXT: ...
anatofuz
parents:
diff changeset
69 # R2-NEXT: 20320: addiupc $2, 28
anatofuz
parents:
diff changeset
70 # R2-NEXT: lw $25, 0($2)
anatofuz
parents:
diff changeset
71 # R2-NEXT: jr16 $25
anatofuz
parents:
diff changeset
72 # R2-NEXT: move $24, $2
anatofuz
parents:
diff changeset
73
anatofuz
parents:
diff changeset
74 # R6: .plt:
anatofuz
parents:
diff changeset
75 # R6: 20300: lapc $3, 52
anatofuz
parents:
diff changeset
76 # R6-NEXT: lw $25, 0($3)
anatofuz
parents:
diff changeset
77 # R6-NEXT: subu16 $2, $2, $3
anatofuz
parents:
diff changeset
78 # R6-NEXT: srl16 $2, $2, 2
anatofuz
parents:
diff changeset
79 # R6-NEXT: addiu $24, $2, -2
anatofuz
parents:
diff changeset
80 # R6-NEXT: move16 $15, $ra
anatofuz
parents:
diff changeset
81 # R6-NEXT: move16 $gp, $3
anatofuz
parents:
diff changeset
82 # R6-NEXT: jalr $25
anatofuz
parents:
diff changeset
83
anatofuz
parents:
diff changeset
84 # R6: 20320: lapc $2, 28
anatofuz
parents:
diff changeset
85 # R6-NEXT: lw $25, 0($2)
anatofuz
parents:
diff changeset
86 # R6-NEXT: move16 $24, $2
anatofuz
parents:
diff changeset
87 # R6-NEXT: jrc16 $25
anatofuz
parents:
diff changeset
88
anatofuz
parents:
diff changeset
89 # PLT: PLT GOT:
anatofuz
parents:
diff changeset
90 # PLT: Entries:
anatofuz
parents:
diff changeset
91 # PLT-NEXT: Address Initial Sym.Val. Type Ndx Name
anatofuz
parents:
diff changeset
92 # PLT-NEXT: 0002033c 00020301 00000000 FUNC UND foo
anatofuz
parents:
diff changeset
93 # ^ 0x20320 + 28
anatofuz
parents:
diff changeset
94
anatofuz
parents:
diff changeset
95 .text
anatofuz
parents:
diff changeset
96 .set micromips
anatofuz
parents:
diff changeset
97 .global __start
anatofuz
parents:
diff changeset
98 __start:
anatofuz
parents:
diff changeset
99 jal foo