2 ms·
Gasp! I thought it would be easy to just transfer the compare flag to a general purpose register. I suppose x86 doesn't have such an instruction?
by loup-vaillant 16y ago
Gasp! I thought it would be easy to just transfer the compare flag to a general purpose register. I suppose x86 doesn't have such an instruction?
- Daniel_Newby 16y agoI lied! A quick test shows that GCC uses the x86 SETE instruction (set register on condition equal). Cool. However, code like this: if (x == 14) { y = 10; } else { y = 20; } uses branches, although I think x86-64 has conditional load instructions.