__div64_const32(): improve the generic C version
authorNicolas Pitre <nico@fluxnic.net>
Wed, 21 Aug 2019 03:05:42 +0000 (23:05 -0400)
committerArnd Bergmann <arnd@arndb.de>
Sun, 1 Sep 2019 21:53:25 +0000 (23:53 +0200)
commit602828c1aade576ac5f3fbd59b4eb014c5fc2414
tree1f3041f8c1f2ad40d56ee35213f63f927cc6fa74
parent3940ba8eea8c6c89f547a1bd153977cece5fecd2
__div64_const32(): improve the generic C version

Let's rework that code to avoid large immediate values and convert some
64-bit variables to 32-bit ones when possible. This allows gcc to
produce smaller and better code. This even produces optimal code on
RISC-V.

Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
include/asm-generic/div64.h