I wonder how useful arbitrary-width integers would be for SDCC users.
_ExtInt(N) would be an N-bit integer type.
E.e. one could have an unsigned 24-bit integer (in 3 bytes) via
unsigned _ExtInt(24) i;
or a 23-bit type (3 bytes in memory, 23 value bits and 1 padding bit):
unsigned _ExtInt(23) i
Hello,
It could be useful in bit packed structure, but that implies the absence
of any padding bits...
I cant think of a use case outside of structures.
BTW, Cant you achieve arbitrary size integers with a bitfield structure?
https://stackoverflow.com/questions/3917425/how-to-implement-unsi
Am 12.10.20 um 17:55 schrieb Alan Cox:
> On Mon, 12 Oct 2020 17:25:55 +0200
> Philipp Klaus Krause wrote:
>
>> I wonder how useful arbitrary-width integers would be for SDCC users.
>>
>> _ExtInt(N) would be an N-bit integer type.
>>
>> E.e. one could have an unsigned 24-bit integer (in 3 bytes) v
Am 12.10.20 um 17:49 schrieb Sebastien Lorquet:
> Hello,
>
> It could be useful in bit packed structure, but that implies the absence
> of any padding bits...
>
> I cant think of a use case outside of structures.
>
>
> BTW, Cant you achieve arbitrary size integers with a bitfield structure?
>
On Mon, 12 Oct 2020 17:25:55 +0200
Philipp Klaus Krause wrote:
> I wonder how useful arbitrary-width integers would be for SDCC users.
>
> _ExtInt(N) would be an N-bit integer type.
>
> E.e. one could have an unsigned 24-bit integer (in 3 bytes) via
>
> unsigned _ExtInt(24) i;
>
> or a 23-bit
I'd like to see it, or even just int24 as avr-gcc supports. Doing 24-bit
math is faster and takes fewer instructions than int32.
On Mon, Oct 12, 2020, 12:39 Philipp Klaus Krause wrote:
> I wonder how useful arbitrary-width integers would be for SDCC users.
>
> _ExtInt(N) would be an N-bit integ