Since GET_MODE_ALIGNMENT is defined by psABI and the biggest alignment
is 4 byte for IA MCU psABI, we should use GET_MODE_BITSIZE for IA MCU
psABI to get vector natural alignment to check misaligned vector move.
* config/i386/i386.c (ix86_expand_vector_move): Use
GET_MODE_BITSIZE for IA MCU psABI to get vector natural
alignment.
From-SVN: r228969
+2015-10-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/i386.c (ix86_expand_vector_move): Use
+ GET_MODE_BITSIZE for IA MCU psABI to get vector natural
+ alignment.
+
2015-10-19 H.J. Lu <hongjiu.lu@intel.com>
* doc/invoke.texi: Replace @optindex with @opindex.
ix86_expand_vector_move (machine_mode mode, rtx operands[])
{
rtx op0 = operands[0], op1 = operands[1];
- unsigned int align = GET_MODE_ALIGNMENT (mode);
+ /* Use GET_MODE_BITSIZE instead of GET_MODE_ALIGNMENT for IA MCU
+ psABI since the biggest alignment is 4 byte for IA MCU psABI. */
+ unsigned int align = (TARGET_IAMCU
+ ? GET_MODE_BITSIZE (mode)
+ : GET_MODE_ALIGNMENT (mode));
if (push_operand (op0, VOIDmode))
op0 = emit_move_resolve_push (mode, op0);