Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[inline asm] Wrongcode for mov #19431

Open
dlangBugzillaToGithub opened this issue May 4, 2018 · 1 comment
Open

[inline asm] Wrongcode for mov #19431

dlangBugzillaToGithub opened this issue May 4, 2018 · 1 comment
Labels
Arch:x86_64 Issues specific to x86_64 P1 Severity:blocker

Comments

@dlangBugzillaToGithub
Copy link

Stefan Koch reported this on 2018-05-04T14:15:06Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=18826

CC List

Description

the following code does get mis-compiled. 
ulong getThreadID()
{
    asm { naked; mov RAX, qword ptr FS:0x0 }
}
@dlangBugzillaToGithub
Copy link
Author

uplink.coder commented on 2018-05-04T15:21:33Z

More Info: 
DMD currently generates 64 48 8b 05 00 00 00 00 00 mov    rax,QWORD PTR fs:[rip+0x0]

But it should generate  64 48 8b 04 25 00 00 00 00 mov    rax,QWORD PTR fs:0x0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch:x86_64 Issues specific to x86_64 P1 Severity:blocker
Projects
None yet
Development

No branches or pull requests

1 participant