From: ceriel Date: Mon, 9 Feb 1987 16:49:13 +0000 (+0000) Subject: Adapted to new assembler X-Git-Tag: release-5-5~4702 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=0d1c90a23eb17cbceaaf989a8ce05e23754dccdf;p=ack.git Adapted to new assembler --- diff --git a/mach/i80/ncg/mach.c b/mach/i80/ncg/mach.c index 4482e423d..5a9ab6363 100644 --- a/mach/i80/ncg/mach.c +++ b/mach/i80/ncg/mach.c @@ -41,19 +41,27 @@ con_part(sz,w) register sz; word w; { part_size += sz; } +long atol(); + con_mult(sz) word sz; { - long l; if (argval != 4) fatal("bad icon/ucon size"); - l = atol(str); - fprintf(codefile,".short\t%d\n",(int)l); - fprintf(codefile,".short\t%d\n",(int)(l>>16)); + fprintf(codefile,".data4\t%ld\n",atol(str)); } con_float() { + static int warning_given; + int i = argval; - fatal("no reals"); + if (!warning_given) { + fprintf(stderr, "warning: dummy floating point constant\n"); + warning_given = 1; + } + while (i > 0) { + fputs(".data4 0 !dummy float\n", codefile); + i -= 4; + } } @@ -93,8 +101,8 @@ mes(type) word type ; { } char *segname[] = { - ".text", - ".data", - ".data", - ".bss" + ".sect .text", + ".sect .data", + ".sect .rom", + ".sect .bss" }; diff --git a/mach/i80/ncg/mach.h b/mach/i80/ncg/mach.h index 873828545..151bd7406 100644 --- a/mach/i80/ncg/mach.h +++ b/mach/i80/ncg/mach.h @@ -9,15 +9,18 @@ #define cst_fmt "%d" #define off_fmt "%d" -#define ilb_fmt "I%03x%x" +#define ilb_fmt "I%x_%x" #define dlb_fmt "_%d" #define hol_fmt "hol%d" #define hol_off "%d+hol%d" -#define con_cst(x) fprintf(codefile,".word\t%d\n",x) -#define con_ilb(x) fprintf(codefile,".word\t%s\n",x) -#define con_dlb(x) fprintf(codefile,".word\t%s\n",x) +#define con_cst(x) fprintf(codefile,".data2\t%d\n",x) +#define con_ilb(x) fprintf(codefile,".data2\t%s\n",x) +#define con_dlb(x) fprintf(codefile,".data2\t%s\n",x) + +#define fmt_id(sf, st) sprintf(st,"_%s",sf) + +#define modhead ".sect .text; .sect .rom; .sect .data; .sect .bss\n" -#define id_first '_' #define BSS_INIT 0