Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ver 1.0.1 #24

Merged
merged 2 commits into from
Sep 28, 2024
Merged

Ver 1.0.1 #24

merged 2 commits into from
Sep 28, 2024

Conversation

Alignof
Copy link
Owner

@Alignof Alignof commented Sep 28, 2024

  • Remove extern crate alloc;

The behavior in the no_std environment was confirmed with the following code.
env: https://github.com/Alignof/helloworld_in_riscv_and_rust_baremetal

#![no_main]
#![no_std]

extern crate panic_halt;

use raki::{BaseIOpcode, Decode, InstFormat, Instruction, Isa, OpcodeKind};
use riscv_rt::entry;

#[entry]
#[allow(clippy::empty_loop)]
fn main() -> ! {
    assert_eq!(
        0b1111_1111_1001_1111_1111_0000_0110_1111_u32.decode(Isa::Rv64),
        Ok(Instruction {
            opc: OpcodeKind::BaseI(BaseIOpcode::JAL),
            rd: Some(0),
            rs1: None,
            rs2: None,
            imm: Some(-8),
            inst_format: InstFormat::JFormat,
        })
    );
    loop {}
}

@Alignof Alignof self-assigned this Sep 28, 2024
@Alignof Alignof merged commit 0ba9d88 into master Sep 28, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant