3 ms·
FWIW I'd never do a CPU dependent asm code in the lex.
by acqq 13y ago
FWIW I'd never do a CPU dependent asm code in the lex.
- nkurz 13y agoI played with how to phrase that. You don't need to actually use a CMOV, just write code that allows your compiler to use one if supported. int tmp = real; if (foo == bar) { tmp = newval; } real = tmp; I've seen it referred to as a 'hammock'[1], and at least for GCC and ICC it usually is a strong enough hint. [1] http://people.engr.ncsu.edu/ericro/publications/conference_MICRO-45.pdf http://people.engr.ncsu.edu/ericro/publications/conference_M...