Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(vnclip): use uimm instead of imm for vnclip_wi instructions #668

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/isa/riscv64/instr/rvv/vcompute_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,8 +584,14 @@ void arthimetic_instr(int opcode, int is_signed, int widening, int narrow, int d
break;
case SRC_VI :
shift_mask = 0x1f;
if(is_signed) rtl_li(s, s1, s->isa.instr.v_opsimm.v_simm5);
else {
if(is_signed) {
if (opcode == NCLIP) {
// vnclip use unsigned imm, signed vs2
rtl_li(s, s1, s->isa.instr.v_opimm.v_imm5);
} else {
rtl_li(s, s1, s->isa.instr.v_opsimm.v_simm5);
}
} else {
if (opcode == MSLEU || opcode == MSGTU || opcode == SADDU) {
rtl_li(s, s1, s->isa.instr.v_opsimm.v_simm5);
switch (vtype->vsew) {
Expand Down