*参照元 [#m871886a]
#backlinks

*説明 [#k8146ef3]
-パス: [[gcc-8.3/gcc/emit-rtl.c]]

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


**引数 [#m5bbb731]
-machine_mode mode
--
--[[gcc-8.3/gcc/machine_mode]]
-unsigned int regno
--


**返り値 [#d0b68e9a]
-rtx
--
--[[gcc-8.3/gcc/rtx]]


**参考 [#na6c37d3]


*実装 [#d1e3f976]
 rtx
 gen_rtx_REG (machine_mode mode, unsigned int regno)
 {
   /* In case the MD file explicitly references the frame pointer, have
      all such references point to the same frame pointer.  This is
      used during frame pointer elimination to distinguish the explicit
      references to these registers from pseudos that happened to be
      assigned to them.
 
      If we have eliminated the frame pointer or arg pointer, we will
      be using it as a normal register, for example as a spill
      register.  In such cases, we might be accessing it in a mode that
      is not Pmode and therefore cannot use the pre-allocated rtx.
 
      Also don't do this when we are making new REGs in reload, since
      we don't want to get confused with the real pointers.  */
 
   if (mode == Pmode && !reload_in_progress && !lra_in_progress)
     {
       if (regno == FRAME_POINTER_REGNUM
 	  && (!reload_completed || frame_pointer_needed))
 	return frame_pointer_rtx;
 
       if (!HARD_FRAME_POINTER_IS_FRAME_POINTER
 	  && regno == HARD_FRAME_POINTER_REGNUM
 	  && (!reload_completed || frame_pointer_needed))
 	return hard_frame_pointer_rtx;
 #if !HARD_FRAME_POINTER_IS_ARG_POINTER
       if (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
 	  && regno == ARG_POINTER_REGNUM)
 	return arg_pointer_rtx;
 #endif
 #ifdef RETURN_ADDRESS_POINTER_REGNUM
       if (regno == RETURN_ADDRESS_POINTER_REGNUM)
 	return return_address_pointer_rtx;
 #endif
       if (regno == (unsigned) PIC_OFFSET_TABLE_REGNUM
 	  && PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM
 	  && fixed_regs[PIC_OFFSET_TABLE_REGNUM])
 	return pic_offset_table_rtx;
       if (regno == STACK_POINTER_REGNUM)
 	return stack_pointer_rtx;
     }
 
-
--[[gcc-8.3/gcc/fixed_regs(global)]]

 #if 0
   /* If the per-function register table has been set up, try to re-use
      an existing entry in that table to avoid useless generation of RTL.
 
      This code is disabled for now until we can fix the various backends
      which depend on having non-shared hard registers in some cases.   Long
      term we want to re-enable this code as it can significantly cut down
      on the amount of useless RTL that gets generated.
 
      We'll also need to fix some code that runs after reload that wants to
      set ORIGINAL_REGNO.  */
 
   if (cfun
       && cfun->emit
       && regno_reg_rtx
       && regno < FIRST_PSEUDO_REGISTER
       && reg_raw_mode[regno] == mode)
     return regno_reg_rtx[regno];
 #endif
 
-
--[[gcc-8.3/gcc/reg_raw_mode(global)]]
--[[gcc-8.3/gcc/regno_reg_rtx(global)]]

   return gen_raw_REG (mode, regno);
 }
-
--[[gcc-8.3/gcc/gen_raw_REG()]]


*コメント [#a30b19b6]

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