[Libre-soc-bugs] [Bug 238] POWER Compressed Formal Standard writeup

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Mon Nov 16 01:47:41 GMT 2020


--- Comment #18 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #16)
> (In reply to Luke Kenneth Casson Leighton from comment #14)
> > whilst a case for using the spare bits 2-4 as FP mode bits (single/double,
> > rounding) is fairly clear, for INT it is less so
> I'd argue for a bit for f32/f64 and a bit for fp->int trunc vs. round, but
> otherwise rounding mode should always be dynamic and not encoded -- use
> 32-bit if you need something else, since that is what's used in >99% of code.

ok do you want to have a go at reencoding the FP section? i have not studied it
nearly as much as the INT v3.0B so you would likely do a better job than me

plus it's 130am here now

> The left over bits can be used for encoding other more important
> instructions.


> compilers can get the number of necessary mv instructions waay down, they
> have lots of experience from x86.

mm... mumble but not entirely convinced

> > with mv being 16bit and the op itself being 16bit there is no point, you
> > might as well use the 32bit version which can do dest,src1,src2
> > 
> > which means that having "dest, src1, src2" gives an advantage as it saves 16
> > bits.
> except that using those bits instead to encode more immediate bits for ld,
> addi, st most likely gives more advantage.

ah i mean in the arithmetic section (the trick of cmp applies/applied) which
has no immediates.

if you mean right at the top, the ldi, then at the cost of all ldi/sti being

   ldi r5, r5(20) # or something like it

then yes it would be possible to get another 3 bits on the immediates... for

or use one bit to indicate lwi/stwi

another way to extend the range of immediates: align them.  ldi must be 8 byte
aligned, lwi must be word aligned.
not unreasonable.

however if you meant in the brownfield arithmetic encoding use bits 2-4 to
extend ldi/sti nooo the encoding is already complex.

You are receiving this mail because:
You are on the CC list for the bug.

More information about the libre-soc-bugs mailing list