aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2001-10-23 18:51:18 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2001-10-23 14:51:18 -0400
commit8ac61af705335691fd0d91ec6cd96e65bb81201c (patch)
tree4f314d9fb9d201416fb3ebce0a67307306ae796f /gcc/config
parent6c36d76bf6521dd1cc09b8d7e379a02d138ffd53 (diff)
downloadgcc-8ac61af705335691fd0d91ec6cd96e65bb81201c.zip
gcc-8ac61af705335691fd0d91ec6cd96e65bb81201c.tar.gz
gcc-8ac61af705335691fd0d91ec6cd96e65bb81201c.tar.bz2
alias.c (can_address_p): Compnonents are not addressable if the containing type has alias set 0.
* alias.c (can_address_p): Compnonents are not addressable if the containing type has alias set 0. (get_alias_set): Rework to use STRIP_NOPS. Only call front-end routine on object, type, or object with NOPs stripped, not inner values. Use language hook to call front-end routine. * builtins.c (get_memory_rtx): Always call set_mem_attributes. (expand_builtin_apply): Call set_mem_align on MEMs we make. Don't pass alignment to emit_block_move. (expand_builtin_memcpy, expand_builtin_va_copy): Likewise. (expand_builtin_memset): Likewise, but for clear_storage. * c-common.c (lang_get_alias_set): Renamed to c_common_alias_set and remove C++ specific parts. * c-common.h (c_common_get_alias_set): Add declaration. * c-lang.c (LANG_HOOKS_GET_ALIAS_SET): New macro. * calls.c (emit_call_1): Fix typo in sibcall_pop case. (save_fixed_argument_area): Call set_mem_align. Remove alignment in call to emit_block_move. (emit_library_call_value_1, store_one_arg): Likewise. (target_for_arg): Remove; disabled long ago. * emit-rtl.c (set_mem_attributes): Rework to only call get_mem_attrs once and similar cleanups. (offset_address): Use proper introductory comment. * expr.c (emit_block_move): Use alignment from that of MEM args, not from explicit operand; all callers changed. (clear_storage): Likewise. (expand_assignment): Don't call set_mem_alias_set on to_rtx. (store_field): Remove kludge on alias set used for to_rtx. (highest_pow2_factor, case *_DIV_EXPR): Never return 0. (expand_expr_unaligned): Call set_mem_attributes instead of set_mem_alias_set. * expr.h (emit_block_move, clear_storage): Remove ALIGN argument. * function.c (assign_stack_temp_for_type): Set MEM alignment. (expand_function_end): Track MEM attributes of trampolines. * ifcvt.c (noce_try_cmove_arith): Set alignment of new MEM. * integrate.c (copy_rtx_and_substitute, case CALL): Copy memory attributes from original. * langhooks.c (lang_hook_default_get_alias_set): New function. (hook_get_alias_set_0): New function. * langhooks.h (hook_get_alias_set_0): New declaration. (lang_hook_default_get_alias_set): Likewise. (LANG_HOOKS_GET_ALIAS_SET): New macro; add to initializer. * reload1.c (alter_reg): Use adjust_address_nv. * rtl.c (get_mode_alignment): Moved to here. * rtl.h (MEM_ALIGN): Take default from mode, if not BLKmode, and change default if unknown from 1 to BITS_PER_UNIT. * stor-layout.c (get_mode_alignment): Remove from here. * toplev.h (struct lang_hoks): Add get_alias_set field. * tree.h (lang_get_alias_set): Delete declaration. * config/arc/arc.c (arc_setup_incoming_varags): Set MEM alignment. * config/i386/i386.c (ix86_setup_incoming_varargs): Likewise. (ix86_va_arg): Likewise. * config/i960/i960.c (i960_setup_incoming_varargs): Likewise. * config/pa/pa.c (hppa_builtin_saveregs): Likewise. * config/sparc/sparc.c (sparc_va_arg): Likewise. * config/rs6000/rs6000.c (setup_incoming_varargs): Likewise. (expand_block_move_mem): Remove dead code. * cp/cp-lang.c (cxx_get_alias_set): New function. Point LANG_HOOKS_GET_ALIAS_SET to it. * f/com.c (LANG_HOOKS_GET_ALIAS_SET): New macro. (lang_get_alias_set): Delete. * java/lang.c (lang_get_alias_set): Deleted. From-SVN: r46440
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/arc/arc.c1
-rw-r--r--gcc/config/i386/i386.c12
-rw-r--r--gcc/config/i960/i960.c1
-rw-r--r--gcc/config/pa/pa.c1
-rw-r--r--gcc/config/rs6000/rs6000.c20
-rw-r--r--gcc/config/sparc/sparc.c25
6 files changed, 34 insertions, 26 deletions
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 49b0f16..79586d0 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -813,6 +813,7 @@ arc_setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl)
FIRST_PARM_OFFSET (0)
+ align_slop * UNITS_PER_WORD));
set_mem_alias_set (regblock, get_varargs_alias_set ());
+ set_mem_align (regblock, BITS_PER_WORD);
move_block_from_reg (first_reg_offset, regblock,
MAX_ARC_PARM_REGS - first_reg_offset,
((MAX_ARC_PARM_REGS - first_reg_offset)
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 5291d9c..52e2414 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -2249,14 +2249,16 @@ ix86_setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl)
pointing 127 bytes after first byte to store - this is needed to keep
instruction size limited by 4 bytes. */
tmp_reg = gen_reg_rtx (Pmode);
- emit_insn (gen_rtx_SET(VOIDmode, tmp_reg,
- plus_constant (save_area, 8 * REGPARM_MAX + 127)));
+ emit_insn (gen_rtx_SET (VOIDmode, tmp_reg,
+ plus_constant (save_area,
+ 8 * REGPARM_MAX + 127)));
mem = gen_rtx_MEM (BLKmode, plus_constant (tmp_reg, -127));
set_mem_alias_set (mem, set);
+ set_mem_align (mem, BITS_PER_WORD);
/* And finally do the dirty job! */
- emit_insn (gen_sse_prologue_save (mem, nsse_reg, GEN_INT (next_cum.sse_regno),
- label));
+ emit_insn (gen_sse_prologue_save (mem, nsse_reg,
+ GEN_INT (next_cum.sse_regno), label));
}
}
@@ -2467,6 +2469,7 @@ ix86_va_arg (valist, type)
addr_rtx = XEXP (assign_temp (type, 0, 1, 0), 0);
mem = gen_rtx_MEM (BLKmode, addr_rtx);
set_mem_alias_set (mem, get_varargs_alias_set ());
+ set_mem_align (mem, BITS_PER_UNIT);
for (i = 0; i < XVECLEN (container, 0); i++)
{
@@ -2492,7 +2495,6 @@ ix86_va_arg (valist, type)
set_mem_alias_set (src_mem, get_varargs_alias_set ());
src_mem = adjust_address (src_mem, mode, src_offset);
dest_mem = adjust_address (mem, mode, INTVAL (XEXP (slot, 1)));
- PUT_MODE (dest_mem, mode);
emit_move_insn (dest_mem, src_mem);
}
}
diff --git a/gcc/config/i960/i960.c b/gcc/config/i960/i960.c
index 12b1548..8c7c8d4 100644
--- a/gcc/config/i960/i960.c
+++ b/gcc/config/i960/i960.c
@@ -2583,6 +2583,7 @@ i960_setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl)
regblock = gen_rtx_MEM (BLKmode,
plus_constant (arg_pointer_rtx, first_reg * 4));
set_mem_alias_set (regblock, get_varargs_alias_set ());
+ set_mem_align (regblock, BITS_PER_WORD);
move_block_from_reg (first_reg, regblock,
NPARM_REGS - first_reg,
(NPARM_REGS - first_reg) * UNITS_PER_WORD);
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index fa23eaa..593f085 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -4872,6 +4872,7 @@ hppa_builtin_saveregs ()
plus_constant (current_function_internal_arg_pointer,
-16));
set_mem_alias_set (dest, get_varargs_alias_set ());
+ set_mem_align (dest, BITS_PER_WORD);
move_block_from_reg (23, dest, 4, 4 * UNITS_PER_WORD);
/* move_block_from_reg will emit code to store the argument registers
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index a55459e..6e6f428 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -2499,6 +2499,7 @@ setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl)
plus_constant (save_area,
first_reg_offset * reg_size)),
set_mem_alias_set (mem, set);
+ set_mem_align (mem, BITS_PER_WORD);
move_block_from_reg
(GP_ARG_MIN_REG + first_reg_offset, mem,
@@ -2850,9 +2851,6 @@ expand_block_move_mem (mode, addr, orig_mem)
rtx mem = gen_rtx_MEM (mode, addr);
MEM_COPY_ATTRIBUTES (mem, orig_mem);
-#ifdef MEM_UNALIGNED_P
- MEM_UNALIGNED_P (mem) = MEM_UNALIGNED_P (orig_mem);
-#endif
return mem;
}
@@ -5697,12 +5695,16 @@ rs6000_return_addr (count, frame)
|| DEFAULT_ABI == ABI_AIX_NODESC)
{
cfun->machine->ra_needs_full_frame = 1;
- return gen_rtx_MEM (Pmode,
- memory_address (Pmode,
- plus_constant (copy_to_reg
- (gen_rtx_MEM (Pmode,
- memory_address (Pmode, frame))),
- RETURN_ADDRESS_OFFSET)));
+
+ return
+ gen_rtx_MEM
+ (Pmode,
+ memory_address
+ (Pmode,
+ plus_constant (copy_to_reg
+ (gen_rtx_MEM (Pmode,
+ memory_address (Pmode, frame))),
+ RETURN_ADDRESS_OFFSET)));
}
return get_hard_reg_initial_val (Pmode, LINK_REGISTER_REGNUM);
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 1af8c5f..1b64987 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -2811,8 +2811,8 @@ legitimize_pic_address (orig, mode, reg)
address = orig;
pic_ref = gen_rtx_MEM (Pmode,
- gen_rtx_PLUS (Pmode,
- pic_offset_table_rtx, address));
+ gen_rtx_PLUS (Pmode,
+ pic_offset_table_rtx, address));
current_function_uses_pic_offset_table = 1;
RTX_UNCHANGING_P (pic_ref) = 1;
insn = emit_move_insn (reg, pic_ref);
@@ -4833,17 +4833,18 @@ sparc_builtin_saveregs ()
for (regno = first_reg; regno < NPARM_REGS (word_mode); regno++)
emit_move_insn (gen_rtx_MEM (word_mode,
- gen_rtx_PLUS (Pmode,
- frame_pointer_rtx,
- GEN_INT (STACK_POINTER_OFFSET
- + UNITS_PER_WORD * regno))),
+ gen_rtx_PLUS (Pmode,
+ frame_pointer_rtx,
+ GEN_INT (STACK_POINTER_OFFSET
+ + (UNITS_PER_WORD
+ * regno)))),
gen_rtx_REG (word_mode,
- BASE_INCOMING_ARG_REG (word_mode) + regno));
+ BASE_INCOMING_ARG_REG (word_mode) + regno));
address = gen_rtx_PLUS (Pmode,
- frame_pointer_rtx,
- GEN_INT (STACK_POINTER_OFFSET
- + UNITS_PER_WORD * first_reg));
+ frame_pointer_rtx,
+ GEN_INT (STACK_POINTER_OFFSET
+ + UNITS_PER_WORD * first_reg));
if (current_function_check_memory_usage
&& first_reg < NPARM_REGS (word_mode))
@@ -4955,12 +4956,12 @@ sparc_va_arg (valist, type)
addr_rtx = force_reg (Pmode, addr_rtx);
addr_rtx = gen_rtx_MEM (BLKmode, addr_rtx);
set_mem_alias_set (addr_rtx, get_varargs_alias_set ());
+ set_mem_align (addr_rtx, BITS_PER_WORD);
tmp = shallow_copy_rtx (tmp);
PUT_MODE (tmp, BLKmode);
set_mem_alias_set (tmp, 0);
- dest_addr = emit_block_move (tmp, addr_rtx, GEN_INT (rsize),
- BITS_PER_WORD);
+ dest_addr = emit_block_move (tmp, addr_rtx, GEN_INT (rsize));
if (dest_addr != NULL_RTX)
addr_rtx = dest_addr;
else