From: Richard Henderson Date: Mon, 18 Feb 2002 01:07:52 +0000 (-0800) Subject: alpha.c (some_small_symbolic_operand, [...]): Rename from *symbolic_mem_op*. X-Git-Tag: prereleases/libstdc++-3.0.97~320 X-Git-Url: https://gcc.gnu.org/git/?a=commitdiff_plain;ds=sidebyside;h=a615ca3e76df2e5c9339be12602306e53370a112;p=gcc.git alpha.c (some_small_symbolic_operand, [...]): Rename from *symbolic_mem_op*. * config/alpha/alpha.c (some_small_symbolic_operand, some_small_symbolic_operand_1, split_small_symbolic_operand, split_small_symbolic_operand_1): Rename from *symbolic_mem_op*. Handle small SYMBOL_REFs anywhere, not just inside memories. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (PREDICATE_CODES): Update. * config/alpha/alpha.md (small symbolic operand splitter): Update. From-SVN: r49827 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dfaf6bcd2208..e1b054cde429 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2002-02-17 Richard Henderson + + * config/alpha/alpha.c (some_small_symbolic_operand, + some_small_symbolic_operand_1, split_small_symbolic_operand, + split_small_symbolic_operand_1): Rename from *symbolic_mem_op*. + Handle small SYMBOL_REFs anywhere, not just inside memories. + * config/alpha/alpha-protos.h: Update. + * config/alpha/alpha.h (PREDICATE_CODES): Update. + * config/alpha/alpha.md (small symbolic operand splitter): Update. + 2002-02-17 Roland McGrath * config.gcc (powerpc-*-gnu-gnualtivec*, diff --git a/gcc/config/alpha/alpha-protos.h b/gcc/config/alpha/alpha-protos.h index 957e5d9c7730..c6fdd042242e 100644 --- a/gcc/config/alpha/alpha-protos.h +++ b/gcc/config/alpha/alpha-protos.h @@ -59,7 +59,7 @@ extern int current_file_function_operand PARAMS ((rtx, enum machine_mode)); extern int direct_call_operand PARAMS ((rtx, enum machine_mode)); extern int local_symbolic_operand PARAMS ((rtx, enum machine_mode)); extern int small_symbolic_operand PARAMS ((rtx, enum machine_mode)); -extern int some_small_symbolic_mem_operand PARAMS ((rtx, enum machine_mode)); +extern int some_small_symbolic_operand PARAMS ((rtx, enum machine_mode)); extern int global_symbolic_operand PARAMS ((rtx, enum machine_mode)); extern int call_operand PARAMS ((rtx, enum machine_mode)); extern int symbolic_operand PARAMS ((rtx, enum machine_mode)); @@ -90,7 +90,7 @@ extern rtx alpha_legitimize_address PARAMS ((rtx, rtx, enum machine_mode)); extern rtx alpha_legitimize_reload_address PARAMS ((rtx, enum machine_mode, int, int, int)); -extern rtx split_small_symbolic_mem_operand PARAMS ((rtx)); +extern rtx split_small_symbolic_operand PARAMS ((rtx)); extern void get_aligned_mem PARAMS ((rtx, rtx *, rtx *)); extern rtx get_unaligned_address PARAMS ((rtx, int)); diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 3fb7cf8fc439..0f4bd14eca3c 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -117,9 +117,9 @@ int alpha_this_gpdisp_sequence_number; /* Declarations of static functions. */ static bool decl_in_text_section PARAMS ((tree)); -static int some_small_symbolic_mem_operand_1 +static int some_small_symbolic_operand_1 PARAMS ((rtx *, void *)); -static int split_small_symbolic_mem_operand_1 +static int split_small_symbolic_operand_1 PARAMS ((rtx *, void *)); static bool local_symbol_p PARAMS ((rtx)); @@ -1875,61 +1875,55 @@ alpha_legitimize_address (x, scratch, mode) so that sched2 has the proper dependency information. */ int -some_small_symbolic_mem_operand (x, mode) +some_small_symbolic_operand (x, mode) rtx x; enum machine_mode mode ATTRIBUTE_UNUSED; { - return for_each_rtx (&x, some_small_symbolic_mem_operand_1, NULL); + return for_each_rtx (&x, some_small_symbolic_operand_1, NULL); } static int -some_small_symbolic_mem_operand_1 (px, data) +some_small_symbolic_operand_1 (px, data) rtx *px; void *data ATTRIBUTE_UNUSED; { rtx x = *px; - if (GET_CODE (x) != MEM) - return 0; - x = XEXP (x, 0); - - /* If this is an ldq_u type address, discard the outer AND. */ - if (GET_CODE (x) == AND) - x = XEXP (x, 0); + /* Don't re-split. */ + if (GET_CODE (x) == LO_SUM) + return -1; - return small_symbolic_operand (x, Pmode) ? 1 : -1; + return small_symbolic_operand (x, Pmode) != 0; } rtx -split_small_symbolic_mem_operand (x) +split_small_symbolic_operand (x) rtx x; { x = copy_insn (x); - for_each_rtx (&x, split_small_symbolic_mem_operand_1, NULL); + for_each_rtx (&x, split_small_symbolic_operand_1, NULL); return x; } static int -split_small_symbolic_mem_operand_1 (px, data) +split_small_symbolic_operand_1 (px, data) rtx *px; void *data ATTRIBUTE_UNUSED; { rtx x = *px; - if (GET_CODE (x) != MEM) - return 0; - - px = &XEXP (x, 0), x = *px; - if (GET_CODE (x) == AND) - px = &XEXP (x, 0), x = *px; + /* Don't re-split. */ + if (GET_CODE (x) == LO_SUM) + return -1; if (small_symbolic_operand (x, Pmode)) { x = gen_rtx_LO_SUM (Pmode, pic_offset_table_rtx, x); *px = x; + return -1; } - return -1; + return 0; } /* Try a machine-dependent way of reloading an illegitimate address diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h index 99ef24ea9769..b2363bc1e4d3 100644 --- a/gcc/config/alpha/alpha.h +++ b/gcc/config/alpha/alpha.h @@ -2073,7 +2073,8 @@ do { \ {"reg_no_subreg_operand", {REG}}, \ {"addition_operation", {PLUS}}, \ {"symbolic_operand", {SYMBOL_REF, LABEL_REF, CONST}}, \ - {"some_small_symbolic_mem_operand", {SET, PARALLEL}}, + {"some_small_symbolic_operand", {SET, PARALLEL, PREFETCH, UNSPEC, \ + UNSPEC_VOLATILE}}, /* Define the `__builtin_va_list' type for the ABI. */ #define BUILD_VA_LIST_TYPE(VALIST) \ diff --git a/gcc/config/alpha/alpha.md b/gcc/config/alpha/alpha.md index 2ca89840ae56..48ac0f775774 100644 --- a/gcc/config/alpha/alpha.md +++ b/gcc/config/alpha/alpha.md @@ -5523,10 +5523,10 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi" "operands[2] = pic_offset_table_rtx;") (define_split - [(match_operand 0 "some_small_symbolic_mem_operand" "")] + [(match_operand 0 "some_small_symbolic_operand" "")] "TARGET_EXPLICIT_RELOCS && reload_completed" [(match_dup 0)] - "operands[0] = split_small_symbolic_mem_operand (operands[0]);") + "operands[0] = split_small_symbolic_operand (operands[0]);") (define_insn "movdi_er_high_g" [(set (match_operand:DI 0 "register_operand" "=r")