|
From: Florian K. <br...@ac...> - 2011-11-05 14:30:13
|
On 11/04/2011 04:46 PM, Christian Borntraeger wrote: > > Agreed, emulating DFP with IR is definitely the wrong way. > Definitely. >> Next, I asked Carl to look at the feasibility of using the Iex_CCall to a >> helper. This looks promising, but is non-standard and not as straightforward as >> implementing via an instruction-specific Iop. > > Yes, this would work but this is also slow and non-standard. > I would not be too worried about speed. Apps using DFP ops will be rare. But it would definitely be a deviation from the current modelling approach. > I think that adding Iops is the right way to do. > [...] > > Julian, please be aware that Intel is also planning to provide decimal > floating point in the future. They will use a different representation: > - binary integer significand field encodes the significand as a large binary integer between 0 and 10p−1. > vs. > - densely packed decimal significand field encodes decimal digits more directly. > but I think this should not matter for IR at all. It would matter. At least for VEX purists. Think about translating across architectures, e.g. s390x dfp to intel. I'm not sure whether we've given up on cross-translating nowadays but VEX was certainly originally designed to support it. And that implies capturing the semantics correctly. Florian |