]> The Tcpdump Group git mirrors - libpcap/commit
optimize: fix some of those changes.
authorGuy Harris <[email protected]>
Fri, 22 May 2020 06:36:09 +0000 (23:36 -0700)
committerGuy Harris <[email protected]>
Fri, 22 May 2020 06:36:09 +0000 (23:36 -0700)
commit2aa7d268e2ce37025d68a3f428001f6f779f56e8
treeb154cee00e2cbd4e7e392209bba9ff8aa1ec609a
parentd71913d38475f5b4f0dc753074337ba29d5c0789
optimize: fix some of those changes.

For loops with predecrements that we eliminated because we don't want to
rely on the loop index going negative if it's zero before the
predecrement - the index is now unsigned, so it'll *never go negative -
we revert to a similar loop, but with the test checking whether the
index is 0 and decrementing it as the first action in the loop body.

(Yeah, it means that, on machines with condition codes, you don't get to
use the condition code setting of the decrement "for free"; we'll let
the compiler and the processor figure out how to do that efficiently.)
optimize.c