GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "rtl.h"
#include "obstack.h"
#include "read-md.h"
#include "gensupport.h"
Data Structures | |
struct | map_value |
struct | mapping |
struct | iterator_group |
struct | iterator_use |
struct | attribute_use |
struct | subst_attr_to_iter_mapping |
struct | compact_insn_name |
Functions | |
static void | validate_const_int (const char *) |
static void | one_time_initialization (void) |
HOST_WIDE_INT | atoll (const char *) |
static HOST_WIDE_INT | find_mode (const char *name) |
static void | apply_mode_iterator (rtx x, unsigned int, HOST_WIDE_INT mode) |
static const char * | get_mode_token (int mode) |
static rtx_code | maybe_find_code (const char *name) |
static HOST_WIDE_INT | find_code (const char *name) |
static void | apply_code_iterator (rtx x, unsigned int, HOST_WIDE_INT code) |
static const char * | get_code_token (int code) |
static HOST_WIDE_INT | find_int (const char *name) |
static void | apply_int_iterator (rtx x, unsigned int index, HOST_WIDE_INT value) |
static const char * | get_int_token (int value) |
static char * | find_subst_iter_by_attr (const char *attr) |
static struct map_value * | map_attr_string (file_location loc, const char *p, mapping **iterator_out=0) |
static struct mapping * | add_mapping (struct iterator_group *group, htab_t table, const char *name) |
static struct map_value ** | add_map_value (struct map_value **end_ptr, int number, const char *string) |
static void | initialize_iterators (void) |
static void | validate_const_wide_int (const char *string) |
static void | record_iterator_use (struct mapping *iterator, rtx x, unsigned int index) |
static void | record_attribute_use (struct iterator_group *group, file_location loc, rtx x, unsigned int index, const char *value) |
static void | read_flags (rtx return_rtx) |
static int | parse_reg_note_name (const char *string) |
Variables | |
htab_t | subst_attr_to_iter_map = NULL |
const char * | current_iterator_name |
rtx_reader * | rtx_reader_ptr = NULL |
static struct iterator_group modes codes ints | substs |
static vec< mapping * > | current_iterators |
static vec< iterator_use > | iterator_uses |
static vec< attribute_use > | attribute_uses |
static const compact_insn_name | compact_insn_names [] |
|
static |
Add the pair (NUMBER, STRING) to a list of map_value structures. END_PTR points to the current null terminator for the list; return a pointer the new null terminator.
References map_value::next, map_value::number, and map_value::string.
Referenced by initialize_iterators().
|
static |
Add a new "mapping" structure to hashtable TABLE. NAME is the name of the mapping and GROUP is the group to which it belongs.
References mapping::current_value, fatal_with_file_and_line(), mapping::group, mapping::name, NULL, table, and mapping::values.
Referenced by initialize_iterators().
|
static |
References PUT_CODE.
Referenced by initialize_iterators().
|
static |
References gcc_assert, gcc_unreachable, GET_CODE, GET_RTX_FORMAT, RTX_CODE, SUBREG_BYTE, md_constant::value, XINT, XLOC, and XWINT.
Referenced by initialize_iterators().
|
static |
References PUT_MODE().
Referenced by initialize_iterators().
HOST_WIDE_INT atoll | ( | const char * | p | ) |
Provide a version of a function to read a long long if the system does not provide one.
References HOST_WIDE_INT_M1U.
Referenced by find_int().
|
static |
Implementations of the iterator_group callbacks for codes.
References fatal_with_file_and_line(), and maybe_find_code().
Referenced by initialize_iterators().
|
static |
Implementations of the iterator_group callbacks for ints.
Since GCC does not construct a table of valid constants, we have to accept any int as valid. No cross-checking can be done.
References atoll(), md_constant::name, rtx_reader_ptr, and validate_const_int().
Referenced by initialize_iterators().
|
static |
Implementations of the iterator_group callbacks for modes.
References fatal_with_file_and_line(), GET_MODE_NAME, and i.
|
static |
Return name of a subst-iterator, corresponding to subst-attribute ATTR.
References subst_attr_to_iter_mapping::iter_name, NULL, and subst_attr_to_iter_map.
Referenced by map_attr_string(), and rtx_reader::read_rtx_operand().
|
static |
References GET_RTX_NAME, and i.
Referenced by initialize_iterators().
|
static |
References HOST_BITS_PER_INT, and md_constant::value.
Referenced by initialize_iterators().
|
static |
References GET_MODE_NAME, and NULL.
Referenced by initialize_iterators().
|
static |
Do one-time initialization of the mode and code attributes.
References add_map_value(), add_mapping(), apply_code_iterator(), apply_int_iterator(), apply_mode_iterator(), find_code(), find_int(), find_mode(), get_code_token(), get_int_token(), GET_MODE_NAME, get_mode_token(), GET_RTX_NAME, i, leading_string_eq_p(), leading_string_hash(), lower(), modes, NUM_RTX_CODE, substs, and mapping::values.
Referenced by one_time_initialization().
|
static |
Map attribute string P to its current value. Return null if the attribute isn't known. If ITERATOR_OUT is nonnull, store the associated iterator there. Report any errors against location LOC.
References current_iterators, error_at(), find_subst_iter_by_attr(), FOR_EACH_VEC_ELT, i, mapping::name, map_value::next, NULL, map_value::number, map_value::string, substs, and mapping::values.
Referenced by md_reader::apply_iterator_to_string().
|
static |
Return the rtx code for NAME, or UNKNOWN if NAME isn't a valid rtx code.
References compact_insn_names, GET_RTX_NAME, i, and NUM_RTX_CODE.
Referenced by find_code().
|
static |
Do one-time initialization.
References initialize_iterators(), and initialized.
Referenced by rtx_reader::rtx_reader().
|
static |
Return the numeric value n for GET_REG_NOTE_NAME (n) for STRING, or fail if STRING isn't recognized.
References fatal_with_file_and_line(), GET_REG_NOTE_NAME, i, and REG_NOTE_MAX.
Referenced by rtx_reader::read_rtx_code().
|
static |
Subroutine of read_rtx_code, for parsing zero or more flags.
References fatal_with_file_and_line(), read_char(), RTX_FLAG, and unread_char().
Referenced by rtx_reader::read_rtx_code().
|
static |
Record that X uses attribute VALUE at location LOC, where VALUE must match a built-in value from group GROUP. If the use is in an operand of X, INDEX is the index of that operand, otherwise it is ignored.
References attribute_uses, attribute_use::group, attribute_use::index, attribute_use::loc, attribute_use::value, and attribute_use::x.
Referenced by md_reader::record_potential_iterator_use(), and rtx_reader::rtx_alloc_for_name().
Record that X uses iterator ITERATOR. If the use is in an operand of X, INDEX is the index of that operand, otherwise it is ignored.
References iterator_use::index, iterator_uses, and iterator_use::x.
Referenced by rtx_reader::read_rtx_operand(), md_reader::record_potential_iterator_use(), and rtx_reader::rtx_alloc_for_name().
|
static |
References fatal_with_file_and_line(), and md_name::string.
Referenced by find_int(), and rtx_reader::read_rtx_operand().
|
static |
References fatal_with_file_and_line(), and md_name::string.
Referenced by rtx_reader::read_rtx_code().
|
static |
The list of all attribute uses in the current rtx.
Referenced by record_attribute_use().
|
static |
Referenced by maybe_find_code().
const char* current_iterator_name |
This global stores name of subst-iterator which is currently being processed.
All iterators used in the current rtx.
Referenced by map_attr_string().
|
static |
The list of all iterator uses in the current rtx.
Referenced by record_iterator_use().
rtx_reader* rtx_reader_ptr = NULL |
Global singleton.
Referenced by alter_test_for_insn(), attr_string(), def_target_insn(), emit_c_code(), find_int(), gen_attr(), gen_mnemonic_attr(), gen_mnemonic_setattr(), main(), mnemonic_htab_callback(), print_test(), process_rtx(), process_substs_on_one_elem(), process_template(), rtx_reader::rtx_reader(), write_attr_value(), write_init_reg_class_start_regs(), write_one_condition(), write_predicate_expr(), write_predicate_subfunction(), write_test_expr(), and rtx_reader::~rtx_reader().
htab_t subst_attr_to_iter_map = NULL |
Hash-table to store links between subst-attributes and define_substs.
Referenced by find_subst_iter_by_attr().
|
static |
The mode and code iterator structures.
Referenced by initialize_iterators(), map_attr_string(), and rtx_reader::read_rtx_operand().