public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-7591] cris: define DWARF_FRAME_REGISTERS
@ 2021-03-10  3:02 Hans-Peter Nilsson
  0 siblings, 0 replies; only message in thread
From: Hans-Peter Nilsson @ 2021-03-10  3:02 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:5987d8a79cda1069c774e5c302d5597310270026

commit r11-7591-g5987d8a79cda1069c774e5c302d5597310270026
Author: Hans-Peter Nilsson <hp@axis.com>
Date:   Wed Mar 10 03:54:16 2021 +0100

    cris: define DWARF_FRAME_REGISTERS
    
    When DWARF_FRAME_REGISTERS isn't defined, the default is
    FIRST_PSEUDO_REGISTER which means that if you add faked
    registers to the port, used for frame-context related
    elimination, room is allocated for them in the register
    context used for frame-unwinding, which is wasteful because
    they're eliminated before the final form of the code that is
    emitted.
    
    Stopping after MOF saves two register slots in the unwind
    contest, compared to the current default.  For regular C
    programming this is uninteresting, but defining
    DWARF_FRAME_REGISTERS now also avoids the need to remember
    to define it later, when twiddling with additional faked
    registers (alternatively suffering churn from comparing
    differences in unwind context).  As expected, no effect on
    test-results, coremark or local (C-specific)
    microbenchmarks.
    
    gcc:
            * config/cris/cris.h (DWARF_FRAME_REGISTERS): Define.

Diff:
---
 gcc/config/cris/cris.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/config/cris/cris.h b/gcc/config/cris/cris.h
index 1f8ccc5dec9..4d04ef869f3 100644
--- a/gcc/config/cris/cris.h
+++ b/gcc/config/cris/cris.h
@@ -588,6 +588,9 @@ enum reg_class
 
 #define STATIC_CHAIN_REGNUM CRIS_STATIC_CHAIN_REGNUM
 
+/* No unwind context is needed for faked registers nor DCCR.  Currently not MOF
+   too, but let's keep that open.  */
+#define DWARF_FRAME_REGISTERS (CRIS_MOF_REGNUM + 1)
 
 /* Node: Elimination */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-10  3:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10  3:02 [gcc r11-7591] cris: define DWARF_FRAME_REGISTERS Hans-Peter Nilsson

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