Commit e9c9e772 by H.J. Lu Committed by H.J. Lu

Define ATTRIBUTE_ALIGNED_VALUE to 32 for IA MCU

attribute ((aligned)) should align to the minimum of BIGGEST_ALIGNMENT,
which is 4 bytes for -miamcu.

gcc/

	PR target/66818
	* config/i386/i386.h (ATTRIBUTE_ALIGNED_VALUE): Defined to 32
	for IA MCU.

gcc/testsuite/

	PR target/66818
	* gcc.target/i386/pr66818.c: New test.

From-SVN: r225606
parent 661c8707
2015-07-09 H.J. Lu <hongjiu.lu@intel.com> 2015-07-09 H.J. Lu <hongjiu.lu@intel.com>
PR target/66818
* config/i386/i386.h (ATTRIBUTE_ALIGNED_VALUE): Defined to 32
for IA MCU.
2015-07-09 H.J. Lu <hongjiu.lu@intel.com>
PR target/66817 PR target/66817
* config/i386/i386.c (ix86_return_in_memory): Return true * config/i386/i386.c (ix86_return_in_memory): Return true
if int_size_in_bytes returns negative for IA MCU. if int_size_in_bytes returns negative for IA MCU.
......
...@@ -811,7 +811,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); ...@@ -811,7 +811,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
/* Alignment value for attribute ((aligned)). It is a constant since /* Alignment value for attribute ((aligned)). It is a constant since
it is the part of the ABI. We shouldn't change it with -mavx. */ it is the part of the ABI. We shouldn't change it with -mavx. */
#define ATTRIBUTE_ALIGNED_VALUE 128 #define ATTRIBUTE_ALIGNED_VALUE (TARGET_IAMCU ? 32 : 128)
/* Decide whether a variable of mode MODE should be 128 bit aligned. */ /* Decide whether a variable of mode MODE should be 128 bit aligned. */
#define ALIGN_MODE_128(MODE) \ #define ALIGN_MODE_128(MODE) \
......
2015-07-09 H.J. Lu <hongjiu.lu@intel.com> 2015-07-09 H.J. Lu <hongjiu.lu@intel.com>
PR target/66818
* gcc.target/i386/pr66818.c: New test.
2015-07-09 H.J. Lu <hongjiu.lu@intel.com>
PR target/66817 PR target/66817
* gcc.target/i386/pr66817.c: New test. * gcc.target/i386/pr66817.c: New test.
......
/* { dg-do compile { target ia32 } } */
/* { dg-options "-O2 -mno-sse -mno-mmx -miamcu" } */
struct dummy { int x __attribute__((aligned)); };
int array[__alignof__(struct dummy) == 4 ? 1 : -1];
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