From: ceriel Date: Fri, 16 Jan 1987 17:17:12 +0000 (+0000) Subject: conversion to new assembler syntax X-Git-Tag: release-5-5~4980 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=f9f1db874f0a704ccf36729b59e0d3e1952d78d4;p=ack.git conversion to new assembler syntax --- diff --git a/mach/ns/ncg/mach.c b/mach/ns/ncg/mach.c index 0d33f342f..965fecab2 100644 --- a/mach/ns/ncg/mach.c +++ b/mach/ns/ncg/mach.c @@ -27,7 +27,7 @@ con_mult(sz) { if (sz != 4) fatal("bad icon/ucon size"); - fprintf(codefile,".long\t%s\n",str); + fprintf(codefile,".data4\t%s\n",str); } #ifdef REGVARS @@ -75,7 +75,7 @@ f_regsave(){ fprintf(codefile,"%c%s", c, regadm[i].ra_str); c = ','; } - fprintf(codefile, "], %d\n", lbytes); + fprintf(codefile, "], %ld\n", lbytes); for (i=0;i=0) fprintf(codefile, "movd %ld(fp), %s", @@ -129,17 +129,17 @@ mes(type) word type ; { prolog(nlocals) full nlocals; { #ifndef REGVARS - fprintf(codefile, "enter[], %d\n",nlocals); + fprintf(codefile, "enter[], %ld\n",nlocals); #else lbytes = nlocals; #endif } char *segname[] = { - ".text", - ".data", - ".data", - ".bss" + ".sect .text", + ".sect .data", + ".sect .rom", + ".sect .bss" }; con_float() { diff --git a/mach/ns/ncg/mach.h b/mach/ns/ncg/mach.h index 91ce7f71f..225c9dcd5 100644 --- a/mach/ns/ncg/mach.h +++ b/mach/ns/ncg/mach.h @@ -6,19 +6,22 @@ #define newilb(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 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 off_fmt "%d" +#define cst_fmt "%ld" +#define off_fmt "%ld" #define ilb_fmt "I%03x%x" #define dlb_fmt "_%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_ilb(x) fprintf(codefile,".long\t%s\n",x) -#define con_dlb(x) fprintf(codefile,".long\t%s\n",x) +#define con_cst(x) fprintf(codefile,".data4\t%ld\n",x) +#define con_ilb(x) fprintf(codefile,".data4\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