access-softek / llvm-project

Other
0 stars 0 forks source link

[AArch64] Make +pauth enabled in Armv8.3-a by default (#78027) #74

Closed atrosinenko closed 8 months ago

atrosinenko commented 8 months ago

NB: This is just a cherry-pick of the a52eea66795018550e95c4b060165a7250899298 mainline commit. Due to the structure of the involved files, cherry-picking required fixing lots of trivial merge conflicts here and there. If you are rebasing elf-pauth branch on top of the mainline main branch after the original commit, most probably you can just skip this cherry-picked one.

Add AEK_PAUTH to ARMV8_3A in TargetParser and let it propagate to ARMV8R, as it aligns with GCC defaults.

After adding AEK_PAUTH, several tests from TargetParserTest.cpp crashed when trying to format an error message, thus update a format string in AssertSameExtensionFlags to account for bitmask being pre-formatted as std::string.

The CHECK-PAUTH* lines in aarch64-target-features.c are updated to account for the fact that FEAT_PAUTH support and pac-ret can be enabled independently and all four combinations are possible.

atrosinenko commented 8 months ago

@kovdan01

I've not dove deeply into ARM documentation since it was already done by reviewers in original mainline PR and I assume that enough

This is exactly as intended, thank you.