bugMIT/GNU Scheme - Bugs: bug #27385, compiler still generates bad i386...

 
 

bug #27385: compiler still generates bad i386 code in the general case of FIXNUM-LSH, for negative arguments

Submitter:  Taylor R. Campbell <riastradh>
Submitted:  Sat 05 Sep 2009 06:37:02 AM UTC
   
 
Category:  compiler Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect behavior
Status:  Fixed Privacy:  Public
Assigned to:  riastradh Originator Name: 
Open/Closed:  Closed
Keywords: 
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 13 Nov 2009 10:10:24 PM UTC, comment #1: 

Should be fixed in commit 1f62f5c1dc6575221159605ab72e44adcafdfe7b.

Taylor R. Campbell <riastradh>
Group Member
Sat 05 Sep 2009 06:37:02 AM UTC, original submission:  

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.

Taylor R. Campbell <riastradh>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by riastradh (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-08-30 riastradh StatusReady For Test Fixed
        Assigned toNone riastradh
        Open/ClosedOpen Closed
    2009-11-13 riastradh StatusNone Ready For Test
    2009-09-05 riastradh Summarycompiler still generates bad code in the general case of FIXNUM-LSH, for negative arguments compiler still generates bad i386 code in the general case of FIXNUM-LSH, for negative arguments

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code