From patchwork Mon Jul 6 14:37:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Bennett X-Patchwork-Id: 491652 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 2EDB0140DC0 for ; Tue, 7 Jul 2015 00:37:16 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=B5Dl53wC; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=ZLw YN3uWmBsn1p6yDgywCRXWbe9BkONLj3dd7u9c94ghAFmW8qKLCCFaSULlC9fYqi6 8eA1/aAYh/f8MeDNGhnEiI6lX/xmCVO8UwvvHWcF7TfOtpil/+JrPfFfJjDTg04F WSbmP+yNklUMzuB2mpgyTua3L9+cvfBer7Sux4IY= 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:from :to:cc:subject:date:message-id:content-type :content-transfer-encoding:mime-version; s=default; bh=GrQnye6wT DdTXmC22Qtk7mps36U=; b=B5Dl53wCUjuXkuzNGJGBzt5mSkK30hklS5++yEhza KrMWeSeznETRpUnPB6/WiTfuf+Y/u02YZvEp5+PZo3cucVa6HmmnX4CePcOJkEP9 xCZli/3sq7ZcfOqRQHo5MaPD4Q25nRcFP7EiaMQnlmHkTJOQvumEHtYHvzAHIZGF t4= Received: (qmail 78690 invoked by alias); 6 Jul 2015 14:37:10 -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 78675 invoked by uid 89); 6 Jul 2015 14:37:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mailapp01.imgtec.com Received: from mailapp01.imgtec.com (HELO mailapp01.imgtec.com) (195.59.15.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 06 Jul 2015 14:37:08 +0000 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id 1E99BE7ABCE43; Mon, 6 Jul 2015 15:37:03 +0100 (IST) Received: from LEMAIL01.le.imgtec.org (192.168.152.62) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 6 Jul 2015 15:37:05 +0100 Received: from LEMAIL01.le.imgtec.org ([fe80::5ae:ee16:f4b9:cda9]) by LEMAIL01.le.imgtec.org ([fe80::5ae:ee16:f4b9:cda9%17]) with mapi id 14.03.0210.002; Mon, 6 Jul 2015 15:37:05 +0100 From: Andrew Bennett To: "gcc-patches@gcc.gnu.org" CC: "Moore, Catherine (Catherine_Moore@mentor.com)" , Matthew Fortune Subject: [PATCH] MIPS: Update stack-1.c testcase to match micromips jraddiusp instruction. Date: Mon, 6 Jul 2015 14:37:04 +0000 Message-ID: <0DA23CC379F5F945ACB41CF394B98277210EEC76@LEMAIL01.le.imgtec.org> MIME-Version: 1.0 X-IsSubscribed: yes Hi, The stack-1.c testcase fails when being compiled for micromips with the -O0 optimization level. The reason is the testcase is expecting the following sequence at the end of the function: addiu $sp,$sp,16 jrc $31 But for micromips it generates the following: jraddiusp 16 As the failure only happens at one optimization level I have decided to just change the expected output rather than creating a separate micromips testcase. I have tested this on the mips-mti-elf target using mips32r2/{-mno-micromips/-mmicromips} test options and there are no new regressions. The patch and ChangeLog are below. Ok to commit? Many thanks, Andrew testsuite/ * gcc.target/mips/stack-1.c: Allow testcase to match jraddiusp instruction. diff --git a/gcc/testsuite/gcc.target/mips/stack-1.c b/gcc/testsuite/gcc.target/mips/stack-1.c index a28e4bf..2249a3b 100644 --- a/gcc/testsuite/gcc.target/mips/stack-1.c +++ b/gcc/testsuite/gcc.target/mips/stack-1.c @@ -1,4 +1,4 @@ -/* { dg-final { scan-assembler "\td?addiu\t(\\\$sp,)?\\\$sp,\[1-9\]" } } */ +/* { dg-final { scan-assembler "\t((d?addiu\t(\\\$sp,)?\\\$sp,)|jraddiusp\t)\[1-9\]" } } */ /* { dg-final { scan-assembler "\tlw\t" } } */ /* { dg-final { scan-assembler-not "\td?addiu\t(\\\$sp,)?\\\$sp,\[1-9\].*\tlw\t" } } */