X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gas%2Fconfig%2Ftc-tic6x.h;h=dcae19693992235349cb7b6028423ace3d90db3b;hb=9dfa3e63479d3c3106c7e5e86764a0ed8e22aa7f;hp=c9df520b4b6c9d0d37048c4facabd4013207e645;hpb=59e6276b64b1a3b248d851e5a3f5acd63e346399;p=deliverable%2Fbinutils-gdb.git diff --git a/gas/config/tc-tic6x.h b/gas/config/tc-tic6x.h index c9df520b4b..dcae196939 100644 --- a/gas/config/tc-tic6x.h +++ b/gas/config/tc-tic6x.h @@ -1,6 +1,5 @@ /* Definitions for TI C6X assembler. - Copyright 2010 - Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -43,6 +42,38 @@ typedef struct tic6x_label_list symbolS *label; } tic6x_label_list; +/* Must be consistent with the enum in tc-tic6x.c. */ +#define TIC6X_NUM_UNWIND_REGS 13 + +/* Unwinding information state. */ +typedef struct tic6x_unwind_info { + int personality_index; + symbolS *personality_routine; + symbolS *function_start; + segT saved_seg; + subsegT saved_subseg; + /* NULL if table entry is inline. */ + symbolS *table_entry; + char *frag_start; + valueT data; + /* 0 before .cfi_startproc + -1 between .cfi_startproc and .handlerdata + >0 between .handlerdata and .endp */ + int data_bytes; + + offsetT reg_offset[TIC6X_NUM_UNWIND_REGS]; + bfd_boolean reg_saved[TIC6X_NUM_UNWIND_REGS]; + int cfa_reg; + int return_reg; + unsigned safe_mask; + unsigned compact_mask; + unsigned reg_saved_mask; + offsetT cfa_offset; + bfd_boolean pop_rts; + /* Only valid for UNWIND_OP_POP_REG */ + int saved_reg_count; +} tic6x_unwind_info; + typedef struct { /* Any labels seen since the last instruction or data. If not NULL, @@ -67,11 +98,24 @@ typedef struct ||^); otherwise NULL. */ char *spmask_addr; + /* The functional units used in the current execute packet, recorded + by setting the same bits as would be set in the 32-bit SPMASK + instruction. */ + unsigned int func_units_used; + /* If an SPLOOP-family instruction has been seen, and a following SPKERNEL-family instruction has not yet been seen, the ii value from the SPLOOP instruction (in the range 1 to 14); otherwise 0. */ int sploop_ii; + + /* Bit N indicates that an R_C6000_NONE relocation has been output for + __c6xabi_unwind_cpp_prN already if set. This enables dependencies to be + emitted only once per section, to save unnecessary bloat. */ + unsigned int marked_pr_dependency; + + tic6x_unwind_info *unwind; + tic6x_unwind_info *text_unwind; } tic6x_segment_info_type; #define TC_SEGMENT_INFO_TYPE tic6x_segment_info_type @@ -97,6 +141,9 @@ typedef struct instruction, whereas a non-constant represents a DP-relative value counting in the appropriate units). */ bfd_boolean fix_adda; + /* The symbol to be subtracted in case of a PCR_H16 or PCR_L16 + reloc. */ + symbolS *fix_subsy; } tic6x_fix_info; #define TC_FIX_TYPE tic6x_fix_info #define TC_INIT_FIX_DATA(fixP) tic6x_init_fix_data (fixP) @@ -137,10 +184,13 @@ extern long tic6x_pcrel_from_section (struct fix *fixp, segT sec); #define md_start_line_hook() tic6x_start_line_hook () extern void tic6x_start_line_hook (void); -#define TC_CONS_FIX_NEW(frag, where, size, exp) \ - tic6x_cons_fix_new (frag, where, size, exp) -extern void tic6x_cons_fix_new (fragS *frag, int where, int size, - expressionS *exp); +#define TC_CONS_FIX_NEW(frag, where, size, exp, reloc) \ + tic6x_cons_fix_new (frag, where, size, exp, reloc) +extern void tic6x_cons_fix_new (fragS *, int, int, expressionS *, + bfd_reloc_code_real_type); + +#define tc_fix_adjustable(FIX) tic6x_fix_adjustable (FIX) +extern bfd_boolean tic6x_fix_adjustable (struct fix *); #define tc_frob_label(sym) tic6x_frob_label (sym) extern void tic6x_frob_label (symbolS *sym); @@ -150,3 +200,28 @@ extern void tic6x_init_after_args (void); #define tc_unrecognized_line(c) tic6x_unrecognized_line (c) extern int tic6x_unrecognized_line (int c); + +/* We want .cfi_* pseudo-ops for generating unwind info. */ +#define TARGET_USE_CFIPOP 1 + +/* CFI hooks. */ +#define tc_regname_to_dw2regnum tic6x_regname_to_dw2regnum +int tic6x_regname_to_dw2regnum (char *regname); + +#define tc_cfi_frame_initial_instructions tic6x_frame_initial_instructions +void tic6x_frame_initial_instructions (void); + +/* The return register is B3. */ +#define DWARF2_DEFAULT_RETURN_COLUMN (16 + 3) + +/* Registers are generally saved at negative offsets to the CFA. */ +#define DWARF2_CIE_DATA_ALIGNMENT (-4) + +#define tc_cfi_startproc tic6x_cfi_startproc +void tic6x_cfi_startproc (void); + +#define tc_cfi_endproc tic6x_cfi_endproc +struct fde_entry; +void tic6x_cfi_endproc (struct fde_entry *fde); + +#define tc_cfi_section_name ".c6xabi.exidx"