Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions crates/core_arch/src/loongarch32/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ unsafe extern "unadjusted" {
}

/// Generates the cache operation instruction
#[inline]
#[inline(always)]
#[unstable(feature = "stdarch_loongarch", issue = "117427")]
pub unsafe fn cacop<const IMM5: i32, const IMM_S12: i32>(b: i32) {
static_assert_uimm_bits!(IMM5, 5);
Expand All @@ -24,23 +24,23 @@ pub unsafe fn cacop<const IMM5: i32, const IMM_S12: i32>(b: i32) {
}

/// Reads the CSR
#[inline]
#[inline(always)]
#[unstable(feature = "stdarch_loongarch", issue = "117427")]
pub unsafe fn csrrd<const IMM14: i32>() -> i32 {
static_assert_uimm_bits!(IMM14, 14);
__csrrd(IMM14)
}

/// Writes the CSR
#[inline]
#[inline(always)]
#[unstable(feature = "stdarch_loongarch", issue = "117427")]
pub unsafe fn csrwr<const IMM14: i32>(a: i32) -> i32 {
static_assert_uimm_bits!(IMM14, 14);
__csrwr(a, IMM14)
}

/// Exchanges the CSR
#[inline]
#[inline(always)]
#[unstable(feature = "stdarch_loongarch", issue = "117427")]
pub unsafe fn csrxchg<const IMM14: i32>(a: i32, b: i32) -> i32 {
static_assert_uimm_bits!(IMM14, 14);
Expand Down
Loading