tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Default value of x87 registers' reserved bits

Stathis Kamperis <> wrote:

> 1) Assume that reserved bits are always 1.

Fastest for your project.  Perhaps good enough.  Ugly if it
goes wrong.

> What do you people think ?

I don't know enough to have opinions on #2 or #3; when the manufacturers
say the bits are "reserved" and must be preserved, do they give any
example of how to update the non-reserved bits?

It would be _especially_ nasty if the reserved bits could change, say,
in a trap handler: then you could have a race between fetching the bits,
making your desired changes to the unreserved bits, and writing them

For prototyping, #1 sounds fine.  For production, I'd need to know more
about the architecture than I do to know what is the technically correct

Once the technically correct solution is known, we (you/core/... anyone
but me!) can decide if it's worth doing "right" or if shortcuts must be

Useful reference points would be knowing what Windows and Linux (in that
order) do. AMD and Intel will _at least_ make _big_ annoucements if they
release a CPU Windows or Linux won't run on without changes. Shortcuts
NetBSD takes are much more at our own risk. :-)



Home | Main Index | Thread Index | Old Index