public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Re: [rfa] ARM .cfi_* support
       [not found] <20040409210142.GA31470@nevyn.them.org>
@ 2004-04-22 16:32 ` Daniel Jacobowitz
  2004-04-22 17:02   ` Richard Earnshaw
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2004-04-22 16:32 UTC (permalink / raw)
  To: binutils; +Cc: Richard Earnshaw, Nick Clifton

On Fri, Apr 09, 2004 at 05:01:42PM -0400, Daniel Jacobowitz wrote:
> This has been kicking around in my tree for a while now.  It adds support
> for the .cfi_* directives, using the standard or FPA registers - I didn't
> bother adding any of the other coprocessor registers, since their numbering
> is still a little unclear, and usually the general purpose registers are all
> you need.
> 
> Tested on arm-elf.  OK?

Ping?

> 2004-04-09  Daniel Jacobowitz  <drow@mvista.com>
> 
> 	* Makefile.am: Run dep-am.
> 	* aclocal.m4: Regenerate with automake 1.8.3.
> 	* Makefile.in: Regenerate with automake 1.8.3.
> 	* doc/Makefile.in: Likewise.
> 
> 	* config/tc-arm.c: Include "dw2gencfi.h".
> 	(tc_arm_regname_to_dw2regnum, tc_arm_frame_initial_instructions):
> 	New functions.
> 	* config/tc-arm.h (TARGET_USE_CFIPOP, DWARF2_DEFAULT_RETURN_COLUMN)
> 	(DWARF2_CIE_DATA_ALIGNMENT, tc_regname_to_dw2regnum)
> 	(tc_cfi_frame_initial_instructions): Define.
> 	(tc_arm_regname_to_dw2regnum, tc_arm_frame_initial_instructions):
> 	Add prototypes.
> 
> 2004-04-09  Daniel Jacobowitz  <drow@mvista.com>
> 
> 	* gas/cfi/cfi-arm-1.d, gas/cfi/cfi-arm-1.s: New files.
> 	* gas/cfi/cfi.exp: Run cfi-arm-1 test.
> 
> Index: gas/Makefile.am
> ===================================================================
> RCS file: /big/fsf/rsync/src-cvs/src/gas/Makefile.am,v
> retrieving revision 1.86
> diff -u -p -r1.86 Makefile.am
> --- gas/Makefile.am	19 Mar 2004 07:05:54 -0000	1.86
> +++ gas/Makefile.am	9 Apr 2004 20:54:09 -0000
> @@ -1027,7 +1027,8 @@ DEPTC_arm_elf = $(INCDIR)/symcat.h $(src
>    $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
>    $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arm.h \
>    $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
> -  $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
> +  $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h \
> +  dw2gencfi.h $(INCDIR)/elf/dwarf2.h
>  DEPTC_avr_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
>    $(srcdir)/config/tc-avr.h $(INCDIR)/coff/internal.h \
>    $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
> Index: gas/config/tc-arm.c
> ===================================================================
> RCS file: /big/fsf/rsync/src-cvs/src/gas/config/tc-arm.c,v
> retrieving revision 1.165
> diff -u -p -r1.165 tc-arm.c
> --- gas/config/tc-arm.c	30 Mar 2004 08:53:05 -0000	1.165
> +++ gas/config/tc-arm.c	9 Apr 2004 20:25:53 -0000
> @@ -39,6 +39,7 @@
>  #ifdef OBJ_ELF
>  #include "elf/arm.h"
>  #include "dwarf2dbg.h"
> +#include "dw2gencfi.h"
>  #endif
>  
>  /* XXX Set this to 1 after the next binutils release */
> @@ -14365,3 +14366,27 @@ arm_init_frag (fragP)
>    /* Record whether this frag is in an ARM or a THUMB area.  */
>    fragP->tc_frag_data = thumb_mode;
>  }
> +
> +#ifdef OBJ_ELF
> +int
> +tc_arm_regname_to_dw2regnum (const char *regname)
> +{
> +  unsigned int i;
> +
> +  for (i = 0; rn_table[i].name; i++)
> +    if (strcmp (regname, rn_table[i].name) == 0)
> +      return rn_table[i].number;
> +
> +  for (i = 0; fn_table[i].name; i++)
> +    if (strcmp (regname, fn_table[i].name) == 0)
> +      return fn_table[i].number + 16;
> +
> +  return -1;
> +}
> +
> +void
> +tc_arm_frame_initial_instructions (void)
> +{
> +  cfi_add_CFA_def_cfa (REG_SP, 0);
> +}
> +#endif
> Index: gas/config/tc-arm.h
> ===================================================================
> RCS file: /big/fsf/rsync/src-cvs/src/gas/config/tc-arm.h,v
> retrieving revision 1.21
> diff -u -p -r1.21 tc-arm.h
> --- gas/config/tc-arm.h	21 Nov 2003 00:24:40 -0000	1.21
> +++ gas/config/tc-arm.h	9 Apr 2004 20:25:53 -0000
> @@ -223,3 +223,17 @@ extern void arm_handle_align PARAMS ((st
>        goto LABEL;								\
>      }
>  extern void arm_frag_align_code PARAMS ((int, int));
> +
> +/* We want .cfi_* pseudo-ops for generating unwind info.  */
> +#define TARGET_USE_CFIPOP 1
> +
> +/* The lr register is r14.  */
> +#define DWARF2_DEFAULT_RETURN_COLUMN 14
> +
> +#define DWARF2_CIE_DATA_ALIGNMENT -4
> +
> +#define tc_regname_to_dw2regnum tc_arm_regname_to_dw2regnum
> +extern int tc_arm_regname_to_dw2regnum PARAMS ((const char *regname));
> +
> +#define tc_cfi_frame_initial_instructions tc_arm_frame_initial_instructions
> +extern void tc_arm_frame_initial_instructions PARAMS ((void));
> Index: gas/testsuite/gas/cfi/cfi-arm-1.d
> ===================================================================
> RCS file: gas/testsuite/gas/cfi/cfi-arm-1.d
> diff -N gas/testsuite/gas/cfi/cfi-arm-1.d
> --- /dev/null	1 Jan 1970 00:00:00 -0000
> +++ gas/testsuite/gas/cfi/cfi-arm-1.d	9 Apr 2004 20:44:18 -0000
> @@ -0,0 +1,27 @@
> +#readelf: -wf
> +#name: CFI on ARM
> +
> +The section .eh_frame contains:
> +
> +00000000 00000010 00000000 CIE
> +  Version:               1
> +  Augmentation:          "zR"
> +  Code alignment factor: 2
> +  Data alignment factor: -4
> +  Return address column: 14
> +  Augmentation data:     1b
> +
> +  DW_CFA_def_cfa: r13 ofs 0
> +
> +00000014 00000020 00000018 FDE cie=00000000 pc=0000001c..00000034
> +  DW_CFA_advance_loc: 4 to 00000020
> +  DW_CFA_def_cfa: r12 ofs 0
> +  DW_CFA_advance_loc: 4 to 00000024
> +  DW_CFA_def_cfa: r13 ofs 16
> +  DW_CFA_advance_loc: 4 to 00000028
> +  DW_CFA_def_cfa_offset: 32
> +  DW_CFA_offset: r11 at cfa-32
> +  DW_CFA_offset: r14 at cfa-24
> +  DW_CFA_advance_loc: 4 to 0000002c
> +  DW_CFA_def_cfa: r11 ofs 16
> +
> Index: gas/testsuite/gas/cfi/cfi-arm-1.s
> ===================================================================
> RCS file: gas/testsuite/gas/cfi/cfi-arm-1.s
> diff -N gas/testsuite/gas/cfi/cfi-arm-1.s
> --- /dev/null	1 Jan 1970 00:00:00 -0000
> +++ gas/testsuite/gas/cfi/cfi-arm-1.s	9 Apr 2004 20:48:55 -0000
> @@ -0,0 +1,23 @@
> +#; $ as -o test.o gas-cfi-test.s && gcc -nostdlib -o test test.o
> +
> +	.file   "a.c"
> +	.text
> +	.align 2
> +	.global foo
> +	.type   foo, %function
> +foo:
> +	.cfi_startproc
> +	mov	ip, sp
> +	.cfi_def_cfa ip, 0
> +	stmfd	sp!, {r0, r1, r2, r3}
> +	.cfi_def_cfa sp, 16
> +	stmfd	sp!, {fp, ip, lr, pc}
> +	.cfi_adjust_cfa_offset 16
> +	.cfi_rel_offset r11, 0
> +	.cfi_rel_offset lr, 8
> +	sub	fp, ip, #20
> +	.cfi_def_cfa fp, 16
> +	nop
> +	ldmea	fp, {fp, sp, pc}
> +	.cfi_endproc
> +	.size   foo, .-foo
> Index: gas/testsuite/gas/cfi/cfi.exp
> ===================================================================
> RCS file: /big/fsf/rsync/src-cvs/src/gas/testsuite/gas/cfi/cfi.exp,v
> retrieving revision 1.11
> diff -u -p -r1.11 cfi.exp
> --- gas/testsuite/gas/cfi/cfi.exp	18 Mar 2004 00:49:23 -0000	1.11
> +++ gas/testsuite/gas/cfi/cfi.exp	9 Apr 2004 20:38:33 -0000
> @@ -56,6 +56,9 @@ if [istarget "x86_64-*"] then {
>  	run_dump_test "cfi-sh-1"
>      }
>  
> +} elseif { [istarget "arm*-*"] || [istarget "xscale*-*"] } then {
> +    run_dump_test "cfi-arm-1"
> +
>  } else {
>      return
>  }
> 

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

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

