+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
#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