public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch, moxie] moxie EH fixes
@ 2010-11-21 10:06 Anthony Green
  0 siblings, 0 replies; only message in thread
From: Anthony Green @ 2010-11-21 10:06 UTC (permalink / raw)
  To: gcc-patches

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

Changes to GCC's EH code in the past few months have introduced 
regressions in the moxie port.   I'm committing the attached patch so 
we're able to build and run the testsuite again.  EH is still broken, 
but at least it's measurable now.


[-- Attachment #2: moxie-eh.txt --]
[-- Type: text/plain, Size: 1154 bytes --]

2010-11-20  Anthony Green  <green@moxielogic.com>

	* config/moxie/moxie.h (INCOMING_RETURN_ADDR_RTX): Define.
	(EH_RETURN_DATA_REGNO): Define.
	(EH_RETURN_HANDLER_RTX): Define.


Index: gcc/config/moxie/moxie.h
===================================================================
--- gcc/config/moxie/moxie.h	(revision 166920)
+++ gcc/config/moxie/moxie.h	(working copy)
@@ -285,6 +285,21 @@
    pointer registers are already assumed to be used as needed.  */
 #define EPILOGUE_USES(R) (R == MOXIE_R5)
 
+/* A C expression whose value is RTL representing the location of the
+   incoming return address at the beginning of any function, before
+   the prologue.  */
+#define INCOMING_RETURN_ADDR_RTX					\
+  gen_frame_mem (Pmode,							\
+		 plus_constant (stack_pointer_rtx, UNITS_PER_WORD))
+
+/* Describe how we implement __builtin_eh_return.  */
+#define EH_RETURN_DATA_REGNO(N)	((N) < 4 ? (N+2) : INVALID_REGNUM)
+
+/* Store the return handler into the call frame.  */
+#define EH_RETURN_HANDLER_RTX						\
+  gen_frame_mem (Pmode,							\
+		 plus_constant (frame_pointer_rtx, UNITS_PER_WORD))
+
 /* Storage Layout */
 
 #define BITS_BIG_ENDIAN 0

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

only message in thread, other threads:[~2010-11-21  3:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-21 10:06 [Patch, moxie] moxie EH fixes Anthony Green

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