From 9e72c25a0f197e1151bc170aba6f0510abd82dbe Mon Sep 17 00:00:00 2001 From: ceriel Date: Fri, 15 May 1987 16:32:14 +0000 Subject: [PATCH] deleted FORMAT, fixed con_float --- mach/pdp/cg/mach.c | 5 +++++ mach/pdp/cg/table | 13 ++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/mach/pdp/cg/mach.c b/mach/pdp/cg/mach.c index b15dbfc93..734827424 100644 --- a/mach/pdp/cg/mach.c +++ b/mach/pdp/cg/mach.c @@ -68,6 +68,11 @@ con_float() { f = -f; sign = 1; } + if (f == 0) { + if (argval == 8) fprintf(codefile, ".data2 0, 0\n"); + fprintf(codefile, ".data2 0, 0\n"); + return; + } while (f < 0.5) { f += f; i --; diff --git a/mach/pdp/cg/table b/mach/pdp/cg/table index b3e35a0a8..ae1f4a8bd 100644 --- a/mach/pdp/cg/table +++ b/mach/pdp/cg/table @@ -56,7 +56,6 @@ EM_PSIZE=2 EM_BSIZE=SL TIMEFACTOR= 1/300 -FORMAT="0%lo" REGISTERS: r0 = ("r0", 2), REG. @@ -106,7 +105,7 @@ ADDR_EXTERNAL = {STRING ind;} 2 cost=(2,300) "$%[ind]" * Now mostly addressing modes of target machine * ********************************************************/ -regdef2 = {REGISTER reg;} 2 cost=(0,300) "*%[reg]" +regdef2 = {REGISTER reg;} 2 cost=(0,300) "(%[reg])" regind2 = {REGISTER reg; STRING ind;} 2 cost=(2,600) "%[ind](%[reg])" reginddef2 = {REGISTER reg; STRING ind;} 2 cost=(2,1050) "*%[ind](%[reg])" regconst2 = {REGISTER reg; STRING ind;} 2 @@ -116,7 +115,7 @@ regconst2 = {REGISTER reg; STRING ind;} 2 ********************************************************/ relative2 = {STRING ind;} 2 cost=(2,600) "%[ind]" reldef2 = {STRING ind;} 2 cost=(2,1050) "*%[ind]" -regdef1 = {REGISTER reg;} 2 cost=(0,300) "*%[reg]" +regdef1 = {REGISTER reg;} 2 cost=(0,300) "(%[reg])" regind1 = {REGISTER reg; STRING ind;} 2 cost=(2,600) "%[ind](%[reg])" reginddef1 = {REGISTER reg; STRING ind;} 2 cost=(2,1050) "*%[ind](%[reg])" relative1 = {STRING ind;} 2 cost=(2,600) "%[ind]" @@ -136,8 +135,8 @@ ftolong = {REGISTER reg;} 4 regind4 = {REGISTER reg; STRING ind; } 4 cost=(2,3630) "%[ind](%[reg])" relative4 = {STRING ind; } 4 cost=(2,3630) "%[ind]" -regdef4 = {REGISTER reg;} 4 cost=(2,3240) "*%[reg]" -regdef8 = {REGISTER reg;} 8 cost=(2,5220) "*%[reg]" +regdef4 = {REGISTER reg;} 4 cost=(2,3240) "(%[reg])" +regdef8 = {REGISTER reg;} 8 cost=(2,5220) "(%[reg])" relative8 = {STRING ind; } 8 cost=(2,5610) "%[ind]" regind8 = {REGISTER reg; STRING ind;} 8 cost=(2,5610) "%[ind](%[reg])" @@ -1749,12 +1748,12 @@ lae aar $2==2 && rom(1,3)==8 && rom(1,1)!=0 | SCR_REG | erase(%[1]) | {regconst2,%[1],tostring((0-8)*rom(1,1))} | adi 2 | -lae aar $2==2 && rom(1,1)==0 | SCR_ODD_REG | +lae aar $2==2 && rom(1,1)==0 && defined(rom(1,3)) | SCR_ODD_REG | "mul $$%(rom(1,3)%),%[1]" erase(%[1]) | %[1] | adi 2 | -lae aar $2==2 && defined(rom(1,1)) | SCR_ODD_REG | +lae aar $2==2 && defined(rom(1,3)) | SCR_ODD_REG | "mul $$%(rom(1,3)%),%[1]" erase(%[1]) | {regconst2,%[1],tostring((0-rom(1,3))*rom(1,1))} | -- 2.34.1