tools/nolibc: enable support for thumb1 mode for ARM
authorWilly Tarreau <w@1wt.eu>
Tue, 10 Jan 2023 07:24:14 +0000 (08:24 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Tue, 10 Jan 2023 21:33:55 +0000 (13:33 -0800)
commit20470dfd656ef71145d78102b540f73a11748182
treea989481adab6d03bfb8f535324660a08afb79283
parent7f8548589661d5edbde4c343e4971117585da2f5
tools/nolibc: enable support for thumb1 mode for ARM

Passing -mthumb to the kernel.org arm toolchain failed to build because it
defaults to armv5 hence thumb1, which has a fairly limited instruction set
compared to thumb2 enabled with armv7 that is much more complete. It's not
very difficult to adjust the instructions to also build on thumb1, it only
adds a total of 3 instructions, so it's worth doing it at least to ease use
by casual testers. It was verified that the adjusted code now builds and
works fine for armv5, thumb1, armv7 and thumb2, as long as frame pointers
are not used.

Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/include/nolibc/arch-arm.h