We attempt to compile the first library function; we fail.
authorDavid Given <dg@cowlark.com>
Tue, 4 Sep 2018 22:13:01 +0000 (00:13 +0200)
committerDavid Given <dg@cowlark.com>
Tue, 4 Sep 2018 22:13:01 +0000 (00:13 +0200)
mach/mips/libem/trp.s [new file with mode: 0644]
mach/mips/mcg/table

diff --git a/mach/mips/libem/trp.s b/mach/mips/libem/trp.s
new file mode 100644 (file)
index 0000000..7801d47
--- /dev/null
@@ -0,0 +1,13 @@
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+
+.define .trap_ecase
+.trap_ecase:
+       li      r3, 20                  ! ECASE = 20 in h/em_abs.h
+       ! FALLTHROUGH to .trp
+
+.trap:
+       syscall
+
index 24c362d..d9ec7a6 100644 (file)
@@ -667,6 +667,10 @@ PATTERNS
                emit "div.d %out, %left, %right"
                cost 4;
 
+       out:(float)reg = NEGF.D(left:(float)reg)
+               emit "neg.d %out, %left"
+               cost 4;
+
        out:(double)reg = FROMSI.D(in:(int)reg)
                emit "mtc1 %in, %out" /* mtc1 has reversed parameters */
                emit "cvt.d.w %out, %out"
@@ -705,6 +709,10 @@ PATTERNS
                emit "div.d %out, %left, %right"
                cost 4;
 
+       out:(float)reg = NEGF.F(left:(float)reg)
+               emit "neg.f %out, %left"
+               cost 4;
+
        out:(float)reg = FROMSI.F(in:(int)reg)
                emit "mtc1 %in, %out" /* mtc1 has reversed parameters */
                emit "cvt.s.w %out, %out"