]> gcc.gnu.org Git - gcc.git/commit
bpf: generate indirect calls for xBPF
authorDavid Faust <david.faust@oracle.com>
Fri, 4 Sep 2020 08:18:56 +0000 (10:18 +0200)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Fri, 4 Sep 2020 08:18:56 +0000 (10:18 +0200)
commitc3a0f5373919deff68819de1db88c04261d61a87
tree646d735c65364ba0b994032a74149ee1ed81b9e6
parente1336703f8220dcffdeddb5e19dd032c766fbb8f
bpf: generate indirect calls for xBPF

This patch updates the BPF back end to generate indirect calls via
the 'call %reg' instruction when targetting xBPF.

Additionally, the BPF ASM_SPEC is updated to pass along -mxbpf to
gas, where it is now supported.

2020-09-03  David Faust  <david.faust@oracle.com>

gcc/

* config/bpf/bpf.h (ASM_SPEC): Pass -mxbpf to gas, if specified.
* config/bpf/bpf.c (bpf_output_call): Support indirect calls in xBPF.

gcc/testsuite/

* gcc.target/bpf/xbpf-indirect-call-1.c: New test.
gcc/config/bpf/bpf.c
gcc/config/bpf/bpf.h
gcc/testsuite/gcc.target/bpf/xbpf-indirect-call-1.c [new file with mode: 0644]
This page took 0.057824 seconds and 5 git commands to generate.