diff options
author | Richard Henderson <rth@redhat.com> | 2003-05-27 16:52:49 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 2003-05-27 16:52:49 +0000 |
commit | a4447b93785ea7fd86d583bb892f3cb5f6db71d3 (patch) | |
tree | d33b904ec977b697a1bfcf3c0bc0897ed800edfa /gas/dw2gencfi.h | |
parent | b7d6ed970a277da806f01110c032f0e19eab2368 (diff) | |
download | binutils-a4447b93785ea7fd86d583bb892f3cb5f6db71d3.zip binutils-a4447b93785ea7fd86d583bb892f3cb5f6db71d3.tar.gz binutils-a4447b93785ea7fd86d583bb892f3cb5f6db71d3.tar.bz2 |
* dw2gencfi.c, dw2gencfi.h: Rewrite from scratch.
* as.c (main): Always call cfi_finish.
* config/tc-i386.c (x86_dwarf2_return_column): New.
(x86_cie_data_alignment): New.
(md_begin): Set them.
(tc_x86_cfi_init): Remove.
(tc_x86_regname_to_dw2regnum): Fix 32-bit register numbers;
return int, not unsigned long; don't as_bad here.
(tc_x86_frame_initial_instructions): Streamline; use
updated api.
* config/tc-i386.h (tc_cfi_init): Remove.
(DWARF2_DEFAULT_RETURN_COLUMN): New.
(DWARF2_CIE_DATA_ALIGNMENT): New.
* gas/cfi/cfi-i386.d: Update for dw2gencfi rewrite.
* gas/cfi/cfi-x86_64.d: Likewise.
* gas/cfi/cfi-i386-2.d: New.
* gas/cfi/cfi-i386-2.s: New.
Diffstat (limited to 'gas/dw2gencfi.h')
-rw-r--r-- | gas/dw2gencfi.h | 80 |
1 files changed, 13 insertions, 67 deletions
diff --git a/gas/dw2gencfi.h b/gas/dw2gencfi.h index 1c72454..792225d 100644 --- a/gas/dw2gencfi.h +++ b/gas/dw2gencfi.h @@ -24,77 +24,23 @@ #include "elf/dwarf2.h" -struct cfi_config { - /* Target address length in bytes. (usually 4 or 8). - Round it up for archs like S/390 with 31b addresses. */ - unsigned int addr_length; - - /* Alignment of .eh_frame blocks in bytes (usually 1, 4 or 8). */ - unsigned int eh_align; - - /* Code alignment (1 for x86/amd64 machines, 4 or 8 for - RISC machines). Consult Dwarf2 standard for details. */ - int code_align; - - /* Data (stack) alignment (-4 on x86, -8 on amd64, something - positive on archs where stack grows up). Consult Dwarf2 - standard for details. */ - int data_align; - - /* Return address column (0x8 on x86, 0x10 on amd64). Consult - Dwarf2 standard for details. */ - int ra_column; - - /* Relocation type for init_addr FDE record. (BFD_RELOC_64 - on amd64). */ - int reloc_type; -}; - -/* Codes of CFI instructions taken from Dwarf2 standard. */ -enum cfi_insn { - CFA_nop = DW_CFA_nop, - CFA_set_loc = DW_CFA_set_loc, - CFA_advance_loc1 = DW_CFA_advance_loc1, - CFA_advance_loc2 = DW_CFA_advance_loc2, - CFA_advance_loc4 = DW_CFA_advance_loc4, - CFA_offset_extended = DW_CFA_offset_extended, - CFA_resotre_extended = DW_CFA_restore_extended, - CFA_undefined = DW_CFA_undefined, - CFA_same_value = DW_CFA_same_value, - CFA_register = DW_CFA_register, - CFA_remember_state = DW_CFA_remember_state, - CFA_restore_state = DW_CFA_restore_state, - CFA_def_cfa = DW_CFA_def_cfa, - CFA_def_cfa_register = DW_CFA_def_cfa_register, - CFA_def_cfa_offset = DW_CFA_def_cfa_offset, - CFA_advance_loc = DW_CFA_advance_loc, - CFA_offset = DW_CFA_offset, - CFA_restore = DW_CFA_restore, - - /* These don't belong to the standard. */ - CFI_startproc = 0xff00, - CFI_endproc = 0xff01, - CFI_adjust_cfa_offset = 0xff10, - CFI_verbose = 0xffff -}; +struct symbol; extern const pseudo_typeS cfi_pseudo_table[]; -/* Insert .cfi_* directives to the list of pseudo-ops. */ -void cfi_pop_insert PARAMS ((void)); - -/* Set/change setup of the CFI machinery. This change won't - affect already generated CIEs/FDEs. */ -void cfi_set_config PARAMS ((struct cfi_config *cfg)); - /* cfi_finish() is called at the end of file. It will complain if the last CFI wasn't properly closed by .cfi_endproc. */ -void cfi_finish PARAMS ((void)); - -/* Add CFI instruction to the list of instructions - of the current frame. cfi_add_insn() could be used - in tc_cfi_frame_initial_instructions() to add instructions - needed for every frame (ie. those that usually go to CIE). */ -void cfi_add_insn (enum cfi_insn insn, long param0, long param1); +extern void cfi_finish (void); + +/* Entry points for backends to add unwind information. */ +extern void cfi_new_fde (struct symbol *); +extern void cfi_end_fde (struct symbol *); +extern void cfi_set_return_column (unsigned); +extern void cfi_add_advance_loc (struct symbol *); +extern void cfi_add_CFA_offset (unsigned, offsetT); +extern void cfi_add_CFA_def_cfa (unsigned, offsetT); +extern void cfi_add_CFA_register (unsigned, unsigned); +extern void cfi_add_CFA_def_cfa_register (unsigned); +extern void cfi_add_CFA_def_cfa_offset (offsetT); #endif /* DW2GENCFI_H */ |