V4L2: __ucmpdi2 undefined on ppc
Segher Boessenkool
segher at kernel.crashing.org
Wed Mar 5 07:32:50 EST 2008
>> Every occurrence of r7 here is wrong (and some of the r6).
>
> Can you elucidate?
Sure! It should read either "7" or "cr7".
>> Is there any reason to do this in assembler code at all?
>
> Is there any particular reason not to?
1) If written in assembler, it needs to be written for every
architecture
separately, and sometimes even for every architecture variant (32 vs. 64
bit is only the tip of the iceberg).
2) As shown here as well as in the recent strncmp() patch, it is a lot
harder
to write correct assembler code than it is to write correct C code(*),
and
the C code isn't less efficient either.
Segher
(*) Well, the generic C strncmp() code in the kernel is broken too, bad
example perhaps :-)
More information about the Linuxppc-dev
mailing list