FreeBSD/contrib/binutils/gas/config/tc-ia64.c
/* This function converts a rs_machine_dependent variant frag into a
  normal fill frag with the unwind image from the the record list.  */
This function converts a rs_machine_dependent variant frag into a
normal fill frag with the unwind image from the the record list.
This function converts a rs_machine_dependent variant frag into a normal fill frag with the unwind image from the the record list .
void
ia64_convert_frag (fragS *frag)
{
  unw_rec_list *list;
  int len, size, pad;
  valueT flag_value;
  list = (unw_rec_list *) frag->fr_opcode;
  fixup_unw_records (list, 0);
  len = calc_record_size (list);
  pad = len % md.pointer_size;
  if (pad != 0)
    len += md.pointer_size - pad;
  size = len + 8;
  if (frag->fr_offset)
    size += md.pointer_size;
  assert (frag->fr_var >= size);
  if (frag->fr_offset)
    {
      if (md.flags & EF_IA_64_ABI64)
	flag_value = (bfd_vma) 3 << 32;
      else
	flag_value = (bfd_vma) 0x1003 << 32;
    }
  else
    flag_value = 0;
 md_number_to_chars (frag->fr_literal,
		     (((bfd_vma) 1 << 48) 
		      | flag_value        
		      | (len / md.pointer_size)), 
		     8);
  vbyte_mem_ptr = frag->fr_literal + 8;
  process_unw_records (list, output_vbyte_mem);
  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;
}
void ia64_convert_frag ( fragS * frag ) { unw_rec_list * list ; int len , size , pad ; valueT flag_value ; list = ( unw_rec_list * ) frag -> fr_opcode ; fixup_unw_records ( list , 0 ) ; len = calc_record_size ( list ) ; pad = len % md . pointer_size ; if ( pad != 0 ) len += md . pointer_size - pad ; size = len + 8 ; if ( frag -> fr_offset ) size += md . pointer_size ; assert ( frag -> fr_var >= size ) ; if ( frag -> fr_offset ) { if ( md . flags & EF_IA_64_ABI64 ) flag_value = ( bfd_vma ) 3 << 32 ; else flag_value = ( bfd_vma ) 0x1003 << 32 ; } else flag_value = 0 ; md_number_to_chars ( frag -> fr_literal , ( ( ( bfd_vma ) 1 << 48 ) | flag_value | ( len / md . pointer_size ) ) , 8 ) ; vbyte_mem_ptr = frag -> fr_literal + 8 ; process_unw_records ( list , output_vbyte_mem ) ; 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 ; }
This function converts a rs_machine_dependent variant frag into a
normal fill frag with the unwind image from the the record list.
This function converts a rs_machine_dependent variant frag into a normal fill frag with the unwind image from the the record list .
/* ??? This code is identical to ia64_estimate_size_before_relax.  */ /* pad to pointer-size boundary.  */ /* Add 8 for the header.  */ /* Add a pointer for the personality offset.  */ /* fr_var carries the max_chars that we created the fragment with.
     We must, of course, have allocated enough memory earlier.  */ /* Initialize the header area. fr_offset is initialized with
     unwind.personality_routine.  */ /* 32-bit unwind info block.  */ /* Version.  */ /* U & E handler flags.  */ /* Length.  */ /* Skip the header.  */ /* Fill the padding bytes with zeros.  */