From patchwork Tue Dec 16 21:32:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleg Endo X-Patchwork-Id: 422101 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 0A6CD1400D2 for ; Wed, 17 Dec 2014 08:32:43 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:from:to:date:content-type:mime-version; q= dns; s=default; b=w3NnRRDPNnB031KKMR+cEq/yW3tdZrDSfpC58wyE8cBZFZ Mvl2CZdih6WGPAN2YMLH/97GRBtXcy2hPi+pspWk29D+l1g8TQqD+Pt9skJIGGKa M+iLT2K/5PxgOL4lWKImDBa3biHifRI41Mr0pPmcH8qZIzoEQDBZFHXZDOC0s= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:from:to:date:content-type:mime-version; s= default; bh=wmy9oEo44xHFqM0yA84E06haSfI=; b=t+EeF65Cn5AUB8HzZQX3 MUxUS6sl8ddl/LE98pM95azQ0HnppOJhEY+oOKxIqOc9LVvgja8ziRuZ5ELtGwgk 4aDg0uPC70uD/LA8yHdb8V6faNjf0v5nXH3bCsJjo0lVt8dkNYpDLU/K0YFPDSuG zziThV7a4hpkGFnV1l2Xl+A= Received: (qmail 30058 invoked by alias); 16 Dec 2014 21:32:35 -0000 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 Received: (qmail 30048 invoked by uid 89); 16 Dec 2014 21:32:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mailout10.t-online.de Received: from mailout10.t-online.de (HELO mailout10.t-online.de) (194.25.134.21) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 16 Dec 2014 21:32:32 +0000 Received: from fwd10.aul.t-online.de (fwd10.aul.t-online.de [172.20.26.152]) by mailout10.t-online.de (Postfix) with SMTP id A148D18E3E9 for ; Tue, 16 Dec 2014 22:32:27 +0100 (CET) Received: from [192.168.0.104] (Z6s7AcZvwhuS8q2jpL16rosIoaV9YrSn3V9JLXTHXeQDLOlbU1GyvdnlV4RmEx3ZpU@[84.180.116.254]) by fwd10.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1Y0zjA-07Zwa80; Tue, 16 Dec 2014 22:32:20 +0100 Message-ID: <1418765532.8915.8.camel@yam-132-YW-E178-FTW> Subject: [SH][committed] Fix fpchg testcase From: Oleg Endo To: gcc-patches Date: Tue, 16 Dec 2014 22:32:12 +0100 Mime-Version: 1.0 X-IsSubscribed: yes Hi, The attached patch fixes the gcc.target/sh/fpchg.c test case. The test case actually never worked since it requires at least -O option to output the expected fpchg insn. Moreover, scan-assembler "fpchg" would match on the file name string in the asm output. Fixed and tested with make check-gcc RUNTESTFLAGS="sh.exp=pr53513-1.c --target_board=sh-sim \{-m4a/-ml,-m4a/-mb,-m4a-single/-ml,-m4a-single/-mb,-m4a-nofpu/-ml,-m4a-nofpu/-mb}". Commited as r218793. Cheers, Oleg gcc/testsuite/ChangeLog: PR target/53513 * gcc.target/sh/fpchg.c: Rename to ... * gcc.target/sh/pr53513-1.c: ... this. Adjust test case to work for -m4a and -m4a-single. Index: gcc/testsuite/gcc.target/sh/pr53513-1.c =================================================================== --- gcc/testsuite/gcc.target/sh/pr53513-1.c (revision 0) +++ gcc/testsuite/gcc.target/sh/pr53513-1.c (revision 0) @@ -0,0 +1,11 @@ +/* Check that fpchg is used to switch FPSCR.PR mode on SH4A. */ +/* { dg-additional-options "-O" } */ +/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m4a" "-m4a-single" } } */ +/* { dg-final { scan-assembler "fpchg" } } */ +/* { dg-final { scan-assembler-not "fpscr" } } */ + +double +foo (float a, float b, double c) +{ + return (a * b) + c; +} Index: gcc/testsuite/gcc.target/sh/fpchg.c =================================================================== --- gcc/testsuite/gcc.target/sh/fpchg.c (revision 218791) +++ gcc/testsuite/gcc.target/sh/fpchg.c (working copy) @@ -1,17 +0,0 @@ -/* Check that fpchg is used to switch precision. */ - -/* { dg-do compile } */ -/* { dg-final { scan-assembler "fpchg" } } */ -/* { dg-final { scan-assembler-not "fpscr" } } */ -/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m4a" } } */ - -extern float c; - -void -foo(int j) -{ - while (j--) - c++; - -} -