You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 5-bit immediate argument needs to be sign extended to XLEN to
account for larger than 5-bit subsets of a negative immediate.
As an example consider and qc.e.ori and qc.insbi which here should
produce the same output 0x1ffff
li t1, 0x10000
qc.e.ori t0, t1, 0xffff ; -> t0 = 0x1ffff
qc.insbi t1, -1, 16, 0 ; -> t1 = 0x1ffff
for qc.insbi this only works if imm is sign extended 0x1f -> 0xffffffff,
otherwise the subset inserted is simply 0x1f and we get 0x1001f as
output.
The same problem exists for qc.insbri.
Signed-off-by: Anton Johansson <anjo@rev.ng>
Co-authored-by: Anton Johansson <anjo@rev.ng>
0 commit comments