aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2020-10-27 09:01:41 +0100
committerJan Hubicka <jh@suse.cz>2020-10-27 09:01:41 +0100
commitb53f709d92396c60d3f4ed97985137b13f853746 (patch)
treeb63e0d6f4173ab095d974d5c028bdb7e30826a67 /gcc
parent83220838dd6f7701ca264347c934b12de7703b42 (diff)
downloadgcc-b53f709d92396c60d3f4ed97985137b13f853746.zip
gcc-b53f709d92396c60d3f4ed97985137b13f853746.tar.gz
gcc-b53f709d92396c60d3f4ed97985137b13f853746.tar.bz2
Add string builtins to builtin_fnspec
* builtins.c (builtin_fnspec): Add bzero, memcmp, memcmp_eq, bcmp, strncmp, strncmp_eq, strncasecmp, rindex, strlen, strlnen, strcasecmp, strcspn, strspn, strcmp, strcmp_eq.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/builtins.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index e7d4ff3..3a3eb55 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -12960,6 +12960,15 @@ builtin_fnspec (tree callee)
return ".cO3R3";
case BUILT_IN_BCOPY:
return ".cR3O3";
+ case BUILT_IN_BZERO:
+ return ".cO2";
+ case BUILT_IN_MEMCMP:
+ case BUILT_IN_MEMCMP_EQ:
+ case BUILT_IN_BCMP:
+ case BUILT_IN_STRNCMP:
+ case BUILT_IN_STRNCMP_EQ:
+ case BUILT_IN_STRNCASECMP:
+ return ".cR3R3";
/* The following functions read memory pointed to by their
first argument. */
@@ -12987,9 +12996,13 @@ builtin_fnspec (tree callee)
return ".cR ";
case BUILT_IN_INDEX:
+ case BUILT_IN_RINDEX:
case BUILT_IN_STRCHR:
+ case BUILT_IN_STRLEN:
case BUILT_IN_STRRCHR:
return ".cR ";
+ case BUILT_IN_STRNLEN:
+ return ".cR2";
/* These read memory pointed to by the first argument.
Allocating memory does not have any side-effects apart from
@@ -13014,6 +13027,11 @@ builtin_fnspec (tree callee)
/* These read memory pointed to by the first and second arguments. */
case BUILT_IN_STRSTR:
case BUILT_IN_STRPBRK:
+ case BUILT_IN_STRCASECMP:
+ case BUILT_IN_STRCSPN:
+ case BUILT_IN_STRSPN:
+ case BUILT_IN_STRCMP:
+ case BUILT_IN_STRCMP_EQ:
return ".cR R ";
/* Freeing memory kills the pointed-to memory. More importantly
the call has to serve as a barrier for moving loads and stores