Given a patch like D129506, using instructions not valid for the current feature set becomes an error. This updates the Arm tests for pac/bti to use a thumbv8.1-m.main to make the instructions they produce valid. It requires altering some of the tests for the updated codegen.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Is something breaking somewhere?
The compiler ought to generate valid PACBTI-M code for the v7-m architecture too, choosing only instructions from the NOP-space.
Oh I had that backwards then. The issue is that the instructions that it uses are all marked as requiring Armv8.1-m, so cannot be used validly in a Armv7-m build.
Should the instructions be available when assembling for thumbv7m? If so I can just change the predicates on the PACBTIHintSpaceInst instructions. If not they may need to use HINT's or use some pseudos.
Ideally, we would like mnemonics (for NOP-space instructions only) to be available in v-7m and up, even though they were introduced in v8.1-m.
Thanks - then this patch now sets the predicate on the Hint Space PACBTI instructions to thumbv7m. The test has been adjusted too, to show the instructions assembling/disassembling.