Bug 16092 – AVX registers YMM0-YMM7 are inaccessible to 32-bit asm
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2016-05-29T10:33:50Z
Last change time
2020-08-25T09:47:25Z
Keywords
iasm, pull, rejects-valid, SIMD
Assigned to
No Owner
Creator
Marco Leise
Comments
Comment #0 by Marco.Leise — 2016-05-29T10:33:50Z
Similar to the situation with SSE, the lower half of YMM registers is available to 32-bit code, but in DMD they are 64-bit only. In fact XMM and YMM share the registers like EAX and RAX do.
Without this capability and with DMD's lack of SIMD support in 32-bit through intrinsics, it is impossible to use AVX in DMD in 32-bit mode.
Comment #1 by bugzilla — 2016-11-21T09:28:42Z
Could you please post sample code that is rejected?
Comment #2 by Marco.Leise — 2016-11-29T11:47:45Z
Sure, here you go:
int main()
{
asm { vpermilps YMM0, YMM7, 0xAA; }
}
That does not work in 32-bit compilation mode, although YMM0 to YMM7 should be available. Compare section 14.1.1 of "Intel® 64 and IA-32 Architectures Software Developer’s Manual".
Comment #3 by dlang-bot — 2020-08-23T09:54:52Z
@WalterBright created dlang/dmd pull request #11607 "fix Issue 16092 - AVX registers YMM0-YMM7 are inaccessible to 32-bit asm" fixing this issue:
- fix Issue 16092 - AVX registers YMM0-YMM7 are inaccessible to 32-bit asm
https://github.com/dlang/dmd/pull/11607
Comment #4 by dlang-bot — 2020-08-25T09:47:25Z
dlang/dmd pull request #11607 "fix Issue 16092 - AVX registers YMM0-YMM7 are inaccessible to 32-bit asm" was merged into master:
- 9e6012deb6bda07c3a868b2db27fa746a19614b5 by Walter Bright:
fix Issue 16092 - AVX registers YMM0-YMM7 are inaccessible to 32-bit asm
https://github.com/dlang/dmd/pull/11607