diff options
author | Nathan Froyd <froydnj@codesourcery.com> | 2007-10-12 21:21:28 +0000 |
---|---|---|
committer | Nathan Froyd <froydnj@gcc.gnu.org> | 2007-10-12 21:21:28 +0000 |
commit | 8ec12e355955a24a13bb0d0bf071fa20aa0d8a5f (patch) | |
tree | cb8170acccd76cdc2bbab4e13aa487d7c7bd0830 /gcc | |
parent | a9a81e7d6a50fc249f22af07504e9620f93d6037 (diff) | |
download | gcc-8ec12e355955a24a13bb0d0bf071fa20aa0d8a5f.zip gcc-8ec12e355955a24a13bb0d0bf071fa20aa0d8a5f.tar.gz gcc-8ec12e355955a24a13bb0d0bf071fa20aa0d8a5f.tar.bz2 |
i386.md (SI_REG, DI_REG): New constants.
* config/i386/i386.md (SI_REG, DI_REG): New constants.
(strmov): Use defined constants.
(cmpstrnsi): Likewise.
* config/i386/i386.c (decide_alg): Use defined constants.
(ix86_expand_strlen): Likewise.
From-SVN: r129276
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.md | 6 |
3 files changed, 15 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1100526..5be6f5a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2007-10-12 Nathan Froyd <froydnj@codesourcery.com> + + * config/i386/i386.md (SI_REG, DI_REG): New constants. + (strmov): Use defined constants. + (cmpstrnsi): Likewise. + * config/i386/i386.c (decide_alg): Use defined constants. + (ix86_expand_strlen): Likewise. + 2007-10-12 Richard Sandiford <rsandifo@nildram.co.uk> * dse.c (find_shift_sequence): Reinstate "<= UNITS_PER_WORD" condition. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 681b03b..de15ff7 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -15060,8 +15060,8 @@ decide_alg (HOST_WIDE_INT count, HOST_WIDE_INT expected_size, bool memset, additionally, memset wants eax and memcpy wants esi. Don't consider such algorithms if the user has appropriated those registers for their own purposes. */ - bool rep_prefix_usable = !(global_regs[2] || global_regs[5] - || (memset ? global_regs[0] : global_regs[4])); + bool rep_prefix_usable = !(global_regs[CX_REG] || global_regs[DI_REG] + || (memset ? global_regs[AX_REG] : global_regs[SI_REG])); #define ALG_USABLE_P(alg) (rep_prefix_usable \ || (alg != rep_prefix_1_byte \ @@ -16022,7 +16022,7 @@ ix86_expand_strlen (rtx out, rtx src, rtx eoschar, rtx align) rtx unspec; /* Can't use this if the user has appropriated eax, ecx, or edi. */ - if (global_regs[0] || global_regs[2] || global_regs[5]) + if (global_regs[AX_REG] || global_regs[CX_REG] || global_regs[DI_REG]) return false; scratch2 = gen_reg_rtx (Pmode); diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 145eb95..9f90d7e 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -222,6 +222,8 @@ [(AX_REG 0) (DX_REG 1) (CX_REG 2) + (SI_REG 4) + (DI_REG 5) (BP_REG 6) (SP_REG 7) (FLAGS_REG 17) @@ -18704,7 +18706,7 @@ /* Can't use this if the user has appropriated esi or edi. */ if ((TARGET_SINGLE_STRINGOP || optimize_size) - && !(global_regs[4] || global_regs[5])) + && !(global_regs[SI_REG] || global_regs[DI_REG])) { emit_insn (gen_strmov_singleop (operands[0], operands[1], operands[2], operands[3], @@ -19190,7 +19192,7 @@ 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]) + if (global_regs[SI_REG] || global_regs[DI_REG]) FAIL; out = operands[0]; |