break;
case burm_float_ATTR:
- hop_add_insel(hop, "mov.f %H, %H", dest, src);
+ hop_add_insel(hop, "mov.s %H, %H", dest, src);
break;
case burm_double_ATTR:
break;
case burm_float_ATTR:
- hop_add_insel(hop, "mov.f f31, %H", src);
- hop_add_insel(hop, "mov.f %H, %H", src, dest);
- hop_add_insel(hop, "mov.f %H, f31", dest);
+ hop_add_insel(hop, "mov.s f31, %H", src);
+ hop_add_insel(hop, "mov.s %H, %H", src, dest);
+ hop_add_insel(hop, "mov.s %H, f31", dest);
break;
case burm_double_ATTR:
emit "1:"
cost 20;
+ out:(int)reg = COMPAREF.I(left:(float)reg, right:(float)reg)
+ emit "c.lt.s 0, %left, %right"
+ emit "li %out, -1"
+ emit "bc1t 0, 1f"
+ emit "nop"
+ emit "c.lt.s 0, %right, %left"
+ emit "li %out, 1"
+ emit "movf %out, zero, 0"
+ emit "1:"
+ cost 28;
+
out:(int)reg = COMPARED.I(left:(double)reg, right:(double)reg)
emit "c.lt.d 0, %left, %right"
+ emit "li %out, -1"
emit "bc1t 0, 1f"
- emit "li %out, -1" /* delay slot */
+ emit "nop"
emit "c.lt.d 0, %right, %left"
emit "li %out, 1"
emit "movf %out, zero, 0"
+ emit "1:"
cost 28;
/* Booleans */
/* If 1 or 0 then 1, else 0 */
out:(int)reg = IFLE.I(in:(int)reg)
- emit "slt %out, %in, 1"
+ emit "slti %out, %in, 1"
cost 4;
emit "cvt.d.w %out, %out"
cost 4;
+ out:(dret)reg = FROMUI.D(in:(iret)reg)
+ emit "jal .c_ui_d"
+ emit "nop"
+ cost 30;
+
out:(int)reg = FROMSD.I(in:(double)reg)
emit "trunc.w.d f31, %in"
emit "mfc1 %out, f31"
cost 8;
+ out:(lret)reg = FROMSD.L(in:(dret)reg)
+ emit "jal .c_sd_l"
+ emit "nop"
+ cost 30;
+
out:(iret)reg = FROMUD.I(in:(dret)reg)
with corrupted(dret)
- emit "jal .fromud"
+ emit "jal .c_ud_i"
emit "nop"
cost 30;
cost 4;
out:(float)reg = NEGF.F(left:(float)reg)
- emit "neg.f %out, %left"
+ emit "neg.s %out, %left"
cost 4;
out:(float)reg = FROMSI.F(in:(int)reg)
emit "mfc1 %out, f31"
cost 8;
- out:(iret)reg = FROMUD.I(in:(fret)reg)
+ out:(lret)reg = FROMSF.L(in:(fret)reg)
+ emit "jal .c_sf_l"
+ emit "nop"
+ cost 30;
+
+ out:(fret)reg = FROMUI.F(in:(iret)reg)
+ emit "jal .c_ui_f"
+ emit "nop"
+ cost 30;
+
+ out:(iret)reg = FROMUF.I(in:(fret)reg)
with corrupted(fret)
- emit "jal .fromuf"
+ emit "jal .c_uf_i"
emit "nop"
cost 30;
out:(float)reg = COPYI.F(in:(int)reg)
emit "mtc1 %in, %out" /* mtc1 has reversed parameters */
- cost 8;
+ cost 4;
out:(int)reg = COPYF.I(in:(float)reg)
emit "mfc1 %out, %in"
- cost 8;
+ cost 4;
+
+ out:(float)reg = value:CONST.F
+ when specific_constant(%value, 0)
+ emit "mtc1 zero, %out" /* mtc1 has reversed parameters */
+ cost 4;
/* vim: set sw=4 ts=4 expandtab : */