-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Emulate mtinst when not provided by hardware
Signed-off-by: Wojciech Ozga <[email protected]>
1 parent
56cf466
commit a76b902
Showing
9 changed files
with
165 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
// SPDX-FileCopyrightText: 2023 IBM Corporation | ||
// SPDX-FileContributor: Wojciech Ozga <[email protected]>, IBM Research - Zurich | ||
// SPDX-License-Identifier: Apache-2.0 | ||
use crate::core::architecture::specification::*; | ||
use crate::core::architecture::GeneralPurposeRegister; | ||
use crate::error::Error; | ||
|
||
|
@@ -24,22 +25,6 @@ pub fn decode_result_register(mtinst: usize) -> Result<GeneralPurposeRegister, E | |
// section once compressed instructions are supported in the | ||
// rust-decode crate! | ||
const SH_RS2C: usize = 2; | ||
const INSN_MATCH_C_LD: usize = 0x6000; | ||
const INSN_MASK_C_LD: usize = 0xe003; | ||
const INSN_MATCH_C_SD: usize = 0xe000; | ||
const INSN_MASK_C_SD: usize = 0xe003; | ||
const INSN_MATCH_C_LW: usize = 0x4000; | ||
const INSN_MASK_C_LW: usize = 0xe003; | ||
const INSN_MATCH_C_SW: usize = 0xc000; | ||
const INSN_MASK_C_SW: usize = 0xe003; | ||
const INSN_MATCH_C_LDSP: usize = 0x6002; | ||
const INSN_MASK_C_LDSP: usize = 0xe003; | ||
const INSN_MATCH_C_SDSP: usize = 0xe002; | ||
const INSN_MASK_C_SDSP: usize = 0xe003; | ||
const INSN_MATCH_C_LWSP: usize = 0x4002; | ||
const INSN_MASK_C_LWSP: usize = 0xe003; | ||
const INSN_MATCH_C_SWSP: usize = 0xc002; | ||
const INSN_MASK_C_SWSP: usize = 0xe003; | ||
|
||
let log_regbytes = 3; // for 64b! | ||
let shift_right = |x: usize, y: isize| { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters