guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.9-22-g7e8166


From: Mark H Weaver
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.9-22-g7e8166f
Date: Sun, 14 Jul 2013 18:52:51 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=7e8166f5bdb526c021c826943aaf050134cccc83

The branch, stable-2.0 has been updated
       via  7e8166f5bdb526c021c826943aaf050134cccc83 (commit)
      from  e8f329972666db6c9d4644619473e14d54db3a80 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7e8166f5bdb526c021c826943aaf050134cccc83
Author: Mark H Weaver <address@hidden>
Date:   Sun Jul 14 14:47:10 2013 -0400

    Fix VM 'ash' for right shifts by large amounts.
    
    Fixes <http://bugs.gnu.org/14864>.
    Reported by Göran Weinholt <address@hidden>.
    
    * libguile/vm-i-scheme.c (ash): Fallback to 'scm_ash' for right shifts
      with counts >= SCM_I_FIXNUM_BIT, since '>>' is not guaranteed to work
      correctly for large counts.

-----------------------------------------------------------------------

Summary of changes:
 libguile/vm-i-scheme.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/libguile/vm-i-scheme.c b/libguile/vm-i-scheme.c
index b85d980..7402cc1 100644
--- a/libguile/vm-i-scheme.c
+++ b/libguile/vm-i-scheme.c
@@ -388,8 +388,12 @@ VM_DEFINE_FUNCTION (159, ash, "ash", 2)
   if (SCM_I_INUMP (x) && SCM_I_INUMP (y))
     {
       if (SCM_I_INUM (y) < 0)
-        /* Right shift, will be a fixnum. */
-        RETURN (SCM_I_MAKINUM (SCM_I_INUM (x) >> -SCM_I_INUM (y)));
+        {
+          /* Right shift, will be a fixnum. */
+          if (SCM_I_INUM (y) > -SCM_I_FIXNUM_BIT)
+            RETURN (SCM_I_MAKINUM (SCM_I_INUM (x) >> -SCM_I_INUM (y)));
+          /* fall through */
+        }
       else
         /* Left shift. See comments in scm_ash. */
         {


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]