i386.c (ix86_expand_movstr): Fail if esi or edi appropriated as globals.
authorRichard Henderson <rth@redhat.com>
Tue, 11 Feb 2003 19:44:46 +0000 (11:44 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 11 Feb 2003 19:44:46 +0000 (11:44 -0800)
        * 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

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/i386.md

index eb6a437737cdca4eea802e284eaa27f08bc9672d..614a9b8cced4644de092950f42cf2ebfb03e1ecc 100644 (file)
@@ -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.
index 04da441a7109d99ab22727f9980a08b682e90be6..c54397a755cf38e9e388a00f84308584aeba3c66 100644 (file)
@@ -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;
index 591d7ff13103d288ac6b394748dd3806a9bfe6a5..9a7173bf7039e8fd058e6d392fc3e57341c59dd3 100644 (file)
 {
   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);