From b7c6e7f78e590c2d742320d55bff022d2cee7344 Mon Sep 17 00:00:00 2001 From: Paul Boddie Date: Fri, 20 Sep 2019 01:05:24 +0200 Subject: Added missing floating-point register routines for little-endian MIPS --- lib9/setfcr-Linux-spim.S | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 lib9/setfcr-Linux-spim.S diff --git a/lib9/setfcr-Linux-spim.S b/lib9/setfcr-Linux-spim.S new file mode 100644 index 00000000..9031f628 --- /dev/null +++ b/lib9/setfcr-Linux-spim.S @@ -0,0 +1,27 @@ +#include +#include + +#define FN(x) .type x,%function; .global x; x +#define ENT +#define RET jr ra + + .file "setfcr-Linux-spim.S" +FN(setfcr): + ENT + mtc1 a0, $31 + RET + +FN(getfcr): + ENT + mfc1 v0, $31 + RET + +FN(getfsr): + ENT + mfc1 v0, $31 + RET + +FN(setfsr): + ENT + mtc1 a0, $31 + RET -- cgit v1.2.3 From cf619a58bc797c9515d97b4877bb1d2d6cd25a0f Mon Sep 17 00:00:00 2001 From: Paul Boddie Date: Fri, 20 Sep 2019 01:07:07 +0200 Subject: Renamed "mips" structure member to avoid reserved symbol conflicts --- utils/libmach/executable.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/utils/libmach/executable.c b/utils/libmach/executable.c index b9954f0a..3be218ae 100644 --- a/utils/libmach/executable.c +++ b/utils/libmach/executable.c @@ -17,7 +17,7 @@ typedef struct { uvlong hdr[1]; } exechdr64; Ehdr elfhdr32; /* elf.h */ - struct mipsexec mips; /* bootexec.h */ + struct mipsexec mips32; /* bootexec.h */ struct mips4kexec mips4k; /* bootexec.h */ struct sparcexec sparc; /* bootexec.h */ struct nextexec next; /* bootexec.h */ @@ -425,22 +425,22 @@ mipsboot(int fd, Fhdr *fp, ExecHdr *hp) { USED(fd); fp->type = FMIPSB; - switch(hp->e.mips.amagic) { + switch(hp->e.mips32.amagic) { default: case 0407: /* some kind of mips */ - settext(fp, (u32int)hp->e.mips.mentry, (u32int)hp->e.mips.text_start, - hp->e.mips.tsize, sizeof(struct mipsexec)+4); - setdata(fp, (u32int)hp->e.mips.data_start, hp->e.mips.dsize, - fp->txtoff+hp->e.mips.tsize, hp->e.mips.bsize); + settext(fp, (u32int)hp->e.mips32.mentry, (u32int)hp->e.mips32.text_start, + hp->e.mips32.tsize, sizeof(struct mipsexec)+4); + setdata(fp, (u32int)hp->e.mips32.data_start, hp->e.mips32.dsize, + fp->txtoff+hp->e.mips32.tsize, hp->e.mips32.bsize); break; case 0413: /* some kind of mips */ - settext(fp, (u32int)hp->e.mips.mentry, (u32int)hp->e.mips.text_start, - hp->e.mips.tsize, 0); - setdata(fp, (u32int)hp->e.mips.data_start, hp->e.mips.dsize, - hp->e.mips.tsize, hp->e.mips.bsize); + settext(fp, (u32int)hp->e.mips32.mentry, (u32int)hp->e.mips32.text_start, + hp->e.mips32.tsize, 0); + setdata(fp, (u32int)hp->e.mips32.data_start, hp->e.mips32.dsize, + hp->e.mips32.tsize, hp->e.mips32.bsize); break; } - setsym(fp, hp->e.mips.nsyms, 0, hp->e.mips.pcsize, hp->e.mips.symptr); + setsym(fp, hp->e.mips32.nsyms, 0, hp->e.mips32.pcsize, hp->e.mips32.symptr); fp->hdrsz = 0; /* header stripped */ return 1; } -- cgit v1.2.3 From 00f00efc97c6d250746a0abea52dfb59b5db882f Mon Sep 17 00:00:00 2001 From: Paul Boddie Date: Fri, 20 Sep 2019 01:08:25 +0200 Subject: Removed erroneous -m32 compiler switch for MIPS --- makemk.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/makemk.sh b/makemk.sh index 1e18782a..e20886d3 100755 --- a/makemk.sh +++ b/makemk.sh @@ -19,8 +19,8 @@ grep -s 'SYSTARG=Plan9' mkconfig || . ./mkconfig PLAT=$ROOT/$SYSTARG/$OBJTYPE # you might need to adjust the CC, LD, AR, and RANLIB definitions after this point -CC="p gcc -m32 -c -I$PLAT/include -I$ROOT/include -I$ROOT/utils/include" -LD="p gcc -m32" +CC="p gcc -c -I$PLAT/include -I$ROOT/include -I$ROOT/utils/include" +LD="p gcc" AR="p ar crvs" RANLIB=":" # some systems still require `ranlib' -- cgit v1.2.3 From c6b7177527d6244e733dd51c900028140d0dc947 Mon Sep 17 00:00:00 2001 From: Paul Boddie Date: Fri, 20 Sep 2019 01:09:09 +0200 Subject: Employed Debian tool naming and distribution conventions --- mkfiles/mkfile-Linux-spim | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/mkfiles/mkfile-Linux-spim b/mkfiles/mkfile-Linux-spim index c68c798b..9fa842cd 100644 --- a/mkfiles/mkfile-Linux-spim +++ b/mkfiles/mkfile-Linux-spim @@ -5,23 +5,22 @@ CPUS= spim O= o OS= o -AR= mipsel-linux-uclibc-ar +AR= mipsel-linux-gnu-ar ARFLAGS= crvs -AS= mipsel-linux-uclibc-gcc -c -mips32 +AS= mipsel-linux-gnu-gcc -c -mips32 ASFLAGS= -CC= mipsel-linux-uclibc-gcc -c -mips32 +CC= mipsel-linux-gnu-gcc -c -mips32 CFLAGS= -g\ -Os\ -I$ROOT/Linux/spim/include\ -I$ROOT/include\ - -I/usr/X11R6/include + -I/usr/include/X11 ANSICPP= -LD= mipsel-linux-uclibc-gcc -LDFLAGS= -L/usr/openwin/lib\ - -L/usr/X11R6/lib\ +LD= mipsel-linux-gnu-gcc +LDFLAGS= -L/usr/lib/X11 SYSLIBS= -- cgit v1.2.3