aboutsummaryrefslogtreecommitdiff
path: root/lib/arm/switch8.S
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arm/switch8.S')
-rw-r--r--lib/arm/switch8.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/arm/switch8.S b/lib/arm/switch8.S
index e784b4082e1f..15729ebc3165 100644
--- a/lib/arm/switch8.S
+++ b/lib/arm/switch8.S
@@ -33,7 +33,8 @@
DEFINE_COMPILERRT_PRIVATE_FUNCTION(__switch8)
ldrb ip, [lr, #-1] // get first byte in table
cmp r0, ip // signed compare with index
- ldrsbcc r0, [lr, r0] // get indexed byte out of table
+ ite lo
+ ldrsblo r0, [lr, r0] // get indexed byte out of table
ldrsbhs 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