Replace ASM signed tests with unsigned
ge, lt, gt and le condition codes in assembly provide a signed test
whereas hs, lo, hi and ls provide the unsigned counterpart. Signed tests
should only be used when strictly necessary, as using them on logically
unsigned values can lead to inverting the test for high enough values.
All offsets, addresses and usually counters are actually unsigned
values, and should be tested as such.

Replace the occurrences of signed condition codes where it was
unnecessary by an unsigned test as the unsigned tests allow the full
range of unsigned values to be used without inverting the result with
some large operands.

Change-Id: I58b7e98d03e3a4476dfb45230311f296d224980a
Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
1 parent fa971fc commit 355a5d03360802e2c7b8f09ffca641df0c9e47bf
@Douglas Raillard Douglas Raillard authored on 7 Mar 2017
Showing 4 changed files
View
lib/aarch32/cache_helpers.S
View
lib/aarch32/misc_helpers.S
View
lib/aarch64/cache_helpers.S
View
lib/cpus/aarch32/cpu_helpers.S