aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadbackward.c
diff options
context:
space:
mode:
authorDavid Faust <david.faust@oracle.com>2021-09-08 10:26:15 -0700
committerDavid Faust <david.faust@oracle.com>2021-09-10 09:06:58 -0700
commit5b2ab1d35e41528ea844c6f5ee030f8e032f4c18 (patch)
tree3db086072fed1cfcbd481e7c67fec2a661548741 /gcc/tree-ssa-threadbackward.c
parent4f0f696fea17cd91b184181abcf596df0e857304 (diff)
downloadgcc-5b2ab1d35e41528ea844c6f5ee030f8e032f4c18.zip
gcc-5b2ab1d35e41528ea844c6f5ee030f8e032f4c18.tar.gz
gcc-5b2ab1d35e41528ea844c6f5ee030f8e032f4c18.tar.bz2
bpf: add -mcpu and related feature options
New instructions have been added over time to the eBPF ISA, but previously there has been no good method to select which version to target in GCC. This patch adds the following options to the BPF backend: -mcpu={v1, v2, v3} Select which version of the eBPF ISA to target. This enables or disables generation of certain instructions. The default is v3. -mjmpext Enable extra conditional branch instructions. Enabled for CPU v2 and above. -mjmp32 Enable 32-bit jump/branch instructions. Enabled for CPU v3 and above. -malu32 Enable 32-bit ALU instructions. Enabled for CPU v3 and above. gcc/ChangeLog: * config/bpf/bpf-opts.h (bpf_isa_version): New enum. * config/bpf/bpf-protos.h (bpf_expand_cbranch): New. * config/bpf/bpf.c (bpf_option_override): Handle -mcpu option. (bpf_expand_cbranch): New function. * config/bpf/bpf.md (AM mode iterator): Conditionalize support for SI mode. (zero_extendsidi2): Only use mov32 instruction if it is available. (SIM mode iterator): Conditionalize support for SI mode. (JM mode iterator): New. (cbranchdi4): Update name, use new JM iterator. Use bpf_expand_cbranch. (*branch_on_di): Update name, use new JM iterator. * config/bpf/bpf.opt: (mjmpext): New option. (malu32): Likewise. (mjmp32): Likewise. (mcpu): Likewise. (bpf_isa): New enum.
Diffstat (limited to 'gcc/tree-ssa-threadbackward.c')
0 files changed, 0 insertions, 0 deletions