From patchwork Fri Feb 10 11:39:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Zhuykov X-Patchwork-Id: 140573 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 2408AB6F13 for ; Fri, 10 Feb 2012 22:41:35 +1100 (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=1329478899; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: MIME-Version:Received:Received: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=JWzszJG Ru4OM8I3i2ETLKCfQe+Y=; b=UVNQI0yK3rIvuk4X4pvKwIM1dyjm07Hh8mZjw4P jd+sH79luEMpiMmjA5Ju0dt1Lk8NRg2bDRlfCAlJFDybfmxfDKMr+AM3MxLBGBqe ipoqMRI8rs7Tb6ml+/ICPc7MInyF5ZIZ8Fe8Qb974VFxq7NGegb5x6QcCfTafCBE jcQA= 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:Received:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Cc:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=sgbhEOV4W5RW7u3WDQrYkptFlIFVDrjFwcad+GP9fLohrMp5G95UiBeQMDGBbl mpq0FCsSDci7lMfbdGDMxKiKygoMZhvGvGL9FJxMIEEKKLBc2u2z6QhWKbFTg+7o g7cXO0pSq8E5teOy95o6KLz4SoqP3/ad88NQrQVncmcJs=; Received: (qmail 652 invoked by alias); 10 Feb 2012 11:41:30 -0000 Received: (qmail 637 invoked by uid 22791); 10 Feb 2012 11:41:26 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.ispras.ru (HELO mail.ispras.ru) (83.149.199.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 10 Feb 2012 11:39:25 +0000 Received: from mail-tul01m020-f175.google.com (mail-tul01m020-f175.google.com [209.85.214.175]) by mail.ispras.ru (Postfix) with ESMTP id 1895524FE87 for ; Fri, 10 Feb 2012 15:39:23 +0400 (MSK) Received: by obhx4 with SMTP id x4so3963434obh.20 for ; Fri, 10 Feb 2012 03:39:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.50.6.194 with SMTP id d2mr10255047iga.24.1328873961705; Fri, 10 Feb 2012 03:39:21 -0800 (PST) Received: by 10.231.232.6 with HTTP; Fri, 10 Feb 2012 03:39:21 -0800 (PST) Date: Fri, 10 Feb 2012 14:39:21 +0300 Message-ID: Subject: [PATCH, ARM] Properly count number of instructions emitted. From: Roman Zhuykov To: Ramana Radhakrishnan Cc: gcc-patches , dm@ispras.ru 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 This weak I investigated GCC trunk fails to compile test 186.crafty from SPECINT2000 on ARM. File validate.c compilation leads to this: /tmp/ccXFsLlG.s: Assembler messages: /tmp/ccXFsLlG.s:3411: Error: bad immediate value for offset (4112) /tmp/ccXFsLlG.s:7069: Error: bad immediate value for offset (4096) I find a patch, which causes the problem. http://gcc.gnu.org/ml/gcc-patches/2011-08/msg01249.html Ramana, you forgot to set count = 2 in one case. This patch fixes the problem successfully. Cross-compiler regtest showed no new failures. All SPECINT2000 tests work correctly. Ok for trunk? 2012-02-10 Roman Zhuykov * config/arm/arm.c (output_move_double): In one case properly count number of instructions that will be emitted. --- gcc/config/arm/arm.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index e2ab102..7f0dc6b 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -14205,6 +14205,9 @@ output_move_double (rtx *operands, bool emit, int *count) output_asm_insn ("sub%?\t%0, %1, %2", otherops); } + if (count) + *count = 2; + if (TARGET_LDRD) return "ldr%(d%)\t%0, [%1]";