add support for cvt.s.d and cvt.d.s (Aurelien Jarno)
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 23 Oct 2006 21:25:11 +0000 (21:25 +0000)
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 23 Oct 2006 21:25:11 +0000 (21:25 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2198 c046a42c-6fe2-441c-8c8c-71466251a162

target-mips/op.c
target-mips/translate.c

index 457551725db69642f1ed359ff543330ce1090a56..39db3ce959ee6db9b0dc62048f55398fe61cef4f 100644 (file)
@@ -785,12 +785,24 @@ void op_mtc1 (void)
 
 #define FLOAT_OP(name, p) void OPPROTO op_float_##name##_##p(void)
 
+FLOAT_OP(cvtd, s)
+{
+    FDT2 = float32_to_float64(WT0, &env->fp_status);
+    DEBUG_FPU_STATE();
+    RETURN();
+}
 FLOAT_OP(cvtd, w)
 {
     FDT2 = int32_to_float64(WT0, &env->fp_status);
     DEBUG_FPU_STATE();
     RETURN();
 }
+FLOAT_OP(cvts, d)
+{
+    FST2 = float64_to_float32(WT0, &env->fp_status);
+    DEBUG_FPU_STATE();
+    RETURN();
+}
 FLOAT_OP(cvts, w)
 {
     FST2 = int32_to_float32(WT0, &env->fp_status);
index 7ad8ebddf7e8546f4549f1937605cfbc9435f53b..c0de12b0fb55514f6ac59ad483b9f6929a2bf0ec 100644 (file)
@@ -1675,6 +1675,13 @@ static void gen_farith (DisasContext *ctx, int fmt, int ft, int fs, int fd, int
         GEN_STORE_FTN_FREG(fd, WT2);
         opn = "ceil.w.d";
         break;
+    case FOP(33, 16): /* cvt.d.s */
+        CHECK_FR(ctx, fs | fd);
+        GEN_LOAD_FREG_FTN(WT0, fs);
+        gen_op_float_cvtd_s();
+        GEN_STORE_FTN_FREG(fd, DT2);
+        opn = "cvt.d.s";
+        break;
     case FOP(33, 20): /* cvt.d.w */
         CHECK_FR(ctx, fs | fd);
         GEN_LOAD_FREG_FTN(WT0, fs);
@@ -1782,6 +1789,13 @@ static void gen_farith (DisasContext *ctx, int fmt, int ft, int fs, int fd, int
         GEN_STORE_FTN_FREG(fd, WT2);
         opn = "trunc.w.s";
         break;
+    case FOP(32, 17): /* cvt.s.d */
+        CHECK_FR(ctx, fs | fd);
+        GEN_LOAD_FREG_FTN(WT0, fs);
+        gen_op_float_cvts_d();
+        GEN_STORE_FTN_FREG(fd, WT2);
+        opn = "cvt.s.d";
+        break;
     case FOP(32, 20): /* cvt.s.w */
         CHECK_FR(ctx, fs | fd);
         GEN_LOAD_FREG_FTN(WT0, fs);