On 6/4/19 7:07 AM, Jozef Lawrynowicz wrote:
> This patch reduces code size by putting each of the shift library functions
> from
> libgcc in their own section. This means that, for example, a 16-bit logical
> left shift does not result in code to perform a 32-bit logical left shift
> being
> included in the final executable, as the linker can now garbage collect unused
> sections.
>
> For the following program, the below code size reduction is observed:
> int a, b;
>
> int
> main (void)
> {
> a = a << b;
> return 0;
> }
>
> Current trunk:
> text data bss dec hex filename
> 572 12 22 606 25e a.out
> With patch:
> text data bss dec hex filename
> 466 12 22 500 1f4 a.out
>
> Ok for trunk?
>
>
> 0001-MSP430-Put-the-library-functions-for-bitwise-shifts-.patch
>
> From 8017a4b453ae1b07bbeb75f7f7613a5bc5605159 Mon Sep 17 00:00:00 2001
> From: Jozef Lawrynowicz <joze...@mittosystems.com>
> Date: Mon, 13 May 2019 17:42:08 +0100
> Subject: [PATCH 1/4] MSP430: Put the library functions for bitwise shifts in
> their own sections
>
> libgcc/ChangeLog
>
> 2019-06-04 Jozef Lawrynowicz <joze...@mittosystems.com>
>
> * config/msp430/slli.S (__mspabi_slli_n): Put function in its own
> section.
> (__mspabi_slli): Likewise.
> (__mspabi_slll_n): Likewise.
> (__mspabi_slll): Likewise.
> * config/msp430/srai.S (__mspabi_srai_n): Likewise.
> (__mspabi_srai): Likewise.
> (__mspabi_sral_n): Likewise.
> (__mspabi_sral): Likewise.
> * config/msp430/srli.S (__mspabi_srli_n): Likewise.
> (__mspabi_srli): Likewise.
> (__mspabi_srll_n): Likewise.
> (__mspabi_srll): Likewise.
OK.
jeff