Screwy arch/x86/include/asm/string_32.h

From: David Newall
Date: Sat Mar 14 2009 - 12:07:16 EST


There's a lot of weirdness in __constant_memcpy in
arch/x86/include/asm/string_32.h (2.6.29-rc7).

1. The first switch is missing a case for n equal 7.
2. When n < 20, the four tests (n > 16, n > 12, n > 8 & n > 4)
execute identical statements; always 'asm volatile("movsl" :
"=&D"(edi), "=&S"(esi) : "0"(edi), "1"(esi) : "memory")'.


I think it copies less than 4 bytes for values of n between 9 and 19.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/