summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/arm/switchu8.S
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/arm/switchu8.S')
-rw-r--r--compiler-rt/lib/arm/switchu8.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler-rt/lib/arm/switchu8.S b/compiler-rt/lib/arm/switchu8.S
index 19bed2f664d..0a4efac88ab 100644
--- a/compiler-rt/lib/arm/switchu8.S
+++ b/compiler-rt/lib/arm/switchu8.S
@@ -33,7 +33,8 @@
DEFINE_COMPILERRT_PRIVATE_FUNCTION(__switchu8)
ldrb ip, [lr, #-1] // get first byte in table
cmp r0, ip // compare with index
- ldrbcc r0, [lr, r0] // get indexed byte out of table
+ ite lo
+ ldrblo r0, [lr, r0] // get indexed byte out of table
ldrbhs r0, [lr, ip] // if out of range, use last entry in table
add ip, lr, r0, lsl #1 // compute label = lr + element*2
bx ip // jump to computed label
OpenPOWER on IntegriCloud