spike-dasm-wrapper

Crates.iospike-dasm-wrapper
lib.rsspike-dasm-wrapper
version0.0.2
sourcesrc
created_at2020-09-30 14:54:53.534594
updated_at2020-09-30 14:57:17.235074
descriptionRISC-V instruction disassembler based on spike-dasm.
homepage
repositoryhttps://github.com/msyksphinz-self/spike-dasm-wrapper
max_upload_size
id294634
size2,213,506
msyksphinz-self (msyksphinz-self)

documentation

README

spike-dasm-wrapper

spike-dasm-wrapper is wrapper of spike-dasm in riscv-isa-sim.

Usage

[dependencies]
spike-dasm-wrapper = "0.0.2"

Example

use spike_dasm_wrapper::{Disasm};

fn main() {
	let mut disasm = Disasm::new();

	let dis_str = disasm.disassemble(0x0000_0000);
	assert_eq!(dis_str, "c.addi4spn s0, sp, 0");

	let dis_str = disasm.disassemble(0x01c28293);
	assert_eq!(dis_str, "addi    t0, t0, 28");

	let dis_str = disasm.disassemble(0x4201);
	assert_eq!(dis_str, "c.li    tp, 0");
}

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 7

cargo fmt