This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH,TARGET]PR21078,21080 Fix AVR builtin_return_address


Hi Andy.

+/* Current function stack size.  */
+static int stack_usage;

Move 'stack_usage' variable in 'machine_function' struct.


+rtx +avr_return_addr_rtx (int count, rtx tem)

Change type of 'tem' to const_rtx.


Index: avr.h
===================================================================
--- avr.h (revision 154058)
+++ avr.h (working copy)
@@ -367,9 +367,10 @@
 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET)   \
  OFFSET = avr_initial_elimination_offset (FROM, TO)

-#define RETURN_ADDR_RTX(count, x) \
-  gen_rtx_MEM (Pmode, memory_address (Pmode, plus_constant (tem, 1)))
+/* Return address is located at frame+stack size+1.  */
+#define RETURN_ADDR_RTX(count, tem) avr_return_addr_rtx (count, tem)

Move comment before RETURN_ADDR_RTX macro from avr.h to avr.c file.


Ok, with this changes.

Anatoly.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]