www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5706] New: Incorrect opcode prefix generated for x86_64 inline assembly

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

           Summary: Incorrect opcode prefix generated for x86_64 inline
                    assembly
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: hughes4 gmail.com



/*
   Disassembly of section .text._D1a1aFZv:

   0000000000000000 <_D1a1aFZv>:
   0:   48 83 f8 01             cmp    $0x1,%rax
   4:   48 83 f8 01             cmp    $0x1,%rax
*/
void a() { asm {
                naked;
                cmp RAX, 1;
                cmp R8 , 1; // should have REX.b set ( 49 83 f8 01 )
} }

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 05 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5706




I ran into another one I did not notice earlier.
As a side note i've patched my local copy of backend/ptrntab.c to include two
opcodes SYSCALL/SYSRET but I don't know how to properly handle SYSRET for 64bit
mode as it needs a REX.w prefix

===

/*
   Disassembly of section .text._D1a1aFZv:

   0000000000000000 <_D1a1aFZv>:
   0:      48 89 c2                mov    %rax,%rdx
   3:      48 89 c2                mov    %rax,%rdx
*/
void a() { asm {
        naked;
        mov RDX, RAX;
        mov R10, RAX; // should have REX.b set ( 49 89 c2 )
} }

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 06 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5706


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED



19:48:29 PDT ---
by Shahid:

https://github.com/D-Programming-Language/dmd/commit/1c0ef34b0a890395fc3fb44f13eb3578b392f157

https://github.com/D-Programming-Language/dmd/commit/ea30742479f1799bfe05b006754be419b5a63f5c

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