aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-02-16 12:20:33 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-02-16 12:20:33 +0100
commit3140b2ed036c51b9df0fda28b153ebecb4f906ec (patch)
tree81cea5780c130ecb2ea39b2cddc613799d6e31dc /gcc/builtins.h
parent1f1d52e33df1b07c3d33b9fe377691ebbf4be157 (diff)
downloadgcc-3140b2ed036c51b9df0fda28b153ebecb4f906ec.zip
gcc-3140b2ed036c51b9df0fda28b153ebecb4f906ec.tar.gz
gcc-3140b2ed036c51b9df0fda28b153ebecb4f906ec.tar.bz2
re PR rtl-optimization/66152 (suboptimal load bytes to stack)
PR rtl-optimization/66152 * builtins.h (c_readstr): Declare. * builtins.c (c_readstr): Remove forward declaration. Add null_terminated_p argument, if false, read all bytes from the string instead of stopping after '\0'. * expr.c (string_cst_read_str): New function. (store_expr): Use string_cst_read_str instead of builtin_strncpy_read_str. Try to store by pieces the whole exp_len first, and only if that fails, split it up into store by pieces followed by clear_storage. Formatting fix. * gcc.target/i386/pr66152.c: New test. From-SVN: r268957
Diffstat (limited to 'gcc/builtins.h')
-rw-r--r--gcc/builtins.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/builtins.h b/gcc/builtins.h
index 599c96e..1ffb491 100644
--- a/gcc/builtins.h
+++ b/gcc/builtins.h
@@ -103,6 +103,7 @@ struct c_strlen_data
};
extern tree c_strlen (tree, int, c_strlen_data * = NULL, unsigned = 1);
+extern rtx c_readstr (const char *, scalar_int_mode, bool = true);
extern void expand_builtin_setjmp_setup (rtx, rtx);
extern void expand_builtin_setjmp_receiver (rtx);
extern void expand_builtin_update_setjmp_buf (rtx);