remarkable-linux/lib/mpi
Rasmus Villemoes 7fe21291ba MPILIB: Deobfuscate mpi_cmp
The condition preceding 'return 1;' makes my head hurt. At this point,
we know that u and v have the same sign; if they are negative, they
compare opposite to how their absolute values compare (which
mpihelp_cmp found for us), otherwise cmp itself is the
answer. Negating cmp is ok since mpihelp_cmp returns {-1,0,1};
-INT_MIN==INT_MIN won't bite us.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Dmitry Kasatkin <dmitry.kasatkin@gmail.com>
2015-01-14 15:15:57 +00:00
..
generic_mpih-add1.c
generic_mpih-lshift.c
generic_mpih-mul1.c
generic_mpih-mul2.c
generic_mpih-mul3.c
generic_mpih-rshift.c
generic_mpih-sub1.c
longlong.h alpha: Modernize lib/mpi/longlong.h 2013-07-19 13:54:23 -07:00
Makefile MPILIB: Reinstate mpi_cmp[_ui]() and export for RSA signature verification 2012-10-08 13:50:15 +10:30
mpi-bit.c MPILIB: Provide count_leading/trailing_zeros() based on arch functions 2012-10-08 13:50:11 +10:30
mpi-cmp.c MPILIB: Deobfuscate mpi_cmp 2015-01-14 15:15:57 +00:00
mpi-inline.h
mpi-internal.h mpilib: use DIV_ROUND_UP and remove unused macros 2013-02-01 16:28:32 +11:00
mpi-pow.c MPILIB: Provide count_leading/trailing_zeros() based on arch functions 2012-10-08 13:50:11 +10:30
mpicoder.c lib/mpi/mpicoder.c: looping issue, need stop when equal to zero, found by 'EXTRA_FLAGS=-W'. 2013-06-12 16:29:44 -07:00
mpih-cmp.c
mpih-div.c Remove unused code from MPI library 2012-05-26 11:51:03 +10:00
mpih-mul.c Remove unused code from MPI library 2012-05-26 11:51:03 +10:00
mpiutil.c MPILIB: add module description and license 2013-09-25 17:17:01 +01:00