Re: QWORD PTR error on Intel Mac
- From: "Rod Pemberton" <do_not_have@xxxxxxxxxxx>
- Date: Sat, 30 Jun 2007 12:38:20 -0400
"fiopa" <fiopax@xxxxxxxxx> wrote in message
news:1i0hz96.1s6tz081yp3opgN%fiopax@xxxxxxxxxxxx
I use the XCode default compiler (GCC 4.0).
(XCode is the Apple free IDE)
It is like DWORD PTR point to a 64 bit real number on GCC 4.0 for Mac, ...
What do sizeof(float) and sizeof(double) return for each architecture: PC
and Mac? e.g., 4, and 8, respectively for both? This should tell you what
underlying size is being used by the compiler for each type. It's possible
that both float and double are the same (larger - 8) size on the Mac.
Anyway, your assembly needs to match the sizes each compiler is using. They
also need to match the binary floating point format used by the x87.
Compilers usually match the native binary format for simplicity. So, it
shouldn't be a problem. There are a few things you can do to get more
information: 1) compile some code using floats and doubles and disassemble
to see what instruction and syntax is being used, and 2) check for sections
on inline assembly in each compilers' manual. For GCC, to produce assembly
means using 'gcc -S' or 'objdump -d'.
Also, AFAICT, WORD PTR isn't valid with FLD.
From the Intel manuals, there are four forms of FLD:
FLD m32real
FLD m64real
FLD m80real
FLD ST(i)
From the MASM 5.1 manuals:
BYTE 1 byte
SBYTE 1 byte
WORD 2 bytes
SWORD 2 bytes
DWORD 4 byte, i.e., DWORD PTR is m32real
SDWORD 4 bytes
FWORD 6 bytes
QWORD 8 bytes, i.e., QWORD PTR is m64real
TBYTE 10 bytes, i.e., TBYTE PTR is m80real
So, WORD PTR shouldn't be valid with FLD. You should only use DWORD PTR,
QWORD PTR, or TBYTE PTR with FLD.
Rod Pemberton
.
- References:
- QWORD PTR error on Intel Mac
- From: fiopa
- Re: QWORD PTR error on Intel Mac
- From: Rod Pemberton
- Re: QWORD PTR error on Intel Mac
- From: fiopa
- QWORD PTR error on Intel Mac
- Prev by Date: Re: "Subtract with borrow" instruction missing ?
- Next by Date: Re: Randy downloaded KESYS
- Previous by thread: Re: QWORD PTR error on Intel Mac
- Next by thread: the difference between assembly programming and topology
- Index(es):
Relevant Pages
|
|