This is an archive of the discontinued LLVM Phabricator instance.

AArch64: add CodeGen support for FEAT_XS DSB instructions
Needs ReviewPublic

Authored by t.p.northover on Dec 2 2022, 2:14 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

The new variants like dsb ishnxs map naturally to CRm == {16, 20, 24, 28}, extending the existing space of immediates for __builtin_arm_dsb. This adds Clang and backend CodeGen support to emit them when processor support is present, and reasonable diagnostics when it's not.

Diff Detail

Event Timeline

t.p.northover created this revision.Dec 2 2022, 2:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 2 2022, 2:14 AM
t.p.northover requested review of this revision.Dec 2 2022, 2:14 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptDec 2 2022, 2:14 AM

Thanks for the warning. Now that's settled down a bit I've updated the patch to the new regime.

lenary added a subscriber: lenary.Jan 30 2023, 7:26 AM

I'm not sure I agree with "map naturally", when CRm is a 4-bit field, and both bit 7 and bit 5 are different in the dsb <option> vs dsb <option>nXS instructions.

Are you willing to put this through review for the ACLE? __builtin_arm_dsb is the implementation of __dsb, so I worry that this would make this intrinsic non-portable for clang vs gcc.