diff options
| author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-03 02:33:07 +0000 |
|---|---|---|
| committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-03 02:33:07 +0000 |
| commit | 4cd21437ecdbd71876af3548167aefe9c928956b (patch) | |
| tree | 792e8b94d293b5d0cc6807c3f0bab86d35f6ceea | |
| parent | a0e7d388874b75d3460bed887a4c960562b620e0 (diff) | |
| download | ppe42-gcc-4cd21437ecdbd71876af3548167aefe9c928956b.tar.gz ppe42-gcc-4cd21437ecdbd71876af3548167aefe9c928956b.zip | |
* builtins.c (expand_builtin_prefetch): Force op0 pointer to Pmode
if POINTERS_EXTEND_UNSIGNED is defined.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51778 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/builtins.c | 15 |
2 files changed, 16 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f26b3c89248..55596999468 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/builtins.c b/gcc/builtins.c index effd70d43ed..dcbc6dab23e 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 |

