Similarly to x86, PowerPC and SPARC, this enables the use of custom run-time
descriptors in Ada, thus eliminating the need for trampolines and executable
stack in presence of pointers to nested functions.
Unfortunately I don't have access to MIPS hardware any more, but the scheme
was tested on the architecture at some point. OK for the mainline?
2016-11-13 Eric Botcazou <ebotca...@adacore.com>
PR ada/67205
* config/mips/mips.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define.
--
Eric Botcazou
Index: config/mips/mips.c
===================================================================
--- config/mips/mips.c (revision 242334)
+++ config/mips/mips.c (working copy)
@@ -22387,6 +22387,10 @@ mips_promote_function_mode (const_tree t
#undef TARGET_HARD_REGNO_SCRATCH_OK
#define TARGET_HARD_REGNO_SCRATCH_OK mips_hard_regno_scratch_ok
+/* The architecture reserves bit 0 for MIPS16 so use bit 1 for descriptors. */
+#undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS
+#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 2
+
struct gcc_target targetm = TARGET_INITIALIZER;
#include "gt-mips.h"