Re: Floating point load-store behaviour.




thisismyidentity@xxxxxxxxx wrote:
Hi all,

I am trying to predict the behaviour of floating point load and store
operations on integer locations. I ve written a small piece of code
having some inline assembly code which I am describing here.

Not a good subejct foer this group, which is tightly limited to pure C
discussions.

But

The FPU hardware in 99.73% of all computers ever made has absolutely no
idea that an area of memory has had "integers" stored into it. There
were a few Intel aipx432 prototype chips made with type checking in
hardware, but they're hard to find nowdays.

If you load a floating-point register from memory, I suspect the FP
hardware has the freedom to fudge the bits any way it feels like, as
long as the operation doesnt change the FP value of the number.

For example, if you load up a denormalized number, the FP unit may
normalize the number it picks up. It still will have the exactly same
value, as a FP number, but of course if it's an integer it will be all
messed up.

BTW the register-oriented fp move instructions don't mess with the
bits, ever. That allows them to be used to move or hold integer or
packed MMX operands without danger of lossage.

.



Relevant Pages

  • Re: Best MPG : 5-speed vs. auto?
    ... "Steve B." ... etc. have a load bias to one side of the mating surfaces. ... When you are floating in neutral, the joints are bouncing 'up and down' ... A bad u-joint starts vibrating when you are between ...
    (rec.autos.tech)
  • Floating point load-store behaviour.
    ... I am trying to predict the behaviour of floating point load and store ... -> Is that particular bit getting flipped coz of rounding or something ...
    (comp.lang.c)
  • Floating point load-store behaviour.
    ... I am trying to predict the behaviour of floating point load and store ... -> Is that particular bit getting flipped coz of rounding or something ...
    (comp.arch)
  • Re: converting an unsigned 64 bit in a FPU double
    ... (using gcc notation) ... That expects to load a floating point value. ... extended uint64_to_extended(uint64_t u64) ...
    (comp.lang.asm.x86)
  • Re: converting an unsigned 64 bit in a FPU double
    ... You got in some general 64 bit reg (say rax) an unsigned ... (using gcc notation) ... That expects to load a floating point value. ...
    (comp.lang.asm.x86)