C2CSingleFloat.mesa
Copyright Ó 1988, 1990, 1991 by Xerox Corporation. All rights reserved.
Christian Jacobi, August 31, 1988 3:23:56 pm PDT
Christian Jacobi, January 9, 1991 6:03 pm PST
DIRECTORY
C2CDefs,
C2CMain,
IntCodeDefs;
C2CSingleFloat: CEDAR DEFINITIONS =
BEGIN
UseInline: PROC [] RETURNS [BOOL];
--Returns whether inline loopholes and floating point operations should be generated
GoodToUseFloatType: PROC [n: IntCodeDefs.Node] RETURNS [BOOL¬FALSE];
--in doubt not
--single precision float!
LoadAsFloat: PROC [node: IntCodeDefs.Node, simple: BOOL ¬ FALSE] RETURNS [cc: C2CMain.CodeCont];
--Load as single precision float, using type float
--If simple: forces value to be simple; stores value in a temporary if necessary to enforce simpleness.
SomeFloatArithOp: PROC [xApp: IntCodeDefs.ApplyNode, arithOp: IntCodeDefs.ArithOper, leaveFloat: BOOL ¬ FALSE] RETURNS [cc: C2CMain.CodeCont];
--Works only for certain operators
--Works only for wordsize nodes
--screws mode; always leaves result as value
--if leaveFloat type is float else type is standard
SomeFloatCompareOp: PROC [xApp: IntCodeDefs.ApplyNode, compOp: IntCodeDefs.CompareOper] RETURNS [cc: C2CMain.CodeCont];
--Works only for certain operators
--Works only for wordsize nodes
--screws mode; always leaves result as value
SomeFloatConvertOp: PROC [xApp: IntCodeDefs.ApplyNode, convertOp: IntCodeDefs.ConvertOper, leaveFloat: BOOL ¬ FALSE] RETURNS [cc: C2CMain.CodeCont];
--Works only for certain operators
--Works only for wordsize nodes
--screws mode; always leaves result as value
END.