--- gcc/config/m88k/m88k.h 2018/04/24 18:20:33 1.1.1.3 +++ gcc/config/m88k/m88k.h 2018/04/24 18:27:40 1.1.1.4 @@ -1,8 +1,8 @@ /* Definitions of target machine for GNU compiler for Motorola m88100 in an 88open OCS/BCS environment. - Copyright (C) 1988, 89, 90, 91, 93, 1994 Free Software Foundation, Inc. - Contributed by Michael Tiemann (tiemann@mcc.com) - Enhanced by Michael Meissner (meissner@osf.org) + Copyright (C) 1988, 89, 90, 91, 93, 94, 1995 Free Software Foundation, Inc. + Contributed by Michael Tiemann (tiemann@cygnus.com) + Enhanced by Michael Meissner (meissner@cygnus.com) Version 2 port by Tom Wood (twood@pets.sps.mot.com) This file is part of GNU CC. @@ -19,7 +19,8 @@ GNU General Public License for more deta You should have received a copy of the GNU General Public License along with GNU CC; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ /* The m88100 port of GNU CC adheres to the various standards from 88open. These documents are available by writing: @@ -115,6 +116,7 @@ extern int null_prologue (); extern int integer_ok_for_set (); extern int m88k_debugger_offset (); + extern void emit_bcnd (); extern void expand_block_move (); extern void m88k_layout_frame (); @@ -197,15 +199,15 @@ extern char * reg_names[]; Redefined in sysv4.h, and luna.h. */ #define VERSION_INFO1 "88open OCS/BCS, " #ifndef VERSION_INFO2 -#define VERSION_INFO2 "$Revision: 1.1.1.3 $" +#define VERSION_INFO2 "$Revision: 1.1.1.4 $" #endif #ifndef VERSION_STRING #define VERSION_STRING version_string #ifdef __STDC__ -#define TM_RCS_ID "@(#)" __FILE__ " $Revision: 1.1.1.3 $ " __DATE__ +#define TM_RCS_ID "@(#)" __FILE__ " $Revision: 1.1.1.4 $ " __DATE__ #else -#define TM_RCS_ID "$What$" +#define TM_RCS_ID "$What: <@(#) m88k.h,v 1.1.1.2.2.2> $" #endif /* __STDC__ */ #else #define TM_RCS_ID "@(#)" __FILE__ " " VERSION_INFO2 " " __DATE__ @@ -221,6 +223,8 @@ extern char * reg_names[]; #define MASK_88100 0x00000001 /* Target m88100 */ #define MASK_88110 0x00000002 /* Target m88110 */ +#define MASK_88000 (MASK_88100 | MASK_88110) + #define MASK_OCS_DEBUG_INFO 0x00000004 /* Emit .tdesc info */ #define MASK_OCS_FRAME_POSITION 0x00000008 /* Debug frame = CFA, not r30 */ #define MASK_SVR4 0x00000010 /* Target is AT&T System V.4 */ @@ -235,10 +239,10 @@ extern char * reg_names[]; #define MASK_WARN_PASS_STRUCT 0x00002000 /* Warn about passed structs */ #define MASK_OPTIMIZE_ARG_AREA 0x00004000 /* Save stack space */ #define MASK_NO_SERIALIZE_VOLATILE 0x00008000 /* Serialize volatile refs */ - -#define MASK_88000 (MASK_88100 | MASK_88110) #define MASK_EITHER_LARGE_SHIFT (MASK_TRAP_LARGE_SHIFT | \ MASK_HANDLE_LARGE_SHIFT) +#define MASK_OMIT_LEAF_FRAME_POINTER 0x00020000 /* omit leaf frame pointers */ + #define TARGET_88100 ((target_flags & MASK_88000) == MASK_88100) #define TARGET_88110 ((target_flags & MASK_88000) == MASK_88110) @@ -260,6 +264,7 @@ extern char * reg_names[]; #define TARGET_SERIALIZE_VOLATILE (!(target_flags & MASK_NO_SERIALIZE_VOLATILE)) #define TARGET_EITHER_LARGE_SHIFT (target_flags & MASK_EITHER_LARGE_SHIFT) +#define TARGET_OMIT_LEAF_FRAME_POINTER (target_flags & MASK_OMIT_LEAF_FRAME_POINTER) /* Redefined in sysv3.h, sysv4.h, and dgux.h. */ #define TARGET_DEFAULT (MASK_CHECK_ZERO_DIV) @@ -289,6 +294,7 @@ extern char * reg_names[]; { "no-optimize-arg-area", -MASK_OPTIMIZE_ARG_AREA }, \ { "no-serialize-volatile", MASK_NO_SERIALIZE_VOLATILE }, \ { "serialize-volatile", -MASK_NO_SERIALIZE_VOLATILE }, \ + { "omit-leaf-frame-pointer", MASK_OMIT_LEAF_FRAME_POINTER }, \ SUBTARGET_SWITCHES \ /* Default switches */ \ { "", TARGET_DEFAULT }, \ @@ -973,10 +979,11 @@ enum reg_class { NO_REGS, AP_REG, XRF_RE /* Value is the number of bytes of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), FUNTYPE is the data type of the function (as a tree), or for a library call it is an identifier node for the subroutine name. SIZE is the number of bytes of arguments passed on the stack. */ -#define RETURN_POPS_ARGS(FUNTYPE,SIZE) 0 +#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. VALTYPE is the data type of the value (as a tree). @@ -1080,7 +1087,7 @@ enum reg_class { NO_REGS, AP_REG, XRF_RE of an argument with the specified mode and type. If it is not defined, `PARM_BOUNDARY' is used for all arguments. */ #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \ - (((TYPE) ? TYPE_ALIGN (TYPE) : GET_MODE_SIZE (MODE)) <= PARM_BOUNDARY \ + (((TYPE) ? TYPE_ALIGN (TYPE) : GET_MODE_BITSIZE (MODE)) <= PARM_BOUNDARY \ ? PARM_BOUNDARY : 2 * PARM_BOUNDARY) /* Generate necessary RTL for __builtin_saveregs(). @@ -1135,8 +1142,9 @@ enum reg_class { NO_REGS, AP_REG, XRF_RE may be accessed via the stack pointer) in functions that seem suitable. This is computed in `reload', in reload1.c. */ #define FRAME_POINTER_REQUIRED \ - (frame_pointer_needed \ - || (write_symbols != NO_DEBUG && !TARGET_OCS_FRAME_POSITION)) +(current_function_varargs \ + || (TARGET_OMIT_LEAF_FRAME_POINTER && !leaf_function_p ()) \ + || (write_symbols != NO_DEBUG && !TARGET_OCS_FRAME_POSITION)) /* Definitions for register eliminations. @@ -1536,7 +1544,7 @@ enum reg_class { NO_REGS, AP_REG, XRF_RE #define HANDLE_SYSV_PRAGMA /* Tell when to handle #pragma weak. This is only done for V.4. */ -#define HANDLE_PRAGMA_WEAK TARGET_SVR4 +#define SUPPORTS_WEAK TARGET_SVR4 /* Max number of bytes we can move from memory to memory in one reasonably fast instruction. */ @@ -1719,7 +1727,6 @@ enum reg_class { NO_REGS, AP_REG, XRF_RE #undef FINI_SECTION_ASM_OP #undef TYPE_ASM_OP #undef SIZE_ASM_OP -#undef WEAK_ASM_OP #undef SET_ASM_OP #undef SKIP_ASM_OP #undef COMMON_ASM_OP @@ -1770,12 +1777,18 @@ enum reg_class { NO_REGS, AP_REG, XRF_RE /* These are specific to PIC. */ #define TYPE_ASM_OP "type" #define SIZE_ASM_OP "size" -#define WEAK_ASM_OP "weak" #ifndef AS_BUG_POUND_TYPE /* Faulty assemblers require @ rather than #. */ #undef TYPE_OPERAND_FMT #define TYPE_OPERAND_FMT "#%s" #endif +/* This is how we tell the assembler that a symbol is weak. */ + +#undef ASM_WEAKEN_LABEL +#define ASM_WEAKEN_LABEL(FILE,NAME) \ + do { fputs ("\tweak\t", FILE); assemble_name (FILE, NAME); \ + fputc ('\n', FILE); } while (0) + /* These are specific to version 03.00 assembler syntax. */ #define INTERNAL_ASM_OP "local" #define VERSION_ASM_OP "version"