generic-poky/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0037-config-alpha-alpha.c-a...

180 lines
7.1 KiB
Diff

Upstream-Status: Inappropriate [Backport]
From 14fb9260e8c94249305dba567e7e242ac3d30fa7 Mon Sep 17 00:00:00 2001
From: uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Tue, 29 Mar 2011 18:24:02 +0000
Subject: [PATCH 037/200] * config/alpha/alpha.c (alpha_sr_alias_set): Don't define.
(alpha_option_override): Don't set alpha_sr_alias_set.
(emit_frame_store_1): Use gen_frame_mem rather than calling
set_mem_alias_set.
(alpha_expand_epilogue): Ditto.
(unicosmk_gen_dsib): Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@171686 138bc75d-0d04-0410-961f-82ee72b054a4
index c1036b4..3da7fa0 100644
index 76ab31a..b41404e 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -94,10 +94,6 @@ int alpha_memory_latency = 3;
static int alpha_function_needs_gp;
-/* The alias set for prologue/epilogue register save/restore. */
-
-static GTY(()) alias_set_type alpha_sr_alias_set;
-
/* The assembler name of the current function. */
static const char *alpha_fnname;
@@ -510,9 +506,6 @@ alpha_option_override (void)
if (align_functions <= 0)
align_functions = 16;
- /* Acquire a unique set number for our register saves and restores. */
- alpha_sr_alias_set = new_alias_set ();
-
/* Register variables and functions with the garbage collector. */
/* Set up function hooks. */
@@ -7715,8 +7708,7 @@ emit_frame_store_1 (rtx value, rtx base_reg, HOST_WIDE_INT frame_bias,
rtx addr, mem, insn;
addr = plus_constant (base_reg, base_ofs);
- mem = gen_rtx_MEM (DImode, addr);
- set_mem_alias_set (mem, alpha_sr_alias_set);
+ mem = gen_frame_mem (DImode, addr);
insn = emit_move_insn (mem, value);
RTX_FRAME_RELATED_P (insn) = 1;
@@ -8391,9 +8383,7 @@ alpha_expand_epilogue (void)
/* Restore registers in order, excepting a true frame pointer. */
- mem = gen_rtx_MEM (DImode, plus_constant (sa_reg, reg_offset));
- if (! eh_ofs)
- set_mem_alias_set (mem, alpha_sr_alias_set);
+ mem = gen_frame_mem (DImode, plus_constant (sa_reg, reg_offset));
reg = gen_rtx_REG (DImode, REG_RA);
emit_move_insn (reg, mem);
cfa_restores = alloc_reg_note (REG_CFA_RESTORE, reg, cfa_restores);
@@ -8408,8 +8398,8 @@ alpha_expand_epilogue (void)
fp_offset = reg_offset;
else
{
- mem = gen_rtx_MEM (DImode, plus_constant(sa_reg, reg_offset));
- set_mem_alias_set (mem, alpha_sr_alias_set);
+ mem = gen_frame_mem (DImode,
+ plus_constant (sa_reg, reg_offset));
reg = gen_rtx_REG (DImode, i);
emit_move_insn (reg, mem);
cfa_restores = alloc_reg_note (REG_CFA_RESTORE, reg,
@@ -8421,8 +8411,7 @@ alpha_expand_epilogue (void)
for (i = 0; i < 31; ++i)
if (fmask & (1UL << i))
{
- mem = gen_rtx_MEM (DFmode, plus_constant(sa_reg, reg_offset));
- set_mem_alias_set (mem, alpha_sr_alias_set);
+ mem = gen_frame_mem (DFmode, plus_constant (sa_reg, reg_offset));
reg = gen_rtx_REG (DFmode, i+32);
emit_move_insn (reg, mem);
cfa_restores = alloc_reg_note (REG_CFA_RESTORE, reg, cfa_restores);
@@ -8438,9 +8427,9 @@ alpha_expand_epilogue (void)
for (i = 9; i < 15; i++)
if (imask & (1UL << i))
{
- mem = gen_rtx_MEM (DImode, plus_constant(hard_frame_pointer_rtx,
- reg_offset));
- set_mem_alias_set (mem, alpha_sr_alias_set);
+ mem = gen_frame_mem (DImode,
+ plus_constant (hard_frame_pointer_rtx,
+ reg_offset));
reg = gen_rtx_REG (DImode, i);
emit_move_insn (reg, mem);
cfa_restores = alloc_reg_note (REG_CFA_RESTORE, reg, cfa_restores);
@@ -8450,9 +8439,9 @@ alpha_expand_epilogue (void)
for (i = 2; i < 10; i++)
if (fmask & (1UL << i))
{
- mem = gen_rtx_MEM (DFmode, plus_constant(hard_frame_pointer_rtx,
- reg_offset));
- set_mem_alias_set (mem, alpha_sr_alias_set);
+ mem = gen_frame_mem (DFmode,
+ plus_constant (hard_frame_pointer_rtx,
+ reg_offset));
reg = gen_rtx_REG (DFmode, i+32);
emit_move_insn (reg, mem);
cfa_restores = alloc_reg_note (REG_CFA_RESTORE, reg, cfa_restores);
@@ -8460,8 +8449,7 @@ alpha_expand_epilogue (void)
}
/* Restore the return address from the DSIB. */
- mem = gen_rtx_MEM (DImode, plus_constant (hard_frame_pointer_rtx, -8));
- set_mem_alias_set (mem, alpha_sr_alias_set);
+ mem = gen_frame_mem (DImode, plus_constant (hard_frame_pointer_rtx, -8));
reg = gen_rtx_REG (DImode, REG_RA);
emit_move_insn (reg, mem);
cfa_restores = alloc_reg_note (REG_CFA_RESTORE, reg, cfa_restores);
@@ -8524,9 +8512,8 @@ alpha_expand_epilogue (void)
if (TARGET_ABI_UNICOSMK)
{
emit_insn (gen_blockage ());
- mem = gen_rtx_MEM (DImode,
- plus_constant (hard_frame_pointer_rtx, -16));
- set_mem_alias_set (mem, alpha_sr_alias_set);
+ mem = gen_frame_mem (DImode,
+ plus_constant (hard_frame_pointer_rtx, -16));
emit_move_insn (hard_frame_pointer_rtx, mem);
cfa_restores = alloc_reg_note (REG_CFA_RESTORE,
hard_frame_pointer_rtx, cfa_restores);
@@ -8534,8 +8521,7 @@ alpha_expand_epilogue (void)
else if (fp_is_frame_pointer)
{
emit_insn (gen_blockage ());
- mem = gen_rtx_MEM (DImode, plus_constant (sa_reg, fp_offset));
- set_mem_alias_set (mem, alpha_sr_alias_set);
+ mem = gen_frame_mem (DImode, plus_constant (sa_reg, fp_offset));
emit_move_insn (hard_frame_pointer_rtx, mem);
cfa_restores = alloc_reg_note (REG_CFA_RESTORE,
hard_frame_pointer_rtx, cfa_restores);
@@ -10515,15 +10501,13 @@ unicosmk_gen_dsib (unsigned long *imaskP)
/* Save the return address. */
- mem = gen_rtx_MEM (DImode, plus_constant (stack_pointer_rtx, 56));
- set_mem_alias_set (mem, alpha_sr_alias_set);
+ mem = gen_frame_mem (DImode, plus_constant (stack_pointer_rtx, 56));
FRP (emit_move_insn (mem, gen_rtx_REG (DImode, REG_RA)));
(*imaskP) &= ~(1UL << REG_RA);
/* Save the old frame pointer. */
- mem = gen_rtx_MEM (DImode, plus_constant (stack_pointer_rtx, 48));
- set_mem_alias_set (mem, alpha_sr_alias_set);
+ mem = gen_frame_mem (DImode, plus_constant (stack_pointer_rtx, 48));
FRP (emit_move_insn (mem, hard_frame_pointer_rtx));
(*imaskP) &= ~(1UL << HARD_FRAME_POINTER_REGNUM);
@@ -10532,8 +10516,7 @@ unicosmk_gen_dsib (unsigned long *imaskP)
/* Store the SSIB pointer. */
ssib_name = ggc_strdup (unicosmk_ssib_name ());
- mem = gen_rtx_MEM (DImode, plus_constant (stack_pointer_rtx, 32));
- set_mem_alias_set (mem, alpha_sr_alias_set);
+ mem = gen_frame_mem (DImode, plus_constant (stack_pointer_rtx, 32));
FRP (emit_move_insn (gen_rtx_REG (DImode, 5),
gen_rtx_SYMBOL_REF (Pmode, ssib_name)));
@@ -10541,8 +10524,7 @@ unicosmk_gen_dsib (unsigned long *imaskP)
/* Save the CIW index. */
- mem = gen_rtx_MEM (DImode, plus_constant (stack_pointer_rtx, 24));
- set_mem_alias_set (mem, alpha_sr_alias_set);
+ mem = gen_frame_mem (DImode, plus_constant (stack_pointer_rtx, 24));
FRP (emit_move_insn (mem, gen_rtx_REG (DImode, 25)));
emit_insn (gen_blockage ());
--
1.7.0.4