⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tc-ia64.c

📁 基于4个mips核的noc设计
💻 C
📖 第 1 页 / 共 5 页
字号:
  int ret;  ab = (ab & 3);  reg = (reg & 0x1f);  ret = (ab << 5) | reg;  return ret;}static voidoutput_X1_format (f, rtype, ab, reg, t, w1)     vbyte_func f;     unw_record_type rtype;     int ab, reg;     unsigned long t;     unsigned long w1;{  char bytes[20];  int r = 0;  int count = 2;  bytes[0] = UNW_X1;  if (rtype == spill_sprel)    r = 1;  else if (rtype != spill_psprel)    as_bad ("Invalid record type for format X1");  bytes[1] = ((r << 7) | format_ab_reg (ab, reg));  count += output_leb128 (bytes + 2, t, 0);  count += output_leb128 (bytes + count, w1, 0);  (*f) (count, bytes, NULL);}static voidoutput_X2_format (f, ab, reg, x, y, treg, t)     vbyte_func f;     int ab, reg;     int x, y, treg;     unsigned long t;{  char bytes[20];  int count = 3;  bytes[0] = UNW_X2;  bytes[1] = (((x & 1) << 7) | format_ab_reg (ab, reg));  bytes[2] = (((y & 1) << 7) | (treg & 0x7f));  count += output_leb128 (bytes + 3, t, 0);  (*f) (count, bytes, NULL);}static voidoutput_X3_format (f, rtype, qp, ab, reg, t, w1)     vbyte_func f;     unw_record_type rtype;     int qp;     int ab, reg;     unsigned long t;     unsigned long w1;{  char bytes[20];  int r = 0;  int count = 3;  bytes[0] = UNW_X3;  if (rtype == spill_sprel_p)    r = 1;  else if (rtype != spill_psprel_p)    as_bad ("Invalid record type for format X3");  bytes[1] = ((r << 7) | (qp & 0x3f));  bytes[2] = format_ab_reg (ab, reg);  count += output_leb128 (bytes + 3, t, 0);  count += output_leb128 (bytes + count, w1, 0);  (*f) (count, bytes, NULL);}static voidoutput_X4_format (f, qp, ab, reg, x, y, treg, t)     vbyte_func f;     int qp;     int ab, reg;     int x, y, treg;     unsigned long t;{  char bytes[20];  int count = 4;  bytes[0] = UNW_X4;  bytes[1] = (qp & 0x3f);  bytes[2] = (((x & 1) << 7) | format_ab_reg (ab, reg));  bytes[3] = (((y & 1) << 7) | (treg & 0x7f));  count += output_leb128 (bytes + 4, t, 0);  (*f) (count, bytes, NULL);}/* This function allocates a record list structure, and initializes fields.  */static unw_rec_list *alloc_record (unw_record_type t){  unw_rec_list *ptr;  ptr = xmalloc (sizeof (*ptr));  ptr->next = NULL;  ptr->slot_number = SLOT_NUM_NOT_SET;  ptr->r.type = t;  return ptr;}/* This function frees an entire list of record structures.  */voidfree_list_records (unw_rec_list *first){  unw_rec_list *ptr;  for (ptr = first; ptr != NULL;)    {      unw_rec_list *tmp = ptr;      if ((tmp->r.type == prologue || tmp->r.type == prologue_gr)	  && tmp->r.record.r.mask.i)	free (tmp->r.record.r.mask.i);      ptr = ptr->next;      free (tmp);    }}static unw_rec_list *output_prologue (){  unw_rec_list *ptr = alloc_record (prologue);  memset (&ptr->r.record.r.mask, 0, sizeof (ptr->r.record.r.mask));  return ptr;}static unw_rec_list *output_prologue_gr (saved_mask, reg)     unsigned int saved_mask;     unsigned int reg;{  unw_rec_list *ptr = alloc_record (prologue_gr);  memset (&ptr->r.record.r.mask, 0, sizeof (ptr->r.record.r.mask));  ptr->r.record.r.grmask = saved_mask;  ptr->r.record.r.grsave = reg;  return ptr;}static unw_rec_list *output_body (){  unw_rec_list *ptr = alloc_record (body);  return ptr;}static unw_rec_list *output_mem_stack_f (size)     unsigned int size;{  unw_rec_list *ptr = alloc_record (mem_stack_f);  ptr->r.record.p.size = size;  return ptr;}static unw_rec_list *output_mem_stack_v (){  unw_rec_list *ptr = alloc_record (mem_stack_v);  return ptr;}static unw_rec_list *output_psp_gr (gr)     unsigned int gr;{  unw_rec_list *ptr = alloc_record (psp_gr);  ptr->r.record.p.gr = gr;  return ptr;}static unw_rec_list *output_psp_sprel (offset)     unsigned int offset;{  unw_rec_list *ptr = alloc_record (psp_sprel);  ptr->r.record.p.spoff = offset / 4;  return ptr;}static unw_rec_list *output_rp_when (){  unw_rec_list *ptr = alloc_record (rp_when);  return ptr;}static unw_rec_list *output_rp_gr (gr)     unsigned int gr;{  unw_rec_list *ptr = alloc_record (rp_gr);  ptr->r.record.p.gr = gr;  return ptr;}static unw_rec_list *output_rp_br (br)     unsigned int br;{  unw_rec_list *ptr = alloc_record (rp_br);  ptr->r.record.p.br = br;  return ptr;}static unw_rec_list *output_rp_psprel (offset)     unsigned int offset;{  unw_rec_list *ptr = alloc_record (rp_psprel);  ptr->r.record.p.pspoff = offset / 4;  return ptr;}static unw_rec_list *output_rp_sprel (offset)     unsigned int offset;{  unw_rec_list *ptr = alloc_record (rp_sprel);  ptr->r.record.p.spoff = offset / 4;  return ptr;}static unw_rec_list *output_pfs_when (){  unw_rec_list *ptr = alloc_record (pfs_when);  return ptr;}static unw_rec_list *output_pfs_gr (gr)     unsigned int gr;{  unw_rec_list *ptr = alloc_record (pfs_gr);  ptr->r.record.p.gr = gr;  return ptr;}static unw_rec_list *output_pfs_psprel (offset)     unsigned int offset;{  unw_rec_list *ptr = alloc_record (pfs_psprel);  ptr->r.record.p.pspoff = offset / 4;  return ptr;}static unw_rec_list *output_pfs_sprel (offset)     unsigned int offset;{  unw_rec_list *ptr = alloc_record (pfs_sprel);  ptr->r.record.p.spoff = offset / 4;  return ptr;}static unw_rec_list *output_preds_when (){  unw_rec_list *ptr = alloc_record (preds_when);  return ptr;}static unw_rec_list *output_preds_gr (gr)     unsigned int gr;{  unw_rec_list *ptr = alloc_record (preds_gr);  ptr->r.record.p.gr = gr;  return ptr;}static unw_rec_list *output_preds_psprel (offset)     unsigned int offset;{  unw_rec_list *ptr = alloc_record (preds_psprel);  ptr->r.record.p.pspoff = offset / 4;  return ptr;}static unw_rec_list *output_preds_sprel (offset)     unsigned int offset;{  unw_rec_list *ptr = alloc_record (preds_sprel);  ptr->r.record.p.spoff = offset / 4;  return ptr;}static unw_rec_list *output_fr_mem (mask)     unsigned int mask;{  unw_rec_list *ptr = alloc_record (fr_mem);  ptr->r.record.p.rmask = mask;  return ptr;}static unw_rec_list *output_frgr_mem (gr_mask, fr_mask)     unsigned int gr_mask;     unsigned int fr_mask;{  unw_rec_list *ptr = alloc_record (frgr_mem);  ptr->r.record.p.grmask = gr_mask;  ptr->r.record.p.frmask = fr_mask;  return ptr;}static unw_rec_list *output_gr_gr (mask, reg)     unsigned int mask;     unsigned int reg;{  unw_rec_list *ptr = alloc_record (gr_gr);  ptr->r.record.p.grmask = mask;  ptr->r.record.p.gr = reg;  return ptr;}static unw_rec_list *output_gr_mem (mask)     unsigned int mask;{  unw_rec_list *ptr = alloc_record (gr_mem);  ptr->r.record.p.rmask = mask;  return ptr;}static unw_rec_list *output_br_mem (unsigned int mask){  unw_rec_list *ptr = alloc_record (br_mem);  ptr->r.record.p.brmask = mask;  return ptr;}static unw_rec_list *output_br_gr (save_mask, reg)     unsigned int save_mask;     unsigned int reg;{  unw_rec_list *ptr = alloc_record (br_gr);  ptr->r.record.p.brmask = save_mask;  ptr->r.record.p.gr = reg;  return ptr;}static unw_rec_list *output_spill_base (offset)     unsigned int offset;{  unw_rec_list *ptr = alloc_record (spill_base);  ptr->r.record.p.pspoff = offset / 4;  return ptr;}static unw_rec_list *output_unat_when (){  unw_rec_list *ptr = alloc_record (unat_when);  return ptr;}static unw_rec_list *output_unat_gr (gr)     unsigned int gr;{  unw_rec_list *ptr = alloc_record (unat_gr);  ptr->r.record.p.gr = gr;  return ptr;}static unw_rec_list *output_unat_psprel (offset)     unsigned int offset;{  unw_rec_list *ptr = alloc_record (unat_psprel);  ptr->r.record.p.pspoff = offset / 4;  return ptr;}static unw_rec_list *output_unat_sprel (offset)     unsigned int offset;{  unw_rec_list *ptr = alloc_record (unat_sprel);  ptr->r.record.p.spoff = offset / 4;  return ptr;}static unw_rec_list *output_lc_when (){  unw_rec_list *ptr = alloc_record (lc_when);  return ptr;}static unw_rec_list *output_lc_gr (gr)     unsigned int gr;{  unw_rec_list *ptr = alloc_record (lc_gr);  ptr->r.record.p.gr = gr;  return ptr;}static unw_rec_list *output_lc_psprel (offset)     unsigned int offset;{  unw_rec_list *ptr = alloc_record (lc_psprel);  ptr->r.record.p.pspoff = offset / 4;  return ptr;}static unw_rec_list *output_lc_sprel (offset)     unsigned int offset;{  unw_rec_list *ptr = alloc_record (lc_sprel);  ptr->r.record.p.spoff = offset / 4;  return ptr;}static unw_rec_list *output_fpsr_when (){  unw_rec_list *ptr = alloc_record (fpsr_when);  return ptr;}static unw_rec_list *output_fpsr_gr (gr)     unsigned int gr;{  unw_rec_list *ptr = alloc_record (fpsr_gr);  ptr->r.record.p.gr = gr;  return ptr;}static unw_rec_list *output_fpsr_psprel (offset)     unsigned int offset;{  unw_rec_list *ptr = alloc_record (fpsr_psprel);  ptr->r.record.p.pspoff = offset / 4;  return ptr;}static unw_rec_list *output_fpsr_sprel (offset)     unsigned int offset;{  unw_rec_list *ptr = alloc_record (fpsr_sprel);  ptr->r.record.p.spoff = offset / 4;  return ptr;}static unw_rec_list *output_priunat_when_gr (){  unw_rec_list *ptr = alloc_record (priunat_when_gr);  return ptr;}static unw_rec_list *output_priunat_when_mem (){  unw_rec_list *ptr = alloc_record (priunat_when_mem);  return ptr;}static unw_rec_list *output_priunat_gr (gr)     unsigned int gr;{  unw_rec_list *ptr = alloc_record (priunat_gr);  ptr->r.record.p.gr = gr;  return ptr;}static unw_rec_list *output_priunat_psprel (offset)     unsigned int offset;{  unw_rec_list *ptr = alloc_record (priunat_psprel);  ptr->r.record.p.pspoff = offset / 4;  return ptr;}static unw_rec_list *output_priunat_sprel (offset)     unsigned int offset;{  unw_rec_list *ptr = alloc_record (priunat_sprel);  ptr->r.record.p.spoff = offset / 4;  return ptr;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -