osprey-gcc/gcc/gensupport.c File Reference

#include "bconfig.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "rtl.h"
#include "obstack.h"
#include "errors.h"
#include "hashtab.h"
#include "gensupport.h"

Include dependency graph for gensupport.c:

Go to the source code of this file.

Data Types

type  queue_elem
type  file_name_list
type  old_pred_table

Defines

#define NUM_KNOWN_OLD_PREDS   ARRAY_SIZE (old_preds)
#define NUM_OLD_SPECIAL_MODE_PREDS   ARRAY_SIZE (old_special_pred_table)

Functions/Subroutines

static struct queue_elemqueue_pattern (rtx, struct queue_elem ***, const char *, int)
static void remove_constraints (rtx)
static void process_rtx (rtx, int)
static int is_predicable (struct queue_elem *)
static void identify_predicable_attribute (void)
static int n_alternatives (const char *)
static void collect_insn_data (rtx, int *, int *)
static rtx alter_predicate_for_insn (rtx, int, int, int)
static const char * alter_test_for_insn (struct queue_elem *, struct queue_elem *)
static char * shift_output_template (char *, const char *, int)
static const char * alter_output_for_insn (struct queue_elem *, struct queue_elem *, int, int)
static void process_one_cond_exec (struct queue_elem *)
static void process_define_cond_exec (void)
static void process_include (rtx, int)
static char * save_string (const char *, int)
static void init_predicate_table (void)
void message_with_line (int lineno, const char *msg,...)
rtx gen_rtx_CONST_INT (enum machine_mode ARG_UNUSED(mode), HOST_WIDE_INT arg)
int init_md_reader_args_cb (int argc, char **argv, bool(*parse_opt)(const char *))
int init_md_reader_args (int argc, char **argv)
rtx read_md_rtx (int *lineno, int *seqnr)
hashval_t hash_c_test (const void *x)
int cmp_c_test (const void *x, const void *y)
int maybe_eval_c_test (const char *expr)
int n_comma_elts (const char *s)
const char * scan_comma_elt (const char **pstr)
static hashval_t hash_struct_pred_data (const void *ptr)
static int eq_struct_pred_data (const void *a, const void *b)
struct pred_datalookup_predicate (const char *name)
void add_predicate (struct pred_data *pred)

Variables

int target_flags
int insn_elision = 1
const char * in_fname
void(* include_callback )(const char *)
static struct obstack obstack
struct obstackrtl_obstack = &obstack
static int sequence_num
static int errors
static int predicable_default
static const char * predicable_true
static const char * predicable_false
static htab_t condition_table
static char * base_dir = NULL
static struct queue_elemdefine_attr_queue
static struct queue_elem ** define_attr_tail = &define_attr_queue
static struct queue_elemdefine_pred_queue
static struct queue_elem ** define_pred_tail = &define_pred_queue
static struct queue_elemdefine_insn_queue
static struct queue_elem ** define_insn_tail = &define_insn_queue
static struct queue_elemdefine_cond_exec_queue
static struct queue_elem ** define_cond_exec_tail = &define_cond_exec_queue
static struct queue_elemother_queue
static struct queue_elem ** other_tail = &other_queue
size_t max_include_len
struct file_name_listfirst_dir_md_include = 0
struct file_name_listfirst_bracket_include = 0
struct file_name_listlast_dir_md_include = 0
static htab_t predicate_table
struct pred_datafirst_predicate
static struct pred_data ** last_predicate = &first_predicate
static struct old_pred_table old_preds []
static const char *const old_special_pred_table []


Define Documentation

#define NUM_KNOWN_OLD_PREDS   ARRAY_SIZE (old_preds)

Definition at line 1264 of file gensupport.c.

Referenced by init_predicate_table().

#define NUM_OLD_SPECIAL_MODE_PREDS   ARRAY_SIZE (old_special_pred_table)

Definition at line 1279 of file gensupport.c.

Referenced by init_predicate_table().


Function Documentation

void add_predicate ( struct pred_data pred  ) 

Definition at line 1212 of file gensupport.c.

Referenced by init_predicate_table(), and process_define_predicate().

static const char * alter_output_for_insn ( struct queue_elem ce_elem,
struct queue_elem insn_elem,
int  alt,
int  max_op 
) [static]

static rtx alter_predicate_for_insn ( rtx  pattern,
int  alt,
int  max_op,
int  lineno 
) [static]

static const char * alter_test_for_insn ( struct queue_elem ce_elem,
struct queue_elem insn_elem 
) [static]

Definition at line 663 of file gensupport.c.

References concat(), queue_elem::data, NULL, and XSTR.

int cmp_c_test ( const void x,
const void y 
)

Definition at line 1106 of file gensupport.c.

References a, b, c_test::expr, and strcmp().

static void collect_insn_data ( rtx  pattern,
int *  palt,
int *  pmax 
) [static]

static int eq_struct_pred_data ( const void a,
const void b 
) [static]

Definition at line 1197 of file gensupport.c.

References strcmp().

Referenced by init_predicate_table().

rtx gen_rtx_CONST_INT ( enum machine_mode   ARG_UNUSEDmode,
HOST_WIDE_INT  arg 
)

Definition at line 140 of file gensupport.c.

References rtx_alloc, and XWINT.

hashval_t hash_c_test ( const void x  ) 

Definition at line 1080 of file gensupport.c.

References a, base, c, c_test::expr, len, s, and while().

