aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mips/mips.h
diff options
context:
space:
mode:
authorMingjie Xing <mingjie.xing@gmail.com>2010-09-03 09:29:19 +0000
committerMingjie Xing <xmj@gcc.gnu.org>2010-09-03 09:29:19 +0000
commit4904231323789b7d5a0f6fa70fe7f55ee6fba109 (patch)
tree9e1bc64b5068f033b640c01b28e05460daa9b49b /gcc/config/mips/mips.h
parente5ca969363516ec05db3357c22079d7fdcd70ccf (diff)
downloadgcc-4904231323789b7d5a0f6fa70fe7f55ee6fba109.zip
gcc-4904231323789b7d5a0f6fa70fe7f55ee6fba109.tar.gz
gcc-4904231323789b7d5a0f6fa70fe7f55ee6fba109.tar.bz2
Fix shift count truncate problem for loongson.
From-SVN: r163799
Diffstat (limited to 'gcc/config/mips/mips.h')
-rw-r--r--gcc/config/mips/mips.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 4dd86d4..74bf3d25 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -2423,9 +2423,10 @@ typedef struct mips_args {
(often extended) would be needed for byte accesses. */
#define SLOW_BYTE_ACCESS (!TARGET_MIPS16)
-/* Define this to be nonzero if shift instructions ignore all but the low-order
- few bits. */
-#define SHIFT_COUNT_TRUNCATED 1
+/* Standard MIPS integer shifts truncate the shift amount to the
+ width of the shifted operand. However, Loongson vector shifts
+ do not truncate the shift amount at all. */
+#define SHIFT_COUNT_TRUNCATED (!TARGET_LOONGSON_2EF)
/* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits
is done just by pretending it is already truncated. */