MWCC/includes/compiler/TOC.h

68 lines
1.9 KiB
C

#ifndef COMPILER_TOC_H
#define COMPILER_TOC_H
#include "compiler/common.h"
#ifdef __MWERKS__
#pragma options align=mac68k
#endif
typedef struct CodeLabelList {
struct CodeLabelList *next;
Object *object;
CLabel *label;
} CodeLabelList;
typedef struct PoolEntry {
struct PoolEntry *next;
Object *object;
SInt32 offset;
void *buffer;
} PoolEntry;
extern ObjectList *toclist;
extern ObjectList *exceptionlist;
extern void *descriptorlist;
extern PoolEntry *floatconstpool;
extern PoolEntry *doubleconstpool;
extern ObjectList *floatconstlist;
extern PoolEntry *vectorconstpool;
extern ObjectList *vectorconstlist;
extern Object toc0;
extern Boolean no_descriptors;
extern Object pic_base;
extern VarInfo pic_base_varinfo;
extern short pic_base_reg;
extern CodeLabelList *codelabellist;
extern void setupaddressing(void);
extern void createNonLazyPointer(Object *obj);
extern void referenceIndirectPointer(Object *obj);
extern Object *createIndirect(Object *obj, Boolean flag1, Boolean flag2);
extern Object *createfloatconstant(Type *type, Float *data);
extern Object *createvectorconstant(Type *type, MWVector128 *data);
extern void DeclarePooledConstants(void);
extern Object *CreateFloatConst(Type *type, Float *data, SInt32 *pOffset);
extern void dumpcodelabels(Object *func);
typedef struct COVCResult {
// this struct might be used in other places too???
short op1;
short op2;
char arg;
} COVCResult;
extern Boolean canoptimizevectorconst(MWVector128 *vecp, Type *type, COVCResult *result);
extern Boolean TOC_use_fsel(ENode *expr);
extern Boolean TOC_use_isel(ENode *expr, Boolean flag);
extern SInt32 GetSizeSkip(ENode *expr);
extern void Optimize64bitMath(ENode *expr);
extern void expandTOCreferences(Statement **stmts);
extern void resetTOCvarinfo(void);
extern Boolean needdescriptor(void);
extern Object *createstaticinitobject(void);
#ifdef __MWERKS__
#pragma options align=reset
#endif
#endif