On Sun, Apr 21, 2024 at 11:49:46AM -0700, Greg Steuck wrote: > Stuart Henderson <s...@spacehopper.org> writes: > > > This is in the avx512 checks in the text library again, I think it must > > be patch-libraries_text_cbits_measure_off_c (the simdutf one doesn't > > explicitly check for xgetbv but it does check for osxsave so I think > > wouldn't have executed the xgetbv opcode on this cpu). > > > > As -current does now have avx512 support in the kernel we probably > > should be able to remove that patch, but it needs testing on an avx512 > > machine as well as that old Phenom. > > Sadly I have neither nearby. Furthermore, sumdutf upstream doesn't have > a fix for this issue either. So this will have to be original work. > > https://github.com/simdutf/simdutf/blob/master/include/simdutf/internal/isadetection.h#L232 > > Thanks > Greg
The line you linked to comes after a check for cpuid_bit::osxsave, so I don't think it would get reached on machines that don't have xgetbv, i.e. it should be fine. Similarly, the existing patch-libraries_text_simdutf_simdutf_h in ports doesn't seem to cause a problem with my AMD machine. At least, now I have pandoc working; not sure if I actually exercised that code in simdutf.h. If it would help, I could update my old AMD machine to -current and check ghc works with the two patches removed, once I've finished trying out the patch I just sent for 7.5. -- James