[U-Boot-Users] [PATCH] Fix ARM compilation error

Hi,
the patch below eliminates two calls of the libgcc helper functions _divsi3 and _modsi3 when using a (standard) Hardware-FP toolchain (the unsigned counterparts _udivsi3 and _umodsi3 are already included in libarm.a).
"For historical reasons", the ARM community uses toolchains built for hardware-FP, even though so far no ARM CPU comes with FPU. Go figure.
Cheers Anders
Signed-off-by: Anders Larsen alarsen@rea.de
CHANGELOG: Fixed compilation for ARM when using a (standard) Hard-FP toolchain Patch by Anders Larsen, 07 Oct 2005
---
drivers/cfi_flash.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/cfi_flash.c b/drivers/cfi_flash.c --- a/drivers/cfi_flash.c +++ b/drivers/cfi_flash.c @@ -221,7 +221,7 @@ static void flash_printqry (flash_info_t cfiptr_t cptr; int x, y;
- for (x = 0; x < 0x40; x += 16 / info->portwidth) { + for (x = 0; x < 0x40; x += 16U / info->portwidth) { cptr.cp = flash_make_addr (info, sect, x + FLASH_OFFSET_CFI_RESP); @@ -807,7 +807,7 @@ static void flash_make_cmd (flash_info_t #else for (i = 1; i <= info->portwidth; i++) #endif - *cp++ = (i % info->chipwidth) ? '\0' : cmd; + *cp++ = (i & (info->chipwidth - 1)) ? '\0' : cmd; }
/*

In message fc.004c4e480038bcab004c4e480038bcab.38bcc9@rea.de you wrote:
"For historical reasons", the ARM community uses toolchains built
Ummm... not all of the ARM community. Or why are you excluding all ELDK users? ;-)
Fixed compilation for ARM when using a (standard) Hard-FP toolchain Patch by Anders Larsen, 07 Oct 2005
Added, thanks.
Best regards,
Wolfgang Denk
participants (2)
-
Anders Larsen
-
Wolfgang Denk