]> git.baikalelectronics.ru Git - kernel.git/commit
lib/vsprintf.c: improve put_dec_trunc8 slightly
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Thu, 16 Apr 2015 19:43:42 +0000 (12:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 17 Apr 2015 13:03:55 +0000 (09:03 -0400)
commit62ffc064db7db2c0e43185fc0ab57907b8ab80c0
treeecf7d3a546cdc560b5946b73b6163a5a20b500fc
parente00b2d113dd3e3cef1719fd8ba17f5621c0a9276
lib/vsprintf.c: improve put_dec_trunc8 slightly

I hadn't had enough coffee when I wrote this. Currently, the final
increment of buf depends on the value loaded from the table, and
causes gcc to emit a cmov immediately before the return. It is smarter
to let it depend on r, since the increment can then be computed in
parallel with the final load/store pair. It also shaves 16 bytes of
.text.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Tejun Heo <tj@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/vsprintf.c