From patchwork Sat Mar 12 15:36:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 86521 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id C2041B6F14 for ; Sun, 13 Mar 2011 02:36:47 +1100 (EST) Received: (qmail 18710 invoked by alias); 12 Mar 2011 15:36:45 -0000 Received: (qmail 18520 invoked by uid 22791); 12 Mar 2011 15:36:44 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL, BAYES_00, NO_DNS_FOR_FROM, TW_DF, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 12 Mar 2011 15:36:40 +0000 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 12 Mar 2011 07:36:39 -0800 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([10.3.194.135]) by orsmga001.jf.intel.com with ESMTP; 12 Mar 2011 07:36:39 -0800 Received: by gnu-6.sc.intel.com (Postfix, from userid 500) id 177F9180DDE; Sat, 12 Mar 2011 07:36:39 -0800 (PST) Date: Sat, 12 Mar 2011 07:36:39 -0800 From: "H.J. Lu" To: gcc-patches@gcc.gnu.org Subject: [x32] PATCH: Add check_effective_target_ia32 Message-ID: <20110312153639.GA3986@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi, We check ilp32 for ia32 tests in gcc testsuite. It won't work with x32. I checked in this patch to add ia32 target. H.J. --- commit 9383cb747c3de3c769fa3fb2aa9c148b344399b2 Author: H.J. Lu Date: Fri Mar 11 13:39:46 2011 -0800 Add check_effective_target_ia32. diff --git a/gcc/testsuite/ChangeLog.x32 b/gcc/testsuite/ChangeLog.x32 index 39ed391..788bca8 100644 --- a/gcc/testsuite/ChangeLog.x32 +++ b/gcc/testsuite/ChangeLog.x32 @@ -1,5 +1,12 @@ 2011-03-11 H.J. Lu + * gcc.target/i386/stackalign/return-3.c: Require ia32 instead + of ilp32. + + * lib/target-supports.exp (check_effective_target_ia32): New. + +2011-03-11 H.J. Lu + PR target/47446 * gcc.target/i386/pr47446-3.c: New. diff --git a/gcc/testsuite/gcc.target/i386/stackalign/return-3.c b/gcc/testsuite/gcc.target/i386/stackalign/return-3.c index dd2c2e8..e32547e 100644 --- a/gcc/testsuite/gcc.target/i386/stackalign/return-3.c +++ b/gcc/testsuite/gcc.target/i386/stackalign/return-3.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-skip-if "" { ! { ilp32 && dfp } } { "*" } { "" } } */ +/* { dg-skip-if "" { ! { ia32 && dfp } } { "*" } { "" } } */ /* { dg-options "-msse -std=gnu99 -mpreferred-stack-boundary=2" } */ /* { dg-require-effective-target sse } */ diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 2e75e5b..f46c734 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -1492,6 +1492,17 @@ proc check_effective_target_ilp32 { } { }] } +# Return 1 if we're generating ia32 code using default options, 0 +# otherwise. + +proc check_effective_target_ia32 { } { + return [check_no_compiler_messages ia32 object { + int dummy[sizeof (int) == 4 + && sizeof (void *) == 4 + && sizeof (long) == 4 ? 1 : -1] = { __i386__ }; + }] +} + # Return 1 if we're generating x32 code using default options, 0 # otherwise.