Linus Torvalds writes: (Summary) yeah, that's exactly where we want to make sure that the compiler
uses a select or 'setb'.
uses a select or 'setb'.
That's what gcc does for me in testing:
That's what gcc does for me in testing:
xorl %eax, %eax
setbe %al
negq %rax
negq %rax
but yes, we'd need to guarantee it somehow.
but yes, we'd need to guarantee it somehow.
Presumably that is where we end up having some arch-specific stuff.
uses a select or 'setb'.
That's what gcc does for me in testing:
That's what gcc does for me in testing:
xorl %eax, %eax
setbe %al
negq %rax
negq %rax
but yes, we'd need to guarantee it somehow.
but yes, we'd need to guarantee it somehow.
Presumably that is where we end up having some arch-specific stuff.