aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/i386/i386-protos.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2015-11-09 01:19:59 -0800
committerRichard Henderson <rth@gcc.gnu.org>2015-11-09 01:19:59 -0800
commit16734677674ae7f58f4339fa97a91411a347e5db (patch)
tree968f69548931b685eae5707facf5b72c95bd3683 /gcc/config/i386/i386-protos.h
parentfe5f926316422c9c3bbcec1a412cd5fc14cd47d7 (diff)
downloadgcc-16734677674ae7f58f4339fa97a91411a347e5db.zip
gcc-16734677674ae7f58f4339fa97a91411a347e5db.tar.gz
gcc-16734677674ae7f58f4339fa97a91411a347e5db.tar.bz2
i386: Disallow address spaces with string insns
While cmps and movs allow a segment override of the ds:esi source, the es:edi source/destination cannot be overriden. Simplify things in the backend for now by disallowing segments for string insns entirely. * config/i386/i386.c (ix86_check_no_addr_space): New. (decide_alg): Add have_as parameter. (alg_usable_p): Likewise; disable rep algorithms if set. (ix86_expand_set_or_movmem): Notice if either MEM has a non-default address space. (ix86_expand_strlen): Likewise. * config/i386/i386.md (strmov, strset): Likewise. (*strmovdi_rex_1): Use ix86_check_no_addr_space. (*strmovsi_1, *strmovqi_1, *rep_movdi_rex64, *rep_movsi, *rep_movqi, *strsetdi_rex_1, *strsetsi_1, *strsethi_1, *strsetqi_1, *rep_stosdi_rex64, *rep_stossi, *rep_stosqi, *cmpstrnqi_nz_1, *cmpstrnqi_1, *strlenqi_1): Likewise. From-SVN: r230002
Diffstat (limited to 'gcc/config/i386/i386-protos.h')
-rw-r--r--gcc/config/i386/i386-protos.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
index 6a17ef4..5e46833 100644
--- a/gcc/config/i386/i386-protos.h
+++ b/gcc/config/i386/i386-protos.h
@@ -141,6 +141,7 @@ extern void ix86_split_ashr (rtx *, rtx, machine_mode);
extern void ix86_split_lshr (rtx *, rtx, machine_mode);
extern rtx ix86_find_base_term (rtx);
extern bool ix86_check_movabs (rtx, int);
+extern bool ix86_check_no_addr_space (rtx);
extern void ix86_split_idivmod (machine_mode, rtx[], bool);
extern rtx assign_386_stack_local (machine_mode, enum ix86_stack_slot);