diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2015-10-19 11:41:03 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2015-10-19 04:41:03 -0700 |
commit | 1c6e3c3e2ce560e555ba7d75a22179757a3c6489 (patch) | |
tree | 0f8b89ec81e9567be632659ca4cffb17746aed01 /gcc | |
parent | 1be8ebde2e47e239f994a62291e50502b63b5451 (diff) | |
download | gcc-1c6e3c3e2ce560e555ba7d75a22179757a3c6489.zip gcc-1c6e3c3e2ce560e555ba7d75a22179757a3c6489.tar.gz gcc-1c6e3c3e2ce560e555ba7d75a22179757a3c6489.tar.bz2 |
Use GET_MODE_BITSIZE to get vector natural alignment
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index db0aea4..b04f38b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 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. 2015-10-19 H.J. Lu <hongjiu.lu@intel.com> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 1049455..a4f4b6f 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -18645,7 +18645,11 @@ void 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); |