2016-07-27 00:45:00 +08:00
|
|
|
# Define a function with all "compressed" (dc, bc and ic) references.
|
ld/testsuite/
* lib/ld-lib.exp (default_ld_compile): Add a -I option for the source
directory.
* ld-mips-elf/compressed-plt-1.ld, ld-mips-elf/compressed-plt-1.s,
ld-mips-elf/compressed-plt-1-dyn.s, ld-mips-elf/compressed-plt-1a.s,
ld-mips-elf/compressed-plt-1b.s, ld-mips-elf/compressed-plt-1c.s,
ld-mips-elf/compressed-plt-1d.s, ld-mips-elf/compressed-plt-1e.s,
ld-mips-elf/compressed-plt-1-o32-se.rd,
ld-mips-elf/compressed-plt-1-o32-se.od,
ld-mips-elf/compressed-plt-1-o32-mips16-only.rd,
ld-mips-elf/compressed-plt-1-o32-mips16-only.od,
ld-mips-elf/compressed-plt-1-o32-umips-only.rd,
ld-mips-elf/compressed-plt-1-o32-umips-only.od,
ld-mips-elf/compressed-plt-1-o32-mips16.rd,
ld-mips-elf/compressed-plt-1-o32-mips16.od,
ld-mips-elf/compressed-plt-1-o32-mips16-got.rd,
ld-mips-elf/compressed-plt-1-o32-mips16-got.od,
ld-mips-elf/compressed-plt-1-o32-mips16-word.rd,
ld-mips-elf/compressed-plt-1-o32-mips16-word.od,
ld-mips-elf/compressed-plt-1-o32-umips.rd,
ld-mips-elf/compressed-plt-1-o32-umips.od,
ld-mips-elf/compressed-plt-1-o32-umips-got.rd,
ld-mips-elf/compressed-plt-1-o32-umips-got.od,
ld-mips-elf/compressed-plt-1-o32-umips-word.rd,
ld-mips-elf/compressed-plt-1-o32-umips-word.od,
ld-mips-elf/compressed-plt-1-n32-mips16.rd,
ld-mips-elf/compressed-plt-1-n32-mips16.od,
ld-mips-elf/compressed-plt-1-n32-umips.rd,
ld-mips-elf/compressed-plt-1-n32-umips.od: New tests.
* ld-mips-elf/mips-elf.exp: Run them.
2013-10-13 18:17:20 +08:00
|
|
|
|
|
|
|
.abicalls
|
|
|
|
.option pic0
|
|
|
|
|
|
|
|
.include "compressed-plt-1.s"
|
|
|
|
|
|
|
|
.macro test_one, name, types
|
|
|
|
.if (\types) & DC
|
|
|
|
jal \name
|
|
|
|
nop
|
|
|
|
.if micromips
|
|
|
|
.ifdef o32
|
|
|
|
j \name
|
|
|
|
nop
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
.endif
|
2016-07-27 00:45:00 +08:00
|
|
|
.if (\types) & BC
|
|
|
|
.if micromips
|
|
|
|
bal \name
|
|
|
|
nop
|
|
|
|
.endif
|
|
|
|
.ifdef o32
|
|
|
|
b \name
|
|
|
|
nop
|
|
|
|
.endif
|
|
|
|
.endif
|
ld/testsuite/
* lib/ld-lib.exp (default_ld_compile): Add a -I option for the source
directory.
* ld-mips-elf/compressed-plt-1.ld, ld-mips-elf/compressed-plt-1.s,
ld-mips-elf/compressed-plt-1-dyn.s, ld-mips-elf/compressed-plt-1a.s,
ld-mips-elf/compressed-plt-1b.s, ld-mips-elf/compressed-plt-1c.s,
ld-mips-elf/compressed-plt-1d.s, ld-mips-elf/compressed-plt-1e.s,
ld-mips-elf/compressed-plt-1-o32-se.rd,
ld-mips-elf/compressed-plt-1-o32-se.od,
ld-mips-elf/compressed-plt-1-o32-mips16-only.rd,
ld-mips-elf/compressed-plt-1-o32-mips16-only.od,
ld-mips-elf/compressed-plt-1-o32-umips-only.rd,
ld-mips-elf/compressed-plt-1-o32-umips-only.od,
ld-mips-elf/compressed-plt-1-o32-mips16.rd,
ld-mips-elf/compressed-plt-1-o32-mips16.od,
ld-mips-elf/compressed-plt-1-o32-mips16-got.rd,
ld-mips-elf/compressed-plt-1-o32-mips16-got.od,
ld-mips-elf/compressed-plt-1-o32-mips16-word.rd,
ld-mips-elf/compressed-plt-1-o32-mips16-word.od,
ld-mips-elf/compressed-plt-1-o32-umips.rd,
ld-mips-elf/compressed-plt-1-o32-umips.od,
ld-mips-elf/compressed-plt-1-o32-umips-got.rd,
ld-mips-elf/compressed-plt-1-o32-umips-got.od,
ld-mips-elf/compressed-plt-1-o32-umips-word.rd,
ld-mips-elf/compressed-plt-1-o32-umips-word.od,
ld-mips-elf/compressed-plt-1-n32-mips16.rd,
ld-mips-elf/compressed-plt-1-n32-mips16.od,
ld-mips-elf/compressed-plt-1-n32-umips.rd,
ld-mips-elf/compressed-plt-1-n32-umips.od: New tests.
* ld-mips-elf/mips-elf.exp: Run them.
2013-10-13 18:17:20 +08:00
|
|
|
.if (\types) & IC
|
|
|
|
lw $2, %call16(\name)($3)
|
|
|
|
.endif
|
|
|
|
.endm
|
|
|
|
|
|
|
|
.if micromips
|
|
|
|
.set micromips
|
|
|
|
.else
|
|
|
|
.set mips16
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.section .text.a, "ax", @progbits
|
|
|
|
.globl testc
|
|
|
|
.ent testc
|
|
|
|
.set noreorder
|
|
|
|
testc:
|
|
|
|
test_all
|
|
|
|
jr $31
|
|
|
|
.end testc
|