diff options
Diffstat (limited to 'includes/compiler/StackFrame.h')
-rw-r--r-- | includes/compiler/StackFrame.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/includes/compiler/StackFrame.h b/includes/compiler/StackFrame.h new file mode 100644 index 0000000..3145bdb --- /dev/null +++ b/includes/compiler/StackFrame.h @@ -0,0 +1,60 @@ +#ifndef COMPILER_STACKFRAME_H +#define COMPILER_STACKFRAME_H + +#include "compiler/common.h" + +#ifdef __MWERKS__ +#pragma options align=mac68k +#endif + +enum ObjClass { + ObjClass0, + ObjClass1, + ObjClass2, + ObjClassMax +}; + +extern Boolean requires_frame; +extern Boolean makes_call; +extern Boolean uses_globals; +extern Boolean dynamic_stack; +extern Boolean large_stack; +extern Object *dummyvaparam; +extern void *dummyprofiler; + +extern void init_stack_globals(void); +extern void init_frame_sizes(void); +extern void assign_local_memory(Object *obj); +extern void assign_locals_to_memory(ObjectList *first); +extern void compute_frame_sizes(void); +extern void generate_prologue(PCodeBlock *block); +extern void generate_epilogue(PCodeBlock *block, Boolean add_blr); +extern void allocate_dynamic_stack_space(Boolean flag1, int reg1, int reg2, SInt32 size); +extern char *generate_traceback(SInt32 funcsize, char *funcname, SInt32 *tbsize, Object *func); +extern void check_dynamic_aligned_frame(void); +extern void move_varargs_to_memory(void); +extern void assign_arguments_to_memory(Object *func, UInt8 mysteryFlag, Boolean hasVarargs); +extern SInt32 set_out_param_displ(SInt32 a, Type *type, Boolean flag, SInt32 *outvar, SInt32 b); +extern SInt32 out_param_displ_to_offset(SInt32 displ); +extern Boolean needs_frame(void); +extern void update_out_param_size(SInt32 size); +extern void estimate_out_param_size(SInt32 size); +extern void update_out_param_align(SInt32 align); +extern void update_in_param_align(SInt32 align); +extern void update_frame_align(SInt32 align); +extern SInt32 local_offset_32(Object *obj); +extern SInt16 local_offset_lo(Object *obj, SInt32 offset); +extern SInt16 local_offset_ha(Object *obj, SInt32 offset); +extern SInt16 local_offset_16(Object *obj); +extern Boolean local_is_16bit_offset(Object *obj); +extern int local_base_register(Object *obj); +extern Boolean is_large_frame(void); +extern void no_frame_for_asm(void); +extern Boolean can_add_displ_to_local(Object *obj, SInt32 displ); +extern SInt32 get_alloca_alignment(void); + +#ifdef __MWERKS__ +#pragma options align=reset +#endif + +#endif |