aboutsummaryrefslogtreecommitdiff
path: root/gcc/graphite-poly.c
diff options
context:
space:
mode:
authorJose E. Marchesi <jose.marchesi@oracle.com>2020-09-14 20:35:22 +0200
committerJose E. Marchesi <jose.marchesi@oracle.com>2020-09-14 20:55:13 +0200
commit5bcc0fa05ef713594f6c6d55d5c837e13a9c9803 (patch)
tree336921426970c02b302f8df7f7e68c5157d364b6 /gcc/graphite-poly.c
parent0a3e6e975abd2b19fc12da7e5430e2a05e92ebcc (diff)
downloadgcc-5bcc0fa05ef713594f6c6d55d5c837e13a9c9803.zip
gcc-5bcc0fa05ef713594f6c6d55d5c837e13a9c9803.tar.gz
gcc-5bcc0fa05ef713594f6c6d55d5c837e13a9c9803.tar.bz2
bpf: use the expected instruction for NOPs
The BPF ISA doesn't have a no-operation instruction, but in practice the Linux kernel verifier performs some optimizations that rely on these instructions to be encoded in a particular way. As it turns out, we were using the "wrong" instruction in GCC. This patch makes GCC to generate the expected instruction for NOP (a `ja 0') and also adds a test to make sure this is the case. Tested in bpf-unknown-none targets. 2020-09-14 Jose E. Marchesi <jose.marchesi@oracle.com> gcc/ * config/bpf/bpf.md ("nop"): Re-define as `ja 0'. gcc/testsuite/ * gcc.target/bpf/nop-1.c: New test.
Diffstat (limited to 'gcc/graphite-poly.c')
0 files changed, 0 insertions, 0 deletions