2022-11-07 03:06:21 +00:00
|
|
|
#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;
|
|
|
|
|
2023-01-10 11:05:21 +00:00
|
|
|
typedef struct PoolEntry {
|
|
|
|
struct PoolEntry *next;
|
|
|
|
Object *object;
|
|
|
|
SInt32 offset;
|
|
|
|
void *buffer;
|
|
|
|
} PoolEntry;
|
|
|
|
|
2022-11-07 03:06:21 +00:00
|
|
|
extern ObjectList *toclist;
|
|
|
|
extern ObjectList *exceptionlist;
|
|
|
|
extern void *descriptorlist;
|
2023-01-10 11:05:21 +00:00
|
|
|
extern PoolEntry *floatconstpool;
|
|
|
|
extern PoolEntry *doubleconstpool;
|
2022-11-07 03:06:21 +00:00
|
|
|
extern ObjectList *floatconstlist;
|
2023-01-10 11:05:21 +00:00
|
|
|
extern PoolEntry *vectorconstpool;
|
2022-11-07 03:06:21 +00:00
|
|
|
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);
|
2023-01-10 11:05:21 +00:00
|
|
|
extern void DeclarePooledConstants(void);
|
|
|
|
extern Object *CreateFloatConst(Type *type, Float *data, SInt32 *pOffset);
|
2022-11-07 03:06:21 +00:00
|
|
|
extern void dumpcodelabels(Object *func);
|
|
|
|
typedef struct COVCResult {
|
|
|
|
// this struct might be used in other places too???
|
|
|
|
short op1;
|
|
|
|
short op2;
|
2022-11-20 05:07:22 +00:00
|
|
|
char arg;
|
2022-11-07 03:06:21 +00:00
|
|
|
} 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
|