]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gas: xtensa: reuse trampoline placement code
authorMax Filippov <jcmvbkbc@gmail.com>
Mon, 13 Nov 2017 08:42:43 +0000 (00:42 -0800)
committerMax Filippov <jcmvbkbc@gmail.com>
Mon, 27 Nov 2017 23:14:48 +0000 (15:14 -0800)
commit76a493ab99d9276180db6e791f95d1d6d86d2954
tree87a026ec0dfcf483c671287b36abaa842ba4b6af
parentfe6c2f1b6409867a03dd32214679dd825f74ec48
gas: xtensa: reuse trampoline placement code

There's almost exact copy of the trampoline placement code in the
search_trampolines function that is used for jumps generated for relaxed
branch instructions. Get rid of the duplication and reuse
xg_find_best_trampoline function for that.

gas/
2017-11-27  Max Filippov  <jcmvbkbc@gmail.com>

* config/tc-xtensa.c (search_trampolines, get_best_trampoline):
Remove definitions.
(xg_find_best_trampoline_for_tinsn): New function.
(relax_frag_immed): Replace call to get_best_trampoline with a
call to xg_find_best_trampoline_for_tinsn.
* testsuite/gas/xtensa/trampoline.d: Adjust absolute addresses
as the placement of trampolines for relaxed branches has been
changed.
gas/ChangeLog
gas/config/tc-xtensa.c
gas/testsuite/gas/xtensa/trampoline.d