[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [f-cpu] GCC and jmpz vs. jmpl



> Just one question : is GCC bound to this "1/0" scheme ?
> F-CPU is based on "0 / not 0", so in some cases we can drop the andi :-)
> Or, if the result is not used in a computation or mask, the LSB
> condition can
> be used.

gcc can work with compares producing 0/1, 0/-1, 0/(1<<(width-1))
or 0/garbage where some bits in garbage are 1 (currently only MSB
and/or LSB). For most effecient operation the suggest 0/-1 which
is easy to understand why ...
F-CPU doesn't seem to be strictly 0 / not 0. All cmpxxx produces
0/-1 which is nice. Only == and != dont ...
As MR said, I'd prefer jmpl where possible - it must be faster than
jmpnz.

devik

*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/