www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1173] New: Inline assembler: cannot use global scope operator

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1173

           Summary: Inline assembler: cannot use global scope operator
           Product: D
           Version: 1.013
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: deewiant gmail.com


int x;
int main() {
        asm {
                mov EAX, .x;
        }
}

The above code fails with the error "nops expected".

Ways to work around this: removing the leading period from the x (doesn't work
if there's a local x, of course), creating an alias to x and using that
instead, or using a module declaration and referring to x by way of the module
name.


-- 
Apr 21 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1173


thomas-dloop kuehne.cn changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|Windows                     |All





Added to DStress as
http://dstress.kuehne.cn/run/a/asm_03_A.d
http://dstress.kuehne.cn/run/a/asm_03_B.d
http://dstress.kuehne.cn/run/a/asm_03_C.d
http://dstress.kuehne.cn/run/a/asm_03_D.d


-- 
Apr 23 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1173


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug yahoo.com.au



Now writes bug.d(4): 1 operands found for mov instead of the expected 2
Which is still wrong, but not as silly as the old error message.

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