From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Andrew Gierth Newsgroups: gmane.lisp.guile.bugs Subject: bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch Date: Fri, 19 Jun 2020 17:07:34 +0100 Message-ID: <87366r9h34.fsf@news-spur.riddles.org.uk> References: <3583c04a12981cebf9a014b71c2d6f1a27b851af@webmail> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="125963"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (berkeley-unix) To: 40737@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Fri Jun 19 18:08:17 2020 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jmJYu-000WhH-2I for guile-bugs@m.gmane-mx.org; Fri, 19 Jun 2020 18:08:16 +0200 Original-Received: from localhost ([::1]:38842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmJYs-0008SG-13 for guile-bugs@m.gmane-mx.org; Fri, 19 Jun 2020 12:08:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40902) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmJYg-0008MJ-KY for bug-guile@gnu.org; Fri, 19 Jun 2020 12:08:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45133) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jmJYf-00022u-TI for bug-guile@gnu.org; Fri, 19 Jun 2020 12:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jmJYf-00045g-N0 for bug-guile@gnu.org; Fri, 19 Jun 2020 12:08:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <3583c04a12981cebf9a014b71c2d6f1a27b851af@webmail> Resent-From: Andrew Gierth Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 19 Jun 2020 16:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40737 X-GNU-PR-Package: guile Original-Received: via spool by 40737-submit@debbugs.gnu.org id=B40737.159258285915692 (code B ref 40737); Fri, 19 Jun 2020 16:08:01 +0000 Original-Received: (at 40737) by debbugs.gnu.org; 19 Jun 2020 16:07:39 +0000 Original-Received: from localhost ([127.0.0.1]:56679 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmJYJ-000452-9I for submit@debbugs.gnu.org; Fri, 19 Jun 2020 12:07:39 -0400 Original-Received: from lungold.riddles.org.uk ([82.68.208.19]:12664) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmJYH-00044t-EG for 40737@debbugs.gnu.org; Fri, 19 Jun 2020 12:07:38 -0400 Original-Received: from [192.168.127.1] (port=28388 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtp (Exim 4.92.3 (FreeBSD)) (envelope-from ) id 1jmJYF-0000fX-24 for 40737@debbugs.gnu.org; Fri, 19 Jun 2020 16:07:35 +0000 Original-Received: from localhost ([127.0.0.1]:53821 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.93.0.4 (FreeBSD)) (envelope-from ) id 1jmJYE-0000PK-Ts for 40737@debbugs.gnu.org; Fri, 19 Jun 2020 16:07:35 +0000 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:9809 Archived-At: --=-=-= Content-Type: text/plain Patch attached. -- Andrew. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=guile-arm.patch Content-Description: arm constant fix diff --git a/libguile/lightening/lightening/arm-cpu.c b/libguile/lightening/lightening/arm-cpu.c index 4445266af..2b4eecc29 100644 --- a/libguile/lightening/lightening/arm-cpu.c +++ b/libguile/lightening/lightening/arm-cpu.c @@ -230,7 +230,7 @@ encode_thumb_immediate(unsigned int v) return ((v & 0xff) | (1 << 12)); /* abcdefgh 00000000 abcdefgh 00000000 */ if (((v & 0xffff0000) >> 16) == (v & 0xffff) && (v & 0xff) == 0) - return ((v & 0x000000ff) | (2 << 12)); + return (((v & 0x0000ff00) >> 8) | (2 << 12)); /* abcdefgh abcdefgh abcdefgh abcdefgh */ if ( (v & 0xff) == ((v & 0xff00) >> 8) && ((v & 0xff00) >> 8) == ((v & 0xff0000) >> 16) && --=-=-=--