From patchwork Tue Dec 28 01:43:03 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 76812 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 AD5DAB70E2 for ; Tue, 28 Dec 2010 12:43:18 +1100 (EST) Received: (qmail 5206 invoked by alias); 28 Dec 2010 01:43:16 -0000 Received: (qmail 5197 invoked by uid 22791); 28 Dec 2010 01:43:16 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 28 Dec 2010 01:43:11 +0000 Received: (qmail 19721 invoked from network); 28 Dec 2010 01:43:08 -0000 Received: from unknown (HELO ?192.168.0.101?) (yao@127.0.0.2) by mail.codesourcery.com with ESMTPA; 28 Dec 2010 01:43:08 -0000 Message-ID: <4D1940A7.6000209@codesourcery.com> Date: Tue, 28 Dec 2010 09:43:03 +0800 From: Yao Qi User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org Subject: Re: [patch, arm] Backport PR45094 fix to 4.5 References: <4D184B17.1030106@codesourcery.com> In-Reply-To: <4D184B17.1030106@codesourcery.com> 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 On 12/27/2010 04:15 PM, Yao Qi wrote: > --- config/arm/arm.c (revision 167948) > +++ config/arm/arm.c (working copy) > @@ -1114,6 +1114,7 @@ > va_list_type); > DECL_ARTIFICIAL (va_list_name) = 1; > TYPE_NAME (va_list_type) = va_list_name; > + TYPE_STUB_DECL (va_list_type) = va_list_name; > /* Create the __ap field. */ > ap_field = build_decl (BUILTINS_LOCATION, > FIELD_DECL, The first hunk, came from another backport, is redundant. Removed it in the new patch. gcc/ PR target/45094 * config/arm/arm.c (output_move_double): Fix typo generating instructions ('ldr'->'str'). gcc/testsuite/ PR target/45094 * gcc.target/arm/pr45094.c: New test. Index: config/arm/arm.c =================================================================== --- config/arm/arm.c (revision 167948) +++ config/arm/arm.c (working copy) @@ -12182,13 +12183,13 @@ { if (GET_CODE (XEXP (operands[0], 0)) == PRE_MODIFY) { - output_asm_insn ("ldr%?\t%0, [%1, %2]!", otherops); - output_asm_insn ("ldr%?\t%H0, [%1, #4]", otherops); + output_asm_insn ("str%?\t%0, [%1, %2]!", otherops); + output_asm_insn ("str%?\t%H0, [%1, #4]", otherops); } else { - output_asm_insn ("ldr%?\t%H0, [%1, #4]", otherops); - output_asm_insn ("ldr%?\t%0, [%1], %2", otherops); + output_asm_insn ("str%?\t%H0, [%1, #4]", otherops); + output_asm_insn ("str%?\t%0, [%1], %2", otherops); } } else if (GET_CODE (XEXP (operands[0], 0)) == PRE_MODIFY) Index: testsuite/gcc.target/arm/pr45094.c =================================================================== --- testsuite/gcc.target/arm/pr45094.c (revision 0) +++ testsuite/gcc.target/arm/pr45094.c (revision 0) @@ -0,0 +1,26 @@ +/* { dg-do run } */ +/* { dg-require-effective-target arm_neon_hw } */ +/* { dg-options "-O2 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp" } */ + +#include + +long long buffer[32]; + +void __attribute__((noinline)) f(long long *p, int n) +{ + while (--n >= 0) + { + *p = 1; + p += 32; + } +} + +int main(void) +{ + f(buffer, 1); + + if (!buffer[0]) + abort(); + + return 0; +}