On Fri, 26 May 2017, Bruce Hoult wrote:
> That's getting a bit extreme :-)
>
> There will be essentially no difference (zero difference in size I think?)
> between 32, 64 or 128 bit if you don't use the C extension.
I wouldn't think so, but the overall executable size definitely changes
(though that could be to elf header differences).
I have things working on 32-bit builds now, I'll update the graphs later
today.
> So 128 bit versions are not worth doing at all.
Would still be interested in doing if possible, as I don't have any 128
bit architectures.
> I'd forget E. That's likely to be used in situations where there is barely
> any code at all and they simply don't care about code size. If they don't
> want to spend the die size for 16 registers they probably aren't going to
> have multiply or a compressed instruction decoder either (although it is
> permitted). And no OS :-) N.B. "E" replaces "I", so it's RV32E, not RV32IE.
The ll_asm code definitely follows different patters depending on whether
32, 16, 8, or 3 registers are available so it might be worth checking
anyway.
> M is more annoying. You could code up divmod by 10 for the printing of
> integers. That will make a quite significant code size difference for such a
> small program. Do you even count that for other platforms without a divide
> instruction? Maybe it makes more sense to count the size of a function call
> to a divmod runtime library function, but just assume that function exists,
> rather than counting its size?
It gets complicated accounting for it, especially as some architectures
have no divide, and some have partial divide.
I have to admit I don't really sort out the divide/no-divide stuff on ARM
very well, but if you did want to do a fair comparison between ARM/Thumb2
you should take into account the availability of divide.
Vince