ExtendedFloatSupport.mesa
Copyright Ó 1991 by Xerox Corporation. All rights reserved.
Michael Plass, August 9, 1991 3:31 pm PDT
WARNING: Not all architectures will have native support for this.
Nice Operations
Add:
SAFE
PROC [a, b: Extended]
RETURNS [result: Extended] ~
TRUSTED
INLINE {
PAdd[@a,@b,@result];
};
Subtract:
SAFE
PROC [a, b: Extended]
RETURNS [result: Extended] ~
TRUSTED
INLINE {
PSubtract[@a,@b,@result];
};
Multiply:
SAFE
PROC [a, b: Extended]
RETURNS [result: Extended] ~
TRUSTED
INLINE {
PMultiply[@a,@b,@result];
};
Divide:
SAFE
PROC [a, b: Extended]
RETURNS [result: Extended] ~
TRUSTED
INLINE {
PDivide[@a,@b,@result];
};
Less:
SAFE
PROC [a, b: Extended]
RETURNS [
BOOL] ~
TRUSTED
INLINE {
RETURN [PLess[@a,@b]];
};
Equal:
SAFE
PROC [a, b: Extended]
RETURNS [
BOOL] ~
TRUSTED
INLINE {
RETURN [PEqual[@a,@b]];
};
ExtendedFromDReal:
SAFE
PROC [a:
DREAL]
RETURNS [result: Extended] ~
TRUSTED
INLINE {
PExtendedFromDReal[@a,@result];
};
DRealFromExtended:
SAFE
PROC [a: Extended]
RETURNS [result:
DREAL] ~
TRUSTED
INLINE {
PDRealFromExtended[@a,@result];
};
Nasty Operations
PExtended: TYPE ~ POINTER TO READONLY Extended;
PExtendedResult: TYPE ~ POINTER TO Extended;
PAdd:
PROC [PExtended, PExtended, PExtendedResult] ~
MACHINE
CODE {
"XR𡤎xtendedFloatAdd"
};
PSubtract:
PROC [PExtended, PExtended, PExtendedResult] ~
MACHINE
CODE {
"XR𡤎xtendedFloatSubtract"
};
PMultiply:
PROC [PExtended, PExtended, PExtendedResult] ~
MACHINE
CODE {
"XR𡤎xtendedFloatMultiply"
};
PDivide:
PROC [PExtended, PExtended, PExtendedResult] ~
MACHINE
CODE {
"XR𡤎xtendedFloatDivide"
};
PLess:
PROC [PExtended, PExtended]
RETURNS [
BOOL] ~
MACHINE
CODE {
"XR𡤎xtendedFloatLess"
};
PEqual:
PROC [PExtended, PExtended]
RETURNS [
BOOL] ~
MACHINE
CODE {
"XR𡤎xtendedFloatEqual"
};
PExtendedFromDReal:
PROC [
POINTER
TO
READONLY
DREAL, PExtendedResult] ~
MACHINE
CODE {
"XR𡤎xtendedFromDReal"
};
PDRealFromExtended:
PROC [PExtended,
POINTER
TO
DREAL] ~
MACHINE
CODE {
"XR𡤍RealFromExtended"
};