public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix c6x unwinding info
@ 2011-10-03 15:58 Paul Brook
  2011-10-03 16:44 ` Bernd Schmidt
  2011-10-21 22:51 ` Bernd Schmidt
  0 siblings, 2 replies; 4+ messages in thread
From: Paul Brook @ 2011-10-03 15:58 UTC (permalink / raw)
  To: gcc-patches; +Cc: Bernd Schmidt

Patch below makes gcc emit the resuired assembly directives for c6x unwinding 
tables, same as ARM and IA64.  This fixes most of the unwinding related 
failures.

Tested on c6x-elf

Ok?

Paul

2011-10-03  Paul Brook  <paul@codesourcery.com>

	* config/c6x/c6x.c (c6x_asm_emit_except_personality,
	c6x_asm_init_sections): New functions.
	(TARGET_ASM_EMIT_EXCEPT_PERSONALITY, TARGET_ASM_INIT_SECTIONS):
	Define.

Index: gcc/config/c6x/c6x.c
===================================================================
--- gcc/config/c6x/c6x.c	(revision 179178)
+++ gcc/config/c6x/c6x.c	(working copy)
@@ -5625,6 +5625,26 @@ c6x_debug_unwind_info (void)
 
   return default_debug_unwind_info ();
 }
+
+/* Implement TARGET_ASM_EMIT_EXCEPT_PERSONALITY.  */
+
+static void
+c6x_asm_emit_except_personality (rtx personality)
+{
+  fputs ("\t.personality\t", asm_out_file);
+  output_addr_const (asm_out_file, personality);
+  fputc ('\n', asm_out_file);
+}
+
+/* Use a special assembly directive rather than a regular setion for
+   unwind table data.  */
+
+static void
+c6x_asm_init_sections (void)
+{
+  exception_section = get_unnamed_section (0, output_section_asm_op,
+					   "\t.handlerdata");
+}
 \f
 /* Target Structure.  */
 
@@ -5769,6 +5789,12 @@ c6x_debug_unwind_info (void)
 #undef TARGET_ARM_EABI_UNWINDER
 #define TARGET_ARM_EABI_UNWINDER true
 
+#undef TARGET_ASM_EMIT_EXCEPT_PERSONALITY
+#define TARGET_ASM_EMIT_EXCEPT_PERSONALITY c6x_asm_emit_except_personality
+
+#undef TARGET_ASM_INIT_SECTIONS
+#define TARGET_ASM_INIT_SECTIONS c6x_asm_init_sections
+
 #undef TARGET_DEBUG_UNWIND_INFO
 #define TARGET_DEBUG_UNWIND_INFO  c6x_debug_unwind_info
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix c6x unwinding info
  2011-10-03 15:58 [PATCH] Fix c6x unwinding info Paul Brook
@ 2011-10-03 16:44 ` Bernd Schmidt
  2011-10-03 17:27   ` Paul Brook
  2011-10-21 22:51 ` Bernd Schmidt
  1 sibling, 1 reply; 4+ messages in thread
From: Bernd Schmidt @ 2011-10-03 16:44 UTC (permalink / raw)
  To: Paul Brook; +Cc: gcc-patches

On 10/03/11 17:57, Paul Brook wrote:
> Patch below makes gcc emit the resuired assembly directives for c6x unwinding 
> tables, same as ARM and IA64.  This fixes most of the unwinding related 
> failures.

Most?

> 	* config/c6x/c6x.c (c6x_asm_emit_except_personality,
> 	c6x_asm_init_sections): New functions.
> 	(TARGET_ASM_EMIT_EXCEPT_PERSONALITY, TARGET_ASM_INIT_SECTIONS):
> 	Define.

Ok.


Bernd

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix c6x unwinding info
  2011-10-03 16:44 ` Bernd Schmidt
@ 2011-10-03 17:27   ` Paul Brook
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Brook @ 2011-10-03 17:27 UTC (permalink / raw)
  To: Bernd Schmidt; +Cc: gcc-patches

> On 10/03/11 17:57, Paul Brook wrote:
> > Patch below makes gcc emit the resuired assembly directives for c6x
> > unwinding tables, same as ARM and IA64.  This fixes most of the
> > unwinding related failures.
> 
> Most?

There are a number of failures in g++.dg/torture/stackalign which appear to be 
EH related.  I'm still investigating the exact cause.

Paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix c6x unwinding info
  2011-10-03 15:58 [PATCH] Fix c6x unwinding info Paul Brook
  2011-10-03 16:44 ` Bernd Schmidt
@ 2011-10-21 22:51 ` Bernd Schmidt
  1 sibling, 0 replies; 4+ messages in thread
From: Bernd Schmidt @ 2011-10-21 22:51 UTC (permalink / raw)
  To: Paul Brook; +Cc: gcc-patches

On 10/03/11 17:57, Paul Brook wrote:
> 2011-10-03  Paul Brook  <paul@codesourcery.com>
> 
> 	* config/c6x/c6x.c (c6x_asm_emit_except_personality,
> 	c6x_asm_init_sections): New functions.
> 	(TARGET_ASM_EMIT_EXCEPT_PERSONALITY, TARGET_ASM_INIT_SECTIONS):
> 	Define.

This was also never applied. I've committed it.


Bernd

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-10-21 21:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-03 15:58 [PATCH] Fix c6x unwinding info Paul Brook
2011-10-03 16:44 ` Bernd Schmidt
2011-10-03 17:27   ` Paul Brook
2011-10-21 22:51 ` Bernd Schmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).