builtins.c (expand_builtin_prefetch): Force op0 pointer to Pmode if POINTERS_EXTEND_UNSIGNED is defined.

* builtins.c (expand_builtin_prefetch): Force op0 pointer to Pmode
        if POINTERS_EXTEND_UNSIGNED is defined.

From-SVN: r51778
This commit is contained in:
Steve Ellcey 2002-04-03 02:33:07 +00:00 committed by Richard Henderson
parent 40e5b28399
commit 1e533e4b01
2 changed files with 16 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2002-04-02 Steve Ellcey <sje@cup.hp.com>
* builtins.c (expand_builtin_prefetch): Force op0 pointer to Pmode
if POINTERS_EXTEND_UNSIGNED is defined.
2002-04-02 Richard Henderson <rth@redhat.com>
PR opt/3967

View File

@ -787,10 +787,17 @@ expand_builtin_prefetch (arglist)
#ifdef HAVE_prefetch
if (HAVE_prefetch)
{
if (! (*insn_data[(int)CODE_FOR_prefetch].operand[0].predicate)
(op0,
insn_data[(int)CODE_FOR_prefetch].operand[0].mode))
op0 = force_reg (Pmode, op0);
if ((! (*insn_data[(int)CODE_FOR_prefetch].operand[0].predicate)
(op0,
insn_data[(int)CODE_FOR_prefetch].operand[0].mode)) ||
(GET_MODE(op0) != Pmode))
{
#ifdef POINTERS_EXTEND_UNSIGNED
if (GET_MODE(op0) != Pmode)
op0 = convert_memory_address (Pmode, op0);
#endif
op0 = force_reg (Pmode, op0);
}
emit_insn (gen_prefetch (op0, op1, op2));
}
else