We attempt to compile the first library function; we fail.
This commit is contained in:
parent
26fe3f7530
commit
7fbce066f8
13
mach/mips/libem/trp.s
Normal file
13
mach/mips/libem/trp.s
Normal file
|
@ -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
|
||||||
|
|
|
@ -667,6 +667,10 @@ PATTERNS
|
||||||
emit "div.d %out, %left, %right"
|
emit "div.d %out, %left, %right"
|
||||||
cost 4;
|
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)
|
out:(double)reg = FROMSI.D(in:(int)reg)
|
||||||
emit "mtc1 %in, %out" /* mtc1 has reversed parameters */
|
emit "mtc1 %in, %out" /* mtc1 has reversed parameters */
|
||||||
emit "cvt.d.w %out, %out"
|
emit "cvt.d.w %out, %out"
|
||||||
|
@ -705,6 +709,10 @@ PATTERNS
|
||||||
emit "div.d %out, %left, %right"
|
emit "div.d %out, %left, %right"
|
||||||
cost 4;
|
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)
|
out:(float)reg = FROMSI.F(in:(int)reg)
|
||||||
emit "mtc1 %in, %out" /* mtc1 has reversed parameters */
|
emit "mtc1 %in, %out" /* mtc1 has reversed parameters */
|
||||||
emit "cvt.s.w %out, %out"
|
emit "cvt.s.w %out, %out"
|
||||||
|
|
Loading…
Reference in a new issue