2005-09-05 J"orn Rennecke <joern.rennecke@st.com>
+ * rtl.h (gen_frame_mem, gen_tmp_stack_mem): Declare.
+ * emit-rtl.c (gen_frame_mem, gen_tmp_stack_mem): New functions.
+ * builtins.c (expand_builtin_return_addr): Use gen_frame_mem.
+
+2005-09-05 J"orn Rennecke <joern.rennecke@st.com>
+
PR target/23683
* sh.c (sh_reorg, emit_load_ptr): Use gen_const_mem.
(output_stack_adjust): Use gen_tmp_stack_mem.
* config/arm/arm.c (arm_legitimize_address): Limit the value passed
to bit_count to 32 bits.
-2005-09-02 J"orn Rennecke <joern.rennecke@st.com>
-
- * rtl.h (gen_frame_mem, gen_tmp_stack_mem): Declare.
- * emit-rtl.c (gen_frame_mem, gen_tmp_stack_mem): New functions.
- * builtins.c (expand_builtin_return_addr): Use gen_frame_mem.
-
2005-08-31 Mark Mitchell <mark@codesourcery.com>
PR c++/23167
tem = DYNAMIC_CHAIN_ADDRESS (tem);
#endif
tem = memory_address (Pmode, tem);
- tem = gen_rtx_MEM (Pmode, tem);
- set_mem_alias_set (tem, get_frame_alias_set ());
+ tem = gen_frame_mem (Pmode, tem);
tem = copy_to_reg (tem);
}
#else
tem = memory_address (Pmode,
plus_constant (tem, GET_MODE_SIZE (Pmode)));
- tem = gen_rtx_MEM (Pmode, tem);
- set_mem_alias_set (tem, get_frame_alias_set ());
+ tem = gen_frame_mem (Pmode, tem);
#endif
return tem;
}
return mem;
}
+/* Generate a MEM referring to fixed portions of the frame, e.g., register
+ save areas. */
+
+rtx
+gen_frame_mem (enum machine_mode mode, rtx addr)
+{
+ rtx mem = gen_rtx_MEM (mode, addr);
+ MEM_NOTRAP_P (mem) = 1;
+ set_mem_alias_set (mem, get_frame_alias_set ());
+ return mem;
+}
+
+/* Generate a MEM referring to a temporary use of the stack, not part
+ of the fixed stack frame. For example, something which is pushed
+ by a target splitter. */
+rtx
+gen_tmp_stack_mem (enum machine_mode mode, rtx addr)
+{
+ rtx mem = gen_rtx_MEM (mode, addr);
+ MEM_NOTRAP_P (mem) = 1;
+ if (!current_function_calls_alloca)
+ set_mem_alias_set (mem, get_frame_alias_set ());
+ return mem;
+}
+
/* We want to create (subreg:OMODE (obj:IMODE) OFFSET). Return true if
this construct would be valid, and false otherwise. */
extern void delete_insn_chain_and_edges (rtx, rtx);
extern rtx gen_lowpart_SUBREG (enum machine_mode, rtx);
extern rtx gen_const_mem (enum machine_mode, rtx);
+extern rtx gen_frame_mem (enum machine_mode, rtx);
+extern rtx gen_tmp_stack_mem (enum machine_mode, rtx);
extern bool validate_subreg (enum machine_mode, enum machine_mode,
rtx, unsigned int);