summaryrefslogtreecommitdiff
path: root/gcc/config/spu/spu.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/spu/spu.c')
-rw-r--r--gcc/config/spu/spu.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index 413567ba2bd..4ce227b7f95 100644
--- a/gcc/config/spu/spu.c
+++ b/gcc/config/spu/spu.c
@@ -7173,6 +7173,14 @@ spu_can_change_mode_class (machine_mode from, machine_mode to, reg_class_t)
|| (GET_MODE_SIZE (from) <= 4 && GET_MODE_SIZE (to) <= 4)
|| (GET_MODE_SIZE (from) >= 16 && GET_MODE_SIZE (to) >= 16));
}
+
+/* Implement TARGET_TRULY_NOOP_TRUNCATION. */
+
+static bool
+spu_truly_noop_truncation (unsigned int outprec, unsigned int inprec)
+{
+ return inprec <= 32 && outprec <= inprec;
+}
/* Table of machine attributes. */
static const struct attribute_spec spu_attribute_table[] =
@@ -7407,6 +7415,9 @@ static const struct attribute_spec spu_attribute_table[] =
#undef TARGET_CAN_CHANGE_MODE_CLASS
#define TARGET_CAN_CHANGE_MODE_CLASS spu_can_change_mode_class
+#undef TARGET_TRULY_NOOP_TRUNCATION
+#define TARGET_TRULY_NOOP_TRUNCATION spu_truly_noop_truncation
+
struct gcc_target targetm = TARGET_INITIALIZER;
#include "gt-spu.h"