[Issue 7720] asm silent wrong code generation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 18 06:04:24 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7720



--- Comment #2 from deadalnix <deadalnix at gmail.com> 2012-03-18 06:04:39 PDT ---
(In reply to comment #1)
> It's not that simple.  IIRC "mov EAX, globalThreadLocal" moves the offset of
> globalThreadLocal into EAX.  While this obviously isn't what you expected, this
> is valid and useful.  How else would you get the offset?
> 
> After all, you're using the inline assembler.  The compiler will never be able
> to protect you against writing incorrect assembly.

In this case, this behavior should be documented.

But this is confusing, because it is not what happen with other variables
(variable value is copied into the register).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list