From: Jim Wilson Date: Tue, 20 Sep 1994 20:08:07 +0000 (-0700) Subject: (ASM_OUTPUT_UNDEF_FUNCTION): Define. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b696ee6b889c9c2c385cc759fe86019850f522ab;p=gcc.git (ASM_OUTPUT_UNDEF_FUNCTION): Define. (ASM_OUTPUT_EXTERNAL_LIBCALL): Define. (ASM_DECLARE_FUNCTION_SIZE): Define. From-SVN: r8100 --- diff --git a/gcc/config/mips/iris5.h b/gcc/config/mips/iris5.h index 62703a15896..5290136a7a6 100644 --- a/gcc/config/mips/iris5.h +++ b/gcc/config/mips/iris5.h @@ -110,3 +110,26 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ in the small data section if the user explicitly asks for it. */ #undef MIPS_DEFAULT_GVALUE #define MIPS_DEFAULT_GVALUE 0 + +/* In Irix 5, we must output a `.global name .text' directive for every used + but undefined function. If we don't, the linker may perform an optimization + (skipping over the insns that set $gp) when it is unsafe. This is used + indirectly by ASM_OUTPUT_EXTERNAL. */ +#define ASM_OUTPUT_UNDEF_FUNCTION(FILE, NAME) \ +do { \ + fputs ("\t.globl ", FILE); \ + assemble_name (FILE, NAME); \ + fputs (" .text\n", FILE); \ +} while (0) + +/* Also do this for libcalls. */ +#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \ + mips_output_external_libcall (FILE, XSTR (FUN, 0)) + +/* This does for functions what ASM_DECLARE_OBJECT_NAME does for variables. + This is used indirectly by ASM_OUTPUT_EXTERNAL. */ +#define ASM_DECLARE_FUNCTION_SIZE(STREAM, NAME, DECL) \ +do { \ + tree name_tree = get_identifier (NAME); \ + TREE_ASM_WRITTEN (name_tree) = 1; \ +} while (0)