Bug 8448 – Take address of label (at least in inline asm)

Status
RESOLVED
Resolution
DUPLICATE
Severity
critical
Priority
P5
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-07-26T14:11:00Z
Last change time
2013-01-05T03:51:10Z
Assigned to
nobody
Creator
dmitry.olsh

Comments

Comment #0 by dmitry.olsh — 2012-07-26T14:11:39Z
See also NG discussion: http://forum.dlang.org/thread/[email protected]?page=5 So address of label can be taken via some asm trick: size_t address; asm{ call L_label; add EAX, 4; move address, EAX } //OK now address points where needed ... L_label: asm{ move EAX, [ESP]; ret; } //<<--- want code pointer here .... The request is to allow direct use of label addresses in contexts other then jump/call: lea, mov, etc. An extension of that would be to introduce taking of label address in normal D code to aid portability, but that's the whole other question.
Comment #1 by yebblies — 2012-12-26T23:27:59Z
*** This issue has been marked as a duplicate of issue 1829 ***
Comment #2 by yebblies — 2013-01-05T03:51:10Z
This bug has been closed as a duplicate of issue 1829, any updates and discussion should go there. There is also a list of definitions for the severity level here: (although the priority level is mostly ignored) http://d.puremagic.com/issues/page.cgi?id=fields.html#importance