[fpc-devel] assembler memory addressing in 64-bit mode

Torsten fckama at freenet.de
Fri Jan 6 11:16:14 CET 2012


Hi,

i don't understand the follow error message in 64-bit mode:


assemblercode

asm
addpd xmm0, [EAX]
end;

fpc 2.7.1: not ok "16 or 32 Bit references not supported"
nasm 2.09.10: ok


Intel® 64 and IA-32 Architectures
Software Developer’s Manual
Volume 1:
Basic Architecture:


3.7.5.1 Specifying an Offset in 64-Bit Mode
The offset part of a memory address in 64-bit mode can be specified 
directly as a
static value or through an address computation made up of one or more of the
following components:
• Displacement — An 8-bit, 16-bit, or 32-bit value.
• Base — The value in a 32-bit (or 64-bit if REX.W is set) 
general-purpose register.
• Index — The value in a 32-bit (or 64-bit if REX.W is set) general-purpose
register.
• Scale factor — A value of 2, 4, or 8 that is multiplied by the index 
value.


I think this is a bug.


regards

Torsten



More information about the fpc-devel mailing list