4 ms·
Cool, but it doesn't generate SBB in real code, but instead gives me something like this: xorl %r11d, %r11d cmpl %r12d, %eax seta %r11b And if I d
by jpegqs 5y ago
Cool, but it doesn't generate SBB in real code, but instead gives me something like this:
xorl %r11d, %r11d
cmpl %r12d, %eax
seta %r11b
And if I do both of these, side by side:
tmp = rc.code < rc_bound ? ~0 : 0;
if (rc.code < rc_bound) rc.range = rc_bound;
Then GCC generates an if-else branch.
Thus, inline assembly is the only option so far to prevent the compiler from doing something dumb.