Bug 15242 – Allow version or static if blocks in asm blocks

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-10-23T09:57:59Z
Last change time
2024-12-13T18:45:30Z
Keywords
iasm
Assigned to
No Owner
Creator
ponce
Moved to GitHub: dmd#19063 →

Comments

Comment #0 by aliloko — 2015-10-23T09:57:59Z
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.
Comment #1 by aliloko — 2020-08-30T13:27:51Z
FWIW I think this can be closed, I've needed this in the past but since `intel-intrinsics` the amount of assembly code I maintain has reduced (but wasn't totally eliminated).
Comment #2 by b2.temp — 2020-08-30T19:52:37Z
This was not a bad idea tho one of the thing it would have permit would be solved by a better feature: a system of macro for registers and function parameters or maybe alos mixin() as operand.
Comment #3 by robert.schadek — 2024-12-13T18:45:30Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19063 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB