参照元

説明

引数

返り値

参考

実装

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

void
rtx_writer::print_rtx_operand_code_i (const_rtx in_rtx, int idx)
{
  if (idx == 4 && INSN_P (in_rtx))
    {
#ifndef GENERATOR_FILE
      const rtx_insn *in_insn = as_a <const rtx_insn *> (in_rtx);

      /*  Pretty-print insn locations.  Ignore scoping as it is mostly
	  redundant with line number information and do not print anything
	  when there is no location information available.  */
      if (INSN_HAS_LOCATION (in_insn))
	{
	  expanded_location xloc = insn_location (in_insn);
	  fprintf (m_outfile, " \"%s\":%i", xloc.file, xloc.line);
	}
#endif
    }
  else if (idx == 6 && GET_CODE (in_rtx) == ASM_OPERANDS)
    {
#ifndef GENERATOR_FILE
      if (ASM_OPERANDS_SOURCE_LOCATION (in_rtx) != UNKNOWN_LOCATION)
	fprintf (m_outfile, " %s:%i",
		 LOCATION_FILE (ASM_OPERANDS_SOURCE_LOCATION (in_rtx)),
		 LOCATION_LINE (ASM_OPERANDS_SOURCE_LOCATION (in_rtx)));
#endif
    }
  else if (idx == 1 && GET_CODE (in_rtx) == ASM_INPUT)
    {
#ifndef GENERATOR_FILE
      if (ASM_INPUT_SOURCE_LOCATION (in_rtx) != UNKNOWN_LOCATION)
	fprintf (m_outfile, " %s:%i",
		 LOCATION_FILE (ASM_INPUT_SOURCE_LOCATION (in_rtx)),
		 LOCATION_LINE (ASM_INPUT_SOURCE_LOCATION (in_rtx)));
#endif
    }
  else if (idx == 5 && NOTE_P (in_rtx))
    {
      /* This field is only used for NOTE_INSN_DELETED_LABEL, and
	 other times often contains garbage from INSN->NOTE death.  */
      if (NOTE_KIND (in_rtx) == NOTE_INSN_DELETED_LABEL
	  || NOTE_KIND (in_rtx) == NOTE_INSN_DELETED_DEBUG_LABEL)
	fprintf (m_outfile, " %d",  XINT (in_rtx, idx));
    }
#if !defined(GENERATOR_FILE) && NUM_UNSPECV_VALUES > 0
  else if (idx == 1
	   && GET_CODE (in_rtx) == UNSPEC_VOLATILE
	   && XINT (in_rtx, 1) >= 0
	   && XINT (in_rtx, 1) < NUM_UNSPECV_VALUES)
    fprintf (m_outfile, " %s", unspecv_strings[XINT (in_rtx, 1)]);
#endif
#if !defined(GENERATOR_FILE) && NUM_UNSPEC_VALUES > 0
  else if (idx == 1
	   && (GET_CODE (in_rtx) == UNSPEC
	       || GET_CODE (in_rtx) == UNSPEC_VOLATILE)
	   && XINT (in_rtx, 1) >= 0
	   && XINT (in_rtx, 1) < NUM_UNSPEC_VALUES)
    fprintf (m_outfile, " %s", unspec_strings[XINT (in_rtx, 1)]);
#endif
  else
    {
      int value = XINT (in_rtx, idx);
      const char *name;
      int is_insn = INSN_P (in_rtx);

      /* Don't print INSN_CODEs in compact mode.  */
      if (m_compact && is_insn && &INSN_CODE (in_rtx) == &XINT (in_rtx, idx))
	{
	  m_sawclose = 0;
	  return;
	}

      if (flag_dump_unnumbered
	  && (is_insn || NOTE_P (in_rtx)))
	fputc ('#', m_outfile);
      else
	fprintf (m_outfile, " %d", value);

      if (is_insn && &INSN_CODE (in_rtx) == &XINT (in_rtx, idx)
	  && XINT (in_rtx, idx) >= 0
	  && (name = get_insn_name (XINT (in_rtx, idx))) != NULL)
	fprintf (m_outfile, " {%s}", name);
      m_sawclose = 0;
    }
}

コメント


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS