From 7eb05850a844a5e24f1bb66718324596c034ae8e Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Fri, 15 May 2015 07:02:17 +0200 Subject: [PATCH] alpha.c (alpha_extract_integer): Do not handle CONST_WIDE_INT and CONST_DOUBLE. * config/alpha/alpha.c (alpha_extract_integer): Do not handle CONST_WIDE_INT and CONST_DOUBLE. Assert CONST_INT_P (x). (alpha_legitimate_constant_p) : Check high and low part of the constant using alpha_emit_set_const_1. (alpha_expand_mov): Do not handle CONST_WIDE_INT and CONST_DOUBLE. From-SVN: r223210 --- gcc/ChangeLog | 13 ++++++++++--- gcc/config/alpha/alpha.c | 34 +++++++++++++++------------------- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4a3d74f21c5..9b6e112255b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2015-05-15 Uros Bizjak + + * config/alpha/alpha.c (alpha_extract_integer): Do not handle + CONST_WIDE_INT and CONST_DOUBLE. Assert CONST_INT_P (x). + (alpha_legitimate_constant_p) : Check high and + low part of the constant using alpha_emit_set_const_1. + (alpha_expand_mov): Do not handle CONST_WIDE_INT and CONST_DOUBLE. + 2015-05-14 Rohit Arul Raj * varasm.c (output_constant_pool_1): Pass down alignment from @@ -11,8 +19,7 @@ * target.def (ira_change_pseudo_allocno_class): New hook. * targhooks.c (default_ira_change_pseudo_allocno_class): Default value of the hook. - * targhooks.h (default_ira_change_pseudo_allocno_class): New - extern + * targhooks.h (default_ira_change_pseudo_allocno_class): New extern. * doc/tm.texi.in (TARGET_IRA_CHANGE_PSEUDO_ALLOCNO_CLASS): Add the hook. * ira-costs.c (find_costs_and_classes): Call the hook and change @@ -26,7 +33,7 @@ of checking that it is not live after the sibcall. (sibcall_pop_memory): Ditto. (sibcall_value_memory): Ditto. - (sibcall_value_pop_memory): Ditto. + (sibcall_value_pop_memory): Ditto. 2015-05-14 Marc Glisse diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index fb563fb01b1..c52834df26a 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -2105,8 +2105,7 @@ alpha_emit_set_long_const (rtx target, HOST_WIDE_INT c1) return target; } -/* Given an integral CONST_INT, CONST_WIDE_INT, CONST_DOUBLE, - or CONST_VECTOR, return the low 64 bits. */ +/* Given an integral CONST_INT or CONST_VECTOR, return the low 64 bits. */ static HOST_WIDE_INT alpha_extract_integer (rtx x) @@ -2114,17 +2113,9 @@ alpha_extract_integer (rtx x) if (GET_CODE (x) == CONST_VECTOR) x = simplify_subreg (DImode, x, GET_MODE (x), 0); - switch (GET_CODE (x)) - { - case CONST_INT: - return INTVAL (x); - case CONST_WIDE_INT: - return CONST_WIDE_INT_ELT (x, 0); - case CONST_DOUBLE: - return CONST_DOUBLE_LOW (x); - default: - gcc_unreachable (); - } + gcc_assert (CONST_INT_P (x)); + + return INTVAL (x); } /* Implement TARGET_LEGITIMATE_CONSTANT_P. This is all constants for which @@ -2152,7 +2143,6 @@ alpha_legitimate_constant_p (machine_mode mode, rtx x) if (GET_CODE (x) != SYMBOL_REF) return true; - /* FALLTHRU */ case SYMBOL_REF: @@ -2160,8 +2150,16 @@ alpha_legitimate_constant_p (machine_mode mode, rtx x) return SYMBOL_REF_TLS_MODEL (x) == 0; case CONST_WIDE_INT: + if (TARGET_BUILD_CONSTANTS) + return true; if (x == CONST0_RTX (mode)) return true; + mode = DImode; + gcc_assert (CONST_WIDE_INT_NUNITS (x) == 2); + i0 = CONST_WIDE_INT_ELT (x, 1); + if (alpha_emit_set_const_1 (NULL_RTX, mode, i0, 3, true) == NULL) + return false; + i0 = CONST_WIDE_INT_ELT (x, 0); goto do_integer; case CONST_DOUBLE: @@ -2176,14 +2174,14 @@ alpha_legitimate_constant_p (machine_mode mode, rtx x) return false; if (GET_MODE_SIZE (mode) != 8) return false; - goto do_integer; + /* FALLTHRU */ case CONST_INT: - do_integer: if (TARGET_BUILD_CONSTANTS) return true; i0 = alpha_extract_integer (x); - return alpha_emit_set_const_1 (x, mode, i0, 3, true) != NULL; + do_integer: + return alpha_emit_set_const_1 (NULL_RTX, mode, i0, 3, true) != NULL; default: return false; @@ -2248,8 +2246,6 @@ alpha_expand_mov (machine_mode mode, rtx *operands) /* Split large integers. */ if (CONST_INT_P (operands[1]) - || GET_CODE (operands[1]) == CONST_WIDE_INT - || GET_CODE (operands[1]) == CONST_DOUBLE || GET_CODE (operands[1]) == CONST_VECTOR) { if (alpha_split_const_mov (mode, operands)) -- 2.30.2