static hashval_t hash_struct_pred_data ( const void ptr  )  [static]

Definition at line 1191 of file gensupport.c.

References htab_hash_string().

Referenced by init_predicate_table().

static void identify_predicable_attribute ( void   )  [static]

int init_md_reader_args ( int  argc,
char **  argv 
)

Definition at line 1007 of file gensupport.c.

References init_md_reader_args_cb().

int init_md_reader_args_cb ( int  argc,
char **  argv,
bool(*)(const char *)  parse_opt 
)

Definition at line 906 of file gensupport.c.

Referenced by init_md_reader_args(), and main().

static void init_predicate_table ( void   )  [static]

static int is_predicable ( struct queue_elem elem  )  [static]

struct pred_data* lookup_predicate ( const char *  name  )  [read]

int maybe_eval_c_test ( const char *  expr  ) 

Definition at line 1119 of file gensupport.c.

void message_with_line ( int  lineno,
const char *  msg,
  ... 
)

static int n_alternatives ( const char *  s  )  [static]

Definition at line 505 of file gensupport.c.

References n.

int n_comma_elts ( const char *  s  ) 

Definition at line 1140 of file gensupport.c.

static void process_define_cond_exec ( void   )  [static]

static void process_include ( rtx  desc,
int  lineno 
) [static]

static void process_one_cond_exec ( struct queue_elem ce_elem  )  [static]

static void process_rtx ( rtx  desc,
int  lineno 
) [static]

static struct queue_elem * queue_pattern ( rtx  pattern,
struct queue_elem ***  list_tail,
const char *  filename,
int  lineno 
) [static, read]

rtx read_md_rtx ( int *  lineno,
int *  seqnr 
)

static void remove_constraints ( rtx  part  )  [static]

Definition at line 170 of file gensupport.c.

References GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, i, NULL, remove_constraints(), XEXP, XSTR, XVEC, XVECEXP, and XVECLEN.

static char * save_string ( const char *  s,
int  len 
) [static]

Definition at line 893 of file gensupport.c.

References memcpy, result, and XNEWVEC.

const char* scan_comma_elt ( const char **  pstr  ) 

Definition at line 1161 of file gensupport.c.

static char * shift_output_template ( char *  dest,
const char *  src,
int  disp 
) [static]

Definition at line 683 of file gensupport.c.

References c, ISALPHA, and ISDIGIT.


Variable Documentation

char* base_dir = NULL [static]

Definition at line 56 of file gensupport.c.

Definition at line 54 of file gensupport.c.

Definition at line 72 of file gensupport.c.

Definition at line 73 of file gensupport.c.

Definition at line 78 of file gensupport.c.

Definition at line 79 of file gensupport.c.

Definition at line 76 of file gensupport.c.

Definition at line 77 of file gensupport.c.

Definition at line 74 of file gensupport.c.

Definition at line 75 of file gensupport.c.

int errors [static]

Definition at line 48 of file gensupport.c.

Definition at line 99 of file gensupport.c.

Definition at line 97 of file gensupport.c.

Definition at line 1187 of file gensupport.c.

const char* in_fname

Definition at line 38 of file gensupport.c.

void(* include_callback)(const char *)

Referenced by main(), and process_include().

int insn_elision = 1

Definition at line 36 of file gensupport.c.

Definition at line 100 of file gensupport.c.

Definition at line 1188 of file gensupport.c.

Definition at line 89 of file gensupport.c.

Definition at line 44 of file gensupport.c.

Initial value:

 {
  {"general_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF,
           LABEL_REF, SUBREG, REG, MEM }},
  {"address_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF,
           LABEL_REF, SUBREG, REG, MEM,
           PLUS, MINUS, MULT}},
  {"register_operand", {SUBREG, REG}},
  {"pmode_register_operand", {SUBREG, REG}},
  {"scratch_operand", {SCRATCH, REG}},
  {"immediate_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF,
       LABEL_REF}},
  {"const_int_operand", {CONST_INT}},
  {"const_double_operand", {CONST_INT, CONST_DOUBLE}},
  {"nonimmediate_operand", {SUBREG, REG, MEM}},
  {"nonmemory_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF,
       LABEL_REF, SUBREG, REG}},
  {"push_operand", {MEM}},
  {"pop_operand", {MEM}},
  {"memory_operand", {SUBREG, MEM}},
  {"indirect_operand", {SUBREG, MEM}},
  {"comparison_operator", {EQ, NE, LE, LT, GE, GT, LEU, LTU, GEU, GTU,
         UNORDERED, ORDERED, UNEQ, UNGE, UNGT, UNLE,
         UNLT, LTGT}},



}

Definition at line 1237 of file gensupport.c.

const char* const old_special_pred_table[] [static]

Initial value:

 {
  "address_operand",
  "pmode_register_operand",



}

Definition at line 1271 of file gensupport.c.

Definition at line 80 of file gensupport.c.

Definition at line 81 of file gensupport.c.

int predicable_default [static]

Definition at line 50 of file gensupport.c.

const char* predicable_false [static]

Definition at line 52 of file gensupport.c.

const char* predicable_true [static]

Definition at line 51 of file gensupport.c.

Definition at line 1186 of file gensupport.c.

Definition at line 45 of file gensupport.c.

int sequence_num [static]

Definition at line 47 of file gensupport.c.

Definition at line 34 of file gensupport.c.


Generated on Wed Apr 8 15:34:25 2009 for Open64 by  doxygen 1.5.6