GCC Middle and Back End API Reference
gentarget-def.cc File Reference
#include "bconfig.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "rtl.h"
#include "errors.h"
#include "read-md.h"
#include "gensupport.h"
#include "hash-table.h"
#include "target-insns.def"
Include dependency graph for gentarget-def.cc:

Data Structures

struct  insn_hasher
 

Macros

#define DEF_TARGET_INSN(INSN, ARGS)    def_target_insn (#INSN, #ARGS);
 

Functions

static bool parse_argument (const char *p, const char **end_out, unsigned int *opno_out=0, bool *required_out=0)
 
static void def_target_insn (const char *name, const char *prototype)
 
static void add_insn (md_rtx_info *info)
 
int main (int argc, const char **argv)
 

Variables

static hash_table< insn_hasher > * insns
 
static hash_table< nofree_string_hash > * stubs
 
static hash_map< nofree_string_hash, const char * > * have_funcs
 

Macro Definition Documentation

◆ DEF_TARGET_INSN

#define DEF_TARGET_INSN ( INSN,
ARGS )    def_target_insn (#INSN, #ARGS);

Function Documentation

◆ add_insn()

static void add_insn ( md_rtx_info * info)
static
Record the DEFINE_INSN or DEFINE_EXPAND described by INFO.   

References md_rtx_info::def, error_at(), ggc_alloc(), insns, md_rtx_info::loc, and XSTR.

Referenced by main().

◆ def_target_insn()

static void def_target_insn ( const char * name,
const char * prototype )
static
Output hook definitions for pattern NAME, which has target-insns.def
prototype PROTOTYPE.   

References end(), error(), error_at(), FATAL_EXIT_CODE, fputc(), gcc_assert, get_file_location(), get_pattern_stats(), ggc_alloc(), have_funcs, i, insns, maybe_eval_c_test(), parse_argument(), md_reader::print_c_condition(), rtx_reader_ptr, stats, stubs, XSTR, and XVEC.

◆ main()

◆ parse_argument()

static bool parse_argument ( const char * p,
const char ** end_out,
unsigned int * opno_out = 0,
bool * required_out = 0 )
static
Return true if the part of the prototype at P is for an argument
name.  If so, point *END_OUT to the first character after the name.
If OPNO_OUT is nonnull, set *OPNO_OUT to the number of the associated
operand.  If REQUIRED_OUT is nonnull, set *REQUIRED_OUT to whether the
.md pattern is required to match the operand.   

References ggc_alloc().

Referenced by def_target_insn().

Variable Documentation

◆ have_funcs

hash_map<nofree_string_hash, const char *>* have_funcs
static
Records which C conditions have been wrapped in functions, as a mapping
from the C condition to the function name.   

Referenced by def_target_insn(), and main().

◆ insns

◆ stubs

Records the prototype suffix X for each invalid_X stub that has been
generated.   

Referenced by def_target_insn(), and main().