From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21727 invoked by alias); 24 Mar 2012 21:08:04 -0000 Received: (qmail 21718 invoked by uid 22791); 24 Mar 2012 21:08:03 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_GJ X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 24 Mar 2012 21:07:51 +0000 From: "gjl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/51345] [avr] Devices with 8-bit SP need their own multilib(s) Date: Sat, 24 Mar 2012 21:09:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: FIXME, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: gjl at gcc dot gnu.org X-Bugzilla-Status: REOPENED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.1 X-Bugzilla-Changed-Fields: Status Resolution Target Milestone Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-03/txt/msg02142.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51345 Georg-Johann Lay changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | Target Milestone|4.7.0 |4.7.1 --- Comment #6 from Georg-Johann Lay 2012-03-24 21:06:42 UTC --- Reopened: The current (4.7.0) behaviour is: -mtiny-stack acts as multilib-option for 16-bit SP targets in avr2 and avr25, i.e. with that switch will trigger multi-lib from ./tiny-stack resp. ./avr25/tiny-stack The problem is that the tiny-stack multilibs mix 16-bit SP targets that are treated as 8-bit SP, and targets with 8-bit SP. The currect implementation assumes SP.H = 0 in tiny-stack mlibs in order to properly initialize the frame pointer, e.g. in __prologue_saves. This is no good for 16-bit SP targets. Solution: Restore the behaviour for the 16-bit SP targets as was, i.e. -mtiny-stack does not affect multilib selection for these targets, but if specified on the command line, the resulting code will only change SP.L and assume SP.H never changes. For the 8-bit SP targets, -mtiny-stack should remain as in 4.7.0, i.e. used internally to trigger tiny-stack multilibs. Specifying -mtiny-stack on the command line will be redundant for these targets and have no effect.