Re: Combining two MMX registers into one SSE register?




robertwessel2@xxxxxxxxx wrote:

>
> Win64/x86 does not fully save the x87 state, so you cannot use the x87
> registers and instructions, hence no 80-bit hardware types.

Though I've heard this for quite some time, I've also read that this
was an urban legend that resulted from the fact that Microsoft's own
compilers don't use the FPU and, hence, the documentation makes no
mention of the FPU (so the assumption being that it was not preserved).
I read somewhere (and the source escapes me now) that *not* saving the
FPU state on a context switch leads to some security problems (don't
ask me which ones, I don't know) and, therefore, MS *has* to preserve
the FPU state.

So the question I have for you is this: "are you *sure* Win64 doesn't
preserve the FPU state? Or are you just repeating the 'rumor' that has
gone around in the past?" If you've got some definitive information on
this, I'd be interested in hearing about it (from a reasonable source,
of course). Based on the article I read, which referenced the
FPU-is-not-saved issue, I'm more prone to believe that the FPU state
*is* saved across context switches. After all, considering how much
effort it is to *partially* save the FPU state, why not just save it
all? And if the state is getting preserved in the "32-bit
environment", why wouldn't it also be saved in the 64-bit environment?
As you pointed out, the FPU still does many things that cannot be done
(easily) with SSE.

BTW, Borland supports 80-bit long doubles. No one else I know of does,
however (this got me into a lot of trouble when porting HLA from
Windows [Borland] to Linux [GCC]).
Cheers,
Randy Hyde

.