From fb143bcdb525262071d867850510322b99e0281b Mon Sep 17 00:00:00 2001 From: ceriel Date: Fri, 16 Nov 1990 16:31:40 +0000 Subject: [PATCH] Some corrections and simplifications --- mach/m68020/ncg/mach.h | 9 +-------- mach/m68020/ncg/table | 6 +++--- mach/m68k2/ncg/mach.h | 9 +-------- mach/m68k2/ncg/table | 6 +++--- mach/m68k4/ncg/mach.h | 9 +-------- mach/m68k4/ncg/table | 6 +++--- mach/moon3/ncg/mach.h | 9 +-------- mach/moon3/ncg/table | 6 +++--- 8 files changed, 16 insertions(+), 44 deletions(-) diff --git a/mach/m68020/ncg/mach.h b/mach/m68020/ncg/mach.h index f4ebb91ed..5f741640e 100644 --- a/mach/m68020/ncg/mach.h +++ b/mach/m68020/ncg/mach.h @@ -31,17 +31,10 @@ You must specify the appropriate word size, then REMOVE tables.c #define dlb_fmt "I_%d" #define hol_fmt "hol%d" -#ifdef TBL68020 -#define loc_off "(%d,a6)" -#define arg_off "(8+%d,a6)" -#else -#define loc_off "%d(a6)" -#define arg_off "8+%d(a6)" -#endif #define hol_off "%ld+hol%d" #if WORD_SIZE==2 -#define con_cst(x) fprintf(codefile,".data2\t%d\n",x) +#define con_cst(x) fprintf(codefile,".data2\t%ld\n",x) #else #define con_cst(x) fprintf(codefile,".data4\t%ld\n",x) #endif diff --git a/mach/m68020/ncg/table b/mach/m68020/ncg/table index ccec3e0ea..061ffe180 100644 --- a/mach/m68020/ncg/table +++ b/mach/m68020/ncg/table @@ -34,8 +34,8 @@ Something very wrong here! #define nicesize(x) ((x)==1||(x)==2||(x)==4||(x)==8) #define low8(x) ((x) & 0377) #define low16(x) ((x) & 0177777) -#define in_1(x) ((x)>=0-128 && (x)<128) -#define in_2(x) ((x)>=0-32768 && (x)<32768) +#define in_1(x) sfit(x,8) +#define in_2(x) sfit(x,16) EM_WSIZE = WORD_SIZE @@ -6434,7 +6434,7 @@ with imm_cmp1 STACK #if WORD_SIZE!=2 proc bxx2_in example loc loc cii loc bne with imm_cmp2 STACK - gen cmp_w {const, low16($4)}, %1 + gen cmp_w {const, loww($4)}, %1 bxx* {llabel, $5} #endif diff --git a/mach/m68k2/ncg/mach.h b/mach/m68k2/ncg/mach.h index f4ebb91ed..5f741640e 100644 --- a/mach/m68k2/ncg/mach.h +++ b/mach/m68k2/ncg/mach.h @@ -31,17 +31,10 @@ You must specify the appropriate word size, then REMOVE tables.c #define dlb_fmt "I_%d" #define hol_fmt "hol%d" -#ifdef TBL68020 -#define loc_off "(%d,a6)" -#define arg_off "(8+%d,a6)" -#else -#define loc_off "%d(a6)" -#define arg_off "8+%d(a6)" -#endif #define hol_off "%ld+hol%d" #if WORD_SIZE==2 -#define con_cst(x) fprintf(codefile,".data2\t%d\n",x) +#define con_cst(x) fprintf(codefile,".data2\t%ld\n",x) #else #define con_cst(x) fprintf(codefile,".data4\t%ld\n",x) #endif diff --git a/mach/m68k2/ncg/table b/mach/m68k2/ncg/table index ccec3e0ea..061ffe180 100644 --- a/mach/m68k2/ncg/table +++ b/mach/m68k2/ncg/table @@ -34,8 +34,8 @@ Something very wrong here! #define nicesize(x) ((x)==1||(x)==2||(x)==4||(x)==8) #define low8(x) ((x) & 0377) #define low16(x) ((x) & 0177777) -#define in_1(x) ((x)>=0-128 && (x)<128) -#define in_2(x) ((x)>=0-32768 && (x)<32768) +#define in_1(x) sfit(x,8) +#define in_2(x) sfit(x,16) EM_WSIZE = WORD_SIZE @@ -6434,7 +6434,7 @@ with imm_cmp1 STACK #if WORD_SIZE!=2 proc bxx2_in example loc loc cii loc bne with imm_cmp2 STACK - gen cmp_w {const, low16($4)}, %1 + gen cmp_w {const, loww($4)}, %1 bxx* {llabel, $5} #endif diff --git a/mach/m68k4/ncg/mach.h b/mach/m68k4/ncg/mach.h index f4ebb91ed..5f741640e 100644 --- a/mach/m68k4/ncg/mach.h +++ b/mach/m68k4/ncg/mach.h @@ -31,17 +31,10 @@ You must specify the appropriate word size, then REMOVE tables.c #define dlb_fmt "I_%d" #define hol_fmt "hol%d" -#ifdef TBL68020 -#define loc_off "(%d,a6)" -#define arg_off "(8+%d,a6)" -#else -#define loc_off "%d(a6)" -#define arg_off "8+%d(a6)" -#endif #define hol_off "%ld+hol%d" #if WORD_SIZE==2 -#define con_cst(x) fprintf(codefile,".data2\t%d\n",x) +#define con_cst(x) fprintf(codefile,".data2\t%ld\n",x) #else #define con_cst(x) fprintf(codefile,".data4\t%ld\n",x) #endif diff --git a/mach/m68k4/ncg/table b/mach/m68k4/ncg/table index ccec3e0ea..061ffe180 100644 --- a/mach/m68k4/ncg/table +++ b/mach/m68k4/ncg/table @@ -34,8 +34,8 @@ Something very wrong here! #define nicesize(x) ((x)==1||(x)==2||(x)==4||(x)==8) #define low8(x) ((x) & 0377) #define low16(x) ((x) & 0177777) -#define in_1(x) ((x)>=0-128 && (x)<128) -#define in_2(x) ((x)>=0-32768 && (x)<32768) +#define in_1(x) sfit(x,8) +#define in_2(x) sfit(x,16) EM_WSIZE = WORD_SIZE @@ -6434,7 +6434,7 @@ with imm_cmp1 STACK #if WORD_SIZE!=2 proc bxx2_in example loc loc cii loc bne with imm_cmp2 STACK - gen cmp_w {const, low16($4)}, %1 + gen cmp_w {const, loww($4)}, %1 bxx* {llabel, $5} #endif diff --git a/mach/moon3/ncg/mach.h b/mach/moon3/ncg/mach.h index f4ebb91ed..5f741640e 100644 --- a/mach/moon3/ncg/mach.h +++ b/mach/moon3/ncg/mach.h @@ -31,17 +31,10 @@ You must specify the appropriate word size, then REMOVE tables.c #define dlb_fmt "I_%d" #define hol_fmt "hol%d" -#ifdef TBL68020 -#define loc_off "(%d,a6)" -#define arg_off "(8+%d,a6)" -#else -#define loc_off "%d(a6)" -#define arg_off "8+%d(a6)" -#endif #define hol_off "%ld+hol%d" #if WORD_SIZE==2 -#define con_cst(x) fprintf(codefile,".data2\t%d\n",x) +#define con_cst(x) fprintf(codefile,".data2\t%ld\n",x) #else #define con_cst(x) fprintf(codefile,".data4\t%ld\n",x) #endif diff --git a/mach/moon3/ncg/table b/mach/moon3/ncg/table index ccec3e0ea..061ffe180 100644 --- a/mach/moon3/ncg/table +++ b/mach/moon3/ncg/table @@ -34,8 +34,8 @@ Something very wrong here! #define nicesize(x) ((x)==1||(x)==2||(x)==4||(x)==8) #define low8(x) ((x) & 0377) #define low16(x) ((x) & 0177777) -#define in_1(x) ((x)>=0-128 && (x)<128) -#define in_2(x) ((x)>=0-32768 && (x)<32768) +#define in_1(x) sfit(x,8) +#define in_2(x) sfit(x,16) EM_WSIZE = WORD_SIZE @@ -6434,7 +6434,7 @@ with imm_cmp1 STACK #if WORD_SIZE!=2 proc bxx2_in example loc loc cii loc bne with imm_cmp2 STACK - gen cmp_w {const, low16($4)}, %1 + gen cmp_w {const, loww($4)}, %1 bxx* {llabel, $5} #endif