From: John David Anglin Date: Sat, 28 Dec 2002 23:27:08 +0000 (+0000) Subject: pa.h (TARGET_SOM): Define if not defined. X-Git-Tag: releases/gcc-3.2.2~152 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b103b2ea9252c42df0bd387529ccfc708a66786d;p=thirdparty%2Fgcc.git pa.h (TARGET_SOM): Define if not defined. 2002-12-28 John David Anglin * pa.h (TARGET_SOM): Define if not defined. * som.h (OBJ_SOM): Rename to TARGET_SOM. * pa.c (pa_output_function_prologue): Don't accumulate the total code bytes in the translation unit when using gas, som and not the portable runtime, or when using function sections. From-SVN: r60589 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fd31004539e2..d7198bef607a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2002-12-28 John David Anglin + + * pa.h (TARGET_SOM): Define if not defined. + * som.h (OBJ_SOM): Rename to TARGET_SOM. + * pa.c (pa_output_function_prologue): Don't accumulate the total code + bytes in the translation unit when using gas, som and not the portable + runtime, or when using function sections. + 2002-12-21 Eric Botcazou PR optimization/8599 diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index c543c950c4ae..533cdd48e89a 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -3078,9 +3078,11 @@ pa_output_function_prologue (file, size) fputs ("\n\t.ENTRY\n", file); - /* If we're using GAS and not using the portable runtime model, then - we don't need to accumulate the total number of code bytes. */ - if (TARGET_GAS && ! TARGET_PORTABLE_RUNTIME) + /* If we're using GAS, SOM and not the portable runtime model, or if + we're using function sections, then we don't need to accumulate the + total number of code bytes in the translation unit. */ + if ((TARGET_GAS && TARGET_SOM && !TARGET_PORTABLE_RUNTIME) + || flag_function_sections) total_code_bytes = 0; else if (INSN_ADDRESSES_SET_P ()) { diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 5c27467e25ae..72b56d8cb858 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -159,6 +159,11 @@ extern int target_flags; #define TARGET_ELF32 0 #endif +/* Generate code for SOM ABI. */ +#ifndef TARGET_SOM +#define TARGET_SOM 0 +#endif + /* Macro to define tables used to set the flags. This is a list in braces of pairs in braces, each pair being { "NAME", VALUE } diff --git a/gcc/config/pa/som.h b/gcc/config/pa/som.h index 22c46538f66d..f20a5a8d04e7 100644 --- a/gcc/config/pa/som.h +++ b/gcc/config/pa/som.h @@ -19,7 +19,8 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* So we can conditionalize small amounts of code in pa.c or pa.md. */ -#define OBJ_SOM +#undef TARGET_SOM +#define TARGET_SOM 1 /* We do not use BINCL stabs in SOM. ??? If it does not hurt, we probably should to avoid useless divergence