Skip to content

CMSE features should check ABI conformance in rustc, not LLVM #81347

Closed
@jonas-schievink

Description

@jonas-schievink

Using #[cmse_nonsecure_entry] on a function limits its capabilities. Namely, only up to 4 32-bit arguments can be accepted, and none of them may be passed on the stack. The same is true for the "C-cmse-nonsecure-call" ABI.

Currently, this is checked in LLVM, so the user experience is sub-par, and the check happens very late (during codegen instead of type checking). It should be checked in rustc instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationC-bugCategory: This is a bug.F-abi_c_cmse_nonsecure_call`#![feature(abi_c_cmse_nonsecure_call)]`F-cmse_nonsecure_entry`#![feature(cmse_nonsecure_entry)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions