diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1997-05-18 08:14:40 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1997-05-18 08:14:40 -0400 |
commit | dcd13066a0a64aca161216a077d7b9e14b87e0d4 (patch) | |
tree | c80cd8b9eb79c85cdb5db73153e4fb448810c02a | |
parent | d82f7df265f5df5c1769a954069cf8afb4952097 (diff) | |
download | gcc-dcd13066a0a64aca161216a077d7b9e14b87e0d4.zip gcc-dcd13066a0a64aca161216a077d7b9e14b87e0d4.tar.gz gcc-dcd13066a0a64aca161216a077d7b9e14b87e0d4.tar.bz2 |
(TARGET_ALIGN_INT, MASK_ALIGN_INT): New macros.
(BIGGEST_ALIGNMENT): Determine according to TARGET_ALIGN_INT.
(TARGET_SWITCHES): Add align-int and no-align-int.
From-SVN: r14082
-rw-r--r-- | gcc/config/m68k/m68k.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h index 4b14e84..78dc974 100644 --- a/gcc/config/m68k/m68k.h +++ b/gcc/config/m68k/m68k.h @@ -113,6 +113,13 @@ extern int target_flags; #define MASK_5200 2048 #define TARGET_5200 (target_flags & MASK_5200) +/* Align ints to a word boundary. This breaks compatibility with the + published ABI's for structures containing ints, but produces faster + code on cpus with 32 bit busses (020, 030, 040, 060, CPU32+, coldfire). + It's required for coldfire cpus without a misalignment module. */ +#define MASK_ALIGN_INT 4096 +#define TARGET_ALIGN_INT (target_flags & MASK_ALIGN_INT) + /* Compile for a CPU32 */ /* A 68020 without bitfields is a good heuristic for a CPU32 */ #define TARGET_CPU32 (TARGET_68020 && !TARGET_BITFIELD) @@ -158,6 +165,8 @@ extern int target_flags; { "68302", - (MASK_68060|MASK_68040|MASK_68020|MASK_BITFIELD)}, \ { "68332", - (MASK_68060|MASK_68040|MASK_BITFIELD)}, \ { "68332", MASK_68020}, \ + { "align-int", MASK_ALIGN_INT }, \ + { "no-align-int", -MASK_ALIGN_INT }, \ SUBTARGET_SWITCHES \ { "", TARGET_DEFAULT}} /* TARGET_DEFAULT is defined in sun*.h and isi.h, etc. */ @@ -257,8 +266,12 @@ extern int target_flags; /* Alignment of field after `int : 0' in a structure. */ #define EMPTY_FIELD_BOUNDARY 16 -/* No data type wants to be aligned rounder than this. */ -#define BIGGEST_ALIGNMENT 16 +/* No data type wants to be aligned rounder than this. + Most published ABIs say that ints should be aligned on 16 bit + boundries, but cpus with 32 bit busses get better performance + aligned on 32 bit boundries. Coldfires without a misalignment + module require 32 bit alignment. */ +#define BIGGEST_ALIGNMENT (TARGET_ALIGN_INT ? 32 : 16) /* Set this nonzero if move instructions will actually fail to work when given unaligned data. */ |