Skip to content

Invalid ABI errors for extern blocks #4791

Description

@CohenArthur

gccrs is currently erroring out on two extern blocks in core_arch which are needed for core 1.49:

 extern "platform-intrinsic" {
	    //pub fn simd_select_bitmask
    pub fn simd_eq<T, U>(x: T, y: T) -> U;
    pub fn simd_ne<T, U>(x: T, y: T) -> U;
    pub fn simd_lt<T, U>(x: T, y: T) -> U;
    pub fn simd_le<T, U>(x: T, y: T) -> U;
    pub fn simd_gt<T, U>(x: T, y: T) -> U;
    pub fn simd_ge<T, U>(x: T, y: T) -> U;
}
	
#[allow(improper_ctypes)]
extern "unadjusted" {
    #[link_name = "llvm.x86.rdrand.16"]
    fn x86_rdrand16_step() -> (u16, i32);
    #[link_name = "llvm.x86.rdrand.32"]
    fn x86_rdrand32_step() -> (u32, i32);
    #[link_name = "llvm.x86.rdseed.16"]
    fn x86_rdseed16_step() -> (u16, i32);
    #[link_name = "llvm.x86.rdseed.32"]
    fn x86_rdseed32_step() -> (u32, i32);
}

the expected behavior is no error. we need to eventually handle these ABIs properly, but for now we should at least recognize them so we can get through lowering

Metadata

Metadata

Assignees

Labels

coreIssue related to the compilation of the `core` crateloweringLowering from AST to HIR

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions