Sync with the last minute SLS fix to extend it for IBT.
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
FOP_END
/* Special case for SETcc - 1 instruction per cc */
+
+ /*
+ * Depending on .config the SETcc functions look like:
+ *
+ * SETcc %al [3 bytes]
+ * RET [1 byte]
+ * INT3 [1 byte; CONFIG_SLS]
+ *
+ * Which gives possible sizes 4 or 5. When rounded up to the
+ * next power-of-two alignment they become 4 or 8.
+ */
+ #define SETCC_LENGTH (4 + IS_ENABLED(CONFIG_SLS))
+ #define SETCC_ALIGN (4 << IS_ENABLED(CONFIG_SLS))
+ static_assert(SETCC_LENGTH <= SETCC_ALIGN);
+
#define FOP_SETCC(op) \
- ".align 4 \n\t" \
+ ".align " __stringify(SETCC_ALIGN) " \n\t" \
".type " #op ", @function \n\t" \
#op ": \n\t" \
+ ASM_ENDBR \
#op " %al \n\t" \
__FOP_RET(#op)