This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: 3.3: IA64 bug fixes
On Fri, Dec 19, 2003 at 04:39:10AM -0500, Jakub Jelinek wrote:
> On Fri, Dec 19, 2003 at 04:35:31AM -0500, Jakub Jelinek wrote:
> > Why not simply:
> > #ifdef POINTERS_EXTEND_UNSIGNED
> > addr = convert_memory_address (DImode, addr);
> > #endif
> > ?
>
> Actually:
>
> #ifdef POINTERS_EXTEND_UNSIGNED
> if (DImode != GET_MODE (addr))
> addr = convert_memory_address (DImode, addr);
> #endif
>
> gcc-3_3-branch's convert_memory_address doesn't have even the:
> /* If X already has the right mode, just return it. */
> if (GET_MODE (x) == to_mode)
> return x;
> hunk the trunk has and all convert_memory_address callers e.g in
> ia64.c do something similar.
Here it is as tested patch on ia64-*-linux*.
Ok to commit?
2003-12-19 Jakub Jelinek <jakub@redhat.com>
* config/ia64/ia64.c (ia64_expand_call): Fix convert_memory_address
use.
--- gcc/config/ia64/ia64.c.jj 2003-12-19 10:16:49.000000000 +0100
+++ gcc/config/ia64/ia64.c 2003-12-19 10:37:28.000000000 +0100
@@ -1431,7 +1431,10 @@ ia64_expand_call (retval, addr, nextarg,
rtx insn, b0;
addr = XEXP (addr, 0);
- addr = convert_memory_address (DImode, addr);
+#ifdef POINTERS_EXTEND_UNSIGNED
+ if (DImode != GET_MODE (addr))
+ addr = convert_memory_address (DImode, addr);
+#endif
b0 = gen_rtx_REG (DImode, R_BR (0));
/* ??? Should do this for functions known to bind local too. */
Jakub