--- gcc/config/m68k/next.h 2018/04/24 18:10:24 1.1 +++ gcc/config/m68k/next.h 2018/04/24 18:44:12 1.1.1.5 @@ -1,5 +1,5 @@ /* Target definitions for GNU compiler for mc680x0 running NeXTSTEP - Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. + Copyright (C) 1989, 90, 91, 92, 93, 1994 Free Software Foundation, Inc. This file is part of GNU CC. @@ -15,7 +15,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. */ #include "m68k/m68k.h" #include "nextstep.h" @@ -33,7 +34,7 @@ the Free Software Foundation, 675 Mass A /* Names to predefine in the preprocessor for this target machine. */ -#define CPP_PREDEFINES "-Dmc68000 -Dm68k -DNeXT -Dunix -D__MACH__ -D__BIG_ENDIAN__ -D__ARCHITECTURE__=\"m68k\"" +#define CPP_PREDEFINES "-Dmc68000 -Dm68k -DNeXT -Dunix -D__MACH__ -D__BIG_ENDIAN__ -D__ARCHITECTURE__=\"m68k\" -Asystem(unix) -Asystem(mach) -Acpu(m68k) -Amachine(m68k)" /* Every structure or union's size must be a multiple of 2 bytes. (Why isn't this in m68k.h?) */ @@ -175,9 +176,26 @@ the Free Software Foundation, 675 Mass A #undef GO_IF_INDEXABLE_BASE(X, ADDR) #define GO_IF_INDEXABLE_BASE(X, ADDR) \ -{ if (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) goto ADDR; } +{ if (LEGITIMATE_BASE_REG_P (X)) goto ADDR; } /* This accounts for the return pc and saved fp on the m68k. */ #define OBJC_FORWARDING_STACK_OFFSET 8 #define OBJC_FORWARDING_MIN_OFFSET 8 + +/* FINALIZE_TRAMPOLINE enables executable stack. The + __enable_execute_stack also clears the insn cache. */ + +#undef FINALIZE_TRAMPOLINE +#define FINALIZE_TRAMPOLINE(TRAMP) \ + emit_library_call(gen_rtx(SYMBOL_REF, Pmode, "__enable_execute_stack"), \ + 0, VOIDmode, 1, memory_address(SImode, (TRAMP)), Pmode) + +/* A C expression used to clear the instruction cache from + address BEG to address END. On NeXTSTEP this i a system trap. */ + +#define CLEAR_INSN_CACHE(BEG, END) \ + asm volatile ("trap #2") + +/* GCC is the primary compiler for NeXTSTEP, so we don't need this. */ +#undef PCC_STATIC_STRUCT_RETURN