GCC Middle and Back End API Reference
|
#include "bconfig.h"
#include "system.h"
#include "errors.h"
#include "target.def"
#include "c-family/c-target.def"
#include "common/common-target.def"
#include "d/d-target.def"
#include "rust/rust-target.def"
Data Structures | |
struct | hook_desc |
struct | s_hook |
Macros | |
#define | HOOK_VECTOR_1(NAME, FRAGMENT) |
#define | DEFHOOKPOD(NAME, DOC, TYPE, INIT) |
#define | DEFHOOK(NAME, DOC, TYPE, PARAMS, INIT) |
#define | DEFHOOK_UNDOC(NAME, DOC, TYPE, PARAMS, INIT) |
#define | DEFHOOKPODX(NAME, TYPE, INIT) |
#define | HOOKSTRUCT(FRAGMENT) |
#define | HOOK_VECTOR(INIT_NAME, SNAME) |
#define | HOOK_VECTOR_END(DECL_NAME) |
#define | C90_EMPTY_HACK |
#define | HOOK_TYPE "Target Hook" |
#define | HOOK_PREFIX "TARGET_ASM_" |
#define | HOOK_PREFIX "TARGET_" |
#define | HOOK_PREFIX "TARGET_SCHED_" |
#define | HOOK_PREFIX "TARGET_SIMD_CLONE_" |
#define | HOOK_PREFIX "TARGET_SIMT_" |
#define | HOOK_PREFIX "TARGET_OMP_" |
#define | HOOK_PREFIX "TARGET_GOACC_" |
#define | HOOK_PREFIX "TARGET_VECTORIZE_" |
#define | HOOK_PREFIX "TARGET_" |
#define | HOOK_PREFIX "TARGET_ADDR_SPACE_" |
#define | HOOK_PREFIX "TARGET_" |
#define | HOOK_PREFIX "TARGET_C_" |
#define | HOOK_PREFIX "TARGET_CXX_" |
#define | HOOK_PREFIX "TARGET_EMUTLS_" |
#define | HOOK_PREFIX "TARGET_OPTION_" |
#define | HOOK_PREFIX "TARGET_" |
#define | HOOK_PREFIX "TARGET_SHRINK_WRAP_" |
#define | HOOK_PREFIX "TARGET_" |
#define | HOOK_PREFIX "TARGET_MODE_" |
#define | HOOK_PREFIX "TARGET_MEMTAG_" |
#define | HOOK_PREFIX "TARGET_" |
#define | DEF_TARGET_INSN(NAME, PROTO) |
#define | DEF_TARGET_INSN(NAME, PROTO) |
#define | DEF_TARGET_INSN(NAME, PROTO) |
#define | HOOK_VECTOR(INIT_NAME, SNAME) |
#define | HOOK_VECTOR_END(DECL_NAME) |
#define | C90_EMPTY_HACK |
#define | HOOK_TYPE "Common Target Hook" |
#define | HOOK_PREFIX "TARGET_" |
#define | HOOK_VECTOR(INIT_NAME, SNAME) |
#define | HOOK_VECTOR_END(DECL_NAME) |
#define | C90_EMPTY_HACK |
#define | HOOK_TYPE "D Target Hook" |
#define | HOOK_PREFIX "TARGET_" |
#define | HOOK_VECTOR(INIT_NAME, SNAME) |
#define | HOOK_VECTOR_END(DECL_NAME) |
#define | C90_EMPTY_HACK |
#define | HOOK_TYPE "Rust Target Hook" |
#define | HOOK_PREFIX "TARGET_" |
Functions | |
static char * | upstrdup (const char *in) |
static hashval_t | s_hook_hash (const void *p) |
static int | s_hook_eq_p (const void *p1, const void *p2) |
static void | emit_documentation (const char *in_fname) |
static void | emit_init_macros (const char *docname) |
int | main (int argc, char **argv) |
Variables | |
static struct hook_desc | hook_array [] |
#define C90_EMPTY_HACK |
#define C90_EMPTY_HACK |
#define C90_EMPTY_HACK |
#define C90_EMPTY_HACK |
#define DEF_TARGET_INSN | ( | NAME, | |
PROTO ) |
#define DEF_TARGET_INSN | ( | NAME, | |
PROTO ) |
#define DEF_TARGET_INSN | ( | NAME, | |
PROTO ) |
#define DEFHOOK | ( | NAME, | |
DOC, | |||
TYPE, | |||
PARAMS, | |||
INIT ) |
#define DEFHOOK_UNDOC | ( | NAME, | |
DOC, | |||
TYPE, | |||
PARAMS, | |||
INIT ) |
#define DEFHOOKPOD | ( | NAME, | |
DOC, | |||
TYPE, | |||
INIT ) |
#define DEFHOOKPODX | ( | NAME, | |
TYPE, | |||
INIT ) |
#define HOOK_PREFIX "TARGET_" |
#define HOOK_PREFIX "TARGET_" |
#define HOOK_PREFIX "TARGET_" |
#define HOOK_PREFIX "TARGET_ASM_" |
#define HOOK_PREFIX "TARGET_" |
#define HOOK_PREFIX "TARGET_SCHED_" |
#define HOOK_PREFIX "TARGET_SIMD_CLONE_" |
#define HOOK_PREFIX "TARGET_SIMT_" |
#define HOOK_PREFIX "TARGET_OMP_" |
#define HOOK_PREFIX "TARGET_GOACC_" |
#define HOOK_PREFIX "TARGET_VECTORIZE_" |
#define HOOK_PREFIX "TARGET_" |
#define HOOK_PREFIX "TARGET_ADDR_SPACE_" |
#define HOOK_PREFIX "TARGET_" |
#define HOOK_PREFIX "TARGET_C_" |
#define HOOK_PREFIX "TARGET_CXX_" |
#define HOOK_PREFIX "TARGET_EMUTLS_" |
#define HOOK_PREFIX "TARGET_OPTION_" |
#define HOOK_PREFIX "TARGET_" |
#define HOOK_PREFIX "TARGET_SHRINK_WRAP_" |
#define HOOK_PREFIX "TARGET_" |
#define HOOK_PREFIX "TARGET_MODE_" |
#define HOOK_PREFIX "TARGET_MEMTAG_" |
#define HOOK_PREFIX "TARGET_" |
#define HOOK_TYPE "Common Target Hook" |
#define HOOK_TYPE "D Target Hook" |
#define HOOK_TYPE "Rust Target Hook" |
#define HOOK_TYPE "Target Hook" |
#define HOOK_VECTOR | ( | INIT_NAME, | |
SNAME ) |
#define HOOK_VECTOR | ( | INIT_NAME, | |
SNAME ) |
#define HOOK_VECTOR | ( | INIT_NAME, | |
SNAME ) |
#define HOOK_VECTOR | ( | INIT_NAME, | |
SNAME ) |
#define HOOK_VECTOR_END | ( | DECL_NAME | ) |
#define HOOK_VECTOR_END | ( | DECL_NAME | ) |
#define HOOK_VECTOR_END | ( | DECL_NAME | ) |
#define HOOK_VECTOR_END | ( | DECL_NAME | ) |
#define HOOKSTRUCT | ( | FRAGMENT | ) |
|
static |
Read the documentation file with name IN_FNAME, perform substitutions to incorporate information from hook_array, and emit the result on stdout. Hooks defined with DEFHOOK / DEFHOOKPOD are emitted at the place of a matching @hook in the input file; if there is no matching @hook, the hook is emitted after the hook that precedes it in target.def . Usually, the emitted hook documentation starts with the hook signature, followed by the string from the doc field. The documentation is bracketed in @deftypefn / @deftypevr and a matching @end. While emitting the doc field, an @findex entry is added to the affected paragraph. If the doc field starts with '*', the leading '*' is stripped, and the doc field is otherwise emitted unaltered; no function signature/ @deftypefn/deftypevr/@end is emitted. In particular, a doc field of "*" means not to emit any ocumentation for this target.def / hook_array entry at all (there might be documentation for this hook in the file named IN_FNAME, though). A doc field of 0 is used to append the hook signature after the previous hook's signture, so that one description can be used for a group of hooks. When the doc field is "", @deftypefn/@deftypevr and the hook signature is emitted, but not the matching @end. This allows all the free-form documentation to be placed in IN_FNAME, to work around GPL/GFDL licensing incompatibility issues.
References hook_desc::doc, fatal(), fopen, free(), hook_array, i, s_hook::name, hook_desc::param, s_hook::pos, s_hook_eq_p(), s_hook_hash(), hook_desc::type, and upstrdup().
Referenced by main().
|
static |
Emit #defines to stdout (this will be redirected to generate target-hook-def.h) which set target hooks initializer macros to their default values. These should only be emitted for hooks whose type is given by DOCNAME.
References fatal(), hook_array, i, s_hook::name, and upstrdup().
Referenced by main().
int main | ( | int | argc, |
char ** | argv ) |
References emit_documentation(), emit_init_macros(), and progname.
|
static |
References s_hook::name.
Referenced by emit_documentation().
|
static |
References s_hook::name.
Referenced by emit_documentation().
|
static |
Return an upper-case copy of IN.
Referenced by emit_documentation(), and emit_init_macros().
|
static |
Referenced by emit_documentation(), and emit_init_macros().