This is an archive of the discontinued LLVM Phabricator instance.

[ARM][CMSE] Add CMSE header and builtins
ClosedPublic

Authored by chill on Nov 28 2019, 6:09 AM.

Details

Summary

This is patch C2 as mentioned in RFC
http://lists.llvm.org/pipermail/cfe-dev/2019-March/061834.html

This adds CMSE builtin functions, and introduces arm_cmse.h header which has
useful macros, functions, and data types for end-users of CMSE.

Patch by Javed Absar.

Previous version was at https://reviews.llvm.org/D62394

Diff Detail

Event Timeline

chill created this revision.Nov 28 2019, 6:09 AM
dmgreen added inline comments.Dec 2 2019, 11:42 AM
clang/lib/Headers/arm_cmse.h
9

Newline before the ifndef

16

This is an internal macro? If so maybe name it __ARM_CMSE_SECURE_MODE

24

sizeof(*(p)). Maybe for the other parameters as well.

29

Nit: newline after the endif of cplusplus.

114

cmse_TT((void *)(p)) for the macros. Elsewhere in the file too.

128

Will this reliably be defined behaviour?

203

Newline here.

chill updated this revision to Diff 232522.Dec 6 2019, 3:17 AM
chill marked 7 inline comments as done.Dec 6 2019, 3:21 AM
dmgreen added inline comments.Dec 8 2019, 4:42 AM
clang/lib/Headers/arm_cmse.h
127

One last thing. Because this is a header file, do we need to worry about people using #define begin 10 before the file? The arm_neon.h seems to include a lot of names like __rev0. Do we want to do the same thing here?

chill marked an inline comment as done.Dec 9 2019, 3:19 AM
chill added inline comments.
clang/lib/Headers/arm_cmse.h
37

Comments /* bits AB-CD */ are bogus; note to myself to delete them.

chill updated this revision to Diff 232860.Dec 9 2019, 7:42 AM
chill marked an inline comment as done.
dmgreen accepted this revision.Dec 9 2019, 8:03 AM

Thanks. LGTM

This revision is now accepted and ready to land.Dec 9 2019, 8:03 AM
chill closed this revision.Dec 12 2019, 7:31 AM

Closing manually, since I misspelled "Diferential" in the commit message.