By: Eugene Nalimov (enalimov.delete@this.at.contextrelevant.dot.com), August 12, 2014 9:29 am
Room: Moderated Discussions
That was >10 years ago, I don't remember all the details. But I definitely remember that (a) initially we could not use x87 in 64-bit mode because of the Windows, and (b) later that limitation was lifted.
Thanks,
Eugene
rwessel (robertwessel.delete@this.yahoo.com) on August 11, 2014 6:32 pm wrote:
> Eugene Nalimov (enalimov.delete@this.at.contextrelevant.dot.com) on August 11, 2014 4:07 pm wrote:
> > 2. Early versions of Windows for x64 did not save x87 context
> > during context switch, so we could not use x87
> > in the generated code. Later Windows were changed and I
> > suggested generating x87 code for x64 in some cases:
> > x87 instructions are shorter than SSE2 ones, so that definitely
> > makes sense when optimizing for size and can
> > make sense when optimizing for speed as well. Unfortunately we were very seriously undermanned, so we could
> > not work on it. I think that may be good optimization even now but I do not work on MSVC anymore...
>
>
> I believe that's incorrect, unless by "early version" you mean something well before any general beta
> release to developers. There was a misunderstanding caused by a comment in an article about the DDK which
> cause some speculation that x87 registers were not saved in *user* space, but AFAIK, that's never actually
> been the case. In kernel space the FP registers require considerable care to use in any form, and I dimly
> recall that the saving of the x87 registers *was* changed in kernel space at some point.
>
> In any event, not saving the x87 registers in user space would be a considerable security hole.
Thanks,
Eugene
rwessel (robertwessel.delete@this.yahoo.com) on August 11, 2014 6:32 pm wrote:
> Eugene Nalimov (enalimov.delete@this.at.contextrelevant.dot.com) on August 11, 2014 4:07 pm wrote:
> > 2. Early versions of Windows for x64 did not save x87 context
> > during context switch, so we could not use x87
> > in the generated code. Later Windows were changed and I
> > suggested generating x87 code for x64 in some cases:
> > x87 instructions are shorter than SSE2 ones, so that definitely
> > makes sense when optimizing for size and can
> > make sense when optimizing for speed as well. Unfortunately we were very seriously undermanned, so we could
> > not work on it. I think that may be good optimization even now but I do not work on MSVC anymore...
>
>
> I believe that's incorrect, unless by "early version" you mean something well before any general beta
> release to developers. There was a misunderstanding caused by a comment in an article about the DDK which
> cause some speculation that x87 registers were not saved in *user* space, but AFAIK, that's never actually
> been the case. In kernel space the FP registers require considerable care to use in any form, and I dimly
> recall that the saving of the x87 registers *was* changed in kernel space at some point.
>
> In any event, not saving the x87 registers in user space would be a considerable security hole.