Re: [BK+PATCH] remove __constant_memcpy

Linus Torvalds (torvalds@transmeta.com)
Thu, 17 Apr 2003 12:54:30 -0700 (PDT)


On Thu, 17 Apr 2003, Jeff Garzik wrote:
>
> __constant_memcpy was used for small, constant-sized cases AFTER
> the kernel made the decision not to hand the copy duties over to the
> kernel's MMX/SSE code. Take a look at the bottom of the patch below,
> and also this snip from a non-hacked string.h, for illustration...

This is the part I don't like

#define memcpy(t, f, n) \
(__builtin_constant_p(n) ? \
- __constant_memcpy((t),(f),(n)) : \
+ __builtin_memcpy((t),(f),(n)) : \
__memcpy((t),(f),(n)))

Notice? Our old __constant_memcpy() would do the rigth thing for large
copies. In conrast, I don't know that gcc will do so.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/