From: Richard Henderson Date: Tue, 11 Feb 2003 19:44:46 +0000 (-0800) Subject: i386.c (ix86_expand_movstr): Fail if esi or edi appropriated as globals. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d0a5295aa6b3095b2a7051154c6fbe6f53615829;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index eb6a437737c..614a9b8cced 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2003-02-11 Richard Henderson + + * 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 * 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 04da441a710..c54397a755c 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 591d7ff1310..9a7173bf703 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);