Denis <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #1 from Denis <> 2012-03-02 17:37:11 MSK 
The first one is definetly a bug with const/immutable local variables:
void f() {
    const size_t a = 1; // Error: Integer constant expression expected instead
of a = 1u
    version (D_InlineAsm_X86_64)
        asm { mov RAX, a; }
    else version (D_InlineAsm_X86)
        asm { mov EAX, a; }
        static assert(1);

The second one looks like expected behaviour because with current inline
assembler for non-stack varable `someVar` instruction `mov EAX, someVar;` is
equal to `mov EAX, [someVar];` and `mov EAX, [n];` where `n` is a displacement
of `someVar` from some initial addres which depends on `someVar` type (global,
shared, or TLS).
Inline assembler behaves in this way but I've never seen any documentation and
reasons *why* does it behave this way because it's really unobvious.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to