diff options
| author | Nam Cao <[email protected]> | 2023-07-31 18:39:25 +0000 |
|---|---|---|
| committer | Palmer Dabbelt <[email protected]> | 2023-08-16 14:23:09 +0000 |
| commit | 79bc3f85c51fc352f8e684ba6b626f677a3aa230 (patch) | |
| tree | 401aa8cacb495c890a320893569b96468530afe9 /tools/perf/scripts/python/stat-cpi.py | |
| parent | riscv: entry: set a0 = -ENOSYS only when syscall != -1 (diff) | |
| download | kernel-79bc3f85c51fc352f8e684ba6b626f677a3aa230.tar.gz kernel-79bc3f85c51fc352f8e684ba6b626f677a3aa230.zip | |
riscv: correct riscv_insn_is_c_jr() and riscv_insn_is_c_jalr()
The instructions c.jr and c.jalr must have rs1 != 0, but
riscv_insn_is_c_jr() and riscv_insn_is_c_jalr() do not check for this. So,
riscv_insn_is_c_jr() can match a reserved encoding, while
riscv_insn_is_c_jalr() can match the c.ebreak instruction.
Rewrite them with check for rs1 != 0.
Signed-off-by: Nam Cao <[email protected]>
Reviewed-by: Charlie Jenkins <[email protected]>
Fixes: ec5f90877516 ("RISC-V: Move riscv_insn_is_* macros into a common header")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stat-cpi.py')
0 files changed, 0 insertions, 0 deletions
