This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
patch rs6000: legitimize address for altivec (obvious)
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: gcc patches <gcc-patches at gcc dot gnu dot org>
- Cc: David Edelsohn <dje at watson dot ibm dot com>
- Date: 16 Dec 2001 22:33:46 -0800
- Subject: patch rs6000: legitimize address for altivec (obvious)
builtin_apply and friends are generating addresses that
rs6000_legitimize_address is incorrectly rewriting.
altivec can only handle [reg+reg] adrressing. i found the oversight
corrected by the patch below. the comment was right; the code was wrong
;-)
committed as obvious.
--
Aldy Hernandez E-mail: aldyh@redhat.com
Professional Gypsy
Red Hat, Inc.
2001-12-16 Aldy Hernandez <aldyh@redhat.com>
* config/rs6000/rs6000.c (rs6000_legitimize_address): Force both
PLUS operands into registers for altivec mode.
Index: rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.260
diff -c -p -r1.260 rs6000.c
*** rs6000.c 2001/12/13 23:14:45 1.260
--- rs6000.c 2001/12/17 06:28:44
*************** rs6000_legitimize_address (x, oldx, mode
*** 1677,1683 ****
/* Make sure both operands are registers. */
if (GET_CODE (x) == PLUS)
! return gen_rtx_PLUS (Pmode, XEXP (x, 0),
force_reg (Pmode, XEXP (x, 1)));
reg = force_reg (Pmode, x);
--- 1677,1683 ----
/* Make sure both operands are registers. */
if (GET_CODE (x) == PLUS)
! return gen_rtx_PLUS (Pmode, force_reg (Pmode, XEXP (x, 0)),
force_reg (Pmode, XEXP (x, 1)));
reg = force_reg (Pmode, x);