https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116391
Bug ID: 116391 Summary: Emit spellcheck suggestions for __arm_rsr and __arm_wsr intrinsics Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: diagnostic Severity: enhancement Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: ktkachov at gcc dot gnu.org Target Milestone: --- Target: aarch64 GCC 14 added intrinsics to read and write to sysregs, allowing the user to avoid inline assembly. It also has validation code to ensure the user passes a legit register. One way this can be made even more user-friendly is to use the spell-check infrastructure to add hints when the user passes an invalid sysreg name. We already do this for -mcpu/march options and we could do the same here. We could get aarch64.cc::aarch64_init_sysregs to initialise a vector of candidates as well, maybe multiple such vectors split by whether a reg is read/write. Then we could utilise the candidates_list_and_hint API to get a recommendation for a misspelled register.