Re: [Sbcl-devel] [Sbcl-commits] master: x86-64: use bts/btr for DPB of a single bit.

7 views
Skip to first unread message

Christophe Rhodes

unread,
Sep 30, 2023, 2:58:12 AM9/30/23
to sbcl-...@lists.sourceforge.net
stassats via Sbcl-commits <sbcl-c...@lists.sourceforge.net> writes:

> +(define-vop (dpb-c/fixnum)
> + (:generator 2
> + (if (location= posn temp)
> + (inst inc :dword temp)
> + (inst lea :dword temp (ea 1 posn)))

Am I reading this right that this is specific for n-fixnum-tag-bits = 1?
With the more generic version changing the condition to

(and (location= posn temp) (= n-fixnum-tag-bits 1))

and the alternative to

(inst lea :dword temp (eq n-fixnum-tag-bits posn))

?

(I dare say n-fixnum-tag-bits != 1 is currently broken on x86-64 for
more reasons than I'm currently aware of, but it would be nice to not
make things worse.)

Christophe


_______________________________________________
Sbcl-devel mailing list
Sbcl-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-devel

Stas Boukarev

unread,
Sep 30, 2023, 3:11:53 AM9/30/23
to Christophe Rhodes, sbcl-...@lists.sourceforge.net
Maybe, but variable n-fixnum-tag-bits has been dead basically from the start, so I don't spend time thinking about it, let alone testing it. And untested code is the same as no code.
Reply all
Reply to author
Forward
0 new messages