Re: [PATCH v3 03/14] RISC-V: detach funct-values from their offset

Andrew Jones
2022-12-01T17:36:31Z

On Wed, Nov 30, 2022 at 11:56:03PM +0100, Heiko Stuebner wrote:
> From: Heiko Stuebner <heiko.stuebner@vrull.eu>
>
> Rather than defining funct3, funct4, etc values pre-shifted to their
> target-position in an instruction, define the values themselves and
> only shift them where needed.
>
> This allows using these funct-values in other places as well, for example
> when decoding functions.
>
> At the same time also reduces the use of magic numbers, one would need
> a spec manual to understand.
>
> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
> Signed-off-by: Heiko Stuebner <heiko.stuebner@vrull.eu>
> ---
> arch/riscv/include/asm/parse_asm.h | 100 +++++++++++++++++------------
> 1 file changed, 59 insertions(+), 41 deletions(-)
>

Reviewed-by: Andrew Jones <ajones@ventanamicro.com>