[Issue 21101] Inline Assembler: 32 bit values are truncated to 32 bits

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Aug 25 07:39:38 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=21101

Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Walter Bright <bugzilla at digitalmars.com> ---
The problem is, being assembler code, there is no distinction between signed
and unsigned values for immediate values. The instruction semantics determine
if it is signed or unsigned.

The values are all computed as 64 bit integers.

Hence, -2 is indistinguishable from 0xFFFFFFFFFFFFFFFE. Whether it gets
truncated or sign extended is determined by the instruction, there is no
concept of a signed or unsigned immediate value.

It's working as designed.

--


More information about the Digitalmars-d-bugs mailing list