* Re: [rfa] ARM .cfi_* support
  2004-04-22 16:32 ` [rfa] ARM .cfi_* support Daniel Jacobowitz
@ 2004-04-22 17:02   ` Richard Earnshaw
  2004-04-22 17:37     ` Daniel Jacobowitz
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Earnshaw @ 2004-04-22 17:02 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: binutils, Nick Clifton

On Thu, 2004-04-22 at 17:31, Daniel Jacobowitz wrote:
> On Fri, Apr 09, 2004 at 05:01:42PM -0400, Daniel Jacobowitz wrote:
> > This has been kicking around in my tree for a while now.  It adds support
> > for the .cfi_* directives, using the standard or FPA registers - I didn't
> > bother adding any of the other coprocessor registers, since their numbering
> > is still a little unclear, and usually the general purpose registers are all
> > you need.
> > 
> > Tested on arm-elf.  OK?
> 
> Ping?

Sorry, missed this one (if you will post messages on a UK public
holiday...)

I think that we should be looking to move to the EABI DWARF register
numbers soon (http://www.arm.com/products/DevTools/abi/aadwarf.pdf).  I
would rather that we didn't introduce new uses of the old register
numbering schemes. 

R.

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

* Re: [rfa] ARM .cfi_* support
  2004-04-22 17:02   ` Richard Earnshaw
