aboutsummaryrefslogtreecommitdiff
path: root/dynasm
diff options
context:
space:
mode:
Diffstat (limited to 'dynasm')
-rw-r--r--dynasm/dasm_proto.h5
-rw-r--r--dynasm/dasm_x86.h7
2 files changed, 6 insertions, 6 deletions
diff --git a/dynasm/dasm_proto.h b/dynasm/dasm_proto.h
index 3e77f70b..114f0fb8 100644
--- a/dynasm/dasm_proto.h
+++ b/dynasm/dasm_proto.h
@@ -29,9 +29,6 @@
29/* Internal DynASM encoder state. */ 29/* Internal DynASM encoder state. */
30typedef struct dasm_State dasm_State; 30typedef struct dasm_State dasm_State;
31 31
32/* Action list type. */
33typedef const unsigned char *dasm_ActList;
34
35 32
36/* Initialize and free DynASM state. */ 33/* Initialize and free DynASM state. */
37DASM_FDEF void dasm_init(Dst_DECL, int maxsection); 34DASM_FDEF void dasm_init(Dst_DECL, int maxsection);
@@ -44,7 +41,7 @@ DASM_FDEF void dasm_setupglobal(Dst_DECL, void **gl, unsigned int maxgl);
44DASM_FDEF void dasm_growpc(Dst_DECL, unsigned int maxpc); 41DASM_FDEF void dasm_growpc(Dst_DECL, unsigned int maxpc);
45 42
46/* Setup encoder. */ 43/* Setup encoder. */
47DASM_FDEF void dasm_setup(Dst_DECL, dasm_ActList actionlist); 44DASM_FDEF void dasm_setup(Dst_DECL, const void *actionlist);
48 45
49/* Feed encoder with actions. Calls are generated by pre-processor. */ 46/* Feed encoder with actions. Calls are generated by pre-processor. */
50DASM_FDEF void dasm_put(Dst_DECL, int start, ...); 47DASM_FDEF void dasm_put(Dst_DECL, int start, ...);
diff --git a/dynasm/dasm_x86.h b/dynasm/dasm_x86.h
index a1f08896..517ee4f6 100644
--- a/dynasm/dasm_x86.h
+++ b/dynasm/dasm_x86.h
@@ -47,6 +47,9 @@ enum {
47#define DASM_POS2SEC(pos) ((pos)>>24) 47#define DASM_POS2SEC(pos) ((pos)>>24)
48#define DASM_POS2PTR(D, pos) (D->sections[DASM_POS2SEC(pos)].rbuf + (pos)) 48#define DASM_POS2PTR(D, pos) (D->sections[DASM_POS2SEC(pos)].rbuf + (pos))
49 49
50/* Action list type. */
51typedef const unsigned char *dasm_ActList;
52
50/* Per-section structure. */ 53/* Per-section structure. */
51typedef struct dasm_Section { 54typedef struct dasm_Section {
52 int *rbuf; /* Biased buffer pointer (negative section bias). */ 55 int *rbuf; /* Biased buffer pointer (negative section bias). */
@@ -132,11 +135,11 @@ void dasm_growpc(Dst_DECL, unsigned int maxpc)
132} 135}
133 136
134/* Setup encoder. */ 137/* Setup encoder. */
135void dasm_setup(Dst_DECL, dasm_ActList actionlist) 138void dasm_setup(Dst_DECL, const void *actionlist)
136{ 139{
137 dasm_State *D = Dst_REF; 140 dasm_State *D = Dst_REF;
138 int i; 141 int i;
139 D->actionlist = actionlist; 142 D->actionlist = (dasm_ActList)actionlist;
140 D->status = DASM_S_OK; 143 D->status = DASM_S_OK;
141 D->section = &D->sections[0]; 144 D->section = &D->sections[0];
142 memset((void *)D->lglabels, 0, D->lgsize); 145 memset((void *)D->lglabels, 0, D->lgsize);