X-Loop: help-debbugs@HIDDEN Subject: bug#42060: [3.0.4] Incorrect =?UTF-8?Q?=E2=80=98eqv=3F=E2=80=99?= reduction in =?UTF-8?Q?64=E2=86=9232-bit?= cross-compilation Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: janneke@HIDDEN, bug-guile@HIDDEN Resent-Date: Fri, 26 Jun 2020 14:05:01 +0000 Resent-Message-ID: <handler.42060.B.159318028010631 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 42060 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 42060 <at> debbugs.gnu.org Cc: "Jan (janneke) Nieuwenhuizen" <janneke@HIDDEN> X-Debbugs-Original-To: bug-guile@HIDDEN X-Debbugs-Original-Xcc: "Jan (janneke) Nieuwenhuizen" <janneke@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.159318028010631 (code B ref -1); Fri, 26 Jun 2020 14:05:01 +0000 Received: (at submit) by debbugs.gnu.org; 26 Jun 2020 14:04:40 +0000 Received: from localhost ([127.0.0.1]:42925 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1jooy8-0002lP-5N for submit <at> debbugs.gnu.org; Fri, 26 Jun 2020 10:04:40 -0400 Received: from lists.gnu.org ([209.51.188.17]:57486) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1jooy5-0002lH-Fn for submit <at> debbugs.gnu.org; Fri, 26 Jun 2020 10:04:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1jooy5-0006Tb-8z for bug-guile@HIDDEN; Fri, 26 Jun 2020 10:04:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39808) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1jooy4-0004rW-VG for bug-guile@HIDDEN; Fri, 26 Jun 2020 10:04:36 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=35590 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from <ludo@HIDDEN>) id 1jooy4-0004b6-IV for bug-guile@HIDDEN; Fri, 26 Jun 2020 10:04:36 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 9 Messidor an 228 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 26 Jun 2020 16:04:34 +0200 Message-ID: <87zh8pncst.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, In <https://issues.guix.gnu.org/42047>, janneke found that cross-compiling an =E2=80=98eqv?=E2=80=99 form from x86_64 to i686 leads to= an incorrect =E2=80=98eqv?=E2=80=99 reduction (this was not the case in 3.0.2). Reprodu= cer: (lambda (i) (eqv? i #x6478696f)) Then cross-compile from x86_64 like this: guild compile -O3 --target=3Di586-pc-gnu -o bad.go reproducer.scm and compile natively on a 32-bit platform with: guild compile -O3 -o good.go reproducer.scm If you disassemble good.go and bad.go, the diff goes like this: --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- /tmp/good.asm 2020-06-26 15:56:35.671024432 +0200 +++ /tmp/bad.asm 2020-06-26 15:56:35.651024548 +0200 @@ -1,55 +1,39 @@ Disassembly of <unnamed function> at #x98: - 0 (instrument-entry 16348) at eqv-reduction-bug.scm:1:0 + 0 (instrument-entry 16348) at /home/ludo/src/guile-debugging/eqv-reduction-bug.scm:1:0 2 (assert-nargs-ee/locals 1 0) ;; 1 slot (0 args) - 3 (make-non-immediate 0 16343) ;; #<procedure a4f000 at eqv-reduction-bug.scm:1:0 (i)> + 3 (make-non-immediate 0 16343) ;; #<procedure a4f000 at /home/ludo/src/guile-debugging/eqv-reduction-bug.scm:1:?> 5 (handle-interrupts) 6 (return-values) Disassembly of <unnamed function> at #xb4: - 0 (instrument-entry 16351) at eqv-reduction-bug.scm:1:0 + 0 (instrument-entry 16351) at /home/ludo/src/guile-debugging/eqv-reduction-bug.scm:1:0 2 (assert-nargs-ee/locals 2 0) ;; 2 slots (1 arg) 3 (static-ref 1 16346) ;; 1685612911 - 5 (eq? 0 1) at eqv-reduction-bug.scm:2:2 - 6 (je 21) ;; -> L3 - 7 (immediate-tag=? 0 7 0) ;; heap-object? - 9 (jne 14) ;; -> L2 - 10 (heap-tag=? 0 127 23) ;; heap-number? - 12 (jne 11) ;; -> L2 - 13 (heap-numbers-equal? 0 1) - 14 (jne 5) ;; -> L1 - 15 (make-short-immediate 1 1028) ;; #t - 16 (reset-frame 1) ;; 1 slot - 17 (handle-interrupts) - 18 (return-values) + 5 (eq? 0 1) at /home/ludo/src/guile-debugging/eqv-reduction-bug.scm:2:2 + 6 (jne 5) ;; -> L1 + 7 (make-short-immediate 1 1028) ;; #t + 8 (reset-frame 1) ;; 1 slot + 9 (handle-interrupts) + 10 (return-values) L1: - 19 (make-short-immediate 1 4) ;; #f - 20 (reset-frame 1) ;; 1 slot - 21 (handle-interrupts) - 22 (return-values) -L2: - 23 (make-short-immediate 1 4) ;; #f - 24 (reset-frame 1) ;; 1 slot - 25 (handle-interrupts) - 26 (return-values) -L3: - 27 (make-short-immediate 1 1028) ;; #t - 28 (reset-frame 1) ;; 1 slot - 29 (handle-interrupts) - 30 (return-values) + 11 (make-short-immediate 1 4) ;; #f + 12 (reset-frame 1) ;; 1 slot + 13 (handle-interrupts) + 14 (return-values) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable IOW, bad.go reduced =E2=80=98eqv?=E2=80=99 to =E2=80=98eq?=E2=80=99. This might come from 7df3f3414bfb19a1bd7fbe29bc30a1ab28bf4319, perhaps with an issue of the time at which =E2=80=98target-most-positive-fixnum=E2= =80=99 is called, similar to what was fixed in a0b9d866380b04aff27dcbcf1e13051f3d9685ad. To be continued=E2=80=A6 Ludo=E2=80=99. --=-=-=--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Subject: bug#42060: Acknowledgement ([3.0.4] Incorrect =?UTF-8?Q?=E2=80=98eqv=3F=E2=80=99?= reduction in =?UTF-8?Q?64=E2=86=9232-bit?= cross-compilation) Message-ID: <handler.42060.B.159318028010631.ack <at> debbugs.gnu.org> References: <87zh8pncst.fsf@HIDDEN> X-Gnu-PR-Message: ack 42060 X-Gnu-PR-Package: guile Reply-To: 42060 <at> debbugs.gnu.org Date: Fri, 26 Jun 2020 14:05:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. As you requested using X-Debbugs-CC, your message was also forwarded to "Jan (janneke) Nieuwenhuizen" <janneke@HIDDEN> (after having been given a bug report number, if it did not have one). Your message has been sent to the package maintainer(s): bug-guile@HIDDEN If you wish to submit further information on this problem, please send it to 42060 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 42060: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D42060 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
Received: (at control) by debbugs.gnu.org; 26 Jun 2020 15:45:43 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 26 11:45:43 2020 Received: from localhost ([127.0.0.1]:42962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1joqXv-0005Cx-0s for submit <at> debbugs.gnu.org; Fri, 26 Jun 2020 11:45:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1joqXr-0005Cj-Re for control <at> debbugs.gnu.org; Fri, 26 Jun 2020 11:45:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41324) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1joqXm-0006Kc-HZ for control <at> debbugs.gnu.org; Fri, 26 Jun 2020 11:45:34 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=35708 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from <ludo@HIDDEN>) id 1joqXl-0000Rj-MY for control <at> debbugs.gnu.org; Fri, 26 Jun 2020 11:45:34 -0400 Date: Fri, 26 Jun 2020 17:45:30 +0200 Message-Id: <87v9jdn84l.fsf@HIDDEN> To: control <at> debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> Subject: control message for bug #42060 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) severity 42060 important quit
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.