[Libre-soc-bugs] [Bug 1221] weird ISAcaller bug, _RA not present

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Wed Nov 29 04:56:05 GMT 2023


--- Comment #4 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #2)
> from going through it with a debugger, it looks like _RA was just never
> implemented for svp64 instructions with elwid!=64:
> https://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=src/openpower/
> decoder/isa/caller.py;h=96833c598b76aacbf9d8cacdbdc6a3ac1ba1928b;
> hb=2eb5abb845808c436797f3a5449f847fefdacca8#l2531
> so, it looks like GPR.getz doesn't have the information necessary to pick
> the right register, 

yep i remember now. elwidths were hack-started about 8-10 months ago.
the context (offset, srcid, dstwd, xlen) aaaaalll need to be passed
through to GPR.getz. manipulating the regfile directly is a pig,
it really shouldn't be one. CR Field manipulation is going to be
similar fun when extending ISACaller to 128 CR Fields (CR[BFA] etc)

> so, luke, what do you think of changing (RA|0) to
> translate to GPR.getz(_RA, RA) so getz can just return the second input if
> the first is non-zero?

it needs to be passed the full context... i like this hack though.

it should solve the immediate problem, can you go ahead with it in
the 672_pospopcount branch for me and add a v. quick unit test to
src/openpower/test/alu/svp64_cases.py class SVP64ALUElwidthTestCase?


> we can then pass in the original register number (with the SVP64 extension
> bits) in _RA. This would *not* point to a sub-register (that can be added
> later if necessary).

an object that GPR.getz can interpret... it's going to need the
exact same context/parameters/inputs as ISACaller.get_input():


this was always planned, i just never got round to it.

> this seems like the simplest alternative.

yes. if you've time (and power!) could you drop that in?

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

More information about the libre-soc-bugs mailing list