Implement MUL
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
mod macros;
|
||||
|
||||
mod rvi;
|
||||
mod rvm;
|
||||
|
||||
use crate::{
|
||||
core::Core,
|
||||
@@ -31,6 +32,7 @@ pub(crate) fn find_and_exec(instr: Instruction, core: &mut Core) -> Result<(), E
|
||||
// OP
|
||||
(0b000, 0b0000000) => rvi::add(core, instr),
|
||||
(0b000, 0b0100000) => rvi::sub(core, instr),
|
||||
(0b000, 0b0000001) => rvm::mul(core, instr),
|
||||
(0b010, 0b0000000) => rvi::slt(core, instr),
|
||||
(0b011, 0b0000000) => rvi::sltu(core, instr),
|
||||
(0b001, 0b0000000) => rvi::sll(core, instr),
|
||||
|
||||
9
src/instructions/rvm.rs
Normal file
9
src/instructions/rvm.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
// Copyright (c) 2025 taitep
|
||||
// SPDX-License-Identifier: BSD-2-Clause
|
||||
//
|
||||
// This file is part of TRVE (https://gitea.taitep.se/taitep/trve)
|
||||
// See LICENSE file in the project root for full license text.
|
||||
//
|
||||
use crate::{core::Core, decode::Instruction, exceptions::Exception};
|
||||
|
||||
instr_op_r!(mul, u64::wrapping_mul);
|
||||
Reference in New Issue
Block a user