Re: [Qemu-devel] How to add my implementation of the fmadds instruction to QEMU

2016-09-27 Thread Peter Maydell
On 27 September 2016 at 09:51, G 3 wrote: > The problem with your reasoning is you assume this instruction has to be > 100% correctly implemented. That every single "corner-case" has to be > accounted for. For upstream QEMU we've already made this design decision -- emulation accuracy comes first

Re: [Qemu-devel] How to add my implementation of the fmadds instruction to QEMU

2016-09-27 Thread G 3
On Sep 27, 2016, at 12:16 PM, Eric Blake wrote: On 09/27/2016 09:33 AM, G 3 wrote: void fmadds(float *frD, float frA, float frC, float frB) { *frD = frA * frC + frB; } It sounds like I should change my argument types to double. Insufficient. The whole reason that fmadds exists i

Re: [Qemu-devel] How to add my implementation of the fmadds instruction to QEMU

2016-09-27 Thread Eric Blake
On 09/27/2016 09:33 AM, G 3 wrote: >>> void fmadds(float *frD, float frA, float frC, float frB) >>> { >>> *frD = frA * frC + frB; >>> } > > It sounds like I should change my argument types to double. Insufficient. The whole reason that fmadds exists is that there are provably cases wher

Re: [Qemu-devel] How to add my implementation of the fmadds instruction to QEMU

2016-09-27 Thread Peter Maydell
On 27 September 2016 at 07:33, G 3 wrote: > > On Sep 27, 2016, at 7:43 AM, Peter Maydell wrote: >> In particular, for fmadds, it is important that there >> is no intermediate rounding done between the multiply >> and the addition. This means that you need to effectively >> do the multiply and the

Re: [Qemu-devel] How to add my implementation of the fmadds instruction to QEMU

2016-09-27 Thread G 3
On Sep 27, 2016, at 7:43 AM, Peter Maydell wrote: On 26 September 2016 at 18:05, G 3 wrote: I made my own experimental implementation of the fmadds instruction that I would like to add to QEMU. How would I do this? My implementation would probably look like this: void fmadds(float *frD, f

Re: [Qemu-devel] How to add my implementation of the fmadds instruction to QEMU

2016-09-27 Thread Peter Maydell
On 26 September 2016 at 18:05, G 3 wrote: > I made my own experimental implementation of the fmadds instruction that I > would like to add to QEMU. How would I do this? > > My implementation would probably look like this: > > void fmadds(float *frD, float frA, float frC, float frB) > { > *

[Qemu-devel] How to add my implementation of the fmadds instruction to QEMU

2016-09-26 Thread G 3
I made my own experimental implementation of the fmadds instruction that I would like to add to QEMU. How would I do this? My implementation would probably look like this: void fmadds(float *frD, float frA, float frC, float frB) { *frD = frA * frC + frB; } I then want to see if this