loongArch64 0.2.6

loongArch64 support for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
impl_define_csr!(
    Badi,
    "Bad Instruction\n\
                        This register is used to record the instruction code of the instruction that triggers the synchronous-related exception.\n\
                        The so-called synchronous-related exceptions are all exceptions except the INTerrupt (INT),\n\
                        the Guest CSR Hardware Change exception (GCHC), and the Machine ERRor exception (MERR)."
);

impl_read_csr!(0x8, Badi);

impl Badi {
    /// Returns the bad instruction
    pub fn inst(&self) -> u32 {
        self.bits as u32
    }
}