+Fri Sep 3 19:02:38 1999 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
+
+ * function.h (struct function): Add new element LANGUAGE.
+ (save_lang_status): Declare new variable.
+ (restore_lang_status): Likewise.
+ * function.c (save_lang_status): Define.
+ (restore_lang_status): Likewise.
+ (push_function_context_to): Call language-specific save function.
+ (pop_function_context_from): Call language-specific restore function.
+
Fri Sep 3 01:16:18 1999 Alasdair Baird <alasdair@wildcat.demon.co.uk>
* i386.md (movsf_1): Check REG_P before use of REGNO.
void (*save_machine_status) PROTO((struct function *));
void (*restore_machine_status) PROTO((struct function *));
+/* Likewise, but for language-specific data. */
+void (*save_lang_status) PROTO((struct function *));
+void (*restore_lang_status) PROTO((struct function *));
+
/* The FUNCTION_DECL for an inline function currently being expanded. */
tree inline_function_decl;
}
/* Save the current context for compilation of a nested function.
- This is called from language-specific code.
- The caller is responsible for saving any language-specific status,
- since this function knows only about language-independent variables. */
+ This is called from language-specific code. The caller should use
+ the save_lang_status callback to save any language-specific state,
+ since this function knows only about language-independent
+ variables. */
void
push_function_context_to (context)
save_tree_status (p, context);
save_varasm_status (p, context);
+ if (save_lang_status)
+ (*save_lang_status) (p);
if (save_machine_status)
(*save_machine_status) (p);
if (restore_machine_status)
(*restore_machine_status) (p);
+ if (restore_lang_status)
+ (*restore_lang_status) (p);
/* Finish doing put_var_into_stack for any of our variables
which became addressable during the nested function. */
/* tm.h can use this to store whatever it likes. */
struct machine_function *machine;
+ /* Language-specific code can use this to store whatever it likes. */
+ struct language_function *language;
+
/* For reorg. */
/* If some insns can be deferred to the delay slots of the epilogue, the
extern void (*save_machine_status) PROTO((struct function *));
extern void (*restore_machine_status) PROTO((struct function *));
+/* Likewise, but for language-specific data. */
+extern void (*save_lang_status) PROTO((struct function *));
+extern void (*restore_lang_status) PROTO((struct function *));
+
/* Save and restore status information for a nested function. */
extern void save_tree_status PROTO((struct function *, tree));
extern void restore_tree_status PROTO((struct function *, tree));