diff options
author | Douglas Raillard <douglas.raillard@arm.com> | 2017-03-07 16:36:14 +0000 |
---|---|---|
committer | Douglas Raillard <douglas.raillard@arm.com> | 2017-03-20 10:38:43 +0000 |
commit | 355a5d03360802e2c7b8f09ffca641df0c9e47bf (patch) | |
tree | 80a2804c6ff789e369be9d62637a8b0636044010 /lib/aarch32/misc_helpers.S | |
parent | fa971fca2f16b3085499bc79066a8ba792841f13 (diff) | |
download | platform_external_arm-trusted-firmware-355a5d03360802e2c7b8f09ffca641df0c9e47bf.tar.gz platform_external_arm-trusted-firmware-355a5d03360802e2c7b8f09ffca641df0c9e47bf.tar.bz2 platform_external_arm-trusted-firmware-355a5d03360802e2c7b8f09ffca641df0c9e47bf.zip |
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>
Diffstat (limited to 'lib/aarch32/misc_helpers.S')
-rw-r--r-- | lib/aarch32/misc_helpers.S | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/aarch32/misc_helpers.S b/lib/aarch32/misc_helpers.S index dc8479951..5b17c21cf 100644 --- a/lib/aarch32/misc_helpers.S +++ b/lib/aarch32/misc_helpers.S @@ -170,7 +170,7 @@ func memcpy4 /* copy 4 bytes at a time */ m_loop4: cmp r2, #4 - blt m_loop1 + blo m_loop1 ldr r3, [r1], #4 str r3, [r0], #4 sub r2, r2, #4 |