Back to index

cell-binutils  2.17cvs20070401
Classes | Defines | Typedefs | Enumerations | Functions | Variables
tc-ia64.c File Reference
#include "as.h"
#include "safe-ctype.h"
#include "dwarf2dbg.h"
#include "subsegs.h"
#include "opcode/ia64.h"
#include "elf/ia64.h"

Go to the source code of this file.

Classes

struct  label_fix
struct  const_desc
struct  rsrc
struct  qpmutex
struct  qp_imply
struct  gr
struct  unw_rec_list
struct  label_prologue_count
struct  proc_pending
struct  pseudo_opcode
struct  alias
union  .u

Defines

#define NELEMS(a)   ((int) (sizeof (a)/sizeof ((a)[0])))
#define MIN(a, b)   ((a) < (b) ? (a) : (b))
#define NUM_SLOTS   4
#define PREV_SLOT   md.slot[(md.curr_slot + NUM_SLOTS - 1) % NUM_SLOTS]
#define CURR_SLOT   md.slot[md.curr_slot]
#define O_pseudo_fixup   (O_max + 1)
#define OPTION_MCONSTANT_GP   (OPTION_MD_BASE + 1)
#define OPTION_MAUTO_PIC   (OPTION_MD_BASE + 2)
#define AR_K0   0
#define AR_K7   7
#define AR_RSC   16
#define AR_BSP   17
#define AR_BSPSTORE   18
#define AR_RNAT   19
#define AR_FCR   21
#define AR_EFLAG   24
#define AR_CSD   25
#define AR_SSD   26
#define AR_CFLG   27
#define AR_FSR   28
#define AR_FIR   29
#define AR_FDR   30
#define AR_CCV   32
#define AR_UNAT   36
#define AR_FPSR   40
#define AR_ITC   44
#define AR_PFS   64
#define AR_LC   65
#define AR_EC   66
#define CR_DCR   0
#define CR_ITM   1
#define CR_IVA   2
#define CR_PTA   8
#define CR_GPTA   9
#define CR_IPSR   16
#define CR_ISR   17
#define CR_IIP   19
#define CR_IFA   20
#define CR_ITIR   21
#define CR_IIPA   22
#define CR_IFS   23
#define CR_IIM   24
#define CR_IHA   25
#define CR_LID   64
#define CR_IVR   65
#define CR_TPR   66
#define CR_EOI   67
#define CR_IRR0   68
#define CR_IRR3   71
#define CR_ITV   72
#define CR_PMV   73
#define CR_CMCV   74
#define CR_LRR0   80
#define CR_LRR1   81
#define PSR_MFL   4
#define PSR_IC   13
#define PSR_DFL   18
#define PSR_CPL   32
#define N   IA64_NUM_TYPES
#define STATE_NONE   0
#define STATE_STOP   1
#define STATE_SRLZ   2
#define SLOT_NUM_NOT_SET   (unsigned)-1
#define ENCODED_PSP_OFFSET(OFFSET)   (((OFFSET) + 16) / 4)
#define STREQ(s)   ((len == sizeof (s) - 1) && (strncmp (str, s, sizeof (s) - 1) == 0))
#define FORCE_CONST(n)
#define MAX_SPECS   256
#define DV_CHK   1
#define DV_REG   0
#define UNHANDLED
#define KNOWN(REG)   (gr_values[REG].known && gr_values[REG].path >= path)
#define MAX_LITTLENUMS   5

Typedefs

typedef struct unw_rec_list unw_rec_list
typedef struct label_prologue_count label_prologue_count
typedef struct proc_pending proc_pending
typedef void vbyte_func PARAMS ((int, char *, char *))

Enumerations

enum  special_section {
  SPECIAL_SECTION_BSS = 0, SPECIAL_SECTION_SBSS, SPECIAL_SECTION_SDATA, SPECIAL_SECTION_RODATA,
  SPECIAL_SECTION_COMMENT, SPECIAL_SECTION_UNWIND, SPECIAL_SECTION_UNWIND_INFO, SPECIAL_SECTION_INIT_ARRAY,
  SPECIAL_SECTION_FINI_ARRAY
}
enum  reloc_func {
  FUNC_DTP_MODULE, FUNC_DTP_RELATIVE, FUNC_FPTR_RELATIVE, FUNC_GP_RELATIVE,
  FUNC_LT_RELATIVE, FUNC_LT_RELATIVE_X, FUNC_PC_RELATIVE, FUNC_PLT_RELATIVE,
  FUNC_SEC_RELATIVE, FUNC_SEG_RELATIVE, FUNC_TP_RELATIVE, FUNC_LTV_RELATIVE,
  FUNC_LT_FPTR_RELATIVE, FUNC_LT_DTP_MODULE, FUNC_LT_DTP_RELATIVE, FUNC_LT_TP_RELATIVE,
  FUNC_IPLT_RELOC
}
enum  reg_symbol {
  REG_GR = 0, REG_FR = (REG_GR + 128), REG_AR = (REG_FR + 128), REG_CR = (REG_AR + 128),
  REG_P = (REG_CR + 128), REG_BR = (REG_P + 64), REG_IP = (REG_BR + 8), REG_CFM,
  REG_PR, REG_PR_ROT, REG_PSR, REG_PSR_L,
  REG_PSR_UM, IND_CPUID, IND_DBR, IND_DTR,
  IND_ITR, IND_IBR, IND_MSR, IND_PKR,
  IND_PMC, IND_PMD, IND_RR, REG_PSP,
  REG_PRIUNAT, REG_NUM
}
enum  dynreg_type { DYNREG_GR = 0, DYNREG_FR, DYNREG_PR, DYNREG_NUM_TYPES }
enum  operand_match_result { OPERAND_MATCH, OPERAND_OUT_OF_RANGE, OPERAND_MISMATCH }

Functions

void ia64_number_to_chars PARAMS ((char *, valueT, int))
static void
ia64_float_to_chars_bigendian 
PARAMS ((char *, LITTLENUM_TYPE *, int))
static void set_section PARAMS ((char *name))
static unsigned int set_regstack PARAMS ((unsigned int, unsigned int, unsigned int, unsigned int))
static void dot_align (int)
static void dot_radix PARAMS ((int))
static void cross_section PARAMS ((int ref, void(*cons) PARAMS((int)), int ua))
static void print_prmask PARAMS ((valueT mask))
static void add_unwind_entry PARAMS ((unw_rec_list *, int))
static symbolS *declare_register PARAMS ((const char *name, unsigned int regnum))
static void declare_register_set PARAMS ((const char *, unsigned int, unsigned int))
static unsigned int operand_width PARAMS ((enum ia64_opnd))
static enum operand_match_result PARAMS ((const struct ia64_opcode *idesc, int index, expressionS *e))
static int parse_operand PARAMS ((expressionS *, int))
static struct ia64_opcode
*parse_operands 
PARAMS ((struct ia64_opcode *))
static void build_insn PARAMS ((struct slot *, bfd_vma *))
static void emit_one_bundle PARAMS ((void))
static void fix_insn PARAMS ((fixS *, const struct ia64_operand *, valueT))
static
bfd_reloc_code_real_type
ia64_gen_real_reloc_type 
PARAMS ((struct symbol *sym, bfd_reloc_code_real_type r_type))
static void insn_group_break PARAMS ((int, int, int))
static void mark_resource PARAMS ((struct ia64_opcode *, const struct ia64_dependency *, struct rsrc *, int depind, int path))
static void add_qp_imply PARAMS ((int p1, int p2))
static void clear_qp_implies PARAMS ((valueT p1_mask, valueT p2_mask))
static int has_suffix_p PARAMS ((const char *, const char *))
static void print_dependency PARAMS ((const char *action, int depind))
static void remove_marked_resource PARAMS ((struct rsrc *))
static int depends_on PARAMS ((int, struct ia64_opcode *))
static int specify_resource PARAMS ((const struct ia64_dependency *, struct ia64_opcode *, int, struct rsrc[], int, int))
static int check_dv PARAMS ((struct ia64_opcode *idesc))
static int resources_match PARAMS ((struct rsrc *, struct ia64_opcode *, int, int, int))
static void output_vbyte_mem PARAMS ((int, char *, char *))
static void output_R1_format PARAMS ((vbyte_func, unw_record_type, int))
static void output_R2_format PARAMS ((vbyte_func, int, int, unsigned long))
static void output_R3_format PARAMS ((vbyte_func, unw_record_type, unsigned long))
static void output_P1_format PARAMS ((vbyte_func, int))
static void output_P2_format PARAMS ((vbyte_func, int, int))
static void output_P4_format PARAMS ((vbyte_func, unsigned char *, unsigned long))
static void output_P5_format PARAMS ((vbyte_func, int, unsigned long))
static void output_P7_format PARAMS ((vbyte_func, unw_record_type, unsigned long, unsigned long))
static void output_B2_format PARAMS ((vbyte_func, unsigned long, unsigned long))
static char format_ab_reg PARAMS ((int, int))
static void output_X1_format PARAMS ((vbyte_func, unw_record_type, int, int, unsigned long, unsigned long))
static void output_X2_format PARAMS ((vbyte_func, int, int, int, int, int, unsigned long))
static void output_X3_format PARAMS ((vbyte_func, unw_record_type, int, int, int, unsigned long, unsigned long))
static void output_X4_format PARAMS ((vbyte_func, int, int, int, int, int, int, unsigned long))
static unw_rec_list
*output_prologue_gr 
PARAMS ((unsigned int, unsigned int))
static unw_rec_list
*output_mem_stack_f 
PARAMS ((unsigned int))
static unw_rec_list *output_unwabi PARAMS ((unsigned long, unsigned long))
static unw_rec_list
*output_epilogue 
PARAMS ((unsigned long))
static unw_rec_list
*output_spill_reg 
PARAMS ((unsigned int, unsigned int, unsigned int, unsigned int, unsigned int))
static void process_one_record PARAMS ((unw_rec_list *, vbyte_func))
static int calc_record_size PARAMS ((unw_rec_list *))
static void set_imask PARAMS ((unw_rec_list *, unsigned long, unsigned long, unsigned int))
static unsigned long slot_index PARAMS ((unsigned long, fragS *, unsigned long, fragS *, int))
static int
parse_predicate_and_operand 
PARAMS ((expressionS *, unsigned *, const char *))
static void convert_expr_to_ab_reg PARAMS ((const expressionS *, unsigned int *, unsigned int *, const char *, int))
static void save_prologue_count PARAMS ((unsigned long, unsigned int))
static int ar_is_only_in_integer_unit (int reg)
static int ar_is_only_in_memory_unit (int reg)
static void set_section (char *name)
int ia64_elf_section_letter (int letter, char **ptr_msg)
flagword ia64_elf_section_flags (flagword flags, int attr, type)
int ia64_elf_section_type (char *str, size_t len) const
static unsigned int set_regstack (unsigned int ins, unsigned int locs, unsigned int outs, unsigned int rots)
void ia64_flush_insns ()
static void ia64_do_align (int nbytes)
void ia64_cons_align (int nbytes)
void output_vbyte_mem (int count, char *ptr, comment)
void count_output (int count, ptr, comment)
static void output_R1_format (vbyte_func f, unw_record_type rtype, int rlen)
static void output_R2_format (vbyte_func f, int mask, int grsave, unsigned long rlen)
static void output_R3_format (vbyte_func f, unw_record_type rtype, unsigned long rlen)
static void output_P1_format (vbyte_func f, int brmask)
static void output_P2_format (vbyte_func f, int brmask, int gr)
static void output_P3_format (vbyte_func f, unw_record_type rtype, int reg)
static void output_P4_format (vbyte_func f, unsigned char *imask, unsigned long imask_size)
static void output_P5_format (vbyte_func f, int grmask, unsigned long frmask)
static void output_P6_format (vbyte_func f, unw_record_type rtype, int rmask)
static void output_P7_format (vbyte_func f, unw_record_type rtype, unsigned long w1, unsigned long w2)
static void output_P8_format (vbyte_func f, unw_record_type rtype, unsigned long t)
static void output_P9_format (vbyte_func f, int grmask, int gr)
static void output_P10_format (vbyte_func f, int abi, int context)
static void output_B1_format (vbyte_func f, unw_record_type rtype, unsigned long label)
static void output_B2_format (vbyte_func f, unsigned long ecount, unsigned long t)
static void output_B3_format (vbyte_func f, unsigned long ecount, unsigned long t)
static void output_B4_format (vbyte_func f, unw_record_type rtype, unsigned long label)
static char format_ab_reg (int ab, int reg)
static void output_X1_format (vbyte_func f, unw_record_type rtype, int ab, int reg, unsigned long t, unsigned long w1)
static void output_X2_format (vbyte_func f, int ab, int reg, int x, int y, int treg, unsigned long t)
static void output_X3_format (vbyte_func f, unw_record_type rtype, int qp, int ab, int reg, unsigned long t, unsigned long w1)
static void output_X4_format (vbyte_func f, int qp, int ab, int reg, int x, int y, int treg, unsigned long t)
static void check_pending_save (void)
static unw_rec_listalloc_record (unw_record_type t)
static unw_rec_listoutput_endp ()
static unw_rec_listoutput_prologue ()
static unw_rec_listoutput_prologue_gr (unsigned int saved_mask, unsigned int reg)
static unw_rec_listoutput_body ()
static unw_rec_listoutput_mem_stack_f (unsigned int size)
static unw_rec_listoutput_mem_stack_v ()
static unw_rec_listoutput_psp_gr (unsigned int gr)
static unw_rec_listoutput_psp_sprel (unsigned int offset)
static unw_rec_listoutput_rp_when ()
static unw_rec_listoutput_rp_gr (unsigned int gr)
static unw_rec_listoutput_rp_br (unsigned int br)
static unw_rec_listoutput_rp_psprel (unsigned int offset)
static unw_rec_listoutput_rp_sprel (unsigned int offset)
static unw_rec_listoutput_pfs_when ()
static unw_rec_listoutput_pfs_gr (unsigned int gr)
static unw_rec_listoutput_pfs_psprel (unsigned int offset)
static unw_rec_listoutput_pfs_sprel (unsigned int offset)
static unw_rec_listoutput_preds_when ()
static unw_rec_listoutput_preds_gr (unsigned int gr)
static unw_rec_listoutput_preds_psprel (unsigned int offset)
static unw_rec_listoutput_preds_sprel (unsigned int offset)
static unw_rec_listoutput_fr_mem (unsigned int mask)
static unw_rec_listoutput_frgr_mem (unsigned int gr_mask, unsigned int fr_mask)
static unw_rec_listoutput_gr_gr (unsigned int mask, unsigned int reg)
static unw_rec_listoutput_gr_mem (unsigned int mask)
static unw_rec_listoutput_br_mem (unsigned int mask)
static unw_rec_listoutput_br_gr (unsigned int mask, unsigned int reg)
static unw_rec_listoutput_spill_base (unsigned int offset)
static unw_rec_listoutput_unat_when ()
static unw_rec_listoutput_unat_gr (unsigned int gr)
static unw_rec_listoutput_unat_psprel (unsigned int offset)
static unw_rec_listoutput_unat_sprel (unsigned int offset)
static unw_rec_listoutput_lc_when ()
static unw_rec_listoutput_lc_gr (unsigned int gr)
static unw_rec_listoutput_lc_psprel (unsigned int offset)
static unw_rec_listoutput_lc_sprel (unsigned int offset)
static unw_rec_listoutput_fpsr_when ()
static unw_rec_listoutput_fpsr_gr (unsigned int gr)
static unw_rec_listoutput_fpsr_psprel (unsigned int offset)
static unw_rec_listoutput_fpsr_sprel (unsigned int offset)
static unw_rec_listoutput_priunat_when_gr ()
static unw_rec_listoutput_priunat_when_mem ()
static unw_rec_listoutput_priunat_gr (unsigned int gr)
static unw_rec_listoutput_priunat_psprel (unsigned int offset)
static unw_rec_listoutput_priunat_sprel (unsigned int offset)
static unw_rec_listoutput_bsp_when ()
static unw_rec_listoutput_bsp_gr (unsigned int gr)
static unw_rec_listoutput_bsp_psprel (unsigned int offset)
static unw_rec_listoutput_bsp_sprel (unsigned int offset)
static unw_rec_listoutput_bspstore_when ()
static unw_rec_listoutput_bspstore_gr (unsigned int gr)
static unw_rec_listoutput_bspstore_psprel (unsigned int offset)
static unw_rec_listoutput_bspstore_sprel (unsigned int offset)
static unw_rec_listoutput_rnat_when ()
static unw_rec_listoutput_rnat_gr (unsigned int gr)
static unw_rec_listoutput_rnat_psprel (unsigned int offset)
static unw_rec_listoutput_rnat_sprel (unsigned int offset)
static unw_rec_listoutput_unwabi (unsigned long abi, unsigned long context)
static unw_rec_listoutput_epilogue (unsigned long ecount)
static unw_rec_listoutput_label_state (unsigned long label)
static unw_rec_listoutput_copy_state (unsigned long label)
static unw_rec_listoutput_spill_psprel (unsigned int ab, unsigned int reg, unsigned int offset, unsigned int predicate)
static unw_rec_listoutput_spill_sprel (unsigned int ab, unsigned int reg, unsigned int offset, unsigned int predicate)
static unw_rec_listoutput_spill_reg (unsigned int ab, unsigned int reg, unsigned int targ_reg, unsigned int xy, unsigned int predicate)
static void process_one_record (unw_rec_list *ptr, vbyte_func f)
static void process_unw_records (unw_rec_list *list, vbyte_func f)
static int calc_record_size (unw_rec_list *list)
static int popcount (unsigned x)
static void set_imask (unw_rec_list *region, unsigned long regmask, unsigned long t, unsigned int type)
unsigned long slot_index (unsigned long slot_addr, fragS *slot_frag, unsigned long first_addr, fragS *first_frag, int before_relax)
static unw_rec_listoptimize_unw_records (unw_rec_list *list)
static void fixup_unw_records (unw_rec_list *list, int before_relax)
int ia64_estimate_size_before_relax (fragS *frag, asection *segtype ATTRIBUTE_UNUSED)
void ia64_convert_frag (fragS *frag)
static int parse_predicate_and_operand (expressionS *e, unsigned *qp, const char *po)
static void convert_expr_to_ab_reg (expressionS *e, unsigned int *ab, unsigned int *regp, const char *po, int n) const
static void convert_expr_to_xy_reg (expressionS *e, unsigned int *xy, unsigned int *regp, const char *po, int n) const
static void dot_radix (dummy)
static void dot_loc (int x)
static void dot_special_section (int which)
static int unwind_diagnostic (const char *region, const char *directive)
static int in_procedure (const char *directive)
static int in_prologue (const char *directive)
static int in_body (const char *directive)
static void add_unwind_entry (unw_rec_list *ptr, int sep)
static void dot_fframe (dummy)
static void dot_vframe (dummy)
static void dot_vframesp (int psp)
static void dot_save (dummy)
static void dot_restore (dummy)
static void dot_restorereg (int pred)
static void start_unwind_section (const segT text_seg, int sec_index)
static void generate_unwind_image (const segT text_seg)
static void dot_handlerdata (dummy)
static void dot_unwentry (dummy)
static void dot_altrp (dummy)
static void dot_savemem (int psprel)
static void dot_saveg (dummy)
static void dot_savef (dummy)
static void dot_saveb (dummy)
static void dot_savegf (dummy)
static void dot_spill (dummy)
static void dot_spillreg (int pred)
static void dot_spillmem (int psprel)
static unsigned int get_saved_prologue_count (unsigned long lbl)
static void save_prologue_count (unsigned long lbl, unsigned int count)
static void free_saved_prologue_counts ()
static void dot_label_state (dummy)
static void dot_copy_state (dummy)
static void dot_unwabi (dummy)
static void dot_personality (dummy)
static void dot_proc (dummy)
static void dot_body (dummy)
static void dot_prologue (dummy)
static void dot_endp (dummy)
static void dot_template (int template)
static void dot_regstk (dummy)
static void dot_rot (int type)
static void dot_byteorder (int byteorder)
static void dot_psr (dummy)
static void dot_ln (dummy)
static void cross_section (int ref, cons, int ua)
static void dot_xdata (int size)
static void stmt_float_cons (int kind)
static void stmt_cons_ua (int size)
static void dot_xfloat_cons (int kind)
static void dot_xstringer (int zero)
static void dot_xdata_ua (int size)
static void dot_xfloat_cons_ua (int kind)
static void dot_reg_val (dummy)
static void dot_serialize (int type)
static void dot_dv_mode (int type)
static void print_prmask (valueT mask)
static void dot_pred_rel (int type)
static void dot_entry (dummy)
static void dot_mem_offset (dummy)
static symbolS * declare_register (char *name, unsigned int regnum) const
static void declare_register_set (char *prefix, unsigned int num_regs, unsigned int base_regnum) const
static unsigned int operand_width (enum ia64_opnd opnd)
static enum operand_match_result operand_match (struct ia64_opcode *idesc, int index, expressionS *e) const
static int parse_operand (expressionS *e, int more)
static struct ia64_opcodeget_next_opcode (struct ia64_opcode *idesc)
static struct ia64_opcodeparse_operands (struct ia64_opcode *idesc)
static void build_insn (struct slot *slot, bfd_vma *insnp)
static void emit_one_bundle ()
int md_parse_option (int c, char *arg)
void md_show_usage (FILE *stream)
void ia64_after_parse_args ()
static int match (int templ, int type, int slot)
static int extra_goodness (int templ, int slot)
void md_begin ()
void ia64_init (argc, argv)
const char * ia64_target_format ()
void ia64_end_of_source ()
void ia64_start_line ()
int ia64_unrecognized_line (int ch)
void ia64_frob_label (struct symbol *sym)
void ia64_flush_pending_output ()
int ia64_optimize_expr (expressionS *l, operatorT op, expressionS *r)
int ia64_parse_name (char *name, expressionS *e, char *nextcharP)
char * ia64_canonicalize_symbol_name (char *name)
static int is_conditional_branch (struct ia64_opcode *idesc)
static int is_taken_branch (struct ia64_opcode *idesc)
static int is_interruption_or_rfi (struct ia64_opcode *idesc)
static int depends_on (int depind, struct ia64_opcode *idesc)
static int specify_resource (struct ia64_dependency *dep, struct ia64_opcode *idesc, int type, specs, int note, int path) const
static void clear_qp_branch_flag (valueT mask)
static int update_qp_mutex (valueT mask)
static void clear_qp_mutex (valueT mask)
static void clear_qp_implies (valueT p1_mask, valueT p2_mask)
static void add_qp_imply (int p1, int p2)
static void add_qp_mutex (valueT mask)
static int has_suffix_p (char *name, const char *suffix) const
static void clear_register_values ()
static void note_register_values (struct ia64_opcode *idesc)
static int qp_mutex (int p1, int p2, int path)
static int resources_match (struct rsrc *rs, struct ia64_opcode *idesc, int note, int qp_regno, int path)
static void insn_group_break (int insert_stop, int qp_regno, int save_current)
static void mark_resource (idesc, dep, struct rsrc *spec, int depind, int path)
static void print_dependency (char *action, int depind) const
static void instruction_serialization ()
static void data_serialization ()
static void remove_marked_resource (struct rsrc *rs)
static void check_dependencies (struct ia64_opcode *idesc)
static void mark_resources (struct ia64_opcode *idesc)
static void update_dependencies (struct ia64_opcode *idesc)
static int check_dv (struct ia64_opcode *idesc)
void md_assemble (char *str)
symbolS * md_undefined_symbol (name)
void md_operand (expressionS *e)
int ia64_fix_adjustable (fixS *fix)
int ia64_force_relocation (fixS *fix)
long ia64_pcrel_from_section (fixS *fix, segT sec)
void ia64_dwarf2_emit_offset (symbolS *symbol, unsigned int size)
void ia64_cons_fix_new (fragS *f, int where, int nbytes, expressionS *exp)
static bfd_reloc_code_real_type ia64_gen_real_reloc_type (struct symbol *sym, bfd_reloc_code_real_type r_type)
void ia64_validate_fix (fixS *fix)
static void fix_insn (fixS *fix, const struct ia64_operand *odesc, valueT value)
void md_apply_fix (fixS *fix, valueT *valP, seg)
arelenttc_gen_reloc (sec, fixS *fixp)
char * md_atof (int type, char *lit, int *size)
void ia64_md_do_align (n, fill, len, max)
void ia64_handle_align (fragS *fragp)
static void ia64_float_to_chars_bigendian (char *lit, LITTLENUM_TYPE *words, int prec)
static void ia64_float_to_chars_littleendian (char *lit, LITTLENUM_TYPE *words, int prec)
void ia64_elf_section_change_hook (void)
void ia64_check_label (symbolS *label)
static void dot_alias (int section)
static void do_alias (const char *alias, PTR value)
void ia64_adjust_symtab (void)
static void do_secalias (const char *alias, PTR value)
void ia64_frob_file (void)

