summaryrefslogtreecommitdiff
path: root/includes/compiler/PCodeAssembly.h
blob: 1819a0427034693a8b55eebaa230ad93d447e5b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef COMPILER_PCODEASSEMBLY_H
#define COMPILER_PCODEASSEMBLY_H

#include "compiler/common.h"

#ifdef __MWERKS__
#pragma options align=mac68k
#endif
typedef struct WeirdOperand {
    short type; // matches MWReloc
    Object *x2;
    UInt32 x6;
} WeirdOperand;

typedef struct EntryPoint {
    struct EntryPoint *next;
    Object *object;
    PCodeBlock *block;
} EntryPoint;
#ifdef __MWERKS__
#pragma options align=reset
#endif

extern UInt32 assemblepcode(PCode *instr, UInt32 offset, WeirdOperand *wop);
extern SInt32 optimizefinalbranches(SInt32 codesize);
extern SInt32 assemblefunction(Object *func, EntryPoint *entrypoints);

#endif