diff options
author | Marek Vasut <marex@denx.de> | 2016-05-26 18:01:41 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-06-02 21:21:45 -0400 |
commit | e64d75948446b14ff817c10ae5a65c84b1d24ba7 (patch) | |
tree | 8f19112887a9424422a7d0ffca1fc9ecac445e94 /arch/arm/lib | |
parent | c5a543ea2d4bcedd87754b78babb68929cf8ab33 (diff) | |
download | u-boot-imx-e64d75948446b14ff817c10ae5a65c84b1d24ba7.zip u-boot-imx-e64d75948446b14ff817c10ae5a65c84b1d24ba7.tar.gz u-boot-imx-e64d75948446b14ff817c10ae5a65c84b1d24ba7.tar.bz2 |
arm: lib: Fix uldivmod.S build on Thumb2
This assembler source won't build in Thumb2 mode, so fix it adding
the necessary Thumb2 conditional macros from unified.h .
This patch also defines CONFIG_THUMB2_KERNEL and CONFIG_ARM_ASM_UNIFIED
which is necessary for correct build of these files both in ARM and
Thumb mode, just like Linux does.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/arm/lib')
-rw-r--r-- | arch/arm/lib/uldivmod.S | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/arm/lib/uldivmod.S b/arch/arm/lib/uldivmod.S index 426c2f2..2efcd73 100644 --- a/arch/arm/lib/uldivmod.S +++ b/arch/arm/lib/uldivmod.S @@ -9,10 +9,6 @@ #include <linux/linkage.h> #include <asm/assembler.h> -/* We don't use Thumb instructions for now */ -#define ARM(x...) x -#define THUMB(x...) - /* * A, Q = r0 + (r1 << 32) * B, R = r2 + (r3 << 32) @@ -226,7 +222,9 @@ THUMB( orrpl A_0, A_0, TMP ) @ Shift A to the right by the appropriate amount. rsb D_1, D_0, #32 mov Q_0, A_0, lsr D_0 - orr Q_0, A_1, lsl D_1 + ARM( orr Q_0, Q_0, A_1, lsl D_1 ) + THUMB( lsl A_1, D_1 ) + THUMB( orr Q_0, A_1 ) mov Q_1, A_1, lsr D_0 @ Move C to R mov R_0, C_0 |