On Mon, Apr 22, 2024 at 11:21:36AM GMT, Greg Steuck wrote:
> Stuart Henderson <s...@spacehopper.org> writes:
> 
> > On 2024/04/22 10:30, Greg Steuck wrote:
> >> > 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.
> >> 
> >> Thanks James for working through this. Yes, we need the new development
> >> to happen on -current ports with -current base system. We'd also want a
> >> more complicated patch than the one you just sent because base supports
> >> avx-512 now.
> >
> > We probably don't need any patches for this in -current now that avx-512
> > opcodes are supported by the OS.
> 
> James, if you'd like to play with this on -current, please remove both
> patch-libraries_text_simdutf_simdutf_h and
> patch-libraries_text_cbits_measure_off_c
> 
> This should make the offending check disappear and the pre-existing
> checks should correctly report the OS doesn't support these instructions
> on your machine. We can then confirm that avx-512 is working for people
> who previously had problems.
> 
> Thanks
> Greg

It works. I upgraded to -current and built ghc (now version 9.6.5)
after deleting patches/patch-libraries_text_cbits_measure_off_c and
patches/patch-libraries_text_simdutf_simdutf_h. All three examples
now work (i.e. no SIGILL):

- T.take 1 $ T.pack "aa" in ghci
- pandoc </dev/null
- cabal-bundler

This is on the old AMD Phenom machine.

If you're interested in fixing it on 7.5 (I don't know how much
effort patching -stable ports is) please let me know if there's any
more testing that would be helpful for the patch I sent earlier
that makes has_avx512_vl_bw unconditionally return false. I can
still boot this machine to 7.5 with a USB stick.

-- 
James

Reply via email to