2019-02-19 18:36:58 +08:00
|
|
|
# REQUIRES: mips
|
|
|
|
# Check various cases of microMIPS - regular code cross-calls.
|
|
|
|
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
|
|
|
|
# RUN: -mattr=micromips %s -o %t-eb.o
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
|
|
|
|
# RUN: -position-independent -mattr=micromips \
|
|
|
|
# RUN: %S/Inputs/mips-micro.s -o %t-eb-pic.o
|
|
|
|
# RUN: ld.lld -o %t-eb.exe %t-eb.o %t-eb-pic.o
|
2020-03-16 08:47:44 +08:00
|
|
|
# RUN: llvm-objdump -d -t --mattr=-micromips \
|
2019-09-10 06:04:20 +08:00
|
|
|
# RUN: --no-show-raw-insn --print-imm-hex %t-eb.exe \
|
2021-02-02 12:52:33 +08:00
|
|
|
# RUN: | FileCheck --check-prefix=REG %s
|
2020-03-16 08:47:44 +08:00
|
|
|
# RUN: llvm-objdump -d -t --mattr=+micromips \
|
2019-09-10 06:04:20 +08:00
|
|
|
# RUN: --no-show-raw-insn --print-imm-hex %t-eb.exe \
|
2021-02-02 12:52:33 +08:00
|
|
|
# RUN: | FileCheck --check-prefix=MICRO %s
|
2019-02-19 18:36:58 +08:00
|
|
|
|
[llvm-objdump] Further rearrange llvm-objdump sections for compatability
Summary:
rL371826 rearranged some output from llvm-objdump for GNU objdump compatability, but there still seem to be some more.
I think this rearrangement is a little closer. Overview of the ordering which matches GNU objdump:
* Archive headers
* File headers
* Section headers
* Symbol table
* Dwarf debugging
* Relocations (if `--disassemble` is not used)
* Section contents
* Disassembly
Reviewers: jhenderson, justice_adams, grimar, ychen, espindola
Reviewed By: jhenderson
Subscribers: aprantl, emaste, arichardson, jrtc27, atanasyan, seiya, llvm-commits, MaskRay
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68066
llvm-svn: 373671
2019-10-04 06:01:08 +08:00
|
|
|
# REG: {{0*}}[[FOOT:[0-9a-f]+]] l F .text 0000000e 0x80 __microLA25Thunk_foo
|
2020-03-05 09:19:18 +08:00
|
|
|
# REG: {{0*}}[[MIC:[0-9a-f]+]] g .text 00000000 0x80 micro
|
2021-02-14 02:32:27 +08:00
|
|
|
# REG: {{0*}}[[BAR:[0-9a-f]+]] g F .text 00000000 bar
|
[llvm-objdump] Further rearrange llvm-objdump sections for compatability
Summary:
rL371826 rearranged some output from llvm-objdump for GNU objdump compatability, but there still seem to be some more.
I think this rearrangement is a little closer. Overview of the ordering which matches GNU objdump:
* Archive headers
* File headers
* Section headers
* Symbol table
* Dwarf debugging
* Relocations (if `--disassemble` is not used)
* Section contents
* Disassembly
Reviewers: jhenderson, justice_adams, grimar, ychen, espindola
Reviewed By: jhenderson
Subscribers: aprantl, emaste, arichardson, jrtc27, atanasyan, seiya, llvm-commits, MaskRay
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68066
llvm-svn: 373671
2019-10-04 06:01:08 +08:00
|
|
|
|
2020-03-06 06:18:38 +08:00
|
|
|
# REG: <__start>:
|
[llvm-objdump] Further rearrange llvm-objdump sections for compatability
Summary:
rL371826 rearranged some output from llvm-objdump for GNU objdump compatability, but there still seem to be some more.
I think this rearrangement is a little closer. Overview of the ordering which matches GNU objdump:
* Archive headers
* File headers
* Section headers
* Symbol table
* Dwarf debugging
* Relocations (if `--disassemble` is not used)
* Section contents
* Disassembly
Reviewers: jhenderson, justice_adams, grimar, ychen, espindola
Reviewed By: jhenderson
Subscribers: aprantl, emaste, arichardson, jrtc27, atanasyan, seiya, llvm-commits, MaskRay
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68066
llvm-svn: 373671
2019-10-04 06:01:08 +08:00
|
|
|
# REG-NEXT: jalx 0x[[MIC]] <micro>
|
2019-09-10 06:04:20 +08:00
|
|
|
# REG-NEXT: nop
|
[llvm-objdump] Further rearrange llvm-objdump sections for compatability
Summary:
rL371826 rearranged some output from llvm-objdump for GNU objdump compatability, but there still seem to be some more.
I think this rearrangement is a little closer. Overview of the ordering which matches GNU objdump:
* Archive headers
* File headers
* Section headers
* Symbol table
* Dwarf debugging
* Relocations (if `--disassemble` is not used)
* Section contents
* Disassembly
Reviewers: jhenderson, justice_adams, grimar, ychen, espindola
Reviewed By: jhenderson
Subscribers: aprantl, emaste, arichardson, jrtc27, atanasyan, seiya, llvm-commits, MaskRay
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68066
llvm-svn: 373671
2019-10-04 06:01:08 +08:00
|
|
|
# REG-NEXT: jalx 0x[[FOOT]] <__microLA25Thunk_foo>
|
2019-02-19 18:36:58 +08:00
|
|
|
|
2020-03-06 06:18:38 +08:00
|
|
|
# REG: <__LA25Thunk_bar>:
|
2019-09-10 06:04:20 +08:00
|
|
|
# REG-NEXT: lui $25, 0x2
|
[llvm-objdump] Further rearrange llvm-objdump sections for compatability
Summary:
rL371826 rearranged some output from llvm-objdump for GNU objdump compatability, but there still seem to be some more.
I think this rearrangement is a little closer. Overview of the ordering which matches GNU objdump:
* Archive headers
* File headers
* Section headers
* Symbol table
* Dwarf debugging
* Relocations (if `--disassemble` is not used)
* Section contents
* Disassembly
Reviewers: jhenderson, justice_adams, grimar, ychen, espindola
Reviewed By: jhenderson
Subscribers: aprantl, emaste, arichardson, jrtc27, atanasyan, seiya, llvm-commits, MaskRay
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68066
llvm-svn: 373671
2019-10-04 06:01:08 +08:00
|
|
|
# REG-NEXT: j 0x[[BAR]] <bar>
|
|
|
|
|
|
|
|
# MICRO: {{0*}}[[BART:[0-9a-f]+]] l F .text 00000010 __LA25Thunk_bar
|
2020-03-05 09:19:18 +08:00
|
|
|
# MICRO: {{0*}}[[START:[0-9a-f]+]] g .text 00000000 __start
|
[llvm-objdump] Further rearrange llvm-objdump sections for compatability
Summary:
rL371826 rearranged some output from llvm-objdump for GNU objdump compatability, but there still seem to be some more.
I think this rearrangement is a little closer. Overview of the ordering which matches GNU objdump:
* Archive headers
* File headers
* Section headers
* Symbol table
* Dwarf debugging
* Relocations (if `--disassemble` is not used)
* Section contents
* Disassembly
Reviewers: jhenderson, justice_adams, grimar, ychen, espindola
Reviewed By: jhenderson
Subscribers: aprantl, emaste, arichardson, jrtc27, atanasyan, seiya, llvm-commits, MaskRay
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68066
llvm-svn: 373671
2019-10-04 06:01:08 +08:00
|
|
|
# MICRO: {{0*}}[[FOO:[0-9a-f]+]] g F .text 00000000 0x80 foo
|
2019-02-19 18:36:58 +08:00
|
|
|
|
2020-03-06 06:18:38 +08:00
|
|
|
# MICRO: <micro>:
|
[llvm-objdump] Further rearrange llvm-objdump sections for compatability
Summary:
rL371826 rearranged some output from llvm-objdump for GNU objdump compatability, but there still seem to be some more.
I think this rearrangement is a little closer. Overview of the ordering which matches GNU objdump:
* Archive headers
* File headers
* Section headers
* Symbol table
* Dwarf debugging
* Relocations (if `--disassemble` is not used)
* Section contents
* Disassembly
Reviewers: jhenderson, justice_adams, grimar, ychen, espindola
Reviewed By: jhenderson
Subscribers: aprantl, emaste, arichardson, jrtc27, atanasyan, seiya, llvm-commits, MaskRay
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68066
llvm-svn: 373671
2019-10-04 06:01:08 +08:00
|
|
|
# MICRO-NEXT: jalx 0x[[START]]
|
2019-09-10 06:04:20 +08:00
|
|
|
# MICRO-NEXT: nop
|
[llvm-objdump] Further rearrange llvm-objdump sections for compatability
Summary:
rL371826 rearranged some output from llvm-objdump for GNU objdump compatability, but there still seem to be some more.
I think this rearrangement is a little closer. Overview of the ordering which matches GNU objdump:
* Archive headers
* File headers
* Section headers
* Symbol table
* Dwarf debugging
* Relocations (if `--disassemble` is not used)
* Section contents
* Disassembly
Reviewers: jhenderson, justice_adams, grimar, ychen, espindola
Reviewed By: jhenderson
Subscribers: aprantl, emaste, arichardson, jrtc27, atanasyan, seiya, llvm-commits, MaskRay
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68066
llvm-svn: 373671
2019-10-04 06:01:08 +08:00
|
|
|
# MICRO-NEXT: jalx 0x[[BART]]
|
2019-02-19 18:36:58 +08:00
|
|
|
|
2020-03-06 06:18:38 +08:00
|
|
|
# MICRO: <__microLA25Thunk_foo>:
|
2019-09-10 06:04:20 +08:00
|
|
|
# MICRO-NEXT: lui $25, 0x2
|
[llvm-objdump] Further rearrange llvm-objdump sections for compatability
Summary:
rL371826 rearranged some output from llvm-objdump for GNU objdump compatability, but there still seem to be some more.
I think this rearrangement is a little closer. Overview of the ordering which matches GNU objdump:
* Archive headers
* File headers
* Section headers
* Symbol table
* Dwarf debugging
* Relocations (if `--disassemble` is not used)
* Section contents
* Disassembly
Reviewers: jhenderson, justice_adams, grimar, ychen, espindola
Reviewed By: jhenderson
Subscribers: aprantl, emaste, arichardson, jrtc27, atanasyan, seiya, llvm-commits, MaskRay
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68066
llvm-svn: 373671
2019-10-04 06:01:08 +08:00
|
|
|
# MICRO-NEXT: j 0x[[FOO]] <foo>
|
2019-02-19 18:36:58 +08:00
|
|
|
|
|
|
|
.text
|
|
|
|
.set nomicromips
|
|
|
|
.global __start
|
|
|
|
__start:
|
|
|
|
jal micro
|
|
|
|
jal foo
|
|
|
|
|
|
|
|
.set micromips
|
|
|
|
.global micro
|
|
|
|
micro:
|
|
|
|
jal __start
|
|
|
|
jal bar
|