GCC Middle and Back End API Reference
gengenrtl.cc File Reference
#include "bconfig.h"
#include "system.h"
#include "rtl.def"
Include dependency graph for gengenrtl.cc:

Data Structures

struct  rtx_definition
 

Macros

#define CONST_DOUBLE_FORMAT   ""
 
#define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS)
 
#define NUM_RTX_CODE   ARRAY_SIZE (defs)
 

Functions

static const char * type_from_format (int c)
 
static const char * accessor_from_format (int c)
 
static int special_format (const char *fmt)
 
static bool always_void_p (int idx)
 
static int special_rtx (int idx)
 
static int excluded_rtx (int idx)
 
static void find_formats (void)
 
static void genmacro (int idx)
 
static void gendef (const char *format)
 
static void genlegend (void)
 
static void genheader (void)
 
int main (void)
 

Variables

static const struct rtx_definition defs []
 
static const char * formats [NUM_RTX_CODE]
 

Macro Definition Documentation

◆ CONST_DOUBLE_FORMAT

#define CONST_DOUBLE_FORMAT   ""
rtl.def needs CONST_DOUBLE_FORMAT, but we don't care what
CONST_DOUBLE_FORMAT is because we're not going to be generating
anything for CONST_DOUBLE anyway.   

Referenced by immed_double_const().

◆ DEF_RTL_EXPR

#define DEF_RTL_EXPR ( ENUM,
NAME,
FORMAT,
CLASS )
Value:
{ #ENUM, NAME, FORMAT },
@ ENUM
Definition gengtype.h:476
@ NAME
Definition tree-ssa-pre.cc:242

◆ NUM_RTX_CODE

Function Documentation

◆ accessor_from_format()

static const char * accessor_from_format ( int c)
static
Decode a format letter into the proper accessor function.   

References gcc_unreachable.

Referenced by gendef().

◆ always_void_p()

static bool always_void_p ( int idx)
inlinestatic
Return true if CODE always has VOIDmode.   

References defs, and rtx_definition::enumname.

Referenced by gen_exp(), and genmacro().

◆ excluded_rtx()

static int excluded_rtx ( int idx)
static
Return nonzero if the RTL code given by index IDX is one that we should
generate no macro for at all (because gen_rtx_FOO is never used or
cannot have the obvious interface).   

References defs, and rtx_definition::enumname.

Referenced by genmacro().

◆ find_formats()

static void find_formats ( void )
static
Place a list of all format specifiers we use into the array FORMAT.   

References defs, rtx_definition::format, formats, i, NUM_RTX_CODE, and special_format().

Referenced by main().

◆ gendef()

static void gendef ( const char * format)
static
Generate the code for functions to generate RTL whose format is FORMAT.   

References accessor_from_format(), rtx_definition::format, i, and type_from_format().

Referenced by genheader().

◆ genheader()

static void genheader ( void )
static
Generate the text of the header file we make, genrtl.h.   

References defs, rtx_definition::format, formats, gendef(), genmacro(), i, NUM_RTX_CODE, and special_format().

Referenced by main().

◆ genlegend()

static void genlegend ( void )
static
Generate the documentation header for files we write.   

Referenced by main().

◆ genmacro()

static void genmacro ( int idx)
static
Generate macros to generate RTL of code IDX using the functions we
write.   

References always_void_p(), defs, rtx_definition::enumname, excluded_rtx(), rtx_definition::format, i, and special_rtx().

Referenced by genheader().

◆ main()

int main ( void )
This is the main program.   

References FATAL_EXIT_CODE, find_formats(), genheader(), genlegend(), and SUCCESS_EXIT_CODE.

◆ special_format()

static int special_format ( const char * fmt)
static
Return nonzero if we should ignore FMT, an RTL format, when making
the list of formats we write routines to create.   

Referenced by find_formats(), and genheader().

◆ special_rtx()

static int special_rtx ( int idx)
static
Return nonzero if the RTL code given by index IDX is one that we should
generate a gen_rtx_raw_FOO macro for, not gen_rtx_FOO (because gen_rtx_FOO
is a wrapper in emit-rtl.cc).   

References defs, and rtx_definition::enumname.

Referenced by genmacro().

◆ type_from_format()

static const char * type_from_format ( int c)
static
Decode a format letter into a C type string.   

References gcc_unreachable.

Referenced by gendef().

Variable Documentation

◆ defs

◆ formats

const char* formats[NUM_RTX_CODE]
static

Referenced by find_formats(), and genheader().