From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10927 invoked by alias); 4 Jul 2015 02:37:39 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 10867 invoked by uid 48); 4 Jul 2015 02:37:35 -0000 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/66754] [4.9/5/6] gcc.dg/builtin-apply2.c aborts with -m32 -mregparm=3 or -miamcu Date: Sat, 04 Jul 2015 02:37:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 6.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-07/txt/msg00311.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66754 H.J. Lu changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #5 from H.J. Lu --- Here is a testcase without -mregparm=N: [hjl@gnu-tools-1 pr66754]$ cat x.i extern void abort(void); typedef double __v2df __attribute__ ((__vector_size__ (16))); __v2df val; void foo (char *name, __v2df x, __v2df y, __v2df z) { if (!__builtin_ia32_comisdeq (z, val)) abort(); } void bar (char *name, ...) { __builtin_apply(foo, __builtin_apply_args(), 64); } int main(void) { __v2df x = { 3.1, 3.2 }; __v2df y = { 2.1, 5.2 }; __v2df z = { 1.1, 7.2 }; val = z; bar("eeee", x, y, z); return 0; } [hjl@gnu-tools-1 pr66754]$ make /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc -B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -m32 -msse2 -S -o x.s x.i /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc -B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -g -m32 -msse2 -o x x.s ./x Makefile:12: recipe for target 'all' failed make: *** [all] Aborted (core dumped) [hjl@gnu-tools-1 pr66754]$ The vector parameters have the same issue. All arguments of vararg functions argument are passed on stack while the first 3 vector arguments are passed in registers for non-vararg functions.