forked from probe-rs/probe-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #132 from bugadani/xtensa
Xtensa: write memory
- Loading branch information
Showing
6 changed files
with
185 additions
and
32 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
14 changes: 14 additions & 0 deletions
14
probe-rs/src/architecture/xtensa/arch/instruction/format.rs
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,3 +1,17 @@ | ||
//! Instruction formats implemented as functions. | ||
//! | ||
//! Instruction formats are common bytecode formats used to simplify instruction implementation. | ||
//! They are implemented with an opcode and a set of more-or-less standardised slots where | ||
//! instructions may define their operands. | ||
//! | ||
//! For more information, see the Xtensa ISA documentation. | ||
|
||
/// Implements the RSR instruction format. | ||
pub const fn rsr(opcode: u32, rs: u8, t: u8) -> u32 { | ||
opcode | (rs as u32) << 8 | (t as u32 & 0x0F) << 4 | ||
} | ||
|
||
/// Implements the RRI8 instruction format. | ||
pub const fn rri8(opcode: u32, at: u8, _as: u8, off: u8) -> u32 { | ||
opcode | ((off as u32) << 16) | (_as as u32 & 0x0F) << 8 | (at as u32 & 0x0F) << 4 | ||
} |
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