From patchwork Mon Jun 14 06:29:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 55478 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 866691007D1 for ; Mon, 14 Jun 2010 16:30:19 +1000 (EST) Received: (qmail 7838 invoked by alias); 14 Jun 2010 06:30:17 -0000 Received: (qmail 7826 invoked by uid 22791); 14 Jun 2010 06:30:17 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, TW_CC, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.35) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Jun 2010 06:30:10 +0000 Received: from kpbe18.cbf.corp.google.com (kpbe18.cbf.corp.google.com [172.25.105.82]) by smtp-out.google.com with ESMTP id o5E6U5r0031641 for ; Sun, 13 Jun 2010 23:30:06 -0700 Received: from pva4 (pva4.prod.google.com [10.241.209.4]) by kpbe18.cbf.corp.google.com with ESMTP id o5E6U4wu016469 for ; Sun, 13 Jun 2010 23:30:04 -0700 Received: by pva4 with SMTP id 4so2806061pva.16 for ; Sun, 13 Jun 2010 23:30:04 -0700 (PDT) Received: by 10.115.66.30 with SMTP id t30mr4141794wak.161.1276497003967; Sun, 13 Jun 2010 23:30:03 -0700 (PDT) Received: from coign.google.com (adsl-71-133-8-30.dsl.pltn13.pacbell.net [71.133.8.30]) by mx.google.com with ESMTPS id r20sm51125898wam.17.2010.06.13.23.30.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 13 Jun 2010 23:30:03 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [gccgo] Fix i386 unwinding with split stack From: Ian Lance Taylor Date: Sun, 13 Jun 2010 23:29:51 -0700 Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 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 patch fixes i386 stack unwinding when using a split stack. Committed to gccgo branch. Ian Index: libgcc/config/i386/morestack.S =================================================================== --- libgcc/config/i386/morestack.S (revision 155628) +++ libgcc/config/i386/morestack.S (working copy) @@ -114,6 +114,13 @@ __morestack: movl %esp, %ebp .cfi_def_cfa_register %ebp + # We return below with a ret $8. We will return to a single + # return instruction, which will return to the caller of our + # caller. We let the unwinder skip that single return + # instruction, and just return to the real caller. + .cfi_offset 8, 8 + .cfi_escape 0x15, 4, 0x7d # DW_CFA_val_offset_sf, %esp, 12/-4 + # In 32-bit mode the parameters are pushed on the stack. The # argument size is pushed then the new stack frame size is # pushed.