[libre-riscv-dev] [Bug 139] Add LD.X and ST.X? Strided

bugzilla-daemon at libre-riscv.org bugzilla-daemon at libre-riscv.org
Wed Oct 9 14:13:20 BST 2019


http://bugs.libre-riscv.org/show_bug.cgi?id=139

--- Comment #63 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #60)

> On the other hand, I think having a separate compare-to-mask instruction
> (instead of repurposing BEQ) would be worthwhile, 

remember, the rule is: no new opcodes.  the reasons why we're breaking that
for vector ops is due to the sub-vector-element interactions.  mv.x because
it doesn't exist (as a scalar op).  swizzle the case is also clear.

adding a compare-to-mask is not clear at all... unless...

> since we could use R-type
> instructions instead of B-type, allowing the compiler to greatly simplify
> register allocation. 

hmmm... ok the thing that's a mess is: it has to work well as a scalar
instruction, as well.  if the [proposed] int-compare is made identical
to the FP-compare (stores a 1 in the LSB), and the vectorised-versions
likewise store a predicate mask, that would be ok.  will raise a new
bugreport about the idea.

> Also, that would avoid needlessly triggering the branch
> predictor, allowing for possible power savings.

that can be done by [outside of VBLOCK] jumping to the instruction immediately
following the branch.  so if the last instruction inside a VBLOCK is the BEQ
(etc) and the branch... you get the idea.  if the branch location *is* where
the PC will be on the very next cycle anyway, the branch predictor can be
disabled.

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


More information about the libre-riscv-dev mailing list