An error message showed up when I was compiling an .asm file with MMX
instructions in it? However, the same test file could pass the compile if I
used an early version (8.00.2207) of ml64. The version that refuses my test
file is 8.00.40310.39 coming with DDK 3790.1830. Have anyone ever seen this
message and knows how to fix it?

The command line to compile my test file:
ml64 /c test.asm

The error message I got:
error A2222: x87 and MMX instructions disallowed; legacy FP state not saved
in Win64

The test file is as simple as the following:
.code
_Start:
movd rax, mm0
END _Start

Re: How can I use MMX instructions on amd64 processors? by Skywing

Skywing
Sun Mar 12 08:32:24 CST 2006

Try using the SSE (xmm*) instructions instead?

"Pooh" <Pooh@discussions.microsoft.com> wrote in message
news:5E0A353A-7BA2-48AE-8C5C-1AEE73B060F3@microsoft.com...
> An error message showed up when I was compiling an .asm file with MMX
> instructions in it? However, the same test file could pass the compile if
> I
> used an early version (8.00.2207) of ml64. The version that refuses my
> test
> file is 8.00.40310.39 coming with DDK 3790.1830. Have anyone ever seen
> this
> message and knows how to fix it?
>
> The command line to compile my test file:
> ml64 /c test.asm
>
> The error message I got:
> error A2222: x87 and MMX instructions disallowed; legacy FP state not
> saved
> in Win64
>
> The test file is as simple as the following:
> .code
> _Start:
> movd rax, mm0
> END _Start



Re: How can I use MMX instructions on amd64 processors? by Pooh

Pooh
Sun Mar 12 20:57:27 CST 2006

But what if I have to access MMX registers?

"Skywing" wrote:

> Try using the SSE (xmm*) instructions instead?
>
> "Pooh" <Pooh@discussions.microsoft.com> wrote in message
> news:5E0A353A-7BA2-48AE-8C5C-1AEE73B060F3@microsoft.com...
> > An error message showed up when I was compiling an .asm file with MMX
> > instructions in it? However, the same test file could pass the compile if
> > I
> > used an early version (8.00.2207) of ml64. The version that refuses my
> > test
> > file is 8.00.40310.39 coming with DDK 3790.1830. Have anyone ever seen
> > this
> > message and knows how to fix it?
> >
> > The command line to compile my test file:
> > ml64 /c test.asm
> >
> > The error message I got:
> > error A2222: x87 and MMX instructions disallowed; legacy FP state not
> > saved
> > in Win64
> >
> > The test file is as simple as the following:
> > .code
> > _Start:
> > movd rax, mm0
> > END _Start
>
>
>

Re: How can I use MMX instructions on amd64 processors? by Pooh

Pooh
Mon Mar 13 21:17:27 CST 2006

What does "legacy FP state not saved in Win64" mean? Does it mean FP state
would not be saved during process/thread switching? If so, how can an
application calculate a floating point function such as sin() without using
the instruction "
"fsin"?

"Pooh" wrote:

> But what if I have to access MMX registers?
>
> "Skywing" wrote:
>
> > Try using the SSE (xmm*) instructions instead?
> >
> > "Pooh" <Pooh@discussions.microsoft.com> wrote in message
> > news:5E0A353A-7BA2-48AE-8C5C-1AEE73B060F3@microsoft.com...
> > > An error message showed up when I was compiling an .asm file with MMX
> > > instructions in it? However, the same test file could pass the compile if
> > > I
> > > used an early version (8.00.2207) of ml64. The version that refuses my
> > > test
> > > file is 8.00.40310.39 coming with DDK 3790.1830. Have anyone ever seen
> > > this
> > > message and knows how to fix it?
> > >
> > > The command line to compile my test file:
> > > ml64 /c test.asm
> > >
> > > The error message I got:
> > > error A2222: x87 and MMX instructions disallowed; legacy FP state not
> > > saved
> > > in Win64
> > >
> > > The test file is as simple as the following:
> > > .code
> > > _Start:
> > > movd rax, mm0
> > > END _Start
> >
> >
> >

Re: How can I use MMX instructions on amd64 processors? by Doron

Doron
Mon Mar 13 23:15:43 CST 2006

FP state is not saved across IRQL changes. When a thread context is
changed, the FP state is changed. A driver needs to call
KeSaveFloatingPointState() before invoking an FP operation

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Pooh" <Pooh@discussions.microsoft.com> wrote in message
news:FD09139A-A03C-4C77-9DA3-717AF0596E89@microsoft.com...
> What does "legacy FP state not saved in Win64" mean? Does it mean FP state
> would not be saved during process/thread switching? If so, how can an
> application calculate a floating point function such as sin() without
> using
> the instruction "
> "fsin"?
>
> "Pooh" wrote:
>
>> But what if I have to access MMX registers?
>>
>> "Skywing" wrote:
>>
>> > Try using the SSE (xmm*) instructions instead?
>> >
>> > "Pooh" <Pooh@discussions.microsoft.com> wrote in message
>> > news:5E0A353A-7BA2-48AE-8C5C-1AEE73B060F3@microsoft.com...
>> > > An error message showed up when I was compiling an .asm file with MMX
>> > > instructions in it? However, the same test file could pass the
>> > > compile if
>> > > I
>> > > used an early version (8.00.2207) of ml64. The version that refuses
>> > > my
>> > > test
>> > > file is 8.00.40310.39 coming with DDK 3790.1830. Have anyone ever
>> > > seen
>> > > this
>> > > message and knows how to fix it?
>> > >
>> > > The command line to compile my test file:
>> > > ml64 /c test.asm
>> > >
>> > > The error message I got:
>> > > error A2222: x87 and MMX instructions disallowed; legacy FP state not
>> > > saved
>> > > in Win64
>> > >
>> > > The test file is as simple as the following:
>> > > .code
>> > > _Start:
>> > > movd rax, mm0
>> > > END _Start
>> >
>> >
>> >



Re: How can I use MMX instructions on amd64 processors? by Tim

Tim
Tue Mar 14 23:55:49 CST 2006

"Doron Holan [MS]" <doronh@nospam.microsoft.com> wrote:
>
>FP state is not saved across IRQL changes. When a thread context is
>changed, the FP state is changed. A driver needs to call
>KeSaveFloatingPointState() before invoking an FP operation

Yes, but the warning they're referring to doesn't have anything to do with
kernel mode.

There is a great deal of confusion about this issue. As I understand it,
in the early plans for Win64 on amd64, the plan was not to save and restore
the FPU/MMX registers at any time, even in user mode, making their use
impossible. The observed behavior is that they ARE saved and restored,
except for kernel threads, and I believe there is even a correction to this
on Microsoft's web site, although I can't find it right now.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.