This repository has been archived by the owner on Nov 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
assemble_aux.h
91 lines (72 loc) · 1.72 KB
/
assemble_aux.h
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#ifndef ASSEMBLE_AUX__H
#define ASSEMBLE_AUX__H
#include "stream2.h"
#include "object.h"
#include "extree.h"
#define NO_REG 0777
typedef struct addr_mode {
unsigned type; /* The bits that represent the addressing mode */
/* bits 0:2 are register number */
/* bit 3 is indirect */
/* bits 4:6 are mode, where 0=Rn, 1=(Rn)+,
2=-(Rn), 3=offset(Rn) */
int rel; /* the addressing mode is PC-relative */
EX_TREE *offset; /* Expression giving the offset */
} ADDR_MODE;
void push_cond(
int ok,
STREAM *str);
void pop_cond(
int to);
int express_sym_offset(
EX_TREE *value,
SYMBOL **sym,
unsigned *offset);
void change_dot(
TEXT_RLD *tr,
int size);
int store_word(
STREAM *str,
TEXT_RLD *tr,
int size,
unsigned word);
int store_limits(
STREAM *str,
TEXT_RLD *tr);
void store_value(
STACK *stack,
TEXT_RLD *tr,
int size,
EX_TREE *value);
int do_word(
STACK *stack,
TEXT_RLD *tr,
char *cp,
int size);
SECTION *new_section(
void);
void go_section(
TEXT_RLD *tr,
SECTION *sect);
void free_addr_mode(
ADDR_MODE *mode);
int eval_defined(
EX_TREE *value);
int eval_undefined(
EX_TREE *value);
void mode_extension(
TEXT_RLD *tr,
ADDR_MODE *mode,
STREAM *str);
int check_branch(
STACK *stack,
unsigned offset,
int min,
int max);
unsigned get_register(
EX_TREE *expr);
void write_globals(
FILE *obj);
void migrate_implicit(
void);
#endif