[M3devel] int32 vs. integer in compare result?

Jay K jay.krell at cornell.edu
Sun Dec 20 15:57:32 CET 2009


In m3front\src\misc\CG.m3:

 

PROCEDURE Compare (t: ZType;  op: Cmp) =
  BEGIN
    IF Force_pair (commute := TRUE) THEN
      op := M3CG.SwappedCompare [op];
    END;
    cg.compare (t, Target.Integer.cg_type, op);
    SPop (2, "Compare");
    SPush (Type.Int32);
  END Compare;


 

compare(input type, output type, operation)

 

The integrated backend ignores the output type.

The gcc backend does not.

 

Doesn't it seem like in the above, Target.Integer and Int32 should match?

That compare is being asked to return a possibly larger result than the

front end expects?

 

 - Jay
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20091220/ace132e8/attachment-0001.html>


More information about the M3devel mailing list