@ 2004-04-22 17:37     ` Daniel Jacobowitz
  2004-05-03 17:20       ` Daniel Jacobowitz
  2004-10-23 18:29       ` Daniel Jacobowitz
  0 siblings, 2 replies; 7+ messages in thread
From: Daniel Jacobowitz @ 2004-04-22 17:37 UTC (permalink / raw)
  To: Richard Earnshaw; +Cc: binutils, Nick Clifton

On Thu, Apr 22, 2004 at 05:47:57PM +0100, Richard Earnshaw wrote:
> On Thu, 2004-04-22 at 17:31, Daniel Jacobowitz wrote:
> > On Fri, Apr 09, 2004 at 05:01:42PM -0400, Daniel Jacobowitz wrote:
> > > This has been kicking around in my tree for a while now.  It adds support
> > > for the .cfi_* directives, using the standard or FPA registers - I didn't
> > > bother adding any of the other coprocessor registers, since their numbering
> > > is still a little unclear, and usually the general purpose registers are all
> > > you need.
> > > 
> > > Tested on arm-elf.  OK?
> > 
> > Ping?
> 
> Sorry, missed this one (if you will post messages on a UK public
> holiday...)
> 
> I think that we should be looking to move to the EABI DWARF register
> numbers soon (http://www.arm.com/products/DevTools/abi/aadwarf.pdf).  I
> would rather that we didn't introduce new uses of the old register
> numbering schemes. 

In that case, would the patch be OK without the FPA registers?  I only
have actual need for the core integer registers.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

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

* Re: [rfa] ARM .cfi_* support
  2004-04-22 17:37     ` Daniel Jacobowitz
