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

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sun Nov 22 02:07:41 GMT 2020


https://bugs.libre-soc.org/show_bug.cgi?id=238

--- Comment #52 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Jacob Lifshay from comment #51)
> (In reply to Luke Kenneth Casson Leighton from comment #46)
> > https://godbolt.org/z/enTPes
> > 
> > hmmm this short example seems to be using an awful lot of r1 *and* r31 LD/ST
> 
> That's because you forgot to enable optimizations -- we *should not* be
> optimizing compressed instructions for gcc's unoptimized output because
> that's not the code you'll see when people care about going fast and/or
> being small.

Some additional details: For PowerPC64, most functions will have a
statically-sized stack frame, which allows using offsets from r1 for all stack
frame memory access. The only code that uses r31 is code that has a
variable-size stack frame (or where the compiler just doesn't know -- like the
unoptimized code linked above). Therefore, I think we shouldn't have special
compressed instructions just for the frame pointer, but I do think we should
have the frame pointer included in the registers usable by compressed
instructions.

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


More information about the libre-soc-bugs mailing list