lkml.org 
[lkml]   [2003]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [BK+PATCH] remove __constant_memcpy

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/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.068 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site