diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2014-06-13 12:38:00 -0700 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2014-06-13 12:38:00 -0700 |
commit | 54f1b3cf509cd889905287cb8ce6c5ae33911a21 (patch) | |
tree | e39b1a7fa04db86a8215b7f9d4656d74e394aec0 /binutils-2.25/ld/testsuite/ld-mips-elf/compressed-plt-1.s | |
parent | 2a6558a8ecfb81d75215b4ec7dc61113e12cfd5f (diff) | |
download | toolchain_binutils-54f1b3cf509cd889905287cb8ce6c5ae33911a21.tar.gz toolchain_binutils-54f1b3cf509cd889905287cb8ce6c5ae33911a21.tar.bz2 toolchain_binutils-54f1b3cf509cd889905287cb8ce6c5ae33911a21.zip |
Add upstream binutils-2.25 snapshot 4/4 2014
For MIPS -mmsa support
Change-Id: I08c4f002fa7b33dec85ed75956e6ab551bb03c96
Diffstat (limited to 'binutils-2.25/ld/testsuite/ld-mips-elf/compressed-plt-1.s')
-rw-r--r-- | binutils-2.25/ld/testsuite/ld-mips-elf/compressed-plt-1.s | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/binutils-2.25/ld/testsuite/ld-mips-elf/compressed-plt-1.s b/binutils-2.25/ld/testsuite/ld-mips-elf/compressed-plt-1.s new file mode 100644 index 00000000..aa0b497d --- /dev/null +++ b/binutils-2.25/ld/testsuite/ld-mips-elf/compressed-plt-1.s @@ -0,0 +1,62 @@ + .macro call_stub, name + .set push + .set nomips16 + .section .mips16.call.\name, "ax", @progbits + .ent __call_stub_\name + .type __call_stub_\name, @function +__call_stub_\name: + la $25, \name + jr $25 + .set pop + .endm + + # Flags to specify how a particular function is referenced + + .equ DC, 1 # Direct call from "compressed" code + .equ IC, 2 # Indirect call from "compressed" code + .equ DU, 4 # Direct call from "uncompressed" code + .equ IU, 8 # Indirect call from "uncompressed" code + .equ LO, 16 # Direct address reference (%lo) + + # A wrapper around a macro called test_one, which is defined by + # the file that includes this one. NAME is the name of a function + # that is referenced in the way described by FLAGS, an inclusive OR + # of the flags above. The wrapper filters out any functions whose + # FLAGS are not a subset of FILTER. + + .macro test_filter, name, flags + .if (\flags & filter) == \flags + test_one \name, \flags + .endif + .endm + + .macro test_all_dc, name, flags + test_filter \name, \flags + test_filter \name\()_dc, (\flags | DC) + .endm + + .macro test_all_ic, name, flags + test_all_dc \name, \flags + test_all_dc \name\()_ic, (\flags | IC) + .endm + + .macro test_all_du, name, flags + test_all_ic \name, \flags + test_all_ic \name\()_du, (\flags | DU) + .endm + + .macro test_all_iu, name, flags + test_all_du \name, \flags + test_all_du \name\()_iu, (\flags | IU) + .endm + + .macro test_all_lo, name, flags + test_all_iu \name, \flags + test_all_iu \name\()_lo, (\flags | LO) + .endm + + # Test all the combinations of interest. + + .macro test_all + test_all_lo f, 0 + .endm |