Skip to content

Tracking Issue for LoongArch CRC Intrinsics #156908

@heiher

Description

@heiher

This is a tracking issue for the CRC intrinsics on LoongArch64.
No feature gate is required for this issue, since the CRC instructions are part of the base LoongArch64 v1.0 ISA.
CRC instructions are only defined for the LoongArch64 ISA and are not available on LoongArch32.

Public API

The stdarch_loongarch_crc feature exposes 8 functions, note that these do not require a target feature to call:

/// Calculate the CRC value using the IEEE 802.3 polynomial (0xEDB88320)
pub fn crc_w_b_w(a: i8, b: i32) -> i32

/// Calculate the CRC value using the IEEE 802.3 polynomial (0xEDB88320)
pub fn crc_w_h_w(a: i16, b: i32) -> i32

/// Calculate the CRC value using the IEEE 802.3 polynomial (0xEDB88320)
pub fn crc_w_w_w(a: i32, b: i32) -> i32

/// Calculate the CRC value using the IEEE 802.3 polynomial (0xEDB88320)
pub fn crc_w_d_w(a: i64, b: i32) -> i32 

/// Calculate the CRC value using the Castagnoli polynomial (0x82F63B78)
pub fn crcc_w_b_w(a: i8, b: i32) -> i32

/// Calculate the CRC value using the Castagnoli polynomial (0x82F63B78)
pub fn crcc_w_h_w(a: i16, b: i32) -> i32

/// Calculate the CRC value using the Castagnoli polynomial (0x82F63B78)
pub fn crcc_w_w_w(a: i32, b: i32) -> i32

/// Calculate the CRC value using the Castagnoli polynomial (0x82F63B78)
pub fn crcc_w_d_w(a: i64, b: i32) -> i32

Steps

Unresolved Questions

  • list all the "unresolved questions" found in the RFC to ensure they are
    not forgotten.

Implementation history

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.proposed-final-comment-periodProposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions