PATCH: Support armv6-m in libgloss

Can Finner
Fri Jul 1 21:48:00 GMT 2011

> Hi,
> The attached patch supports armv6-m in libgloss/arm, which is thumb only
> arch and have not been supported in libgloss yet.
> This patch makes following changes:
> -   arm unified assembly language(UAL) is now used globally in libgloss,
> rather than in thumb2 startup codes only;
> -   use flag setting variant of some instructions, this is required by
> rewriting pre-UAL to UAL codes;
>     Though it might change the behavior of some of these instructions, it
> won't change program behavior, since all instructions depend on flags have
> its own direct preceding flag setting instructions.
> -   change in functionality for AngelSWI_Reason_HeapInfo semihosting, we no
> longer set sp/sl if values loaded are ZERO. Please refer to comments at line
> 127 of this patch and section 8.3.9 of ARM document
> "DUI0203J_rvct_developer_guide" for more information;
> -   fix a semihosting bug in crt0.S involving armv6-m/armv7-m, please see
> line 106-117 of this patch, and go to website
> and
> for more discussions;
> I have run arm-none-eabi-gcc/g++/gdb "make check" on
> arm9/arm9_thumb/cortex-m3, the results seems sane. Also I ran some
> benchmarks on cortex-m0/m3 boards successfully.
> Please review this patch and apply it if OK.
> 2011-06-24  Chengbin  <>
> libgloss/
>                * arm/crt0.S: Support armv6-m processors in libgloss.
>                * arm/swi.h: Likewise.
>                * arm/trap.S: Likewise.
>                * arm/redboot-crt0.S: Likewise.
>                * arm/linux-crt0.c: Likewise.
>                * arm/arm.h: New.

Could somebody help review this patch?

BTW, the email address wasn't subscribed in mail list before,
so have to reply with this address to keep the messages in sequence.
Sorry for disturbing.

More information about the Newlib mailing list