[Issue 9760] asm docs should say PIC code uses variable and thus needs a stack frame
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 20 13:19:47 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9760
--- Comment #5 from Martin Nowak <code at dawg.eu> 2013-03-20 13:19:46 PDT ---
(In reply to comment #3)
> The inline assembler doesn't give access to the complete set of relocation
> types. For those, it's best not to use naked and let the compiler set it up for
> you.
BTW, this means I can't fix _trace_epi_n which gets called without saving
registers that belong to the callee.
Naked asm doesn't work because of the mentioned memory corruption and
the inability to load the GOT otherwise.
Normal asm doesn't work either, because the compiler trashes EAX when loading
the GOT.
I think the best solution would be to let the compiler do the regsave as it
does now for _c_trace_pro.
Also note that D doesn't have a possibility to mark a function local, i.e.
C++'s static, which wouldn't require a GOT entry to call in the first place.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list