参照元

説明

  • パス: gcc-8.3/gcc/print-rtl.c?
  • FIXME: これは何?
    • 説明

引数

返り値

  • なし

参考

実装

/* Subroutine of print_rtx_operand for handling code 'r'.  */

void
rtx_writer::print_rtx_operand_code_r (const_rtx in_rtx)
{
  int is_insn = INSN_P (in_rtx);
  unsigned int regno = REGNO (in_rtx);
#ifndef GENERATOR_FILE
  /* For hard registers and virtuals, always print the
     regno, except in compact mode.  */
  if (regno <= LAST_VIRTUAL_REGISTER && !m_compact)
    fprintf (m_outfile, " %d", regno);
  if (regno < FIRST_PSEUDO_REGISTER)
    fprintf (m_outfile, " %s", reg_names[regno]);
  else if (regno <= LAST_VIRTUAL_REGISTER)
    {
      if (regno == VIRTUAL_INCOMING_ARGS_REGNUM)
	fprintf (m_outfile, " virtual-incoming-args");
      else if (regno == VIRTUAL_STACK_VARS_REGNUM)
	fprintf (m_outfile, " virtual-stack-vars");
      else if (regno == VIRTUAL_STACK_DYNAMIC_REGNUM)
	fprintf (m_outfile, " virtual-stack-dynamic");
      else if (regno == VIRTUAL_OUTGOING_ARGS_REGNUM)
	fprintf (m_outfile, " virtual-outgoing-args");
      else if (regno == VIRTUAL_CFA_REGNUM)
	fprintf (m_outfile, " virtual-cfa");
      else if (regno == VIRTUAL_PREFERRED_STACK_BOUNDARY_REGNUM)
	fprintf (m_outfile, " virtual-preferred-stack-boundary");
      else
	fprintf (m_outfile, " virtual-reg-%d", regno-FIRST_VIRTUAL_REGISTER);
    }
  else
#endif
    if (flag_dump_unnumbered && is_insn)
      fputc ('#', m_outfile);
    else if (m_compact)
      {
	/* In compact mode, print pseudos with '< and '>' wrapping the regno,
	   offseting it by (LAST_VIRTUAL_REGISTER + 1), so that the
	   first non-virtual pseudo is dumped as "<0>".  */
	gcc_assert (regno > LAST_VIRTUAL_REGISTER);
	fprintf (m_outfile, " <%d>", regno - (LAST_VIRTUAL_REGISTER + 1));
      }
    else
      fprintf (m_outfile, " %d", regno);
    • gcc-8.3/gcc/gcc_assert()?
#ifndef GENERATOR_FILE
  if (REG_ATTRS (in_rtx))
    {
      fputs (" [", m_outfile);
      if (regno != ORIGINAL_REGNO (in_rtx))
	fprintf (m_outfile, "orig:%i", ORIGINAL_REGNO (in_rtx));
      if (REG_EXPR (in_rtx))
	print_mem_expr (m_outfile, REG_EXPR (in_rtx));

      if (maybe_ne (REG_OFFSET (in_rtx), 0))
	{
	  fprintf (m_outfile, "+");
	  print_poly_int (m_outfile, REG_OFFSET (in_rtx));
	}
      fputs (" ]", m_outfile);
    }
  if (regno != ORIGINAL_REGNO (in_rtx))
    fprintf (m_outfile, " [%d]", ORIGINAL_REGNO (in_rtx));
#endif
}

コメント


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2020-03-13 (金) 17:23:04 (123d)