1 - Changed %D into %ld.

2 - Adapted to the new linker.
This commit is contained in:
keie 1985-06-04 10:21:15 +00:00
parent 37c3bced4b
commit be932f0f5b
2 changed files with 16 additions and 16 deletions

View file

@ -23,7 +23,7 @@ static char rcsid[] = "$Header$";
* machine dependent back end routines for the Motorola 68000 * machine dependent back end routines for the Motorola 68000
*/ */
#define IEEEFLOAT /* #define IEEEFLOAT */
#ifdef IEEEFLOAT #ifdef IEEEFLOAT
#include "FP.h" #include "FP.h"
@ -58,7 +58,7 @@ con_mult(sz) word sz; {
if (sz != 4) if (sz != 4)
fatal("bad icon/ucon size"); fatal("bad icon/ucon size");
fprintf(codefile,".long %s\n",str); fprintf(codefile,".data4 %s\n",str);
} }
#ifdef IEEEFLOAT #ifdef IEEEFLOAT
@ -86,7 +86,7 @@ con_float()
sz = argval; sz = argval;
if (sz!= 4 && sz!= 8) { if (sz!= 4 && sz!= 8) {
sprintf(mesg,"con_float(): bad fcon size %d %D\nstr: %s\n\0", sprintf(mesg,"con_float(): bad fcon size %d %ld\nstr: %s\n\0",
sz,sz,str); sz,sz,str);
fatal(mesg); fatal(mesg);
} }
@ -104,7 +104,7 @@ con_float()
#endif IEEEFLOAT #endif IEEEFLOAT
while ( sz ) { while ( sz ) {
fprintf(codefile,"\t.word 0x%x,0x%x !float test %s\n", fprintf(codefile,"\t.data2 0x%x,0x%x !float test %s\n",
(int)(*l)&0xFFFF,(int)(*l>>16)&0xFFFF,str); (int)(*l)&0xFFFF,(int)(*l>>16)&0xFFFF,str);
sz -=4 ; sz -=4 ;
l++; l++;
@ -235,7 +235,7 @@ regreturn()
prolog(nlocals) full nlocals; { prolog(nlocals) full nlocals; {
fprintf(codefile,"tst.b -%D(sp)\nlink\ta6,#-%D\n",nlocals+40,nlocals); fprintf(codefile,"tst.b -%ld(sp)\nlink\ta6,#-%ld\n",nlocals+40,nlocals);
} }
@ -264,8 +264,8 @@ mes(type) word type ; {
char *segname[] = { char *segname[] = {
".text", /* SEGTXT */ ".sect .text", /* SEGTXT */
".data", /* SEGCON */ ".sect .data", /* SEGCON */
".data", /* SEGROM */ ".sect .rom", /* SEGROM */
".bss" /* SEGBSS */ ".sect .bss" /* SEGBSS */
}; };

View file

@ -4,11 +4,11 @@
#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 pop_fmt "(sp)+" #define pop_fmt "(sp)+"
#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"
@ -17,11 +17,11 @@
#define arg_off "8+%d(a6)" #define arg_off "8+%d(a6)"
#define hol_off "%d+hol%d" #define hol_off "%d+hol%d"
#define con_cst(x) fprintf(codefile,".short\t%d\n",x) #define con_cst(x) fprintf(codefile,".data2\t%d\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 modhead "" #define modhead ".sect .text;.sect .rom;.sect .data;.sect .bss\n"
#define id_first '_' #define id_first '_'
#define BSS_INIT 0 #define BSS_INIT 0