FIX and FLOAT conversion instructions

FIX and FLOAT conversion instructions

Postby cmcconnell » Tue Sep 02, 2014 9:07 pm

I don't quite understand the descriptions of these two instructions. I can't see anything to specify the position of the notional fixed point (i.e. how many of the bits in the 32-bit result of the FIX instruction represent the fractional part.)

Am I missing something obvious?
Colin.
cmcconnell
 
Posts: 99
Joined: Thu May 22, 2014 6:58 pm

Re: FIX and FLOAT conversion instructions

Postby notzed » Wed Sep 03, 2014 10:37 am

I had the same reaction!

But there isn't one and they only cast to integer (or round) or float with no scaling You have to apply the scaling with a separate pre or post multiply by 2^(+-n).

There are a lot of bits unused in the (32-bit) instruction encoding so maybe it was a planned thing that never made it, was never planned due to the 16-bit set not having the bits, or just a space tradeoff for the fpu silicon vs 1 extra instruction (if the scaling constants are already loaded).
notzed
 
Posts: 331
Joined: Mon Dec 17, 2012 12:28 am
Location: Australia

Re: FIX and FLOAT conversion instructions

Postby cmcconnell » Wed Sep 03, 2014 5:40 pm

Thanks for the explanation. That does make sense.
Colin.
cmcconnell
 
Posts: 99
Joined: Thu May 22, 2014 6:58 pm


Return to Assembly

Who is online

Users browsing this forum: No registered users and 13 guests