public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Łukasz Kostka" <lukasz.kostka@netng.pl>
To: gcc@gcc.gnu.org
Subject: AVR __progmem__ variable reading
Date: Fri, 22 Feb 2019 22:34:00 -0000	[thread overview]
Message-ID: <AA53195D-2F98-4CEA-A012-54ADD8C7CCB1@netng.pl> (raw)

Hi

I am using for a while now gcc and especially __progmem__ attribute. I’d like to report a feature request for gcc to handle reading from flash memory variables. Compiler has all the knowledge (target device, availability of LPM, ELPM instructions etc.) in order to properly interpret variable is accessed (eg. by array subscription).

This would remove need for any assembly code written to do this.
Make user code much cleaner.
GCC having all this knowledge can optimize end assembly code.
Simple attribute addition will switch from array in memory to array in flash.
Can serve as future implementations for other platforms.

What do you think ?


             reply	other threads:[~2019-02-22 22:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22 22:34 Łukasz Kostka [this message]
2019-02-23 15:34 ` David Brown
2019-02-23 18:38   ` Łukasz Kostka
2019-02-24 11:13     ` David Brown
2019-02-24 13:47       ` Łukasz Kostka
2019-02-24 13:58         ` David Brown
2019-02-24 17:29           ` Łukasz Kostka
2019-02-25  7:43             ` David Brown
2019-02-25 17:09               ` Łukasz Kostka
2019-02-25 17:19                 ` David Brown
2019-02-25 19:32                   ` Łukasz Kostka
2019-02-26  6:05                   ` SenthilKumar.Selvaraj

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=AA53195D-2F98-4CEA-A012-54ADD8C7CCB1@netng.pl \
    --to=lukasz.kostka@netng.pl \
    --cc=gcc@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).