@ 2004-05-03 17:20       ` Daniel Jacobowitz
  2004-09-19 15:37         ` Daniel Jacobowitz
  2004-10-23 18:29       ` Daniel Jacobowitz
  1 sibling, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2004-05-03 17:20 UTC (permalink / raw)
  To: Richard Earnshaw, binutils, Nick Clifton

On Thu, Apr 22, 2004 at 01:05:00PM -0400, Daniel Jacobowitz wrote:
> On Thu, Apr 22, 2004 at 05:47:57PM +0100, Richard Earnshaw wrote:
> > On Thu, 2004-04-22 at 17:31, Daniel Jacobowitz wrote:
> > > On Fri, Apr 09, 2004 at 05:01:42PM -0400, Daniel Jacobowitz wrote:
> > > > This has been kicking around in my tree for a while now.  It adds support
> > > > for the .cfi_* directives, using the standard or FPA registers - I didn't
> > > > bother adding any of the other coprocessor registers, since their numbering
> > > > is still a little unclear, and usually the general purpose registers are all
> > > > you need.
> > > > 
> > > > Tested on arm-elf.  OK?
> > > 
> > > Ping?
> > 
> > Sorry, missed this one (if you will post messages on a UK public
> > holiday...)
> > 
> > I think that we should be looking to move to the EABI DWARF register
> > numbers soon (http://www.arm.com/products/DevTools/abi/aadwarf.pdf).  I
> > would rather that we didn't introduce new uses of the old register
> > numbering schemes. 
> 
> In that case, would the patch be OK without the FPA registers?  I only
> have actual need for the core integer registers.

Ping?

-- 
Daniel Jacobowitz

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

* Re: [rfa] ARM .cfi_* support
  2004-05-03 17:20       ` Daniel Jacobowitz
