public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Reintroduce -mflat option on SPARC
@ 2011-02-23 13:51 Laurent Rougé
  2011-02-26  0:18 ` Eric Botcazou
  2011-04-12 17:44 ` Eric Botcazou
  0 siblings, 2 replies; 9+ messages in thread
From: Laurent Rougé @ 2011-02-23 13:51 UTC (permalink / raw)
  To: gcc-patches, Eric Botcazou

[-- 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 --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-06-10 10:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-23 13:51 Reintroduce -mflat option on SPARC Laurent Rougé
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

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).