2022-11-07 03:06:21 +00:00
|
|
|
#ifndef COMPILER_CODEGEN_H
|
|
|
|
#define COMPILER_CODEGEN_H
|
|
|
|
|
|
|
|
#include "compiler/common.h"
|
|
|
|
#include "compiler/CPrep.h"
|
|
|
|
|
|
|
|
#ifdef __MWERKS__
|
|
|
|
#pragma options align=mac68k
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern Macro vecM;
|
|
|
|
extern Macro altivecM;
|
|
|
|
extern Object *gFunction;
|
2022-11-20 05:07:22 +00:00
|
|
|
extern CLabel *returnlabel;
|
|
|
|
extern CLabel *cleanreturnlabel;
|
2022-11-07 03:06:21 +00:00
|
|
|
extern Boolean needs_cleanup;
|
|
|
|
extern Statement *current_statement;
|
|
|
|
extern int has_catch_blocks;
|
|
|
|
extern int disable_optimizer;
|
|
|
|
extern SInt32 current_linenumber;
|
|
|
|
extern Boolean has_altivec_arrays;
|
|
|
|
extern short high_reg;
|
|
|
|
extern short low_reg;
|
|
|
|
extern short high_offset;
|
|
|
|
extern short low_offset;
|
|
|
|
extern short low_reg2;
|
|
|
|
extern short high_reg2;
|
|
|
|
extern PCodeLabel *pic_base_pcodelabel;
|
|
|
|
extern Object *dyld_stub_binding_helper;
|
|
|
|
extern Object *rt_cvt_fp2unsigned;
|
|
|
|
extern Object *rt_profile_entry;
|
|
|
|
extern Object *rt_profile_exit;
|
|
|
|
extern Object *rt_div2i;
|
|
|
|
extern Object *rt_div2u;
|
|
|
|
extern Object *rt_mod2i;
|
|
|
|
extern Object *rt_mod2u;
|
|
|
|
extern Object *rt_shr2i;
|
|
|
|
extern Object *rt_shr2u;
|
|
|
|
extern Object *rt_shl2i;
|
|
|
|
extern Object *rt_cvt_ull_dbl;
|
|
|
|
extern Object *rt_cvt_sll_dbl;
|
|
|
|
extern Object *rt_cvt_ull_flt;
|
|
|
|
extern Object *rt_cvt_sll_flt;
|
|
|
|
extern Object *rt_cvt_dbl_usll;
|
|
|
|
|
|
|
|
extern VarInfo *CodeGen_GetNewVarInfo(void);
|
|
|
|
extern Object *maketemporary(Type *type);
|
|
|
|
typedef void (*ArgumentProcessor)(Object *obj, short reg);
|
|
|
|
extern void process_arguments(ArgumentProcessor func, Boolean flag);
|
|
|
|
extern void move_assigned_argument(Object *obj, short reg);
|
2022-11-20 05:07:22 +00:00
|
|
|
extern void assign_labels(Statement *stmt);
|
2022-12-29 12:32:55 +00:00
|
|
|
extern void CodeGen_Generator(Statement *statements, Object *func, UInt8 mysteryFlag, Boolean callOnModuleBind);
|
2022-11-20 05:07:22 +00:00
|
|
|
extern void CodeGen_GenVDispatchThunk(Object *thunkobj, Object *obj, SInt32 a, SInt32 b, SInt32 c);
|
|
|
|
extern void CodeGen_SetupRuntimeObjects(void);
|
2022-11-07 03:06:21 +00:00
|
|
|
extern Boolean CodeGen_ReInitRuntimeObjects(Boolean is_precompiler);
|
|
|
|
extern Boolean CodeGen_IsPublicRuntimeObject(Object *obj);
|
2022-11-20 05:07:22 +00:00
|
|
|
extern void CodeGen_SOMStub(Object *a, Object *b, Object *c, SInt32 offset);
|
2022-11-07 03:06:21 +00:00
|
|
|
extern void CodeGen_ParseDeclSpec(HashNameNode *identifier, DeclInfo *declinfo);
|
|
|
|
extern void CodeGen_ParsePragma(HashNameNode *name);
|
|
|
|
extern void CodeGen_UpdateObject(Object *object);
|
2022-11-20 05:07:22 +00:00
|
|
|
extern void CodeGen_UpdateBackEndOptions(void);
|
2022-12-29 12:32:55 +00:00
|
|
|
extern SInt32 CodeGen_objc_method_self_offset(ObjCMethod *meth);
|
|
|
|
extern SInt32 CodeGen_objc_method_sel_offset(ObjCMethod *meth);
|
|
|
|
extern SInt32 CodeGen_objc_method_arg_offset(ObjCMethod *meth, ObjCMethodArg *arg);
|
|
|
|
extern SInt32 CodeGen_objc_method_args_size(ObjCMethod *meth);
|
2022-11-20 05:07:22 +00:00
|
|
|
extern ENode *CodeGen_HandleIntrinsicCall(Object *func, ENodeList *arg_exprs);
|
|
|
|
extern ENode *CodeGen_HandleTypeCast(ENode *expr, Type *type, UInt32 qual);
|
2023-01-10 11:05:21 +00:00
|
|
|
extern short CodeGen_AssignCheck(const ENode *expr, const Type *type, Boolean flag1, Boolean flag2);
|
2022-11-20 05:07:22 +00:00
|
|
|
extern Boolean CodeGen_CollapseVectorExpression(ENode *expr, MWVector128 *vec, Type *type);
|
|
|
|
extern void CodeGen_InsertSpecialMacros(void);
|
2022-11-07 03:06:21 +00:00
|
|
|
extern char *CodeGen_ExpandSpecialMacro(Macro *macro);
|
2022-11-20 05:07:22 +00:00
|
|
|
extern void CodeGen_reportheapinfo(Boolean release_flag, char *name, char *text);
|
|
|
|
extern void CodeGen_InitialSanityCheck(void);
|
2022-11-07 03:06:21 +00:00
|
|
|
|
|
|
|
#ifdef __MWERKS__
|
|
|
|
#pragma options align=reset
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|