https://issues.dlang.org/show_bug.cgi?id=12878
Issue ID: 12878
Summary: inline asm memory operand always uses 64-bit
addressing
Product: D
Version: unspecified
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
cat > bug.d << CODE
void main()
{
asm
{
mov EAX, [ESI];
movdqu XMM0, [ESI];
}
}
CODE
dmd -c bug.d
objdump -d bug.o
----
4: 8b 06 mov (%rsi),%eax
6: f3 0f 6f 06 movdqu (%rsi),%xmm0
----
The compiler should emit an address size prefix (67H) like so.
----
15: 67 8b 06 mov (%esi),%eax
18: 67 f3 0f 6f 06 movdqu (%esi),%xmm0
----
--