guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#53895] [PATCH 0/5] More CPU detection


From: Efraim Flashner
Subject: [bug#53895] [PATCH 0/5] More CPU detection
Date: Wed, 9 Feb 2022 13:41:40 +0200

On Wed, Feb 09, 2022 at 11:43:21AM +0100, Ludovic Courtès wrote:
> Efraim Flashner <efraim@flashner.co.il> skribis:
> 
> > +              (letrec-syntax ((if-flags (syntax-rules (=>)
> > +                                          ((_)
> > +                                           #f)
> > +                                          ((_ (flags ... => name) rest ...)
> > +                                           (if (every (lambda (flag)
> > +                                                        (set-contains? 
> > (cpu-flags cpu)
> > +                                                                       
> > flag))
> > +                                                      '(flags ...))
> > +                                             name
> > +                                             (if-flags rest ...))))))
> > +
> > +                (when (= 22 (cpu-family cpu))
> > +                  (if-flags ("movbe" => "btver2")))
> > +                (when (= 6 (cpu-family cpu))
> > +                  (if-flags ("3dnowp" => "athalon")))
> 
> This has no effect (because ‘if-flags’ returns a value that is ignored
> since it’s not returned.)
> 
> What we could do is extend ‘if-flags’ so that it can optionally check
> for a family number:
> 
>   (if-flags ((family 22) "movbe" => "btver2")
>              …)

Another option would be to just move it to the bottom of the if-flags so
it should take effect then.


-- 
Efraim Flashner   <efraim@flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]