From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23036 invoked by alias); 3 Oct 2013 10:38:46 -0000 Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org Received: (qmail 23027 invoked by uid 89); 3 Oct 2013 10:38:46 -0000 Received: from mail-wi0-f173.google.com (HELO mail-wi0-f173.google.com) (209.85.212.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 03 Oct 2013 10:38:46 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: mail-wi0-f173.google.com Received: by mail-wi0-f173.google.com with SMTP id hq15so8664539wib.12 for ; Thu, 03 Oct 2013 03:38:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:content-type:content-transfer-encoding; bh=p0OK/0pKlQtmztCpc74snoo7aUlHLPD0cmqC0i+5Lno=; b=fxYv4REUd7JhXcV/bLjQ32Cg//ohlDOs1MLUtHZ/BgQFgyny6FKJhKJX4NBh7SGqez KIl/GcfQ4fkCd6OgjJ1wtHqgzUr8HrXSbykIGNIRSPmEo669+2hGalvuFx8r13jRLuF3 XG09FR4BMQ7PtGXtjalqjD1vjkuW5Y7xfWmMs6GYMXFEbrEzsqaLW7llltP3FBWwOi5Z tXWzBgivfKy85eta/QTSnu8GKFhxKGpXyfXOxwnptsACD02FBlh0SUFlldb9j9zWp+sU tvF6UvutvUYZMTPpFgh97GwapaSjdBFWfm+6v72l4lRxZi0GHeVsMvrm6JY2N35i6gMQ CgZw== X-Gm-Message-State: ALoCoQnUu+En48uHUVUnILRdXsOxCDYjLy4BtNEdONwR/9ctxB5fq7uBR5aH2Wnzyc8nHScH78HC X-Received: by 10.180.73.40 with SMTP id i8mr1785040wiv.37.1380796722462; Thu, 03 Oct 2013 03:38:42 -0700 (PDT) Received: from localhost.localdomain (cpc6-seac21-2-0-cust453.7-2.cable.virginmedia.com. [82.1.113.198]) by mx.google.com with ESMTPSA id c4sm12446563wiz.0.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 03 Oct 2013 03:38:41 -0700 (PDT) Message-ID: <524D4930.6020400@linaro.org> Date: Thu, 03 Oct 2013 10:38:00 -0000 From: Will Newton User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 MIME-Version: 1.0 To: libc-ports@sourceware.org CC: patches@linaro.org Subject: [PATCH] ARM: Allow building __longjmp as Thumb. Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00002.txt.bz2 Convert __longjmp code to allow building as Thumb. ports/ChangeLog.arm: 2013-09-25 Will Newton * sysdeps/arm/__longjmp.S (NO_THUMB): Remove define. (__longjmp): Use Thumb supported instructions. * sysdeps/unix/sysv/linux/arm/____longjmp_chk.S (NO_THUMB): Remove define. --- ports/sysdeps/arm/__longjmp.S | 6 +++--- ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ports/sysdeps/arm/__longjmp.S b/ports/sysdeps/arm/__longjmp.S index 2b1f7f4..894c121 100644 --- a/ports/sysdeps/arm/__longjmp.S +++ b/ports/sysdeps/arm/__longjmp.S @@ -16,8 +16,6 @@ License along with the GNU C Library. If not, see . */ -/* ??? Needs more rearrangement for the LDM to handle thumb mode. */ -#define NO_THUMB #include #include #include @@ -28,6 +26,7 @@ ENTRY (__longjmp) mov ip, r0 movs r0, r1 /* get the return value in place */ + it eq moveq r0, #1 /* can't let setjmp() return zero! */ #ifdef CHECK_SP @@ -44,7 +43,8 @@ ENTRY (__longjmp) #ifdef PTR_DEMANGLE PTR_DEMANGLE (fp, a4, a3, a2) ldr a4, [ip], #4 - PTR_DEMANGLE2 (sp, a4, a3) + PTR_DEMANGLE2 (a4, a4, a3) + mov sp, a4 ldr a4, [ip], #4 PTR_DEMANGLE2 (lr, a4, a3) #else diff --git a/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S b/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S index 6ee7a1a..6777ef6 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S +++ b/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S @@ -15,8 +15,6 @@ License along with the GNU C Library. If not, see . */ -/* ??? Needs more rearrangement for the LDM to handle thumb mode. */ -#define NO_THUMB #include .section .rodata.str1.1,"aMS",%progbits,1 -- 1.8.1.4