From patchwork Tue Nov 16 22:47:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 71468 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 D85B1B7135 for ; Wed, 17 Nov 2010 09:47:25 +1100 (EST) Received: (qmail 29753 invoked by alias); 16 Nov 2010 22:47:22 -0000 Received: (qmail 29744 invoked by uid 22791); 16 Nov 2010 22:47:21 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 16 Nov 2010 22:47:16 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oAGMlFMe019796 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 16 Nov 2010 17:47:15 -0500 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oAGMlDoH008256 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 16 Nov 2010 17:47:14 -0500 Received: from tyan-ft48-01.lab.bos.redhat.com (localhost.localdomain [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id oAGMlC3P009744 for ; Tue, 16 Nov 2010 23:47:12 +0100 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id oAGMlCRI009743 for gcc-patches@gcc.gnu.org; Tue, 16 Nov 2010 23:47:12 +0100 Date: Tue, 16 Nov 2010 23:47:12 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix two guality testcases for ia64/s390/mmix Message-ID: <20101116224712.GO29412@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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! I've noticed today in gcc-testresults posts that asm-1.c and pr43329-1.c tests fail to assemble on ia64. That's because ia64 doesn't have a nop insn like most other targets do. nop 0 (and swym 0 for mmix) is the alternate nop insn used by configure.ac, this patch uses those in the guality tests. Regtested on x86_64-linux and i686-linux, ok for trunk? 2010-11-16 Jakub Jelinek * gcc.dg/guality/nop.h: New file. * gcc.dg/guality/asm-1.c: Include it and use NOP macro instead of "nop". Adjust line numbers in gdb-test. * gcc.dg/guality/pr43329-1.c: Likewise. Jakub --- gcc/testsuite/gcc.dg/guality/nop.h.jj 2010-11-16 12:27:15.000000000 +0100 +++ gcc/testsuite/gcc.dg/guality/nop.h 2010-11-16 12:25:54.000000000 +0100 @@ -0,0 +1,7 @@ +#if defined (__ia64__) || defined (__s390__) || defined (__s390x__) +#define NOP "nop 0" +#elif defined (__MMIX__) +#define NOP "swym 0" +#else +#define NOP "nop" +#endif --- gcc/testsuite/gcc.dg/guality/asm-1.c.jj 2010-07-22 11:35:34.000000000 +0200 +++ gcc/testsuite/gcc.dg/guality/asm-1.c 2010-11-16 12:27:56.000000000 +0100 @@ -1,14 +1,16 @@ /* { dg-do run } */ /* { dg-options "-g" } */ +#include "nop.h" + struct A { int x; unsigned short y; char z[64]; }; void __attribute__((noinline)) foo (struct A *p, char *q) { int f = &p->z[p->y] - q; - asm volatile ("nop"); - asm volatile ("nop" : : "g" (f)); /* { dg-final { gdb-test 12 "f" "14" } } */ + asm volatile (NOP); + asm volatile (NOP : : "g" (f)); /* { dg-final { gdb-test 14 "f" "14" } } */ asm volatile ("" : : "g" (p), "g" (q)); } --- gcc/testsuite/gcc.dg/guality/pr43329-1.c.jj 2010-03-16 09:06:56.000000000 +0100 +++ gcc/testsuite/gcc.dg/guality/pr43329-1.c 2010-11-16 12:28:54.000000000 +0100 @@ -2,12 +2,14 @@ /* { dg-do run } */ /* { dg-options "-g" } */ +#include "nop.h" + static inline void foo (int argx) { int varx = argx; - __asm__ volatile ("nop"); /* { dg-final { gdb-test 10 "argx" "25" } } */ - __asm__ volatile ("nop" : : "g" (varx)); /* { dg-final { gdb-test 10 "varx" "25" } } */ + __asm__ volatile (NOP); /* { dg-final { gdb-test 12 "argx" "25" } } */ + __asm__ volatile (NOP : : "g" (varx)); /* { dg-final { gdb-test 12 "varx" "25" } } */ } int i;