summaryrefslogtreecommitdiff
path: root/includes/compiler/CMachine.h
blob: 72efceaa9042714e73455743249e27a27b7342d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
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(/* unknown args */);
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 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