This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/17052] [3.5 Regression] altivec varargs failure if no optimization
- From: "amodra at bigpond dot net dot au" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Aug 2004 07:58:57 -0000
- Subject: [Bug middle-end/17052] [3.5 Regression] altivec varargs failure if no optimization
- References: <20040816201040.17052.janis187@us.ibm.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From amodra at bigpond dot net dot au 2004-08-23 07:58 -------
static int
varargsn001(vector float p1, ...)
{
va_list ap;
vector float i1;
vector float i2;
int i3;
va_start(ap, p1);
i1 = p1;
The real problem occurs with the above assignment to i1.
0x10000508 <varargsn001+120>: li r0,176
0x1000050c <varargsn001+124>: lvx v0,r31,r0
0x10000510 <varargsn001+128>: li r0,136
0x10000514 <varargsn001+132>: stvx v0,r31,r0
Notice that the stack slot for i1 isn't 16 byte aligned. VMX load and
store insns silently ignore the bottom 4 bits of the address, so this
stores to sp+128 instead of sp+136. It so happens that one element of
our va_list is at sp+128...
Bottom line: This is a problem with vector stack slot alignment.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-08-23 07:58:56
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17052