[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: [rtl] Optimization question.
Oleg Subbotin wrote:
>
> testb $1,%al <--Instead of logical AND gcc generate testb
> jne .L2 <--But for test==3,5,7... it will not work
>
You wrote the C code that does 'bit-wise AND', not 'logical AND'.
i.e (temp & ONE), not (temp && ONE).
Of course, testb instruction performs 'bit-wise AND'.
Good Day!
Heo, Sung Gwan.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Heo, Sung Gwan mailto:heo@nextin.co.kr
R&D, Turbo-Tek Co., Ltd. http://www.turbotek.co.kr
3F, Dooin Bldg. 16-6 Sunae-Dong, Phone: (0342) 718-5166
SungNam, KyungKi-Do, Korea Fax: (0342) 718-5168
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- [rtl] ---
For more information on Real-Time Linux see:
http://www.rtlinux.org/