[Libre-soc-bugs] [Bug 238] POWER Compressed Formal Standard writeup
    bugzilla-daemon at libre-soc.org 
    bugzilla-daemon at libre-soc.org
       
    Tue Dec  1 00:56:34 GMT 2020
    
    
  
https://bugs.libre-soc.org/show_bug.cgi?id=238
--- Comment #161 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Alexandre Oliva from comment #159)
> 2.1.4 states branches always branch to a 4-byte aligned address
> 
> I thought it was also the case that branch targets also had to be in
> uncompressed mode,
yes
> but that unconditional branches have M and even N suggest
> otherwise:
> 
> | N | offs2   | | 000.LK | offs!=0        | M | b, bl
I'd guess not much thought was given to that and N and M are there just for
consistency, simplifying the decoder.
> as for conditional branches, do M and N apply whether or not the branch is
> taken?
> 
> | N | BO3 BI3 | | 001.0  | LK BI | BO     | M | bclr, bclrl
I'd say they apply only to untaken branches.
> what about when they're not there?  M=N=1 suggest immediate mode, that's
> always followed by another uncompressed insn:
> 
> | 1 | offs2   | | 000.LK | BI    | BO1 oo | 1 | bc, bcl
> 
> but the LK variants would suggest function calls, targeting entry points in
> uncompressed mode.  should they imply a switch to uncompressed mode at least
> when the branch is taken?
I would expect switching to uncompressed mode due to the branch. The return
instruction would also switch to uncompressed mode.
-- 
You are receiving this mail because:
You are on the CC list for the bug.
    
    
More information about the libre-soc-bugs
mailing list