public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Jozef Lawrynowicz <jozef.l@mittosystems.com>, gcc-patches@gcc.gnu.org
Cc: "nickc@redhat.com" <nickc@redhat.com>
Subject: Re: [PATCH][MSP430][1/4] Put libgcc shift functions in their own sections
Date: Wed, 05 Jun 2019 22:20:00 -0000	[thread overview]
Message-ID: <eba06f91-d3d5-29b2-a29f-2714ff6de205@redhat.com> (raw)
In-Reply-To: <20190604140707.7b1f0df3@jozef-kubuntu>

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 <jozef.l@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  <jozef.l@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

  reply	other threads:[~2019-06-05 22:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04 13:03 [PATCH][MSP430][0/4] Reduce code size when performing bit shifts Jozef Lawrynowicz
2019-06-04 13:07 ` [PATCH][MSP430][1/4] Put libgcc shift functions in their own sections Jozef Lawrynowicz
2019-06-05 22:20   ` Jeff Law [this message]
2019-06-04 13:11 ` [PATCH][MSP430][2/4] Emulate 16-bit shifts with rotate insn when src operand is originally in memory Jozef Lawrynowicz
2019-06-05 22:21   ` Jeff Law
2019-06-04 13:14 ` [PATCH][MSP430][3/4] Disable performance optimal library code shifts when optimizing for size Jozef Lawrynowicz
2019-06-05 22:22   ` Jeff Law
2019-06-04 13:17 ` [PATCH][MSP430][4/4] Implement 64-bit shifts in assembly code Jozef Lawrynowicz
2019-06-05 22:35   ` Jeff Law
2019-06-06 12:42     ` Jozef Lawrynowicz
2019-06-06 17:33       ` Jeff Law
2019-06-16 21:42         ` Jozef Lawrynowicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eba06f91-d3d5-29b2-a29f-2714ff6de205@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jozef.l@mittosystems.com \
    --cc=nickc@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).