Variables

int target_big_endian
static int default_big_endian = TARGET_BYTES_BIG_ENDIAN
static struct hash_controlalias_hash
static struct hash_controlalias_name_hash
static struct hash_controlsecalias_hash
static struct hash_controlsecalias_name_hash
const char ia64_symbol_chars [] = "@?"
const char comment_chars [] = ""
const char line_comment_chars [] = "#"
const char line_separator_chars [] = ";{}"
const char EXP_CHARS [] = "eE"
const char FLT_CHARS [] = "rRsSfFdDxXpP"
const char * md_shortopts = "m:N:x::"
size_t md_longopts_size = sizeof (md_longopts)
struct {
enum  { itanium1, itanium2 }
enum  { hint_b_error, hint_b_warning, hint_b_ok }
enum  { unwind_check_warning, unwind_check_error }
struct hash_controlpseudo_hash
struct hash_controlreg_hash
struct hash_controldynreg_hash
struct hash_controlconst_hash
struct hash_controlentry_hash
expressionS qp
enum { ... }  tune
enum { ... }  hint_b
unsigned int manual_bundling: 1
unsigned int debug_dv: 1
unsigned int detect_dv: 1
unsigned int explicit_mode: 1
unsigned int default_explicit_mode: 1
unsigned int mode_explicitly_set: 1
unsigned int auto_align: 1
unsigned int keep_pending_output: 1
enum { ... }  unwind_check
int curr_slot
int num_slots_in_use
   struct {
unsigned int end_of_insn_group: 1
unsigned int manual_bundling_on: 1
unsigned int manual_bundling_off: 1
unsigned int loc_directive_seen: 1
signed char user_template
unsigned char qp_regno
int num_fixups
      struct {
bfd_reloc_code_real_type code
      } fixup [2]
struct ia64_opcodeidesc
struct label_fixlabel_fixups
struct label_fixtag_fixups
struct unw_rec_listunwind_record
expressionS opnd [6]
char * src_file
unsigned int src_line
   } slot [NUM_SLOTS]
segT last_text_seg
   struct {
struct dynreg * next
const char * name
unsigned short base
unsigned short num_regs
   } dynreg [DYNREG_NUM_TYPES]
   struct {
struct dynreg * next
const char * name
unsigned short base
unsigned short num_regs
   } in [DYNREG_NUM_TYPES]
   struct {
struct dynreg * next
const char * name
unsigned short base
unsigned short num_regs
   } loc [DYNREG_NUM_TYPES]
   struct {
struct dynreg * next
const char * name
unsigned short base
unsigned short num_regs
   } out [DYNREG_NUM_TYPES]
   struct {
struct dynreg * next
const char * name
unsigned short base
unsigned short num_regs
   } rot [DYNREG_NUM_TYPES]
flagword flags
   struct {
unsigned hint:1
bfd_vma offset
bfd_vma base
   } mem_offset
int path
const char ** entry_labels
int maxpaths
int pointer_size
int pointer_size_shift
symbolS * indregsym [IND_RR-IND_CPUID+1]
md
static unsigned char le_nop [16]
static unsigned char le_nop_stop [16]
struct {
const char * name
unsigned int regnum
ar []
struct {
const char * name
unsigned int regnum
cr []
static struct const_desc const_bits []
struct {
const char * name
unsigned int regnum
indirect_reg []
struct {
enum  pseudo_type {
  PSEUDO_FUNC_NONE, PSEUDO_FUNC_RELOC, PSEUDO_FUNC_CONST, PSEUDO_FUNC_REG,
  PSEUDO_FUNC_FLOAT
}
const char * name
enum { ... } ::pseudo_type type
union .u u
pseudo_func []
static const bfd_vma nop [IA64_NUM_UNITS]
static char special_section_name [][20]
static unsigned char best_template [N][N][N]
static struct rsrcregdeps
static int regdepslen = 0
static int regdepstotlen = 0
static const char * dv_mode [] = { "RAW", "WAW", "WAR" }
static const char * dv_sem []
static const char * dv_cmp_type [] = { "none", "OR", "AND" }
static struct qpmutexqp_mutexes
static int qp_mutexeslen = 0
static int qp_mutexestotlen = 0
static valueT qp_safe_across_calls = 0
static struct qp_implyqp_implies
static int qp_implieslen = 0
static int qp_impliestotlen = 0
static struct gr gr_values [128]
static fragS * align_frag
struct {
unw_rec_listlist
unw_rec_listtail
unw_rec_listcurrent_entry
proc_pending proc_pending
symbolS * info
symbolS * personality_routine
segT saved_text_seg
subsegT saved_text_subseg
unsigned int force_unwind_entry: 1
unsigned int prologue: 1
unsigned int prologue_mask: 4
unsigned int prologue_gr: 7
unsigned int body: 1
unsigned int insn: 1
unsigned int prologue_count
struct label_prologue_countsaved_prologue_counts
unw_p_recordpending_saves
unwind
static char * vbyte_mem_ptr = NULL
static int vbyte_count = 0
static char * special_linkonce_name []
const pseudo_typeS md_pseudo_table []
static struct pseudo_opcode pseudo_opcode []
static int defining_tag = 0

Class Documentation

struct label_fix

Definition at line 157 of file tc-ia64.c.

Collaboration diagram for label_fix:
Class Members
bfd_boolean dw2_mark_labels
struct label_fix * next
struct symbol * sym
struct const_desc

Definition at line 465 of file tc-ia64.c.

Class Members
const char * name
valueT value
struct qpmutex

Definition at line 665 of file tc-ia64.c.

Class Members
int path
valueT prmask
struct qp_imply

Definition at line 674 of file tc-ia64.c.

Class Members
unsigned p1:6
unsigned p2:6
unsigned p2_branched:1
int path
struct gr

Definition at line 685 of file tc-ia64.c.

Class Members
unsigned known:1
int path
valueT value
struct unw_rec_list

Definition at line 716 of file tc-ia64.c.

Collaboration diagram for unw_rec_list:
Class Members
struct unw_rec_list * next
unwind_record r
fragS * slot_frag
unsigned long slot_number
struct label_prologue_count

Definition at line 727 of file tc-ia64.c.

Collaboration diagram for label_prologue_count:
Class Members
unsigned long label_number
struct label_prologue_count * next
unsigned int prologue_count
struct proc_pending

Definition at line 734 of file tc-ia64.c.

Collaboration diagram for proc_pending:
Class Members
struct proc_pending * next
symbolS * sym
struct alias

Definition at line 11864 of file tc-ia64.c.

Class Members
const char * alias
char * file
unsigned int line
const char * name
union .u

Definition at line 546 of file tc-ia64.c.

Class Members
unsigned long ival
symbolS * sym

Define Documentation

#define AR_BSP   17

Definition at line 354 of file tc-ia64.c.

#define AR_BSPSTORE   18

Definition at line 355 of file tc-ia64.c.

#define AR_CCV   32

Definition at line 365 of file tc-ia64.c.

#define AR_CFLG   27

Definition at line 361 of file tc-ia64.c.

#define AR_CSD   25

Definition at line 359 of file tc-ia64.c.

#define AR_EC   66

Definition at line 371 of file tc-ia64.c.

#define AR_EFLAG   24

Definition at line 358 of file tc-ia64.c.

#define AR_FCR   21

Definition at line 357 of file tc-ia64.c.

#define AR_FDR   30

Definition at line 364 of file tc-ia64.c.

#define AR_FIR   29

Definition at line 363 of file tc-ia64.c.

#define AR_FPSR   40

Definition at line 367 of file tc-ia64.c.

#define AR_FSR   28

Definition at line 362 of file tc-ia64.c.

#define AR_ITC   44

Definition at line 368 of file tc-ia64.c.

#define AR_K0   0

Definition at line 351 of file tc-ia64.c.

#define AR_K7   7

Definition at line 352 of file tc-ia64.c.

#define AR_LC   65

Definition at line 370 of file tc-ia64.c.

#define AR_PFS   64

Definition at line 369 of file tc-ia64.c.

#define AR_RNAT   19

Definition at line 356 of file tc-ia64.c.

#define AR_RSC   16

Definition at line 353 of file tc-ia64.c.

#define AR_SSD   26

Definition at line 360 of file tc-ia64.c.

#define AR_UNAT   36

Definition at line 366 of file tc-ia64.c.

#define CR_CMCV   74

Definition at line 420 of file tc-ia64.c.

#define CR_DCR   0

Definition at line 398 of file tc-ia64.c.

#define CR_EOI   67

Definition at line 415 of file tc-ia64.c.

#define CR_GPTA   9

Definition at line 402 of file tc-ia64.c.

#define CR_IFA   20

Definition at line 406 of file tc-ia64.c.

#define CR_IFS   23

Definition at line 409 of file tc-ia64.c.

#define CR_IHA   25

Definition at line 411 of file tc-ia64.c.

#define CR_IIM   24

Definition at line 410 of file tc-ia64.c.

#define CR_IIP   19

Definition at line 405 of file tc-ia64.c.

#define CR_IIPA   22

Definition at line 408 of file tc-ia64.c.

#define CR_IPSR   16

Definition at line 403 of file tc-ia64.c.

#define CR_IRR0   68

Definition at line 416 of file tc-ia64.c.

#define CR_IRR3   71

Definition at line 417 of file tc-ia64.c.

#define CR_ISR   17

Definition at line 404 of file tc-ia64.c.

#define CR_ITIR   21

Definition at line 407 of file tc-ia64.c.

#define CR_ITM   1

Definition at line 399 of file tc-ia64.c.

#define CR_ITV   72

Definition at line 418 of file tc-ia64.c.

#define CR_IVA   2

Definition at line 400 of file tc-ia64.c.

#define CR_IVR   65

Definition at line 413 of file tc-ia64.c.

#define CR_LID   64

Definition at line 412 of file tc-ia64.c.

#define CR_LRR0   80

Definition at line 421 of file tc-ia64.c.

#define CR_LRR1   81

Definition at line 422 of file tc-ia64.c.

#define CR_PMV   73

Definition at line 419 of file tc-ia64.c.

#define CR_PTA   8

Definition at line 401 of file tc-ia64.c.

#define CR_TPR   66

Definition at line 414 of file tc-ia64.c.

#define CURR_SLOT   md.slot[md.curr_slot]

Definition at line 66 of file tc-ia64.c.

#define DV_CHK   1

Definition at line 8353 of file tc-ia64.c.

#define DV_REG   0

Definition at line 8354 of file tc-ia64.c.

#define ENCODED_PSP_OFFSET (   OFFSET)    (((OFFSET) + 16) / 4)

Definition at line 776 of file tc-ia64.c.

#define FORCE_CONST (   n)
Value:
(CURR_SLOT.opnd[n].X_op == O_constant \
                     ? CURR_SLOT.opnd[n].X_add_number \
                     : 0)
#define KNOWN (   REG)    (gr_values[REG].known && gr_values[REG].path >= path)
#define MAX_LITTLENUMS   5

Definition at line 11690 of file tc-ia64.c.

#define MAX_SPECS   256

Definition at line 8352 of file tc-ia64.c.

#define MIN (   a,
  b 
)    ((a) < (b) ? (a) : (b))

Definition at line 62 of file tc-ia64.c.

#define N   IA64_NUM_TYPES

Definition at line 633 of file tc-ia64.c.

#define NELEMS (   a)    ((int) (sizeof (a)/sizeof ((a)[0])))

Definition at line 58 of file tc-ia64.c.

#define NUM_SLOTS   4

Definition at line 64 of file tc-ia64.c.

#define O_pseudo_fixup   (O_max + 1)

Definition at line 68 of file tc-ia64.c.

#define OPTION_MAUTO_PIC   (OPTION_MD_BASE + 2)
#define OPTION_MCONSTANT_GP   (OPTION_MD_BASE + 1)
#define PREV_SLOT   md.slot[(md.curr_slot + NUM_SLOTS - 1) % NUM_SLOTS]

Definition at line 65 of file tc-ia64.c.

#define PSR_CPL   32

Definition at line 463 of file tc-ia64.c.

#define PSR_DFL   18

Definition at line 462 of file tc-ia64.c.

#define PSR_IC   13

Definition at line 461 of file tc-ia64.c.

#define PSR_MFL   4

Definition at line 460 of file tc-ia64.c.

#define SLOT_NUM_NOT_SET   (unsigned)-1

Definition at line 723 of file tc-ia64.c.

#define STATE_NONE   0

Definition at line 645 of file tc-ia64.c.

#define STATE_SRLZ   2

Definition at line 647 of file tc-ia64.c.

#define STATE_STOP   1

Definition at line 646 of file tc-ia64.c.

#define STREQ (   s)    ((len == sizeof (s) - 1) && (strncmp (str, s, sizeof (s) - 1) == 0))
#define UNHANDLED
Value:
as_warn (_("Unhandled dependency %s for %s (%s), note %d"), \
dep->name, idesc->name, (rsrc_write?"write":"read"), note)

Typedef Documentation

typedef void vbyte_func PARAMS((int, char *, char *))

Definition at line 778 of file tc-ia64.c.


Enumeration Type Documentation

Enumerator:
DYNREG_GR 
DYNREG_FR 
DYNREG_PR 
DYNREG_NUM_TYPES 

Definition at line 138 of file tc-ia64.c.

