conversion to new assembler syntax
This commit is contained in:
parent
c6ace07201
commit
f9f1db874f
|
@ -27,7 +27,7 @@ con_mult(sz)
|
||||||
{
|
{
|
||||||
if (sz != 4)
|
if (sz != 4)
|
||||||
fatal("bad icon/ucon size");
|
fatal("bad icon/ucon size");
|
||||||
fprintf(codefile,".long\t%s\n",str);
|
fprintf(codefile,".data4\t%s\n",str);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef REGVARS
|
#ifdef REGVARS
|
||||||
|
@ -75,7 +75,7 @@ f_regsave(){
|
||||||
fprintf(codefile,"%c%s", c, regadm[i].ra_str);
|
fprintf(codefile,"%c%s", c, regadm[i].ra_str);
|
||||||
c = ',';
|
c = ',';
|
||||||
}
|
}
|
||||||
fprintf(codefile, "], %d\n", lbytes);
|
fprintf(codefile, "], %ld\n", lbytes);
|
||||||
for (i=0;i<n_regvars;i++)
|
for (i=0;i<n_regvars;i++)
|
||||||
if (regadm[i].ra_off>=0)
|
if (regadm[i].ra_off>=0)
|
||||||
fprintf(codefile, "movd %ld(fp), %s",
|
fprintf(codefile, "movd %ld(fp), %s",
|
||||||
|
@ -129,17 +129,17 @@ mes(type) word type ; {
|
||||||
prolog(nlocals) full nlocals; {
|
prolog(nlocals) full nlocals; {
|
||||||
|
|
||||||
#ifndef REGVARS
|
#ifndef REGVARS
|
||||||
fprintf(codefile, "enter[], %d\n",nlocals);
|
fprintf(codefile, "enter[], %ld\n",nlocals);
|
||||||
#else
|
#else
|
||||||
lbytes = nlocals;
|
lbytes = nlocals;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
char *segname[] = {
|
char *segname[] = {
|
||||||
".text",
|
".sect .text",
|
||||||
".data",
|
".sect .data",
|
||||||
".data",
|
".sect .rom",
|
||||||
".bss"
|
".sect .bss"
|
||||||
};
|
};
|
||||||
|
|
||||||
con_float() {
|
con_float() {
|
||||||
|
|
|
@ -6,19 +6,22 @@
|
||||||
#define newilb(x) fprintf(codefile,"%s:\n",x)
|
#define newilb(x) fprintf(codefile,"%s:\n",x)
|
||||||
#define newdlb(x) fprintf(codefile,"%s:\n",x)
|
#define newdlb(x) fprintf(codefile,"%s:\n",x)
|
||||||
#define dlbdlb(x,y) fprintf(codefile,"%s = %s\n",x,y)
|
#define dlbdlb(x,y) fprintf(codefile,"%s = %s\n",x,y)
|
||||||
#define newlbss(l,x) fprintf(codefile,"%s:.space\t%d\n",l,x);
|
#define newlbss(l,x) fprintf(codefile,"%s:.space\t%ld\n",l,x);
|
||||||
|
|
||||||
#define cst_fmt "%d"
|
#define cst_fmt "%ld"
|
||||||
#define off_fmt "%d"
|
#define off_fmt "%ld"
|
||||||
#define ilb_fmt "I%03x%x"
|
#define ilb_fmt "I%03x%x"
|
||||||
#define dlb_fmt "_%d"
|
#define dlb_fmt "_%d"
|
||||||
#define hol_fmt "hol%d"
|
#define hol_fmt "hol%d"
|
||||||
|
|
||||||
#define hol_off "%d+hol%d"
|
#define hol_off "%ld+hol%d"
|
||||||
|
|
||||||
#define con_cst(x) fprintf(codefile,".long\t%d\n",x)
|
#define con_cst(x) fprintf(codefile,".data4\t%ld\n",x)
|
||||||
#define con_ilb(x) fprintf(codefile,".long\t%s\n",x)
|
#define con_ilb(x) fprintf(codefile,".data4\t%s\n",x)
|
||||||
#define con_dlb(x) fprintf(codefile,".long\t%s\n",x)
|
#define con_dlb(x) fprintf(codefile,".data4\t%s\n",x)
|
||||||
|
|
||||||
|
#define fmt_id(fr,to) sprintf(to, "_%s", fr)
|
||||||
|
|
||||||
|
#define modhead ".sect .text; .sect .rom; .sect .data; .sect .bss\n"
|
||||||
|
|
||||||
#define id_first '_'
|
|
||||||
#define BSS_INIT 0
|
#define BSS_INIT 0
|
||||||
|
|
Loading…
Reference in a new issue