Skip to content

Commit

Permalink
Implemented IALU fc-3 for immediate 64-bit in VM.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed May 20, 2024
1 parent 5aa2a05 commit 07a0d14
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/rishka_vm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,18 @@ void RishkaVM::execute(uint32_t inst) {
break;
}

case RISHKA_FC3_SLLI64:
val = RishkaVM::shiftLeftInt64(val, immediate & 0x3F);
break;

case RISHKA_FC3_SRLI64:
val = RishkaVM::shiftRightInt64(val, immediate & 0x3F);
break;

case RISHKA_FC3_SRAI64:
val = RishkaVM::arithmeticShiftRightInt64(val, immediate & 0x3F);
break;

default:
this->panic("Invalid immediate instruction.");
break;
Expand Down

0 comments on commit 07a0d14

Please sign in to comment.