|
From: Christian B. <bor...@de...> - 2011-11-05 12:43:18
|
On 05/11/11 02:54, John Reiser wrote:
> On 11/04/2011 01:46 PM, Christian Borntraeger wrote:
> [snip]
>> Given the novelty of decimal floating point libraries a tool like valgrind would
>> be really helpful.
>
> What level of support do you imagine? Memcheck supports binary floating point
> coarsely: if any bit of any input to a floating-point operation is Undefined,
> then all the bits of the output are Undefined.
>
I think it should be identical to binary floating point,e.g. for DFP 64bit Multiply
we do the same as for BFP 64bit Multiply
cborntra@br96egxr:/space/valgrind$ svn diff
Index: memcheck/mc_translate.c
===================================================================
--- memcheck/mc_translate.c (revision 12031)
+++ memcheck/mc_translate.c (working copy)
@@ -2259,6 +2259,7 @@
case Iop_SubF64:
case Iop_SubF64r32:
case Iop_MulF64:
+ case Iop_MulD64:
case Iop_MulF64r32:
case Iop_DivF64:
case Iop_DivF64r32:
cborntra@br96egxr:/space/valgrind$ svn diff VEX/
Index: VEX/priv/ir_defs.c
===================================================================
--- VEX/priv/ir_defs.c (revision 2201)
+++ VEX/priv/ir_defs.c (working copy)
@@ -260,6 +260,7 @@
case Iop_AddF64: vex_printf("AddF64"); return;
case Iop_SubF64: vex_printf("SubF64"); return;
case Iop_MulF64: vex_printf("MulF64"); return;
+ case Iop_MulD64: vex_printf("MulD64"); return;
case Iop_DivF64: vex_printf("DivF64"); return;
case Iop_AddF64r32: vex_printf("AddF64r32"); return;
case Iop_SubF64r32: vex_printf("SubF64r32"); return;
@@ -2235,6 +2236,7 @@
case Iop_AddF64: case Iop_SubF64:
case Iop_MulF64: case Iop_DivF64:
+ case Iop_MulD64:
case Iop_AddF64r32: case Iop_SubF64r32:
case Iop_MulF64r32: case Iop_DivF64r32:
TERNARY(ity_RMode,Ity_F64,Ity_F64, Ity_F64);
Index: VEX/pub/libvex_ir.h
===================================================================
--- VEX/pub/libvex_ir.h (revision 2201)
+++ VEX/pub/libvex_ir.h (working copy)
@@ -1279,7 +1279,16 @@
/* Vector Reciprocal Estimate and Vector Reciprocal Square Root Estimate
See floating-point equiwalents for details. */
- Iop_Recip32x4, Iop_Rsqrte32x4
+ Iop_Recip32x4, Iop_Rsqrte32x4,
+
+ /* ------ Decimal Floating Point IEEE 754-2008 ------ */
+
+ /* Binary operations, with rounding. */
+ /* :: IRRoundingMode(I32) x F64 x F64 -> F64 */
+ Iop_AddD64, Iop_SubD64, Iop_MulD64, Iop_DivD64
+ /* tbd */
+
+
}
IROp;
|