to check that no regparm hard register is taken by a fixed register
variable. Check up to and including DI_REG when adjusting regparm
value due to fixed regs usage.
(rep_prefix_usable): Check fixed_regs array, not global_regs array for
available hard registers.
(ix86_expand_strlen): Ditto.
* config/i386/i386.md (strmov): Ditto.
(cmpstrnsi): Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130737
138bc75d-0d04-0410-961f-
82ee72b054a4
+2007-12-10 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.c (ix86_function_regparm): Ditto. Use REGPARM_MAX
+ to check that no regparm hard register is taken by a fixed register
+ variable. Check up to and including DI_REG when adjusting regparm
+ value due to fixed regs usage.
+ (rep_prefix_usable): Check fixed_regs array, not global_regs array for
+ available hard registers.
+ (ix86_expand_strlen): Ditto.
+ * config/i386/i386.md (strmov): Ditto.
+ (cmpstrnsi): Ditto.
+
2007-12-10 Kaz Kojima <kkojima@gcc.gnu.org>
* genopinit.c: Include tm_p.h in generated file.
(execute_fold_all_builtins): Call it for BUILT_IN_VA_START,
BUILT_IN_VA_COPY and BUILT_IN_VA_END.
- * target.h (struct ggc_target): Add expand_builtin_va_start
- hook.
+ * target.h (struct ggc_target): Add expand_builtin_va_start hook.
* target-def.h (TARGET_EXPAND_BUILTIN_VA_START): Define.
(TARGET_INITIALIZER): Add it.
* builtins.c (expand_builtin_va_start): Use
* mips/mips.c (mips_va_start): Made static.
(TARGET_EXPAND_BUILTIN_VA_START): Define.
-2007-12-05 Uros Bizjak <ubizjak@gmail.com>
+2007-12-06 Uros Bizjak <ubizjak@gmail.com>
* tree-ssa-loop.c (gate_tree_parallelize_loops): Return true when
"flag_tree_parallelize_loops > 1".
struct function *f;
/* Make sure no regparm register is taken by a
- fixed register or global register variable. */
- for (local_regparm = 0; local_regparm < 3; local_regparm++)
- if (global_regs[local_regparm] || fixed_regs[local_regparm])
+ fixed register variable. */
+ for (local_regparm = 0; local_regparm < REGPARM_MAX; local_regparm++)
+ if (fixed_regs[local_regparm])
break;
/* We can't use regparm(3) for nested functions as these use
TYPE_ATTRIBUTES (TREE_TYPE (decl)))))
local_regparm = 2;
- /* Each global register variable or fixed register usage
- increases register pressure, so less registers should be
- used for argument passing. This functionality can be
- overriden by explicit regparm value. */
- for (regno = 0; regno < 6; regno++)
- if (global_regs[regno] || fixed_regs[regno])
+ /* Each fixed register usage increases register pressure,
+ so less registers should be used for argument passing.
+ This functionality can be overriden by an explicit
+ regparm value. */
+ for (regno = 0; regno <= DI_REG; regno++)
+ if (fixed_regs[regno])
globals++;
+
local_regparm
= globals < local_regparm ? local_regparm - globals : 0;
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[CX_REG] || global_regs[DI_REG]
- || (memset ? global_regs[AX_REG] : global_regs[SI_REG]));
+ bool rep_prefix_usable = !(fixed_regs[CX_REG] || fixed_regs[DI_REG]
+ || (memset
+ ? fixed_regs[AX_REG] : fixed_regs[SI_REG]));
#define ALG_USABLE_P(alg) (rep_prefix_usable \
|| (alg != rep_prefix_1_byte \
rtx unspec;
/* Can't use this if the user has appropriated eax, ecx, or edi. */
- if (global_regs[AX_REG] || global_regs[CX_REG] || global_regs[DI_REG])
+ if (fixed_regs[AX_REG] || fixed_regs[CX_REG] || fixed_regs[DI_REG])
return false;
scratch2 = gen_reg_rtx (Pmode);
/* Can't use this if the user has appropriated esi or edi. */
if ((TARGET_SINGLE_STRINGOP || optimize_size)
- && !(global_regs[SI_REG] || global_regs[DI_REG]))
+ && !(fixed_regs[SI_REG] || fixed_regs[DI_REG]))
{
emit_insn (gen_strmov_singleop (operands[0], operands[1],
operands[2], operands[3],
rtx addr1, addr2, out, outlow, count, countreg, align;
/* Can't use this if the user has appropriated esi or edi. */
- if (global_regs[SI_REG] || global_regs[DI_REG])
+ if (fixed_regs[SI_REG] || fixed_regs[DI_REG])
FAIL;
out = operands[0];