[Issue 988] New: Win32 Exception using asm lock prefix

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 20 23:22:09 PST 2007


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

           Summary: Win32 Exception using asm lock prefix
           Product: D
           Version: 1.006
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: sean at f4.ca


This one is kind of weird, because the code generated using obj2asm looks fine.
 Here's the test case:

    void main()
    {
        int i    = 5;
        int j    = 0;
        int* val = &i;

        asm
        {
            mov EAX, val;
            lock;
            mov EAX, [EAX];
            mov j, EAX;
        }
        printf( "%d\n", j );
    }

If the 'lock' instruction is commented out, the program works as expected.


-- 



More information about the Digitalmars-d-bugs mailing list