www.digitalmars.com         C & C++   DMDScript  

c++ - inline asm, fpu registers

reply Mikael Klasson <Mikael_member pathlink.com> writes:
Ok, I'm out of ideas here.

fmul	st(0)
^
proth_sieve.cpp(407) : Warning 13: Illegal type/size of operands for the fmul
instruction

Why the warning? I haven't managed to assemble any fpu instruction that uses a
register explicitly.
The "warning" is a bit strange as well. If you look at the generated code, it
actually gets assembled to d8,08 == fmul   dword [eax]. That's quite wrong.

Regards,
Mikael
Apr 13 2003
parent reply "Walter" <walter digitalmars.com> writes:
try:
    fmul    st, st(0)

"Mikael Klasson" <Mikael_member pathlink.com> wrote in message
news:b7cgn3$22uc$1 digitaldaemon.com...
 Ok, I'm out of ideas here.

 fmul st(0)
 ^
 proth_sieve.cpp(407) : Warning 13: Illegal type/size of operands for the
fmul
 instruction

 Why the warning? I haven't managed to assemble any fpu instruction that
uses a
 register explicitly.
 The "warning" is a bit strange as well. If you look at the generated code,
it
 actually gets assembled to d8,08 == fmul   dword [eax]. That's quite
wrong.
 Regards,
 Mikael
Apr 13 2003
parent reply Mikael Klasson <Mikael_member pathlink.com> writes:
try:
    fmul    st, st(0)
Oh, ok. Thanks for the quick reply! The support around here rocks. =) Don't you think that's a bit of an odd syntax, though?
Apr 13 2003
parent "Walter" <walter digitalmars.com> writes:
"Mikael Klasson" <Mikael_member pathlink.com> wrote in message
news:b7cko8$25a8$1 digitaldaemon.com...
try:
    fmul    st, st(0)
Oh, ok. Thanks for the quick reply! The support around here rocks. =) Don't you think that's a bit of an odd syntax, though?
Intel/Microsoft never quite made up their mind how it should look in the early days, and that confusion has carried forward. The inline assembler does just one of the many variants.
Apr 13 2003