diff options
Diffstat (limited to 'lib/arm/switch16.S')
-rw-r--r-- | lib/arm/switch16.S | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/arm/switch16.S b/lib/arm/switch16.S index e8f08c49c5df..9c3f0cf9915f 100644 --- a/lib/arm/switch16.S +++ b/lib/arm/switch16.S @@ -34,8 +34,9 @@ DEFINE_COMPILERRT_PRIVATE_FUNCTION(__switch16) ldrh ip, [lr, #-1] // get first 16-bit word in table cmp r0, ip // compare with index add r0, lr, r0, lsl #1 // compute address of element in table - ldrshcc r0, [r0, #1] // load 16-bit element if r0 is in range add ip, lr, ip, lsl #1 // compute address of last element in table + ite lo + ldrshlo r0, [r0, #1] // load 16-bit element if r0 is in range ldrshhs r0, [ip, #1] // load 16-bit element if r0 out of range add ip, lr, r0, lsl #1 // compute label = lr + element*2 bx ip // jump to computed label |