diff options
author | Ash Wolf <ninji@wuffs.org> | 2022-11-07 03:06:21 +0000 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2022-11-07 03:06:21 +0000 |
commit | 9a46dd0e2e80790d9848c0bbd718932a27c23269 (patch) | |
tree | e7a8e976c7138d50a69ff4778c4e8572efd94452 /includes/compiler/CMachine.h | |
parent | d0b9848c54e6f85ab713f059dcd1ddef7e57caa6 (diff) | |
download | MWCC-9a46dd0e2e80790d9848c0bbd718932a27c23269.tar.gz MWCC-9a46dd0e2e80790d9848c0bbd718932a27c23269.zip |
honk
Diffstat (limited to '')
-rw-r--r-- | includes/compiler/CMachine.h | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/includes/compiler/CMachine.h b/includes/compiler/CMachine.h new file mode 100644 index 0000000..a4bc1a5 --- /dev/null +++ b/includes/compiler/CMachine.h @@ -0,0 +1,84 @@ +#ifndef COMPILER_CMACHINE_H +#define COMPILER_CMACHINE_H + +#include "compiler/common.h" + +#ifdef __MWERKS__ +#pragma options align=mac68k +#endif + +extern TypeIntegral stbool; +extern TypeIntegral stchar; +extern TypeIntegral stsignedchar; +extern TypeIntegral stunsignedchar; +extern TypeIntegral stwchar; +extern TypeIntegral stsignedshort; +extern TypeIntegral stunsignedshort; +extern TypeIntegral stsignedint; +extern TypeIntegral stunsignedint; +extern TypeIntegral stsignedlong; +extern TypeIntegral stunsignedlong; +extern TypeIntegral stsignedlonglong; +extern TypeIntegral stunsignedlonglong; +extern TypeIntegral stfloat; +extern TypeIntegral stshortdouble; +extern TypeIntegral stdouble; +extern TypeIntegral stlongdouble; + +extern TypeStruct stvectorunsignedchar; +extern TypeStruct stvectorsignedchar; +extern TypeStruct stvectorboolchar; +extern TypeStruct stvectorunsignedshort; +extern TypeStruct stvectorsignedshort; +extern TypeStruct stvectorboolshort; +extern TypeStruct stvectorunsignedlong; +extern TypeStruct stvectorsignedlong; +extern TypeStruct stvectorboollong; +extern TypeStruct stvectorfloat; +extern TypeStruct stvectorpixel; +extern TypeStruct stvector; + +extern void CMach_Configure(void); +extern SInt32 CMach_GetQUALalign(UInt32 qual); +extern SInt32 CMach_ArgumentAlignment(Type *type); +extern SInt32 CMach_AllocationAlignment(Type *type, UInt32 qual); +extern CInt64 CMach_CalcIntDiadic(Type *type, CInt64 left, short op, CInt64 right); +extern CInt64 CMach_CalcIntMonadic(Type *type, short op, CInt64 val); +extern CInt64 CMach_CalcIntConvertFromFloat(Type *type, Float fval); +extern void CMach_InitIntMem(Type *type, CInt64 val, void *mem); +extern void CMach_InitVectorMem(Type *type, MWVector128 val, void *mem, Boolean flag); +extern Float CMach_CalcFloatDiadic(Type *type, Float left, short op, Float right); +extern Float CMach_CalcFloatMonadic(Type *type, short op, Float fval); +extern Boolean CMach_CalcFloatDiadicBool(Type *type, Float left, short op, Float right); +extern Boolean CMach_CalcVectorDiadicBool(Type *type, MWVector128 *left, short op, MWVector128 *right); +extern char *CMach_FloatScan(char *input, Float *result, Boolean *fail); +extern Float CMach_CalcFloatConvertFromInt(Type *type, CInt64 val); +extern Float CMach_CalcFloatConvert(Type *type, Float fval); +extern Boolean CMach_FloatIsZero(Float fval); +extern Boolean CMach_FloatIsOne(Float fval); +extern Boolean CMach_FloatIsNegOne(Float fval); +extern void CMach_InitFloatMem(Type *type, Float val, void *mem); +extern void CMach_PrintFloat(char *buf, Float val); +extern void CMach_PragmaParams(void); +extern void CMach_AdjustFuntionArgs(void); +extern SInt16 CMach_GetStructAlign(TypeStruct *tstruct); +extern SInt16 CMach_GetClassAlign(TypeClass *tclass); +extern SInt16 CMach_GetTypeAlign(Type *type); +extern SInt16 CMach_MemberAlignValue(Type *type, SInt32 var); +extern void CMach_StructLayoutInitOffset(SInt32 offset); +extern SInt32 CMach_StructLayoutGetCurSize(void); +extern SInt32 CMach_StructLayoutGetOffset(Type *type, UInt32 qual); +extern SInt32 CMach_StructLayoutBitfield(TypeBitfield *tbitfield, UInt32 qual); +extern UInt8 CMach_GetFunctionResultClass(TypeFunc *tfunc); +extern Boolean CMach_PassResultInHiddenArg(Type *type); +extern const char *CMach_GetCPU(void); +extern Boolean CMach_FloatIsPowerOf2(Float flt); +extern Float CMach_FloatReciprocal(Float flt); +extern SInt32 CMach_RoundedSizeOf(Object *object); +extern void CMach_ReInitRuntimeObjects(void); + +#ifdef __MWERKS__ +#pragma options align=reset +#endif + +#endif |