Add some more IRops to convert between binary floating point and
decimal floating point values. Needed to complete s390 DFP support.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.
git-svn-id: svn://svn.valgrind.org/vex/trunk@2727 8f6e269a-dfd6-0310-a8e1-e2731360e62c
diff --git a/priv/ir_defs.c b/priv/ir_defs.c
index 34b02c3..db5a836 100644
--- a/priv/ir_defs.c
+++ b/priv/ir_defs.c
@@ -983,11 +983,23 @@
case Iop_D128toI32U: vex_printf("D128toI32U"); return;
case Iop_D128toI64S: vex_printf("D128toI64S"); return;
case Iop_D128toI64U: vex_printf("D128toI64U"); return;
+ case Iop_F32toD32: vex_printf("F32toD32"); return;
+ case Iop_F32toD64: vex_printf("F32toD64"); return;
+ case Iop_F32toD128: vex_printf("F32toD128"); return;
+ case Iop_F64toD32: vex_printf("F64toD32"); return;
case Iop_F64toD64: vex_printf("F64toD64"); return;
- case Iop_D64toF64: vex_printf("D64toF64"); return;
case Iop_F64toD128: vex_printf("F64toD128"); return;
- case Iop_D128toF64: vex_printf("D128toF64"); return;
+ case Iop_F128toD32: vex_printf("F128toD32"); return;
+ case Iop_F128toD64: vex_printf("F128toD64"); return;
case Iop_F128toD128: vex_printf("F128toD128"); return;
+ case Iop_D32toF32: vex_printf("D32toF32"); return;
+ case Iop_D32toF64: vex_printf("D32toF64"); return;
+ case Iop_D32toF128: vex_printf("D32toF128"); return;
+ case Iop_D64toF32: vex_printf("D64toF32"); return;
+ case Iop_D64toF64: vex_printf("D64toF64"); return;
+ case Iop_D64toF128: vex_printf("D64toF128"); return;
+ case Iop_D128toF32: vex_printf("D128toF32"); return;
+ case Iop_D128toF64: vex_printf("D128toF64"); return;
case Iop_D128toF128: vex_printf("D128toF128"); return;
case Iop_AddD128: vex_printf("AddD128"); return;
case Iop_SubD128: vex_printf("SubD128"); return;
@@ -3015,21 +3027,57 @@
case Iop_I64UtoD64:
BINARY(ity_RMode, Ity_I64, Ity_D64);
+ case Iop_F32toD32:
+ BINARY(ity_RMode, Ity_F32, Ity_D32);
+
+ case Iop_F32toD64:
+ BINARY(ity_RMode, Ity_F32, Ity_D64);
+
+ case Iop_F32toD128:
+ BINARY(ity_RMode, Ity_F32, Ity_D128);
+
+ case Iop_F64toD32:
+ BINARY(ity_RMode, Ity_F64, Ity_D32);
+
case Iop_F64toD64:
BINARY(ity_RMode, Ity_F64, Ity_D64);
- case Iop_D64toF64:
- BINARY(ity_RMode, Ity_D64, Ity_F64);
-
case Iop_F64toD128:
BINARY(ity_RMode, Ity_F64, Ity_D128);
- case Iop_D128toF64:
- BINARY(ity_RMode, Ity_D128, Ity_F64);
+ case Iop_F128toD32:
+ BINARY(ity_RMode, Ity_F128, Ity_D32);
+
+ case Iop_F128toD64:
+ BINARY(ity_RMode, Ity_F128, Ity_D64);
case Iop_F128toD128:
BINARY(ity_RMode, Ity_F128, Ity_D128);
+ case Iop_D32toF32:
+ BINARY(ity_RMode, Ity_D32, Ity_F32);
+
+ case Iop_D32toF64:
+ BINARY(ity_RMode, Ity_D32, Ity_F64);
+
+ case Iop_D32toF128:
+ BINARY(ity_RMode, Ity_D32, Ity_F128);
+
+ case Iop_D64toF32:
+ BINARY(ity_RMode, Ity_D64, Ity_F32);
+
+ case Iop_D64toF64:
+ BINARY(ity_RMode, Ity_D64, Ity_F64);
+
+ case Iop_D64toF128:
+ BINARY(ity_RMode, Ity_D64, Ity_F128);
+
+ case Iop_D128toF32:
+ BINARY(ity_RMode, Ity_D128, Ity_F32);
+
+ case Iop_D128toF64:
+ BINARY(ity_RMode, Ity_D128, Ity_F64);
+
case Iop_D128toF128:
BINARY(ity_RMode, Ity_D128, Ity_F128);
diff --git a/pub/libvex_ir.h b/pub/libvex_ir.h
index 4ff4964..bf35796 100644
--- a/pub/libvex_ir.h
+++ b/pub/libvex_ir.h
@@ -1092,21 +1092,57 @@
/* IRRoundingMode(I32) x D128 -> I64 */
Iop_D128toI64U,
+ /* IRRoundingMode(I32) x F32 -> D32 */
+ Iop_F32toD32,
+
+ /* IRRoundingMode(I32) x F32 -> D64 */
+ Iop_F32toD64,
+
+ /* IRRoundingMode(I32) x F32 -> D128 */
+ Iop_F32toD128,
+
+ /* IRRoundingMode(I32) x F64 -> D32 */
+ Iop_F64toD32,
+
/* IRRoundingMode(I32) x F64 -> D64 */
Iop_F64toD64,
- /* IRRoundingMode(I32) x D64 -> F64 */
- Iop_D64toF64,
-
/* IRRoundingMode(I32) x F64 -> D128 */
Iop_F64toD128,
- /* IRRoundingMode(I32) x D128 -> F64 */
- Iop_D128toF64,
+ /* IRRoundingMode(I32) x F128 -> D32 */
+ Iop_F128toD32,
+
+ /* IRRoundingMode(I32) x F128 -> D64 */
+ Iop_F128toD64,
/* IRRoundingMode(I32) x F128 -> D128 */
Iop_F128toD128,
+ /* IRRoundingMode(I32) x D32 -> F32 */
+ Iop_D32toF32,
+
+ /* IRRoundingMode(I32) x D32 -> F64 */
+ Iop_D32toF64,
+
+ /* IRRoundingMode(I32) x D32 -> F128 */
+ Iop_D32toF128,
+
+ /* IRRoundingMode(I32) x D64 -> F32 */
+ Iop_D64toF32,
+
+ /* IRRoundingMode(I32) x D64 -> F64 */
+ Iop_D64toF64,
+
+ /* IRRoundingMode(I32) x D64 -> F128 */
+ Iop_D64toF128,
+
+ /* IRRoundingMode(I32) x D128 -> F32 */
+ Iop_D128toF32,
+
+ /* IRRoundingMode(I32) x D128 -> F64 */
+ Iop_D128toF64,
+
/* IRRoundingMode(I32) x D128 -> F128 */
Iop_D128toF128,