public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Laurent Rougé" <laurent.rouge@menta.fr>
To: gcc-patches@gcc.gnu.org, Eric Botcazou <ebotcazou@adacore.com>
Subject: Reintroduce -mflat option on SPARC
Date: Wed, 23 Feb 2011 13:51:00 -0000	[thread overview]
Message-ID: <4D64F83B.5060704@menta.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 2162 bytes --]

Hello,

This patch reintroduce the -mflat option on SPARC. The -mfalt option was 
deprecated in february 2004 with GCC 3.4.6. Now, with the support of 
LEON processor on GCC, this option has found a new interest.

The patch has been tested, validated and made with Eric collaboration.

Please apply this patch on mainline and backport it to 4.6 branch.

The patch change :
* doc/invoke.texi (SPARC options): Add -mflat option.
* config/sparc/sparc.c: Likewise.
(load_pic_register): Remove static and prototype.
(sparc_expand_prologue): Rename into sparc_nonflat_expland_prologue.
(sparc_expand_epilogue): Rename into sparc_nonflat_expand_epilogue.
(sparc_can_use_return_insn_p): Add TARGET_FLAT handling.
(sparc_function_ok_for_sibcall): Likewise.
(sparc_frame_pointer_required): Likewise.
(struct sparc_frame_info, current_frame_info, zero_frame_info): Add.
(RETURN_ADDR_REGNUM, HARD_FRAME_POINTER_MASK,
RETURN_ADDR_MASK): Define.
(sparc_expand_prologue): New.
(sparc_expland_epilogue): Likewise.
(sparc_flat_must_save_register_p): Likewise.
(sparc_flat_compute_frame_size): Likewise.
(sparc_flat_save_or_restore): Likewise.
(sparc_flat_expand_prologue): Likewise.
(sparc_flat_expand_epilogue): Likewise.
(flat_output_return): Likewise.
(sparc_flat_eligible_for_return_delay): Likewise.
* config/sparc/sparc.h:
(CPP_CPU_SPEC): Add mflat option.
(SPARC_INCOMING_INT_ARG_FIRST): Add TARGET_FLAT handling.
(CONDITIONAL_REGISTER_USAGE): Likewise.
(INITIAL_ELIMINATION_OFFSET): Likewise.
(INCOMING_REGNO): Likewise.
(OUTGOING_REGNO): Likewise.
(LOCAL_REGNO): Likewise.
(EPILOGUE_USES): Likewise.
(ELIGIBLE_FOR_EPILOGUE_DELAY): Define.
* config/sparc/sparc.md:
("flat" attribute): Add.
(return_internal): Add TARGET_FLAT and "flat" attribute handling.
(do_builtin_setjmp_setup): Likewise.
(exception_receiver): Add.
(builtin_setjmp_receiver): Likewise.
* config/sparc/sparc.opt: Define mflat option.
* config/sparc/sparc-protos.h: Add sparc_flat_* prototypes.
(load_pic_register prototype): Add.
* config/sparc/t-elf:
(MULTILIB_OPTIONS): Add mflat option.
(MULTILIB_DIRNAMES): Add flat folder.
* gcc.dg/20020503-1.c: Add -mflat dg-options.

Regards,
Laurent Rougé.


[-- Attachment #2: gcc-4.5.1-flat.diff.gz --]
[-- Type: application/gzip, Size: 10365 bytes --]

             reply	other threads:[~2011-02-23 12:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-23 13:51 Laurent Rougé [this message]
2011-02-26  0:18 ` Eric Botcazou
2011-04-12 17:44 ` Eric Botcazou
2011-04-14 18:55   ` Laurent Rougé
2011-05-17 13:06     ` Eric Botcazou
2011-05-18 14:36       ` Eric Botcazou
2011-05-26 20:29         ` Laurent Rougé
2011-05-26 21:54           ` Eric Botcazou
2011-06-10 11:11             ` Eric Botcazou

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=4D64F83B.5060704@menta.fr \
    --to=laurent.rouge@menta.fr \
    --cc=ebotcazou@adacore.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).