diff options
author | Richard Henderson <rth@redhat.com> | 2003-02-11 11:44:46 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2003-02-11 11:44:46 -0800 |
commit | d0a5295aa6b3095b2a7051154c6fbe6f53615829 (patch) | |
tree | 15c128598d110523e650af312fce74e4fa10381c /gcc | |
parent | 9672132ffd55072c56aec4bffcce572bb4557c05 (diff) | |
download | gcc-d0a5295aa6b3095b2a7051154c6fbe6f53615829.zip gcc-d0a5295aa6b3095b2a7051154c6fbe6f53615829.tar.gz gcc-d0a5295aa6b3095b2a7051154c6fbe6f53615829.tar.bz2 |
i386.c (ix86_expand_movstr): Fail if esi or edi appropriated as globals.
* config/i386/i386.c (ix86_expand_movstr): Fail if esi or edi
appropriated as globals.
(ix86_expand_clrstr): Similarly.
* config/i386/i386.md (cmpstrsi): Similarly.
From-SVN: r62710
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 9 | ||||
-rw-r--r-- | gcc/config/i386/i386.md | 4 |
3 files changed, 19 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index eb6a437..614a9b8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2003-02-11 Richard Henderson <rth@redhat.com> + + * config/i386/i386.c (ix86_expand_movstr): Fail if esi or edi + appropriated as globals. + (ix86_expand_clrstr): Similarly. + * config/i386/i386.md (cmpstrsi): Similarly. + 2003-02-11 Kazu Hirata <kazu@cs.umass.edu> * config/h8300/h8300.md (a peephole2): Add a case of 255. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 04da441..c54397a 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -10767,10 +10767,13 @@ ix86_expand_movstr (dst, src, count_exp, align_exp) unsigned HOST_WIDE_INT count = 0; rtx insns; - if (GET_CODE (align_exp) == CONST_INT) align = INTVAL (align_exp); + /* Can't use any of this if the user has appropriated esi or edi. */ + if (global_regs[4] || global_regs[5]) + return 0; + /* This simple hack avoids all inlining code and simplifies code below. */ if (!TARGET_ALIGN_STRINGOPS) align = 64; @@ -11005,6 +11008,10 @@ ix86_expand_clrstr (src, count_exp, align_exp) if (GET_CODE (align_exp) == CONST_INT) align = INTVAL (align_exp); + /* Can't use any of this if the user has appropriated esi. */ + if (global_regs[4]) + return 0; + /* This simple hack avoids all inlining code and simplifies code below. */ if (!TARGET_ALIGN_STRINGOPS) align = 32; diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 591d7ff..9a7173b 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -16222,6 +16222,10 @@ { rtx addr1, addr2, out, outlow, count, countreg, align; + /* Can't use this if the user has appropriated esi or edi. */ + if (global_regs[4] || global_regs[5]) + FAIL; + out = operands[0]; if (GET_CODE (out) != REG) out = gen_reg_rtx (SImode); |