Bug 9378 – std.internal.digest.sha_SSE3 breaks if compiled with PIC

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-23T06:02:00Z
Last change time
2017-01-16T23:26:12Z
Assigned to
nobody
Creator
code

Comments

Comment #0 by code — 2013-01-23T06:02:16Z
Several unittests for std.uuid and std.digest fail when enabling PIC due to the SSE3 optimized asm for SHA1.
Comment #1 by github-bugzilla — 2013-01-24T00:20:34Z
Comment #2 by public — 2016-02-07T05:47:54Z
Any idea if this applies only to DMD or LDC is likely to have problems to?
Comment #3 by github-bugzilla — 2016-12-24T17:19:19Z
Commits pushed to stable at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/12c56c935c6bd0130fcb545264293cc0e500799f partly fix Issue 9378 - SHA1 asm not PIC compatible - access SHA1 constants through extra register in x64 code - tried same for x86 but there is no register left and loading constants via stack was way too slow https://github.com/dlang/phobos/commit/d85b5e0a120f35ec800566cf6c64acb5c2a4563c Merge pull request #4994 from MartinNowak/fix9378 partly fix Issue 9378 - SHA1 asm not PIC compatible
Comment #4 by code — 2016-12-25T09:40:08Z
Let's keep this closed, PIC is too slow to be widely used and we have a non-SSE fallback. One way to make this work, would be to have the weave function keeping track of the temporary (T1, T2) register usage, quite a lot of effort.
Comment #5 by github-bugzilla — 2017-01-15T01:54:29Z
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/12c56c935c6bd0130fcb545264293cc0e500799f partly fix Issue 9378 - SHA1 asm not PIC compatible https://github.com/dlang/phobos/commit/d85b5e0a120f35ec800566cf6c64acb5c2a4563c Merge pull request #4994 from MartinNowak/fix9378
Comment #6 by github-bugzilla — 2017-01-16T23:26:12Z
Commits pushed to newCTFE at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/12c56c935c6bd0130fcb545264293cc0e500799f partly fix Issue 9378 - SHA1 asm not PIC compatible https://github.com/dlang/phobos/commit/d85b5e0a120f35ec800566cf6c64acb5c2a4563c Merge pull request #4994 from MartinNowak/fix9378