path: root/6/asm.h
diff options
authorOri Bernstein <>2014-10-08 11:42:07 -0400
committerOri Bernstein <>2014-10-08 11:42:07 -0400
commit4a25c643a09bd41509f7b86c68e6164c91f5f3ee (patch)
tree715503869859c05e64fa177d712669e51620de65 /6/asm.h
parente8c2fe57e7ec1d7465eb6f00bdb7aad8f4264c29 (diff)
Pull out actual code writing into it's own file.
Diffstat (limited to '6/asm.h')
1 files changed, 8 insertions, 4 deletions
diff --git a/6/asm.h b/6/asm.h
index c0c1e1d..e7577ee 100644
--- a/6/asm.h
+++ b/6/asm.h
@@ -185,15 +185,18 @@ struct Isel {
Bitset *initial; /* initial set of locations used by this fn */
+/* globals */
extern char *modenames[];
+extern Type *tyintptr;
+extern Type *tyword;
+extern Type *tyvoid;
+extern Node *abortoob;
/* options */
extern int extracheck;
-/* entry points */
-void genblob(FILE *fd, Node *blob, Htab *globls, Htab *strtab);
-void genasm(FILE *fd, Func *fn, Htab *globls, Htab *strtab);
-void genstrings(FILE *fd, Htab *strtab);
+void simpglobl(Node *dcl, Htab *globls, Func ***fn, size_t *nfn, Node ***blob, size_t *nblob);
+void selfunc(Isel *is, Func *fn, Htab *globls, Htab *strtab);
void gen(Node *file, char *out);
/* location generation */
@@ -212,6 +215,7 @@ Loc *locmems(long disp, Loc *base, Loc *idx, int scale, Mode mode);
Loc *locmemls(char *disp, Loc *base, Loc *idx, int scale, Mode mode);
Loc *loclit(long val, Mode m);
Loc *loclitl(char *lbl);
+char *asmname(Node *n);
Loc *coreg(Reg r, Mode m);
int isfloatmode(Mode m);
int isintmode(Mode m);