lkml.org 
[lkml]   [2023]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v5 4/9] riscv/kprobe: Add common RVI and RVC instruction decoder code
Date
"liaochang (A)" <liaochang1@huawei.com> writes:

>> Shouldn't the mask be 0xf003?
>
> Actually, the mask should be 0xf003 indeedly, but it also bring another problem that
> it can't tell C.MV and C.JR via the mask and value parts. Look opcodes below:
>
> 15 14 13 12 | 11 10 9 8 | 7 6 5 4 | 3 2 1 0
> C.JR: 1 0 0 0 | rs1 0 1 0
> C.MV: 1 0 0 0 | rd rs2 1 0
>
> The only differece between C.MV and C.JR is the bits[2~6], these bitfield of C.JR is zero,
> the ones of C.MV is rs2 which never be zero. In order to tell C.MV and C.JR correclty, it
> is better to adjust the mask of C.JR to be 0xf07f as your patch(riscv, kprobe: Stricter c.jr/c.jalr decoding)
>
> Looking forward to your feedback.

Yup, that was the reason I submitted the fix! Let's wait for the fix to
be applied, and not include that fix in your feature series.


Björn

\
 
 \ /
  Last update: 2023-03-26 23:26    [W:0.051 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site