diff --git a/mach/mips/libem/trp.s b/mach/mips/libem/trp.s new file mode 100644 index 000000000..7801d471c --- /dev/null +++ b/mach/mips/libem/trp.s @@ -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 + diff --git a/mach/mips/mcg/table b/mach/mips/mcg/table index 24c362d7b..d9ec7a6ac 100644 --- a/mach/mips/mcg/table +++ b/mach/mips/mcg/table @@ -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"