MWCC/includes/compiler/StackFrame.h

61 lines
2.1 KiB
C
Raw Normal View History

2022-11-07 03:06:21 +00:00
#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