public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Denis Chertykov <chertykov@gmail.com>
To: Georg-Johann Lay <avr@gjlay.de>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
	Eric Weddington <eric.weddington@atmel.com>
Subject: Re: [Patch,avr] PR55897: Allocate __memx to .progmemx.data
Date: Mon, 07 Jan 2013 18:19:00 -0000	[thread overview]
Message-ID: <CADOs=zb2PBduG-RzXpGUZzpKGjwfg6DRBiuu=zDaEogd0FsouQ@mail.gmail.com> (raw)
In-Reply-To: <50EADF22.3040006@gjlay.de>

2013/1/7 Georg-Johann Lay <avr@gjlay.de>
>
> Currently, data in address space __memx is allocated to .progmem.data, i.e. the
> same section as for __flash resp. progmem.  However, there os no need that
> __memx goes onto the same section and wastes precious memory in the first 64 Ki.
>
> The patch puts __memx data into .progmemx.data so that a linker script can
> allocate it after .text and it can be distinguished from data in __flash or
> progmem.
>
> The current default linker script contains .progmem* so that the patch does not
> change anything here.  A new default script is still to come (binutils PR14406).
>
> Moreover, there is some code clean-up like avoid magic "6" and use
> ADDR_SPACE_COUNT instead.
>
> Ok to apply?
>
> Johann
>
>
>         PR target/55897
>         * config/avr/avr.h (ADDR_SPACE_COUNT): New enum.
>         (avr_addrspace_t): Add .section_name field.
>         * config/avr/avr.c (progmem_section): Use ADDR_SPACE_COUNT as
>         array size.
>         (avr_addrspace): Same.  Initialize .section_name.  Remove last
>         NULL entry.  Put __memx into .progmemx.data.
>         (progmem_section_prefix): Remove.
>         (avr_asm_init_sections): No need to initialize progmem_section.
>         (avr_asm_named_section): Use avr_addrspace[].section_name to get
>         section name prefix.
>         (avr_asm_select_section): Ditto.  And use get_unnamed_section to
>         retrieve the progmem section.
>         * avr-c.c (avr_cpu_cpp_builtins): Use ADDR_SPACE_COUNT as loop
>         boundary to run over avr_addrspace[].
>         (avr_register_target_pragmas): Ditto.

Approved.

Denis.

      reply	other threads:[~2013-01-07 18:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-07 14:44 Georg-Johann Lay
2013-01-07 18:19 ` Denis Chertykov [this message]

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='CADOs=zb2PBduG-RzXpGUZzpKGjwfg6DRBiuu=zDaEogd0FsouQ@mail.gmail.com' \
    --to=chertykov@gmail.com \
    --cc=avr@gjlay.de \
    --cc=eric.weddington@atmel.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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).