www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15242] New: Allow version or static if blocks in asm blocks

https://issues.dlang.org/show_bug.cgi?id=15242

          Issue ID: 15242
           Summary: Allow version or static if blocks in asm blocks
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: aliloko gmail.com

That would allow to write x86 asm blocks that work both in 32-bit and 64-bit
easily.

Porting asm from 32-bit to 64-bit often involved few modifications.
- general register changed when storing pointers (EAX => RAX)
- movsxd for the occasional sign-extension
- changing offsets

Currently, one is forced to duplicate instructions and keep them in sync.

--
Oct 23 2015