bug-mit-scheme
[Top][All Lists]
Advanced

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

[Bug-mit-scheme] [bug #27385] compiler still generates bad code in the g


From: Taylor R. Campbell
Subject: [Bug-mit-scheme] [bug #27385] compiler still generates bad code in the general case of FIXNUM-LSH, for negative arguments
Date: Sat, 05 Sep 2009 06:37:03 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US) AppleWebKit/525.18 (KHTML, like Gecko, Safari/525.20) OmniWeb/v622.6.1.0.111015

URL:
  <http://savannah.gnu.org/bugs/?27385>

                 Summary: compiler still generates bad code in the general
case of FIXNUM-LSH, for negative arguments
                 Project: MIT/GNU Scheme
            Submitted by: riastradh
            Submitted on: Sat 05 Sep 2009 06:37:02 GMT
                Category: compiler
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect behavior
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                Keywords: 

    _______________________________________________________

Details:

All of the following should yield -1:

(fix:lsh -1 -1)
;Value: 33554431

(fix:lsh -1 -30)
;Value: 0

(fix:lsh -123 -30)
;Value: 0

This should yield -62:

(fix:lsh -123 -1)
;Value: 33554370

The general case is already so complex that it would probably be worthwhile
just to bail and defer to the microcode primitive, but I don't think Liar can
do that only for particular uses of primitives, and obviously we don't want to
do that for every use of the FIXNUM-LSH primitive.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27385>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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