[Issue 13938] IASM shouldn't be able to access TLS variables
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Jan 6 14:37:53 PST 2015
https://issues.dlang.org/show_bug.cgi?id=13938
--- Comment #3 from Martin Nowak <code at dawg.eu> ---
For example this is the sequence to write to a TLS variable in X86 code
(non-PIC), the one for X64 doesn't work, because dmd's IASM doesn't support RIP
relative addressing.
size_t a;
void main()
{
asm
{
mov EAX, GS:[0x00];
mov ECX, a;
mov [EAX+1*ECX], 3;
}
}
--
More information about the Digitalmars-d-bugs
mailing list