@ 2004-09-19 15:37         ` Daniel Jacobowitz
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Jacobowitz @ 2004-09-19 15:37 UTC (permalink / raw)
  To: Richard Earnshaw, binutils

On Mon, May 03, 2004 at 01:20:36PM -0400, Daniel Jacobowitz wrote:
> On Thu, Apr 22, 2004 at 01:05:00PM -0400, Daniel Jacobowitz wrote:
> > On Thu, Apr 22, 2004 at 05:47:57PM +0100, Richard Earnshaw wrote:
> > > On Thu, 2004-04-22 at 17:31, Daniel Jacobowitz wrote:
> > > > On Fri, Apr 09, 2004 at 05:01:42PM -0400, Daniel Jacobowitz wrote:
> > > > > This has been kicking around in my tree for a while now.  It adds support
> > > > > for the .cfi_* directives, using the standard or FPA registers - I didn't
> > > > > bother adding any of the other coprocessor registers, since their numbering
> > > > > is still a little unclear, and usually the general purpose registers are all
> > > > > you need.
> > > > > 
> > > > > Tested on arm-elf.  OK?
> > > > 
> > > > Ping?
> > > 
> > > Sorry, missed this one (if you will post messages on a UK public
> > > holiday...)
> > > 
> > > I think that we should be looking to move to the EABI DWARF register
> > > numbers soon (http://www.arm.com/products/DevTools/abi/aadwarf.pdf).  I
> > > would rather that we didn't introduce new uses of the old register
> > > numbering schemes. 
> > 
> > In that case, would the patch be OK without the FPA registers?  I only
> > have actual need for the core integer registers.
> 
> Ping?

Hi Richard,

When you get a chance, could you respond to this patch?

-- 
Daniel Jacobowitz

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

* Re: [rfa] ARM .cfi_* support
  2004-04-22 17:37     ` Daniel Jacobowitz
  2004-05-03 17:20       ` Daniel Jacobowitz
@ 2004-10-23 18:29       ` Daniel Jacobowitz
  2004-10-25 12:28         ` Nick Clifton
  1 sibling, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2004-10-23 18:29 UTC (permalink / raw)
  To: Richard Earnshaw, binutils, Nick Clifton

On Thu, Apr 22, 2004 at 01:05:00PM -0400, Daniel Jacobowitz wrote:
> On Thu, Apr 22, 2004 at 05:47:57PM +0100, Richard Earnshaw wrote:
> > On Thu, 2004-04-22 at 17:31, Daniel Jacobowitz wrote:
> > > On Fri, Apr 09, 2004 at 05:01:42PM -0400, Daniel Jacobowitz wrote:
> > > > This has been kicking around in my tree for a while now.  It adds support
> > > > for the .cfi_* directives, using the standard or FPA registers - I didn't
> > > > bother adding any of the other coprocessor registers, since their numbering
> > > > is still a little unclear, and usually the general purpose registers are all
> > > > you need.
> > > > 
> > > > Tested on arm-elf.  OK?
> > > 
> > > Ping?
> > 
> > Sorry, missed this one (if you will post messages on a UK public
> > holiday...)
> > 
> > I think that we should be looking to move to the EABI DWARF register
> > numbers soon (http://www.arm.com/products/DevTools/abi/aadwarf.pdf).  I
> > would rather that we didn't introduce new uses of the old register
> > numbering schemes. 
> 
> In that case, would the patch be OK without the FPA registers?  I only
> have actual need for the core integer registers.

Ping again?

Nick asked that I repost the original patch.  Here it is, updated for
HEAD.  I've left out the FPA numbering for now.  I don't see the EABI
DWARF numbers coming in to use "soon", but they agree on the numbers of
the general purpose registers, so this should be OK.

-- 
Daniel Jacobowitz

2004-10-23  Daniel Jacobowitz  <dan@debian.org>

	* Makefile.am: Run dep-am.
	* aclocal.m4: Regenerate with automake 1.9.2.
	* Makefile.in: Regenerate with automake 1.9.2.
	* doc/Makefile.in: Likewise.

	* config/tc-arm.c: Include "dw2gencfi.h".
	(tc_arm_regname_to_dw2regnum, tc_arm_frame_initial_instructions):
	New functions.
	* config/tc-arm.h (TARGET_USE_CFIPOP, DWARF2_DEFAULT_RETURN_COLUMN)
	(DWARF2_CIE_DATA_ALIGNMENT, tc_regname_to_dw2regnum)
	(tc_cfi_frame_initial_instructions): Define.
	(tc_arm_regname_to_dw2regnum, tc_arm_frame_initial_instructions):
	Add prototypes.

2004-10-23  Daniel Jacobowitz  <dan@debian.org>

	* gas/cfi/cfi-arm-1.d, gas/cfi/cfi-arm-1.s: New files.
	* gas/cfi/cfi.exp: Run cfi-arm-1 test.

Index: gas/Makefile.am
===================================================================
RCS file: /big/fsf/rsync/src-cvs/src/gas/Makefile.am,v
retrieving revision 1.96
diff -u -p -r1.96 Makefile.am
--- gas/Makefile.am	15 Oct 2004 05:49:33 -0000	1.96
+++ gas/Makefile.am	23 Oct 2004 18:22:28 -0000
@@ -1036,7 +1036,7 @@ DEPTC_arm_elf = $(INCDIR)/symcat.h $(src
   $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arm.h \
   $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
   $(INCDIR)/opcode/arm.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
-  dwarf2dbg.h
+  dwarf2dbg.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h
 DEPTC_avr_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
   $(srcdir)/config/tc-avr.h $(INCDIR)/coff/internal.h \
   $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
Index: gas/config/tc-arm.c
===================================================================
RCS file: /big/fsf/rsync/src-cvs/src/gas/config/tc-arm.c,v
retrieving revision 1.183
diff -u -p -r1.183 tc-arm.c
--- gas/config/tc-arm.c	12 Oct 2004 14:17:06 -0000	1.183
+++ gas/config/tc-arm.c	23 Oct 2004 17:58:50 -0000
@@ -41,6 +41,7 @@
 #ifdef OBJ_ELF
 #include "elf/arm.h"
 #include "dwarf2dbg.h"
+#include "dw2gencfi.h"
 #endif
 
 /* XXX Set this to 1 after the next binutils release.  */
@@ -14859,6 +14860,31 @@ arm_init_frag (fragS * fragP)
   fragP->tc_frag_data = thumb_mode;
 }
 
+#ifdef OBJ_ELF
+
+/* Convert REGNAME to a DWARF-2 register number.  */
+
+int
+tc_arm_regname_to_dw2regnum (const char *regname)
+{
+  unsigned int i;
+
+  for (i = 0; rn_table[i].name; i++)
+    if (strcmp (regname, rn_table[i].name) == 0)
+      return rn_table[i].number;
+
+  return -1;
+}
+
+/* Initialize the DWARF-2 unwind information for this procedure.  */
+
+void
+tc_arm_frame_initial_instructions (void)
+{
+  cfi_add_CFA_def_cfa (REG_SP, 0);
+}
+#endif
+
 /* This table describes all the machine specific pseudo-ops the assembler
    has to support.  The fields are:
      pseudo-op name without dot
Index: gas/config/tc-arm.h
===================================================================
RCS file: /big/fsf/rsync/src-cvs/src/gas/config/tc-arm.h,v
retrieving revision 1.23
diff -u -p -r1.23 tc-arm.h
--- gas/config/tc-arm.h	1 Oct 2004 12:59:41 -0000	1.23
+++ gas/config/tc-arm.h	23 Oct 2004 18:05:48 -0000
@@ -180,6 +180,19 @@ enum mstate
   MAP_THUMB
 };
 
+/* We want .cfi_* pseudo-ops for generating unwind info.  */
+#define TARGET_USE_CFIPOP 1
+
+/* The lr register is r14.  */
+#define DWARF2_DEFAULT_RETURN_COLUMN 14
+
+/* Registers are generally saved at negative offsets to the CFA.  */
+#define DWARF2_CIE_DATA_ALIGNMENT -4
+
+/* CFI hooks.  */
+#define tc_regname_to_dw2regnum tc_arm_regname_to_dw2regnum
+#define tc_cfi_frame_initial_instructions tc_arm_frame_initial_instructions
+
 #else /* Not OBJ_ELF.  */
 #define GLOBAL_OFFSET_TABLE_NAME "__GLOBAL_OFFSET_TABLE_"
 #endif
@@ -211,4 +224,5 @@ extern void arm_init_frag (struct frag *
 extern void arm_handle_align (struct frag *);
 extern bfd_boolean arm_fix_adjustable (struct fix *);
 extern int arm_elf_section_type (const char *, size_t);
-
+extern int tc_arm_regname_to_dw2regnum (const char *regname);
+extern void tc_arm_frame_initial_instructions (void);
Index: gas/doc/Makefile.in
===================================================================
RCS file: /big/fsf/rsync/src-cvs/src/gas/doc/Makefile.in,v
retrieving revision 1.58
diff -u -p -r1.58 Makefile.in
--- gas/doc/Makefile.in	17 Sep 2004 06:17:47 -0000	1.58
+++ gas/doc/Makefile.in	23 Oct 2004 18:24:41 -0000
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.1 from Makefile.am.
+# Makefile.in generated by automake 1.9.2 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
Index: gas/testsuite/gas/cfi/cfi-arm-1.d
===================================================================
RCS file: gas/testsuite/gas/cfi/cfi-arm-1.d
diff -N gas/testsuite/gas/cfi/cfi-arm-1.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/cfi/cfi-arm-1.d	23 Oct 2004 18:18:23 -0000
@@ -0,0 +1,27 @@
+#readelf: -wf
+#name: CFI on ARM
+
+The section .eh_frame contains:
+
+00000000 00000010 00000000 CIE
+  Version:               1
+  Augmentation:          "zR"
+  Code alignment factor: 2
+  Data alignment factor: -4
+  Return address column: 14
+  Augmentation data:     1b
+
+  DW_CFA_def_cfa: r13 ofs 0
+
+00000014 00000020 00000018 FDE cie=00000000 pc=00000000..00000018
+  DW_CFA_advance_loc: 4 to 00000004
+  DW_CFA_def_cfa: r12 ofs 0
+  DW_CFA_advance_loc: 4 to 00000008
+  DW_CFA_def_cfa: r13 ofs 16
+  DW_CFA_advance_loc: 4 to 0000000c
+  DW_CFA_def_cfa_offset: 32
+  DW_CFA_offset: r11 at cfa-32
+  DW_CFA_offset: r14 at cfa-24
+  DW_CFA_advance_loc: 4 to 00000010
+  DW_CFA_def_cfa: r11 ofs 16
+
Index: gas/testsuite/gas/cfi/cfi-arm-1.s
===================================================================
RCS file: gas/testsuite/gas/cfi/cfi-arm-1.s
diff -N gas/testsuite/gas/cfi/cfi-arm-1.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/cfi/cfi-arm-1.s	23 Oct 2004 18:06:50 -0000
@@ -0,0 +1,23 @@
+#; $ as -o test.o gas-cfi-test.s && gcc -nostdlib -o test test.o
+
+	.file   "a.c"
+	.text
+	.align 2
+	.global foo
+	.type   foo, %function
+foo:
+	.cfi_startproc
+	mov	ip, sp
+	.cfi_def_cfa ip, 0
+	stmfd	sp!, {r0, r1, r2, r3}
+	.cfi_def_cfa sp, 16
+	stmfd	sp!, {fp, ip, lr, pc}
+	.cfi_adjust_cfa_offset 16
+	.cfi_rel_offset r11, 0
+	.cfi_rel_offset lr, 8
+	sub	fp, ip, #20
+	.cfi_def_cfa fp, 16
+	nop
+	ldmea	fp, {fp, sp, pc}
+	.cfi_endproc
+	.size   foo, .-foo
Index: gas/testsuite/gas/cfi/cfi.exp
===================================================================
RCS file: /big/fsf/rsync/src-cvs/src/gas/testsuite/gas/cfi/cfi.exp,v
retrieving revision 1.12
diff -u -p -r1.12 cfi.exp
--- gas/testsuite/gas/cfi/cfi.exp	7 Oct 2004 15:18:11 -0000	1.12
+++ gas/testsuite/gas/cfi/cfi.exp	23 Oct 2004 18:06:50 -0000
@@ -56,6 +56,9 @@ if [istarget "x86_64-*"] then {
 	run_dump_test "cfi-sh-1"
     }
 
+} elseif { [istarget "arm*-*"] || [istarget "xscale*-*"] } then {
+    run_dump_test "cfi-arm-1"
+
 } else {
     return
 }

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

* Re: [rfa] ARM .cfi_* support
  2004-10-23 18:29       ` Daniel Jacobowitz
