--- gcc/config/m68k/mot3300.h 2018/04/24 18:20:56 1.1.1.3 +++ gcc/config/m68k/mot3300.h 2018/04/24 18:28:09 1.1.1.4 @@ -1,8 +1,9 @@ /* Definitions of target machine for GNU compiler, SysV68 Motorola 3300 Delta Series. - Copyright (C) 1987, 1993, 1994 Free Software Foundation, Inc. - Coptributed by Abramo and Roberto Bagnara (bagnara@dipisa.di.unipi.it) + Copyright (C) 1987, 1993, 1994, 1995 Free Software Foundation, Inc. + Contributed by Abramo and Roberto Bagnara (bagnara@dipisa.di.unipi.it) based on Alex Crain's 3B1 definitions. + Maintained by Philippe De Muyter (phdm@info.ucl.ac.be). This file is part of GNU CC. @@ -18,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. */ #define MOTOROLA /* Use Motorola syntax rather than "MIT" */ #define MOTOROLA_BSR /* Use Span-dependent optimized bsr */ @@ -72,6 +74,10 @@ the Free Software Foundation, 675 Mass A /* Every structure or union's size must be a multiple of 2 bytes. */ #define STRUCTURE_SIZE_BOUNDARY 16 + +/* Follow sysV68 cc regarding alignment imposed by char:0; */ + +#define PCC_BITFIELD_TYPE_MATTERS 1 /* Allocation boundary (in *bits*) for storing arguments in argument list. */ /* Be compatible with native compiler. */ @@ -159,11 +165,6 @@ output_file_directive ((FILE), main_inpu #undef CPP_PREDEFINES #define CPP_PREDEFINES "-Dm68k -Dunix -DsysV68 -D__motorola__ -Asystem(unix) -Asystem(svr3) -Acpu(m68k) -Amachine(m68k)" -/* Override part of the obstack macros. */ - -#define __PTR_TO_INT(P) ((int)(P)) -#define __INT_TO_PTR(P) ((char *)(P)) - #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (68k, SGS/AT&T sysV68 syntax)"); @@ -175,6 +176,16 @@ output_file_directive ((FILE), main_inpu 1, 1, 0, 0, 0, 0, 0, 1, \ 1, 1, 0, 0, 0, 0, 0, 0} +/* This will return small structs in d0. */ +#define RETURN_IN_MEMORY(type) \ + ((TYPE_MODE (type) == BLKmode) \ + || (AGGREGATE_TYPE_P (type) \ + && GET_MODE_SIZE (TYPE_MODE (type)) > UNITS_PER_WORD)) + +/* Don't default to pcc-struct-return, because we have already specified + exactly how to return structures in the RETURN_IN_MEMORY macro. */ +#define DEFAULT_PCC_STRUCT_RETURN 0 + /* If TARGET_68881, return SF and DF values in fp0 instead of d0. */ /* NYI: If FP=M68881U return SF and DF values in d0. */ /* NYI: If -mold return pointer in a0 and d0 */ @@ -184,7 +195,7 @@ output_file_directive ((FILE), main_inpu #define FUNCTION_VALUE(VALTYPE,FUNC) \ (TREE_CODE (VALTYPE) == REAL_TYPE && TARGET_68881 \ ? gen_rtx (REG, TYPE_MODE (VALTYPE), 16) \ - : (TREE_CODE (VALTYPE) == POINTER_TYPE \ + : (POINTER_TYPE_P (VALTYPE) \ ? gen_rtx (REG, TYPE_MODE (VALTYPE), 8) \ : gen_rtx (REG, TYPE_MODE (VALTYPE), 0)))