static bool ia64_vectorize_vec_perm_const_ok (machine_mode vmode,
const unsigned char *sel);
+static bool ia64_hard_regno_mode_ok (unsigned int, machine_mode);
+
#define MAX_VECT_LEN 8
struct expand_vec_perm_d
#undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS
#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 0
+#undef TARGET_HARD_REGNO_MODE_OK
+#define TARGET_HARD_REGNO_MODE_OK ia64_hard_regno_mode_ok
+
struct gcc_target targetm = TARGET_INITIALIZER;
\f
/* Returns TRUE iff the target attribute indicated by ATTR_ID takes a plain
return 1;
}
+/* Implement TARGET_HARD_REGNO_MODE_OK. */
+
+static bool
+ia64_hard_regno_mode_ok (unsigned int regno, machine_mode mode)
+{
+ if (FR_REGNO_P (regno))
+ return (GET_MODE_CLASS (mode) != MODE_CC
+ && mode != BImode
+ && mode != TFmode);
+
+ if (PR_REGNO_P (regno))
+ return mode == BImode || GET_MODE_CLASS (mode) == MODE_CC;
+
+ if (GR_REGNO_P (regno))
+ return mode != XFmode && mode != XCmode && mode != RFmode;
+
+ if (AR_REGNO_P (regno))
+ return mode == DImode;
+
+ if (BR_REGNO_P (regno))
+ return mode == DImode;
+
+ return false;
+}
+
/* Target hook for assembling integer objects. Handle word-sized
aligned objects and detect the cases when @fptr is needed. */