[Issue 21101] New: Inline Assembler: 32 bit values are truncated to 32 bits
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Aug 2 08:59:17 UTC 2020
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: nobody at puremagic.com
Reporter: bugzilla at 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).
--
More information about the Digitalmars-d-bugs
mailing list