diff options
author | Steve Ellcey <sje@cup.hp.com> | 2002-04-03 02:33:07 +0000 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2002-04-02 18:33:07 -0800 |
commit | 1e533e4b01eb29c88d4f8f09a7018eba5560b4f2 (patch) | |
tree | 792e8b94d293b5d0cc6807c3f0bab86d35f6ceea /gcc/builtins.c | |
parent | 40e5b283996d0f4856d7c530caf390f2e0c86daf (diff) | |
download | gcc-1e533e4b01eb29c88d4f8f09a7018eba5560b4f2.zip gcc-1e533e4b01eb29c88d4f8f09a7018eba5560b4f2.tar.gz gcc-1e533e4b01eb29c88d4f8f09a7018eba5560b4f2.tar.bz2 |
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
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index effd70d..dcbc6da 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -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 |