diff --git a/mach/sparc/ce/ce.src/.distr b/mach/sparc/ce/ce.src/.distr index e29812728..955e73532 100644 --- a/mach/sparc/ce/ce.src/.distr +++ b/mach/sparc/ce/ce.src/.distr @@ -8,5 +8,7 @@ C_mes_end.c C_pnam.c C_rom_scon.c C_scon.c +C_exp.c +C_exa_dnam.c misc.c ms_reg.c diff --git a/mach/sparc/ce/ce.src/C_exa_dnam.c b/mach/sparc/ce/ce.src/C_exa_dnam.c new file mode 100644 index 000000000..1347bbc98 --- /dev/null +++ b/mach/sparc/ce/ce.src/C_exa_dnam.c @@ -0,0 +1,13 @@ +#define CODE_EXPANDER +#include +#include "back.h" + +C_exa_dnam( s) +char *s; +{ + s = extnd_dnam( s); + set_global_visible(s); +#ifdef __solaris__ + fprint(codefile, "\t.type\t%s,#object\n", s); +#endif +} diff --git a/mach/sparc/ce/ce.src/C_exp.c b/mach/sparc/ce/ce.src/C_exp.c new file mode 100644 index 000000000..e9c238892 --- /dev/null +++ b/mach/sparc/ce/ce.src/C_exp.c @@ -0,0 +1,13 @@ +#define CODE_EXPANDER +#include +#include "back.h" + +C_exp( s) +char *s; +{ + s = extnd_name( s); + set_global_visible(s); +#ifdef __solaris__ + fprint(codefile, "\t.type\t%s,#function\n", s); +#endif +} diff --git a/mach/sparc/ce/ce.src/ms_reg.c b/mach/sparc/ce/ce.src/ms_reg.c index 0918981e0..d915746ef 100644 --- a/mach/sparc/ce/ce.src/ms_reg.c +++ b/mach/sparc/ce/ce.src/ms_reg.c @@ -170,28 +170,17 @@ static params_to_regs() /* copy required parameters to registers */ { int i, j; - for (i = 0; i < nr_reg_vars; i++) - if (reg_dat[i].offset >= 4096) { - fprint(codefile, "set %d, %s\n", - reg_dat[i].offset, reg_dat[i].reg); - fprint(codefile, "ld [%%l1+%s], %s\n", - reg_dat[i].reg, reg_dat[i].reg); - } - else if (reg_dat[i].offset > 0) - fprint(codefile, "ld [%%l1+%d], %s\n", - reg_dat[i].offset, reg_dat[i].reg); - for (i = 0; i < nr_flt_vars; i++) if (flt_dat[i].offset >= 4092) { - fprint(codefile, "set %d, %s\n", - reg_dat[i].offset, reg_dat[i].reg); - fprint(codefile, "ld [%%l1+%s], %s\n", - reg_dat[i].reg, reg_dat[i].reg); + fprint(codefile, "set %d, %%l2\n", + flt_dat[i].offset); + fprint(codefile, "ld [%%l1+%%l2], %s\n", + flt_dat[i].reg); if (flt_dat[i].size == EM_DSIZE) { - fprint(codefile, "set %d, %s\n", - reg_dat[i].offset+4, reg_dat[i].reg2); - fprint(codefile, "ld [%%l1+%s], %s\n", - reg_dat[i].reg2, reg_dat[i].reg2); + fprint(codefile, "set %d, %%l2\n", + flt_dat[i].offset+4); + fprint(codefile, "ld [%%l1+%%l2], %s\n", + flt_dat[i].reg2); } } else if (flt_dat[i].offset > 0) @@ -202,6 +191,17 @@ static params_to_regs() /* copy required parameters to registers */ fprint(codefile, "ld [%%l1+%d], %s\n", flt_dat[i].offset + 4, flt_dat[i].reg2); } + + for (i = 0; i < nr_reg_vars; i++) + if (reg_dat[i].offset >= 4096) { + fprint(codefile, "set %d, %s\n", + reg_dat[i].offset, reg_dat[i].reg); + fprint(codefile, "ld [%%l1+%s], %s\n", + reg_dat[i].reg, reg_dat[i].reg); + } + else if (reg_dat[i].offset > 0) + fprint(codefile, "ld [%%l1+%d], %s\n", + reg_dat[i].offset, reg_dat[i].reg); } static cmp_flt_dat(e1, e2) @@ -336,7 +336,7 @@ arith l; switchseg( SEGTXT); if (l == N_SLINE && ! __gdb_flag) { flush_cache(); - fprintf(codefile, "call ___uX_LiB\nnop\n"); + fprint(codefile, "call ___uX_LiB\nnop\n"); } if (db_mes == ms_std) { fprint(codefile, ".stabd 0x%lx,0", (long) l);