I have a preliminary implementation of this for egcs 1.03a. I tested
the overhead on gzip - it looks pretty good. I use the following
pattern which ensures that the branch is predicted non-taken:
pushl $0
...
popl %edx
testl %edx,%edx
jne .L2
ret
.L2:
call abort
-rwxr-xr-x 3 root root 74352 Aug 11 18:18 gzip
-rwxr-xr-x 1 root root 75660 Aug 11 18:15 gzip-stack
# strip'em
-rwxr-xr-x 3 root root 48200 Aug 11 18:37 gzip
-rwxr-xr-x 1 root root 49528 Aug 11 18:37 gzip-stack
# time ./gzip-stack -9 pre-patch-2.1.109-2
real 0m1.926s
user 0m1.890s
sys 0m0.040s
# time ./gzip -9 pre-patch-2.1.109-2
real 0m1.920s
user 0m1.880s
sys 0m0.040s
Size overhead after strip is around 2-3%
Run-time overhead is around 1%
astor
-- Alexander Kjeldaas, Guardian Networks AS, Trondheim, Norway http://www.guardian.no/- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html