diff options
author | Cupertino Miranda <cupertino.miranda@oracle.com> | 2023-11-10 16:42:13 +0000 |
---|---|---|
committer | Cupertino Miranda <cupertino.miranda@oracle.com> | 2023-11-28 12:46:16 +0000 |
commit | 19cc5857e2cb0fb7c637a35a956f902d44286c2d (patch) | |
tree | e643bcfc9e05d0d4f6dc84f0f368ee0d21c2f40c /gcc/config/bpf/bpf.h | |
parent | 6c8f2d3a08bc013ddb31f7fccd7136751a1460ed (diff) | |
download | gcc-19cc5857e2cb0fb7c637a35a956f902d44286c2d.zip gcc-19cc5857e2cb0fb7c637a35a956f902d44286c2d.tar.gz gcc-19cc5857e2cb0fb7c637a35a956f902d44286c2d.tar.bz2 |
bpf: Forces __buildin_memcmp not to generate a call upto 1024 bytes.
This patch forces __builtin_memcmp calls upto data sizes of 1024 to
become inline in caller.
This is a requirement by BPF and it mimics the default behaviour of the
clang BPF implementation.
gcc/ChangeLog:
* config/bpf/bpf.cc (bpf_use_by_pieces_infrastructure_p): Added
function to bypass default behaviour.
* config/bpf/bpf.h (COMPARE_MAX_PIECES): Defined to 1024 bytes.
Diffstat (limited to 'gcc/config/bpf/bpf.h')
-rw-r--r-- | gcc/config/bpf/bpf.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/config/bpf/bpf.h b/gcc/config/bpf/bpf.h index 82702aa..1f177ec 100644 --- a/gcc/config/bpf/bpf.h +++ b/gcc/config/bpf/bpf.h @@ -489,6 +489,11 @@ enum reg_class locations. */ #define MOVE_MAX 8 +/* Allow upto 1024 bytes moves to occur using by_pieces + infrastructure. This mimics clang behaviour when using + __builtin_memcmp. */ +#define COMPARE_MAX_PIECES 1024 + /* An alias for the machine mode for pointers. */ #define Pmode DImode |