Patchwork [ARM] Call final_start_function and final_end_function in arm_output_mi_thunk.

login
register
mail settings
Submitter Ramana Radhakrishnan
Date Feb. 28, 2013, 10:27 a.m.
Message ID <512F3114.2020604@arm.com>
Download mbox | patch
Permalink /patch/223861/
State New
Headers show

Comments

Ramana Radhakrishnan - Feb. 28, 2013, 10:27 a.m.
Hi,

	Ports should call final_start_function and final_end_function to get 
proper debug info for the thunk as per 
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55257#c3 . Fixes failing 
tests in g++.dg for arm-*-*eabi.

Tested on arm-linux-gnueabi cross for armv7-a, arm/thumb2 and armv5t on 
qemu. Applied.

Thanks,
Ramana

2013-02-28  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	* config/arm/arm.c (arm_output_mi_thunk): Call final_start_function and 
final_end_function.


---
   gcc/config/arm/arm.c |    4 ++++
   1 file changed, 4 insertions(+)

Patch

diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 3e7bd7f..44fefb0 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -24314,6 +24314,8 @@  arm_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
   if (mi_delta < 0)
     mi_delta = - mi_delta;
 
+  final_start_function (emit_barrier (), file, 1);
+
   if (TARGET_THUMB1)
     {
       int labelno = thunk_label++;
@@ -24430,6 +24432,8 @@  arm_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
         fputs ("(PLT)", file);
       fputc ('\n', file);
     }
+
+  final_end_function ();
 }
 
 int