GCC Middle and Back End API Reference
read-md.h File Reference
#include "obstack.h"
Include dependency graph for read-md.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  file_location
 
struct  md_name
 
struct  md_constant
 
struct  enum_value
 
struct  enum_type
 
struct  overloaded_instance
 
struct  overloaded_name
 
class  md_reader
 
struct  md_reader::ptr_loc
 
struct  md_reader::file_name_list
 
class  noop_reader
 
class  rtx_reader
 

Functions

int read_char (void)
 
void unread_char (int ch)
 
hashval_t leading_string_hash (const void *)
 
int leading_string_eq_p (const void *, const void *)
 
const char * join_c_conditions (const char *, const char *)
 
void message_at (file_location, const char *,...) ATTRIBUTE_PRINTF_2
 
void error_at (file_location, const char *,...) ATTRIBUTE_PRINTF_2
 
void fatal_at (file_location, const char *,...) ATTRIBUTE_PRINTF_2
 
void fatal_with_file_and_line (const char *,...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN
 
void fatal_expected_char (int, int) ATTRIBUTE_NORETURN
 
int read_skip_spaces (void)
 
int n_comma_elts (const char *)
 
const char * scan_comma_elt (const char **)
 
void upcase_string (char *)
 
void traverse_enum_types (htab_trav, void *)
 
struct enum_typelookup_enum_type (const char *)
 

Variables

md_readermd_reader_ptr
 
rtx_readerrtx_reader_ptr
 
void(* include_callback )(const char *)
 

Function Documentation

◆ error_at()

void error_at ( file_location loc,
const char * msg,
... )
extern
Like message_at, but treat the condition as an error.   

References ap, have_error, and msg.

Referenced by md_reader::handle_enum(), md_reader::handle_include(), and md_reader::read_skip_construct().

◆ fatal_at()

void fatal_at ( file_location loc,
const char * msg,
... )
extern
Like message_at, but treat the condition as a fatal error.   

References ap, and msg.

◆ fatal_expected_char()

void fatal_expected_char ( int expected,
int actual )
extern
Report that we found character ACTUAL when we expected to find
character EXPECTED.   

References fatal_with_file_and_line().

Referenced by md_reader::handle_constants(), md_reader::handle_file(), rtx_reader::read_rtx_operand(), md_reader::require_char(), and md_reader::require_char_ws().

◆ fatal_with_file_and_line()

◆ join_c_conditions()

const char * join_c_conditions ( const char * ,
const char *  )
extern

◆ leading_string_eq_p()

int leading_string_eq_p ( const void * def1,
const void * def2 )
extern
Given two objects that start with char * name fields, return true if
they have the same name.   

Referenced by initialize_iterators(), and md_reader::md_reader().

◆ leading_string_hash()

hashval_t leading_string_hash ( const void * def)
extern
Given an object that starts with a char * name field, return a hash
code for its name.   

Referenced by initialize_iterators(), and md_reader::md_reader().

◆ lookup_enum_type()

struct enum_type * lookup_enum_type ( const char * )
extern

◆ message_at()

void message_at ( file_location loc,
const char * msg,
... )
extern
A printf-like function for reporting a message against location LOC.   

References ap, and msg.

Referenced by add_constraint(), compute_test_codes(), gen_attr(), mdep_constraint_len(), note_constraint(), process_template(), validate_exp(), validate_optab_operands(), validate_pattern(), and VEC_safe_set_locstr().

◆ n_comma_elts()

int n_comma_elts ( const char * s)
extern
Given a string, return the number of comma-separated elements in it.
Return 0 for the null string.   

Referenced by check_attr_test(), convert_set_attr(), and count_alternatives().

◆ read_char()

int read_char ( void )
inline
Read the next character from the MD file.   

References md_reader_ptr, and md_reader::read_char().

Referenced by fatal_with_file_and_line(), read_flags(), and read_skip_spaces().

◆ read_skip_spaces()

◆ scan_comma_elt()

const char * scan_comma_elt ( const char ** pstr)
extern
Given a pointer to a (char *), return a pointer to the beginning of the
next comma-separated element in the string.  Advance the pointer given
to the end of that element.  Return NULL if at end of string.  Caller
is responsible for copying the string if necessary.  White space between
a comma and an element is ignored.   

References NULL.

Referenced by compute_test_codes(), gen_attr(), gen_mnemonic_attr(), next_comma_elt(), write_match_code(), and write_match_code_switch().

◆ traverse_enum_types()

void traverse_enum_types ( htab_trav ,
void *  )
extern

◆ unread_char()

void unread_char ( int ch)
inline
Put back CH, which was the last character read from the MD file.   

References md_reader_ptr, and md_reader::unread_char().

Referenced by fatal_with_file_and_line(), read_flags(), and read_skip_spaces().

◆ upcase_string()

void upcase_string ( char * string)
extern
Convert STRING to uppercase.   

References i.

Referenced by md_reader::handle_enum(), and print_enum_type().

Variable Documentation

◆ include_callback

void(* include_callback) (const char *) ( const char * )
extern
This callback will be invoked whenever an md include directive is
processed.  To be used for creation of the dependency file.   

Referenced by md_reader::handle_include(), and main().

◆ md_reader_ptr

md_reader* md_reader_ptr
extern
Global singleton; constrast with rtx_reader_ptr below.   
Global singleton.   

Referenced by fatal_with_file_and_line(), md_reader::md_reader(), read_char(), unread_char(), write_insn_preds_c(), write_tm_constrs_h(), write_tm_preds_h(), and md_reader::~md_reader().

◆ rtx_reader_ptr