Post Reply 
(Free42) tips & tricks: local flags
07-24-2020, 10:19 AM
Post: #11
RE: (Free42) tips & tricks: local flags
(07-24-2020 08:55 AM)Thomas Okken Wrote:  ... or perhaps by having separate instructions for preserving the user flags and everything else, though then the 48/48 split wouldn't work.

A 64 bit binary float can safely hold 62 flags:
  • the mantissa holds 52 (the 53rd bit doesn't exist since it's always 1);
  • the sign bit holds 1 and
  • the exponent holds 9 (despite being 11 bits long, it shouldn't be all 0 or all 1 to avoid NaNs, infinities and subnormals).

It would probably be more user friendly to restrict it to the 52 mantissa bits (and possibly the sign). User friendly in the sense that changes could easily be made to the value.

All 64 bits could be used at a pinch if no operations were ever done. Perhaps using a different type field for this? I expect this would be a huge pain.


Pauli
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (Free42) tips & tricks: local flags - Paul Dale - 07-24-2020 10:19 AM



User(s) browsing this thread: 1 Guest(s)