PowerPC64 toc optimisation for power9
authorAlan Modra <amodra@gmail.com>
Tue, 6 Dec 2016 05:36:14 +0000 (16:06 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 6 Dec 2016 07:55:14 +0000 (18:25 +1030)
commit39eeab253474493bc9477dbb2bd9c8041f05764b
tree8522cd1ea8df3cdbbc4b471a03556b39d85cc9c3
parentfc72affa6875e81fc9d495a216a8bcb34045ffcd
PowerPC64 toc optimisation for power9

Recognize power9 and a few other insns from older machines.  Fixes
linker complaints like "toc optimization is not supported for
0xf4090002 instruction".  0xf4090002 is stxsd v0,0(r9)

bfd/
* elf64-ppc.c (ok_lo_toc_insn): Add r_type param.  Recognize
lq,lfq,lxv,lxsd,lxssp,lfdp,stq,stfq,stxv,stxsd,stxssp,stfdp.
Don't match lmd and stmd.
ld/
* testsuite/ld-powerpc/tocopt7.s,
* testsuite/ld-powerpc/tocopt7.out,
* testsuite/ld-powerpc/tocopt7.d: New test.
* testsuite/ld-powerpc/tocopt8.s,
* testsuite/ld-powerpc/tocopt8.d: New test.
* testsuite/ld-powerpc/powerpc.exp: Run them.
bfd/ChangeLog
bfd/elf64-ppc.c
ld/ChangeLog
ld/testsuite/ld-powerpc/powerpc.exp
ld/testsuite/ld-powerpc/tocopt7.d [new file with mode: 0644]
ld/testsuite/ld-powerpc/tocopt7.out [new file with mode: 0644]
ld/testsuite/ld-powerpc/tocopt7.s [new file with mode: 0644]
ld/testsuite/ld-powerpc/tocopt8.d [new file with mode: 0644]
ld/testsuite/ld-powerpc/tocopt8.s [new file with mode: 0644]