From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16784 invoked by alias); 23 Aug 2004 07:58:58 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 16762 invoked by uid 48); 23 Aug 2004 07:58:57 -0000 Date: Mon, 23 Aug 2004 07:58:00 -0000 Message-ID: <20040823075857.16761.qmail@sourceware.org> From: "amodra at bigpond dot net dot au" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040816201040.17052.janis187@us.ibm.com> References: <20040816201040.17052.janis187@us.ibm.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug middle-end/17052] [3.5 Regression] altivec varargs failure if no optimization X-Bugzilla-Reason: CC X-SW-Source: 2004-08/txt/msg02269.txt.bz2 List-Id: ------- 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 : li r0,176 0x1000050c : lvx v0,r31,r0 0x10000510 : li r0,136 0x10000514 : 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