[U-Boot-Users] Re: Compiler question: integer division?
Sergei Sharonov
sergei.sharonov at halliburton.com
Mon Apr 25 17:13:24 CEST 2005
Hi
> I just wondered if the code
>
> return (dtt_read(sensor, DTT_READ_TEMP) / 256);
>
> would be result in a "shift by 8" or and interger division?
I believe that would depend on compiler, compiler optimization options and
processor architecture. AFAIK, gcc will even replace multiplication with
shift/add/subtract sequences on 486 (that does have multiply opcode) because
it will be faster.
Sergei Sharonov
More information about the U-Boot
mailing list