diff options
author | Doug Evans <dje@gnu.org> | 1996-01-11 23:33:39 +0000 |
---|---|---|
committer | Doug Evans <dje@gnu.org> | 1996-01-11 23:33:39 +0000 |
commit | a6cc0d48f142afdccc9c31286037c78894f4f0f9 (patch) | |
tree | 09467a74fd6dea885fa6d694d075352826c5a34a /gcc | |
parent | 332dd867ee91e173482c9161ac015be93f7f15c3 (diff) | |
download | gcc-a6cc0d48f142afdccc9c31286037c78894f4f0f9.zip gcc-a6cc0d48f142afdccc9c31286037c78894f4f0f9.tar.gz gcc-a6cc0d48f142afdccc9c31286037c78894f4f0f9.tar.bz2 |
h8300.h (TARGET_ALIGN_STRUCT_300): New macro.
* h8300/h8300.h (TARGET_ALIGN_STRUCT_300): New macro.
(TARGET_SWITCHES): Add -malign-struct-300.
(BIGGEST_FIELD_ALIGNMENT): Update.
From-SVN: r10966
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/h8300/h8300.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/gcc/config/h8300/h8300.h b/gcc/config/h8300/h8300.h index 89414e8..3996bf4 100644 --- a/gcc/config/h8300/h8300.h +++ b/gcc/config/h8300/h8300.h @@ -80,6 +80,13 @@ extern int target_flags; #define TARGET_H8300 (! TARGET_H8300H) #define TARGET_H8300H (target_flags & 4096) +/* Align structures on the h8/300h the same way as the h8/300. Specifically, + 32 bit and larger values in structures are aligned on 16 bit boundaries. + This is all the hardware requires, but the default is 32 bits for the 300h. + ??? Now watch someone add hardware floating point requiring 32 bit + alignment. */ +#define TARGET_ALIGN_STRUCT_300 (target_flags & 8192) + /* Macro to define tables used to set the flags. This is a list in braces of pairs in braces, each pair being { "NAME", VALUE } @@ -96,7 +103,7 @@ extern int target_flags; {"rtl-dump",2048}, \ {"h",4096}, \ {"no-h",-4096}, \ - {"exp",8192}, \ + {"align-struct-300",8192}, \ { "", TARGET_DEFAULT}} /* Do things that must be done once at start up. */ @@ -177,16 +184,21 @@ do { \ #define FUNCTION_BOUNDARY 16 /* Alignment of field after `int : 0' in a structure. */ +/* One can argue this should be 32 for -mint32, but since 32 bit ints only + need 16 bit alignment, this is left as is so that -mint32 doesn't change + structure layouts. */ #define EMPTY_FIELD_BOUNDARY 16 /* A bitfield declared as `int' forces `int' alignment for the struct. */ #define PCC_BITFIELD_TYPE_MATTERS 0 -/* No data type wants to be aligned rounder than this. */ +/* No data type wants to be aligned rounder than this. + 32 bit values are aligned as such on the 300h for speed. */ #define BIGGEST_ALIGNMENT (TARGET_H8300H ? 32 : 16) /* No structure field wants to be aligned rounder than this. */ -#define BIGGEST_FIELD_ALIGNMENT (TARGET_H8300H ? 32 : 16) +#define BIGGEST_FIELD_ALIGNMENT \ +((TARGET_H8300H && ! TARGET_ALIGN_STRUCT_300) ? 32 : 16) /* The stack goes in 16/32 bit lumps. */ #define STACK_BOUNDARY (TARGET_H8300 ? 16 : 32) |