@ 2004-10-25 12:28         ` Nick Clifton
  0 siblings, 0 replies; 7+ messages in thread
From: Nick Clifton @ 2004-10-25 12:28 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Richard Earnshaw, binutils

Hi Daniel,

> 2004-10-23  Daniel Jacobowitz  <dan@debian.org>
> 
> 	* Makefile.am: Run dep-am.
> 	* aclocal.m4: Regenerate with automake 1.9.2.
> 	* Makefile.in: Regenerate with automake 1.9.2.
> 	* doc/Makefile.in: Likewise.
> 
> 	* config/tc-arm.c: Include "dw2gencfi.h".
> 	(tc_arm_regname_to_dw2regnum, tc_arm_frame_initial_instructions):
> 	New functions.
> 	* config/tc-arm.h (TARGET_USE_CFIPOP, DWARF2_DEFAULT_RETURN_COLUMN)
> 	(DWARF2_CIE_DATA_ALIGNMENT, tc_regname_to_dw2regnum)
> 	(tc_cfi_frame_initial_instructions): Define.
> 	(tc_arm_regname_to_dw2regnum, tc_arm_frame_initial_instructions):
> 	Add prototypes.
> 
> 2004-10-23  Daniel Jacobowitz  <dan@debian.org>
> 
> 	* gas/cfi/cfi-arm-1.d, gas/cfi/cfi-arm-1.s: New files.
> 	* gas/cfi/cfi.exp: Run cfi-arm-1 test.
> 
Approved and applied.

Cheers
   Nick



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

end of thread, other threads:[~2004-10-25 12:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20040409210142.GA31470@nevyn.them.org>
2004-04-22 16:32 ` [rfa] ARM .cfi_* support Daniel Jacobowitz
2004-04-22 17:02   ` Richard Earnshaw
2004-04-22 17:37     ` Daniel Jacobowitz
2004-05-03 17:20       ` Daniel Jacobowitz
2004-09-19 15:37         ` Daniel Jacobowitz
2004-10-23 18:29       ` Daniel Jacobowitz
2004-10-25 12:28         ` Nick Clifton

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).