#include "config.h"#include "system.h"#include "cpplib.h"#include "cpphash.h"

Go to the source code of this file.
Data Types | |
| type | op |
| type | operator |
Defines | |
| #define | PART_PRECISION (sizeof (cpp_num_part) * CHAR_BIT) |
| #define | HALF_MASK (~(cpp_num_part) 0 >> (PART_PRECISION / 2)) |
| #define | LOW_PART(num_part) (num_part & HALF_MASK) |
| #define | HIGH_PART(num_part) (num_part >> (PART_PRECISION / 2)) |
| #define | num_zerop(num) ((num.low | num.high) == 0) |
| #define | num_eq(num1, num2) (num1.low == num2.low && num1.high == num2.high) |
| #define | CPP_UPLUS (CPP_LAST_CPP_OP + 1) |
| #define | CPP_UMINUS (CPP_LAST_CPP_OP + 2) |
| #define | SYNTAX_ERROR(msgid) do { cpp_error (pfile, DL_ERROR, msgid); goto syntax_error; } while(0) |
| #define | SYNTAX_ERROR2(msgid, arg) do { cpp_error (pfile, DL_ERROR, msgid, arg); goto syntax_error; } while(0) |
| #define | NO_L_OPERAND (1 << 0) |
| #define | LEFT_ASSOC (1 << 1) |
| #define | CHECK_PROMOTION (1 << 2) |
Functions/Subroutines | |
| static bool num_positive | PARAMS ((cpp_num, size_t)) |
| static bool num_greater_eq | PARAMS ((cpp_num, cpp_num, size_t)) |
| static cpp_num num_part_mul | PARAMS ((cpp_num_part, cpp_num_part)) |
| static cpp_num num_unary_op | PARAMS ((cpp_reader *, cpp_num, enum cpp_ttype)) |
| static cpp_num num_binary_op | PARAMS ((cpp_reader *, cpp_num, cpp_num, enum cpp_ttype)) |
| static cpp_num num_mul | PARAMS ((cpp_reader *, cpp_num, cpp_num)) |
| static cpp_num num_lshift | PARAMS ((cpp_num, size_t, size_t)) |
| static cpp_num append_digit | PARAMS ((cpp_num, int, int, size_t)) |
| static cpp_num parse_defined | PARAMS ((cpp_reader *)) |
| static cpp_num eval_token | PARAMS ((cpp_reader *, const cpp_token *)) |
| static struct op *reduce | PARAMS ((cpp_reader *, struct op *, enum cpp_ttype)) |
| static unsigned int interpret_float_suffix | PARAMS ((const uchar *, size_t)) |
| static void check_promotion | PARAMS ((cpp_reader *, const struct op *)) |
| static unsigned int | interpret_float_suffix (uchar *s, size_t len) const |
| static unsigned int | interpret_int_suffix (uchar *s, size_t len) const |
| unsigned int | cpp_classify_number (cpp_reader *pfile, const cpp_token *token) |
| cpp_num | cpp_interpret_integer (cpp_reader *pfile, const cpp_token *token, unsigned int type) |
| static cpp_num | append_digit (cpp_num num, int digit, int base, size_t precision) |
| static cpp_num | parse_defined (cpp_reader *pfile) |
| static cpp_num | eval_token (cpp_reader *pfile, const cpp_token *token) |
| bool | _cpp_parse_expr (cpp_reader *pfile) |
| static struct op * | reduce (cpp_reader *pfile, struct op *top, enum cpp_ttype op) |
| struct op * | _cpp_expand_op_stack (cpp_reader *pfile) |
| static void | check_promotion (cpp_reader *pfile, const struct op *op) |
| static cpp_num | num_trim (cpp_num num, size_t precision) |
| static bool | num_positive (cpp_num num, size_t precision) |
| cpp_num | cpp_num_sign_extend (cpp_num num, size_t precision) |
| static cpp_num | num_negate (cpp_num num, size_t precision) |
| static bool | num_greater_eq (cpp_num pa, cpp_num pb, size_t precision) |
| static cpp_num | num_bitwise_op (pfile, cpp_num lhs, cpp_num rhs, enum cpp_ttype op) |
| static cpp_num | num_inequality_op (cpp_reader *pfile, cpp_num lhs, cpp_num rhs, enum cpp_ttype op) |
| static cpp_num | num_equality_op (pfile, cpp_num lhs, cpp_num rhs, enum cpp_ttype op) |
| static cpp_num | num_rshift (cpp_num num, size_t precision, size_t n) |
| static cpp_num | num_lshift (cpp_num num, size_t precision, size_t n) |
| static cpp_num | num_unary_op (cpp_reader *pfile, cpp_num num, enum cpp_ttype op) |
| static cpp_num | num_binary_op (cpp_reader *pfile, cpp_num lhs, cpp_num rhs, enum cpp_ttype op) |
| static cpp_num | num_part_mul (cpp_num_part lhs, cpp_num_part rhs) |
| static cpp_num | num_mul (cpp_reader *pfile, cpp_num lhs, cpp_num rhs) |
| static cpp_num | num_div_op (cpp_reader *pfile, cpp_num lhs, cpp_num rhs, enum cpp_ttype op) |
Variables | |
| static struct operator | optab [] |
| #define CPP_UMINUS (CPP_LAST_CPP_OP + 2) |
Definition at line 80 of file cppexp.c.
Referenced by _cpp_parse_expr(), num_unary_op(), and reduce().
| #define CPP_UPLUS (CPP_LAST_CPP_OP + 1) |
Definition at line 79 of file cppexp.c.
Referenced by _cpp_parse_expr(), num_unary_op(), and reduce().
| #define HALF_MASK (~(cpp_num_part) 0 >> (PART_PRECISION / 2)) |
| #define HIGH_PART | ( | num_part | ) | (num_part >> (PART_PRECISION / 2)) |
| #define LOW_PART | ( | num_part | ) | (num_part & HALF_MASK) |
| #define NO_L_OPERAND (1 << 0) |
Definition at line 48 of file cppexp.c.
Referenced by append_digit(), num_equality_op(), num_inequality_op(), num_lshift(), num_mul(), and num_negate().
Definition at line 47 of file cppexp.c.
Referenced by _cpp_parse_expr(), num_lshift(), num_mul(), num_negate(), num_unary_op(), and reduce().
| #define PART_PRECISION (sizeof (cpp_num_part) * CHAR_BIT) |
Definition at line 34 of file cppexp.c.
Referenced by append_digit(), cpp_interpret_integer(), cpp_num_sign_extend(), eval_token(), num_div_op(), num_lshift(), num_part_mul(), num_positive(), num_rshift(), and num_trim().
| #define SYNTAX_ERROR | ( | msgid | ) | do { cpp_error (pfile, DL_ERROR, msgid); goto syntax_error; } while(0) |
Definition at line 84 of file cppexp.c.
Referenced by _cpp_parse_expr(), cpp_classify_number(), and rs6000_pragma_longcall().
| struct op* _cpp_expand_op_stack | ( | cpp_reader * | pfile | ) | [read] |
| bool _cpp_parse_expr | ( | cpp_reader * | pfile | ) |
Definition at line 414 of file cppexp.c.
References cpp_num::high, cpp_num::low, num_eq, num_trim(), overflow, cpp_num::overflow, PART_PRECISION, result, shift, and cpp_num::unsignedp.
Referenced by cpp_interpret_integer().
| static void check_promotion | ( | cpp_reader * | pfile, | |
| const struct op * | op | |||
| ) | [static] |
Definition at line 1023 of file cppexp.c.
References cpp_error(), CPP_OPTION, cpp_token_as_text(), DL_WARNING, num_positive(), op::token, cpp_num::unsignedp, and op::value.
Referenced by reduce().
| unsigned int cpp_classify_number | ( | cpp_reader * | pfile, | |
| const cpp_token * | token | |||
| ) |
Definition at line 158 of file cppexp.c.
Referenced by c_lex(), c_lex_with_flags(), and eval_token().
| cpp_num cpp_interpret_integer | ( | cpp_reader * | pfile, | |
| const cpp_token * | token, | |||
| unsigned int | type | |||
| ) |
| static cpp_num eval_token | ( | cpp_reader * | pfile, | |
| const cpp_token * | token | |||
| ) | [static] |
Definition at line 537 of file cppexp.c.
References _cpp_test_assertion(), BITS_PER_CPPCHAR_T, cc, cpp_classify_number(), cpp_defined(), cpp_error(), cpp_interpret_charconst(), cpp_interpret_integer(), CPP_N_CATEGORY, CPP_N_FLOATING, CPP_N_IMAGINARY, CPP_N_INTEGER, CPP_N_INVALID, CPP_OPTION, CPP_PEDANTIC, DL_ERROR, DL_PEDWARN, DL_WARNING, DSC, cpp_num::high, cpp_num::low, cpp_token::node, NODE_NAME, num_trim(), cpp_num::overflow, parse_defined(), PART_PRECISION, result, cpp_num::unsignedp, and cpp_token::val.
Referenced by _cpp_parse_expr().
Definition at line 93 of file cppexp.c.
References CPP_N_IMAGINARY, CPP_N_LARGE, CPP_N_MEDIUM, CPP_N_SMALL, f, and i.
Referenced by cpp_classify_number().
Definition at line 122 of file cppexp.c.
References CPP_N_IMAGINARY, CPP_N_LARGE, CPP_N_MEDIUM, CPP_N_SMALL, CPP_N_UNSIGNED, and i.
Referenced by cpp_classify_number().
| static cpp_num num_binary_op | ( | cpp_reader * | pfile, | |
| cpp_num | lhs, | |||
| cpp_num | rhs, | |||
| enum cpp_ttype | op | |||
| ) | [static] |
Definition at line 1348 of file cppexp.c.
References cpp_error(), CPP_OPTION, CPP_PEDANTIC, DL_PEDWARN, cpp_num::high, cpp_num::low, n, num_greater_eq(), num_lshift(), num_negate(), num_positive(), num_rshift(), num_trim(), cpp_num::overflow, result, and cpp_num::unsignedp.
Referenced by num_div_op(), and reduce().
Definition at line 1153 of file cppexp.c.
References cpp_num::high, cpp_num::low, cpp_num::overflow, and cpp_num::unsignedp.
Referenced by reduce().
| static cpp_num num_div_op | ( | cpp_reader * | pfile, | |
| cpp_num | lhs, | |||
| cpp_num | rhs, | |||
| enum cpp_ttype | op | |||
| ) | [static] |
Definition at line 1516 of file cppexp.c.
References cpp_error(), CPP_OPTION, DL_ERROR, cpp_num::high, i, cpp_num::low, negate, num_binary_op(), num_greater_eq(), num_lshift(), num_negate(), num_positive(), cpp_num::overflow, PART_PRECISION, result, sub, and cpp_num::unsignedp.
Referenced by reduce().
Definition at line 1208 of file cppexp.c.
References eq, cpp_num::high, cpp_num::low, num_eq, cpp_num::overflow, and cpp_num::unsignedp.
Referenced by reduce().
Definition at line 1128 of file cppexp.c.
References num_positive().
Referenced by num_binary_op(), num_div_op(), and num_inequality_op().
| static cpp_num num_inequality_op | ( | cpp_reader * | pfile, | |
| cpp_num | lhs, | |||
| cpp_num | rhs, | |||
| enum cpp_ttype | op | |||
| ) | [static] |
Definition at line 1184 of file cppexp.c.
References CPP_OPTION, cpp_num::high, cpp_num::low, num_eq, num_greater_eq(), cpp_num::overflow, and cpp_num::unsignedp.
Referenced by reduce().
Definition at line 1268 of file cppexp.c.
References num_eq, num_rshift(), num_trim(), num_zerop, and PART_PRECISION.
Referenced by num_binary_op(), and num_div_op().
| static cpp_num num_mul | ( | cpp_reader * | pfile, | |
| cpp_num | lhs, | |||
| cpp_num | rhs | |||
| ) | [static] |
Definition at line 1464 of file cppexp.c.
References CPP_OPTION, cpp_num::high, cpp_num::low, negate, num_eq, num_negate(), num_part_mul(), num_positive(), num_trim(), num_zerop, overflow, cpp_num::overflow, result, and cpp_num::unsignedp.
Referenced by reduce().
Definition at line 1109 of file cppexp.c.
References copy, cpp_num::high, num_eq, num_trim(), and num_zerop.
Referenced by num_binary_op(), num_div_op(), num_mul(), and num_unary_op().
| static cpp_num num_part_mul | ( | cpp_num_part | lhs, | |
| cpp_num_part | rhs | |||
| ) | [static] |
Definition at line 1433 of file cppexp.c.
References cpp_num::high, HIGH_PART, cpp_num::low, LOW_PART, PART_PRECISION, result, and cpp_num::unsignedp.
Referenced by num_mul().
Definition at line 1067 of file cppexp.c.
References PART_PRECISION.
Referenced by check_promotion(), cpp_interpret_integer(), num_binary_op(), num_div_op(), num_greater_eq(), num_mul(), and num_rshift().
Definition at line 1226 of file cppexp.c.
References num_positive(), num_trim(), and PART_PRECISION.
Referenced by num_binary_op(), and num_lshift().
Definition at line 1045 of file cppexp.c.
References PART_PRECISION.
Referenced by append_digit(), eval_token(), num_binary_op(), num_lshift(), num_mul(), num_negate(), num_rshift(), and num_unary_op().
| static cpp_num num_unary_op | ( | cpp_reader * | pfile, | |
| cpp_num | num, | |||
| enum cpp_ttype | op | |||
| ) | [static] |
Definition at line 1310 of file cppexp.c.
References cpp_error(), CPP_OPTION, CPP_UMINUS, CPP_UPLUS, CPP_WTRADITIONAL, DL_WARNING, cpp_num::high, cpp_num::low, num_negate(), num_trim(), num_zerop, cpp_num::overflow, and cpp_num::unsignedp.
Referenced by reduce().
| static void check_promotion PARAMS | ( | (cpp_reader *, const struct op *) | ) | [static] |
| static cpp_num eval_token PARAMS | ( | (cpp_reader *, const cpp_token *) | ) | [static] |
| static cpp_num parse_defined PARAMS | ( | (cpp_reader *) | ) | [static] |
| static cpp_num num_mul PARAMS | ( | (cpp_reader *, cpp_num, cpp_num) | ) | [static] |
| static cpp_num num_binary_op PARAMS | ( | (cpp_reader *, cpp_num, cpp_num, enum cpp_ttype) | ) | [static] |
| static cpp_num num_unary_op PARAMS | ( | (cpp_reader *, cpp_num, enum cpp_ttype) | ) | [static] |
| static cpp_num num_part_mul PARAMS | ( | (cpp_num_part, cpp_num_part) | ) | [static] |
| static cpp_num parse_defined | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 466 of file cppexp.c.
References _cpp_mark_macro_used, cpp_error(), cpp_get_token(), CPP_PEDANTIC, cpp_token_as_text(), DL_ERROR, DL_WARNING, cpp_token::flags, cpp_num::high, cpp_num::low, NAMED_OP, node, cpp_token::node, NT_MACRO, cpp_num::overflow, result, token, cpp_num::unsignedp, and cpp_token::val.
Referenced by eval_token().
Definition at line 860 of file cppexp.c.
References check_promotion(), CHECK_PROMOTION, cpp_error(), CPP_LAST_CPP_OP, CPP_OPTION, CPP_UMINUS, CPP_UPLUS, DL_ERROR, DL_ICE, DL_PEDWARN, operator::flags, cpp_num::high, LEFT_ASSOC, cpp_num::low, num_binary_op(), num_bitwise_op(), num_div_op(), num_equality_op(), num_inequality_op(), num_mul(), num_unary_op(), num_zerop, op::op, optab, cpp_num::overflow, operator::prio, cpp_num::unsignedp, and op::value.
Referenced by _cpp_parse_expr(), and Simd_Vectorize_Scalar_Reduction().
Referenced by _cpp_parse_expr(), expand_builtin_int_roundingfn(), expand_builtin_mathfn(), expand_builtin_mathfn_2(), expand_builtin_mathfn_3(), expand_divmod(), expand_expr(), expand_expr_real_1(), expand_increment(), expand_mult_highpart(), expand_mult_highpart_optab(), expand_vector_operations_1(), gimplify_omp_atomic_fetch_op(), gt_ggc_mx_optab(), ix86_expand_int_movcc(), noce_emit_move_insn(), optimize_bitfield_assignment_op(), pj_output_rval(), reduce(), vect_create_epilog_for_reduction(), vect_pattern_recog_1(), vectorizable_operation(), and vectorizable_reduction().
1.5.6