aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python
diff options
context:
space:
mode:
authorDavid Faust <david.faust@oracle.com>2024-04-25 11:40:31 -0700
committerDavid Faust <david.faust@oracle.com>2024-04-25 13:16:34 -0700
commitdffb4a0784f401c2aa20446abb651a4e19f34a44 (patch)
treeeee62fd09beed5d19910f2ee60ef213345edb382 /gdb/testsuite/gdb.python
parentd3c2603167baf9f6fea006f8b747b8186f89b177 (diff)
downloadbinutils-dffb4a0784f401c2aa20446abb651a4e19f34a44.zip
binutils-dffb4a0784f401c2aa20446abb651a4e19f34a44.tar.gz
binutils-dffb4a0784f401c2aa20446abb651a4e19f34a44.tar.bz2
bpf: fix calculation when deciding to relax branch
In certain cases we were calculating the jump displacement incorrectly when deciding whether to relax a branch. This meant for some branches, such as a very long backwards conditional branch, relaxation was not done when it should have been. The result was to error later, because the actual jump displacement was too large to fit in the original instruction. This patch fixes up the displacement calculation so that those branches are correctly relaxed and no longer result in an error. In addition, it changes md_convert_frag to install fixups for the JAL instructions in the resulting relaxations rather than encoding the displacement value directly. gas/ * config/tc-bpf.c (relaxed_branch_length): Correct displacement calculation when relaxing. (md_convert_frag): Likewise. Install fixups for JAL instructions resulting from relaxation. * testsuite/gas/bpf/jump-relax-ja-be.d: Correct and expand test. * testsuite/gas/bpf/jump-relax-ja.d: Likewise. * testsuite/gas/bpf/jump-relax-ja.s: Likewise. * testsuite/gas/bpf/jump-relax-jump-be.d: Likewise. * testsuite/gas/bpf/jump-relax-jump.d: Likewise. * testsuite/gas/bpf/jump-relax-jump.s: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.python')
0 files changed, 0 insertions, 0 deletions