Re: .ASM compile error in 64bit compiler

From: Matt (spamtrap_at_crayne.org)
Date: 09/21/04


Date: Tue, 21 Sep 2004 05:28:29 +0000 (UTC)


"Tim Roberts" <spamtrap@crayne.org> wrote in message
news:pqosk0tv6jpnbk8cbq7detrof5atrkbuv3@4ax.com...
> "Matt" <spamtrap@crayne.org> wrote:
>>"dongmonkey1" <spamtrap@crayne.org> wrote:
>>>
>>> Error Message:
>>> error A2230: x87 and MMX instructions disallowed; legacy FP state not
>>> saved in Win64
>>>
>>> the instruction is : fld DWORD PTR [esp+4]
>>>
>>> why even this simple instruction can not pass compile?
>>>
>>> Anybody can help?
>>
>>First, you mean 64-bit assembler, I hope?
>
> Does he? That's not a 64-bit assembler instruction. My reading of this
> is
> that a 32-bit program on Win64 is not allowed to use x87 instructions. Am
> I reading that incorrectly? If this was an AMD 64-bit assembler program,
> you wouldn't say "esp+4", you'd say "rsp+4", right? If this was an
> Itanium
> program, it would be a different instruction entirely.
>
>>Second, for 64-bit apps on Win64, the legacy x87 state is not saved. Thus
>>it
>>is not possible to use x87, MMX, or 3DNow! instructions in 64-bit mode.
>
> OK, now I'm confused. That was a 32-bit instruction, not a 64-bit
> instruction. You could write "fld dword ptr [esp+4]" in 64-bit mode,
> could
> you?
> --
> - Tim Roberts, timr@probo.com
> Providenza & Boekelheide, Inc.
>