target/riscv: fix RV128 lq encoding
Resend from the correct email address to get accepted by Mailman.
Quoted 38 lines · Christoph Muellner
If LQ has func3==010 and is located in the MISC-MEM opcodes, then it conflicts with the CBO opcode space.
However, since LQ is specified as: "LQ is added to the MISC-MEM major opcode", we have an implementation bug, because 'major opcode' refers to func3, which must be 111.This results in the following instruction encodings:
lq ........ ........ .111.... .0001111
cbo_clean00000000 0001.... .0100000 00001111cbo_flush00000000 0010.... .0100000 00001111cbo_inval00000000 0000.... .0100000 00001111cbo_zero00000000 0100.... .0100000 00001111^^^-func3 ^^^^^^^-opcodeSigned-off-by Christoph Muellner <[email protected]>--- target/riscv/insn32.decode | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)target/riscv/insn32.decode +1
-2@@ -168,7 +168,7 @@ sraw 0100000 ..... ..... 101 ..... 0111011 @r # *** RV128I Base Instruction Set (in addition to RV64I) *** ldu ............ ..... 111 ..... 0000011 @i -lq ............ ..... 010 ..... 0001111 @i +lq ............ ..... 111 ..... 0001111 @i sq ............ ..... 100 ..... 0100011 @s addid ............ ..... 000 ..... 1011011 @i sllid 000000 ...... ..... 001 ..... 1011011 @sh6 --2.34.1
PATCH 1/1 target/riscv: fix RV128 lq encoding
If LQ has func3==010 and is located in the MISC-MEM opcodes, then it conflicts with the CBO opcode space.
However, since LQ is specified as: "LQ is added to the MISC-MEM major opcode", we have an implementation bug, because 'major opcode' refers to func3, which must be 111.
This results in the following instruction encodings:
lq ........ ........ .111.... .0001111cbo_clean 00000000 0001.... .0100000 00001111cbo_flush 00000000 0010.... .0100000 00001111cbo_inval 00000000 0000.... .0100000 00001111cbo_zero 00000000 0100.... .0100000 00001111
^^^-func3
^^^^^^^-opcode--- target/riscv/insn32.decode | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target/riscv/insn32.decode +1 -1
@@ -168,7 +168,7 @@ sraw 0100000 ..... ..... 101 ..... 0111011 @r # *** RV128I Base Instruction Set (in addition to RV64I) *** ldu ............ ..... 111 ..... 0000011 @i -lq ............ ..... 010 ..... 0001111 @i +lq ............ ..... 111 ..... 0001111 @i sq ............ ..... 100 ..... 0100011 @s addid ............ ..... 000 ..... 1011011 @i sllid 000000 ...... ..... 001 ..... 1011011 @sh6
Signature · 1 line
2.34.1