From patchwork Thu May 3 11:57:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 156672 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 ECFFDB6FAC for ; Thu, 3 May 2012 21:57:36 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1336651058; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:In-Reply-To:References:Date: Message-ID:Subject:From:To:Cc:Content-Type:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=mWFr3I4VfCMtTutZIyG3913ICq4=; b=mRGcHbrF1baXCQzpfGZfgWx/pwWURiYdXOP02Nr7sgHUcIESbCffbiSV/X9s0C +LW4grfPpIJbfziuXVMS2LPDSUhHReEJtzuzmT3kNqfvysot77FcepHAEXENFJk1 XMs/TRLV7ZyhUn6FFCaSI3CkucmUFSnZAp4fyTYRHG+K0= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:Received:Received:In-Reply-To:References:Date:Message-ID:Subject:From:To:Cc:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=DgwF8kDQhlZF2oHUBnVDjGf6C3/5pCmELP9ksrsZpLAoEQV5Hpvkzs+JnUpt5+ PsXZ4Lq1HKt41K/3a1kMQt939YmGcPsjye71z9kDA6fWLDuG5UOlKb0K5hkfauFd jmheTcxSjCYGHXXB2BFTTN4tx4gy019vP5lbERsTECXEc=; Received: (qmail 15405 invoked by alias); 3 May 2012 11:57:32 -0000 Received: (qmail 15397 invoked by uid 22791); 3 May 2012 11:57:31 -0000 X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, TW_PX, TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-yw0-f47.google.com (HELO mail-yw0-f47.google.com) (209.85.213.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 May 2012 11:57:19 +0000 Received: by yhjj56 with SMTP id j56so1865385yhj.20 for ; Thu, 03 May 2012 04:57:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.108.199 with SMTP id q47mr2515303yhg.76.1336046238537; Thu, 03 May 2012 04:57:18 -0700 (PDT) Received: by 10.146.124.5 with HTTP; Thu, 3 May 2012 04:57:18 -0700 (PDT) In-Reply-To: References: <20120503100821.GX16117@tyan-ft48-01.lab.bos.redhat.com> Date: Thu, 3 May 2012 13:57:18 +0200 Message-ID: Subject: Re: [PATCH] Fix some hle* tests From: Uros Bizjak To: Jakub Jelinek Cc: Richard Henderson , Kirill Yukhin , gcc-patches@gcc.gnu.org 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 On Thu, May 3, 2012 at 12:17 PM, Uros Bizjak wrote: >> BTW, I wonder if dg-options shouldn't select -march=i686 for !lp64, >> if somebody configures gcc to default to -march=i386, I guess xadd etc. >> won't be emitted there. > > You can add -march=x86-64 unconditionally to these test. This arch is > the placeholder for "some recent x86 processor" and works for -m32 and > -m64. Fixed with attached patch. 2012-05-03 Uros Bizjak * gcc.target/i386/hle-cmpxchg-acq-1.c (dg-options): Add -march=x86-64. * gcc.target/i386/hle-xadd-acq-1.c (dg-options): Ditto. * gcc.target/i386/hle-cmpxchg-rel-1.c (dg-options): Ditto. * gcc.target/i386/hle-xadd-rel-1.c (dg-options): Ditto. Tested on x86_64-pc-linux-gnu {,-m32}, committed. Uros. Index: gcc.target/i386/hle-cmpxchg-rel-1.c =================================================================== --- gcc.target/i386/hle-cmpxchg-rel-1.c (revision 187093) +++ gcc.target/i386/hle-cmpxchg-rel-1.c (working copy) @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-mhle" } */ +/* { dg-options "-march=x86-64 -mhle" } */ /* { dg-final { scan-assembler "lock\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+cmpxchg" } } */ int Index: gcc.target/i386/hle-xadd-rel-1.c =================================================================== --- gcc.target/i386/hle-xadd-rel-1.c (revision 187093) +++ gcc.target/i386/hle-xadd-rel-1.c (working copy) @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-mhle" } */ +/* { dg-options "-march=x86-64 -mhle" } */ /* { dg-final { scan-assembler "lock\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+xadd" } } */ int Index: gcc.target/i386/hle-cmpxchg-acq-1.c =================================================================== --- gcc.target/i386/hle-cmpxchg-acq-1.c (revision 187093) +++ gcc.target/i386/hle-cmpxchg-acq-1.c (working copy) @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-mhle" } */ +/* { dg-options "-march=x86-64 -mhle" } */ /* { dg-final { scan-assembler "lock\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+cmpxchg" } } */ int Index: gcc.target/i386/hle-xadd-acq-1.c =================================================================== --- gcc.target/i386/hle-xadd-acq-1.c (revision 187093) +++ gcc.target/i386/hle-xadd-acq-1.c (working copy) @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-mhle" } */ +/* { dg-options "-march=x86-64 -mhle" } */ /* { dg-final { scan-assembler "lock\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+xadd" } } */ int Index: ChangeLog =================================================================== --- ChangeLog (revision 187093) +++ ChangeLog (working copy) @@ -1,3 +1,10 @@ +2012-05-03 Uros Bizjak + + * gcc.target/i386/hle-cmpxchg-acq-1.c (dg-options): Add -march=x86-64. + * gcc.target/i386/hle-xadd-acq-1.c (dg-options): Ditto. + * gcc.target/i386/hle-cmpxchg-rel-1.c (dg-options): Ditto. + * gcc.target/i386/hle-xadd-rel-1.c (dg-options): Ditto. + 2012-05-03 Jakub Jelinek * gcc.target/i386/hle-xadd-rel-1.c: Match .byte 0xf3 instead of