[PATCH] D43814: [x86][CET] Introduce _get_ssp, _inc_ssp intrinsics
Craig Topper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 27 15:31:56 PST 2018
craig.topper added inline comments.
================
Comment at: lib/Headers/cetintrin.h:44
+
+static __inline__ void __DEFAULT_FN_ATTRS _inc_ssp(unsigned int __a) {
+ __builtin_ia32_incsspq(__a);
----------------
Start a new #ifdef __x86_64__ here that is just for your new intrinsics. That way it doesn't look weird that the #else contains fewer functions than the #if.
================
Comment at: lib/Headers/cetintrin.h:45
+static __inline__ void __DEFAULT_FN_ATTRS _inc_ssp(unsigned int __a) {
+ __builtin_ia32_incsspq(__a);
+}
----------------
Where is the zeroing behavior for older CPUs coming from? This implementation looks identical to _incsspq?
================
Comment at: lib/Headers/cetintrin.h:65
+
+static __inline__ unsigned long long __DEFAULT_FN_ATTRS _get_ssp(void) {
+ return __builtin_ia32_rdsspq(0);
----------------
same comments as above.
Repository:
rC Clang
https://reviews.llvm.org/D43814
More information about the cfe-commits
mailing list