diff options
author | David Faust <david.faust@oracle.com> | 2024-03-04 09:35:01 -0800 |
---|---|---|
committer | David Faust <david.faust@oracle.com> | 2024-03-04 11:48:18 -0800 |
commit | eae6b63b5b5426f943f58b5ae0bf0a6068ca8ad6 (patch) | |
tree | 83c54d59af77c09a07b8161ca1c386850e5cf02a /libgfortran/io | |
parent | aadb311c1a3712a1360a252ae21cf7f375959b5c (diff) | |
download | gcc-eae6b63b5b5426f943f58b5ae0bf0a6068ca8ad6.zip gcc-eae6b63b5b5426f943f58b5ae0bf0a6068ca8ad6.tar.gz gcc-eae6b63b5b5426f943f58b5ae0bf0a6068ca8ad6.tar.bz2 |
bpf: add inline memset expansion
Similar to memmove and memcpy, the BPF backend cannot fall back on a
library call to implement __builtin_memset, and should always expand
calls to it inline if possible.
This patch implements simple inline expansion of memset in the BPF
backend in a verifier-friendly way. Similar to memcpy and memmove, the
size must be an integer constant, as is also required by clang.
gcc/
* config/bpf/bpf-protos.h (bpf_expand_setmem): New prototype.
* config/bpf/bpf.cc (bpf_expand_setmem): New.
* config/bpf/bpf.md (setmemdi): New define_expand.
gcc/testsuite/
* gcc.target/bpf/memset-1.c: New test.
Diffstat (limited to 'libgfortran/io')
0 files changed, 0 insertions, 0 deletions