*参照元 [#z76947bc]
#backlinks

*説明 [#tc5c765d]
-パス: [[gcc-8.3/gcc/recog.c]]

-FIXME: これは何?
--説明


**引数 [#s9858746]
-rtx_insn *insn
--
--[[gcc-8.3/gcc/rtx_insn]]


**返り値 [#u45a567d]
-なし


**参考 [#q54dd757]


*実装 [#ia2327b5]
 /* Analyze INSN and fill in recog_data.  */
 
 void
 extract_insn (rtx_insn *insn)
 {
   int i;
   int icode;
   int noperands;
   rtx body = PATTERN (insn);
 
-
--[[gcc-8.3/gcc/rtx]]
--[[gcc-8.3/gcc/PATTERN()]]

   recog_data.n_operands = 0;
   recog_data.n_alternatives = 0;
   recog_data.n_dups = 0;
   recog_data.is_asm = false;
 
-
--[[gcc-8.3/gcc/recog_data(global)]]

   switch (GET_CODE (body))
     {
     case USE:
     case CLOBBER:
     case ASM_INPUT:
     case ADDR_VEC:
     case ADDR_DIFF_VEC:
     case VAR_LOCATION:
     case DEBUG_MARKER:
       return;
 
-
--[[gcc-8.3/gcc/GET_CODE()]]

     case SET:
       if (GET_CODE (SET_SRC (body)) == ASM_OPERANDS)
 	goto asm_insn;
       else
 	goto normal_insn;
     case PARALLEL:
       if ((GET_CODE (XVECEXP (body, 0, 0)) == SET
 	   && GET_CODE (SET_SRC (XVECEXP (body, 0, 0))) == ASM_OPERANDS)
 	  || GET_CODE (XVECEXP (body, 0, 0)) == ASM_OPERANDS
 	  || GET_CODE (XVECEXP (body, 0, 0)) == ASM_INPUT)
 	goto asm_insn;
       else
 	goto normal_insn;
-
--[[gcc-8.3/gcc/XVECEXP()]]
--[[gcc-8.3/gcc/SET_SRC()]]

     case ASM_OPERANDS:
     asm_insn:
       recog_data.n_operands = noperands = asm_noperands (body);
-
--[[gcc-8.3/gcc/asm_nooperands()]]

       if (noperands >= 0)
 	{
 	  /* This insn is an `asm' with operands.  */
 
 	  /* expand_asm_operands makes sure there aren't too many operands.  */
 	  gcc_assert (noperands <= MAX_RECOG_OPERANDS);
 
 	  /* Now get the operand values and constraints out of the insn.  */
 	  decode_asm_operands (body, recog_data.operand,
 			       recog_data.operand_loc,
 			       recog_data.constraints,
 			       recog_data.operand_mode, NULL);
 	  memset (recog_data.is_operator, 0, sizeof recog_data.is_operator);
 	  if (noperands > 0)
 	    {
 	      const char *p =  recog_data.constraints[0];
 	      recog_data.n_alternatives = 1;
 	      while (*p)
 		recog_data.n_alternatives += (*p++ == ',');
 	    }
 	  recog_data.is_asm = true;
 	  break;
 	}
       fatal_insn_not_found (insn);
 
-
--[[gcc-8.3/gcc/gcc_assert()]]
--[[gcc-8.3/gcc/decode_asm_operands()]]
--[[gcc-8.3/gcc/fatal_insn_not_found()]]

     default:
     normal_insn:
       /* Ordinary insn: recognize it, get the operands via insn_extract
 	 and get the constraints.  */
 
       icode = recog_memoized (insn);
       if (icode < 0)
 	fatal_insn_not_found (insn);
 
       recog_data.n_operands = noperands = insn_data[icode].n_operands;
       recog_data.n_alternatives = insn_data[icode].n_alternatives;
       recog_data.n_dups = insn_data[icode].n_dups;
 
       insn_extract (insn);
 
       for (i = 0; i < noperands; i++)
 	{
 	  recog_data.constraints[i] = insn_data[icode].operand[i].constraint;
 	  recog_data.is_operator[i] = insn_data[icode].operand[i].is_operator;
 	  recog_data.operand_mode[i] = insn_data[icode].operand[i].mode;
 	  /* VOIDmode match_operands gets mode from their real operand.  */
 	  if (recog_data.operand_mode[i] == VOIDmode)
 	    recog_data.operand_mode[i] = GET_MODE (recog_data.operand[i]);
 	}
-
--[[gcc-8.3/gcc/insn_data(global)]]
--[[gcc-8.3/gcc/recog_memoized()]]
--[[gcc-8.3/gcc/fatal_insn_not_found()]]
--[[gcc-8.3/gcc/insn_extract()]]
--[[gcc-8.3/gcc/GET_MODE()]]

     }
   for (i = 0; i < noperands; i++)
     recog_data.operand_type[i]
       = (recog_data.constraints[i][0] == '=' ? OP_OUT
 	 : recog_data.constraints[i][0] == '+' ? OP_INOUT
 	 : OP_IN);
 
   gcc_assert (recog_data.n_alternatives <= MAX_RECOG_ALTERNATIVES);
 
   recog_data.insn = NULL;
   which_alternative = -1;
 }


*コメント [#df99fa45]

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS