On Wed, Nov 30, 2022 at 11:56:03PM +0100, Heiko Stuebner wrote: > From: Heiko Stuebner <heiko.stuebner@xxxxxxxx> > > 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@xxxxxxxxxxxxx> > Signed-off-by: Heiko Stuebner <heiko.stuebner@xxxxxxxx> > --- > arch/riscv/include/asm/parse_asm.h | 100 +++++++++++++++++------------ > 1 file changed, 59 insertions(+), 41 deletions(-) > Reviewed-by: Andrew Jones <ajones@xxxxxxxxxxxxxxxx>