> Alastair Bridgewater <email address hidden> writes:
>
>> On x86-64: (sb-bignum:%bignum-ref
>> #x1234567890123456789012345678901234567890 0) => #x5678901234567890. For
>> any other platform, you'd have to mask it down from there to
>> positive-fixnum or similar. All backends should support %BIGNUM-REF. Good
>> enough?
>
> I think not quite -- we might still end up consing intermediate bignums,
> because all our backend support for mask-signed-field requires constant
> field width. Given support for mask-signed-field with non-constant (but
> < n-word-bits) size, that could work; it should be about as hard as
> getting ASH right (which has similar issues around word size).
I take this back. The IR2-CONVERT optimizer for MASK-SIGNED-FIELD
supports exactly the cases that we need, probably not entirely
coincidentally. Rewrite in progress...
(finding that IR2-CONVERT optimizer makes me wonder whether we actually
need the MASK-SIGNED-FIELD-{WORD,BIGNUM}/C VOPs on any platform...)
Christophe Rhodes <email address hidden> writes:
> Alastair Bridgewater <email address hidden> writes: %bignum- ref 456789012345678 901234567890 0) => #x5678901234567890. For
>
>> On x86-64: (sb-bignum:
>> #x1234567890123
>> any other platform, you'd have to mask it down from there to
>> positive-fixnum or similar. All backends should support %BIGNUM-REF. Good
>> enough?
>
> I think not quite -- we might still end up consing intermediate bignums,
> because all our backend support for mask-signed-field requires constant
> field width. Given support for mask-signed-field with non-constant (but
> < n-word-bits) size, that could work; it should be about as hard as
> getting ASH right (which has similar issues around word size).
I take this back. The IR2-CONVERT optimizer for MASK-SIGNED-FIELD
supports exactly the cases that we need, probably not entirely
coincidentally. Rewrite in progress...
(finding that IR2-CONVERT optimizer makes me wonder whether we actually FIELD-{ WORD,BIGNUM} /C VOPs on any platform...)
need the MASK-SIGNED-
Cheers,
Christophe