Commit dcd13066 by Richard Kenner

(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
parent d82f7df2
...@@ -113,6 +113,13 @@ extern int target_flags; ...@@ -113,6 +113,13 @@ extern int target_flags;
#define MASK_5200 2048 #define MASK_5200 2048
#define TARGET_5200 (target_flags & MASK_5200) #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 */ /* Compile for a CPU32 */
/* A 68020 without bitfields is a good heuristic for a CPU32 */ /* A 68020 without bitfields is a good heuristic for a CPU32 */
#define TARGET_CPU32 (TARGET_68020 && !TARGET_BITFIELD) #define TARGET_CPU32 (TARGET_68020 && !TARGET_BITFIELD)
...@@ -158,6 +165,8 @@ extern int target_flags; ...@@ -158,6 +165,8 @@ extern int target_flags;
{ "68302", - (MASK_68060|MASK_68040|MASK_68020|MASK_BITFIELD)}, \ { "68302", - (MASK_68060|MASK_68040|MASK_68020|MASK_BITFIELD)}, \
{ "68332", - (MASK_68060|MASK_68040|MASK_BITFIELD)}, \ { "68332", - (MASK_68060|MASK_68040|MASK_BITFIELD)}, \
{ "68332", MASK_68020}, \ { "68332", MASK_68020}, \
{ "align-int", MASK_ALIGN_INT }, \
{ "no-align-int", -MASK_ALIGN_INT }, \
SUBTARGET_SWITCHES \ SUBTARGET_SWITCHES \
{ "", TARGET_DEFAULT}} { "", TARGET_DEFAULT}}
/* TARGET_DEFAULT is defined in sun*.h and isi.h, etc. */ /* TARGET_DEFAULT is defined in sun*.h and isi.h, etc. */
...@@ -257,8 +266,12 @@ extern int target_flags; ...@@ -257,8 +266,12 @@ extern int target_flags;
/* Alignment of field after `int : 0' in a structure. */ /* Alignment of field after `int : 0' in a structure. */
#define EMPTY_FIELD_BOUNDARY 16 #define EMPTY_FIELD_BOUNDARY 16
/* No data type wants to be aligned rounder than this. */ /* No data type wants to be aligned rounder than this.
#define BIGGEST_ALIGNMENT 16 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 /* Set this nonzero if move instructions will actually fail to work
when given unaligned data. */ when given unaligned data. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment