参照元

説明

参考

gcc_target のメンバを調べる方法

targetm.starting_frame_offset を例に取って調べてみる。 まず target.def をメンバ名で検索する。

DEFHOOK
(starting_frame_offset,
 "This hook returns the offset from the frame pointer to the first local\n\
variable slot to be allocated.  If @code{FRAME_GROWS_DOWNWARD}, it is the\n\
offset to @emph{end} of the first slot allocated, otherwise it is the\n\
offset to @emph{beginning} of the first slot allocated.  The default\n\
implementation returns 0.",
 HOST_WIDE_INT, (void),
 hook_hwi_void_0)

こんなのが見つかるので、DEFHOOK の定義を調べるのだが、 型名が知りたいときは target.h のマクロ定義が使われるので、target.h を見ると良い。

#define DEFHOOK(NAME, DOC, TYPE, PARAMS, INIT) TYPE (* NAME) PARAMS;

従って starting_frame_offset の型は、

HOST_WIDE_INT (* starting_frame_offset) (void);

だとわかる。

実装

HOOK_VECTOR (TARGET_INITIALIZER, gcc_target)

コメント


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2019-05-10 (金) 18:23:33