aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/lib/lib1funcs.S
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-04-07 10:44:19 -0400
committerTom Rini <trini@konsulko.com>2023-04-07 10:44:19 -0400
commit340bebf9c799793affefd166875d5776744988bd (patch)
tree193a646521cf659f333c5e1c11745116259b0477 /arch/arm/lib/lib1funcs.S
parentb0b77fdf3d7d2c1a5e48c3971a677f14e372c164 (diff)
parenta554ee7edee8e10b38c6899ad8556daf58ca3afe (diff)
Merge branch '2023-04-06-assorted-updates'
- Make use of the semi-formal "fallthrough" mechanism, update env tools to use /run for lockfile, add 2048 game (as a way to test console changes), update some CONFIG option logic in Kconfig, have lmb command show regions in use, remove some duplicate serial code, add __gnu_thumb1_case_si code and fix m68k custodian email address.
Diffstat (limited to 'arch/arm/lib/lib1funcs.S')
-rw-r--r--arch/arm/lib/lib1funcs.S17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/lib/lib1funcs.S b/arch/arm/lib/lib1funcs.S
index de15d09e36..a1f44d9454 100644
--- a/arch/arm/lib/lib1funcs.S
+++ b/arch/arm/lib/lib1funcs.S
@@ -419,4 +419,21 @@ ENTRY(__gnu_thumb1_case_uhi)
ret lr
ENDPROC(__gnu_thumb1_case_uhi)
.popsection
+
+/* Taken and adapted from: https://github.com/gcc-mirror/gcc/blob/4f181f9c7ee3efc509d185fdfda33be9018f1611/libgcc/config/arm/lib1funcs.S#L2156 */
+.pushsection .text.__gnu_thumb1_case_si, "ax"
+ENTRY(__gnu_thumb1_case_si)
+ push {r0, r1}
+ mov r1, lr
+ adds r1, r1, #2 /* Align to word. */
+ lsrs r1, r1, #2
+ lsls r0, r0, #2
+ lsls r1, r1, #2
+ ldr r0, [r1, r0]
+ adds r0, r0, r1
+ mov lr, r0
+ pop {r0, r1}
+ mov pc, lr /* We know we were called from thumb code. */
+ENDPROC(__gnu_thumb1_case_si)
+.popsection
#endif