OS/2, eCS & ArcaOS - Technical > Programming
Building Qt5
Roderick Klein:
--- Quote from: Igor on November 22, 2022, 03:57:00 pm ---Dear builders Qt5 please turn off the AVX (and AVX2) code. Due to its presence, the browser does not display the pages. And it is impossible to use libraries. I don’t understand why this code is included if it does not work on OS/2 correctly?
--- End quote ---
Please open a ticket for this at Github for this issue on the BWW page.
And on which websites does happen so it can be reproduced ?
Thanks,
Roderick Klein
OS/2 VOICE
Andi B.:
Dave, if I understand it correct, the problem is our gcc. So it would be necessary to fix gcc not Qt. What you propose is a work around for a bug in our gcc which only exposes on OS/4 kernel. Correct?
Lars:
It's a mix of problems.
1) The compiler needs to properly align data to be loaded into an XMM (SSE) or YMM (AVX) or ZMM (AVX512) register (at least for performance reasons but some instructions will also lead to a trap if a memory operand does not align on a 16-byte boundary (for SSE), 32-byte boundary (AVX) or 64-byte boundary (AVX52)).
2) an OS needs to support SSE/AVX/AVX512 context save and restore when switching from one application to another.
Regarding 2) , OS/2, eCS and ArcaOS only support SSE context save (FXSAVE, FXRSTOR: 128 bit registers) but OS/4 also supports AVX/AVX512 context save (XSAVE,XRSTOR: 128 bit and 256 bit and 512 bit registers).
So, the safest thing is to never use AVX/AVX512. That will ensure that you can run your SW on OS/2, eCS, ArcaOS and also on OS/4.
If I am wrong, someone please correct me. Personally, I can say that SSE can safely be used (with memory operands 16-byte aligned where necessary) as I did so in the past and I am running eCS.
OS4User:
--- Quote from: Lars on November 23, 2022, 09:53:13 am ---... OS/4 also supports AVX/AVX512...
--- End quote ---
OS/4 currently supports AVX only
Dave Yeo:
--- Quote from: Andi B. on November 23, 2022, 08:03:49 am ---Dave, if I understand it correct, the problem is our gcc. So it would be necessary to fix gcc not Qt. What you propose is a work around for a bug in our gcc which only exposes on OS/4 kernel. Correct?
--- End quote ---
Basically correct. Lars's description is pretty good but to expand on his point one.
Our GCC compiles code into the aout object format. Aout is primitive and doesn't understand the .align directive, so the resulting machine language is randomly aligned (it might support .align 4, I forget) when it comes to SSE+ instructions. The fix is to change the object type, likely to ELF, a fairly big job that might never happen though it has been planned.
There is also an issue open for supporting AVX+ in the OS/2 kernel, might happen and might not as it means patching the kernel to store the registers during context switches. If this happens or the OS/4 kernel is used, these programs crash. Even if the kernel is updated along with GCC, we still have all the older code floating around that will crash. Disabling the use of AVX+ until GCC is fixed will prevent this in the future.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version