From patchwork Wed Oct 19 19:27:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramana Radhakrishnan X-Patchwork-Id: 120687 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 45292B71C4 for ; Thu, 20 Oct 2011 06:27:46 +1100 (EST) Received: (qmail 26701 invoked by alias); 19 Oct 2011 19:27:43 -0000 Received: (qmail 26691 invoked by uid 22791); 19 Oct 2011 19:27:42 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-vw0-f47.google.com (HELO mail-vw0-f47.google.com) (209.85.212.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 19 Oct 2011 19:27:27 +0000 Received: by vwe42 with SMTP id 42so1603705vwe.20 for ; Wed, 19 Oct 2011 12:27:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.13.6 with SMTP id d6mr469394obc.11.1319052446793; Wed, 19 Oct 2011 12:27:26 -0700 (PDT) Received: by 10.182.43.167 with HTTP; Wed, 19 Oct 2011 12:27:26 -0700 (PDT) Date: Wed, 19 Oct 2011 20:27:26 +0100 Message-ID: Subject: [Patch ARM] Fix PR target/50106 From: Ramana Radhakrishnan To: gcc-patches@gcc.gnu.org Cc: Jakub Jelinek 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, This fixes PR target/50106 which was missing handling return register size from 1-3 for Thumb1. Fixed thusly. Final testing on-going with arm-linux-gnueabi with thumb1. Ok to backport to 4.6 branch given it is branch freeze time ? I'll be able to commit this to the branch latest by tomorrow A.M. UK time. cheers Ramana 2011-10-19 Ramana Radhakrishnan PR target/50106 * config/arm/arm.c (thumb_unexpanded_epilogue): Handle return reg size from 1-3. Index: gcc/config/arm/arm.c =================================================================== --- gcc/config/arm/arm.c (revision 180200) +++ gcc/config/arm/arm.c (working copy) @@ -21652,7 +21652,7 @@ if (extra_pop > 0) { unsigned long extra_mask = (1 << extra_pop) - 1; - live_regs_mask |= extra_mask << (size / UNITS_PER_WORD); + live_regs_mask |= extra_mask << ((size + 3) / UNITS_PER_WORD); } /* The prolog may have pushed some high registers to use as