https://issues.dlang.org/show_bug.cgi?id=21101
Issue ID: 21101 Summary: Inline Assembler: 32 bit values are truncated to 32 bits Product: D Version: D2 Hardware: x86_64 OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: bugzi...@digitalmars.com Bug report transferred from https://issues.dlang.org/show_bug.cgi?id=6459 : Another negative immediate value issue: mov EAX,-2; /* line 1 */ mov EAX,0xFFFFFFFE; /* line 2 */ mov EAX,0xFFFFFFFFFFFFFFFE; /* line 3 */ mov R8D,-2; /* line 4 */ mov R8D,0xFFFFFFFE; /* line 5 */ mov R8D,0xFFFFFFFFFFFFFFFE; /* line 6 */ Anybody writing line 3 or 6 has probably made a mistake, but line 3 is accepted as equivalent to 1 and 2, and line 6 is accepted as equivalent to 4 and 5 (as 32 bit loads clear the top 32 bits of the equivalent 64 bit register they do not sign extend). --