On 7/14/22 20:16, Linus Torvalds wrote:
Oh, btw, how bad would it be to just do
#define FASTOP_SIZE 16 static_assert(FASTOP_SIZE >= FASTOP_LENGTH)
Yeah, for 32 I might have some (probably irrational) qualms, but 16 is not worth the trouble.
Given 3 bytes for ENDBR, 5 for the return thunk and 1 for the straight line speculation INT3, there are 7 bytes left and only 4 are currently used (for instructions encoded as "66 0f xx xx"). So FASTOP_SIZE at SETCC_ALIGN can indeed be 16 unconditionally.
Paolo