  {
    DYNREG_GR = 0,   /* dynamic general purpose register */
    DYNREG_FR,              /* dynamic floating point register */
    DYNREG_PR,              /* dynamic predicate register */
    DYNREG_NUM_TYPES
  };
Enumerator:
OPERAND_MATCH 
OPERAND_OUT_OF_RANGE 
OPERAND_MISMATCH 

Definition at line 146 of file tc-ia64.c.

enum reg_symbol
Enumerator:
REG_GR 
REG_FR 
REG_AR 
REG_CR 
REG_P 
REG_BR 
REG_IP 
REG_CFM 
REG_PR 
REG_PR_ROT 
REG_PSR 
REG_PSR_L 
REG_PSR_UM 
IND_CPUID 
IND_DBR 
IND_DTR 
IND_ITR 
IND_IBR 
IND_MSR 
IND_PKR 
IND_PMC 
IND_PMD 
IND_RR 
REG_PSP 
REG_PRIUNAT 
REG_NUM 

Definition at line 106 of file tc-ia64.c.

  {
    REG_GR    = 0,
    REG_FR    = (REG_GR + 128),
    REG_AR    = (REG_FR + 128),
    REG_CR    = (REG_AR + 128),
    REG_P     = (REG_CR + 128),
    REG_BR    = (REG_P  + 64),
    REG_IP    = (REG_BR + 8),
    REG_CFM,
    REG_PR,
    REG_PR_ROT,
    REG_PSR,
    REG_PSR_L,
    REG_PSR_UM,
    /* The following are pseudo-registers for use by gas only.  */
    IND_CPUID,
    IND_DBR,
    IND_DTR,
    IND_ITR,
    IND_IBR,
    IND_MSR,
    IND_PKR,
    IND_PMC,
    IND_PMD,
    IND_RR,
    /* The following pseudo-registers are used for unwind directives only:  */
    REG_PSP,
    REG_PRIUNAT,
    REG_NUM
  };
enum reloc_func
Enumerator:
FUNC_DTP_MODULE 
FUNC_DTP_RELATIVE 
FUNC_FPTR_RELATIVE 
FUNC_GP_RELATIVE 
FUNC_LT_RELATIVE 
FUNC_LT_RELATIVE_X 
FUNC_PC_RELATIVE 
FUNC_PLT_RELATIVE 
FUNC_SEC_RELATIVE 
FUNC_SEG_RELATIVE 
FUNC_TP_RELATIVE 
FUNC_LTV_RELATIVE 
FUNC_LT_FPTR_RELATIVE 
FUNC_LT_DTP_MODULE 
FUNC_LT_DTP_RELATIVE 
FUNC_LT_TP_RELATIVE 
FUNC_IPLT_RELOC 

Definition at line 85 of file tc-ia64.c.

Enumerator:
SPECIAL_SECTION_BSS 
SPECIAL_SECTION_SBSS 
SPECIAL_SECTION_SDATA 
SPECIAL_SECTION_RODATA 
SPECIAL_SECTION_COMMENT 
SPECIAL_SECTION_UNWIND 
SPECIAL_SECTION_UNWIND_INFO 
SPECIAL_SECTION_INIT_ARRAY 
SPECIAL_SECTION_FINI_ARRAY 

Definition at line 70 of file tc-ia64.c.


Function Documentation

static void add_qp_imply ( int  p1,
int  p2 
) [static]

Definition at line 9823 of file tc-ia64.c.

{
  valueT mask;
  valueT bit;
  int i;

  /* p0 is not meaningful here.  */
  if (p1 == 0 || p2 == 0)
    abort ();

  if (p1 == p2)
    return;

  /* If it exists already, ignore it.  */
  for (i = 0; i < qp_implieslen; i++)
    {
      if (qp_implies[i].p1 == p1
         && qp_implies[i].p2 == p2
         && qp_implies[i].path == md.path
         && !qp_implies[i].p2_branched)
       return;
    }

  if (qp_implieslen == qp_impliestotlen)
    {
      qp_impliestotlen += 20;
      qp_implies = (struct qp_imply *)
       xrealloc ((void *) qp_implies,
                qp_impliestotlen * sizeof (struct qp_imply));
    }
  if (md.debug_dv)
    fprintf (stderr, "  Registering PR%d implies PR%d\n", p1, p2);
  qp_implies[qp_implieslen].p1 = p1;
  qp_implies[qp_implieslen].p2 = p2;
  qp_implies[qp_implieslen].path = md.path;
  qp_implies[qp_implieslen++].p2_branched = 0;

  /* Add in the implied transitive relations; for everything that p2 implies,
     make p1 imply that, too; for everything that implies p1, make it imply p2
     as well.  */
  for (i = 0; i < qp_implieslen; i++)
    {
      if (qp_implies[i].p1 == p2)
       add_qp_imply (p1, qp_implies[i].p2);
      if (qp_implies[i].p2 == p1)
       add_qp_imply (qp_implies[i].p1, p2);
    }
  /* Add in mutex relations implied by this implies relation; for each mutex
     relation containing p2, duplicate it and replace p2 with p1.  */
  bit = (valueT) 1 << p1;
  mask = (valueT) 1 << p2;
  for (i = 0; i < qp_mutexeslen; i++)
    {
      if (qp_mutexes[i].prmask & mask)
       add_qp_mutex ((qp_mutexes[i].prmask & ~mask) | bit);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void add_qp_mutex ( valueT  mask) [static]

Definition at line 9887 of file tc-ia64.c.

{
  if (mask & 0x1)
    abort ();

  if (qp_mutexeslen == qp_mutexestotlen)
    {
      qp_mutexestotlen += 20;
      qp_mutexes = (struct qpmutex *)
       xrealloc ((void *) qp_mutexes,
                qp_mutexestotlen * sizeof (struct qpmutex));
    }
  if (md.debug_dv)
    {
      fprintf (stderr, "  Registering mutex on");
      print_prmask (mask);
      fprintf (stderr, "\n");
    }
  qp_mutexes[qp_mutexeslen].path = md.path;
  qp_mutexes[qp_mutexeslen++].prmask = mask;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void add_unwind_entry ( unw_rec_list ptr,
int  sep 
) [static]

Definition at line 3397 of file tc-ia64.c.

{
  if (ptr)
    {
      if (unwind.tail)
       unwind.tail->next = ptr;
      else
       unwind.list = ptr;
      unwind.tail = ptr;

      /* The current entry can in fact be a chain of unwind entries.  */
      if (unwind.current_entry == NULL)
       unwind.current_entry = ptr;
    }

  /* The current entry can in fact be a chain of unwind entries.  */
  if (unwind.current_entry == NULL)
    unwind.current_entry = ptr;

  if (sep == ',')
    {
      /* Parse a tag permitted for the current directive.  */
      int ch;

      SKIP_WHITESPACE ();
      ch = get_symbol_end ();
      /* FIXME: For now, just issue a warning that this isn't implemented.  */
      {
       static int warned;

       if (!warned)
         {
           warned = 1;
           as_warn ("Tags on unwind pseudo-ops aren't supported, yet");
         }
      }
      *input_line_pointer = ch;
    }
  if (sep != NOT_A_CHAR)
    demand_empty_rest_of_line ();
}

Here is the call graph for this function:

Here is the caller graph for this function:

static unw_rec_list* alloc_record ( unw_record_type  t) [static]

Definition at line 1824 of file tc-ia64.c.

{
  unw_rec_list *ptr;
  ptr = xmalloc (sizeof (*ptr));
  memset (ptr, 0, sizeof (*ptr));
  ptr->slot_number = SLOT_NUM_NOT_SET;
  ptr->r.type = t;
  return ptr;
}

Here is the call graph for this function:

static int ar_is_only_in_integer_unit ( int  reg) [static]

Definition at line 987 of file tc-ia64.c.

{
  reg -= REG_AR;
  return reg >= 64 && reg <= 111;
}

Here is the caller graph for this function:

static int ar_is_only_in_memory_unit ( int  reg) [static]

Definition at line 996 of file tc-ia64.c.

{
  reg -= REG_AR;
  return reg >= 0 && reg <= 47;
}

Here is the caller graph for this function:

static void build_insn ( struct slot *  slot,
bfd_vma insnp 
) [static]

Definition at line 6549 of file tc-ia64.c.

{
  const struct ia64_operand *odesc, *o2desc;
  struct ia64_opcode *idesc = slot->idesc;
  bfd_vma insn;
  bfd_signed_vma val;
  const char *err;
  int i;

  insn = idesc->opcode | slot->qp_regno;

  for (i = 0; i < NELEMS (idesc->operands) && idesc->operands[i]; ++i)
    {
      if (slot->opnd[i].X_op == O_register
         || slot->opnd[i].X_op == O_constant
         || slot->opnd[i].X_op == O_index)
       val = slot->opnd[i].X_add_number;
      else if (slot->opnd[i].X_op == O_big)
       {
         /* This must be the value 0x10000000000000000.  */
         assert (idesc->operands[i] == IA64_OPND_IMM8M1U8);
         val = 0;
       }
      else
       val = 0;

      switch (idesc->operands[i])
       {
       case IA64_OPND_IMMU64:
         *insnp++ = (val >> 22) & 0x1ffffffffffLL;
         insn |= (((val & 0x7f) << 13) | (((val >> 7) & 0x1ff) << 27)
                 | (((val >> 16) & 0x1f) << 22) | (((val >> 21) & 0x1) << 21)
                 | (((val >> 63) & 0x1) << 36));
         continue;

       case IA64_OPND_IMMU62:
         val &= 0x3fffffffffffffffULL;
         if (val != slot->opnd[i].X_add_number)
           as_warn (_("Value truncated to 62 bits"));
         *insnp++ = (val >> 21) & 0x1ffffffffffLL;
         insn |= (((val & 0xfffff) << 6) | (((val >> 20) & 0x1) << 36));
         continue;

       case IA64_OPND_TGT64:
         val >>= 4;
         *insnp++ = ((val >> 20) & 0x7fffffffffLL) << 2;
         insn |= ((((val >> 59) & 0x1) << 36)
                 | (((val >> 0) & 0xfffff) << 13));
         continue;

       case IA64_OPND_AR3:
         val -= REG_AR;
         break;

       case IA64_OPND_B1:
       case IA64_OPND_B2:
         val -= REG_BR;
         break;

       case IA64_OPND_CR3:
         val -= REG_CR;
         break;

       case IA64_OPND_F1:
       case IA64_OPND_F2:
       case IA64_OPND_F3:
       case IA64_OPND_F4:
         val -= REG_FR;
         break;

       case IA64_OPND_P1:
       case IA64_OPND_P2:
         val -= REG_P;
         break;

       case IA64_OPND_R1:
       case IA64_OPND_R2:
       case IA64_OPND_R3:
       case IA64_OPND_R3_2:
       case IA64_OPND_CPUID_R3:
       case IA64_OPND_DBR_R3:
       case IA64_OPND_DTR_R3:
       case IA64_OPND_ITR_R3:
       case IA64_OPND_IBR_R3:
       case IA64_OPND_MR3:
       case IA64_OPND_MSR_R3:
       case IA64_OPND_PKR_R3:
       case IA64_OPND_PMC_R3:
       case IA64_OPND_PMD_R3:
       case IA64_OPND_RR_R3:
         val -= REG_GR;
         break;

       default:
         break;
       }

      odesc = elf64_ia64_operands + idesc->operands[i];
      err = (*odesc->insert) (odesc, val, &insn);
      if (err)
       as_bad_where (slot->src_file, slot->src_line,
                    "Bad operand value: %s", err);
      if (idesc->flags & IA64_OPCODE_PSEUDO)
       {
         if ((idesc->flags & IA64_OPCODE_F2_EQ_F3)
             && odesc == elf64_ia64_operands + IA64_OPND_F3)
           {
             o2desc = elf64_ia64_operands + IA64_OPND_F2;
             (*o2desc->insert) (o2desc, val, &insn);
           }
         if ((idesc->flags & IA64_OPCODE_LEN_EQ_64MCNT)
             && (odesc == elf64_ia64_operands + IA64_OPND_CPOS6a
                || odesc == elf64_ia64_operands + IA64_OPND_POS6))
           {
             o2desc = elf64_ia64_operands + IA64_OPND_LEN6;
             (*o2desc->insert) (o2desc, 64 - val, &insn);
           }
       }
    }
  *insnp = insn;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static int calc_record_size ( unw_rec_list list) [static]

Definition at line 2735 of file tc-ia64.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void check_dependencies ( struct ia64_opcode idesc) [static]

Definition at line 10473 of file tc-ia64.c.

{
  const struct ia64_opcode_dependency *opdeps = idesc->dependencies;
  int path;
  int i;

  /* Note that the number of marked resources may change within the
     loop if in auto mode.  */
  i = 0;
  while (i < regdepslen)
    {
      struct rsrc *rs = &regdeps[i];
      const struct ia64_dependency *dep = rs->dependency;
      int chkind;
      int note;
      int start_over = 0;

      if (dep->semantics == IA64_DVS_NONE
         || (chkind = depends_on (rs->depind, idesc)) == -1)
       {
         ++i;
         continue;
       }

      note = NOTE (opdeps->chks[chkind]);

      /* Check this resource against each execution path seen thus far.  */
      for (path = 0; path <= md.path; path++)
       {
         int matchtype;

         /* If the dependency wasn't on the path being checked, ignore it.  */
         if (rs->path < path)
           continue;

         /* If the QP for this insn implies a QP which has branched, don't
            bother checking.  Ed. NOTE: I don't think this check is terribly
            useful; what's the point of generating code which will only be
            reached if its QP is zero?
            This code was specifically inserted to handle the following code,
            based on notes from Intel's DV checking code, where p1 implies p2.

                mov r4 = 2
            (p2) br.cond L
            (p1) mov r4 = 7
         */
         if (CURR_SLOT.qp_regno != 0)
           {
             int skip = 0;
             int implies;
             for (implies = 0; implies < qp_implieslen; implies++)
              {
                if (qp_implies[implies].path >= path
                    && qp_implies[implies].p1 == CURR_SLOT.qp_regno
                    && qp_implies[implies].p2_branched)
                  {
                    skip = 1;
                    break;
                  }
              }
             if (skip)
              continue;
           }

         if ((matchtype = resources_match (rs, idesc, note,
                                       CURR_SLOT.qp_regno, path)) != 0)
           {
             char msg[1024];
             char pathmsg[256] = "";
             char indexmsg[256] = "";
             int certain = (matchtype == 1 && CURR_SLOT.qp_regno == 0);

             if (path != 0)
              snprintf (pathmsg, sizeof (pathmsg),
                       " when entry is at label '%s'",
                      md.entry_labels[path - 1]);
             if (matchtype == 1 && rs->index >= 0)
              snprintf (indexmsg, sizeof (indexmsg),
                       ", specific resource number is %d",
                      rs->index);
             snprintf (msg, sizeof (msg),
                     "Use of '%s' %s %s dependency '%s' (%s)%s%s",
                     idesc->name,
                     (certain ? "violates" : "may violate"),
                     dv_mode[dep->mode], dep->name,
                     dv_sem[dep->semantics],
                     pathmsg, indexmsg);

             if (md.explicit_mode)
              {
                as_warn ("%s", msg);
                if (path < md.path)
                  as_warn (_("Only the first path encountering the conflict "
                            "is reported"));
                as_warn_where (rs->file, rs->line,
                             _("This is the location of the "
                               "conflicting usage"));
                /* Don't bother checking other paths, to avoid duplicating
                   the same warning */
                break;
              }
             else
              {
                if (md.debug_dv)
                  fprintf (stderr, "%s @ %s:%d\n", msg, rs->file, rs->line);

                remove_marked_resource (rs);

                /* since the set of dependencies has changed, start over */
                /* FIXME -- since we're removing dvs as we go, we
                   probably don't really need to start over...  */
                start_over = 1;
                break;
              }
           }
       }
      if (start_over)
       i = 0;
      else
       ++i;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static int check_dv ( struct ia64_opcode idesc) [static]

Definition at line 10755 of file tc-ia64.c.

{
  if (md.debug_dv)
    {
      fprintf (stderr, "Checking %s for violations (line %d, %d/%d)\n",
              idesc->name, CURR_SLOT.src_line,
              idesc->dependencies->nchks,
              idesc->dependencies->nregs);
    }

  /* Look through the list of currently marked resources; if the current
     instruction has the dependency in its chks list which uses that resource,
     check against the specific resources used.  */
  check_dependencies (idesc);

  /* Look up the instruction's regdeps (RAW writes, WAW writes, and WAR reads),
     then add them to the list of marked resources.  */
  mark_resources (idesc);

  /* There are several types of dependency semantics, and each has its own
     requirements for being cleared

     Instruction serialization (insns separated by interruption, rfi, or
     writer + srlz.i + reader, all in separate groups) clears DVS_INSTR.

     Data serialization (instruction serialization, or writer + srlz.d +
     reader, where writer and srlz.d are in separate groups) clears
     DVS_DATA. (This also clears DVS_OTHER, but that is not guaranteed to
     always be the case).

     Instruction group break (groups separated by stop, taken branch,
     interruption or rfi) clears DVS_IMPLIED and DVS_IMPLIEDF.
   */
  update_dependencies (idesc);

  /* Sometimes, knowing a register value allows us to avoid giving a false DV
     warning.  Keep track of as many as possible that are useful.  */
  note_register_values (idesc);

  /* We don't need or want this anymore.  */
  md.mem_offset.hint = 0;

  return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void check_pending_save ( void  ) [static]

Definition at line 1776 of file tc-ia64.c.

{
  if (unwind.pending_saves)
    {
      unw_rec_list *cur, *prev;

      as_warn ("Previous .save incomplete");
      for (cur = unwind.list, prev = NULL; cur; )
       if (&cur->r.record.p == unwind.pending_saves)
         {
           if (prev)
             prev->next = cur->next;
           else
             unwind.list = cur->next;
           if (cur == unwind.tail)
             unwind.tail = prev;
           if (cur == unwind.current_entry)
             unwind.current_entry = cur->next;
           /* Don't free the first discarded record, it's being used as
              terminator for (currently) br_gr and gr_gr processing, and
              also prevents leaving a dangling pointer to it in its
              predecessor.  */
           cur->r.record.p.grmask = 0;
           cur->r.record.p.brmask = 0;
           cur->r.record.p.frmask = 0;
           prev = cur->r.record.p.next;
           cur->r.record.p.next = NULL;
           cur = prev;
           break;
         }
       else
         {
           prev = cur;
           cur = cur->next;
         }
      while (cur)
       {
         prev = cur;
         cur = cur->r.record.p.next;
         free (prev);
       }
      unwind.pending_saves = NULL;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void clear_qp_branch_flag ( valueT  mask) [static]

Definition at line 9680 of file tc-ia64.c.

{
  int i;
  for (i = 0; i < regdepslen; i++)
    {
      valueT bit = ((valueT) 1 << regdeps[i].qp_regno);
      if ((bit & mask) != 0)
       {
         regdeps[i].link_to_qp_branch = 0;
       }
    }
}

Here is the caller graph for this function:

static void clear_qp_implies ( valueT  p1_mask,
valueT  p2_mask 
) [static]

Definition at line 9798 of file tc-ia64.c.

{
  int i;

  i = 0;
  while (i < qp_implieslen)
    {
      if ((((valueT) 1 << qp_implies[i].p1) & p1_mask) != 0
         || (((valueT) 1 << qp_implies[i].p2) & p2_mask) != 0)
       {
         if (md.debug_dv)
           fprintf (stderr, "Clearing implied relation PR%d->PR%d\n",
                   qp_implies[i].p1, qp_implies[i].p2);
         qp_implies[i] = qp_implies[--qp_implieslen];
       }
      else
       ++i;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void clear_qp_mutex ( valueT  mask) [static]

Definition at line 9770 of file tc-ia64.c.

{
  int i;

  i = 0;
  while (i < qp_mutexeslen)
    {
      if ((qp_mutexes[i].prmask & mask) != 0)
       {
         if (md.debug_dv)
           {
             fprintf (stderr, "  Clearing mutex relation");
             print_prmask (qp_mutexes[i].prmask);
             fprintf (stderr, "\n");
           }
         qp_mutexes[i] = qp_mutexes[--qp_mutexeslen];
       }
      else
       ++i;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void clear_register_values ( ) [static]

Definition at line 9924 of file tc-ia64.c.

{
  int i;
  if (md.debug_dv)
    fprintf (stderr, "  Clearing register values\n");
  for (i = 1; i < NELEMS (gr_values); i++)
    gr_values[i].known = 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void convert_expr_to_ab_reg ( expressionS e,
unsigned int ab,
unsigned int regp,
const char *  po,
int  n 
) const [static]

Definition at line 3198 of file tc-ia64.c.

{
  unsigned int reg = e->X_add_number;

  *ab = *regp = 0; /* Anything valid is good here.  */

  if (e->X_op != O_register)
    reg = REG_GR; /* Anything invalid is good here.  */

  if (reg >= (REG_GR + 4) && reg <= (REG_GR + 7))
    {
      *ab = 0;
      *regp = reg - REG_GR;
    }
  else if ((reg >= (REG_FR + 2) && reg <= (REG_FR + 5))
          || (reg >= (REG_FR + 16) && reg <= (REG_FR + 31)))
    {
      *ab = 1;
      *regp = reg - REG_FR;
    }
  else if (reg >= (REG_BR + 1) && reg <= (REG_BR + 5))
    {
      *ab = 2;
      *regp = reg - REG_BR;
    }
  else
    {
      *ab = 3;
      switch (reg)
       {
       case REG_PR:         *regp =  0; break;
       case REG_PSP:        *regp =  1; break;
       case REG_PRIUNAT:    *regp =  2; break;
       case REG_BR + 0:     *regp =  3; break;
       case REG_AR + AR_BSP:       *regp =  4; break;
       case REG_AR + AR_BSPSTORE: *regp = 5; break;
       case REG_AR + AR_RNAT:      *regp =  6; break;
       case REG_AR + AR_UNAT:      *regp =  7; break;
       case REG_AR + AR_FPSR:      *regp =  8; break;
       case REG_AR + AR_PFS:       *regp =  9; break;
       case REG_AR + AR_LC: *regp = 10; break;

       default:
         as_bad ("Operand %d to .%s must be a preserved register", n, po);
         break;
       }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void convert_expr_to_xy_reg ( expressionS e,
unsigned int xy,
unsigned int regp,
const char *  po,
int  n 
) const [static]

Definition at line 3253 of file tc-ia64.c.

{
  unsigned int reg = e->X_add_number;

  *xy = *regp = 0; /* Anything valid is good here.  */

  if (e->X_op != O_register)
    reg = REG_GR; /* Anything invalid is good here.  */

  if (reg >= (REG_GR + 1) && reg <= (REG_GR + 127))
    {
      *xy = 0;
      *regp = reg - REG_GR;
    }
  else if (reg >= (REG_FR + 2) && reg <= (REG_FR + 127))
    {
      *xy = 1;
      *regp = reg - REG_FR;
    }
  else if (reg >= REG_BR && reg <= (REG_BR + 7))
    {
      *xy = 2;
      *regp = reg - REG_BR;
    }
  else
    as_bad ("Operand %d to .%s must be a writable register", n, po);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void count_output ( int  count,
ptr  ,
comment   
)

Definition at line 1230 of file tc-ia64.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void cross_section ( int  ref,
cons  ,
int  ua 
) [static]

Definition at line 4975 of file tc-ia64.c.

{
  char *start, *end;
  int saved_auto_align;
  unsigned int section_count;

  SKIP_WHITESPACE ();
  start = input_line_pointer;
  if (*start == '"')
    {
      int len;
      char *name;

      name = demand_copy_C_string (&len);
      obstack_free(&notes, name);
      if (!name)
       {
         ignore_rest_of_line ();
         return;
       }
    }
  else
    {
      char c = get_symbol_end ();

      if (input_line_pointer == start)
       {
         as_bad ("Missing section name");
         ignore_rest_of_line ();
         return;
       }
      *input_line_pointer = c;
    }
  end = input_line_pointer;
  SKIP_WHITESPACE ();
  if (*input_line_pointer != ',')
    {
      as_bad ("Comma expected after section name");
      ignore_rest_of_line ();
      return;
    }
  *end = '\0';
  end = input_line_pointer + 1;           /* skip comma */
  input_line_pointer = start;
  md.keep_pending_output = 1;
  section_count = bfd_count_sections(stdoutput);
  obj_elf_section (0);
  if (section_count != bfd_count_sections(stdoutput))
    as_warn ("Creating sections with .xdataN/.xrealN/.xstringZ is deprecated.");
  input_line_pointer = end;
  saved_auto_align = md.auto_align;
  if (ua)
    md.auto_align = 0;
  (*cons) (ref);
  if (ua)
    md.auto_align = saved_auto_align;
  obj_elf_previous (0);
  md.keep_pending_output = 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void data_serialization ( ) [static]

Definition at line 10374 of file tc-ia64.c.

{
  int i = 0;
  if (md.debug_dv)
    fprintf (stderr, "  Data serialization\n");
  while (i < regdepslen)
    {
      if (regdeps[i].data_srlz == STATE_STOP
         /* Note: as of 991210, all "other" dependencies are cleared by a
            data serialization.  This might change with new tables */
         || (regdeps[i].dependency)->semantics == IA64_DVS_OTHER)
       {
         print_dependency ("Removing", i);
         regdeps[i] = regdeps[--regdepslen];
       }
      else
       ++i;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static symbolS* declare_register ( char *  name,
unsigned int  regnum 
) const [static]

Definition at line 5609 of file tc-ia64.c.

{
  const char *err;
  symbolS *sym;

  sym = symbol_create (name, reg_section, regnum, &zero_address_frag);

  err = hash_insert (md.reg_hash, S_GET_NAME (sym), (PTR) sym);
  if (err)
    as_fatal ("Inserting \"%s\" into register table failed: %s",
             name, err);

  return sym;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void declare_register_set ( char *  prefix,
unsigned int  num_regs,
unsigned int  base_regnum 
) const [static]

Definition at line 5627 of file tc-ia64.c.

{
  char name[8];
  unsigned int i;

  for (i = 0; i < num_regs; ++i)
    {
      snprintf (name, sizeof (name), "%s%u", prefix, i);
      declare_register (name, base_regnum + i);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static int depends_on ( int  depind,
struct ia64_opcode idesc 
) [static]

Definition at line 8290 of file tc-ia64.c.

{
  int i;
  const struct ia64_opcode_dependency *dep = idesc->dependencies;
  for (i = 0; i < dep->nchks; i++)
    {
      if (depind == DEP (dep->chks[i]))
       return i;
    }
  return -1;
}

Here is the caller graph for this function:

static void do_alias ( const char *  alias,
PTR  value 
) [static]

Definition at line 11986 of file tc-ia64.c.

{
  struct alias *h = (struct alias *) value;
  symbolS *sym = symbol_find (h->name);

  if (sym == NULL)
    as_warn_where (h->file, h->line,
                 _("symbol `%s' aliased to `%s' is not used"),
                 h->name, alias);
    else
      S_SET_NAME (sym, (char *) alias);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void do_secalias ( const char *  alias,
PTR  value 
) [static]

Definition at line 12008 of file tc-ia64.c.

{
  struct alias *h = (struct alias *) value;
  segT sec = bfd_get_section_by_name (stdoutput, h->name);

  if (sec == NULL)
    as_warn_where (h->file, h->line,
                 _("section `%s' aliased to `%s' is not used"),
                 h->name, alias);
  else
    sec->name = alias;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void dot_alias ( int  section) [static]

Definition at line 11874 of file tc-ia64.c.

{
  char *name, *alias;
  char delim;
  char *end_name;
  int len;
  const char *error_string;
  struct alias *h;
  const char *a;
  struct hash_control *ahash, *nhash;
  const char *kind;

  name = input_line_pointer;
  delim = get_symbol_end ();
  end_name = input_line_pointer;
  *end_name = delim;

  if (name == end_name)
    {
      as_bad (_("expected symbol name"));
      ignore_rest_of_line ();
      return;
    }

  SKIP_WHITESPACE ();

  if (*input_line_pointer != ',')
    {
      *end_name = 0;
      as_bad (_("expected comma after \"%s\""), name);
      *end_name = delim;
      ignore_rest_of_line ();
      return;
    }

  input_line_pointer++;
  *end_name = 0;
  ia64_canonicalize_symbol_name (name);

  /* We call demand_copy_C_string to check if alias string is valid.
     There should be a closing `"' and no `\0' in the string.  */
  alias = demand_copy_C_string (&len);
  if (alias == NULL)
    {
      ignore_rest_of_line ();
      return;
    }

  /* Make a copy of name string.  */
  len = strlen (name) + 1;
  obstack_grow (&notes, name, len);
  name = obstack_finish (&notes);

  if (section)
    {
      kind = "section";
      ahash = secalias_hash;
      nhash = secalias_name_hash;
    }
  else
    {
      kind = "symbol";
      ahash = alias_hash;
      nhash = alias_name_hash;
    }

  /* Check if alias has been used before.  */
  h = (struct alias *) hash_find (ahash, alias);
  if (h)
    {
      if (strcmp (h->name, name))
       as_bad (_("`%s' is already the alias of %s `%s'"),
              alias, kind, h->name);
      goto out;
    }

  /* Check if name already has an alias.  */
  a = (const char *) hash_find (nhash, name);
  if (a)
    {
      if (strcmp (a, alias))
       as_bad (_("%s `%s' already has an alias `%s'"), kind, name, a);
      goto out;
    }

  h = (struct alias *) xmalloc (sizeof (struct alias));
  as_where (&h->file, &h->line);
  h->name = name;
  
  error_string = hash_jam (ahash, alias, (PTR) h);
  if (error_string)
    {
      as_fatal (_("inserting \"%s\" into %s alias hash table failed: %s"),
              alias, kind, error_string);
      goto out;
    }

  error_string = hash_jam (nhash, name, (PTR) alias);
  if (error_string)
    {
      as_fatal (_("inserting \"%s\" into %s name hash table failed: %s"),
              alias, kind, error_string);
out:
      obstack_free (&notes, name);
      obstack_free (&notes, alias);
    }

  demand_empty_rest_of_line ();
}

Here is the call graph for this function:

static void dot_align ( int  arg) [static]

Definition at line 3287 of file tc-ia64.c.

{
  /* The current frag is an alignment frag.  */
  align_frag = frag_now;
  s_align_bytes (arg);
}

Here is the call graph for this function:

static void dot_altrp ( dummy  ) [static]

Definition at line 3901 of file tc-ia64.c.

{
  expressionS e;
  unsigned reg;

  if (!in_prologue ("altrp"))
    return;

  parse_operand (&e, 0);
  reg = e.X_add_number - REG_BR;
  if (e.X_op != O_register || reg > 7)
    {
      as_bad ("First operand to .altrp not a valid branch register");
      reg = 0;
    }
  add_unwind_entry (output_rp_br (reg), 0);
}

Here is the call graph for this function:

static void dot_body ( dummy  ) [static]

Definition at line 4484 of file tc-ia64.c.

{
  if (!in_procedure ("body"))
    return;
  if (!unwind.prologue && !unwind.body && unwind.insn)
    as_warn ("Initial .body should precede any instructions");
  check_pending_save ();

  unwind.prologue = 0;
  unwind.prologue_mask = 0;
  unwind.body = 1;

  add_unwind_entry (output_body (), 0);
}

Here is the call graph for this function:

static void dot_byteorder ( int  byteorder) [static]

Definition at line 4903 of file tc-ia64.c.

{
  segment_info_type *seginfo = seg_info (now_seg);

  if (byteorder == -1)
    {
      if (seginfo->tc_segment_info_data.endian == 0)
       seginfo->tc_segment_info_data.endian = default_big_endian ? 1 : 2;
      byteorder = seginfo->tc_segment_info_data.endian == 1;
    }
  else
    seginfo->tc_segment_info_data.endian = byteorder ? 1 : 2;

  if (target_big_endian != byteorder)
    {
      target_big_endian = byteorder;
      if (target_big_endian)
       {
         ia64_number_to_chars = number_to_chars_bigendian;
         ia64_float_to_chars = ia64_float_to_chars_bigendian;
       }
      else
       {
         ia64_number_to_chars = number_to_chars_littleendian;
         ia64_float_to_chars = ia64_float_to_chars_littleendian;
       }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void dot_copy_state ( dummy  ) [static]

Definition at line 4342 of file tc-ia64.c.

{
  expressionS e;

  if (!in_body ("copy_state"))
    return;

  parse_operand (&e, 0);
  if (e.X_op == O_constant)
    unwind.prologue_count = get_saved_prologue_count (e.X_add_number);
  else
    {
      as_bad ("Operand to .copy_state must be a constant");
      e.X_add_number = 0;
    }
  add_unwind_entry (output_copy_state (e.X_add_number), 0);
}

Here is the call graph for this function:

static void dot_dv_mode ( int  type) [static]

Definition at line 5173 of file tc-ia64.c.

{
  if (md.manual_bundling)
    as_warn (_("Directive invalid within a bundle"));

  if (type == 'E' || type == 'A')
    md.mode_explicitly_set = 0;
  else
    md.mode_explicitly_set = 1;

  md.detect_dv = 1;
  switch (type)
    {
    case 'A':
    case 'a':
      if (md.explicit_mode)
       insn_group_break (1, 0, 0);
      md.explicit_mode = 0;
      break;
    case 'E':
    case 'e':
      if (!md.explicit_mode)
       insn_group_break (1, 0, 0);
      md.explicit_mode = 1;
      break;
    default:
    case 'd':
      if (md.explicit_mode != md.default_explicit_mode)
       insn_group_break (1, 0, 0);
      md.explicit_mode = md.default_explicit_mode;
      md.mode_explicitly_set = 0;
      break;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void dot_endp ( dummy  ) [static]

Definition at line 4571 of file tc-ia64.c.

{
  expressionS e;
  int bytes_per_address;
  long where;
  segT saved_seg;
  subsegT saved_subseg;
  proc_pending *pending;
  int unwind_check = md.unwind_check;

  md.unwind_check = unwind_check_error;
  if (!in_procedure ("endp"))
    return;
  md.unwind_check = unwind_check;

  if (unwind.saved_text_seg)
    {
      saved_seg = unwind.saved_text_seg;
      saved_subseg = unwind.saved_text_subseg;
      unwind.saved_text_seg = NULL;
    }
  else
    {
      saved_seg = now_seg;
      saved_subseg = now_subseg;
    }

  insn_group_break (1, 0, 0);

  /* If there wasn't a .handlerdata, we haven't generated an image yet.  */
  if (!unwind.info)
    generate_unwind_image (saved_seg);

  if (unwind.info || unwind.force_unwind_entry)
    {
      symbolS *proc_end;

      subseg_set (md.last_text_seg, 0);
      proc_end = expr_build_dot ();

      start_unwind_section (saved_seg, SPECIAL_SECTION_UNWIND);

      /* Make sure that section has 4 byte alignment for ILP32 and
         8 byte alignment for LP64.  */
      record_alignment (now_seg, md.pointer_size_shift);

      /* Need space for 3 pointers for procedure start, procedure end,
        and unwind info.  */
      memset (frag_more (3 * md.pointer_size), 0, 3 * md.pointer_size);
      where = frag_now_fix () - (3 * md.pointer_size);
      bytes_per_address = bfd_arch_bits_per_address (stdoutput) / 8;

      /* Issue the values of  a) Proc Begin, b) Proc End, c) Unwind Record.  */
      e.X_op = O_pseudo_fixup;
      e.X_op_symbol = pseudo_func[FUNC_SEG_RELATIVE].u.sym;
      e.X_add_number = 0;
      if (!S_IS_LOCAL (unwind.proc_pending.sym)
         && S_IS_DEFINED (unwind.proc_pending.sym))
       e.X_add_symbol = symbol_temp_new (S_GET_SEGMENT (unwind.proc_pending.sym),
                                     S_GET_VALUE (unwind.proc_pending.sym),
                                     symbol_get_frag (unwind.proc_pending.sym));
      else
       e.X_add_symbol = unwind.proc_pending.sym;
      ia64_cons_fix_new (frag_now, where, bytes_per_address, &e);

      e.X_op = O_pseudo_fixup;
      e.X_op_symbol = pseudo_func[FUNC_SEG_RELATIVE].u.sym;
      e.X_add_number = 0;
      e.X_add_symbol = proc_end;
      ia64_cons_fix_new (frag_now, where + bytes_per_address,
                      bytes_per_address, &e);

      if (unwind.info)
       {
         e.X_op = O_pseudo_fixup;
         e.X_op_symbol = pseudo_func[FUNC_SEG_RELATIVE].u.sym;
         e.X_add_number = 0;
         e.X_add_symbol = unwind.info;
         ia64_cons_fix_new (frag_now, where + (bytes_per_address * 2),
                          bytes_per_address, &e);
       }
    }
  subseg_set (saved_seg, saved_subseg);

  /* Set symbol sizes.  */
  pending = &unwind.proc_pending;
  if (S_GET_NAME (pending->sym))
    {
      do
       {
         symbolS *sym = pending->sym;

         if (!S_IS_DEFINED (sym))
           as_bad ("`%s' was not defined within procedure", S_GET_NAME (sym));
         else if (S_GET_SIZE (sym) == 0
                 && symbol_get_obj (sym)->size == NULL)
           {
             fragS *frag = symbol_get_frag (sym);

             if (frag)
              {
                if (frag == frag_now && SEG_NORMAL (now_seg))
                  S_SET_SIZE (sym, frag_now_fix () - S_GET_VALUE (sym));
                else
                  {
                    symbol_get_obj (sym)->size =
                     (expressionS *) xmalloc (sizeof (expressionS));
                    symbol_get_obj (sym)->size->X_op = O_subtract;
                    symbol_get_obj (sym)->size->X_add_symbol
                     = symbol_new (FAKE_LABEL_NAME, now_seg,
                                  frag_now_fix (), frag_now);
                    symbol_get_obj (sym)->size->X_op_symbol = sym;
                    symbol_get_obj (sym)->size->X_add_number = 0;
                  }
              }
           }
       } while ((pending = pending->next) != NULL);
    }

  /* Parse names of main and alternate entry points.  */
  while (1)
    {
      char *name, *p, c;

      SKIP_WHITESPACE ();
      name = input_line_pointer;
      c = get_symbol_end ();
      p = input_line_pointer;
      if (!*name)
       (md.unwind_check == unwind_check_warning
        ? as_warn
        : as_bad) ("Empty argument of .endp");
      else
       {
         symbolS *sym = symbol_find (name);

         for (pending = &unwind.proc_pending; pending; pending = pending->next)
           {
             if (sym == pending->sym)
              {
                pending->sym = NULL;
                break;
              }
           }
         if (!sym || !pending)
           as_warn ("`%s' was not specified with previous .proc", name);
       }
      *p = c;
      SKIP_WHITESPACE ();
      if (*input_line_pointer != ',')
       break;
      ++input_line_pointer;
    }
  demand_empty_rest_of_line ();

  /* Deliberately only checking for the main entry point here; the
     language spec even says all arguments to .endp are ignored.  */
  if (unwind.proc_pending.sym
      && S_GET_NAME (unwind.proc_pending.sym)
      && strcmp (S_GET_NAME (unwind.proc_pending.sym), FAKE_LABEL_NAME))
    as_warn ("`%s' should be an operand to this .endp",
            S_GET_NAME (unwind.proc_pending.sym));
  while (unwind.proc_pending.next)
    {
      pending = unwind.proc_pending.next;
      unwind.proc_pending.next = pending->next;
      free (pending);
    }
  unwind.proc_pending.sym = unwind.info = NULL;
}

Here is the call graph for this function:

static void dot_entry ( dummy  ) [static]

Definition at line 5398 of file tc-ia64.c.

{
  const char *err;
  char *name;
  int c;
  symbolS *symbolP;

  do
    {
      name = input_line_pointer;
      c = get_symbol_end ();
      symbolP = symbol_find_or_make (name);

      err = hash_insert (md.entry_hash, S_GET_NAME (symbolP), (PTR) symbolP);
      if (err)
       as_fatal (_("Inserting \"%s\" into entry hint table failed: %s"),
                name, err);

      *input_line_pointer = c;
      SKIP_WHITESPACE ();
      c = *input_line_pointer;
      if (c == ',')
       {
         input_line_pointer++;
         SKIP_WHITESPACE ();
         if (*input_line_pointer == '\n')
           c = '\n';
       }
    }
  while (c == ',');

  demand_empty_rest_of_line ();
}

Here is the call graph for this function:

static void dot_fframe ( dummy  ) [static]

Definition at line 3442 of file tc-ia64.c.

{
  expressionS e;
  int sep;

  if (!in_prologue ("fframe"))
    return;

  sep = parse_operand (&e, ',');

  if (e.X_op != O_constant)
    {
      as_bad ("First operand to .fframe must be a constant");
      e.X_add_number = 0;
    }
  add_unwind_entry (output_mem_stack_f (e.X_add_number), sep);
}

Here is the call graph for this function:

static void dot_handlerdata ( dummy  ) [static]

Definition at line 3872 of file tc-ia64.c.

{
  if (!in_procedure ("handlerdata"))
    return;
  unwind.force_unwind_entry = 1;

  /* Remember which segment we're in so we can switch back after .endp */
  unwind.saved_text_seg = now_seg;
  unwind.saved_text_subseg = now_subseg;

  /* Generate unwind info into unwind-info section and then leave that
     section as the currently active one so dataXX directives go into
     the language specific data area of the unwind info block.  */
  generate_unwind_image (now_seg);
  demand_empty_rest_of_line ();
}

Here is the call graph for this function:

static void dot_label_state ( dummy  ) [static]

Definition at line 4322 of file tc-ia64.c.

{
  expressionS e;

  if (!in_body ("label_state"))
    return;

  parse_operand (&e, 0);
  if (e.X_op == O_constant)
    save_prologue_count (e.X_add_number, unwind.prologue_count);
  else
    {
      as_bad ("Operand to .label_state must be a constant");
      e.X_add_number = 0;
    }
  add_unwind_entry (output_label_state (e.X_add_number), 0);
}

Here is the call graph for this function:

static void dot_ln ( dummy  ) [static]

Definition at line 4967 of file tc-ia64.c.

Here is the call graph for this function:

static void dot_loc ( int  x) [static]

Definition at line 3319 of file tc-ia64.c.

{
  CURR_SLOT.loc_directive_seen = 1;
  dwarf2_directive_loc (x);
}

Here is the call graph for this function:

static void dot_mem_offset ( dummy  ) [static]

Definition at line 5437 of file tc-ia64.c.

{
  md.mem_offset.hint = 1;
  md.mem_offset.offset = get_absolute_expression ();
  if (*input_line_pointer != ',')
    {
      as_bad (_("Comma expected"));
      ignore_rest_of_line ();
      return;
    }
  ++input_line_pointer;
  md.mem_offset.base = get_absolute_expression ();
  demand_empty_rest_of_line ();
}

Here is the call graph for this function:

static void dot_personality ( dummy  ) [static]

Definition at line 4393 of file tc-ia64.c.

{
  char *name, *p, c;
  if (!in_procedure ("personality"))
    return;
  SKIP_WHITESPACE ();
  name = input_line_pointer;
  c = get_symbol_end ();
  p = input_line_pointer;
  unwind.personality_routine = symbol_find_or_make (name);
  unwind.force_unwind_entry = 1;
  *p = c;
  SKIP_WHITESPACE ();
  demand_empty_rest_of_line ();
}

Here is the call graph for this function:

static void dot_pred_rel ( int  type) [static]

Definition at line 5233 of file tc-ia64.c.

{
  valueT mask = 0;
  int count = 0;
  int p1 = -1, p2 = -1;

  if (type == 0)
    {
      if (*input_line_pointer == '"')
       {
         int len;
         char *form = demand_copy_C_string (&len);

         if (strcmp (form, "mutex") == 0)
           type = 'm';
         else if (strcmp (form, "clear") == 0)
           type = 'c';
         else if (strcmp (form, "imply") == 0)
           type = 'i';
         obstack_free (&notes, form);
       }
      else if (*input_line_pointer == '@')
       {
         char *form = ++input_line_pointer;
         char c = get_symbol_end();

         if (strcmp (form, "mutex") == 0)
           type = 'm';
         else if (strcmp (form, "clear") == 0)
           type = 'c';
         else if (strcmp (form, "imply") == 0)
           type = 'i';
         *input_line_pointer = c;
       }
      else
       {
         as_bad (_("Missing predicate relation type"));
         ignore_rest_of_line ();
         return;
       }
      if (type == 0)
       {
         as_bad (_("Unrecognized predicate relation type"));
         ignore_rest_of_line ();
         return;
       }
      if (*input_line_pointer == ',')
       ++input_line_pointer;
      SKIP_WHITESPACE ();
    }

  SKIP_WHITESPACE ();
  while (1)
    {
      valueT bits = 1;
      int regno;
      expressionS pr, *pr1, *pr2;

      expression_and_evaluate (&pr);
      if (pr.X_op == O_register
         && pr.X_add_number >= REG_P
         && pr.X_add_number <= REG_P + 63)
       {
         regno = pr.X_add_number - REG_P;
         bits <<= regno;
         count++;
         if (p1 == -1)
           p1 = regno;
         else if (p2 == -1)
           p2 = regno;
       }
      else if (type != 'i'
         && pr.X_op == O_subtract
         && (pr1 = symbol_get_value_expression (pr.X_add_symbol))
         && pr1->X_op == O_register
         && pr1->X_add_number >= REG_P
         && pr1->X_add_number <= REG_P + 63
         && (pr2 = symbol_get_value_expression (pr.X_op_symbol))
         && pr2->X_op == O_register
         && pr2->X_add_number >= REG_P
         && pr2->X_add_number <= REG_P + 63)
       {
         /* It's a range.  */
         int stop;

         regno = pr1->X_add_number - REG_P;
         stop = pr2->X_add_number - REG_P;
         if (regno >= stop)
           {
             as_bad (_("Bad register range"));
             ignore_rest_of_line ();
             return;
           }
         bits = ((bits << stop) << 1) - (bits << regno);
         count += stop - regno + 1;
       }
      else
       {
         as_bad (_("Predicate register expected"));
         ignore_rest_of_line ();
         return;
       }
      if (mask & bits)
       as_warn (_("Duplicate predicate register ignored"));
      mask |= bits;
      if (*input_line_pointer != ',')
       break;
      ++input_line_pointer;
      SKIP_WHITESPACE ();
    }

  switch (type)
    {
    case 'c':
      if (count == 0)
       mask = ~(valueT) 0;
      clear_qp_mutex (mask);
      clear_qp_implies (mask, (valueT) 0);
      break;
    case 'i':
      if (count != 2 || p1 == -1 || p2 == -1)
       as_bad (_("Predicate source and target required"));
      else if (p1 == 0 || p2 == 0)
       as_bad (_("Use of p0 is not valid in this context"));
      else
       add_qp_imply (p1, p2);
      break;
    case 'm':
      if (count < 2)
       {
         as_bad (_("At least two PR arguments expected"));
         break;
       }
      else if (mask & 1)
       {
         as_bad (_("Use of p0 is not valid in this context"));
         break;
       }
      add_qp_mutex (mask);
      break;
    case 's':
      /* note that we don't override any existing relations */
      if (count == 0)
       {
         as_bad (_("At least one PR argument expected"));
         break;
       }
      if (md.debug_dv)
       {
         fprintf (stderr, "Safe across calls: ");
         print_prmask (mask);
         fprintf (stderr, "\n");
       }
      qp_safe_across_calls = mask;
      break;
    }
  demand_empty_rest_of_line ();
}

Here is the call graph for this function:

static void dot_proc ( dummy  ) [static]

Definition at line 4411 of file tc-ia64.c.

{
  char *name, *p, c;
  symbolS *sym;
  proc_pending *pending, *last_pending;

  if (unwind.proc_pending.sym)
    {
      (md.unwind_check == unwind_check_warning
       ? as_warn
       : as_bad) ("Missing .endp after previous .proc");
      while (unwind.proc_pending.next)
       {
         pending = unwind.proc_pending.next;
         unwind.proc_pending.next = pending->next;
         free (pending);
       }
    }
  last_pending = NULL;

  /* Parse names of main and alternate entry points and mark them as
     function symbols:  */
  while (1)
    {
      SKIP_WHITESPACE ();
      name = input_line_pointer;
      c = get_symbol_end ();
      p = input_line_pointer;
      if (!*name)
       as_bad ("Empty argument of .proc");
      else
       {
         sym = symbol_find_or_make (name);
         if (S_IS_DEFINED (sym))
           as_bad ("`%s' was already defined", name);
         else if (!last_pending)
           {
             unwind.proc_pending.sym = sym;
             last_pending = &unwind.proc_pending;
           }
         else
           {
             pending = xmalloc (sizeof (*pending));
             pending->sym = sym;
             last_pending = last_pending->next = pending;
           }
         symbol_get_bfdsym (sym)->flags |= BSF_FUNCTION;
       }
      *p = c;
      SKIP_WHITESPACE ();
      if (*input_line_pointer != ',')
       break;
      ++input_line_pointer;
    }
  if (!last_pending)
    {
      unwind.proc_pending.sym = expr_build_dot ();
      last_pending = &unwind.proc_pending;
    }
  last_pending->next = NULL;
  demand_empty_rest_of_line ();
  ia64_do_align (16);

  unwind.prologue = 0;
  unwind.prologue_count = 0;
  unwind.body = 0;
  unwind.insn = 0;
  unwind.list = unwind.tail = unwind.current_entry = NULL;
  unwind.personality_routine = 0;
}

Here is the call graph for this function:

static void dot_prologue ( dummy  ) [static]

Definition at line 4501 of file tc-ia64.c.

{
  unsigned mask = 0, grsave = 0;

  if (!in_procedure ("prologue"))
    return;
  if (unwind.prologue)
    {
      as_bad (".prologue within prologue");
      ignore_rest_of_line ();
      return;
    }
  if (!unwind.body && unwind.insn)
    as_warn ("Initial .prologue should precede any instructions");

  if (!is_it_end_of_statement ())
    {
      expressionS e;
      int n, sep = parse_operand (&e, ',');

      if (e.X_op != O_constant
         || e.X_add_number < 0
         || e.X_add_number > 0xf)
       as_bad ("First operand to .prologue must be a positive 4-bit constant");
      else if (e.X_add_number == 0)
       as_warn ("Pointless use of zero first operand to .prologue");
      else
       mask = e.X_add_number;
       n = popcount (mask);

      if (sep == ',')
       parse_operand (&e, 0);
      else
       e.X_op = O_absent;
      if (e.X_op == O_constant
         && e.X_add_number >= 0
         && e.X_add_number < 128)
       {
         if (md.unwind_check == unwind_check_error)
           as_warn ("Using a constant as second operand to .prologue is deprecated");
         grsave = e.X_add_number;
       }
      else if (e.X_op != O_register
              || (grsave = e.X_add_number - REG_GR) > 127)
       {
         as_bad ("Second operand to .prologue must be a general register");
         grsave = 0;
       }
      else if (grsave > 128U - n)
       {
         as_bad ("Second operand to .prologue must be the first of %d general registers", n);
         grsave = 0;
       }

    }

  if (mask)
    add_unwind_entry (output_prologue_gr (mask, grsave), 0);
  else
    add_unwind_entry (output_prologue (), 0);

  unwind.prologue = 1;
  unwind.prologue_mask = mask;
  unwind.prologue_gr = grsave;
  unwind.body = 0;
  ++unwind.prologue_count;
}

Here is the call graph for this function:

static void dot_psr ( dummy  ) [static]

Definition at line 4934 of file tc-ia64.c.

{
  char *option;
  int ch;

  while (1)
    {
      option = input_line_pointer;
      ch = get_symbol_end ();
      if (strcmp (option, "lsb") == 0)
       md.flags &= ~EF_IA_64_BE;
      else if (strcmp (option, "msb") == 0)
       md.flags |= EF_IA_64_BE;
      else if (strcmp (option, "abi32") == 0)
       md.flags &= ~EF_IA_64_ABI64;
      else if (strcmp (option, "abi64") == 0)
       md.flags |= EF_IA_64_ABI64;
      else
       as_bad ("Unknown psr option `%s'", option);
      *input_line_pointer = ch;

      SKIP_WHITESPACE ();
      if (*input_line_pointer != ',')
       break;

      ++input_line_pointer;
      SKIP_WHITESPACE ();
    }
  demand_empty_rest_of_line ();
}

Here is the call graph for this function:

static void dot_radix ( dummy  ) [static]

Definition at line 3295 of file tc-ia64.c.

{
  char *radix;
  int ch;

  SKIP_WHITESPACE ();

  if (is_it_end_of_statement ())
    return;
  radix = input_line_pointer;
  ch = get_symbol_end ();
  ia64_canonicalize_symbol_name (radix);
  if (strcasecmp (radix, "C"))
    as_bad ("Radix `%s' unsupported or invalid", radix);
  *input_line_pointer = ch;
  demand_empty_rest_of_line ();
}

Here is the call graph for this function:

static void dot_reg_val ( dummy  ) [static]

Definition at line 5115 of file tc-ia64.c.

{
  expressionS reg;

  expression_and_evaluate (&reg);
  if (reg.X_op != O_register)
    {
      as_bad (_("Register name expected"));
      ignore_rest_of_line ();
    }
  else if (*input_line_pointer++ != ',')
    {
      as_bad (_("Comma expected"));
      ignore_rest_of_line ();
    }
  else
    {
      valueT value = get_absolute_expression ();
      int regno = reg.X_add_number;
      if (regno <= REG_GR || regno > REG_GR + 127)
       as_warn (_("Register value annotation ignored"));
      else
       {
         gr_values[regno - REG_GR].known = 1;
         gr_values[regno - REG_GR].value = value;
         gr_values[regno - REG_GR].path = md.path;
       }
    }
  demand_empty_rest_of_line ();
}

Here is the call graph for this function:

static void dot_regstk ( dummy  ) [static]

Definition at line 4751 of file tc-ia64.c.

{
  int ins, locs, outs, rots;

  if (is_it_end_of_statement ())
    ins = locs = outs = rots = 0;
  else
    {
      ins = get_absolute_expression ();
      if (*input_line_pointer++ != ',')
       goto err;
      locs = get_absolute_expression ();
      if (*input_line_pointer++ != ',')
       goto err;
      outs = get_absolute_expression ();
      if (*input_line_pointer++ != ',')
       goto err;
      rots = get_absolute_expression ();
    }
  set_regstack (ins, locs, outs, rots);
  return;

 err:
  as_bad ("Comma expected");
  ignore_rest_of_line ();
}

Here is the call graph for this function:

static void dot_restore ( dummy  ) [static]

Definition at line 3601 of file tc-ia64.c.

{
  expressionS e1;
  unsigned long ecount;     /* # of _additional_ regions to pop */
  int sep;

  if (!in_body ("restore"))
    return;

  sep = parse_operand (&e1, ',');
  if (e1.X_op != O_register || e1.X_add_number != REG_GR + 12)
    as_bad ("First operand to .restore must be stack pointer (sp)");

  if (sep == ',')
    {
      expressionS e2;

      sep = parse_operand (&e2, ',');
      if (e2.X_op != O_constant || e2.X_add_number < 0)
       {
         as_bad ("Second operand to .restore must be a constant >= 0");
         e2.X_add_number = 0;
       }
      ecount = e2.X_add_number;
    }
  else
    ecount = unwind.prologue_count - 1;

  if (ecount >= unwind.prologue_count)
    {
      as_bad ("Epilogue count of %lu exceeds number of nested prologues (%u)",
             ecount + 1, unwind.prologue_count);
      ecount = 0;
    }

  add_unwind_entry (output_epilogue (ecount), sep);

  if (ecount < unwind.prologue_count)
    unwind.prologue_count -= ecount + 1;
  else
    unwind.prologue_count = 0;
}

Here is the call graph for this function:

static void dot_restorereg ( int  pred) [static]

Definition at line 3646 of file tc-ia64.c.

{
  unsigned int qp, ab, reg;
  expressionS e;
  int sep;
  const char * const po = pred ? "restorereg.p" : "restorereg";

  if (!in_procedure (po))
    return;

  if (pred)
    sep = parse_predicate_and_operand (&e, &qp, po);
  else
    {
      sep = parse_operand (&e, ',');
      qp = 0;
    }
  convert_expr_to_ab_reg (&e, &ab, &reg, po, 1 + pred);

  add_unwind_entry (output_spill_reg (ab, reg, 0, 0, qp), sep);
}

Here is the call graph for this function:

static void dot_rot ( int  type) [static]

Definition at line 4780 of file tc-ia64.c.

{
  offsetT num_regs;
  valueT num_alloced = 0;
  struct dynreg **drpp, *dr;
  int ch, base_reg = 0;
  char *name, *start;
  size_t len;

  switch (type)
    {
    case DYNREG_GR: base_reg = REG_GR + 32; break;
    case DYNREG_FR: base_reg = REG_FR + 32; break;
    case DYNREG_PR: base_reg = REG_P + 16; break;
    default: break;
    }

  /* First, remove existing names from hash table.  */
  for (dr = md.dynreg[type]; dr && dr->num_regs; dr = dr->next)
    {
      hash_delete (md.dynreg_hash, dr->name);
      /* FIXME: Free dr->name.  */
      dr->num_regs = 0;
    }

  drpp = &md.dynreg[type];
  while (1)
    {
      start = input_line_pointer;
      ch = get_symbol_end ();
      len = strlen (ia64_canonicalize_symbol_name (start));
      *input_line_pointer = ch;

      SKIP_WHITESPACE ();
      if (*input_line_pointer != '[')
       {
         as_bad ("Expected '['");
         goto err;
       }
      ++input_line_pointer; /* skip '[' */

      num_regs = get_absolute_expression ();

      if (*input_line_pointer++ != ']')
       {
         as_bad ("Expected ']'");
         goto err;
       }
      if (num_regs <= 0)
       {
         as_bad ("Number of elements must be positive");
         goto err;
       }
      SKIP_WHITESPACE ();

      num_alloced += num_regs;
      switch (type)
       {
       case DYNREG_GR:
         if (num_alloced > md.rot.num_regs)
           {
             as_bad ("Used more than the declared %d rotating registers",
                    md.rot.num_regs);
             goto err;
           }
         break;
       case DYNREG_FR:
         if (num_alloced > 96)
           {
             as_bad ("Used more than the available 96 rotating registers");
             goto err;
           }
         break;
       case DYNREG_PR:
         if (num_alloced > 48)
           {
             as_bad ("Used more than the available 48 rotating registers");
             goto err;
           }
         break;

       default:
         break;
       }

      if (!*drpp)
       {
         *drpp = obstack_alloc (&notes, sizeof (*dr));
         memset (*drpp, 0, sizeof (*dr));
       }

      name = obstack_alloc (&notes, len + 1);
      memcpy (name, start, len);
      name[len] = '\0';

      dr = *drpp;
      dr->name = name;
      dr->num_regs = num_regs;
      dr->base = base_reg;
      drpp = &dr->next;
      base_reg += num_regs;

      if (hash_insert (md.dynreg_hash, name, dr))
       {
         as_bad ("Attempt to redefine register set `%s'", name);
         obstack_free (&notes, name);
         goto err;
       }

      if (*input_line_pointer != ',')
       break;
      ++input_line_pointer; /* skip comma */
      SKIP_WHITESPACE ();
    }
  demand_empty_rest_of_line ();
  return;

 err:
  ignore_rest_of_line ();
}

Here is the call graph for this function:

static void dot_save ( dummy  ) [static]

Definition at line 3511 of file tc-ia64.c.

{
  expressionS e1, e2;
  unsigned reg1, reg2;
  int sep;

  if (!in_prologue ("save"))
    return;

  sep = parse_operand (&e1, ',');
  if (sep == ',')
    sep = parse_operand (&e2, ',');
  else
    e2.X_op = O_absent;

  reg1 = e1.X_add_number;
  /* Make sure its a valid ar.xxx reg, OR its br0, aka 'rp'.  */
  if (e1.X_op != O_register)
    {
      as_bad ("First operand to .save not a register");
      reg1 = REG_PR; /* Anything valid is good here.  */
    }
  reg2 = e2.X_add_number - REG_GR;
  if (e2.X_op != O_register || reg2 > 127)
    {
      as_bad ("Second operand to .save not a valid register");
      reg2 = 0;
    }
  switch (reg1)
    {
    case REG_AR + AR_BSP:
      add_unwind_entry (output_bsp_when (), sep);
      add_unwind_entry (output_bsp_gr (reg2), NOT_A_CHAR);
      break;
    case REG_AR + AR_BSPSTORE:
      add_unwind_entry (output_bspstore_when (), sep);
      add_unwind_entry (output_bspstore_gr (reg2), NOT_A_CHAR);
      break;
    case REG_AR + AR_RNAT:
      add_unwind_entry (output_rnat_when (), sep);
      add_unwind_entry (output_rnat_gr (reg2), NOT_A_CHAR);
      break;
    case REG_AR + AR_UNAT:
      add_unwind_entry (output_unat_when (), sep);
      add_unwind_entry (output_unat_gr (reg2), NOT_A_CHAR);
      break;
    case REG_AR + AR_FPSR:
      add_unwind_entry (output_fpsr_when (), sep);
      add_unwind_entry (output_fpsr_gr (reg2), NOT_A_CHAR);
      break;
    case REG_AR + AR_PFS:
      add_unwind_entry (output_pfs_when (), sep);
      if (! (unwind.prologue_mask & 4))
       add_unwind_entry (output_pfs_gr (reg2), NOT_A_CHAR);
      else if (reg2 != unwind.prologue_gr
                     + (unsigned) popcount (unwind.prologue_mask & (-4 << 1)))
       as_warn ("Second operand of .save contradicts .prologue");
      break;
    case REG_AR + AR_LC:
      add_unwind_entry (output_lc_when (), sep);
      add_unwind_entry (output_lc_gr (reg2), NOT_A_CHAR);
      break;
    case REG_BR:
      add_unwind_entry (output_rp_when (), sep);
      if (! (unwind.prologue_mask & 8))
       add_unwind_entry (output_rp_gr (reg2), NOT_A_CHAR);
      else if (reg2 != unwind.prologue_gr)
       as_warn ("Second operand of .save contradicts .prologue");
      break;
    case REG_PR:
      add_unwind_entry (output_preds_when (), sep);
      if (! (unwind.prologue_mask & 1))
       add_unwind_entry (output_preds_gr (reg2), NOT_A_CHAR);
      else if (reg2 != unwind.prologue_gr
                     + (unsigned) popcount (unwind.prologue_mask & (-1 << 1)))
       as_warn ("Second operand of .save contradicts .prologue");
      break;
    case REG_PRIUNAT:
      add_unwind_entry (output_priunat_when_gr (), sep);
      add_unwind_entry (output_priunat_gr (reg2), NOT_A_CHAR);
      break;
    default:
      as_bad ("First operand to .save not a valid register");
      add_unwind_entry (NULL, sep);
      break;
    }
}

Here is the call graph for this function:

static void dot_saveb ( dummy  ) [static]

Definition at line 4089 of file tc-ia64.c.

{
  expressionS e;
  unsigned brmask;
  int sep;

  if (!in_prologue ("save.b"))
    return;

  sep = parse_operand (&e, ',');

  brmask = e.X_add_number;
  if (e.X_op != O_constant
      || e.X_add_number <= 0
      || e.X_add_number > 0x1f)
    {
      as_bad ("First operand to .save.b must be a positive 5-bit constant");
      brmask = 0;
    }

  if (sep == ',')
    {
      unsigned reg;
      int n = popcount (brmask);

      parse_operand (&e, 0);
      reg = e.X_add_number - REG_GR;
      if (e.X_op != O_register || reg > 127)
       {
         as_bad ("Second operand to .save.b must be a general register");
         reg = 0;
       }
      else if (reg > 128U - n)
       {
         as_bad ("Second operand to .save.b must be the first of %d general registers", n);
         reg = 0;
       }
      add_unwind_entry (output_br_gr (brmask, reg), 0);
    }
  else
    add_unwind_entry (output_br_mem (brmask), 0);
}

Here is the call graph for this function:

static void dot_savef ( dummy  ) [static]

Definition at line 4068 of file tc-ia64.c.

{
  expressionS e;

  if (!in_prologue ("save.f"))
    return;

  parse_operand (&e, 0);

  if (e.X_op != O_constant
      || e.X_add_number <= 0
      || e.X_add_number > 0xfffff)
    {
      as_bad ("Operand to .save.f must be a positive 20-bit constant");
      e.X_add_number = 0;
    }
  add_unwind_entry (output_fr_mem (e.X_add_number), 0);
}

Here is the call graph for this function:

static void dot_saveg ( dummy  ) [static]

Definition at line 4023 of file tc-ia64.c.

{
  expressionS e;
  unsigned grmask;
  int sep;

  if (!in_prologue ("save.g"))
    return;

  sep = parse_operand (&e, ',');

  grmask = e.X_add_number;
  if (e.X_op != O_constant
      || e.X_add_number <= 0
      || e.X_add_number > 0xf)
    {
      as_bad ("First operand to .save.g must be a positive 4-bit constant");
      grmask = 0;
    }

  if (sep == ',')
    {
      unsigned reg;
      int n = popcount (grmask);

      parse_operand (&e, 0);
      reg = e.X_add_number - REG_GR;
      if (e.X_op != O_register || reg > 127)
       {
         as_bad ("Second operand to .save.g must be a general register");
         reg = 0;
       }
      else if (reg > 128U - n)
       {
         as_bad ("Second operand to .save.g must be the first of %d general registers", n);
         reg = 0;
       }
      add_unwind_entry (output_gr_gr (grmask, reg), 0);
    }
  else
    add_unwind_entry (output_gr_mem (grmask), 0);
}

Here is the call graph for this function:

static void dot_savegf ( dummy  ) [static]

Definition at line 4134 of file tc-ia64.c.

{
  expressionS e1, e2;

  if (!in_prologue ("save.gf"))
    return;

  if (parse_operand (&e1, ',') == ',')
    parse_operand (&e2, 0);
  else
    e2.X_op = O_absent;

  if (e1.X_op != O_constant
      || e1.X_add_number < 0
      || e1.X_add_number > 0xf)
    {
      as_bad ("First operand to .save.gf must be a non-negative 4-bit constant");
      e1.X_op = O_absent;
      e1.X_add_number = 0;
    }
  if (e2.X_op != O_constant
      || e2.X_add_number < 0
      || e2.X_add_number > 0xfffff)
    {
      as_bad ("Second operand to .save.gf must be a non-negative 20-bit constant");
      e2.X_op = O_absent;
      e2.X_add_number = 0;
    }
  if (e1.X_op == O_constant
      && e2.X_op == O_constant
      && e1.X_add_number == 0
      && e2.X_add_number == 0)
    as_bad ("Operands to .save.gf may not be both zero");

  add_unwind_entry (output_frgr_mem (e1.X_add_number, e2.X_add_number), 0);
}

Here is the call graph for this function:

static void dot_savemem ( int  psprel) [static]

Definition at line 3921 of file tc-ia64.c.

{
  expressionS e1, e2;
  int sep;
  int reg1, val;
  const char * const po = psprel ? "savepsp" : "savesp";

  if (!in_prologue (po))
    return;

  sep = parse_operand (&e1, ',');
  if (sep == ',')
    sep = parse_operand (&e2, ',');
  else
    e2.X_op = O_absent;

  reg1 = e1.X_add_number;
  val = e2.X_add_number;

  /* Make sure its a valid ar.xxx reg, OR its br0, aka 'rp'.  */
  if (e1.X_op != O_register)
    {
      as_bad ("First operand to .%s not a register", po);
      reg1 = REG_PR; /* Anything valid is good here.  */
    }
  if (e2.X_op != O_constant)
    {
      as_bad ("Second operand to .%s not a constant", po);
      val = 0;
    }

  switch (reg1)
    {
    case REG_AR + AR_BSP:
      add_unwind_entry (output_bsp_when (), sep);
      add_unwind_entry ((psprel
                      ? output_bsp_psprel
                      : output_bsp_sprel) (val), NOT_A_CHAR);
      break;
    case REG_AR + AR_BSPSTORE:
      add_unwind_entry (output_bspstore_when (), sep);
      add_unwind_entry ((psprel
                      ? output_bspstore_psprel
                      : output_bspstore_sprel) (val), NOT_A_CHAR);
      break;
    case REG_AR + AR_RNAT:
      add_unwind_entry (output_rnat_when (), sep);
      add_unwind_entry ((psprel
                      ? output_rnat_psprel
                      : output_rnat_sprel) (val), NOT_A_CHAR);
      break;
    case REG_AR + AR_UNAT:
      add_unwind_entry (output_unat_when (), sep);
      add_unwind_entry ((psprel
                      ? output_unat_psprel
                      : output_unat_sprel) (val), NOT_A_CHAR);
      break;
    case REG_AR + AR_FPSR:
      add_unwind_entry (output_fpsr_when (), sep);
      add_unwind_entry ((psprel
                      ? output_fpsr_psprel
                      : output_fpsr_sprel) (val), NOT_A_CHAR);
      break;
    case REG_AR + AR_PFS:
      add_unwind_entry (output_pfs_when (), sep);
      add_unwind_entry ((psprel
                      ? output_pfs_psprel
                      : output_pfs_sprel) (val), NOT_A_CHAR);
      break;
    case REG_AR + AR_LC:
      add_unwind_entry (output_lc_when (), sep);
      add_unwind_entry ((psprel
                      ? output_lc_psprel
                      : output_lc_sprel) (val), NOT_A_CHAR);
      break;
    case REG_BR:
      add_unwind_entry (output_rp_when (), sep);
      add_unwind_entry ((psprel
                      ? output_rp_psprel
                      : output_rp_sprel) (val), NOT_A_CHAR);
      break;
    case REG_PR:
      add_unwind_entry (output_preds_when (), sep);
      add_unwind_entry ((psprel
                      ? output_preds_psprel
                      : output_preds_sprel) (val), NOT_A_CHAR);
      break;
    case REG_PRIUNAT:
      add_unwind_entry (output_priunat_when_mem (), sep);
      add_unwind_entry ((psprel
                      ? output_priunat_psprel
                      : output_priunat_sprel) (val), NOT_A_CHAR);
      break;
    default:
      as_bad ("First operand to .%s not a valid register", po);
      add_unwind_entry (NULL, sep);
      break;
    }
}

Here is the call graph for this function:

static void dot_serialize ( int  type) [static]

Definition at line 5152 of file tc-ia64.c.

Here is the call graph for this function:

static void dot_special_section ( int  which) [static]

Definition at line 3327 of file tc-ia64.c.

{
  set_section ((char *) special_section_name[which]);
}

Here is the call graph for this function:

static void dot_spill ( dummy  ) [static]

Definition at line 4173 of file tc-ia64.c.

{
  expressionS e;

  if (!in_prologue ("spill"))
    return;

  parse_operand (&e, 0);

  if (e.X_op != O_constant)
    {
      as_bad ("Operand to .spill must be a constant");
      e.X_add_number = 0;
    }
  add_unwind_entry (output_spill_base (e.X_add_number), 0);
}

Here is the call graph for this function:

static void dot_spillmem ( int  psprel) [static]

Definition at line 4222 of file tc-ia64.c.

{
  expressionS e;
  int pred = (psprel < 0), sep;
  unsigned int qp, ab, reg;
  const char * po;

  if (pred)
    {
      psprel = ~psprel;
      po = psprel ? "spillpsp.p" : "spillsp.p";
    }
  else
    po = psprel ? "spillpsp" : "spillsp";

  if (!in_procedure (po))
    return;

  if (pred)
    sep = parse_predicate_and_operand (&e, &qp, po);
  else
    {
      sep = parse_operand (&e, ',');
      qp = 0;
    }
  convert_expr_to_ab_reg (&e, &ab, &reg, po, 1 + pred);

  if (sep == ',')
    sep = parse_operand (&e, ',');
  else
    e.X_op = O_absent;
  if (e.X_op != O_constant)
    {
      as_bad ("Operand %d to .%s must be a constant", 2 + pred, po);
      e.X_add_number = 0;
    }

  if (psprel)
    add_unwind_entry (output_spill_psprel (ab, reg, e.X_add_number, qp), sep);
  else
    add_unwind_entry (output_spill_sprel (ab, reg, e.X_add_number, qp), sep);
}

Here is the call graph for this function:

static void dot_spillreg ( int  pred) [static]

Definition at line 4192 of file tc-ia64.c.

{
  int sep;
  unsigned int qp, ab, xy, reg, treg;
  expressionS e;
  const char * const po = pred ? "spillreg.p" : "spillreg";

  if (!in_procedure (po))
    return;

  if (pred)
    sep = parse_predicate_and_operand (&e, &qp, po);
  else
    {
      sep = parse_operand (&e, ',');
      qp = 0;
    }
  convert_expr_to_ab_reg (&e, &ab, &reg, po, 1 + pred);

  if (sep == ',')
    sep = parse_operand (&e, ',');
  else
    e.X_op = O_absent;
  convert_expr_to_xy_reg (&e, &xy, &treg, po, 2 + pred);

  add_unwind_entry (output_spill_reg (ab, reg, treg, xy, qp), sep);
}

Here is the call graph for this function:

static void dot_template ( int  template) [static]

Definition at line 4744 of file tc-ia64.c.

{
  CURR_SLOT.user_template = template;
}
static void dot_unwabi ( dummy  ) [static]

Definition at line 4362 of file tc-ia64.c.

{
  expressionS e1, e2;
  unsigned char sep;

  if (!in_prologue ("unwabi"))
    return;

  sep = parse_operand (&e1, ',');
  if (sep == ',')
    parse_operand (&e2, 0);
  else
    e2.X_op = O_absent;

  if (e1.X_op != O_constant)
    {
      as_bad ("First operand to .unwabi must be a constant");
      e1.X_add_number = 0;
    }

  if (e2.X_op != O_constant)
    {
      as_bad ("Second operand to .unwabi must be a constant");
      e2.X_add_number = 0;
    }

  add_unwind_entry (output_unwabi (e1.X_add_number, e2.X_add_number), 0);
}

Here is the call graph for this function:

static void dot_unwentry ( dummy  ) [static]

Definition at line 3891 of file tc-ia64.c.

{
  if (!in_procedure ("unwentry"))
    return;
  unwind.force_unwind_entry = 1;
  demand_empty_rest_of_line ();
}

Here is the call graph for this function:

static void dot_vframe ( dummy  ) [static]

Definition at line 3462 of file tc-ia64.c.

{
  expressionS e;
  unsigned reg;
  int sep;

  if (!in_prologue ("vframe"))
    return;

  sep = parse_operand (&e, ',');
  reg = e.X_add_number - REG_GR;
  if (e.X_op != O_register || reg > 127)
    {
      as_bad ("First operand to .vframe must be a general register");
      reg = 0;
    }
  add_unwind_entry (output_mem_stack_v (), sep);
  if (! (unwind.prologue_mask & 2))
    add_unwind_entry (output_psp_gr (reg), NOT_A_CHAR);
  else if (reg != unwind.prologue_gr
                + (unsigned) popcount (unwind.prologue_mask & (-2 << 1)))
    as_warn ("Operand of .vframe contradicts .prologue");
}

Here is the call graph for this function:

static void dot_vframesp ( int  psp) [static]

Definition at line 3488 of file tc-ia64.c.

{
  expressionS e;
  int sep;

  if (psp)
    as_warn (".vframepsp is meaningless, assuming .vframesp was meant");

  if (!in_prologue ("vframesp"))
    return;

  sep = parse_operand (&e, ',');
  if (e.X_op != O_constant)
    {
      as_bad ("Operand to .vframesp must be a constant (sp-relative offset)");
      e.X_add_number = 0;
    }
  add_unwind_entry (output_mem_stack_v (), sep);
  add_unwind_entry (output_psp_sprel (e.X_add_number), NOT_A_CHAR);
}

Here is the call graph for this function:

static void dot_xdata ( int  size) [static]

Definition at line 5039 of file tc-ia64.c.

{
  cross_section (size, cons, 0);
}

Here is the call graph for this function:

static void dot_xdata_ua ( int  size) [static]

Definition at line 5099 of file tc-ia64.c.

{
  cross_section (size, cons, 1);
}

Here is the call graph for this function:

static void dot_xfloat_cons ( int  kind) [static]

Definition at line 5085 of file tc-ia64.c.

Here is the call graph for this function:

static void dot_xfloat_cons_ua ( int  kind) [static]

Definition at line 5106 of file tc-ia64.c.

{
  cross_section (kind, float_cons, 1);
}

Here is the call graph for this function:

static void dot_xstringer ( int  zero) [static]

Definition at line 5092 of file tc-ia64.c.

Here is the call graph for this function:

static void emit_one_bundle ( ) [static]

Definition at line 6674 of file tc-ia64.c.

{
  int manual_bundling_off = 0, manual_bundling = 0;
  enum ia64_unit required_unit, insn_unit = 0;
  enum ia64_insn_type type[3], insn_type;
  unsigned int template, orig_template;
  bfd_vma insn[3] = { -1, -1, -1 };
  struct ia64_opcode *idesc;
  int end_of_insn_group = 0, user_template = -1;
  int n, i, j, first, curr, last_slot;
  bfd_vma t0 = 0, t1 = 0;
  struct label_fix *lfix;
  bfd_boolean mark_label;
  struct insn_fix *ifix;
  char mnemonic[16];
  fixS *fix;
  char *f;
  int addr_mod;

  first = (md.curr_slot + NUM_SLOTS - md.num_slots_in_use) % NUM_SLOTS;
  know (first >= 0 & first < NUM_SLOTS);
  n = MIN (3, md.num_slots_in_use);

  /* Determine template: user user_template if specified, best match
     otherwise:  */

  if (md.slot[first].user_template >= 0)
    user_template = template = md.slot[first].user_template;
  else
    {
      /* Auto select appropriate template.  */
      memset (type, 0, sizeof (type));
      curr = first;
      for (i = 0; i < n; ++i)
       {
         if (md.slot[curr].label_fixups && i != 0)
           break;
         type[i] = md.slot[curr].idesc->type;
         curr = (curr + 1) % NUM_SLOTS;
       }
      template = best_template[type[0]][type[1]][type[2]];
    }

  /* initialize instructions with appropriate nops:  */
  for (i = 0; i < 3; ++i)
    insn[i] = nop[ia64_templ_desc[template].exec_unit[i]];

  f = frag_more (16);

  /* Check to see if this bundle is at an offset that is a multiple of 16-bytes
     from the start of the frag.  */
  addr_mod = frag_now_fix () & 15;
  if (frag_now->has_code && frag_now->insn_addr != addr_mod)
    as_bad (_("instruction address is not a multiple of 16"));
  frag_now->insn_addr = addr_mod;
  frag_now->has_code = 1;

  /* now fill in slots with as many insns as possible:  */
  curr = first;
  idesc = md.slot[curr].idesc;
  end_of_insn_group = 0;
  last_slot = -1;
  for (i = 0; i < 3 && md.num_slots_in_use > 0; ++i)
    {
      /* If we have unwind records, we may need to update some now.  */
      unw_rec_list *ptr = md.slot[curr].unwind_record;
      unw_rec_list *end_ptr = NULL;

      if (ptr)
       {
         /* Find the last prologue/body record in the list for the current
            insn, and set the slot number for all records up to that point.
            This needs to be done now, because prologue/body records refer to
            the current point, not the point after the instruction has been
            issued.  This matters because there may have been nops emitted
            meanwhile.  Any non-prologue non-body record followed by a
            prologue/body record must also refer to the current point.  */
         unw_rec_list *last_ptr;

         for (j = 1; end_ptr == NULL && j < md.num_slots_in_use; ++j)
           end_ptr = md.slot[(curr + j) % NUM_SLOTS].unwind_record;
         for (last_ptr = NULL; ptr != end_ptr; ptr = ptr->next)
           if (ptr->r.type == prologue || ptr->r.type == prologue_gr
              || ptr->r.type == body)
             last_ptr = ptr;
         if (last_ptr)
           {
             /* Make last_ptr point one after the last prologue/body
               record.  */
             last_ptr = last_ptr->next;
             for (ptr = md.slot[curr].unwind_record; ptr != last_ptr;
                 ptr = ptr->next)
              {
                ptr->slot_number = (unsigned long) f + i;
                ptr->slot_frag = frag_now;
              }
             /* Remove the initialized records, so that we won't accidentally
               update them again if we insert a nop and continue.  */
             md.slot[curr].unwind_record = last_ptr;
           }
       }

      manual_bundling_off = md.slot[curr].manual_bundling_off;
      if (md.slot[curr].manual_bundling_on)
       {
         if (curr == first)
           manual_bundling = 1;
         else
         break; /* Need to start a new bundle.  */
       }

      /* If this instruction specifies a template, then it must be the first
        instruction of a bundle.  */
      if (curr != first && md.slot[curr].user_template >= 0)
       break;

      if (idesc->flags & IA64_OPCODE_SLOT2)
       {
         if (manual_bundling && !manual_bundling_off)
           {
             as_bad_where (md.slot[curr].src_file, md.slot[curr].src_line,
                         "`%s' must be last in bundle", idesc->name);
             if (i < 2)
              manual_bundling = -1; /* Suppress meaningless post-loop errors.  */
           }
         i = 2;
       }
      if (idesc->flags & IA64_OPCODE_LAST)
       {
         int required_slot;
         unsigned int required_template;

         /* If we need a stop bit after an M slot, our only choice is
            template 5 (M;;MI).  If we need a stop bit after a B
            slot, our only choice is to place it at the end of the
            bundle, because the only available templates are MIB,
            MBB, BBB, MMB, and MFB.  We don't handle anything other
            than M and B slots because these are the only kind of
            instructions that can have the IA64_OPCODE_LAST bit set.  */
         required_template = template;
         switch (idesc->type)
           {
           case IA64_TYPE_M:
             required_slot = 0;
             required_template = 5;
             break;

           case IA64_TYPE_B:
             required_slot = 2;
             break;

           default:
             as_bad_where (md.slot[curr].src_file, md.slot[curr].src_line,
                         "Internal error: don't know how to force %s to end"
                         "of instruction group", idesc->name);
             required_slot = i;
             break;
           }
         if (manual_bundling
             && (i > required_slot
                || (required_slot == 2 && !manual_bundling_off)
                || (user_template >= 0
                    /* Changing from MMI to M;MI is OK.  */
                    && (template ^ required_template) > 1)))
           {
             as_bad_where (md.slot[curr].src_file, md.slot[curr].src_line,
                         "`%s' must be last in instruction group",
                         idesc->name);
             if (i < 2 && required_slot == 2 && !manual_bundling_off)
              manual_bundling = -1; /* Suppress meaningless post-loop errors.  */
           }
         if (required_slot < i)
           /* Can't fit this instruction.  */
           break;

         i = required_slot;
         if (required_template != template)
           {
             /* If we switch the template, we need to reset the NOPs
                after slot i.  The slot-types of the instructions ahead
                of i never change, so we don't need to worry about
                changing NOPs in front of this slot.  */
             for (j = i; j < 3; ++j)
               insn[j] = nop[ia64_templ_desc[required_template].exec_unit[j]];

             /* We just picked a template that includes the stop bit in the
               middle, so we don't need another one emitted later.  */
             md.slot[curr].end_of_insn_group = 0;
           }
         template = required_template;
       }
      if (curr != first && md.slot[curr].label_fixups)
       {
         if (manual_bundling)
           {
             as_bad_where (md.slot[curr].src_file, md.slot[curr].src_line,
                       "Label must be first in a bundle");
             manual_bundling = -1; /* Suppress meaningless post-loop errors.  */
           }
         /* This insn must go into the first slot of a bundle.  */
         break;
       }

      if (end_of_insn_group && md.num_slots_in_use >= 1)
       {
         /* We need an instruction group boundary in the middle of a
            bundle.  See if we can switch to an other template with
            an appropriate boundary.  */

         orig_template = template;
         if (i == 1 && (user_template == 4
                      || (user_template < 0
                          && (ia64_templ_desc[template].exec_unit[0]
                             == IA64_UNIT_M))))
           {
             template = 5;
             end_of_insn_group = 0;
           }
         else if (i == 2 && (user_template == 0
                           || (user_template < 0
                              && (ia64_templ_desc[template].exec_unit[1]
                                  == IA64_UNIT_I)))
                 /* This test makes sure we don't switch the template if
                    the next instruction is one that needs to be first in
                    an instruction group.  Since all those instructions are
                    in the M group, there is no way such an instruction can
                    fit in this bundle even if we switch the template.  The
                    reason we have to check for this is that otherwise we
                    may end up generating "MI;;I M.." which has the deadly
                    effect that the second M instruction is no longer the
                    first in the group! --davidm 99/12/16  */
                 && (idesc->flags & IA64_OPCODE_FIRST) == 0)
           {
             template = 1;
             end_of_insn_group = 0;
           }
         else if (i == 1
                 && user_template == 0
                 && !(idesc->flags & IA64_OPCODE_FIRST))
           /* Use the next slot.  */
           continue;
         else if (curr != first)
           /* can't fit this insn */
           break;

         if (template != orig_template)
           /* if we switch the template, we need to reset the NOPs
              after slot i.  The slot-types of the instructions ahead
              of i never change, so we don't need to worry about
              changing NOPs in front of this slot.  */
           for (j = i; j < 3; ++j)
             insn[j] = nop[ia64_templ_desc[template].exec_unit[j]];
       }
      required_unit = ia64_templ_desc[template].exec_unit[i];

      /* resolve dynamic opcodes such as "break", "hint", and "nop":  */
      if (idesc->type == IA64_TYPE_DYN)
       {
         enum ia64_opnd opnd1, opnd2;

         if ((strcmp (idesc->name, "nop") == 0)
             || (strcmp (idesc->name, "break") == 0))
           insn_unit = required_unit;
         else if (strcmp (idesc->name, "hint") == 0)
           {
             insn_unit = required_unit;
             if (required_unit == IA64_UNIT_B)
              {
                switch (md.hint_b)
                  {
                  case hint_b_ok:
                    break;
                  case hint_b_warning:
                    as_warn ("hint in B unit may be treated as nop");
                    break;
                  case hint_b_error:
                    /* When manual bundling is off and there is no
                      user template, we choose a different unit so
                      that hint won't go into the current slot. We
                      will fill the current bundle with nops and
                      try to put hint into the next bundle.  */
                    if (!manual_bundling && user_template < 0)
                     insn_unit = IA64_UNIT_I;
                    else
                     as_bad ("hint in B unit can't be used");
                    break;
                  }
              }
           }
         else if (strcmp (idesc->name, "chk.s") == 0
             || strcmp (idesc->name, "mov") == 0)
           {
             insn_unit = IA64_UNIT_M;
             if (required_unit == IA64_UNIT_I
                || (required_unit == IA64_UNIT_F && template == 6))
              insn_unit = IA64_UNIT_I;
           }
         else
           as_fatal ("emit_one_bundle: unexpected dynamic op");

         snprintf (mnemonic, sizeof (mnemonic), "%s.%c",
                  idesc->name, "?imbfxx"[insn_unit]);
         opnd1 = idesc->operands[0];
         opnd2 = idesc->operands[1];
         ia64_free_opcode (idesc);
         idesc = ia64_find_opcode (mnemonic);
         /* moves to/from ARs have collisions */
         if (opnd1 == IA64_OPND_AR3 || opnd2 == IA64_OPND_AR3)
           {
             while (idesc != NULL
                   && (idesc->operands[0] != opnd1
                      || idesc->operands[1] != opnd2))
              idesc = get_next_opcode (idesc);
           }
         md.slot[curr].idesc = idesc;
       }
      else
       {
         insn_type = idesc->type;
         insn_unit = IA64_UNIT_NIL;
         switch (insn_type)
           {
           case IA64_TYPE_A:
             if (required_unit == IA64_UNIT_I || required_unit == IA64_UNIT_M)
              insn_unit = required_unit;
             break;
           case IA64_TYPE_X: insn_unit = IA64_UNIT_L; break;
           case IA64_TYPE_I: insn_unit = IA64_UNIT_I; break;
           case IA64_TYPE_M: insn_unit = IA64_UNIT_M; break;
           case IA64_TYPE_B: insn_unit = IA64_UNIT_B; break;
           case IA64_TYPE_F: insn_unit = IA64_UNIT_F; break;
           default:                              break;
           }
       }

      if (insn_unit != required_unit)
       continue;            /* Try next slot.  */

      /* Now is a good time to fix up the labels for this insn.  */
      mark_label = FALSE;
      for (lfix = md.slot[curr].label_fixups; lfix; lfix = lfix->next)
       {
         S_SET_VALUE (lfix->sym, frag_now_fix () - 16);
         symbol_set_frag (lfix->sym, frag_now);
         mark_label |= lfix->dw2_mark_labels;
       }
      for (lfix = md.slot[curr].tag_fixups; lfix; lfix = lfix->next)
       {
         S_SET_VALUE (lfix->sym, frag_now_fix () - 16 + i);
         symbol_set_frag (lfix->sym, frag_now);
       }

      if (debug_type == DEBUG_DWARF2
         || md.slot[curr].loc_directive_seen
         || mark_label)
       {
         bfd_vma addr = frag_now->fr_address + frag_now_fix () - 16 + i;

         md.slot[curr].loc_directive_seen = 0;
         if (mark_label)
           md.slot[curr].debug_line.flags |= DWARF2_FLAG_BASIC_BLOCK;

         dwarf2_gen_line_info (addr, &md.slot[curr].debug_line);
       }

      build_insn (md.slot + curr, insn + i);

      ptr = md.slot[curr].unwind_record;
      if (ptr)
       {
         /* Set slot numbers for all remaining unwind records belonging to the
            current insn.  There can not be any prologue/body unwind records
            here.  */
         for (; ptr != end_ptr; ptr = ptr->next)
           {
             ptr->slot_number = (unsigned long) f + i;
             ptr->slot_frag = frag_now;
           }
         md.slot[curr].unwind_record = NULL;
       }

      if (required_unit == IA64_UNIT_L)
       {
         know (i == 1);
         /* skip one slot for long/X-unit instructions */
         ++i;
       }
      --md.num_slots_in_use;
      last_slot = i;

      for (j = 0; j < md.slot[curr].num_fixups; ++j)
       {
         ifix = md.slot[curr].fixup + j;
         fix = fix_new_exp (frag_now, frag_now_fix () - 16 + i, 8,
                          &ifix->expr, ifix->is_pcrel, ifix->code);
         fix->tc_fix_data.opnd = ifix->opnd;
         fix->fx_file = md.slot[curr].src_file;
         fix->fx_line = md.slot[curr].src_line;
       }

      end_of_insn_group = md.slot[curr].end_of_insn_group;

      /* clear slot:  */
      ia64_free_opcode (md.slot[curr].idesc);
      memset (md.slot + curr, 0, sizeof (md.slot[curr]));
      md.slot[curr].user_template = -1;

      if (manual_bundling_off)
       {
         manual_bundling = 0;
         break;
       }
      curr = (curr + 1) % NUM_SLOTS;
      idesc = md.slot[curr].idesc;
    }

  /* A user template was specified, but the first following instruction did
     not fit.  This can happen with or without manual bundling.  */
  if (md.num_slots_in_use > 0 && last_slot < 0)
    {
      as_bad_where (md.slot[curr].src_file, md.slot[curr].src_line,
                  "`%s' does not fit into %s template",
                  idesc->name, ia64_templ_desc[template].name);
      /* Drop first insn so we don't livelock.  */
      --md.num_slots_in_use;
      know (curr == first);
      ia64_free_opcode (md.slot[curr].idesc);
      memset (md.slot + curr, 0, sizeof (md.slot[curr]));
      md.slot[curr].user_template = -1;
    }
  else if (manual_bundling > 0)
    {
      if (md.num_slots_in_use > 0)
       {
         if (last_slot >= 2)
           as_bad_where (md.slot[curr].src_file, md.slot[curr].src_line,
                       "`%s' does not fit into bundle", idesc->name);
         else
           {
             const char *where;

             if (template == 2)
              where = "X slot";
             else if (last_slot == 0)
              where = "slots 2 or 3";
             else
              where = "slot 3";
             as_bad_where (md.slot[curr].src_file, md.slot[curr].src_line,
                         "`%s' can't go in %s of %s template",
                         idesc->name, where, ia64_templ_desc[template].name);
           }
       }
      else
       as_bad_where (md.slot[curr].src_file, md.slot[curr].src_line,
                    "Missing '}' at end of file");
    }
       
  know (md.num_slots_in_use < NUM_SLOTS);

  t0 = end_of_insn_group | (template << 1) | (insn[0] << 5) | (insn[1] << 46);
  t1 = ((insn[1] >> 18) & 0x7fffff) | (insn[2] << 23);

  number_to_chars_littleendian (f + 0, t0, 8);
  number_to_chars_littleendian (f + 8, t1, 8);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static int extra_goodness ( int  templ,
int  slot 
) [inline, static]

Definition at line 7368 of file tc-ia64.c.

{
  switch (md.tune)
    {
    case itanium1:
      if (slot == 1 && match (templ, IA64_TYPE_F, slot))
       return 2;
      else if (slot == 2 && match (templ, IA64_TYPE_B, slot))
       return 1;
      else
       return 0;
      break;
    case itanium2:
      if (match (templ, IA64_TYPE_M, slot)
         || match (templ, IA64_TYPE_I, slot))
       /* Favor M- and I-unit NOPs.  We definitely want to avoid
          F-unit and B-unit may cause split-issue or less-than-optimal
          branch-prediction.  */
       return 2;
      else
       return 0;
      break;
    default:
      abort ();
      return 0;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void fix_insn ( fixS *  fix,
const struct ia64_operand odesc,
valueT  value 
) [static]

Definition at line 11519 of file tc-ia64.c.

{
  bfd_vma insn[3], t0, t1, control_bits;
  const char *err;
  char *fixpos;
  long slot;

  slot = fix->fx_where & 0x3;
  fixpos = fix->fx_frag->fr_literal + (fix->fx_where - slot);

  /* Bundles are always in little-endian byte order */
  t0 = bfd_getl64 (fixpos);
  t1 = bfd_getl64 (fixpos + 8);
  control_bits = t0 & 0x1f;
  insn[0] = (t0 >>  5) & 0x1ffffffffffLL;
  insn[1] = ((t0 >> 46) & 0x3ffff) | ((t1 & 0x7fffff) << 18);
  insn[2] = (t1 >> 23) & 0x1ffffffffffLL;

  err = NULL;
  if (odesc - elf64_ia64_operands == IA64_OPND_IMMU64)
    {
      insn[1] = (value >> 22) & 0x1ffffffffffLL;
      insn[2] |= (((value & 0x7f) << 13)
                | (((value >> 7) & 0x1ff) << 27)
                | (((value >> 16) & 0x1f) << 22)
                | (((value >> 21) & 0x1) << 21)
                | (((value >> 63) & 0x1) << 36));
    }
  else if (odesc - elf64_ia64_operands == IA64_OPND_IMMU62)
    {
      if (value & ~0x3fffffffffffffffULL)
       err = "integer operand out of range";
      insn[1] = (value >> 21) & 0x1ffffffffffLL;
      insn[2] |= (((value & 0xfffff) << 6) | (((value >> 20) & 0x1) << 36));
    }
  else if (odesc - elf64_ia64_operands == IA64_OPND_TGT64)
    {
      value >>= 4;
      insn[1] = ((value >> 20) & 0x7fffffffffLL) << 2;
      insn[2] |= ((((value >> 59) & 0x1) << 36)
                | (((value >> 0) & 0xfffff) << 13));
    }
  else
    err = (*odesc->insert) (odesc, value, insn + slot);

  if (err)
    as_bad_where (fix->fx_file, fix->fx_line, err);

  t0 = control_bits | (insn[0] << 5) | (insn[1] << 46);
  t1 = ((insn[1] >> 18) & 0x7fffff) | (insn[2] << 23);
  number_to_chars_littleendian (fixpos + 0, t0, 8);
  number_to_chars_littleendian (fixpos + 8, t1, 8);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void fixup_unw_records ( unw_rec_list list,
int  before_relax 
) [static]

Definition at line 2936 of file tc-ia64.c.

{
  unw_rec_list *ptr, *region = 0;
  unsigned long first_addr = 0, rlen = 0, t;
  fragS *first_frag = 0;

  for (ptr = list; ptr; ptr = ptr->next)
    {
      if (ptr->slot_number == SLOT_NUM_NOT_SET)
       as_bad (" Insn slot not set in unwind record.");
      t = slot_index (ptr->slot_number, ptr->slot_frag,
                    first_addr, first_frag, before_relax);
      switch (ptr->r.type)
       {
       case prologue:
       case prologue_gr:
       case body:
         {
           unw_rec_list *last;
           int size;
           unsigned long last_addr = 0;
           fragS *last_frag = NULL;

           first_addr = ptr->slot_number;
           first_frag = ptr->slot_frag;
           /* Find either the next body/prologue start, or the end of
              the function, and determine the size of the region.  */
           for (last = ptr->next; last != NULL; last = last->next)
             if (last->r.type == prologue || last->r.type == prologue_gr
                || last->r.type == body || last->r.type == endp)
              {
                last_addr = last->slot_number;
                last_frag = last->slot_frag;
                break;
              }
           size = slot_index (last_addr, last_frag, first_addr, first_frag,
                            before_relax);
           rlen = ptr->r.record.r.rlen = size;
           if (ptr->r.type == body)
             /* End of region.  */
             region = 0;
           else
             region = ptr;
           break;
         }
       case epilogue:
         if (t < rlen)
           ptr->r.record.b.t = rlen - 1 - t;
         else
           /* This happens when a memory-stack-less procedure uses a
              ".restore sp" directive at the end of a region to pop
              the frame state.  */
           ptr->r.record.b.t = 0;
         break;

       case mem_stack_f:
       case mem_stack_v:
       case rp_when:
       case pfs_when:
       case preds_when:
       case unat_when:
       case lc_when:
       case fpsr_when:
       case priunat_when_gr:
       case priunat_when_mem:
       case bsp_when:
       case bspstore_when:
       case rnat_when:
         ptr->r.record.p.t = t;
         break;

       case spill_reg:
       case spill_sprel:
       case spill_psprel:
       case spill_reg_p:
       case spill_sprel_p:
       case spill_psprel_p:
         ptr->r.record.x.t = t;
         break;

       case frgr_mem:
         if (!region)
           {
             as_bad ("frgr_mem record before region record!");
             return;
           }
         region->r.record.r.mask.fr_mem |= ptr->r.record.p.frmask;
         region->r.record.r.mask.gr_mem |= ptr->r.record.p.grmask;
         set_imask (region, ptr->r.record.p.frmask, t, 1);
         set_imask (region, ptr->r.record.p.grmask, t, 2);
         break;
       case fr_mem:
         if (!region)
           {
             as_bad ("fr_mem record before region record!");
             return;
           }
         region->r.record.r.mask.fr_mem |= ptr->r.record.p.frmask;
         set_imask (region, ptr->r.record.p.frmask, t, 1);
         break;
       case gr_mem:
         if (!region)
           {
             as_bad ("gr_mem record before region record!");
             return;
           }
         region->r.record.r.mask.gr_mem |= ptr->r.record.p.grmask;
         set_imask (region, ptr->r.record.p.grmask, t, 2);
         break;
       case br_mem:
         if (!region)
           {
             as_bad ("br_mem record before region record!");
             return;
           }
         region->r.record.r.mask.br_mem |= ptr->r.record.p.brmask;
         set_imask (region, ptr->r.record.p.brmask, t, 3);
         break;

       case gr_gr:
         if (!region)
           {
             as_bad ("gr_gr record before region record!");
             return;
           }
         set_imask (region, ptr->r.record.p.grmask, t, 2);
         break;
       case br_gr:
         if (!region)
           {
             as_bad ("br_gr record before region record!");
             return;
           }
         set_imask (region, ptr->r.record.p.brmask, t, 3);
         break;

       default:
         break;
       }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static char format_ab_reg ( int  ab,
int  reg 
) [static]

Definition at line 1679 of file tc-ia64.c.

{
  int ret;
  ab = (ab & 3);
  reg = (reg & 0x1f);
  ret = (ab << 5) | reg;
  return ret;
}

Here is the caller graph for this function:

static void free_saved_prologue_counts ( ) [static]

Definition at line 4306 of file tc-ia64.c.

{
  label_prologue_count *lpc = unwind.saved_prologue_counts;
  label_prologue_count *next;

  while (lpc != NULL)
    {
      next = lpc->next;
      free (lpc);
      lpc = next;
    }

  unwind.saved_prologue_counts = NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void generate_unwind_image ( const segT  text_seg) [static]

Definition at line 3787 of file tc-ia64.c.

{
  int size, pad;
  unw_rec_list *list;

  /* Mark the end of the unwind info, so that we can compute the size of the
     last unwind region.  */
  add_unwind_entry (output_endp (), NOT_A_CHAR);

  /* Force out pending instructions, to make sure all unwind records have
     a valid slot_number field.  */
  ia64_flush_insns ();

  /* Generate the unwind record.  */
  list = optimize_unw_records (unwind.list);
  fixup_unw_records (list, 1);
  size = calc_record_size (list);

  if (size > 0 || unwind.force_unwind_entry)
    {
      unwind.force_unwind_entry = 0;
      /* pad to pointer-size boundary.  */
      pad = size % md.pointer_size;
      if (pad != 0)
       size += md.pointer_size - pad;
      /* Add 8 for the header.  */
      size += 8;
      /* Add a pointer for the personality offset.  */
      if (unwind.personality_routine)
       size += md.pointer_size;
    }

  /* If there are unwind records, switch sections, and output the info.  */
  if (size != 0)
    {
      expressionS exp;
      bfd_reloc_code_real_type reloc;

      start_unwind_section (text_seg, SPECIAL_SECTION_UNWIND_INFO);

      /* Make sure the section has 4 byte alignment for ILP32 and
        8 byte alignment for LP64.  */
      frag_align (md.pointer_size_shift, 0, 0);
      record_alignment (now_seg, md.pointer_size_shift);

      /* Set expression which points to start of unwind descriptor area.  */
      unwind.info = expr_build_dot ();
      
      frag_var (rs_machine_dependent, size, size, 0, 0,
              (offsetT) (long) unwind.personality_routine,
              (char *) list);

      /* Add the personality address to the image.  */
      if (unwind.personality_routine != 0)
       {
         exp.X_op = O_symbol;
         exp.X_add_symbol = unwind.personality_routine;
         exp.X_add_number = 0;

         if (md.flags & EF_IA_64_BE)
           {
             if (md.flags & EF_IA_64_ABI64)
              reloc = BFD_RELOC_IA64_LTOFF_FPTR64MSB;
             else
              reloc = BFD_RELOC_IA64_LTOFF_FPTR32MSB;
           }
         else
           {
             if (md.flags & EF_IA_64_ABI64)
              reloc = BFD_RELOC_IA64_LTOFF_FPTR64LSB;
             else
              reloc = BFD_RELOC_IA64_LTOFF_FPTR32LSB;
           }

         fix_new_exp (frag_now, frag_now_fix () - md.pointer_size,
                     md.pointer_size, &exp, 0, reloc);
         unwind.personality_routine = 0;
       }
    }

  free_saved_prologue_counts ();
  unwind.list = unwind.tail = unwind.current_entry = NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static struct ia64_opcode* get_next_opcode ( struct ia64_opcode idesc) [static, read]

Definition at line 6221 of file tc-ia64.c.

{
  struct ia64_opcode *next = ia64_find_next_opcode (idesc);
  ia64_free_opcode (idesc);
  return next;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 4267 of file tc-ia64.c.

{
  label_prologue_count *lpc = unwind.saved_prologue_counts;

  while (lpc != NULL && lpc->label_number != lbl)
    lpc = lpc->next;

  if (lpc != NULL)
    return lpc->prologue_count;

  as_bad ("Missing .label_state %ld", lbl);
  return 1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static int has_suffix_p ( char *  name,
const char *  suffix 
) const [static]

Definition at line 9911 of file tc-ia64.c.

{
  size_t namelen = strlen (name);
  size_t sufflen = strlen (suffix);

  if (namelen <= sufflen)
    return 0;
  return strcmp (name + namelen - sufflen, suffix) == 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void ia64_adjust_symtab ( void  )

Definition at line 12001 of file tc-ia64.c.

Here is the call graph for this function:

Definition at line 7332 of file tc-ia64.c.

{
  if (debug_type == DEBUG_STABS)
    as_fatal (_("--gstabs is not supported for ia64"));
}

Here is the call graph for this function:

char* ia64_canonicalize_symbol_name ( char *  name)

Definition at line 8220 of file tc-ia64.c.

{
  size_t len = strlen (name), full = len;

  while (len > 0 && name[len - 1] == '#')
    --len;
  if (len <= 0)
    {
      if (full > 0)
       as_bad ("Standalone `#' is illegal");
    }
  else if (len < full - 1)
    as_warn ("Redundant `#' suffix operators");
  name[len] = '\0';
  return name;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void ia64_check_label ( symbolS *  label)

Definition at line 11852 of file tc-ia64.c.

{
  if (*input_line_pointer == ':')
    {
      S_SET_EXTERNAL (label);
      input_line_pointer++;
    }
}

Here is the call graph for this function:

void ia64_cons_align ( int  nbytes)

Definition at line 1196 of file tc-ia64.c.

{
  if (md.auto_align)
    {
      char *saved_input_line_pointer = input_line_pointer;
      input_line_pointer = "";
      s_align_bytes (nbytes);
      input_line_pointer = saved_input_line_pointer;
    }
}

Here is the call graph for this function:

void ia64_cons_fix_new ( fragS *  f,
int  where,
int  nbytes,
expressionS exp 
)

Definition at line 11161 of file tc-ia64.c.

{
  bfd_reloc_code_real_type code;
  fixS *fix;

  switch (nbytes)
    {
      /* There are no reloc for 8 and 16 bit quantities, but we allow
        them here since they will work fine as long as the expression
        is fully defined at the end of the pass over the source file.  */
    case 1: code = BFD_RELOC_8; break;
    case 2: code = BFD_RELOC_16; break;
    case 4:
      if (target_big_endian)
       code = BFD_RELOC_IA64_DIR32MSB;
      else
       code = BFD_RELOC_IA64_DIR32LSB;
      break;

    case 8:
      /* In 32-bit mode, data8 could mean function descriptors too.  */
      if (exp->X_op == O_pseudo_fixup
         && exp->X_op_symbol
         && S_GET_VALUE (exp->X_op_symbol) == FUNC_IPLT_RELOC
         && !(md.flags & EF_IA_64_ABI64))
       {
         if (target_big_endian)
           code = BFD_RELOC_IA64_IPLTMSB;
         else
           code = BFD_RELOC_IA64_IPLTLSB;
         exp->X_op = O_symbol;
         break;
       }
      else
       {
         if (target_big_endian)
           code = BFD_RELOC_IA64_DIR64MSB;
         else
           code = BFD_RELOC_IA64_DIR64LSB;
         break;
       }

    case 16:
      if (exp->X_op == O_pseudo_fixup
         && exp->X_op_symbol
         && S_GET_VALUE (exp->X_op_symbol) == FUNC_IPLT_RELOC)
       {
         if (target_big_endian)
           code = BFD_RELOC_IA64_IPLTMSB;
         else
           code = BFD_RELOC_IA64_IPLTLSB;
         exp->X_op = O_symbol;
         break;
       }
      /* FALLTHRU */

    default:
      as_bad ("Unsupported fixup size %d", nbytes);
      ignore_rest_of_line ();
      return;
    }

  if (exp->X_op == O_pseudo_fixup)
    {
      exp->X_op = O_symbol;
      code = ia64_gen_real_reloc_type (exp->X_op_symbol, code);
      /* ??? If code unchanged, unsupported.  */
    }

  fix = fix_new_exp (f, where, nbytes, exp, 0, code);
  /* We need to store the byte order in effect in case we're going
     to fix an 8 or 16 bit relocation (for which there no real
     relocs available).  See md_apply_fix().  */
  fix->tc_fix_data.bigendian = target_big_endian;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void ia64_convert_frag ( fragS *  frag)

Definition at line 3115 of file tc-ia64.c.

{
  unw_rec_list *list;
  int len, size, pad;
  valueT flag_value;

  /* ??? This code is identical to ia64_estimate_size_before_relax.  */
  list = (unw_rec_list *) frag->fr_opcode;
  fixup_unw_records (list, 0);

  len = calc_record_size (list);
  /* pad to pointer-size boundary.  */
  pad = len % md.pointer_size;
  if (pad != 0)
    len += md.pointer_size - pad;
  /* Add 8 for the header.  */
  size = len + 8;
  /* Add a pointer for the personality offset.  */
  if (frag->fr_offset)
    size += md.pointer_size;

  /* fr_var carries the max_chars that we created the fragment with.
     We must, of course, have allocated enough memory earlier.  */
  assert (frag->fr_var >= size);

  /* Initialize the header area. fr_offset is initialized with
     unwind.personality_routine.  */
  if (frag->fr_offset)
    {
      if (md.flags & EF_IA_64_ABI64)
       flag_value = (bfd_vma) 3 << 32;
      else
       /* 32-bit unwind info block.  */
       flag_value = (bfd_vma) 0x1003 << 32;
    }
  else
    flag_value = 0;

 md_number_to_chars (frag->fr_literal,
                   (((bfd_vma) 1 << 48) /* Version.  */
                    | flag_value        /* U & E handler flags.  */
                    | (len / md.pointer_size)), /* Length.  */
                   8);

  /* Skip the header.  */
  vbyte_mem_ptr = frag->fr_literal + 8;
  process_unw_records (list, output_vbyte_mem);

  /* Fill the padding bytes with zeros.  */
  if (pad != 0)
    md_number_to_chars (frag->fr_literal + len + 8 - md.pointer_size + pad, 0,
                     md.pointer_size - pad);

  frag->fr_fix += size;
  frag->fr_type = rs_fill;
  frag->fr_var = 0;
  frag->fr_offset = 0;
}

Here is the call graph for this function:

static void ia64_do_align ( int  nbytes) [static]

Definition at line 1186 of file tc-ia64.c.

{
  char *saved_input_line_pointer = input_line_pointer;

  input_line_pointer = "";
  s_align_bytes (nbytes);
  input_line_pointer = saved_input_line_pointer;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void ia64_dwarf2_emit_offset ( symbolS *  symbol,
unsigned int  size 
)

Definition at line 11146 of file tc-ia64.c.

Here is the call graph for this function:

Definition at line 11842 of file tc-ia64.c.

Here is the call graph for this function:

flagword ia64_elf_section_flags ( flagword  flags,
int  attr,
type   
)

Definition at line 1037 of file tc-ia64.c.

{
  if (attr & SHF_IA_64_SHORT)
    flags |= SEC_SMALL_DATA;
  return flags;
}
int ia64_elf_section_letter ( int  letter,
char **  ptr_msg 
)

Definition at line 1021 of file tc-ia64.c.

{
  if (letter == 's')
    return SHF_IA_64_SHORT;
  else if (letter == 'o')
    return SHF_LINK_ORDER;

  *ptr_msg = _("Bad .section directive: want a,o,s,w,x,M,S,G,T in string");
  return -1;
}
int ia64_elf_section_type ( char *  str,
size_t  len 
) const

Definition at line 1047 of file tc-ia64.c.

{
#define STREQ(s) ((len == sizeof (s) - 1) && (strncmp (str, s, sizeof (s) - 1) == 0))