summaryrefslogtreecommitdiff
path: root/src/instructions/gen_tools.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/instructions/gen_tools.rs')
-rw-r--r--src/instructions/gen_tools.rs28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/instructions/gen_tools.rs b/src/instructions/gen_tools.rs
deleted file mode 100644
index a3d45bc..0000000
--- a/src/instructions/gen_tools.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) 2025 taitep
-// SPDX-License-Identifier: MIT
-//
-// This file is part of TRVE (https://gitea.taitep.se/taitep/trve)
-// See LICENSE file in the project root for full license text.
-
-use std::hint::unreachable_unchecked;
-
-use crate::instructions::{OpcodeHandler, Splitter};
-
-pub fn insert_funct3_splitter(splitter: &mut Option<Splitter>) -> &mut [OpcodeHandler; 8] {
- match splitter {
- Some(Splitter::Funct3Splitter(s)) => s.as_mut(),
- Some(_) => panic!("Unexpected splitter variant"),
- None => {
- *splitter = Some(Splitter::Funct3Splitter(Box::new(std::array::from_fn(
- |_i| OpcodeHandler {
- handler: None,
- splitter: None,
- },
- ))));
- match splitter {
- Some(Splitter::Funct3Splitter(s)) => s.as_mut(),
- _ => unsafe { unreachable_unchecked() },
- }
- }
- }
-}