t = TREE_OPERAND (t, 0);
}
-
+
if (found)
return TREE_OPERAND (found, 0);
memory reference tree *T or NULL_TREE in which case *T is
adjusted to point to the outermost component reference that
can be used for assigning an alias set. */
-
+
tree
reference_alias_ptr_type_1 (tree *t)
{
case UNION_TYPE:
case QUAL_UNION_TYPE:
{
- /* LTO non-ODR type merging does not make any difference between
+ /* LTO non-ODR type merging does not make any difference between
component pointer types. We may have
struct foo {int *a;};
- as TYPE_CANONICAL of
+ as TYPE_CANONICAL of
struct bar {float *a;};
symtab_node *node2 = symtab_node::get (base2);
if (!node2)
return 0;
-
+
ret = node1->equal_address_to (node2, true);
return ret;
}
}
/* Return true if we can determine the exprs corresponding to memrefs
- X and Y and they do not overlap.
+ X and Y and they do not overlap.
If LOOP_VARIANT is set, skip offset-based disambiguation */
bool
memset (object, 0xaf, size);
}
-#if CHECKING_P
+#if CHECKING_P
/* Mark the element to be free. */
allocation_object::get_instance (object)->id = 0;
#endif
public:
dynamic_call_info_t (const gcall *dynamic_call,
const bool is_returning_call = false)
- : m_dynamic_call (dynamic_call),
+ : m_dynamic_call (dynamic_call),
m_is_returning_call (is_returning_call)
{}
/* Update the callstack to represent a call from caller to callee.
- Generally used to push a custom call to a perticular program point
+ Generally used to push a custom call to a perticular program point
where we don't have a superedge representing the call. */
void
program_point::push_to_call_stack (const supernode *caller,
/* Update this program_state to reflect a call to function
represented by CALL_STMT.
- currently used only when the call doesn't have a superedge representing
+ currently used only when the call doesn't have a superedge representing
the call ( like call via a function pointer ) */
void
program_state::push_call (exploded_graph &eg,
/* Update this program_state to reflect a return from function
call to which is represented by CALL_STMT.
- currently used only when the call doesn't have a superedge representing
+ currently used only when the call doesn't have a superedge representing
the return */
void
program_state::returning_call (exploded_graph &eg,
pop_frame (lhs, NULL, ctxt, call_stmt);
}
-/* Extract calling information from the superedge and update the model for the
+/* Extract calling information from the superedge and update the model for the
call */
void
update_for_gcall (call_stmt, ctxt, call_edge.get_callee_function ());
}
-/* Extract calling information from the return superedge and update the model
+/* Extract calling information from the return superedge and update the model
for the returning call */
void
void update_for_gcall (const gcall *call_stmt,
region_model_context *ctxt,
function *callee = NULL);
-
+
void update_for_return_gcall (const gcall *call_stmt,
region_model_context *ctxt);
superedge *sedge
= map.get_sg ().get_intraprocedural_edge_for_call (cedge);
gcc_assert (sedge);
- add_to_worklist
+ add_to_worklist
(function_point::after_supernode (sedge->m_src),
worklist, logger);
}
else
{
- supernode *callernode
+ supernode *callernode
= map.get_sg ().get_supernode_for_stmt (returning_call);
gcc_assert (callernode);
- add_to_worklist
+ add_to_worklist
(function_point::after_supernode (callernode),
worklist, logger);
}
// maybe call is via a function pointer
if (gcall *call = dyn_cast<gcall *> (stmt))
{
- cgraph_edge *edge
+ cgraph_edge *edge
= cgraph_node::get (fun->decl)->get_edge (stmt);
if (!edge || !edge->callee)
{
supernode *old_node_for_stmts = node_for_stmts;
node_for_stmts = add_node (fun, bb, call, NULL);
- superedge *sedge
+ superedge *sedge
= new callgraph_superedge (old_node_for_stmts,
node_for_stmts,
SUPEREDGE_INTRAPROCEDURAL_CALL,
{
if (m_cedge)
return m_cedge->call_stmt;
-
+
return m_src->get_final_call ();
}
& ~(ASAN_MIN_RED_ZONE_SIZE - HOST_WIDE_INT_1))
- offset;
- /* Unpoison shadow memory that corresponds to a variable that is
+ /* Unpoison shadow memory that corresponds to a variable that is
is subject of use-after-return sanitization. */
if (l > 2)
{
fn_type = TREE_TYPE (decl);
func_type = build_function_type (TREE_TYPE (fn_type),
TYPE_ARG_TYPES (fn_type));
-
+
func_decl = build_fn_decl (func_name, func_type);
XDELETEVEC (func_name);
TREE_USED (func_decl) = 1;
/* This will be of type IFUNCs have to be externally visible. */
TREE_PUBLIC (func_decl) = 1;
- return func_decl;
+ return func_decl;
}
/* Returns true if DECL is multi-versioned using the target attribute, and this
return iter->second;
}
-/* Return the index of a given function DECL. Return -1 if DECL is not
+/* Return the index of a given function DECL. Return -1 if DECL is not
found in string table. */
int
-/* Common Backend requirements.
+/* Common Backend requirements.
Copyright (C) 2015-2024 Free Software Foundation, Inc.
Contributed by Andrew MacLeod <amacleod@redhat.com>
gcc_checking_assert (prob >= 0 && prob <= REG_BR_PROB_BASE);
}
-/* Given PROB1 and PROB2, return PROB1*PROB2/REG_BR_PROB_BASE.
+/* Given PROB1 and PROB2, return PROB1*PROB2/REG_BR_PROB_BASE.
Used to combine BB probabilities. */
inline int
/* If dest has multiple predecessors, skip it. We expect
that one predecessor with smaller index connects with it
later. */
- if (count != 1)
+ if (count != 1)
break;
}
Which means that the bb_has_eh_pred test in df_bb_refs_collect
will *always* fail, because no edges can have been added to the
- block yet. Which of course means we don't add the right
+ block yet. Which of course means we don't add the right
artificial refs, which means we fail df_verify (much) later.
Cleanest solution would seem to make DF_DEFER_INSN_RESCAN imply
}
/* Return the element for INDX, or NULL if the element doesn't exist.
- Update the `current' field even if we can't find an element that
+ Update the `current' field even if we can't find an element that
would hold the bitmap's bit to make eventual allocation
faster. */
splay tree in Sleator and Tarjan's "Self-adjusting Binary Search Trees".
It is probably not the most efficient form of splay trees, but it should
be good enough to experiment with this idea of bitmaps-as-trees.
-
+
For all functions below, the variable or function argument "t" is a node
in the tree, and "e" is a temporary or new node in the tree. The rest
is sufficiently straigh-forward (and very well explained in the paper)
sparse sets. The canonical example in GCC is, of course, the "set of
sets" for some CFG-based data flow problems (liveness analysis, dominance
frontiers, etc.).
-
+
For random-access sparse sets of unknown universe, the binary tree
representation is likely to be a more suitable choice. Theoretical
access times for the binary tree representation are better than those
efficiently. The downside is that many random-access operations are
relatively slow, because the linked list has to be traversed to test
membership (i.e. member_p/ add_member/remove_member).
-
+
To improve the performance of this set representation, the last
accessed element and its index are cached. For membership tests on
members close to recently accessed members, the cached last element
of clearing the set, and the relatively large number of operations
necessary to balance the tree. Also, iterating the set members is
not supported.
-
+
As for the linked-list representation, the last accessed element and
its index are cached, so that membership tests on the latest accessed
members is a constant-time operation. Other lookups take O(logE)
are nonnull pointers. */
DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1_5, ATTR_NONNULL, ATTR_LIST_1_5, \
ATTR_NOTHROW_LIST)
-
+
/* Nothrow leaf functions which are type-generic. */
DEF_ATTR_TREE_LIST (ATTR_NOTHROW_TYPEGENERIC_LEAF, ATTR_TYPEGENERIC, ATTR_NULL, \
ATTR_NOTHROW_LEAF_LIST)
DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
BT_BOOL, BT_BOOL, BT_ULONGLONG, BT_ULONGLONG,
BT_ULONGLONG, BT_PTR_ULONGLONG, BT_PTR_ULONGLONG)
-DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_VPTR_PTR_I1_BOOL_INT_INT,
+DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_VPTR_PTR_I1_BOOL_INT_INT,
BT_BOOL, BT_VOLATILE_PTR, BT_PTR, BT_I1, BT_BOOL, BT_INT,
BT_INT)
-DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_VPTR_PTR_I2_BOOL_INT_INT,
+DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_VPTR_PTR_I2_BOOL_INT_INT,
BT_BOOL, BT_VOLATILE_PTR, BT_PTR, BT_I2, BT_BOOL, BT_INT,
BT_INT)
-DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_VPTR_PTR_I4_BOOL_INT_INT,
+DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_VPTR_PTR_I4_BOOL_INT_INT,
BT_BOOL, BT_VOLATILE_PTR, BT_PTR, BT_I4, BT_BOOL, BT_INT,
BT_INT)
-DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_VPTR_PTR_I8_BOOL_INT_INT,
+DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_VPTR_PTR_I8_BOOL_INT_INT,
BT_BOOL, BT_VOLATILE_PTR, BT_PTR, BT_I8, BT_BOOL, BT_INT,
BT_INT)
-DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_VPTR_PTR_I16_BOOL_INT_INT,
+DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_VPTR_PTR_I16_BOOL_INT_INT,
BT_BOOL, BT_VOLATILE_PTR, BT_PTR, BT_I16, BT_BOOL, BT_INT,
BT_INT)
DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_SIZE_VPTR_PTR_PTR_INT_INT, BT_BOOL, BT_SIZE,
}
/* LEN specify length of the block of memcpy/memset operation.
- Figure out its range and put it into MIN_SIZE/MAX_SIZE.
+ Figure out its range and put it into MIN_SIZE/MAX_SIZE.
In some cases we can make very likely guess on max size, then we
set it into PROBABLE_MAX_SIZE. */
}
/* Make sure an argument is in the right mode.
- EXP is the tree argument.
+ EXP is the tree argument.
MODE is the mode it should be in. */
static rtx
}
/* Expand the __atomic_compare_exchange intrinsic:
- bool __atomic_compare_exchange (TYPE *object, TYPE *expect,
- TYPE desired, BOOL weak,
+ bool __atomic_compare_exchange (TYPE *object, TYPE *expect,
+ TYPE desired, BOOL weak,
enum memmodel success,
enum memmodel failure)
EXP is the CALL_EXPR.
TARGET is an optional place for us to store the results. */
static rtx
-expand_builtin_atomic_compare_exchange (machine_mode mode, tree exp,
+expand_builtin_atomic_compare_exchange (machine_mode mode, tree exp,
rtx target)
{
rtx expect, desired, mem, oldval;
if (failure > success)
success = MEMMODEL_SEQ_CST;
-
+
if (is_mm_release (failure) || is_mm_acq_rel (failure))
{
failure = MEMMODEL_SEQ_CST;
success = MEMMODEL_SEQ_CST;
}
-
+
if (!flag_inline_atomics)
return NULL_RTX;
EXP is the call expression. */
static rtx
-expand_builtin_atomic_clear (tree exp)
+expand_builtin_atomic_clear (tree exp)
{
machine_mode mode = int_mode_for_size (BOOL_TYPE_SIZE, 0).require ();
rtx mem = get_builtin_sync_mem (CALL_EXPR_ARG (exp, 0), mode);
/* Return true if the parameters to call EXP represent an object which will
always generate lock free instructions. The first argument represents the
- size of the object, and the second parameter is a pointer to the object
- itself. If NULL is passed for the object, then the result is based on
- typical alignment for an object of the specified size. Otherwise return
+ size of the object, and the second parameter is a pointer to the object
+ itself. If NULL is passed for the object, then the result is based on
+ typical alignment for an object of the specified size. Otherwise return
false. */
static rtx
return const0_rtx;
}
-/* Return a one or zero if it can be determined that object ARG1 of size ARG
+/* Return a one or zero if it can be determined that object ARG1 of size ARG
is lock free on this architecture. */
static tree
{
if (!flag_inline_atomics)
return NULL_TREE;
-
+
/* If it isn't always lock free, don't generate a result. */
if (fold_builtin_atomic_always_lock_free (arg0, arg1) == boolean_true_node)
return boolean_true_node;
/* Return true if the parameters to call EXP represent an object which will
always generate lock free instructions. The first argument represents the
- size of the object, and the second parameter is a pointer to the object
- itself. If NULL is passed for the object, then the result is based on
- typical alignment for an object of the specified size. Otherwise return
+ size of the object, and the second parameter is a pointer to the object
+ itself. If NULL is passed for the object, then the result is based on
+ typical alignment for an object of the specified size. Otherwise return
NULL*/
static rtx
}
if (!flag_inline_atomics)
- return NULL_RTX;
+ return NULL_RTX;
/* If the value is known at compile time, return the RTX for it. */
size = fold_builtin_atomic_is_lock_free (arg0, arg1);
{
class expand_operand op;
rtx val = expand_expr (CALL_EXPR_ARG (exp, 0), NULL_RTX,
- Pmode, EXPAND_NORMAL);
+ Pmode, EXPAND_NORMAL);
create_input_operand (&op, val, Pmode);
expand_insn (icode, 1, &op);
return;
LENGTH is the number of chars to compare;
CONST_STR_N indicates which source string is the constant string;
IS_MEMCMP indicates whether it's a memcmp or strcmp.
-
+
to: (assume const_str_n is 2, i.e., arg2 is a constant string)
target = (int) (unsigned char) var_str[0]
if (!target || !register_operand (target, mode))
target = gen_reg_rtx (mode);
- mode = get_builtin_sync_mode
+ mode = get_builtin_sync_mode
(fcode - BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_1);
target = expand_builtin_compare_and_swap (mode, exp, true, target);
if (target)
case BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_4:
case BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_8:
case BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_16:
- mode = get_builtin_sync_mode
+ mode = get_builtin_sync_mode
(fcode - BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_1);
target = expand_builtin_compare_and_swap (mode, exp, false, target);
if (target)
unsigned int nargs, z;
vec<tree, va_gc> *vec;
- mode =
+ mode =
get_builtin_sync_mode (fcode - BUILT_IN_ATOMIC_COMPARE_EXCHANGE_1);
target = expand_builtin_atomic_compare_exchange (mode, exp, target);
if (target)
{
enum built_in_function lib;
mode = get_builtin_sync_mode (fcode - BUILT_IN_ATOMIC_ADD_FETCH_1);
- lib = (enum built_in_function)((int)BUILT_IN_ATOMIC_FETCH_ADD_1 +
+ lib = (enum built_in_function)((int)BUILT_IN_ATOMIC_FETCH_ADD_1 +
(fcode - BUILT_IN_ATOMIC_ADD_FETCH_1));
target = expand_builtin_atomic_fetch_op (mode, exp, target, PLUS, true,
ignore, lib);
{
enum built_in_function lib;
mode = get_builtin_sync_mode (fcode - BUILT_IN_ATOMIC_SUB_FETCH_1);
- lib = (enum built_in_function)((int)BUILT_IN_ATOMIC_FETCH_SUB_1 +
+ lib = (enum built_in_function)((int)BUILT_IN_ATOMIC_FETCH_SUB_1 +
(fcode - BUILT_IN_ATOMIC_SUB_FETCH_1));
target = expand_builtin_atomic_fetch_op (mode, exp, target, MINUS, true,
ignore, lib);
{
enum built_in_function lib;
mode = get_builtin_sync_mode (fcode - BUILT_IN_ATOMIC_AND_FETCH_1);
- lib = (enum built_in_function)((int)BUILT_IN_ATOMIC_FETCH_AND_1 +
+ lib = (enum built_in_function)((int)BUILT_IN_ATOMIC_FETCH_AND_1 +
(fcode - BUILT_IN_ATOMIC_AND_FETCH_1));
target = expand_builtin_atomic_fetch_op (mode, exp, target, AND, true,
ignore, lib);
{
enum built_in_function lib;
mode = get_builtin_sync_mode (fcode - BUILT_IN_ATOMIC_NAND_FETCH_1);
- lib = (enum built_in_function)((int)BUILT_IN_ATOMIC_FETCH_NAND_1 +
+ lib = (enum built_in_function)((int)BUILT_IN_ATOMIC_FETCH_NAND_1 +
(fcode - BUILT_IN_ATOMIC_NAND_FETCH_1));
target = expand_builtin_atomic_fetch_op (mode, exp, target, NOT, true,
ignore, lib);
{
enum built_in_function lib;
mode = get_builtin_sync_mode (fcode - BUILT_IN_ATOMIC_XOR_FETCH_1);
- lib = (enum built_in_function)((int)BUILT_IN_ATOMIC_FETCH_XOR_1 +
+ lib = (enum built_in_function)((int)BUILT_IN_ATOMIC_FETCH_XOR_1 +
(fcode - BUILT_IN_ATOMIC_XOR_FETCH_1));
target = expand_builtin_atomic_fetch_op (mode, exp, target, XOR, true,
ignore, lib);
{
enum built_in_function lib;
mode = get_builtin_sync_mode (fcode - BUILT_IN_ATOMIC_OR_FETCH_1);
- lib = (enum built_in_function)((int)BUILT_IN_ATOMIC_FETCH_OR_1 +
+ lib = (enum built_in_function)((int)BUILT_IN_ATOMIC_FETCH_OR_1 +
(fcode - BUILT_IN_ATOMIC_OR_FETCH_1));
target = expand_builtin_atomic_fetch_op (mode, exp, target, IOR, true,
ignore, lib);
if (target)
return target;
break;
-
+
case BUILT_IN_ATOMIC_FETCH_SUB_1:
case BUILT_IN_ATOMIC_FETCH_SUB_2:
case BUILT_IN_ATOMIC_FETCH_SUB_4:
if (target)
return target;
break;
-
+
case BUILT_IN_ATOMIC_FETCH_NAND_1:
case BUILT_IN_ATOMIC_FETCH_NAND_2:
case BUILT_IN_ATOMIC_FETCH_NAND_4:
if (target)
return target;
break;
-
+
case BUILT_IN_ATOMIC_FETCH_XOR_1:
case BUILT_IN_ATOMIC_FETCH_XOR_2:
case BUILT_IN_ATOMIC_FETCH_XOR_4:
if (target)
return target;
break;
-
+
case BUILT_IN_ATOMIC_FETCH_OR_1:
case BUILT_IN_ATOMIC_FETCH_OR_2:
case BUILT_IN_ATOMIC_FETCH_OR_4:
case BUILT_IN_ATOMIC_CLEAR:
return expand_builtin_atomic_clear (exp);
-
+
case BUILT_IN_ATOMIC_ALWAYS_LOCK_FREE:
return expand_builtin_atomic_always_lock_free (exp);
false, true, true, ATTRS, false, flag_tm)
/* Builtin used by the implementation of libsanitizer. These
- functions are mapped to the actual implementation of the
+ functions are mapped to the actual implementation of the
libtsan library. */
#undef DEF_SANITIZER_BUILTIN
#define DEF_SANITIZER_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
equality with zero. */
DEF_BUILTIN_STUB (BUILT_IN_MEMCMP_EQ, "__builtin_memcmp_eq")
-/* An internal version of strcmp/strncmp, used when the result is only
+/* An internal version of strcmp/strncmp, used when the result is only
tested for equality with zero. */
DEF_BUILTIN_STUB (BUILT_IN_STRCMP_EQ, "__builtin_strcmp_eq")
DEF_BUILTIN_STUB (BUILT_IN_STRNCMP_EQ, "__builtin_strncmp_eq")
}
}
- TREE_VISITED (t) = 1;
+ TREE_VISITED (t) = 1;
if (is_interface)
{
pp_string (pp, "limited interface -- ");
{ "tainted_args", 0, 0, true, false, false, false,
handle_tainted_args_attribute, NULL },
{ "fd_arg", 1, 1, false, true, true, false,
- handle_fd_arg_attribute, NULL},
+ handle_fd_arg_attribute, NULL},
{ "fd_arg_read", 1, 1, false, true, true, false,
handle_fd_arg_attribute, NULL},
{ "fd_arg_write", 1, 1, false, true, true, false,
- handle_fd_arg_attribute, NULL},
+ handle_fd_arg_attribute, NULL},
{ "flag_enum", 0, 0, false, true, false, false,
handle_flag_enum_attribute, NULL },
{ "null_terminated_string_arg", 1, 1, false, true, true, false,
if (positional_argument (*node, name, TREE_VALUE (args), INTEGER_TYPE))
return NULL_TREE;
- *no_add_attrs = true;
+ *no_add_attrs = true;
return NULL_TREE;
}
the comparison isn't an issue, so suppress the
warning. */
tree folded_op0 = fold_for_warn (op0);
- bool warn =
+ bool warn =
warn_type_limits && !in_system_header_at (loc)
&& !(TREE_CODE (folded_op0) == INTEGER_CST
&& !TREE_OVERFLOW (convert (c_common_signed_type (type),
folded_op0)))
/* Do not warn for enumeration types. */
&& (TREE_CODE (expr_original_type (folded_op0)) != ENUMERAL_TYPE);
-
+
switch (code)
{
case GE_EXPR:
}
/* Like c_mark_addressable but don't check register qualifier. */
-void
+void
c_common_mark_addressable_vec (tree t)
-{
+{
while (handled_component_p (t) || TREE_CODE (t) == C_MAYBE_CONST_EXPR)
{
if (TREE_CODE (t) == C_MAYBE_CONST_EXPR)
/* Types must be compile time constant sizes. */
if (!tree_fits_uhwi_p ((TYPE_SIZE_UNIT (TREE_TYPE (type_0)))))
{
- error_at (loc,
+ error_at (loc,
"argument 1 of %qE must be a pointer to a constant size type",
function);
return 0;
/* Zero size objects are not allowed. */
if (size_0 == 0)
{
- error_at (loc,
+ error_at (loc,
"argument 1 of %qE must be a pointer to a nonzero size object",
function);
return 0;
/* This will take an __atomic_ generic FUNCTION call, and add a size parameter N
at the beginning of the parameter list PARAMS representing the size of the
objects. This is to match the library ABI requirement. LOC is the location
- of the function call.
+ of the function call.
The new function is returned if it needed rebuilding, otherwise NULL_TREE is
returned to allow the external call to be constructed. */
static tree
-add_atomic_size_parameter (unsigned n, location_t loc, tree function,
+add_atomic_size_parameter (unsigned n, location_t loc, tree function,
vec<tree, va_gc> *params)
{
tree size_node;
PARAMS is the argument list for the call. The return value is non-null
TRUE is returned if it is translated into the proper format for a call to the
external library, and NEW_RETURN is set the tree for that function.
- FALSE is returned if processing for the _N variation is required, and
+ FALSE is returned if processing for the _N variation is required, and
NEW_RETURN is set to the return value the result is copied into. */
static bool
-resolve_overloaded_atomic_exchange (location_t loc, tree function,
+resolve_overloaded_atomic_exchange (location_t loc, tree function,
vec<tree, va_gc> *params, tree *new_return)
-{
+{
tree p0, p1, p2, p3;
tree I_type, I_type_ptr;
int n = get_atomic_generic_size (loc, function, params);
p1 = (*params)[1];
p2 = (*params)[2];
p3 = (*params)[3];
-
+
/* Create pointer to appropriate size. */
I_type = builtin_type_for_size (BITS_PER_UNIT * n, 1);
I_type_ptr = build_pointer_type (I_type);
/* Convert object pointer to required type. */
p0 = build1 (VIEW_CONVERT_EXPR, I_type_ptr, p0);
- (*params)[0] = p0;
+ (*params)[0] = p0;
/* Convert new value to required type, and dereference it.
If *p1 type can have padding or may involve floating point which
could e.g. be promoted to wider precision and demoted afterwards,
}
-/* This will process an __atomic_compare_exchange function call, determine
+/* This will process an __atomic_compare_exchange function call, determine
whether it needs to be mapped to the _N variation, or turned into a lib call.
LOC is the location of the builtin call.
FUNCTION is the DECL that has been invoked;
FALSE is returned if processing for the _N variation is required. */
static bool
-resolve_overloaded_atomic_compare_exchange (location_t loc, tree function,
- vec<tree, va_gc> *params,
+resolve_overloaded_atomic_compare_exchange (location_t loc, tree function,
+ vec<tree, va_gc> *params,
tree *new_return)
-{
+{
tree p0, p1, p2;
tree I_type, I_type_ptr;
int n = get_atomic_generic_size (loc, function, params);
/* If not a lock-free size, change to the library generic format. */
if (!atomic_size_supported_p (n))
{
- /* The library generic format does not have the weak parameter, so
+ /* The library generic format does not have the weak parameter, so
remove it from the param list. Since a parameter has been removed,
we can be sure that there is room for the SIZE_T parameter, meaning
there will not be a recursive rebuilding of the parameter list, so
p0 = (*params)[0];
p1 = (*params)[1];
p2 = (*params)[2];
-
+
/* Create pointer to appropriate size. */
I_type = builtin_type_for_size (BITS_PER_UNIT * n, 1);
I_type_ptr = build_pointer_type (I_type);
PARAMS is the argument list for the call. The return value is non-null
TRUE is returned if it is translated into the proper format for a call to the
external library, and NEW_RETURN is set the tree for that function.
- FALSE is returned if processing for the _N variation is required, and
+ FALSE is returned if processing for the _N variation is required, and
NEW_RETURN is set to the return value the result is copied into. */
static bool
-resolve_overloaded_atomic_load (location_t loc, tree function,
+resolve_overloaded_atomic_load (location_t loc, tree function,
vec<tree, va_gc> *params, tree *new_return)
-{
+{
tree p0, p1, p2;
tree I_type, I_type_ptr;
int n = get_atomic_generic_size (loc, function, params);
p0 = (*params)[0];
p1 = (*params)[1];
p2 = (*params)[2];
-
+
/* Create pointer to appropriate size. */
I_type = builtin_type_for_size (BITS_PER_UNIT * n, 1);
I_type_ptr = build_pointer_type (I_type);
PARAMS is the argument list for the call. The return value is non-null
TRUE is returned if it is translated into the proper format for a call to the
external library, and NEW_RETURN is set the tree for that function.
- FALSE is returned if processing for the _N variation is required, and
+ FALSE is returned if processing for the _N variation is required, and
NEW_RETURN is set to the return value the result is copied into. */
static bool
-resolve_overloaded_atomic_store (location_t loc, tree function,
+resolve_overloaded_atomic_store (location_t loc, tree function,
vec<tree, va_gc> *params, tree *new_return)
-{
+{
tree p0, p1;
tree I_type, I_type_ptr;
int n = get_atomic_generic_size (loc, function, params);
p0 = (*params)[0];
p1 = (*params)[1];
-
+
/* Create pointer to appropriate size. */
I_type = builtin_type_for_size (BITS_PER_UNIT * n, 1);
I_type_ptr = build_pointer_type (I_type);
p1 = build_indirect_ref (loc, p1, RO_UNARY_STAR);
p1 = build1 (VIEW_CONVERT_EXPR, I_type, p1);
(*params)[1] = p1;
-
+
/* The memory model is in the right spot already. Return is void. */
*new_return = NULL_TREE;
#endif /* #if CHECKING_P */
/* Attempt to locate a suitable location within FILE for a
- #include directive to be inserted before.
+ #include directive to be inserted before.
LOC is the location of the relevant diagnostic.
Attempt to return the location within FILE immediately
are keywords only in specific contexts) */
RID_IN, RID_OUT, RID_INOUT, RID_BYCOPY, RID_BYREF, RID_ONEWAY,
- /* ObjC ("PATTR" reserved words - they do not appear after a '@'
+ /* ObjC ("PATTR" reserved words - they do not appear after a '@'
and are keywords only as property attributes) */
RID_GETTER, RID_SETTER,
RID_READONLY, RID_READWRITE,
RID_AT_PRIVATE, RID_AT_PROTECTED, RID_AT_PUBLIC, RID_AT_PACKAGE,
RID_AT_PROTOCOL, RID_AT_SELECTOR,
RID_AT_THROW, RID_AT_TRY, RID_AT_CATCH,
- RID_AT_FINALLY, RID_AT_SYNCHRONIZED,
+ RID_AT_FINALLY, RID_AT_SYNCHRONIZED,
RID_AT_OPTIONAL, RID_AT_REQUIRED, RID_AT_PROPERTY,
RID_AT_SYNTHESIZE, RID_AT_DYNAMIC,
RID_AT_INTERFACE,
/* This function will emit cpp macros to indicate the presence of various lock
free atomic operations. */
-
+
static void
cpp_atomic_builtins (cpp_reader *pfile)
{
lock free. */
#define SIZEOF_NODE(T) (tree_to_uhwi (TYPE_SIZE_UNIT (T)))
#define SWAP_INDEX(T) ((SIZEOF_NODE (T) < SWAP_LIMIT) ? SIZEOF_NODE (T) : 0)
- builtin_define_with_int_value ("__GCC_ATOMIC_BOOL_LOCK_FREE",
+ builtin_define_with_int_value ("__GCC_ATOMIC_BOOL_LOCK_FREE",
(have_swap[SWAP_INDEX (boolean_type_node)]? 2 : 1));
- builtin_define_with_int_value ("__GCC_ATOMIC_CHAR_LOCK_FREE",
+ builtin_define_with_int_value ("__GCC_ATOMIC_CHAR_LOCK_FREE",
(have_swap[SWAP_INDEX (signed_char_type_node)]? 2 : 1));
if (flag_char8_t)
builtin_define_with_int_value ("__GCC_ATOMIC_CHAR8_T_LOCK_FREE",
(have_swap[SWAP_INDEX (char8_type_node)]? 2 : 1));
- builtin_define_with_int_value ("__GCC_ATOMIC_CHAR16_T_LOCK_FREE",
+ builtin_define_with_int_value ("__GCC_ATOMIC_CHAR16_T_LOCK_FREE",
(have_swap[SWAP_INDEX (char16_type_node)]? 2 : 1));
- builtin_define_with_int_value ("__GCC_ATOMIC_CHAR32_T_LOCK_FREE",
+ builtin_define_with_int_value ("__GCC_ATOMIC_CHAR32_T_LOCK_FREE",
(have_swap[SWAP_INDEX (char32_type_node)]? 2 : 1));
- builtin_define_with_int_value ("__GCC_ATOMIC_WCHAR_T_LOCK_FREE",
+ builtin_define_with_int_value ("__GCC_ATOMIC_WCHAR_T_LOCK_FREE",
(have_swap[SWAP_INDEX (wchar_type_node)]? 2 : 1));
- builtin_define_with_int_value ("__GCC_ATOMIC_SHORT_LOCK_FREE",
+ builtin_define_with_int_value ("__GCC_ATOMIC_SHORT_LOCK_FREE",
(have_swap[SWAP_INDEX (short_integer_type_node)]? 2 : 1));
- builtin_define_with_int_value ("__GCC_ATOMIC_INT_LOCK_FREE",
+ builtin_define_with_int_value ("__GCC_ATOMIC_INT_LOCK_FREE",
(have_swap[SWAP_INDEX (integer_type_node)]? 2 : 1));
- builtin_define_with_int_value ("__GCC_ATOMIC_LONG_LOCK_FREE",
+ builtin_define_with_int_value ("__GCC_ATOMIC_LONG_LOCK_FREE",
(have_swap[SWAP_INDEX (long_integer_type_node)]? 2 : 1));
- builtin_define_with_int_value ("__GCC_ATOMIC_LLONG_LOCK_FREE",
+ builtin_define_with_int_value ("__GCC_ATOMIC_LLONG_LOCK_FREE",
(have_swap[SWAP_INDEX (long_long_integer_type_node)]? 2 : 1));
/* If we're dealing with a "set" value that doesn't exactly correspond
psize = POINTER_SIZE_UNITS;
if (psize >= SWAP_LIMIT)
psize = 0;
- builtin_define_with_int_value ("__GCC_ATOMIC_POINTER_LOCK_FREE",
+ builtin_define_with_int_value ("__GCC_ATOMIC_POINTER_LOCK_FREE",
(have_swap[psize]? 2 : 1));
}
Each builtin_define_float_constants invocation calls
builtin_define_with_hex_fp_value 5 times and builtin_define_float_constants
is called for FLT, DBL, LDBL and up to NUM_FLOATN_NX_TYPES times for
- FLTNN*. */
+ FLTNN*. */
#define LAZY_HEX_FP_VALUES_CNT (5 * (3 + NUM_FLOATN_NX_TYPES))
static GTY(()) struct lazy_hex_fp_value_struct
lazy_hex_fp_values[LAZY_HEX_FP_VALUES_CNT];
/* Check that we have a pointer to a string suitable for use as a format.
The default is to check for a char type.
For objective-c dialects, this is extended to include references to string
- objects validated by objc_string_ref_type_p ().
- Targets may also provide a string object type that can be used within c and
+ objects validated by objc_string_ref_type_p ().
+ Targets may also provide a string object type that can be used within c and
c++ and shared with their respective objective-c dialects. In this case the
reference to a format string is checked for validity via a hook.
-
- The function returns true if strref points to any string type valid for the
+
+ The function returns true if strref points to any string type valid for the
language dialect and target. */
bool
}
/* Verify that the format_num argument is actually a string reference suitable,
- for the language dialect and target (in case the format attribute is in
- error). When we know the specific reference type expected, this is also
+ for the language dialect and target (in case the format attribute is in
+ error). When we know the specific reference type expected, this is also
checked. */
static bool
check_format_string (const_tree fntype, unsigned HOST_WIDE_INT format_num,
return true;
/* Now check that the arg matches the expected type. */
- is_char_ref =
+ is_char_ref =
(TYPE_MAIN_VARIANT (TREE_TYPE (ref)) == char_type_node);
fmt_flags = format_flags (expected_format_type);
*no_add_attrs = true;
return false;
}
-
+
/* We will assert that objective-c will support either its own string type
or the target-supplied variant. */
if (!is_objc_sref)
is_target_sref = (*targetcm.string_object_ref_type_p) ((const_tree) ref);
- if (expected_format_type == (int) gcc_objc_string_format_type
+ if (expected_format_type == (int) gcc_objc_string_format_type
&& (is_objc_sref || is_target_sref))
return true;
/* We will allow a target string ref to match only itself. */
- if (first_target_format_type
+ if (first_target_format_type
&& expected_format_type >= first_target_format_type
&& is_target_sref)
return true;
if (params == 0)
res->number_other++;
- else
+ else
{
if (res->number_extra_args == 0)
res->extra_arg_loc = EXPR_LOC_OR_LOC (TREE_VALUE (params),
}
res->format_string_loc = EXPR_LOC_OR_LOC (format_tree, input_location);
format_tree = TREE_OPERAND (format_tree, 0);
- if (format_types[info->format_type].flags
+ if (format_types[info->format_type].flags
& (int) FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL)
{
bool objc_str = (info->format_type == gcc_objc_string_format_type);
a valid type. */
if (TREE_CODE (format_tree) != CONST_DECL
|| !((objc_str && objc_string_ref_type_p (TREE_TYPE (format_tree)))
- || (*targetcm.string_object_ref_type_p)
+ || (*targetcm.string_object_ref_type_p)
((const_tree) TREE_TYPE (format_tree))))
{
res->number_non_literal++;
" the size of the code/headers");
if (!flag_large_source_files)
inform (guard_loc,
- "adding %<-flarge-source-files%> will allow for more"
+ "adding %<-flarge-source-files%> will allow for more"
" column-tracking support, at the expense of compilation"
" time and memory");
}
extern tree objc_maybe_build_component_ref (tree, tree);
extern tree objc_build_class_component_ref (tree, tree);
extern tree objc_maybe_build_modify_expr (tree, tree);
-extern tree objc_build_incr_expr_for_property_ref (location_t, enum tree_code,
+extern tree objc_build_incr_expr_for_property_ref (location_t, enum tree_code,
tree, tree);
extern void objc_add_synthesize_declaration (location_t, tree);
extern void objc_add_dynamic_declaration (location_t, tree);
/* Complete a #pragma omp atomic construct. For CODE OMP_ATOMIC
- the expression to be implemented atomically is LHS opcode= RHS.
+ the expression to be implemented atomically is LHS opcode= RHS.
For OMP_ATOMIC_READ V = LHS, for OMP_ATOMIC_CAPTURE_{NEW,OLD} LHS
opcode= RHS with the new or old content of LHS returned.
LOC is the location of the atomic statement. The value returned
/* Helper function called via walk_tree, to diagnose uses
of associated loop IVs inside of lb, b and incr expressions
of OpenMP loops. */
-
+
static tree
c_omp_check_loop_iv_r (tree *tp, int *walk_subtrees, void *data)
{
} *deferred_opts;
-extern const unsigned int
+extern const unsigned int
c_family_lang_mask = (CL_C | CL_CXX | CL_ObjC | CL_ObjCXX);
/* Defer option CODE with argument ARG. */
switch (c_language)
{
case clk_c:
- C_handle_option_auto (&global_options, &global_options_set,
- scode, arg, value,
+ C_handle_option_auto (&global_options, &global_options_set,
+ scode, arg, value,
c_family_lang_mask, kind,
loc, handlers, global_dc);
break;
case clk_objc:
ObjC_handle_option_auto (&global_options, &global_options_set,
- scode, arg, value,
+ scode, arg, value,
c_family_lang_mask, kind,
loc, handlers, global_dc);
break;
/* Wlong-long is disabled by default. It is enabled by:
[-Wpedantic | -Wtraditional] -std=[gnu|c]++98 ; or
- [-Wpedantic | -Wtraditional] -std=non-c99
+ [-Wpedantic | -Wtraditional] -std=non-c99
Either -Wlong-long or -Wno-long-long override any other settings.
??? These conditions should be handled in c.opt. */
/* We're starting the main file. Inform the FE of that. */
lang_hooks.preprocess_main_file (reader, line_table, new_map);
- if (new_map
+ if (new_map
&& (new_map->reason == LC_ENTER || new_map->reason == LC_RENAME))
{
/* Signal to plugins that a file is included. This could happen
several times with the same file path, e.g. because of
several '#include' or '#line' directives... */
- invoke_plugin_callbacks
+ invoke_plugin_callbacks
(PLUGIN_INCLUDE_FILE,
const_cast<char*> (ORDINARY_MAP_FILE_NAME (new_map)));
}
print.streamer = this;
}
- void begin_pragma ()
+ void begin_pragma ()
{
in_pragma = true;
}
#endif
global_sso = default_sso;
- c_register_pragma (0, "scalar_storage_order",
+ c_register_pragma (0, "scalar_storage_order",
handle_pragma_scalar_storage_order);
/* Allow plugins to register their own pragmas. */
is WinMain on Win32 targets.",
bool, (const char*),
NULL)
-
+
HOOK_VECTOR_END (C90_EMPTY_HACK)
UBSAN_REF_BINDING);
if (op)
{
- if (TREE_CODE (stmt) == NOP_EXPR)
+ if (TREE_CODE (stmt) == NOP_EXPR)
TREE_OPERAND (stmt, 0) = op;
else
*stmt_p = op;
{
}
-void
+void
objc_set_method_opt (bool ARG_UNUSED (optional))
{
}
{
}
-bool
+bool
objc_method_decl (enum tree_code ARG_UNUSED(opcode))
{
return false;
}
void
-objc_add_property_declaration (location_t ARG_UNUSED (location),
+objc_add_property_declaration (location_t ARG_UNUSED (location),
tree ARG_UNUSED (decl),
vec<property_attribute_info *>&
/*prop_attr_list*/)
}
void
-objc_add_synthesize_declaration (location_t ARG_UNUSED (start_locus),
+objc_add_synthesize_declaration (location_t ARG_UNUSED (start_locus),
tree ARG_UNUSED (property_and_ivar_list))
{
}
void
-objc_add_dynamic_declaration (location_t ARG_UNUSED (start_locus),
+objc_add_dynamic_declaration (location_t ARG_UNUSED (start_locus),
tree ARG_UNUSED (property_list))
{
}
const char *
-objc_maybe_printable_name (tree ARG_UNUSED (decl),
+objc_maybe_printable_name (tree ARG_UNUSED (decl),
int ARG_UNUSED (v))
{
return NULL;
}
void
-objc_check_format_arg (tree ARG_UNUSED (format_arg),
+objc_check_format_arg (tree ARG_UNUSED (format_arg),
tree ARG_UNUSED (args_list))
{
}
= TYPE_NEXT_VARIANT (TYPE_NEXT_VARIANT (t));
break;
}
- }
+ }
else
for (tree t = TYPE_MAIN_VARIANT (remove); ;
t = TYPE_NEXT_VARIANT (t))
finish_function (location_t end_loc)
{
tree fndecl = current_function_decl;
-
+
if (c_dialect_objc ())
objc_finish_function ();
unsigned i;
FOR_EACH_VEC_ELT (*all_translation_units, i, t)
- {
+ {
decls = DECL_INITIAL (t);
for (decl = BLOCK_VARS (decls); decl; decl = TREE_CHAIN (decl))
if (!DECL_IS_UNDECLARED_BUILTIN (decl))
In finish_decl(), if the decl is static, has incomplete
struct/union/enum type, it is appended to incomplete_record_decls.
In c_parser_translation_unit(), we iterate over incomplete_record_decls
- and report error if any of the decls are still incomplete. */
+ and report error if any of the decls are still incomplete. */
vec<tree> incomplete_record_decls;
/* Else they are not special keywords.
*/
}
- else if (c_dialect_objc ()
+ else if (c_dialect_objc ()
&& (OBJC_IS_AT_KEYWORD (rid_code)
|| OBJC_IS_CXX_KEYWORD (rid_code)))
{
setter/getter on the class. c_token_starts_declspecs() can't
differentiate between the two cases because it only checks the
current token, so we have a special check here. */
- if (c_dialect_objc ()
+ if (c_dialect_objc ()
&& token->type == CPP_NAME
- && token->id_kind == C_ID_CLASSNAME
+ && token->id_kind == C_ID_CLASSNAME
&& c_parser_peek_2nd_token (parser)->type == CPP_DOT)
return false;
c_token *token = c_parser_peek_token (parser);
/* Same as above. */
- if (c_dialect_objc ()
+ if (c_dialect_objc ()
&& token->type == CPP_NAME
- && token->id_kind == C_ID_CLASSNAME
+ && token->id_kind == C_ID_CLASSNAME
&& c_parser_peek_2nd_token (parser)->type == CPP_DOT)
return false;
return;
if (specs->attrs)
{
- warning_at (c_parser_peek_token (parser)->location,
+ warning_at (c_parser_peek_token (parser)->location,
OPT_Wattributes,
"prefix attributes are ignored for methods");
specs->attrs = NULL_TREE;
return;
if (specs->attrs)
{
- warning_at (c_parser_peek_token (parser)->location,
+ warning_at (c_parser_peek_token (parser)->location,
OPT_Wattributes,
"prefix attributes are ignored for implementations");
specs->attrs = NULL_TREE;
}
- c_parser_objc_class_definition (parser, NULL_TREE);
+ c_parser_objc_class_definition (parser, NULL_TREE);
return;
}
break;
should diagnose if there were no declaration specifiers) or a
function definition (in which case the diagnostic for
implicit int suffices). */
- declarator = c_parser_declarator (parser,
+ declarator = c_parser_declarator (parser,
specs->typespec_kind != ctsk_none,
C_DTR_NORMAL, &dummy);
if (declarator == NULL)
if (d)
*objc_foreach_object_declaration = d;
else
- *objc_foreach_object_declaration = error_mark_node;
+ *objc_foreach_object_declaration = error_mark_node;
}
}
if (c_parser_next_token_is (parser, CPP_COMMA))
&& !attrs
&& c_parser_next_token_is (parser, CPP_NAME)
&& c_parser_peek_token (parser)->id_kind == C_ID_ID
-
+
/* Look ahead to detect typos in type names. */
&& c_parser_peek_2nd_token (parser)->type != CPP_NAME
&& c_parser_peek_2nd_token (parser)->type != CPP_MULT
Here is the canonical example of the first variant:
for (object in array) { do something with object }
- we call the first expression ("object") the "object_expression" and
+ we call the first expression ("object") the "object_expression" and
the second expression ("array") the "collection_expression".
object_expression must be an lvalue of type "id" (a generic Objective-C
object) because the loop works by assigning to object_expression the
else if (c_parser_next_tokens_start_declaration (parser)
|| c_parser_nth_token_starts_std_attributes (parser, 1))
{
- c_parser_declaration_or_fndef (parser, true, true, true, true, true,
+ c_parser_declaration_or_fndef (parser, true, true, true, true, true,
&object_expression);
parser->objc_could_be_foreach_context = false;
-
+
if (c_parser_next_token_is_keyword (parser, RID_IN))
{
c_parser_consume_token (parser);
c_parser_declaration_or_fndef (parser, true, true, true, true,
true, &object_expression);
parser->objc_could_be_foreach_context = false;
-
+
restore_extension_diagnostics (ext);
if (c_parser_next_token_is_keyword (parser, RID_IN))
{
exp_location = c_parser_peek_token (parser)->location;
rhs = c_parser_expr_no_commas (parser, NULL);
rhs = convert_lvalue_to_rvalue (exp_location, rhs, true, true);
-
+
ret.value = build_modify_expr (op_location, lhs.value, lhs.original_type,
code, exp_location, rhs.value,
rhs.original_type);
c_parser_consume_token (parser);
exp_loc = c_parser_peek_token (parser)->location;
op = c_parser_cast_expression (parser, NULL);
-
+
op = default_function_array_read_conversion (exp_loc, op);
return parser_build_unary_op (op_loc, PREDECREMENT_EXPR, op);
case CPP_AND:
};
/* Parse a generic-selection. (C11 6.5.1.1).
-
+
generic-selection:
_Generic ( generic-controlling-operand , generic-assoc-list )
generic-assoc-list:
generic-association
generic-assoc-list , generic-association
-
+
generic-association:
type-name : assignment-expression
default : assignment-expression
component = component_tok->value;
location_t end_loc = component_tok->get_finish ();
c_parser_consume_token (parser);
- expr.value = objc_build_class_component_ref (class_name,
+ expr.value = objc_build_class_component_ref (class_name,
component);
set_c_expr_source_range (&expr, loc, end_loc);
break;
/* There is a syntax error. We want to skip the offending
tokens up to the next ';' (included) or '}'
(excluded). */
-
+
/* First, skip manually a ')' or ']'. This is because they
reduce the nesting level, so c_parser_skip_until_found()
wouldn't be able to skip past them. */
/* Forget protocol qualifiers now. */
parser->objc_pq_context = false;
- /* Do not allow the presence of attributes to hide an erroneous
+ /* Do not allow the presence of attributes to hide an erroneous
method implementation in the interface section. */
if (!c_parser_next_token_is (parser, CPP_SEMICOLON))
{
c_parser_error (parser, "expected %<;%>");
return;
}
-
+
if (decl != error_mark_node)
objc_add_method_declaration (is_class_method, decl, attributes);
c_parser_skip_until_found (parser, CPP_SEMICOLON, "expected %<;%>");
}
-/* If we are at a position that method attributes may be present, check that
- there are not any parsed already (a syntax error) and then collect any
+/* If we are at a position that method attributes may be present, check that
+ there are not any parsed already (a syntax error) and then collect any
specified at the current location. Finally, if new attributes were present,
check that the next token is legal ( ';' for decls and '{' for defs). */
-
-static bool
+
+static bool
c_parser_objc_maybe_method_attributes (c_parser* parser, tree* attributes)
{
bool bad = false;
if (*attributes)
{
- c_parser_error (parser,
+ c_parser_error (parser,
"method attributes must be specified at the end only");
*attributes = NULL_TREE;
bad = true;
return bad;
/* We've got attributes, but not at the end. */
- c_parser_error (parser,
+ c_parser_error (parser,
"expected %<;%> or %<{%> after method attribute definition");
return true;
}
{
ellipsis = true;
c_parser_consume_token (parser);
- attr_err |= c_parser_objc_maybe_method_attributes
+ attr_err |= c_parser_objc_maybe_method_attributes
(parser, attributes) ;
break;
}
where '...' is to be interpreted literally, that is, it means CPP_ELLIPSIS.
PS: This function is identical to cp_parser_objc_try_catch_finally_statement
- for C++. Keep them in sync. */
+ for C++. Keep them in sync. */
static void
c_parser_objc_try_catch_finally_statement (c_parser *parser)
going. */
if (c_parser_next_token_is (parser, CPP_CLOSE_PAREN))
c_parser_consume_token (parser);
-
+
/* If these is no immediate closing parenthesis, the user
probably doesn't know that parenthesis are required at
all (ie, they typed "@catch NSException *e"). So, just
/* A check, needed in several places, that ObjC interface, implementation or
method definitions are not prefixed by incorrect items. */
static bool
-c_parser_objc_diagnose_bad_element_prefix (c_parser *parser,
+c_parser_objc_diagnose_bad_element_prefix (c_parser *parser,
struct c_declspecs *specs)
{
if (!specs->declspecs_seen_p || specs->non_sc_seen_p
|| specs->typespec_kind != ctsk_none)
{
- c_parser_error (parser,
+ c_parser_error (parser,
"no type or storage class may be specified here,");
c_parser_skip_to_end_of_block_or_statement (parser);
return true;
One of: + * - & ^ | && ||
OpenMP 3.1:
-
+
reduction-operator:
One of: + * - & ^ | && || max min
clauses = c_parser_omp_clause_allocate (parser, clauses);
c_name = "allocate";
break;
- case PRAGMA_OMP_CLAUSE_LINEAR:
- clauses = c_parser_omp_clause_linear (parser, clauses);
+ case PRAGMA_OMP_CLAUSE_LINEAR:
+ clauses = c_parser_omp_clause_linear (parser, clauses);
c_name = "linear";
break;
case PRAGMA_OMP_CLAUSE_AFFINITY:
parser->tokens = clauses.address ();
parser->tokens_avail = clauses.length ();
-
+
/* c_parser_omp_declare_simd pushed 2 extra CPP_EOF tokens at the end. */
while (parser->tokens_avail > 3)
{
fundecl = function;
if (!orig_fundecl)
orig_fundecl = fundecl;
- /* Atomic functions have type checking/casting already done. They are
+ /* Atomic functions have type checking/casting already done. They are
often rewritten and don't match the original parameter list. */
if (name && startswith (IDENTIFIER_POINTER (name), "__atomic_"))
origtypes = NULL;
gimple-assign-statement:
gimple-unary-expression = gimple-assign-rhs
-
+
gimple-assign-rhs:
gimple-cast-expression
gimple-unary-expression
/* Get at the actual SSA name ID with VERSION starting at VER_OFFSET.
TYPE is the type if the SSA name is being declared. */
-static tree
+static tree
c_parser_parse_ssa_name (gimple_parser &parser,
tree id, tree type, unsigned version,
unsigned ver_offset)
{
if (! type)
{
- c_parser_error (parser, "SSA name undeclared");
+ c_parser_error (parser, "SSA name undeclared");
return error_mark_node;
}
name = make_ssa_name_fn (cfun, type, NULL, version);
XDELETEVEC (var_name);
if (! parent || parent == error_mark_node)
{
- c_parser_error (parser, "base variable or SSA name undeclared");
+ c_parser_error (parser, "base variable or SSA name undeclared");
return error_mark_node;
}
if (!(VAR_P (parent)
}
else
{
- /* We are not sharing slots.
+ /* We are not sharing slots.
Run through all the call-used hard-registers and allocate
space for each in the caller-save area. Try to allocate space
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
if (TEST_HARD_REG_BIT (hard_regs_saved, regno))
n_regs_saved++;
-
+
if (cheap
&& HARD_REGISTER_P (cheap)
&& callee_abi.clobbers_reg_p (GET_MODE (cheap),
rtx val = argvec[argnum].value;
rtx reg = argvec[argnum].reg;
int partial = argvec[argnum].partial;
-
+
/* Handle calls that pass values in multiple non-contiguous
locations. The PA64 has examples of this for library calls. */
if (reg != 0 && GET_CODE (reg) == PARALLEL)
return (TREE_CODE (TREE_TYPE (t)) == BOOLEAN_TYPE);
/* Check to see if SSA name is set by a comparison operator in
- the same basic block. */
+ the same basic block. */
if (!is_gimple_assign (g))
return false;
if (bb != gimple_bb (g))
DEF_BASIC_BLOCK_FLAG(NON_LOCAL_GOTO_TARGET, 8)
/* Set on blocks that are in RTL format. */
-DEF_BASIC_BLOCK_FLAG(RTL, 9)
+DEF_BASIC_BLOCK_FLAG(RTL, 9)
/* Set on blocks that are forwarder blocks.
Only used in cfgcleanup.cc. */
gcc_assert (!n_edges_for_fn (fn));
/* Sanity check that dominance tree is freed. */
gcc_assert (!fn->cfg->x_dom_computed[0] && !fn->cfg->x_dom_computed[1]);
-
+
vec_free (fn->cfg->x_label_to_block_map);
vec_free (basic_block_info_for_fn (fn));
ggc_free (fn->cfg);
{
basic_block side = (do_succ ? e->dest : e->src);
bool do_details = false;
-
+
if ((flags & TDF_DETAILS) != 0
&& (flags & TDF_SLIM) == 0)
do_details = true;
frequency or count is believed to be lower than COUNT
respectively. */
void
-update_bb_profile_for_threading (basic_block bb,
+update_bb_profile_for_threading (basic_block bb,
profile_count count, edge taken_edge)
{
gcc_assert (bb == taken_edge->src);
that is a single_set with a SET_SRC of SRC1. Similarly
for NOTE2/SRC2.
- So effectively NOTE1/NOTE2 are an alternate form of
+ So effectively NOTE1/NOTE2 are an alternate form of
SRC1/SRC2 respectively.
Return nonzero if SRC1 or NOTE1 has the same constant
stack_protect_return_slot_p ()
{
basic_block bb;
-
+
FOR_ALL_BB_FN (bb, cfun)
for (gimple_stmt_iterator gsi = gsi_start_bb (bb);
!gsi_end_p (gsi); gsi_next (&gsi))
ASM_OPERANDS_OUTPUT_CONSTRAINT (body) = constraints[0];
if (nlabels > 0)
emit_jump_insn (gen_rtx_SET (output_rvec[0], body));
- else
+ else
emit_insn (gen_rtx_SET (output_rvec[0], body));
}
else
For every field[2], field[0] is the count before the pass runs, and
field[1] is the post-pass count. This allows us to monitor the effect
of each individual pass on the profile consistency.
-
+
This structure is not supposed to be used by anything other than passes.cc
and one CFG hook per CFG mode. */
struct profile_record
/* Add PHI arguments queued in PENDINT_STMT list on edge E to edge
E->dest (only in tree-ssa loop versioning. */
void (*flush_pending_stmts) (edge);
-
+
/* True if a block contains no executable instructions. */
bool (*empty_block_p) (basic_block);
/* Returns the list of the latch edges of LOOP. */
-static vec<edge>
+static vec<edge>
get_loop_latch_edges (const class loop *loop)
{
edge_iterator ei;
bool *read_profile_p)
{
gcov_type expected = -1;
-
+
if (read_profile_p)
*read_profile_p = false;
HOST_WIDE_INT max = get_max_loop_iterations_int (loop);
if (max != -1 && max < expected)
return max;
-
+
return expected;
}
successors we consider edges coming out of the loops.
If the changes may invalidate the information about irreducible regions,
- IRRED_INVALIDATED is set to true.
+ IRRED_INVALIDATED is set to true.
If LOOP_CLOSED_SSA_INVLIDATED is non-zero then all basic blocks with
changed loop_father are collected there. */
class loop *cloop;
cloop = alloc_loop ();
place_new_loop (cfun, cloop);
-
+
copy_loop_info (loop, cloop);
/* Mark the new loop as copy of LOOP. */
dest = e_fall->dest;
}
- /* We got here if we need to add a new jump insn.
+ /* We got here if we need to add a new jump insn.
Note force_nonfallthru can delete E_FALL and thus we have to
save E_FALL->src prior to the call to force_nonfallthru. */
nb = force_nonfallthru_and_redirect (e_fall, dest, ret_label);
else
{
rtx_insn *last = BB_HEADER (b);
-
+
while (NEXT_INSN (last))
last = NEXT_INSN (last);
SET_NEXT_INSN (last) = BB_FOOTER (a);
last = insn;
}
- /* Did not find everything. */
+ /* Did not find everything. */
if (found_code && split_point)
return split_block (bb, split_point)->dest;
- else
+ else
return NULL;
}
rtl_lv_add_condition_to_bb, /* lv_add_condition_to_bb */
NULL, /* lv_adjust_loop_header_phi*/
rtl_extract_cond_bb_edges, /* extract_cond_bb_edges */
- NULL, /* flush_pending_stmts */
+ NULL, /* flush_pending_stmts */
rtl_block_empty_p, /* block_empty_p */
rtl_split_block_before_cond_jump, /* split_block_before_cond_jump */
rtl_account_profile_record,
/* Turn edge into speculative call calling N2. Update
the profile so the direct call is taken COUNT times
- with FREQUENCY.
+ with FREQUENCY.
At clone materialization time, the indirect call E will
be expanded as:
At this time the function just creates the direct call,
the reference representing the if conditional and attaches
- them all to the original indirect call statement.
+ them all to the original indirect call statement.
speculative_id is used to link direct calls with their corresponding
IPA_REF_ADDR references when representing speculative calls.
thunk_info::get (this)->dump (f);
}
else gcc_checking_assert (!thunk_info::get (this));
-
+
fprintf (f, " Called by: ");
profile_count sum = profile_count::zero ();
When setting the flag be careful about possible interposition and
do not set the flag for functions that can be interposed and set pure
- flag for functions that can bind to other definition.
+ flag for functions that can bind to other definition.
Return true if any change was done. */
{
struct ipa_ref *ref;
- /* For local symbols or non-comdat group it is the same as
+ /* For local symbols or non-comdat group it is the same as
can_remove_if_no_direct_calls_p. */
if (!externally_visible || !same_comdat_group)
{
/* Walk the alias chain to return the function cgraph_node is alias of.
Walk through non virtual thunks, too. Thus we return either a function
or a virtual thunk node.
- When AVAILABILITY is non-NULL, get minimal availability in the chain.
+ When AVAILABILITY is non-NULL, get minimal availability in the chain.
When REF is non-NULL, assume that reference happens in symbol REF
when determining the availability. */
return true;
}
-/* Prepare function body. When doing LTO, read cgraph_node's body from disk
+/* Prepare function body. When doing LTO, read cgraph_node's body from disk
if it is not already present. When some IPA transformations are scheduled,
apply them. */
/* Return 0 if symbol is known to have different address than S2,
Return 1 if symbol is known to have same address as S2,
- return 2 otherwise.
+ return 2 otherwise.
If MEMORY_ACCESSED is true, assume that both memory pointer to THIS
and S2 is going to be accessed. This eliminates the situations when
/* Walk the alias chain to return the function cgraph_node is alias of.
Walk through thunk, too.
- When AVAILABILITY is non-NULL, get minimal availability in the chain.
+ When AVAILABILITY is non-NULL, get minimal availability in the chain.
When REF is non-NULL, assume that reference happens in symbol REF
when determining the availability. */
cgraph_node *function_symbol (enum availability *avail = NULL,
/* Walk the alias chain to return the function cgraph_node is alias of.
Walk through non virtual thunks, too. Thus we return either a function
or a virtual thunk node.
- When AVAILABILITY is non-NULL, get minimal availability in the chain.
+ When AVAILABILITY is non-NULL, get minimal availability in the chain.
When REF is non-NULL, assume that reference happens in symbol REF
when determining the availability. */
cgraph_node *function_or_virtual_thunk_symbol
present. */
bool get_untransformed_body ();
- /* Prepare function body. When doing LTO, read cgraph_node's body from disk
+ /* Prepare function body. When doing LTO, read cgraph_node's body from disk
if it is not already present. When some IPA transformations are scheduled,
apply them. */
bool get_body ();
When setting the flag be careful about possible interposition and
do not set the flag for functions that can be interposed and set pure
- flag for functions that can bind to other definition.
+ flag for functions that can bind to other definition.
Return true if any change was done. */
all uses of COMDAT function does not make it necessarily disappear from
the program unless we are compiling whole program or we do LTO. In this
case we know we win since dynamic linking will not really discard the
- linkonce section.
+ linkonce section.
If WILL_INLINE is true, assume that function will be inlined into all the
direct calls. */
bool can_remove_if_no_direct_calls_and_refs_p (void);
/* Return true when function cgraph_node and its aliases can be removed from
- callgraph if all direct calls are eliminated.
+ callgraph if all direct calls are eliminated.
If WILL_INLINE is true, assume that function will be inlined into all the
direct calls. */
bool can_remove_if_no_direct_calls_p (bool will_inline = false);
friend struct cgraph_node;
friend struct cgraph_edge;
- symbol_table ():
+ symbol_table ():
cgraph_count (0), cgraph_max_uid (1), cgraph_max_summary_id (0),
edges_count (0), edges_max_uid (1), edges_max_summary_id (0),
cgraph_released_summary_ids (), edge_released_summary_ids (),
for (; list; list = TREE_CHAIN (list))
{
tree type = TREE_VALUE (list);
-
+
if (TYPE_P (type))
type = lookup_type_for_runtime (type);
STRIP_NOPS (type);
tree decl;
if (call_stmt && (decl = gimple_call_fndecl (call_stmt))
- /* When the call is speculative, we need to resolve it
+ /* When the call is speculative, we need to resolve it
via cgraph_resolve_speculation and not here. */
&& !speculative)
{
/* Update IPA profile. Local profiles need no updating in original. */
if (update_original)
- count = count.combine_with_ipa_count_within (count.ipa ()
+ count = count.combine_with_ipa_count_within (count.ipa ()
- new_edge->count.ipa (),
caller->count);
symtab->call_edge_duplication_hooks (this, new_edge);
When UPDATE_ORIGINAL is true, the counts are subtracted from the original
function's profile to reflect the fact that part of execution is handled
- by node.
+ by node.
When CALL_DUPLICATION_HOOK is true, the ipa passes are acknowledged about
the new clone. Otherwise the caller is responsible for doing so later.
DECL_STRUCT_FUNCTION (new_decl) = NULL;
DECL_ARGUMENTS (new_decl) = NULL;
DECL_INITIAL (new_decl) = NULL;
- DECL_RESULT (new_decl) = NULL;
+ DECL_RESULT (new_decl) = NULL;
/* We cannot do DECL_RESULT (new_decl) = NULL; here because of LTO partitioning
sometimes storing only clone decl instead of original. */
}
/* callgraph node being removed from symbol table; see if its entry can be
- replaced by other inline clone.
+ replaced by other inline clone.
INFO is clone info to attach to the new root. */
cgraph_node *
cgraph_node::find_replacement (clone_info *info)
}
/* Like cgraph_set_call_stmt but walk the clone tree and update all
- clones sharing the same function body.
+ clones sharing the same function body.
When WHOLE_SPECULATIVE_EDGES is true, all three components of
speculative edge gets updated. Otherwise we update only direct
call. */
edges which should be redirected to point to
NEW_VERSION. ALL the callees edges of the node
are cloned to the new version node. Return the new
- version node.
+ version node.
- If non-NULL BLOCK_TO_COPY determine what basic blocks
+ If non-NULL BLOCK_TO_COPY determine what basic blocks
was copied to prevent duplications of calls that are dead
in the clone. */
Interprocedural passes differ from small interprocedural
passes by their ability to operate across whole program
at linktime. Their analysis stage is performed early to
- both reduce linking times and linktime memory usage by
+ both reduce linking times and linktime memory usage by
not having to represent whole program in memory.
d) LTO streaming. When doing LTO, everything important gets
out and thus all variables are output to the file.
Note that with -fno-toplevel-reorder passes 5 and 6
- are combined together in cgraph_output_in_order.
+ are combined together in cgraph_output_in_order.
Finally there are functions to manipulate the callgraph from
backend.
static symtab_node symtab_terminator (SYMTAB_SYMBOL);
static symtab_node *queued_nodes = &symtab_terminator;
-/* Add NODE to queue starting at QUEUED_NODES.
+/* Add NODE to queue starting at QUEUED_NODES.
The queue is linked via AUX pointers and terminated by pointer to 1. */
static void
}
/* EDGE is an polymorphic call. Mark all possible targets as reachable
- and if there is only one target, perform trivial devirtualization.
+ and if there is only one target, perform trivial devirtualization.
REACHABLE_CALL_TARGETS collects target lists we already walked to
avoid duplicate work. */
if (cache_token != NULL && !reachable_call_targets->add (cache_token))
{
if (symtab->dump_file)
- dump_possible_polymorphic_call_targets
+ dump_possible_polymorphic_call_targets
(symtab->dump_file, edge);
for (i = 0; i < targets.length (); i++)
/* DECL is FUNCTION_DECL. Initialize datastructures so DECL is a function
in lowered gimple form. IN_SSA is true if the gimple is in SSA.
-
+
Set current_function_decl and cfun to newly constructed empty function body.
return basic block in the function body. */
post_ld_pass (bool temp_file) {
if (!(temp_file && flag_idsym) && !flag_dsym)
return;
-
+
do_dsymutil (output_file);
}
#else
}
else if (next_active_insn (insn) != i3)
all_adjacent = false;
-
+
/* Can combine only if previous insn is a SET of a REG or a SUBREG,
or a PARALLEL consisting of such a SET and CLOBBERs.
/* If I0 loads a memory and I3 sets the same memory, then I1 and I2
are likely manipulating its value. Ideally we'll be able to combine
- all four insns into a bitfield insertion of some kind.
+ all four insns into a bitfield insertion of some kind.
Note the source in I0 might be inside a sign/zero extension and the
memory modes in I0 and I3 might be different. So extract the address
&& rtx_equal_for_field_assignment_p (XEXP (rhs, 0), dest))
c1 = INTVAL (XEXP (rhs, 1)), other = lhs;
/* The second SUBREG that might get in the way is a paradoxical
- SUBREG around the first operand of the AND. We want to
+ SUBREG around the first operand of the AND. We want to
pretend the operand is as wide as the destination here. We
do this by adjusting the MEM to wider mode for the sole
purpose of the call to rtx_equal_for_field_assignment_p. Also
&& rtx_equal_for_field_assignment_p (XEXP (lhs, 0), dest))
c1 = INTVAL (XEXP (lhs, 1)), other = rhs;
/* The second SUBREG that might get in the way is a paradoxical
- SUBREG around the first operand of the AND. We want to
+ SUBREG around the first operand of the AND. We want to
pretend the operand is as wide as the destination here. We
do this by adjusting the MEM to wider mode for the sole
purpose of the call to rtx_equal_for_field_assignment_p. Also
components should be preserved and directory names containing them passed\n\
to other tools such as the linker.",
bool, false)
-
+
HOOK_VECTOR_END (C90_EMPTY_HACK)
#undef HOOK_PREFIX
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
-
+
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
opts->x_ix86_isa_flags2_explicit |= OPTION_MASK_ISA2_UINTR_UNSET;
}
return true;
-
+
case OPT_mhreset:
if (value)
{
/* What options are we going to default to specific settings when
-O* happens; the user can subsequently override these settings.
-
+
Omitting the frame pointer is a very good idea on the MCore.
Scheduling isn't worth anything on the current MCore implementation. */
}
break;
}
-
+
return true;
}
opts->x_target_flags &= ~MASK_40;
opts->x_target_flags |= MASK_45;
return true;
-
+
case OPT_msoft_float:
opts->x_target_flags &= ~MASK_AC0;
return true;
if (invert)
opts->x_rs6000_debug &= ~mask;
- else
+ else
opts->x_rs6000_debug |= mask;
}
break;
return value >= 0 && value <= 4;
case OPT_mcpu_:
- if ((enum rx_cpu_types) value == RX200 ||
+ if ((enum rx_cpu_types) value == RX200 ||
(enum rx_cpu_types) value == RX100)
opts->x_target_flags |= MASK_NO_USE_FPU;
break;
-
+
case OPT_fpu:
if (opts->x_rx_cpu_type == RX200)
error_at (loc, "the RX200 cpu does not have FPU hardware");
[(set (reg:CCM) (compare:CCM (operation) (immediate)))
(set (reg) (operation)]
-
+
The mode CCM will be chosen as if by SELECT_CC_MODE.
Note that unlike NOTICE_UPDATE_CC, we do not handle memory operands.
/* Whether IN_A is wrapped in a NOT before being compared. */
bool not_in_a;
};
-
+
static vec<comparison *> all_compares;
/* Return whether X is a NOT unary expression. */
rtvec v = rtvec_alloc (2);
RTVEC_ELT (v, 0) = y;
RTVEC_ELT (v, 1) = x;
-
+
rtx pat = gen_rtx_PARALLEL (VOIDmode, v);
-
+
/* Succeed if the new instruction is valid. Note that we may have started
a change group within maybe_select_cc_mode, therefore we must continue. */
validate_change (insn, &PATTERN (insn), pat, true);
-
+
if (!apply_change_group ())
return false;
return type;
}
-
+
static void
aarch64_init_simd_builtin_types (void)
{
}
};
-const struct cpu_cost_table thunderx3t110_extra_costs =
+const struct cpu_cost_table thunderx3t110_extra_costs =
{
/* ALU */
{
};
#define AARCH64_FUSION_PAIR(x, name) \
- AARCH64_FUSE_##name##_index,
+ AARCH64_FUSE_##name##_index,
/* Supported fusion operations. */
enum aarch64_fusion_pairs_index
{
{
bool frame_related_p = aarch64_emit_cfi_for_reg_p (regno);
machine_mode mode = aarch64_reg_save_mode (regno);
-
+
rtx reg = gen_rtx_REG (mode, regno);
poly_int64 offset = frame.reg_offset[regno];
if (frame_pointer_needed)
/* Implement TARGET_CASE_VALUES_THRESHOLD.
The expansion for a table switch is quite expensive due to the number
of instructions, the table lookup and hard to predict indirect jump.
- When optimizing for speed, and -O3 enabled, use the per-core tuning if
+ When optimizing for speed, and -O3 enabled, use the per-core tuning if
set, otherwise use tables for >= 11 cases as a tradeoff between size and
performance. When optimizing for size, use 8 for smallest codesize. */
set (OP[1] OP[3])
is valid. Naturally, output operand ordering is little-endian.
This is used by *movtf_internal and *movti_internal. */
-
+
void
alpha_split_tmode_pair (rtx operands[4], machine_mode mode,
bool fixup_overlap)
}
/* Expand an atomic fetch-and-operate pattern. CODE is the binary operation
- to perform. MEM is the memory on which to operate. VAL is the second
+ to perform. MEM is the memory on which to operate. VAL is the second
operand of the binary operator. BEFORE and AFTER are optional locations to
return the value of MEM either before of after the operation. SCRATCH is
a scratch register. */
label2 = gen_rtx_LABEL_REF (DImode, gen_label_rtx ());
emit_insn (gen_load_locked (DImode, scratch, mem));
-
+
width = GEN_INT (GET_MODE_BITSIZE (mode));
mask = GEN_INT (mode == QImode ? 0xff : 0xffff);
emit_insn (gen_extxl (dest, scratch, width, addr));
emit_label (XEXP (label, 0));
emit_insn (gen_load_locked (DImode, scratch, mem));
-
+
width = GEN_INT (GET_MODE_BITSIZE (mode));
mask = GEN_INT (mode == QImode ? 0xff : 0xffff);
emit_insn (gen_extxl (dest, scratch, width, addr));
gcc_unreachable ();
}
break;
-
+
default:
gcc_unreachable ();
}
case ROUND_SUFFIX_C:
return "c";
-
+
default:
gcc_unreachable ();
}
/* Detect whether integer registers or floating-point registers
are needed by the detected va_arg statements. See above for
how these values are computed. Note that the "escape" value
- is VA_LIST_MAX_FPR_SIZE, which is 255, which has both of
+ is VA_LIST_MAX_FPR_SIZE, which is 255, which has both of
these bits set. */
gcc_assert ((VA_LIST_MAX_FPR_SIZE & 3) == 3);
return NULL;
}
-/* Fold the builtin for the ZAPNOT instruction. This is essentially a
+/* Fold the builtin for the ZAPNOT instruction. This is essentially a
specialized form of an AND operation. Other byte manipulation instructions
are defined in terms of this instruction, so this is also used as a
subroutine for other builtins.
else
zap_op = op;
}
-
+
opint[1] = bytemask;
return alpha_fold_builtin_zapnot (zap_op, opint, zap_const);
}
HOST_WIDE_INT
alpha_vms_initial_elimination_offset (unsigned int from, unsigned int to)
-{
+{
/* The only possible attempts we ever expect are ARG or FRAME_PTR to
HARD_FRAME or STACK_PTR. We need the alpha_procedure_type to decide
on the proper computations and will need the register save area size
/* PT_NULL procedures have no frame of their own and we only allow
elimination to the stack pointer. This is the argument pointer and we
resolve the soft frame pointer to that as well. */
-
+
if (alpha_procedure_type == PT_NULL)
return 0;
^ ^ ^ ^
ARG_PTR FRAME_PTR HARD_FRAME_PTR STACK_PTR
-
+
PT_REGISTER procedures are similar in that they may have a frame of their
own. They have no regs-sa/pv/outgoing-args area.
We first compute offset to HARD_FRAME_PTR, then add what we need to get
to STACK_PTR if need be. */
-
+
{
HOST_WIDE_INT offset;
HOST_WIDE_INT pv_save_size = alpha_procedure_type == PT_STACK ? 8 : 0;
default:
gcc_unreachable ();
}
-
+
if (to == STACK_POINTER_REGNUM)
offset += ALPHA_ROUND (crtl->outgoing_args_size);
-
+
return offset;
}
}
suitably aligned. This is very processor-specific. */
/* There are a number of entries in alphaev4_insn_pipe and alphaev5_insn_pipe
that are marked "fake". These instructions do not exist on that target,
- but it is possible to see these insns with deranged combinations of
+ but it is possible to see these insns with deranged combinations of
command-line options, such as "-mtune=ev4 -mmax". Instead of aborting,
choose a result at random. */
after the insn. In case trap is the last insn in the function,
emit NOP to guarantee that PC remains inside function boundaries.
This workaround is needed to get reliable backtraces. */
-
+
rtx_insn *insn = prev_active_insn (get_last_insn ());
if (insn && NONJUMP_INSN_P (insn))
the section; 0 if the default should be used. */
static void
-vms_asm_named_section (const char *name, unsigned int flags,
+vms_asm_named_section (const char *name, unsigned int flags,
tree decl ATTRIBUTE_UNUSED)
{
fputc ('\n', asm_out_file);
/* Bit defines for amask instruction. */
#define AMASK_BWX 0x1 /* byte/word extension. */
-#define AMASK_FIX 0x2 /* sqrt and f <-> i conversions
+#define AMASK_FIX 0x2 /* sqrt and f <-> i conversions
extension. */
#define AMASK_CIX 0x4 /* count extension. */
#define AMASK_MVI 0x100 /* multimedia extension. */
#define ASM_SPEC "%{G*} %{relax:-relax} %{mcpu=*:-m%*}"
/* Do not output a .file directive at the beginning of the input file. */
-
+
#undef TARGET_ASM_FILE_START_FILE_DIRECTIVE
#define TARGET_ASM_FILE_START_FILE_DIRECTIVE false
#define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLEINSN) \
{ ASM_OUTPUT_ALIGN (FILE, 3); (*targetm.asm_out.internal_label) (FILE, PREFIX, NUM); }
-/* This says how to output assembler code to declare an
- uninitialized external linkage data object. */
+/* This says how to output assembler code to declare an
+ uninitialized external linkage data object. */
#define COMMON_ASM_OP "\t.comm\t"
{
SHIFT_MOVE, /* Register-to-register move. */
SHIFT_LOOP, /* Zero-overhead loop implementation. */
- SHIFT_INLINE, /* Mmultiple LSHIFTs and LSHIFT-PLUSs. */
+ SHIFT_INLINE, /* Mmultiple LSHIFTs and LSHIFT-PLUSs. */
SHIFT_AND_ROT, /* Bitwise AND, then ROTATERTs. */
SHIFT_SWAP, /* SWAP then multiple LSHIFTs/LSHIFT-PLUSs. */
SHIFT_AND_SWAP_ROT /* Bitwise AND, then SWAP, then ROTATERTs. */
/* Definitions of target machine for GNU compiler, for ARM with a.out
Copyright (C) 1995-2024 Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rearnsha@armltd.co.uk).
-
+
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it
#define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \
sprintf (STRING, "*%s%s%u", LOCAL_LABEL_PREFIX, PREFIX, (unsigned int)(NUM))
#endif
-
+
/* Output an element of a dispatch table. */
#define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \
do \
asm_fprintf (STREAM, "\t.word\t%LL%d\n", VALUE); \
} \
while (0)
-
+
/* Thumb-2 always uses addr_diff_elf so that the Table Branch instructions
can be used. For non-pic code where the offsets do not suitable for
fprintf (STREAM, "\t.space\t%d\n", (int) (NBYTES))
/* Align output to a power of two. Horrible /bin/as. */
-#ifndef ASM_OUTPUT_ALIGN
+#ifndef ASM_OUTPUT_ALIGN
#define ASM_OUTPUT_ALIGN(STREAM, POWER) \
do \
{ \
} \
while (0)
#endif
-
+
/* Output a local common block. /bin/as can't do this, so hack a
`.space' into the bss segment. Note that this is *bad* practice,
which is guaranteed NOT to work since it doesn't define STATIC
} \
while (0)
#endif
-
+
/* Output a zero-initialized block. */
#ifndef ASM_OUTPUT_ALIGNED_BSS
#define ASM_OUTPUT_ALIGNED_BSS(STREAM, DECL, NAME, SIZE, ALIGN) \
bool require_integer_immediate (unsigned int);
bool require_derived_scalar_type (unsigned int, type_class_index,
unsigned int = SAME_SIZE);
-
+
bool check_num_arguments (unsigned int);
bool check_gp_argument (unsigned int, unsigned int &, unsigned int &);
tree resolve_unary (type_class_index = SAME_TYPE_CLASS,
HOST_WIDE_INT srcoffset, dstoffset;
HOST_WIDE_INT src_autoinc, dst_autoinc;
rtx mem, addr;
-
+
gcc_assert (interleave_factor >= 1 && interleave_factor <= 4);
-
+
/* Use hard registers if we have aligned source or destination so we can use
load/store multiple with contiguous registers. */
if (dst_aligned || src_aligned)
src = copy_addr_to_reg (XEXP (srcbase, 0));
srcoffset = dstoffset = 0;
-
+
/* Calls to arm_gen_load_multiple and arm_gen_store_multiple update SRC/DST.
For copying the last bytes we want to subtract this offset again. */
src_autoinc = dst_autoinc = 0;
remaining -= block_size_bytes;
}
-
+
/* Copy any whole words left (note these aren't interleaved with any
subsequent halfword/byte load/stores in the interests of simplicity). */
-
+
words = remaining / UNITS_PER_WORD;
gcc_assert (words < interleave_factor);
-
+
if (src_aligned && words > 1)
{
emit_insn (arm_gen_load_multiple (regnos, words, src, TRUE, srcbase,
}
remaining -= words * UNITS_PER_WORD;
-
+
gcc_assert (remaining < 4);
-
+
/* Copy a halfword if necessary. */
-
+
if (remaining >= 2)
{
halfword_tmp = gen_reg_rtx (SImode);
remaining -= 2;
srcoffset += 2;
}
-
+
gcc_assert (remaining < 2);
-
+
/* Copy last byte. */
-
+
if ((remaining & 1) != 0)
{
byte_tmp = gen_reg_rtx (SImode);
remaining--;
srcoffset++;
}
-
+
/* Store last halfword if we haven't done so already. */
-
+
if (halfword_tmp)
{
addr = plus_constant (Pmode, dst, dstoffset - dst_autoinc);
emit_move_insn (mem, gen_lowpart (QImode, byte_tmp));
dstoffset++;
}
-
+
gcc_assert (remaining == 0 && srcoffset == dstoffset);
}
rtx *loop_mem)
{
*loop_reg = copy_addr_to_reg (XEXP (mem, 0));
-
+
/* Although the new mem does not refer to a known location,
it does keep up to LENGTH bytes of alignment. */
*loop_mem = change_address (mem, BLKmode, *loop_reg);
{
rtx src_reg, dest_reg, final_src, test;
HOST_WIDE_INT leftover;
-
+
leftover = length % bytes_per_iter;
length -= leftover;
-
+
/* Create registers and memory references for use within the loop. */
arm_adjust_block_mem (src, bytes_per_iter, &src_reg, &src);
arm_adjust_block_mem (dest, bytes_per_iter, &dest_reg, &dest);
-
+
/* Calculate the value that SRC_REG should have after the last iteration of
the loop. */
final_src = expand_simple_binop (Pmode, PLUS, src_reg, GEN_INT (length),
/* Emit the start of the loop. */
rtx_code_label *label = gen_label_rtx ();
emit_label (label);
-
+
/* Emit the loop body. */
arm_block_move_unaligned_straight (dest, src, bytes_per_iter,
interleave_factor);
/* Move on to the next block. */
emit_move_insn (src_reg, plus_constant (Pmode, src_reg, bytes_per_iter));
emit_move_insn (dest_reg, plus_constant (Pmode, dest_reg, bytes_per_iter));
-
+
/* Emit the loop condition. */
test = gen_rtx_NE (VOIDmode, src_reg, final_src);
emit_jump_insn (gen_cbranchsi4 (test, src_reg, final_src, label));
-
+
/* Mop up any left-over bytes. */
if (leftover)
arm_block_move_unaligned_straight (dest, src, leftover, interleave_factor);
arm_cpymemqi_unaligned (rtx *operands)
{
HOST_WIDE_INT length = INTVAL (operands[2]);
-
+
if (optimize_size)
{
bool src_aligned = MEM_ALIGN (operands[1]) >= BITS_PER_WORD;
resulting code can be smaller. */
unsigned int interleave_factor = (src_aligned || dst_aligned) ? 2 : 1;
HOST_WIDE_INT bytes_per_iter = (src_aligned || dst_aligned) ? 8 : 4;
-
+
if (length > 12)
arm_block_move_unaligned_loop (operands[0], operands[1], length,
interleave_factor, bytes_per_iter);
else
arm_block_move_unaligned_straight (operands[0], operands[1], length, 4);
}
-
+
return 1;
}
vfp3_const_double_for_fract_bits (rtx operand)
{
REAL_VALUE_TYPE r0;
-
+
if (!CONST_DOUBLE_P (operand))
return 0;
-
+
r0 = *CONST_DOUBLE_REAL_VALUE (operand);
if (exact_real_inverse (DFmode, &r0)
&& !REAL_VALUE_NEGATIVE (r0))
else
return false;
}
-
+
return true;
case ARM_POST_DEC:
return false;
return true;
-
+
default:
return false;
-
+
}
return false;
Additionally, the default expansion code is not available or suitable
for post-reload insn splits (this can occur when the register allocator
chooses not to do a shift in NEON).
-
+
This function is used in both initial expand and post-reload splits, and
handles all kinds of 64-bit shifts.
/* This is a temporary fix for PR60655. Ideally we need
to handle most of these cases in the generic part but
- currently we reject minus (..) (sym_ref). We try to
+ currently we reject minus (..) (sym_ref). We try to
ameliorate the case with minus (sym_ref1) (sym_ref2)
where they are in the same section. */
return build_target_option_node (opts, opts_set);
}
-static void
+static void
add_attribute (const char * mode, tree *attributes)
{
size_t len = strlen (mode);
/* Nested definitions must inherit mode. */
if (current_function_decl)
{
- mode = TARGET_THUMB ? "thumb" : "arm";
+ mode = TARGET_THUMB ? "thumb" : "arm";
add_attribute (mode, attributes);
return;
}
but prevents the compiler from extending the lifetime of these
registers. */
#define TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P \
- arm_small_register_classes_for_mode_p
+ arm_small_register_classes_for_mode_p
/* Must leave BASE_REGS reloads alone */
#define THUMB_SECONDARY_INPUT_RELOAD_CLASS(CLASS, MODE, X) \
/* Return the maximum number of consecutive registers
needed to represent mode MODE in a register of class CLASS.
- ARM regs are UNITS_PER_WORD bits.
+ ARM regs are UNITS_PER_WORD bits.
FIXME: Is this true for iWMMX? */
#define CLASS_MAX_NREGS(CLASS, MODE) \
(CLASS == VPR_REG) \
#define ARM_Q_BIT_READ (arm_q_bit_access ())
#define ARM_GE_BITS_READ (arm_ge_bits_access ())
-/* As in the machine_function, a global set of call-via labels, for code
+/* As in the machine_function, a global set of call-via labels, for code
that is in text_section. */
extern GTY(()) rtx thumb_call_via_label[14];
/* The number of potential ways of assigning to a co-processor. */
#define ARM_NUM_COPROC_SLOTS 1
-/* Enumeration of procedure calling standard variants. We don't really
+/* Enumeration of procedure calling standard variants. We don't really
support all of these yet. */
enum arm_pcs
{
/* Configuration file for ARM BPABI targets.
Copyright (C) 2004-2024 Free Software Foundation, Inc.
- Contributed by CodeSourcery, LLC
+ Contributed by CodeSourcery, LLC
This file is part of GCC.
Copyright (C) 1995-2024 Free Software Foundation, Inc.
Contributed by Philip Blundell <philb@gnu.org> and
Catherine Moore <clm@cygnus.com>
-
+
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it
#ifndef LINK_SPEC
#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X"
#endif
-
+
/* Run-time Target Specification. */
#ifndef TARGET_DEFAULT
#define TARGET_DEFAULT (MASK_APCS_FRAME)
/* Configuration file for ARM GNU/Linux EABI targets.
Copyright (C) 2004-2024 Free Software Foundation, Inc.
- Contributed by CodeSourcery, LLC
+ Contributed by CodeSourcery, LLC
This file is part of GCC.
/* Configuration file for Symbian OS on ARM processors.
Copyright (C) 2004-2024 Free Software Foundation, Inc.
- Contributed by CodeSourcery, LLC
+ Contributed by CodeSourcery, LLC
This file is part of GCC.
Make all symbols hidden by default. Symbian OS expects that all
exported symbols will be explicitly marked with
- "__declspec(dllexport)".
+ "__declspec(dllexport)".
Enumeration types use 4 bytes, even if the enumerals are small,
unless explicitly overridden.
#undef SUBTARGET_ASM_FLOAT_SPEC
#define SUBTARGET_ASM_FLOAT_SPEC \
"%{!mfpu=*:-mfpu=vfp} %{!mcpu=*:%{!march=*:-march=armv5t}}"
-
+
/* Define the __symbian__ macro. */
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
/* The libgcc udivmod functions may throw exceptions. If newlib is
configured to support long longs in I/O, then printf will depend on
udivmoddi4, which will depend on the exception unwind routines,
- which will depend on abort, which is defined in libc. */
+ which will depend on abort, which is defined in libc. */
#undef LINK_GCC_C_SEQUENCE_SPEC
#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %{!nolibc:%L} --end-group"
/* Definitions of target machine for GCC,
- for ARM with targeting the VXWorks run time environment.
+ for ARM with targeting the VXWorks run time environment.
Copyright (C) 1999-2024 Free Software Foundation, Inc.
Contributed by: Mike Stump <mrs@wrs.com>
Brought up to date by CodeSourcery, LLC.
-
+
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
-
+
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
-
+
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
-
+
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
-
+
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#define RETURN_ADDR_RTX(count, tem) avr_return_addr_rtx (count, tem)
-/* Don't use Push rounding. expr.cc: emit_single_push_insn is broken
+/* Don't use Push rounding. expr.cc: emit_single_push_insn is broken
for POST_DEC targets (PR27386). */
/*#define PUSH_ROUNDING(NPUSHED) (NPUSHED)*/
/* Set MOVE_RATIO to 3 to allow memory moves upto 4 bytes to happen
by pieces when optimizing for speed, like it did when MOVE_MAX_PIECES
- was 4. When optimizing for size, allow memory moves upto 2 bytes.
+ was 4. When optimizing for size, allow memory moves upto 2 bytes.
Also see avr_use_by_pieces_infrastructure_p. */
#define MOVE_RATIO(speed) ((speed) ? 3 : 2)
-1 when "signal" attribute(s) with arguments are present but none
without argument. */
int is_signal;
-
+
/* 'true' - if current function is a non-blocking interrupt service
routine as specified by the "isr_noblock" attribute. */
int is_noblock;
- /* 'true' - if current function is a 'task' function
+ /* 'true' - if current function is a 'task' function
as specified by the "OS_task" attribute. */
int is_OS_task;
- /* 'true' - if current function is a 'main' function
+ /* 'true' - if current function is a 'main' function
as specified by the "OS_main" attribute. */
int is_OS_main;
-
+
/* Current function stack size. */
int stack_usage;
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
-
+
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
-
+
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
-
+
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
/* The Embedded-C paper specifies results only for rounding points
0 < RP < FBIT
-
+
As an extension, the following functions work as expected
with rounding points
-IBIT < RP < FBIT
-
+
For example, rounding an accum with a rounding point of -1 will
result in an even integer value. */
extern char *bfin_asm_short (void);
extern int log2constp (unsigned HOST_WIDE_INT);
-extern void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx);
+extern void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx);
extern HOST_WIDE_INT bfin_initial_elimination_offset (int, int);
extern int effective_address_32bit_p (rtx, machine_mode);
fputc ('\n',stream);
}
-static void
-output_file_start (void)
+static void
+output_file_start (void)
{
FILE *file = asm_out_file;
int i;
fprintf (file, ".file \"%s\";\n", LOCATION_FILE (input_location));
-
+
for (i = 0; arg_regs[i] >= 0; i++)
;
max_arg_registers = i; /* how many arg reg used */
}
}
for (i = REG_P7 + 1; i < REG_CC; i++)
- if (saveall
+ if (saveall
|| (is_inthandler
&& (df_regs_ever_live_p (i)
|| (!leaf_function_p () && call_used_or_fixed_reg_p (i)))))
it.
Normally, this macro will push all remaining incoming registers on the
- stack and set PRETEND_SIZE to the length of the registers pushed.
+ stack and set PRETEND_SIZE to the length of the registers pushed.
Blackfin specific :
- VDSP C compiler manual (our ABI) says that a variable args function
be accessed via the stack pointer) in functions that seem suitable. */
static bool
-bfin_frame_pointer_required (void)
+bfin_frame_pointer_required (void)
{
e_funkind fkind = funkind (TREE_TYPE (current_function_decl));
if (stack_frame_needed_p ())
emit_insn (gen_unlink ());
- else
+ else
{
rtx postinc = gen_rtx_MEM (Pmode, gen_rtx_POST_INC (Pmode, spreg));
emit_insn (gen_movsi_low (p5reg, p5reg, chipid));
emit_insn (gen_dummy_load (p5reg, bfin_cc_rtx));
}
-
+
if (lookup_attribute ("nesting", attrs))
{
rtx srcreg = gen_rtx_REG (Pmode, ret_regs[fkind]);
pic reg, since the caller always passes a usable one. */
if (local_info_node && local_info_node->local)
return pic_offset_table_rtx;
-
+
if (OPTION_SET_P (bfin_library_id))
addr = plus_constant (Pmode, pic_offset_table_rtx,
-4 - bfin_library_id * 4);
32-bit instruction. */
int
-effective_address_32bit_p (rtx op, machine_mode mode)
+effective_address_32bit_p (rtx op, machine_mode mode)
{
HOST_WIDE_INT offset;
case PRE_DEC:
fprintf (file, "--");
- output_address (VOIDmode, XEXP (x, 0));
+ output_address (VOIDmode, XEXP (x, 0));
break;
case POST_INC:
output_address (VOIDmode, XEXP (x, 0));
output_operand_lossage ("invalid %%j value");
}
break;
-
+
case 'J': /* reverse logic */
switch (GET_CODE(x))
{
else
output_operand_lossage ("invalid operand for code '%c'", code);
}
- else
+ else
fprintf (file, "%s", reg_names[REGNO (x)]);
break;
/* Initialize a variable CUM of type CUMULATIVE_ARGS
for a call to a function whose data type is FNTYPE.
- For a library call, FNTYPE is 0.
+ For a library call, FNTYPE is 0.
VDSP C Compiler manual, our ABI says that
first 3 words of arguments will use R0, R1 and R2.
*/
{
int bytes = arg.promoted_size_in_bytes ();
int bytes_left = get_cumulative_args (cum)->nregs * UNITS_PER_WORD;
-
+
if (bytes == -1)
return 0;
/* Return true when register may be used to pass function parameters. */
-bool
+bool
function_arg_regno_p (int n)
{
int i;
/* Recognize an RTL expression that is a valid memory address for an
instruction. The MODE argument is the machine mode for the MEM expression
- that wants to use this address.
+ that wants to use this address.
Blackfin addressing modes are as follows:
B [ Preg + uimm15 ]
W [ Preg + uimm16m2 ]
- [ Preg + uimm17m4 ]
+ [ Preg + uimm17m4 ]
[preg++]
[preg--]
else
*total = cost2;
return true;
-
- case ASHIFT:
+
+ case ASHIFT:
case ASHIFTRT:
case LSHIFTRT:
if (mode == DImode)
*total += rtx_cost (op0, mode, code, 0, speed);
return true;
-
+
case IOR:
case AND:
case XOR:
{
char buf[80];
int ok;
-
+
/* Validate the insn again, and compute first_[dp]reg_to_save. */
ok = analyze_push_multiple_operation (PATTERN (insn));
gcc_assert (ok);
-
+
if (first_dreg_to_save == 8)
sprintf (buf, "[--sp] = ( p5:%d );\n", first_preg_to_save);
else if (first_preg_to_save == 6)
{
char buf[80];
int ok;
-
+
/* Validate the insn again, and compute first_[dp]reg_to_save. */
ok = analyze_pop_multiple_operation (PATTERN (insn));
gcc_assert (ok);
hwloop_fail (hwloop_info loop)
{
rtx insn = loop->loop_end;
-
+
if (DPREG_P (loop->iter_reg))
{
/* If loop->iter_reg is a DREG or PREG, we can split it here
}
else
{
- splitting_loops = 1;
+ splitting_loops = 1;
try_split (PATTERN (insn), safe_as_a <rtx_insn *> (insn), 1);
splitting_loops = 0;
}
if (BARRIER_P (insn))
return;
-
+
if (NOTE_P (insn) || LABEL_P (insn))
continue;
pat = XEXP (pat, 0);
gcc_assert (GET_CODE (pat) == MEM);
pat = XEXP (pat, 0);
-
+
return REG_P (pat);
}
int delay_needed = 0;
next = find_next_insn_start (insn);
-
+
if (NOTE_P (insn) || BARRIER_P (insn))
continue;
if (JUMP_TABLE_DATA_P (insn))
pat = PATTERN (insn);
if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER)
continue;
-
+
if (GET_CODE (pat) == ASM_INPUT || asm_noperands (pat) >= 0)
{
np_check_regno = -1;
if (GET_CODE (PATTERN (next)) == UNSPEC_VOLATILE
&& get_attr_type (next) == TYPE_STALL)
continue;
- emit_insn_before (gen_stall (GEN_INT (1)), next);
+ emit_insn_before (gen_stall (GEN_INT (1)), next);
}
}
}
if (kind1 != kind2)
return 0;
-
+
/* Check for mismatched modifiers */
if (!lookup_attribute ("nesting", TYPE_ATTRIBUTES (type1))
!= !lookup_attribute ("nesting", TYPE_ATTRIBUTES (type2)))
struct attribute_spec.handler. */
static tree
-bfin_handle_longcall_attribute (tree *node, tree name,
- tree args ATTRIBUTE_UNUSED,
- int flags ATTRIBUTE_UNUSED,
+bfin_handle_longcall_attribute (tree *node, tree name,
+ tree args ATTRIBUTE_UNUSED,
+ int flags ATTRIBUTE_UNUSED,
bool *no_add_attrs)
{
if (TREE_CODE (*node) != FUNCTION_TYPE
= build_function_type_list (integer_type_node,
build_pointer_type (integer_type_node),
NULL_TREE);
-
+
/* Add the remaining MMX insns with somewhat more complicated types. */
def_builtin ("__builtin_bfin_csync", void_ftype_void, BFIN_BUILTIN_CSYNC);
def_builtin ("__builtin_bfin_ssync", void_ftype_void, BFIN_BUILTIN_SSYNC);
#define TARGET_EXPAND_BUILTIN bfin_expand_builtin
#undef TARGET_ASM_GLOBALIZE_LABEL
-#define TARGET_ASM_GLOBALIZE_LABEL bfin_globalize_label
+#define TARGET_ASM_GLOBALIZE_LABEL bfin_globalize_label
#undef TARGET_ASM_FILE_START
#define TARGET_ASM_FILE_START output_file_start
/* Define this if the above stack space is to be considered part of the
* space allocated by the caller. */
#define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 1
-
+
/* Define this if the maximum size of all the outgoing args is to be
accumulated and pushed during the prologue. The amount can be
- found in the variable crtl->outgoing_args_size. */
+ found in the variable crtl->outgoing_args_size. */
#define ACCUMULATE_OUTGOING_ARGS 1
/*#define DATA_ALIGNMENT(TYPE, BASIC-ALIGN) for arrays.. */
#define DEFAULT_SIGNED_CHAR 1
/* FLOAT_TYPE_SIZE get poisoned, so add BFIN_ prefix. */
#define BFIN_FLOAT_TYPE_SIZE BITS_PER_WORD
-#define SHORT_TYPE_SIZE 16
+#define SHORT_TYPE_SIZE 16
#define CHAR_TYPE_SIZE 8
#define INT_TYPE_SIZE 32
#define LONG_TYPE_SIZE 32
-#define LONG_LONG_TYPE_SIZE 64
+#define LONG_LONG_TYPE_SIZE 64
/* Note: Fix this to depend on target switch. -- lev */
#define JUMP_TABLES_IN_TEXT_SECTION flag_pic
/* Define if operations between registers always perform the operation
- on the full register even if a narrower mode is specified.
+ on the full register even if a narrower mode is specified.
#define WORD_REGISTER_OPERATIONS 1
*/
#define SET_ASM_OP ".set "
/* Debugger register number for a given compiler register number */
-#define DEBUGGER_REGNO(REGNO) (REGNO)
+#define DEBUGGER_REGNO(REGNO) (REGNO)
#define SIZE_ASM_OP "\t.size\t"
tree v2si_ftype_v2hi_v2hi
= build_function_type_list (V2SI_type_node, V2HI_type_node,
V2HI_type_node, NULL_TREE);
-
+
def_builtin ("__builtin_c6x_sadd", int_ftype_int_int,
C6X_BUILTIN_SADD);
def_builtin ("__builtin_c6x_ssub", int_ftype_int_int,
/* Queue an .ident string in the queue of top-level asm statements.
If the front-end is done, we must be being called from toplev.cc.
In that case, do nothing. */
-void
+void
cris_asm_output_ident (const char *string)
{
if (symtab->state != PARSING)
if (for_return == 1)
return mode;
return CRIS_PROMOTED_MODE (mode, *punsignedp, type);
-}
+}
/* Atomic types require alignment to be at least their "natural" size. */
/* Since we do not (at 4.6) support ObjC gc for the NeXT runtime, the
following will cause a syntax error if one tries to compile gc attributed
- items. However, without this, NeXT system headers cannot be parsed
+ items. However, without this, NeXT system headers cannot be parsed
properly (on systems >= darwin 9). */
if (flag_objc_gc)
{
return false;
tn = TYPE_NAME (strp);
- if (tn)
+ if (tn)
tn = DECL_NAME (tn);
- return (tn
+ return (tn
&& IDENTIFIER_POINTER (tn)
&& startswith (IDENTIFIER_POINTER (tn), "CFStringRef"));
}
/* At present the behavior of this is undefined and it does nothing. */
static void
-darwin_check_cfstring_format_arg (tree ARG_UNUSED (format_arg),
+darwin_check_cfstring_format_arg (tree ARG_UNUSED (format_arg),
tree ARG_UNUSED (args_list))
{
}
/* The extra format types we recognize. */
EXPORTED_CONST format_kind_info darwin_additional_format_types[] = {
- { "CFString", NULL, NULL, NULL, NULL,
- NULL, NULL,
+ { "CFString", NULL, NULL, NULL, NULL,
+ NULL, NULL,
FMT_FLAG_ARG_CONVERT|FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL, 0, 0, 0, 0, 0, 0,
NULL, NULL
}
/* When running on a Darwin system and using that system's headers and
libraries, default the -mmacosx-version-min flag to be the version
- of the system on which the compiler is running.
-
+ of the system on which the compiler is running.
+
When building cross or native cross compilers, default to the OSX
version of the target (as provided by the most specific target header
included in tm.h). This may be overidden by setting the flag explicitly
case OPT_arch:
/* Support provision of a single -arch xxxx flag as a means of
specifying the sub-target/multi-lib. Translate this into -m32/64
- as appropriate. */
+ as appropriate. */
if (!strcmp ((*decoded_options)[i].arg, "i386"))
seenX86 = true;
else if (!strcmp ((*decoded_options)[i].arg, "x86_64"))
* sizeof (struct cl_decoded_option)));
}
--i;
- --*decoded_options_count;
+ --*decoded_options_count;
break;
case OPT_m32:
" (%<-m32%> ignored)");
if (! seenM64) /* Add -m64 if the User didn't. */
appendM64 = true;
- }
+ }
#elif DARWIN_PPC
if (seenX86 || seenX86_64)
warning (0, "this compiler does not support x86"
extern int machopic_reloc_rw_mask (void);
extern section *machopic_select_section (tree, int, unsigned HOST_WIDE_INT);
-extern section *darwin_function_section (tree, enum node_frequency, bool, bool);
+extern section *darwin_function_section (tree, enum node_frequency, bool, bool);
extern section *darwin_tm_clone_table_section (void);
extern void darwin_function_switched_text_sections (FILE *, tree, bool);
extern void darwin_output_aligned_bss (FILE *, tree, const char *,
unsigned HOST_WIDE_INT, unsigned int);
-extern void darwin_asm_output_aligned_decl_local (FILE *, tree, const char *,
- unsigned HOST_WIDE_INT,
+extern void darwin_asm_output_aligned_decl_local (FILE *, tree, const char *,
+ unsigned HOST_WIDE_INT,
unsigned int);
extern void darwin_asm_output_aligned_decl_common (FILE *, tree, const char *,
- unsigned HOST_WIDE_INT,
+ unsigned HOST_WIDE_INT,
unsigned int);
extern bool darwin_binds_local_p (const_tree);
#define TARGET_ASM_DECLARE_CONSTANT_NAME darwin_asm_declare_constant_name
/* Wrap new method names in quotes so the assembler doesn't gag.
- Make Objective-C internal symbols local and in doing this, we need
+ Make Objective-C internal symbols local and in doing this, we need
to accommodate the name mangling done by c++ on file scope locals. */
int darwin_label_is_anonymous_local_objc_name (const char *name);
#undef GTM_SELF_SPECS
#define GTM_SELF_SPECS ""
-/* Darwin disables section anchors by default.
+/* Darwin disables section anchors by default.
They should be enabled per arch where support exists in that arch. */
#define TARGET_ASM_OUTPUT_ANCHOR NULL
#define DARWIN_SECTION_ANCHORS 0
#undef STACK_CHECK_STATIC_BUILTIN
#define STACK_CHECK_STATIC_BUILTIN 1
-/* When building cross-compilers (and native crosses) we shall default to
+/* When building cross-compilers (and native crosses) we shall default to
providing an osx-version-min of this unless overridden by the User.
10.5 is the only version that fully supports all our archs so that's the
fall-back default. */
#undef USER_LABEL_PREFIX
#define USER_LABEL_PREFIX ""
-/* The biggest alignment supported by ELF in bits. 32-bit ELF
- supports section alignment up to (0x80000000 * 8), while
- 64-bit ELF supports (0x8000000000000000 * 8). If this macro
- is not defined, the default is the largest alignment supported
+/* The biggest alignment supported by ELF in bits. 32-bit ELF
+ supports section alignment up to (0x80000000 * 8), while
+ 64-bit ELF supports (0x8000000000000000 * 8). If this macro
+ is not defined, the default is the largest alignment supported
by 32-bit ELF and representable on a 32-bit host. Use this
macro to limit the alignment which can be specified using
the `__attribute__ ((aligned (N)))' construct. */
return false;
}
-
+
case SET:
{
rtx src = SET_SRC (x);
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-/*{{{ Includes */
+/*{{{ Includes */
#define IN_TARGET_CODE 1
#include "target-def.h"
/*}}}*/
-/*{{{ Function Prologues & Epilogues */
+/*{{{ Function Prologues & Epilogues */
/* The FR30 stack looks like this:
Before call After call
FP ->| | | |
- +-----------------------+ +-----------------------+ high
+ +-----------------------+ +-----------------------+ high
| | | | memory
| local variables, | | local variables, |
| reg save area, etc. | | reg save area, etc. |
SP ->| do not fit in regs | | |
+-----------------------+ +-----------------------+
| args that used to be | \
- | in regs; only created | | pretend_size
- AP-> | for vararg funcs | /
- +-----------------------+
- | | \
+ | in regs; only created | | pretend_size
+ AP-> | for vararg funcs | /
+ +-----------------------+
+ | | \
| register save area | |
| | |
+-----------------------+ | reg_size
- | return address | |
+ | return address | |
+-----------------------+ |
FP ->| previous frame ptr | /
- +-----------------------+
- | | \
- | local variables | | var_size
- | | /
- +-----------------------+
- | | \
+ +-----------------------+
+ | | \
+ | local variables | | var_size
+ | | /
+ +-----------------------+
+ | | \
low | room for args to | |
- memory | other funcs called | | args_size
+ memory | other funcs called | | args_size
| from this one | |
- SP ->| | /
- +-----------------------+
-
+ SP ->| | /
+ +-----------------------+
+
Note, AP is a fake hard register. It will be eliminated in favor of
SP or FP as appropriate.
- Note, Some or all of the stack sections above may be omitted if they
+ Note, Some or all of the stack sections above may be omitted if they
are not needed. */
/* Structure to be filled in by fr30_compute_frame_size() with register
}
/* Returns the number of bytes offset between FROM_REG and TO_REG
- for the current function. As a side effect it fills in the
+ for the current function. As a side effect it fills in the
current_frame_info structure, if the data is available. */
unsigned int
fr30_compute_frame_size (int from_reg, int to_reg)
/* Calculate the required distance. */
return_value = 0;
-
+
if (to_reg == STACK_POINTER_REGNUM)
return_value += args_size + var_size;
-
+
if (from_reg == ARG_POINTER_REGNUM)
return_value += reg_size;
if (current_frame_info.pretend_size)
{
int regs_to_save = current_frame_info.pretend_size / UNITS_PER_WORD;
-
+
/* Push argument registers into the pretend arg area. */
for (regno = FIRST_ARG_REGNUM + FR30_NUM_ARG_REGS; regno --, regs_to_save --;)
{
/* Save return address if necessary. */
if (current_frame_info.save_rp)
{
- insn = emit_insn (gen_movsi_push (gen_rtx_REG (Pmode,
+ insn = emit_insn (gen_movsi_push (gen_rtx_REG (Pmode,
RETURN_POINTER_REGNUM)));
RTX_FRAME_RELATED_P (insn) = 1;
}
{
int enter_size = current_frame_info.frame_size + UNITS_PER_WORD;
rtx pattern;
-
+
insn = emit_insn (gen_enter_func (GEN_INT (enter_size)));
RTX_FRAME_RELATED_P (insn) = 1;
-
+
pattern = PATTERN (insn);
-
+
/* Also mark all 3 subexpressions as RTX_FRAME_RELATED_P. */
if (GET_CODE (pattern) == PARALLEL)
{
for (x = XVECLEN (pattern, 0); x--;)
{
rtx part = XVECEXP (pattern, 0, x);
-
+
/* One of the insns in the ENTER pattern updates the
frame pointer. If we do not actually need the frame
pointer in this function then this is a side effect
/* Perform the inversion operations of the prologue. */
gcc_assert (current_frame_info.initialised);
-
+
/* Pop local variables and arguments off the stack.
If frame_pointer_needed is TRUE then the frame pointer register
has actually been used as a frame pointer, and we can recover
emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, tmp));
}
}
-
+
if (current_frame_info.save_fp)
emit_insn (gen_movsi_pop (frame_pointer_rtx));
-
+
/* Pop all the registers that were pushed. */
if (current_frame_info.save_rp)
emit_insn (gen_movsi_pop (gen_rtx_REG (Pmode, RETURN_POINTER_REGNUM)));
-
+
for (regno = 0; regno < STACK_POINTER_REGNUM; regno ++)
if (current_frame_info.gmask & (1 << regno))
emit_insn (gen_movsi_pop (gen_rtx_REG (Pmode, regno)));
-
+
if (current_frame_info.pretend_size)
emit_insn (gen_add_to_stack (GEN_INT (current_frame_info.pretend_size)));
}
/*}}}*/
-/*{{{ Printing operands */
+/*{{{ Printing operands */
/* Print a memory address as an operand to reference that memory location. */
case SYMBOL_REF:
output_addr_const (stream, address);
break;
-
+
default:
fprintf (stderr, "code = %x\n", GET_CODE (address));
debug_rtx (address);
fr30_print_operand (FILE *file, rtx x, int code)
{
rtx x0;
-
+
switch (code)
{
case '#':
if (dbr_sequence_length () != 0)
fputs (":D", file);
return;
-
+
case 'p':
/* Compute the register name of the second register in a hi/lo
register pair. */
else
fprintf (file, "r%d", REGNO (x) + 1);
return;
-
+
case 'b':
/* Convert GCC's comparison operators into FR30 comparison codes. */
switch (GET_CODE (x))
break;
}
return;
-
+
case 'B':
/* Convert GCC's comparison operators into the complimentary FR30
comparison codes. */
else
{
HOST_WIDE_INT val;
-
+
val = INTVAL (x);
val &= 0xff;
fprintf (file, HOST_WIDE_INT_PRINT_DEC, val);
}
return;
-
+
case 'x':
if (GET_CODE (x) != CONST_INT
|| INTVAL (x) < 16
fputs (str, file);
}
return;
-
+
case 0:
/* Handled below. */
break;
-
+
default:
fprintf (stderr, "unknown code = %x\n", code);
output_operand_lossage ("fr30_print_operand: unknown code");
case MEM:
x0 = XEXP (x,0);
-
+
switch (GET_CODE (x0))
{
case REG:
fprintf (file, "@(r15, #" HOST_WIDE_INT_PRINT_DEC ")", val);
}
break;
-
+
case SYMBOL_REF:
output_address (VOIDmode, x0);
break;
-
+
default:
fprintf (stderr, "bad MEM code = %x\n", GET_CODE (x0));
debug_rtx (x);
break;
}
break;
-
+
case CONST_DOUBLE :
/* We handle SFmode constants here as output_addr_const doesn't. */
if (GET_MODE (x) == SFmode)
return (regno == RETURN_VALUE_REGNUM);
}
-/*{{{ Function arguments */
+/*{{{ Function arguments */
/* Return true if we should pass an argument on the stack rather than
in registers. */
register, partial stack space. */
if (*cum + fr30_num_arg_regs (arg) <= FR30_NUM_ARG_REGS)
return 0;
-
+
return (FR30_NUM_ARG_REGS - *cum) * UNITS_PER_WORD;
}
}
/*}}}*/
-/*{{{ Operand predicates */
+/*{{{ Operand predicates */
#ifndef Mmode
#define Mmode machine_mode
if (descending)
{
unsigned int prev_regno = 0;
-
+
while (num_operands --)
{
if (GET_CODE (operands [num_operands]) != REG)
return 0;
-
+
if (REGNO (operands [num_operands]) < prev_regno)
return 0;
-
+
prev_regno = REGNO (operands [num_operands]);
}
}
else
{
unsigned int prev_regno = CONDITION_CODE_REGNUM;
-
+
while (num_operands --)
{
if (GET_CODE (operands [num_operands]) != REG)
return 0;
-
+
if (REGNO (operands [num_operands]) > prev_regno)
return 0;
-
+
prev_regno = REGNO (operands [num_operands]);
}
}
if (src_code == REG)
{
int reverse = (REGNO (dest) == REGNO (src) + 1);
-
+
/* We normally copy the low-numbered register first. However, if
the first register of operand 0 is the same as the second register
of operand 1, we must copy in the opposite order. */
emit_insn (gen_rtx_SET (operand_subword (dest, reverse, TRUE, mode),
operand_subword (src, reverse, TRUE, mode)));
-
+
emit_insn
(gen_rtx_SET (operand_subword (dest, !reverse, TRUE, mode),
operand_subword (src, !reverse, TRUE, mode)));
rtx dest0 = operand_subword (dest, 0, TRUE, mode);
rtx dest1 = operand_subword (dest, 1, TRUE, mode);
rtx new_mem;
-
+
gcc_assert (GET_CODE (addr) == REG);
-
+
/* Copy the address before clobbering it. See PR 34174. */
emit_insn (gen_rtx_SET (dest1, addr));
emit_insn (gen_rtx_SET (dest0, adjust_address (src, SImode, 0)));
new_mem = gen_rtx_MEM (SImode, dest1);
MEM_COPY_ATTRIBUTES (new_mem, src);
-
+
emit_insn (gen_rtx_SET (dest1, new_mem));
}
else if (src_code == CONST_INT || src_code == CONST_DOUBLE)
split_double (src, &words[0], &words[1]);
emit_insn (gen_rtx_SET (operand_subword (dest, 0, TRUE, mode),
words[0]));
-
+
emit_insn (gen_rtx_SET (operand_subword (dest, 1, TRUE, mode),
words[1]));
}
target are 32 bit aligned within the trampoline. That allows us to
initialize those locations with simple SImode stores. The alternative
would be to use HImode stores. */
-
+
static void
fr30_asm_trampoline_template (FILE *f)
{
-/*{{{ Comment. */
+/*{{{ Comment. */
-/* Definitions of FR30 target.
+/* Definitions of FR30 target.
Copyright (C) 1998-2024 Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
<http://www.gnu.org/licenses/>. */
/*}}}*/ \f
-/*{{{ Run-time target specifications. */
+/*{{{ Run-time target specifications. */
#undef ASM_SPEC
#define ASM_SPEC ""
%{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic}"
/*}}}*/ \f
-/*{{{ Storage Layout. */
+/*{{{ Storage Layout. */
#define BITS_BIG_ENDIAN 1
#define PCC_BITFIELD_TYPE_MATTERS 1
/*}}}*/ \f
-/*{{{ Layout of Source Language Data Types. */
+/*{{{ Layout of Source Language Data Types. */
#define SHORT_TYPE_SIZE 16
#define INT_TYPE_SIZE 32
#define WCHAR_TYPE_SIZE BITS_PER_WORD
/*}}}*/ \f
-/*{{{ REGISTER BASICS. */
+/*{{{ REGISTER BASICS. */
/* Number of hardware registers known to the compiler. They receive numbers 0
through `FIRST_PSEUDO_REGISTER-1'; thus, the first pseudo register's number
/* A call-used register that can be used during the function prologue. */
#define PROLOGUE_TMP_REGNUM COMPILER_SCRATCH_REGISTER
-
+
/* Register numbers used for passing a function's static chain pointer. If
register windows are used, the register number as seen by the called
function is `STATIC_CHAIN_INCOMING_REGNUM', while the register number as
determines which register this is. On other machines, you can choose any
register you wish for this purpose. */
#define FRAME_POINTER_REGNUM 14
-
+
/* The register number of the stack pointer register, which must also be a
fixed register according to `FIXED_REGISTERS'. On most machines, the
hardware determines which register this is. */
}
/*}}}*/ \f
-/*{{{ Register Classes. */
+/*{{{ Register Classes. */
/* An enumeral type that must be defined with all the register class names as
enumeral values. `NO_REGS' must be first. `ALL_REGS' must be the last
#define CLASS_MAX_NREGS(CLASS, MODE) targetm.hard_regno_nregs (0, MODE)
/*}}}*/ \f
-/*{{{ Basic Stack Layout. */
+/*{{{ Basic Stack Layout. */
/* Define this macro if pushing a word onto the stack moves the stack pointer
to a smaller address. */
#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (SImode, RETURN_POINTER_REGNUM)
/*}}}*/ \f
-/*{{{ Register That Address the Stack Frame. */
+/*{{{ Register That Address the Stack Frame. */
/* The register number of the arg pointer register, which is used to access the
function's argument list. On some machines, this is the same as the frame
#define ARG_POINTER_REGNUM 20
/*}}}*/ \f
-/*{{{ Eliminating the Frame Pointer and the Arg Pointer. */
+/*{{{ Eliminating the Frame Pointer and the Arg Pointer. */
/* If defined, this macro specifies a table of register pairs used to eliminate
unneeded registers that point into the stack frame. If it is not defined,
(OFFSET) = fr30_compute_frame_size (FROM, TO)
/*}}}*/ \f
-/*{{{ Passing Function Arguments on the Stack. */
+/*{{{ Passing Function Arguments on the Stack. */
/* If defined, the maximum amount of space required for outgoing arguments will
be computed and placed into the variable
#define ACCUMULATE_OUTGOING_ARGS 1
/*}}}*/ \f
-/*{{{ Function Arguments in Registers. */
+/*{{{ Function Arguments in Registers. */
/* The number of register assigned to holding function arguments. */
-
+
#define FR30_NUM_ARG_REGS 4
/* A C type for declaring a variable that is used as the first argument of
((REGNO) >= FIRST_ARG_REGNUM && ((REGNO) < FIRST_ARG_REGNUM + FR30_NUM_ARG_REGS))
/*}}}*/ \f
-/*{{{ How Large Values are Returned. */
+/*{{{ How Large Values are Returned. */
/* Define this macro to be 1 if all structure and union return values must be
in memory. Since this results in slower code, this should be defined only
#define DEFAULT_PCC_STRUCT_RETURN 1
/*}}}*/ \f
-/*{{{ Generating Code for Profiling. */
+/*{{{ Generating Code for Profiling. */
/* A C statement or compound statement to output to FILE some assembler code to
call the profiling subroutine `mcount'. Before calling, the assembler code
}
/*}}}*/ \f
-/*{{{ Trampolines for Nested Functions. */
+/*{{{ Trampolines for Nested Functions. */
/* A C expression for the size in bytes of the trampoline, as an integer. */
#define TRAMPOLINE_SIZE 18
#define TRAMPOLINE_ALIGNMENT 32
/*}}}*/ \f
-/*{{{ Addressing Modes. */
+/*{{{ Addressing Modes. */
/* A number, the maximum number of registers that can appear in a valid memory
address. Note that it is up to you to specify a value equal to the maximum
/* On the FR30 we only have one real addressing mode - an address in a
register. There are three special cases however:
-
+
* indexed addressing using small positive offsets from the stack pointer
-
+
* indexed addressing using small signed offsets from the frame pointer
* register plus register addressing using R13 as the base register.
At the moment we only support the first two of these special cases. */
-
+
#ifdef REG_OK_STRICT
#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL) \
do \
#define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_BASE_P (X)
/*}}}*/ \f
-/*{{{ Describing Relative Costs of Operations */
+/*{{{ Describing Relative Costs of Operations */
/* Define this macro as a C expression which is nonzero if accessing less than
a word of memory (i.e. a `char' or a `short') is no faster than accessing a
#define SLOW_BYTE_ACCESS 1
/*}}}*/ \f
-/*{{{ Dividing the output into sections. */
+/*{{{ Dividing the output into sections. */
/* A C expression whose value is a string containing the assembler operation
that should precede instructions and read-only data. Normally `".text"' is
#define ASM_APP_OFF "#NO_APP\n"
/*}}}*/ \f
-/*{{{ Output and Generation of Labels. */
+/*{{{ Output and Generation of Labels. */
/* Globalizing directive for a label. */
#define GLOBAL_ASM_OP "\t.globl "
/*}}}*/ \f
-/*{{{ Output of Assembler Instructions. */
+/*{{{ Output of Assembler Instructions. */
/* A C compound statement to output to stdio stream STREAM the assembler syntax
for an instruction operand X. X is an RTL expression.
#define IMMEDIATE_PREFIX ""
/*}}}*/ \f
-/*{{{ Output of Dispatch Tables. */
+/*{{{ Output of Dispatch Tables. */
/* This macro should be provided on machines where the addresses in a dispatch
table are relative to the table's own address.
fprintf (STREAM, "\t.word .L%d\n", VALUE)
/*}}}*/ \f
-/*{{{ Assembler Commands for Alignment. */
+/*{{{ Assembler Commands for Alignment. */
/* A C statement to output to the stdio stream STREAM an assembler command to
advance the location counter to a multiple of 2 to the POWER bytes. POWER
fprintf ((STREAM), "\t.p2align %d\n", (POWER))
/*}}}*/ \f
-/*{{{ Miscellaneous Parameters. */
+/*{{{ Miscellaneous Parameters. */
/* An alias for a machine mode name. This is the machine mode that elements of
a jump-table should have. */
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
-/* Common FreeBSD configuration.
+/* Common FreeBSD configuration.
All FreeBSD architectures should include this file, which will specify
their commonalities.
- Adapted from gcc/config/freebsd.h by
+ Adapted from gcc/config/freebsd.h by
David O'Brien <obrien@FreeBSD.org>
Loren J. Rittle <ljrittle@acm.org>. */
/* Define the default FreeBSD-specific per-CPU hook code. */
#define FBSD_TARGET_CPU_CPP_BUILTINS() do {} while (0)
-/* Provide a CPP_SPEC appropriate for FreeBSD. We just deal with the GCC
+/* Provide a CPP_SPEC appropriate for FreeBSD. We just deal with the GCC
option `-posix', and PIC issues. */
#define FBSD_CPP_SPEC " \
%{posix:-D_POSIX_SOURCE}"
/* Provide a STARTFILE_SPEC appropriate for FreeBSD. Here we add
- the magical crtbegin.o file (see crtstuff.c) which provides part
- of the support for getting C++ file-scope static object constructed
+ the magical crtbegin.o file (see crtstuff.c) which provides part
+ of the support for getting C++ file-scope static object constructed
before entering `main'. */
-
+
#define FBSD_STARTFILE_SPEC \
"%{!shared: \
%{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
/* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on
- the magical crtend.o file (see crtstuff.c) which provides part of
- the support for getting C++ file-scope static object constructed
- before entering `main', followed by a normal "finalizer" file,
+ the magical crtend.o file (see crtstuff.c) which provides part of
+ the support for getting C++ file-scope static object constructed
+ before entering `main', followed by a normal "finalizer" file,
`crtn.o'. */
#define FBSD_ENDFILE_SPEC \
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-/* Common FreeBSD configuration.
+/* Common FreeBSD configuration.
All FreeBSD architectures should include this file, which will specify
their commonalities.
- Adapted from gcc/config/i386/freebsd-elf.h by
- David O'Brien <obrien@FreeBSD.org>.
+ Adapted from gcc/config/i386/freebsd-elf.h by
+ David O'Brien <obrien@FreeBSD.org>.
Further work by David O'Brien <obrien@FreeBSD.org> and
Loren J. Rittle <ljrittle@acm.org>. */
See gcc/testsuite/gcc.dg/asm-4.c for an example. */
frv_print_operand_memory_reference (stream, x, 0);
return;
-
+
default:
break;
}
/* This hook exists to catch the case where secondary_reload_class() is
called from init_reg_autoinc() in regclass.c - before the reload optabs
have been initialised. */
-
+
static reg_class_t
frv_secondary_reload (bool in_p, rtx x, reg_class_t reload_class_i,
machine_mode reload_mode,
default:
break;
- case QUAD_REGS:
+ case QUAD_REGS:
case GPR_REGS:
case GR8_REGS:
case GR9_REGS:
/* Locate the "_init_array" function, and read the kernel's properties. */
hsa_executable_symbol_t symbol;
- XHSA (hsa_fns.hsa_executable_get_symbol_fn (executable, NULL,
+ XHSA (hsa_fns.hsa_executable_get_symbol_fn (executable, NULL,
"_init_array.kd", device, 0,
&symbol),
"Find '_init_array' function");
/* Copyright (C) 2017-2024 Free Software Foundation, Inc.
This file is part of GCC.
-
+
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
-
+
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
-
+
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
}
/* Helper function for gcn_reduction_update.
-
+
Insert code to lockfully update *PTR with *PTR OP VAR just before
GSI. This is necessary for types larger than 64 bits, where there
is no cmp&swap instruction to implement a lockless scheme. We use
}
/* Implement TARGET_GOACC_REDUCTION.
-
+
Expand calls to the GOACC REDUCTION internal function, into a sequence of
gimple instructions. */
/* Reserve this much space for LDS (for propagating variables from
worker-single mode to worker-partitioned mode), per workgroup. Global
analysis could calculate an exact bound, but we don't do that yet.
-
+
We want to permit full occupancy, so size accordingly. */
/* Use this as a default, but allow it to grow if the user requests a large
}
/* Implement TARGET_OPTION_OVERRIDE.
-
+
Override option settings where defaults are variable, or we have specific
needs to consider. */
/* Extract parameter settings from __attribute__((amdgpu_hsa_kernel ())).
This function also sets the default values for some arguments.
-
+
Return true on success, with ARGS populated. */
static bool
}
/* Referenced by TARGET_ATTRIBUTE_TABLE.
-
+
Validates target specific attributes. */
static tree
}
/* Implement TARGET_ATTRIBUTE_TABLE.
-
+
Create target-specific __attribute__ types. */
TARGET_GNU_ATTRIBUTES (gcn_attribute_table, {
}
/* Implement TARGET_CLASS_MAX_NREGS.
-
+
Return the number of hard registers needed to hold a value of MODE in
a register of class RCLASS. */
}
/* Implement TARGET_HARD_REGNO_NREGS.
-
+
Return the number of hard registers needed to hold a value of MODE in
REGNO. */
}
/* Implement TARGET_HARD_REGNO_MODE_OK.
-
+
Return true if REGNO can hold value in MODE. */
bool
}
/* Implement REGNO_REG_CLASS via gcn.h.
-
+
Return smallest class containing REGNO. */
enum reg_class
}
/* Implement TARGET_CAN_CHANGE_MODE_CLASS.
-
+
GCC assumes that lowpart contains first part of value as stored in memory.
This is not the case for vector registers. */
}
/* Implement TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P.
-
+
When this hook returns true for MODE, the compiler allows
registers explicitly used in the rtl to be used as spill registers
but prevents the compiler from extending the lifetime of these
}
/* Implement TARGET_CLASS_LIKELY_SPILLED_P.
-
+
Returns true if pseudos that have been assigned to registers of class RCLASS
would likely be spilled because registers of RCLASS are needed for spill
registers. */
}
/* Implement TARGET_MODES_TIEABLE_P.
-
+
Returns true if a value of MODE1 is accessible in MODE2 without
copying. */
}
/* Implement TARGET_TRULY_NOOP_TRUNCATION.
-
+
Returns true if it is safe to “convert” a value of INPREC bits to one of
OUTPREC bits (where OUTPREC is smaller than INPREC) by merely operating on
it as if it had only OUTPREC bits. */
}
/* Implement TARGET_SPILL_CLASS.
-
+
Return class of registers which could be used for pseudo of MODE
and of class RCLASS for spilling instead of memory. Return NO_REGS
if it is not possible or non-profitable. */
}
/* Implement TARGET_IRA_CHANGE_PSEUDO_ALLOCNO_CLASS.
-
+
Change allocno class for given pseudo from allocno and best class
calculated by IRA. */
}
/* Implement TARGET_LEGITIMATE_CONSTANT_P.
-
+
Returns true if X is a legitimate constant for a MODE immediate operand. */
bool
GEN_VNM - create accessor functions for all sizes of all modes
GEN_VN_NOEXEC - for insns without "_exec" variants
GEN_VNM_NOEXEC - likewise
-
+
E.g. add<mode>3
GEN_VNM (add, 3, A(rtx dest, rtx s1, rtx s2), A(dest, s1, s2)
}
/* Implement TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P.
-
+
Recognizes RTL expressions that are valid memory addresses for an
instruction. The MODE argument is the machine mode for the MEM
expression that wants to use this address.
}
/* Implement TARGET_ADDR_SPACE_POINTER_MODE.
-
+
Return the appropriate mode for a named address pointer. */
static scalar_int_mode
}
/* Implement TARGET_ADDR_SPACE_ADDRESS_MODE.
-
+
Return the appropriate mode for a named address space address. */
static scalar_int_mode
}
/* Implement TARGET_ADDR_SPACE_SUBSET_P.
-
+
Determine if one named address space is a subset of another. */
static bool
/* Implement REGNO_MODE_CODE_OK_FOR_BASE_P via gcn.h
-
+
Retun true if REGNO is OK for memory adressing. */
bool
}
/* Implement MODE_CODE_BASE_REG_CLASS via gcn.h.
-
+
Return a suitable register class for memory addressing. */
reg_class
}
/* Implement REGNO_OK_FOR_INDEX_P via gcn.h.
-
+
Return true if REGNO is OK for index of memory addressing. */
bool
/* {{{ Functions and ABI. */
/* Implement TARGET_FUNCTION_VALUE.
-
+
Define how to find the value returned by a function.
The register location is always the same, but the mode depends on
VALTYPE. */
}
/* Implement TARGET_FUNCTION_VALUE_REGNO_P.
-
+
Return true if N is a possible register number for the function return
value. */
}
/* Implement TARGET_PRETEND_OUTGOING_VARARGS_NAMED.
-
+
See comment on gcn_strict_argument_naming. */
static bool
}
/* Implement TARGET_FUNCTION_ARG.
-
+
Return an RTX indicating whether a function argument is passed in a register
and if so, which register. */
}
/* Implement TARGET_FUNCTION_ARG_ADVANCE.
-
+
Updates the summarizer variable pointed to by CUM_V to advance past an
argument in the argument list. */
}
/* Implement TARGET_ARG_PARTIAL_BYTES.
-
+
Returns the number of bytes at the beginning of an argument that must be put
in registers. The value must be zero for arguments that are passed entirely
in registers or that are entirely pushed on the stack. */
}
/* Implement INIT_CUMULATIVE_ARGS, via gcn.h.
-
+
Initialize a variable CUM of type CUMULATIVE_ARGS for a call to a function
whose data type is FNTYPE. For a library call, FNTYPE is 0. */
}
/* Implement TARGET_PROMOTE_FUNCTION_MODE.
-
+
Return the mode to use for outgoing function arguments. */
machine_mode
}
/* Implement TARGET_GIMPLIFY_VA_ARG_EXPR.
-
+
Derived from hppa_gimplify_va_arg_expr. The generic routine doesn't handle
ARGS_GROW_DOWNWARDS. */
/* Insert code into the prologue or epilogue to store or load any
callee-save register to/from the stack.
-
+
Helper function for gcn_expand_prologue and gcn_expand_epilogue. */
static void
}
/* Implement TARGET_CAN_ELIMINATE.
-
+
Return true if the compiler is allowed to try to replace register number
FROM_REG with register number TO_REG.
-
+
FIXME: is the default "true" not enough? Should this be a negative set? */
bool
}
/* Implement INITIAL_ELIMINATION_OFFSET.
-
+
Returns the initial difference between the specified pair of registers, in
terms of stack position. */
}
/* Implement HARD_REGNO_CALLER_SAVE_MODE.
-
+
Which mode is required for saving NREGS of a pseudo-register in
call-clobbered hard register REGNO. */
/* {{{ Miscellaneous. */
/* Implement TARGET_CANNOT_COPY_INSN_P.
-
+
Return true if INSN must not be duplicated. */
static bool
/* {{{ Costs. */
/* Implement TARGET_RTX_COSTS.
-
+
Compute a (partial) cost for rtx X. Return true if the complete
cost has been computed, and false if subexpressions should be
scanned. In either case, *TOTAL contains the cost result. */
}
/* Implement TARGET_MEMORY_MOVE_COST.
-
+
Return the cost of moving data of mode M between a
register and memory. A value of 2 is the default; this cost is
relative to those in `REGISTER_MOVE_COST'.
}
/* Implement TARGET_REGISTER_MOVE_COST.
-
+
Return the cost of moving data from a register in class CLASS1 to
one in class CLASS2. Base value is 2. */
static GTY(()) tree gcn_builtin_decls[GCN_BUILTIN_MAX];
/* Implement TARGET_BUILTIN_DECL.
-
+
Return the GCN builtin for CODE. */
tree
}
/* Implement TARGET_INIT_BUILTINS.
-
+
Set up all builtin functions for this target. */
static void
/* Expand the CMP_SWAP GCN builtins. We have our own versions that do
not require taking the address of any object, other than the memory
cell being operated on.
-
+
Helper function for gcn_expand_builtin_1. */
static rtx
}
/* Implement TARGET_EXPAND_BUILTIN.
-
+
Expand an expression EXP that calls a built-in function, with result going
to TARGET if that's convenient (and in mode MODE if that's convenient).
SUBTARGET may be used as the target for computing one of EXP's operands.
/* Return an RTX that references a vector with the i-th lane containing
PERM[i]*4.
-
+
Helper function for gcn_vectorize_vec_perm_const. */
static rtx
}
/* Implement TARGET_VECTORIZE_VEC_PERM_CONST.
-
+
Return true if permutation with SEL is possible.
-
+
If DST/SRC0/SRC1 are non-null, emit the instructions to perform the
permutations. */
}
/* Implements TARGET_VECTOR_MODE_SUPPORTED_P.
-
+
Return nonzero if vector MODE is supported with at least move
instructions. */
CLEAR_REG_SET (&live);
/* "Manually Inserted Wait States (NOPs)."
-
+
GCN hardware detects most kinds of register dependencies, but there
are some exceptions documented in the ISA manual. This pass
detects the missed cases, and inserts the documented number of NOPs
/* Implement ???????
FIXME make this a real hook.
-
+
Adjust FNDECL such that options inherited from the host compiler
are made appropriate for the accelerator compiler. */
/* {{{ ASM Output. */
/* Implement TARGET_ASM_FILE_START.
-
+
Print assembler file header text. */
static void
}
/* Implement ASM_DECLARE_FUNCTION_NAME via gcn-hsa.h.
-
+
Print the initial definition of a function name.
-
+
For GCN kernel entry points this includes all the HSA meta-data, special
alignment constraints that don't apply to regular functions, and magic
comments that pass information to mkoffload. */
}
/* Implement TARGET_ASM_FUNCTION_PROLOGUE.
-
+
Emits custom text into the assembler file at the head of each function. */
static void
}
/* Implement TARGET_CONSTANT_ALIGNMENT.
-
+
Returns the alignment in bits of a constant that is being placed in memory.
CONSTANT is the constant and BASIC_ALIGN is the alignment that the object
would ordinarily have. */
}
/* Implement DEBUGGER_REGNO macro.
-
+
Return the DWARF register number that corresponds to the GCC internal
REGNO. */
}
/* Implement TARGET_DWARF_REGISTER_SPAN.
-
+
DImode and Vector DImode require additional registers. */
static rtx
"%<-msx%> - option ignored");
}
-#ifdef H8300_LINUX
+#ifdef H8300_LINUX
if ((TARGET_NORMAL_MODE))
{
error ("%<-mn%> is not supported for linux targets");
if (h8300_monitor_function_p (current_function_decl))
/* The monitor function act as normal functions, which means it
- can accept parameters and return values. In addition to this,
+ can accept parameters and return values. In addition to this,
interrupts are masked in prologue and return with "rte" in epilogue. */
emit_insn (gen_monitor_prologue ());
if ((exact_log2 ((bitint >> 8) & 0xff)) == -1)
bitint = exact_log2 (bitint & 0xff);
else
- bitint = exact_log2 ((bitint >> 8) & 0xff);
+ bitint = exact_log2 ((bitint >> 8) & 0xff);
gcc_assert (bitint >= 0);
fprintf (file, "#%d", bitint);
break;
if ((exact_log2 ((bitint >> 8) & 0xff)) == -1 )
bitint = exact_log2 (bitint & 0xff);
else
- bitint = (exact_log2 ((bitint >> 8) & 0xff));
+ bitint = (exact_log2 ((bitint >> 8) & 0xff));
gcc_assert (bitint >= 0);
fprintf (file, "#%d", bitint);
break;
if (GET_CODE (op) == REG)
op = op2;
gcc_assert (GET_CODE (op) != REG);
-
+
size = GET_MODE_SIZE (GET_MODE (op));
operand_length = h8300_classify_operand (op, size, &opclass);
case LENGTH_TABLE_BITFIELD:
return h8300_bitfield_length (operands[0], operands[1]);
-
+
case LENGTH_TABLE_BITBRANCH:
return h8300_bitfield_length (operands[1], operands[2]) - 2;
/* This case must be taken care of by one of the two splitters
that convert a variable shift into a loop. */
gcc_assert (GET_CODE (operands[2]) == CONST_INT);
-
+
n = INTVAL (operands[2]);
/* If the count is negative, make it 0. */
n = GET_MODE_BITSIZE (mode);
get_shift_alg (shift_type, shift_mode, n, &info);
-
+
switch (info.alg)
{
case SHIFT_SPECIAL:
for (; n > 0; n--)
output_asm_insn (info.shift1, operands);
return "";
-
+
case SHIFT_ROT_AND:
{
int m = GET_MODE_BITSIZE (mode) - n;
/* Not all possibilities of rotate are supported. They shouldn't
be generated, but let's watch for 'em. */
gcc_assert (info.shift1);
-
+
/* Emit two bit rotates first. */
if (info.shift2 != NULL)
{
for (; m > 1; m -= 2)
output_asm_insn (info.shift2, operands);
}
-
+
/* Now single bit rotates for any residual. */
for (; m > 0; m--)
output_asm_insn (info.shift1, operands);
-
+
/* Now mask off the high bits. */
switch (mode)
{
fprintf (asm_out_file, "\tbne .Llt%d\n", loopend_lab);
}
return "";
-
+
default:
gcc_unreachable ();
}
enum shift_mode shift_mode;
struct shift_info info;
int n;
-
+
switch (mode)
{
case E_QImode:
/* This case must be taken care of by one of the two splitters
that convert a variable shift into a loop. */
gcc_assert (GET_CODE (operands[2]) == CONST_INT);
-
+
n = INTVAL (operands[2]);
/* If the count is negative, make it 0. */
do the intuitive thing. */
else if ((unsigned int) n > GET_MODE_BITSIZE (mode))
n = GET_MODE_BITSIZE (mode);
-
+
get_shift_alg (shift_type, shift_mode, n, &info);
-
+
switch (info.alg)
{
case SHIFT_SPECIAL:
case SHIFT_INLINE:
return (info.cc_inline == OLD_CC_SET_ZN
|| info.cc_inline == OLD_CC_SET_ZNV);
-
+
case SHIFT_ROT_AND:
/* This case always ends with an and instruction. */
return true;
-
+
case SHIFT_LOOP:
/* A loop to shift by a "large" constant value.
If we have shift-by-2 insns, use them. */
if (n % 2)
return (info.cc_inline == OLD_CC_SET_ZN
|| info.cc_inline == OLD_CC_SET_ZNV);
-
+
}
return false;
-
+
default:
gcc_unreachable ();
}
<http://www.gnu.org/licenses/>. */
extern void * darwin_gt_pch_get_address (size_t sz, int fd);
-extern int darwin_gt_pch_use_address (void *&addr, size_t sz, int fd,
+extern int darwin_gt_pch_use_address (void *&addr, size_t sz, int fd,
size_t off);
#undef HOST_HOOKS_GT_PCH_GET_ADDRESS
#endif
/* Determine a location where we might be able to reliably allocate SIZE
- bytes. FD is the PCH file, though we should return with the file
+ bytes. FD is the PCH file, though we should return with the file
unmapped. */
static void *
return addr;
}
-/* Map SIZE bytes of FD+OFFSET at BASE. Return 1 if we succeeded at
+/* Map SIZE bytes of FD+OFFSET at BASE. Return 1 if we succeeded at
mapping the data at BASE, -1 if we couldn't. */
static int
return addr;
}
-/* Map SIZE bytes of FD+OFFSET at BASE. Return 1 if we succeeded at
+/* Map SIZE bytes of FD+OFFSET at BASE. Return 1 if we succeeded at
mapping the data at BASE, -1 if we couldn't. */
static int
void *base;
base = mmap ((caddr_t) addr, len, prot, flags, fd, off);
-
+
if (base != addr)
{
size_t page_size = getpagesize();
return addr;
}
-/* Map SIZE bytes of FD+OFFSET at BASE. Return 1 if we succeeded at
+/* Map SIZE bytes of FD+OFFSET at BASE. Return 1 if we succeeded at
mapping the data at BASE, -1 if we couldn't. */
static int
extern __inline__ __m512i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_cvtne2ph_pbf8 (__m512i __W, __mmask64 __U,
+_mm512_mask_cvtne2ph_pbf8 (__m512i __W, __mmask64 __U,
__m512h __A, __m512h __B)
{
return (__m512i) __builtin_ia32_vcvtne2ph2bf8512_mask ((__v32hf) __A,
extern __inline__ __m512i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_cvtnes2ph_phf8 (__m512i __W, __mmask64 __U,
+_mm512_mask_cvtnes2ph_phf8 (__m512i __W, __mmask64 __U,
__m512h __A, __m512h __B)
{
return (__m512i) __builtin_ia32_vcvtne2ph2hf8s512_mask ((__v32hf) __A,
#else
#define _mm256_mask_cmp_pbh_mask(A, B, C, D) \
((__mmask16) __builtin_ia32_cmppbf16256_mask ((B), (C), (D), (A)))
-
+
#define _mm256_cmp_pbh_mask(A, B, C) \
((__mmask16) __builtin_ia32_cmppbf16256_mask ((A), (B), (C), \
(__mmask16) (-1)))
#define _mm_mask_cmp_pbh_mask(A, B, C, D) \
((__mmask8) __builtin_ia32_cmppbf16128_mask ((B), (C), (D), (A)))
-
+
#define _mm_cmp_pbh_mask(A, B, C) \
((__mmask8) __builtin_ia32_cmppbf16128_mask ((A), (B), (C), \
(__mmask8) (-1)))
extern __inline__ __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cvtne2ph_pbf8 (__m128i __W, __mmask16 __U,
+_mm_mask_cvtne2ph_pbf8 (__m128i __W, __mmask16 __U,
__m128h __A, __m128h __B)
{
return (__m128i) __builtin_ia32_vcvtne2ph2bf8128_mask ((__v8hf) __A,
extern __inline__ __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtne2ph_pbf8 (__m256i __W, __mmask32 __U,
+_mm256_mask_cvtne2ph_pbf8 (__m256i __W, __mmask32 __U,
__m256h __A, __m256h __B)
{
return (__m256i) __builtin_ia32_vcvtne2ph2bf8256_mask ((__v16hf) __A,
extern __inline__ __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cvtnes2ph_pbf8 (__m128i __W, __mmask16 __U,
+_mm_mask_cvtnes2ph_pbf8 (__m128i __W, __mmask16 __U,
__m128h __A, __m128h __B)
{
return (__m128i) __builtin_ia32_vcvtne2ph2bf8s128_mask ((__v8hf) __A,
{
return (unsigned int) __builtin_ia32_kmovb ((__mmask8 ) __A);
}
-
+
extern __inline __mmask8
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_cvtu32_mask8 (unsigned int __A)
/* Make configure files to produce biarch compiler defaulting to 64bit mode.
This file must be included very first, while the OS specific file later
- to overwrite otherwise wrong defaults.
+ to overwrite otherwise wrong defaults.
Copyright (C) 2001-2024 Free Software Foundation, Inc.
Contributed by Bo Thorsen <bo@suse.de>.
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 3, or (at your option) any
* later version.
- *
+ *
* This file is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
- *
+ *
* Under Section 7 of GPL version 3, you are granted additional
* permissions described in the GCC Runtime Library Exception, version
* 3.1, as published by the Free Software Foundation.
- *
+ *
* You should have received a copy of the GNU General Public License and
* a copy of the GCC Runtime Library Exception along with this program;
* see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
in_section = NULL)
/* Older versions of gas don't handle 'r' as data.
- Explicitly set data flag with 'd'. */
+ Explicitly set data flag with 'd'. */
#define READONLY_DATA_SECTION_ASM_OP "\t.section .rdata,\"dr\""
/* Don't allow flag_pic to propagate since gas may produce invalid code
do not use them unnecessarily in gthr-posix.h. */
#define GTHREAD_USE_WEAK 0
-/* Every program on cygwin links against cygwin1.dll which contains
+/* Every program on cygwin links against cygwin1.dll which contains
the pthread routines. There is no need to explicitly link them
and the -pthread flag is accepted only for compatibility. */
#undef GOMP_SELF_SPECS
while (0)
#endif
-/* This is how to tell assembler that a symbol is weak */
+/* This is how to tell assembler that a symbol is weak */
#undef ASM_WEAKEN_LABEL
#define ASM_WEAKEN_LABEL(FILE,NAME) \
do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
/* Detect cache parameters using CPUID function 2. */
static void
-detect_caches_cpuid2 (bool xeon_mp,
+detect_caches_cpuid2 (bool xeon_mp,
struct cache_desc *level1, struct cache_desc *level2)
{
unsigned regs[4];
int count;
for (count = 0;; count++)
- {
+ {
__cpuid_count(4, count, eax, ebx, ecx, edx);
switch (eax & 0x1f)
{
cpu = "haswell";
/* Assume Sandy Bridge. */
else
- cpu = "sandybridge";
+ cpu = "sandybridge";
}
else if (has_feature (FEATURE_SSE4_2))
{
#undef SIZE_TYPE
#define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
-
+
#undef PTRDIFF_TYPE
#define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int")
-
+
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE (TARGET_64BIT ? 32 : BITS_PER_WORD)
#undef SUBTARGET_EXTRA_SPECS /* i386.h bogusly defines it. */
#define SUBTARGET_EXTRA_SPECS \
{ "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER }
-
+
/* Use the STARTFILE_SPEC from config/freebsd-spec.h. */
#undef STARTFILE_SPEC
doubt or guess work, and since this file is used for both a.out and other
file formats, we use one of them. */
-#ifdef HAVE_GAS_BALIGN_AND_P2ALIGN
+#ifdef HAVE_GAS_BALIGN_AND_P2ALIGN
#undef ASM_OUTPUT_ALIGN
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
if ((LOG)!=0) fprintf ((FILE), "\t.balign %d\n", 1 << (LOG))
#include <errno.h>
#endif
-static __inline__ void *
+static __inline__ void *
_mm_malloc (size_t __size, size_t __align)
{
void * __malloc_ptr;
/* Assume malloc'd pointer is aligned at least to sizeof (void*).
If necessary, add another sizeof (void*) to store the value
returned by malloc. Effectively this enforces a minimum alignment
- of sizeof double. */
+ of sizeof double. */
if (__align < 2 * sizeof (void *))
__align = 2 * sizeof (void *);
__aligned_ptr = (void *) (((size_t) __malloc_ptr + __align)
& ~((size_t) (__align) - 1));
- /* Store the original pointer just before p. */
+ /* Store the original pointer just before p. */
((void **) __aligned_ptr)[-1] = __malloc_ptr;
return __aligned_ptr;
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
-
+
#undef PTRDIFF_TYPE
#define PTRDIFF_TYPE "int"
-
+
#undef WCHAR_TYPE
#define WCHAR_TYPE "long int"
-
+
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE BITS_PER_WORD
-
+
/* Provide a LINK_SPEC appropriate for GNU userspace. Here we provide support
for the special GCC options -static and -shared, which allow us to
link things in one of these three modes by applying the appropriate
/* Cygwin requires that the underlying file be at least
as large as the requested mapping. */
if ((size_t) p < sz)
- {
+ {
if (ftruncate (fd, sz) == -1)
fatal_error (input_location, "cannot extend PCH file: %m");
}
/* Granularity for reserving address space. */
static size_t va_granularity = 0x10000;
-/* Print out the GetLastError() translation. */
+/* Print out the GetLastError() translation. */
static inline void
w32_error (const char* function, const char* file, int line,
const char* my_msg)
for NT system dlls is in 0x70000000 to 0x78000000 range.
If we allocate at bottom we need to reserve the address as early
as possible and at the same point in each invocation. */
-
+
res = VirtualAlloc (NULL, size,
MEM_RESERVE | MEM_TOP_DOWN,
PAGE_NOACCESS);
/* We do not need the address space for now, so free it. */
VirtualFree (res, 0, MEM_RELEASE);
- return res;
+ return res;
}
/* ADDR is an address returned by gt_pch_get_address. Attempt to allocate
- SIZE bytes at the same address and load it with the data from FD at
+ SIZE bytes at the same address and load it with the data from FD at
OFFSET. Return -1 if we couldn't allocate memory at ADDR, return 0
if the memory is allocated but the data not loaded, return 1 if done. */
{
void * mmap_addr;
HANDLE mmap_handle;
-
+
/* Apparently, MS Vista puts unnamed file mapping objects into Global
namespace when running an application in a Terminal Server
- session. This causes failure since, by default, applications
+ session. This causes failure since, by default, applications
don't get SeCreateGlobalPrivilege. We don't need global
memory sharing so explicitly put object into Local namespace.
version_info.dwOSVersionInfoSize = sizeof (version_info);
if (size == 0)
- return 0;
+ return 0;
/* Offset must be also be a multiple of allocation granularity for
- this to work. We can't change the offset. */
+ this to work. We can't change the offset. */
if ((offset & (va_granularity - 1)) != 0)
return -1;
if (mmap_handle == NULL)
{
w32_error (__FUNCTION__, __FILE__, __LINE__, "CreateFileMapping");
- return -1;
+ return -1;
}
/* Retry five times, as here might occure a race with multiple gcc's
if (r != 4)
Sleep (500);
}
-
+
if (mmap_addr != addr)
{
w32_error (__FUNCTION__, __FILE__, __LINE__, "MapViewOfFileEx");
target_node
= ix86_valid_target_attribute_tree (decl, attrs, &global_options,
&global_options_set, 0);
-
+
gcc_assert (target_node);
if (target_node == error_mark_node)
return 0;
cl_target_option_restore (&global_options, &global_options_set,
&cur_target);
-
+
if (predicate_list && arg_str == NULL)
{
error_at (DECL_SOURCE_LOCATION (decl),
"no dispatcher found for the versioning attributes");
return 0;
}
-
+
if (predicate_list)
{
predicate_decl = ix86_builtins [(int) builtin_fn];
*predicate_list = predicate_chain;
}
- return priority;
+ return priority;
}
/* This builds the processor_model struct type defined in
t = gen_reg_rtx (V4SFmode);
else
t = op0;
-
+
if (TARGET_SSE_PARTIAL_REG_DEPENDENCY)
emit_move_insn (t, CONST0_RTX (V4SFmode));
else
op = gen_rtx_SET (dst, gen_rtx_fmt_ee (code, mode, dst, src));
clob = gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (CCmode, FLAGS_REG));
-
+
emit_insn (gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, op, clob)));
}
if (TARGET_XOP)
{
- /* The XOP VPPERM insn supports three inputs. By ignoring the
+ /* The XOP VPPERM insn supports three inputs. By ignoring the
one_operand_shuffle special case, we avoid creating another
set of constant vectors in memory. */
one_operand_shuffle = false;
rtx tmp7 = force_reg (V1TImode, gen_lowpart (V1TImode, tmp3));
rtx tmp8 = gen_reg_rtx (V1TImode);
emit_insn (gen_sse2_ashlv1ti3 (tmp8, tmp7, GEN_INT (64)));
-
+
rtx tmp9 = force_reg (V2DImode, gen_lowpart (V2DImode, tmp3));
rtx tmp10 = gen_reg_rtx (V2DImode);
emit_insn (gen_ashlv2di3 (tmp10, tmp9, GEN_INT (128 - bits)));
DONE_LABEL is a label after the whole copying sequence. The label is created
on demand if *DONE_LABEL is NULL.
MIN_SIZE is minimal size of block copied. This value gets adjusted for new
- bounds after the initial copies.
+ bounds after the initial copies.
DESTMEM/SRCMEM are memory expressions pointing to the copies block,
DESTPTR/SRCPTR are pointers to the block. DYNAMIC_CHECK indicate whether
return dst;
}
-/* Return true if ALG can be used in current context.
+/* Return true if ALG can be used in current context.
Assume we expand memset if MEMSET is true. */
static bool
alg_usable_p (enum stringop_alg alg, bool memset, bool have_as)
with specified algorithm.
4) Epilogue: code copying tail of the block that is too small to be
- handled by main body (or up to size guarded by prologue guard).
+ handled by main body (or up to size guarded by prologue guard).
Misaligned move sequence
/* Do the cheap promotion to allow better CSE across the
main loop and epilogue (ie one load of the big constant in the
- front of all code.
+ front of all code.
For now the misaligned move sequences do not have fast path
without broadcasting. */
if (issetmem && ((CONST_INT_P (val_exp) || misaligned_prologue_used)))
if (!REG_P (op2))
op2 = copy_to_mode_reg (SImode, op2);
- emit_insn (fcode == IX86_BUILTIN_MONITOR
+ emit_insn (fcode == IX86_BUILTIN_MONITOR
? gen_sse3_monitor (Pmode, op0, op1, op2)
: gen_monitorx (Pmode, op0, op1, op2));
return 0;
};
/* Comparator for bsearch on ix86_vec_bcast_map. */
-static int
+static int
ix86_vec_bcast_map_simode_cmp (const void *key, const void *entry)
{
return (*(const unsigned int*)key)
/* Multiply lower parts and add all */
t5 = gen_reg_rtx (V2DImode);
- emit_insn (gen_vec_widen_umult_even_v4si (t5,
+ emit_insn (gen_vec_widen_umult_even_v4si (t5,
gen_lowpart (V4SImode, op1),
gen_lowpart (V4SImode, op2)));
force_expand_binop (mode, add_optab, t5, t4, op0, 1, OPTAB_DIRECT);
return false;
dst = SUBREG_REG (dst);
}
-
+
if (SUBREG_P (src))
{
pos += SUBREG_BYTE (src) * BITS_PER_UNIT;
&& !CONST_DOUBLE_P (cst)
&& !CONST_FIXED_P (cst))
return NULL_RTX;
-
+
int n_elts = GET_MODE_NUNITS (mode);
if (CONST_VECTOR_NUNITS (x) != n_elts)
return NULL_RTX;
/* Return TRUE if OP (in mode MODE) is the leaf of a ternary logic
expression, such as a register or a memory reference. */
-
+
bool
ix86_ternlog_leaf_p (rtx op, machine_mode mode)
{
return target;
}
break;
-
+
case 0x22: /* ~b&c */
if ((!op0 || !side_effects_p (op0))
&& op1 && register_operand (op1, mode)
return target;
}
break;
-
+
case 0x5a: /* a^c */
if (op0 && ix86_ternlog_leaf_p (op0, mode)
&& op2 && ix86_ternlog_leaf_p (op2, mode)
return;
n_sse_to_integer++;
}
-
+
if (dump_file)
fprintf (dump_file,
" Mark r%d def in insn %d as requiring both modes in chain #%d\n",
/* V1 and V2 point to function versions with different priorities
based on the target ISA. This function compares their priorities. */
-
+
static int
feature_compare (const void *v1, const void *v2)
{
convert_expr = build1 (CONVERT_EXPR, ptr_type_node,
build_fold_addr_expr (version_decl));
result_var = create_tmp_var (ptr_type_node);
- convert_stmt = gimple_build_assign (result_var, convert_expr);
+ convert_stmt = gimple_build_assign (result_var, convert_expr);
return_stmt = gimple_build_return (result_var);
if (predicate_chain == NULL_TREE)
gimple_seq_add_stmt (&gseq, call_cond_stmt);
predicate_chain = TREE_CHAIN (predicate_chain);
-
+
if (and_expr_var == NULL)
and_expr_var = cond_var;
else
gimple_set_bb (return_stmt, bb2);
bb3 = e23->dest;
- make_edge (bb1, bb3, EDGE_FALSE_VALUE);
+ make_edge (bb1, bb3, EDGE_FALSE_VALUE);
remove_edge (e23);
make_edge (bb2, EXIT_BLOCK_PTR_FOR_FN (cfun), 0);
return ret;
}
-tree
+tree
ix86_mangle_decl_assembler_name (tree decl, tree id)
{
/* For function version, add the target suffix to the assembler name. */
tree dispatch_decl = NULL;
struct cgraph_function_version_info *default_version_info = NULL;
-
+
gcc_assert (fn != NULL && DECL_FUNCTION_VERSIONED (fn));
node = cgraph_node::get (fn);
node_v = node->function_version ();
gcc_assert (node_v != NULL);
-
+
if (node_v->dispatcher_resolver != NULL)
return node_v->dispatcher_resolver;
provide the code to dispatch the right function at run-time. NODE points
to the dispatcher decl whose body will be created. */
-tree
+tree
ix86_generate_version_dispatcher_body (void *node_p)
{
tree resolver_decl;
~m_386,
};
-/* This table must be in sync with enum processor_type in i386.h. */
+/* This table must be in sync with enum processor_type in i386.h. */
static const struct processor_costs *processor_cost_table[] =
{
&generic_cost,
tree old_optimize = build_optimization_node (&global_options,
&global_options_set);
- /* Get the optimization options of the current function. */
+ /* Get the optimization options of the current function. */
tree func_optimize = DECL_FUNCTION_SPECIFIC_OPTIMIZATION (fndecl);
-
+
if (!func_optimize)
func_optimize = old_optimize;
/* For all chips supporting SSE2, -mfpmath=sse performs better than
fpmath=387. The second is however default at many targets since the
extra 80bit precision of temporaries is considered to be part of ABI.
- Overwrite the default at least for -ffast-math.
+ Overwrite the default at least for -ffast-math.
TODO: -mfpmath=both seems to produce same performing code with bit
smaller binaries. It is however not clear if register allocation is
ready for this setting.
enum stringop_alg
{
#undef DEF_ALG
-#define DEF_ALG(alg, name) alg,
+#define DEF_ALG(alg, name) alg,
#include "stringop.def"
last_alg
/* See the definition of CALL_USED_REGISTERS in i386.h. */
c_mask = CALL_USED_REGISTERS_MASK (TARGET_64BIT_MS_ABI);
-
+
CLEAR_HARD_REG_SET (reg_class_contents[(int)CLOBBERED_REGS]);
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
The midde-end can't deal with the vector types > 16 bytes. In this
case, we return the original mode and warn ABI change if CUM isn't
- NULL.
+ NULL.
If INT_RETURN is true, warn ABI change if the vector mode isn't
available for function return value. */
if (fntype_or_decl && DECL_P (fntype_or_decl))
fn = fntype_or_decl;
fntype = fn ? TREE_TYPE (fn) : fntype_or_decl;
-
+
if (ix86_function_type_abi (fntype) == MS_ABI)
{
if (TARGET_64BIT)
/* Unless ABI prescibes otherwise,
MMX/3dNow values are returned in MM0 if available. */
-
+
if (size == 8)
return TARGET_VECT8_RETURNS || !TARGET_MMX;
/* For SYSV_ABI we use an array of one record. */
sysv_va_list_type_node = ix86_build_builtin_va_list_64 ();
-
+
/* For MS_ABI we use plain pointer to argument area. */
tree char_ptr_type = build_pointer_type (char_type_node);
tree attr = tree_cons (get_identifier ("ms_abi va_list"), NULL_TREE,
&& float_vector_all_ones_operand (x, mode)))
{
enum attr_mode insn_mode = get_attr_mode (insn);
-
+
switch (insn_mode)
{
case MODE_XI:
/* SSE saves require frame-pointer when stack is misaligned. */
if (TARGET_64BIT_MS_ABI && ix86_incoming_stack_boundary < 128)
return true;
-
+
/* In ix86_option_override_internal, TARGET_OMIT_LEAF_FRAME_POINTER
turns off the frame pointer by default. Turn it back on now if
we've not got a leaf function. */
addr = XEXP (addr, 0);
if (CONST_INT_P (addr))
return false;
- }
+ }
else if (GET_CODE (addr) == AND
&& const_32bit_mask (XEXP (addr, 1), DImode))
{
case 2:
putc ('w', file);
break;
-
+
case 4:
putc ('l', file);
break;
if (optimize_size > 1
&& parts.scale > 1
&& !parts.base
- && (!parts.disp || parts.disp == const0_rtx))
+ && (!parts.disp || parts.disp == const0_rtx))
return true;
/* Check we need to optimize. */
seh_nop_p = true;
break;
}
-
+
/* If we get to another real insn, we don't need the nop. */
if (INSN_P (i))
break;
using topological ordering in the region. */
if (rgn == CONTAINING_RGN (e->src->index)
&& BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
- add_dependee_for_func_arg (first_arg, e->src);
+ add_dependee_for_func_arg (first_arg, e->src);
}
}
insn = first_arg;
other unit cannot rely on the alignment.
Exclude va_list type. It is the common case of local array where
- we cannot benefit from the alignment.
+ we cannot benefit from the alignment.
TODO: Probably one should optimize for size only when var is not escaping. */
if (TARGET_64BIT && optimize_function_for_speed_p (cfun)
*total = COSTS_N_BYTES (1);
else if (TARGET_SLOW_STC)
*total = COSTS_N_INSNS (2);
- else
+ else
*total = COSTS_N_INSNS (1);
return true;
}
gcc_assert (MEM_P (mem));
addr = XEXP (mem, 0);
-
+
if (GET_CODE (addr) == CONST)
addr = XEXP (addr, 0);
#define TARGET_SUBTARGET64_ISA_DEFAULT \
(OPTION_MASK_ISA_MMX | OPTION_MASK_ISA_SSE | OPTION_MASK_ISA_SSE2)
-/* Replace MACH-O, ifdefs by in-line tests, where possible.
+/* Replace MACH-O, ifdefs by in-line tests, where possible.
(a) Macros defined in config/i386/darwin.h */
#define TARGET_MACHO 0
#define TARGET_MACHO_SYMBOL_STUBS 0
/* If defined, the maximum amount of space required for outgoing arguments
will be computed and placed into the variable `crtl->outgoing_args_size'.
No space will be pushed onto the stack for each call; instead, the
- function prologue should increase the stack frame size by this amount.
+ function prologue should increase the stack frame size by this amount.
In 32bit mode enabling argument accumulation results in about 5% code size
growth because move instructions are less compact than push. In 64bit
- mode the difference is less drastic but visible.
+ mode the difference is less drastic but visible.
FIXME: Unlike earlier implementations, the size of unwind info seems to
actually grow with accumulation. Is that because accumulated args
/* Configuration for an OpenBSD i386 target.
-
+
Copyright (C) 2005-2024 Free Software Foundation, Inc.
This file is part of GCC.
by index N. */
#define _MM_EXTRACT_FLOAT(D, S, N) \
{ (D) = __builtin_ia32_vec_ext_v4sf ((__v4sf)(S), (N)); }
-
+
/* Extract specified single precision float element into the lower
part of __m128. */
#define _MM_PICK_OUT_PS(X, N) \
#define ASM_CPU_SPEC "%(asm_cpu_default) " ASM_XBRACE_COMMENT_SPEC
/* Don't include ASM_PIC_SPEC. While the Solaris 10+ assembler accepts -K PIC,
- it gives many warnings:
+ it gives many warnings:
Absolute relocation is used for symbol "<symbol>"
GNU as doesn't recognize -K at all. */
#undef ASM_SPEC
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
+You should have received a copy of the GNU General Public License
along with GCC; see the files COPYING3. If not,
see <http://www.gnu.org/licenses/>. */
#define __DISABLE_AES__
#endif /* __AES__ */
-/* Performs 1 round of AES decryption of the first m128i using
+/* Performs 1 round of AES decryption of the first m128i using
the second m128i as a round key. */
#define _mm_aesdec_si128(X, Y) \
(__m128i) __builtin_ia32_aesdec128 ((__v2di) (X), (__v2di) (Y))
-/* Performs the last round of AES decryption of the first m128i
+/* Performs the last round of AES decryption of the first m128i
using the second m128i as a round key. */
#define _mm_aesdeclast_si128(X, Y) \
(__m128i) __builtin_ia32_aesdeclast128 ((__v2di) (X), (__v2di) (Y))
-/* Performs 1 round of AES encryption of the first m128i using
+/* Performs 1 round of AES encryption of the first m128i using
the second m128i as a round key. */
#define _mm_aesenc_si128(X, Y) \
(__m128i) __builtin_ia32_aesenc128 ((__v2di) (X), (__v2di) (Y))
#define _mm_aesenclast_si128(X, Y) \
(__m128i) __builtin_ia32_aesenclast128 ((__v2di) (X), (__v2di) (Y))
-/* Performs the InverseMixColumn operation on the source m128i
+/* Performs the InverseMixColumn operation on the source m128i
and stores the result into m128i destination. */
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_aesimc_si128 (__m128i __X)
/************************[ Target stuff ]***********************************/
-/* Define the actual types of some ANSI-mandated types.
+/* Define the actual types of some ANSI-mandated types.
Needs to agree with <machine/ansi.h>. GCC defaults come from c-decl.cc,
c-common.cc, and config/<arch>/<arch>.h. */
machine_mode vmode;
unsigned char nelt;
bool one_operand_p;
- bool testing_p;
+ bool testing_p;
};
static bool ia64_expand_vec_perm_const_1 (struct expand_vec_perm_d *d);
tree id;
gcc_assert (DECL_P (decl));
-
+
DECL_COMMON (decl) = 1;
id = TREE_VALUE (args);
if (TREE_CODE (id) != IDENTIFIER_NODE && TREE_CODE (id) != STRING_CST)
return true;
else if ((GET_CODE (x) == POST_INC || GET_CODE (x) == POST_DEC)
&& ia64_legitimate_address_reg (XEXP (x, 0), strict)
- && XEXP (x, 0) != arg_pointer_rtx)
+ && XEXP (x, 0) != arg_pointer_rtx)
return true;
else if (GET_CODE (x) == POST_MODIFY
&& ia64_legitimate_address_reg (XEXP (x, 0), strict)
else if (aligned_offset_symbol_operand (sym, mode))
{
HOST_WIDE_INT addend_lo, addend_hi;
-
+
addend_lo = ((addend & 0x3fff) ^ 0x2000) - 0x2000;
addend_hi = addend - addend_lo;
case CONST_DOUBLE:
/* Cannot occur reversed. */
gcc_assert (!reversed);
-
+
if (GET_MODE (in) != TFmode)
split_double (in, &out[0], &out[1]);
else
case POST_INC:
gcc_assert (!reversed && !dead);
-
+
/* Just do the increment in two steps. */
out[0] = adjust_automodify_address (in, DImode, 0, 0);
out[1] = adjust_automodify_address (in, DImode, 0, 8);
case POST_DEC:
gcc_assert (!reversed && !dead);
-
+
/* Add 8, subtract 24. */
base = XEXP (base, 0);
out[0] = adjust_automodify_address
the appropriate order so that the pointer is not destroyed too
early. Also we must not generate a postmodify for that second
load, or rws_access_regno will die. And we must not generate a
- postmodify for the second load if the destination register
+ postmodify for the second load if the destination register
overlaps with the base register. */
if (GET_CODE (operands[1]) == MEM
&& reg_overlap_mentioned_p (operands[0], operands[1]))
int magic;
enum rtx_code ncode;
rtx ret;
-
+
gcc_assert (cmptf_libfunc && GET_MODE (*op1) == TFmode);
switch (code)
{
if (df_regs_ever_live_p (AR_PFS_REGNUM))
{
SET_HARD_REG_BIT (mask, AR_PFS_REGNUM);
- current_frame_info.r[reg_save_ar_pfs]
+ current_frame_info.r[reg_save_ar_pfs]
= find_gr_spill (reg_save_ar_pfs, 1);
if (current_frame_info.r[reg_save_ar_pfs] == 0)
{
it is absolutely critical that FP get the only hard register that's
guaranteed to be free, so we allocated it first. If all three did
happen to be allocated hard regs, and are consecutive, rearrange them
- into the preferred order now.
-
+ into the preferred order now.
+
If we have already emitted code for any of those registers,
then it's already too late to change. */
min_regno = MIN (current_frame_info.r[reg_fp],
{
df_set_regs_ever_live (AR_UNAT_REGNUM, true);
SET_HARD_REG_BIT (mask, AR_UNAT_REGNUM);
- current_frame_info.r[reg_save_ar_unat]
+ current_frame_info.r[reg_save_ar_unat]
= find_gr_spill (reg_save_ar_unat, spill_size == 0);
if (current_frame_info.r[reg_save_ar_unat] == 0)
{
if (df_regs_ever_live_p (AR_LC_REGNUM))
{
SET_HARD_REG_BIT (mask, AR_LC_REGNUM);
- current_frame_info.r[reg_save_ar_lc]
+ current_frame_info.r[reg_save_ar_lc]
= find_gr_spill (reg_save_ar_lc, spill_size == 0);
if (current_frame_info.r[reg_save_ar_lc] == 0)
{
ia64_emit_probe_stack_range (get_stack_check_protect (), size, bs_size);
}
- if (dump_file)
+ if (dump_file)
{
fprintf (dump_file, "ia64 frame related registers "
"recorded in current_frame_info.r[]:\n");
names of r2 and HARD_FRAME_POINTER_REGNUM, so we have to make
sure we're using the string "r2" when emitting the register
name for the assembler. */
- if (current_frame_info.r[reg_fp]
+ if (current_frame_info.r[reg_fp]
&& current_frame_info.r[reg_fp] == GR_REG (2))
fp = HARD_FRAME_POINTER_REGNUM;
unsigned int r;
for (r = reg_fp; r <= reg_save_ar_lc; r++)
- if (to == current_frame_info.r[r]
+ if (to == current_frame_info.r[r]
|| from == current_frame_info.r[r]
|| to == emitted_frame_related_regs[r]
|| from == emitted_frame_related_regs[r])
}
return gen_rtx_PARALLEL (arg.mode, gen_rtvec_v (i, loc));
}
-
+
/* Integral and aggregates go in general registers. If we have run out of
FR registers, then FP values must also go in general registers. This can
happen when we have a SFmode HFA. */
if (fn_decl_or_type
&& !DECL_P (fn_decl_or_type))
func = NULL;
-
+
mode = TYPE_MODE (valtype);
hfa_mode = hfa_element_mode (valtype, 0);
of the f/f case when reloading (set (reg fX) (mem/v)). */
if (MEM_P (x) && MEM_VOLATILE_P (x))
return NO_REGS;
-
+
/* Force all unrecognized constants into the constant pool. */
if (CONSTANT_P (x))
return NO_REGS;
doloop_end_internal,
(3) The destination is an fp register, in which case this is
an fselect instruction.
- (4) The condition has (unspec [(reg)] UNSPEC_LDC), in which case
+ (4) The condition has (unspec [(reg)] UNSPEC_LDC), in which case
this is a check load.
In all cases, nothing we do in this function applies. */
return;
}
if (ia64_spec_check_src_p (src))
- /* Avoid checking one register twice (in condition
+ /* Avoid checking one register twice (in condition
and in 'then' section) for ldc pattern. */
{
gcc_assert (REG_P (XEXP (src, 2)));
need_barrier = rtx_needs_barrier (XEXP (src, 2), flags, pred);
-
+
/* We process MEM below. */
src = XEXP (src, 1);
}
ia64_sched_init_global (FILE *dump ATTRIBUTE_UNUSED,
int sched_verbose ATTRIBUTE_UNUSED,
int max_ready ATTRIBUTE_UNUSED)
-{
+{
gcc_assert (pending_data_specs == 0);
}
if (reload_completed)
{
int needed = group_barrier_needed (insn);
-
+
gcc_assert (!needed);
if (CALL_P (insn))
init_insn_group_barriers ();
static void
ia64_h_i_d_extended (void)
{
- if (stops_p != NULL)
+ if (stops_p != NULL)
{
int new_clocks_length = get_max_uid () * 3 / 2;
stops_p = (char *) xrecalloc (stops_p, new_clocks_length, clocks_length, 1);
ia64_clear_sched_context (void *_sc)
{
ia64_sched_context_t sc = (ia64_sched_context_t) _sc;
-
+
free (sc->prev_cycle_state);
sc->prev_cycle_state = NULL;
}
|| (mflag_sched_ar_in_data_spec && reload_completed)))
mask |= BE_IN_DATA;
}
-
+
if (mflag_sched_control_spec
&& (!sel_sched_p ()
|| reload_completed))
{
mask |= BEGIN_CONTROL;
-
+
if (!sel_sched_p () && mflag_sched_in_control_spec)
mask |= BE_IN_CONTROL;
}
if (mask & BE_IN_SPEC)
*flags |= NEW_BBS;
-
+
spec_info->flags = 0;
-
+
if ((mask & CONTROL_SPEC)
&& sel_sched_p () && mflag_sel_sched_dont_check_control_spec)
spec_info->flags |= SEL_SCHED_SPEC_DONT_CHECK_CONTROL;
spec_info->dump = sched_dump;
else
spec_info->dump = 0;
-
+
if (mflag_sched_count_spec_in_critical_path)
spec_info->flags |= COUNT_SPEC_IN_CRITICAL_PATH;
}
return 0. */
static int
ia64_speculate_insn (rtx_insn *insn, ds_t ts, rtx *new_pat)
-{
+{
int mode_no;
int res;
-
+
gcc_assert (!(ts & ~SPECULATIVE));
if (ia64_spec_check_p (insn))
gcc_assert (!ia64_needs_block_p (ds));
op1 = copy_rtx (recog_data.operand[1]);
}
-
+
gen_check = get_spec_check_gen_function (ds, mode_no, label == NULL_RTX,
true);
check_pat = gen_check (copy_rtx (recog_data.operand[0]), op1);
-
+
pat = PATTERN (insn);
if (GET_CODE (pat) == COND_EXEC)
check_pat = gen_rtx_COND_EXEC (VOIDmode, copy_rtx (COND_EXEC_TEST (pat)),
t = XEXP (src, 0);
if (GET_CODE (t) == NE)
{
- t = XEXP (t, 0);
+ t = XEXP (t, 0);
if (GET_CODE (t) == UNSPEC)
{
int code;
-
+
code = XINT (t, 1);
-
+
if (code == UNSPEC_LDCCLR
|| code == UNSPEC_LDCNC
|| code == UNSPEC_CHKACLR
INSN_UID (insn));
}
}
-
+
/* We should find a solution because the 2nd insn scheduling has
found one. */
gcc_assert (index_to_bundle_states [insn_num]);
if (GET_CODE (reg) == SUBREG)
reg = SUBREG_REG (reg);
gcc_assert (GET_CODE (reg) == REG);
-
+
dest = ia64_single_set (consumer);
gcc_assert (dest);
mem = SET_DEST (dest);
if (GET_CODE (reg) == SUBREG)
reg = SUBREG_REG (reg);
gcc_assert (GET_CODE (reg) == REG);
-
+
src = ia64_single_set (consumer);
gcc_assert (src);
mem = SET_SRC (src);
gcc_assert (mem);
-
+
if (GET_CODE (mem) == UNSPEC && XVECLEN (mem, 0) > 0)
mem = XVECEXP (mem, 0, 0);
else if (GET_CODE (mem) == IF_THEN_ELSE)
gcc_assert (XINT (XEXP (XEXP (mem, 0), 0), 1) == UNSPEC_LDCCLR);
mem = XEXP (mem, 1);
}
-
+
while (GET_CODE (mem) == SUBREG || GET_CODE (mem) == ZERO_EXTEND)
mem = XEXP (mem, 0);
emit_all_insn_group_barriers (dump_file);
df_analyze ();
-
+
/* A call must not be the last instruction in a function, so that the
return address is still within the function, so that unwinding works
properly. Note that IA-64 differs from dwarf2 on this point. */
{
rtx op0 = XEXP (src, 0);
rtx op1 = XEXP (src, 1);
-
+
gcc_assert (op0 == dest && GET_CODE (op1) == CONST_INT);
-
+
if (INTVAL (op1) < 0)
{
gcc_assert (!frame_pointer_needed);
these return values. */
return (abi_version_at_least (2)
&& ret_type
- && TYPE_MODE (ret_type) == BLKmode
+ && TYPE_MODE (ret_type) == BLKmode
&& TREE_ADDRESSABLE (ret_type)
&& lang_GNU_CXX ());
}
static bool
expand_vec_perm_1 (struct expand_vec_perm_d *d)
-{
+{
unsigned i, nelt = d->nelt;
unsigned char perm2[MAX_VECT_LEN];
if (expand_vec_perm_shrp (d))
return true;
- /* ??? Look for deposit-like permutations where most of the result
- comes from one vector unchanged and the rest comes from a
+ /* ??? Look for deposit-like permutations where most of the result
+ comes from one vector unchanged and the rest comes from a
sequential hunk of the other vector. */
return false;
h1 = h0 << nelt2;
h2 = h0 << nelt;
h3 = h0 << (nelt + nelt2);
-
+
if ((contents & (h0 | h2)) == contents) /* punpck even halves */
{
for (i = 0; i < nelt; ++i)
struct expand_vec_perm_d d;
unsigned int which;
bool ok;
-
+
d.target = operands[0];
d.op0 = operands[0];
d.op1 = gen_reg_rtx (V2SFmode);
rtx_insn *nop_insn = emit_insn_after (gen_nop (), insn);
INSN_ADDRESSES_NEW (nop_insn, -1);
}
-
+
if (TARGET_STATS
&& (JUMP_P (insn) || CALL_P (insn)))
dslots_jump_total ++;
gp_reg_rounded = IQ2000_STACK_ALIGN (gp_reg_size);
total_size += gp_reg_rounded + IQ2000_STACK_ALIGN (fp_reg_size);
- /* The gp reg is caller saved, so there is no need for leaf routines
+ /* The gp reg is caller saved, so there is no need for leaf routines
(total_size == extra_size) to save the gp reg. */
if (total_size == extra_size
&& ! profile_flag)
{
int offset;
- compute_frame_size (get_frame_size ());
- if ((from) == FRAME_POINTER_REGNUM)
- (offset) = 0;
- else if ((from) == ARG_POINTER_REGNUM)
- (offset) = (cfun->machine->total_size);
- else if ((from) == RETURN_ADDRESS_POINTER_REGNUM)
+ compute_frame_size (get_frame_size ());
+ if ((from) == FRAME_POINTER_REGNUM)
+ (offset) = 0;
+ else if ((from) == ARG_POINTER_REGNUM)
+ (offset) = (cfun->machine->total_size);
+ else if ((from) == RETURN_ADDRESS_POINTER_REGNUM)
{
- if (leaf_function_p ())
- (offset) = 0;
- else (offset) = cfun->machine->gp_sp_offset
- + ((UNITS_PER_WORD - (POINTER_SIZE / BITS_PER_UNIT))
- * (BYTES_BIG_ENDIAN != 0));
+ if (leaf_function_p ())
+ (offset) = 0;
+ else (offset) = cfun->machine->gp_sp_offset
+ + ((UNITS_PER_WORD - (POINTER_SIZE / BITS_PER_UNIT))
+ * (BYTES_BIG_ENDIAN != 0));
}
else
gcc_unreachable ();
}
\f
/* Common code to emit the insns (or to write the instructions to a file)
- to save/restore registers.
+ to save/restore registers.
Other parts of the code assume that IQ2000_TEMP1_REGNUM (aka large_reg)
is not modified within save_restore_insns. */
if (store_p)
iq2000_emit_frame_related_store (mem_rtx, reg_rtx, gp_offset);
- else
+ else
{
emit_move_insn (reg_rtx, mem_rtx);
}
default:
gcc_unreachable ();
}
-
+
if (! pat)
return 0;
emit_insn (pat);
{
default:
break;
-
+
case IQ2000_BUILTIN_ADO16:
return expand_one_builtin (CODE_FOR_ado16, target, exp, code, 2);
code[2] = CONST_INT;
code[3] = CONST_INT;
return expand_one_builtin (CODE_FOR_ram, target, exp, code, 4);
-
+
case IQ2000_BUILTIN_CHKHDR:
return expand_one_builtin (CODE_FOR_chkhdr, target, exp, code, 2);
-
+
case IQ2000_BUILTIN_PKRL:
return expand_one_builtin (CODE_FOR_pkrl, target, exp, code, 2);
case IQ2000_BUILTIN_SYSCALL:
return expand_one_builtin (CODE_FOR_syscall, target, exp, code, 0);
}
-
+
return NULL_RTX;
}
\f
int *pretend_size, int no_rtl)
{
CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
- unsigned int iq2000_off = ! cum->last_arg_fp;
- unsigned int iq2000_fp_off = cum->last_arg_fp;
+ unsigned int iq2000_off = ! cum->last_arg_fp;
+ unsigned int iq2000_fp_off = cum->last_arg_fp;
if ((cum->arg_words < MAX_ARGS_IN_REGISTERS - iq2000_off))
{
- int iq2000_save_gp_regs
- = MAX_ARGS_IN_REGISTERS - cum->arg_words - iq2000_off;
- int iq2000_save_fp_regs
- = (MAX_ARGS_IN_REGISTERS - cum->fp_arg_words - iq2000_fp_off);
+ int iq2000_save_gp_regs
+ = MAX_ARGS_IN_REGISTERS - cum->arg_words - iq2000_off;
+ int iq2000_save_fp_regs
+ = (MAX_ARGS_IN_REGISTERS - cum->fp_arg_words - iq2000_fp_off);
- if (iq2000_save_gp_regs < 0)
- iq2000_save_gp_regs = 0;
- if (iq2000_save_fp_regs < 0)
- iq2000_save_fp_regs = 0;
+ if (iq2000_save_gp_regs < 0)
+ iq2000_save_gp_regs = 0;
+ if (iq2000_save_fp_regs < 0)
+ iq2000_save_fp_regs = 0;
- *pretend_size = ((iq2000_save_gp_regs * UNITS_PER_WORD)
- + (iq2000_save_fp_regs * UNITS_PER_FPREG));
+ *pretend_size = ((iq2000_save_gp_regs * UNITS_PER_WORD)
+ + (iq2000_save_fp_regs * UNITS_PER_FPREG));
- if (! (no_rtl))
+ if (! (no_rtl))
{
- if (cum->arg_words < MAX_ARGS_IN_REGISTERS - iq2000_off)
+ if (cum->arg_words < MAX_ARGS_IN_REGISTERS - iq2000_off)
{
- rtx ptr, mem;
+ rtx ptr, mem;
ptr = plus_constant (Pmode, virtual_incoming_args_rtx,
- (iq2000_save_gp_regs
* UNITS_PER_WORD));
- mem = gen_rtx_MEM (BLKmode, ptr);
- move_block_from_reg
- (cum->arg_words + GP_ARG_FIRST + iq2000_off,
- mem,
+ mem = gen_rtx_MEM (BLKmode, ptr);
+ move_block_from_reg
+ (cum->arg_words + GP_ARG_FIRST + iq2000_off,
+ mem,
iq2000_save_gp_regs);
- }
- }
+ }
+ }
}
}
\f
* total = COSTS_N_INSNS (2 * num_words);
break;
}
-
+
case FFS:
* total = COSTS_N_INSNS (6);
break;
* total = COSTS_N_INSNS ((GET_CODE (XEXP (x, 1)) == CONST_INT) ? 4 : 12);
else
* total = COSTS_N_INSNS (1);
- break;
+ break;
case ABS:
if (mode == SFmode || mode == DFmode)
else
* total = COSTS_N_INSNS (4);
break;
-
+
case PLUS:
case MINUS:
if (mode == SFmode || mode == DFmode)
else
* total = COSTS_N_INSNS (1);
break;
-
+
case NEG:
* total = (mode == DImode) ? 4 : 1;
break;
else
* total = COSTS_N_INSNS (69);
break;
-
+
case UDIV:
case UMOD:
* total = COSTS_N_INSNS (69);
break;
-
+
case SIGN_EXTEND:
* total = COSTS_N_INSNS (2);
break;
-
+
case ZERO_EXTEND:
* total = COSTS_N_INSNS (1);
break;
case CONST_INT:
* total = 0;
break;
-
+
case LABEL_REF:
* total = COSTS_N_INSNS (2);
break;
case SYMBOL_REF:
* total = COSTS_N_INSNS (SYMBOL_REF_FLAG (x) ? 1 : 2);
break;
-
+
case CONST_DOUBLE:
{
rtx high, low;
-
+
split_double (x, & high, & low);
-
+
* total = COSTS_N_INSNS ( (high == CONST0_RTX (GET_MODE (high))
|| low == CONST0_RTX (GET_MODE (low)))
? 2 : 4);
break;
}
-
+
default:
return false;
}
-/* Definitions of target machine for GNU compiler.
+/* Definitions of target machine for GNU compiler.
Vitesse IQ2000 processors
Copyright (C) 2003-2024 Free Software Foundation, Inc.
/* Storage Layout. */
#define BITS_BIG_ENDIAN 0
-#define BYTES_BIG_ENDIAN 1
+#define BYTES_BIG_ENDIAN 1
#define WORDS_BIG_ENDIAN 1
#define BITS_PER_WORD 32
#define MAX_BITS_PER_WORD 64
init_cumulative_args (& CUM, FNTYPE, LIBNAME) \
#define FUNCTION_ARG_REGNO_P(N) \
- (((N) >= GP_ARG_FIRST && (N) <= GP_ARG_LAST))
+ (((N) >= GP_ARG_FIRST && (N) <= GP_ARG_LAST))
\f
/* On the IQ2000, R2 and R3 are the only register thus used. */
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-#undef GNU_USER_TARGET_OS_CPP_BUILTINS
+#undef GNU_USER_TARGET_OS_CPP_BUILTINS
#define GNU_USER_TARGET_OS_CPP_BUILTINS() \
do \
{ \
<http://www.gnu.org/licenses/>. */
extern int lm32_return_in_memory (tree type);
-extern void lm32_declare_object (FILE *stream, char *name, char *init_string,
+extern void lm32_declare_object (FILE *stream, char *name, char *init_string,
char *final_string, int size);
extern void lm32_expand_prologue (void);
extern void lm32_expand_epilogue (void);
extern void lm32_print_operand (FILE *file, rtx op, int letter);
extern void lm32_print_operand_address (FILE *file, rtx addr);
-extern HOST_WIDE_INT lm32_compute_initial_elimination_offset (int from,
+extern HOST_WIDE_INT lm32_compute_initial_elimination_offset (int from,
int to);
extern int lm32_can_use_return (void);
extern rtx lm32_return_addr_rtx (int count, rtx frame);
}
/* Generate the code to compare (and possibly branch) two integer values
- TEST_CODE is the comparison code we are trying to emulate
+ TEST_CODE is the comparison code we are trying to emulate
(or implement directly)
- RESULT is where to store the result of the comparison,
+ RESULT is where to store the result of the comparison,
or null to emit a branch
CMP0 CMP1 are the two comparison operands
DESTINATION is the destination of the branch, or null to only compare
*/
static void
-gen_int_relational (enum rtx_code code,
- rtx result,
- rtx cmp0,
- rtx cmp1,
- rtx destination)
+gen_int_relational (enum rtx_code code,
+ rtx result,
+ rtx cmp0,
+ rtx cmp1,
+ rtx destination)
{
machine_mode mode;
int branch_p;
/* Is this a branch or compare. */
branch_p = (destination != 0);
- /* Instruction set doesn't support LE or LT, so swap operands and use
+ /* Instruction set doesn't support LE or LT, so swap operands and use
GE, GT. */
switch (code)
{
rtx op0 = operands[2];
rtx op1 = operands[3];
- gen_int_relational (code, target, op0, op1, NULL_RTX);
+ gen_int_relational (code, target, op0, op1, NULL_RTX);
}
/* Compare OPERANDS[1] with OPERANDS[2] using comparison code
rtx op1 = operands[2];
rtx destination = operands[3];
- gen_int_relational (code, NULL_RTX, op0, op1, destination);
+ gen_int_relational (code, NULL_RTX, op0, op1, destination);
}
/* Generate and emit RTL to save or restore callee save registers. */
{
rtx offset_rtx;
rtx mem;
-
+
offset_rtx = GEN_INT (offset);
if (satisfies_constraint_K (offset_rtx))
- {
+ {
mem = gen_rtx_MEM (word_mode,
gen_rtx_PLUS (Pmode,
stack_pointer_rtx,
else
{
/* r10 is caller saved so it can be used as a temp reg. */
- rtx r10;
-
+ rtx r10;
+
r10 = gen_rtx_REG (word_mode, 10);
insn = emit_move_insn (r10, offset_rtx);
if (op == 0)
RTX_FRAME_RELATED_P (insn) = 1;
insn = emit_add (r10, r10, stack_pointer_rtx);
if (op == 0)
- RTX_FRAME_RELATED_P (insn) = 1;
+ RTX_FRAME_RELATED_P (insn) = 1;
mem = gen_rtx_MEM (word_mode, r10);
- }
-
+ }
+
if (op == 0)
insn = emit_move_insn (mem, gen_rtx_REG (word_mode, regno));
else
insn = emit_move_insn (gen_rtx_REG (word_mode, regno), mem);
-
+
/* only prologue instructions which set the sp fp or save a
register should be marked as frame related. */
if (op == 0)
{
/* Move sp to fp. */
insn = emit_move_insn (frame_pointer_rtx, stack_pointer_rtx);
- RTX_FRAME_RELATED_P (insn) = 1;
+ RTX_FRAME_RELATED_P (insn) = 1;
- /* Add offset - Don't use total_size, as that includes pretend_size,
+ /* Add offset - Don't use total_size, as that includes pretend_size,
which isn't part of this frame? */
- insn = emit_add (frame_pointer_rtx,
+ insn = emit_add (frame_pointer_rtx,
frame_pointer_rtx,
GEN_INT (current_frame_info.args_size +
current_frame_info.callee_size +
fprintf (file, "%s", reg_names[regnum]);
}
else if (code == HIGH)
- output_addr_const (file, XEXP (op, 0));
+ output_addr_const (file, XEXP (op, 0));
else if (code == MEM)
output_address (GET_MODE (op), XEXP (op, 0));
else if (letter == 'z' && GET_CODE (op) == CONST_INT && INTVAL (op) == 0)
*total = COSTS_N_INSNS (2);
return true;
}
- /* Fall through. */
+ /* Fall through. */
default:
if (satisfies_constraint_K (x))
static bool
lm32_legitimate_address_p (machine_mode mode ATTRIBUTE_UNUSED, rtx x,
bool strict, code_helper)
-{
- /* (rM) */
+{
+ /* (rM) */
if (strict && REG_P (x) && STRICT_REG_OK_FOR_BASE_P (x))
return true;
if (!strict && REG_P (x) && NONSTRICT_REG_OK_FOR_BASE_P (x))
return true;
-
- /* (rM)+literal) */
- if (GET_CODE (x) == PLUS
- && REG_P (XEXP (x, 0))
+
+ /* (rM)+literal) */
+ if (GET_CODE (x) == PLUS
+ && REG_P (XEXP (x, 0))
&& ((strict && STRICT_REG_OK_FOR_BASE_P (XEXP (x, 0)))
- || (!strict && NONSTRICT_REG_OK_FOR_BASE_P (XEXP (x, 0))))
- && GET_CODE (XEXP (x, 1)) == CONST_INT
+ || (!strict && NONSTRICT_REG_OK_FOR_BASE_P (XEXP (x, 0))))
+ && GET_CODE (XEXP (x, 1)) == CONST_INT
&& satisfies_constraint_K (XEXP ((x), 1)))
return true;
-
- /* gp(sym) */
- if (GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_SMALL_P (x))
+
+ /* gp(sym) */
+ if (GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_SMALL_P (x))
return true;
-
- return false;
+
+ return false;
}
-/* Check a move is not memory to memory. */
+/* Check a move is not memory to memory. */
-bool
+bool
lm32_move_ok (machine_mode mode, rtx operands[2]) {
if (memory_operand (operands[0], mode))
return register_or_zero_operand (operands[1], mode);
%{muser-enabled} \
"
-/* Let link script define all link options.
+/* Let link script define all link options.
Default to using simulator link script. */
#undef STARTFILE_SPEC
enum reg_class
{
- NO_REGS,
+ NO_REGS,
GENERAL_REGS,
ALL_REGS,
LIM_REG_CLASSES
&& A0_OR_PSEUDO (patternr[5])
&& GET_MODE (patternr[5]) == HImode)
|| RTX_IS ("ms")));
- case CONSTRAINT_Sd:
+ case CONSTRAINT_Sd:
{
/* This is the common "src/dest" address */
rtx r;
#undef TARGET_PRINT_OPERAND_PUNCT_VALID_P
#define TARGET_PRINT_OPERAND_PUNCT_VALID_P m32c_print_operand_punct_valid_p
-static bool
+static bool
m32c_print_operand_punct_valid_p (unsigned char c)
{
if (c == '&' || c == '!')
{
TREE_THIS_VOLATILE (node) = true;
}
- }
+ }
}
/* Hash table of pragma info. */
/* ??? This relied on the now-defunct MEM_SCALAR and MEM_IN_STRUCT_P
flags. */
return false;
-}
+}
/* Expanders */
if (flag_stack_usage_info)
current_function_static_stack_size = frame_size;
-
+
if (frame_size > 254)
{
extra_frame_size = frame_size - 254;
for (i = 0; i < NUM_MACHINE_MODES; i++)
{
machine_mode m = (machine_mode) i;
-
+
switch (GET_MODE_CLASS (m))
{
case MODE_INT:
#define UNITS_PER_WORD 4
/* Define this macro if it is advisable to hold scalars in registers
- in a wider mode than that declared by the program. In such cases,
+ in a wider mode than that declared by the program. In such cases,
the value is constrained to be within the bounds of the declared
type, but kept valid in the wider mode. The signedness of the
extension may differ from that of the type. */
#endif
#define FIRST_PSEUDO_REGISTER (M32R_NUM_REGISTERS + SUBTARGET_NUM_REGISTERS)
-
+
/* 1 for registers that have pervasive standard uses
and are not available for the register allocator.
/* Currently, JUMP_TABLES_IN_TEXT_SECTION must be defined in order to
keep switch tables in the text section. */
-
+
#define JUMP_TABLES_IN_TEXT_SECTION 1
/* Use the default action for outputting the case label. */
tree a;
gcc_assert (TREE_CODE (func) == FUNCTION_DECL);
-
+
a = lookup_attribute ("interrupt", DECL_ATTRIBUTES (func));
if (a != NULL_TREE)
return m68k_fk_interrupt_handler;
m68k_ok_for_sibcall_p (tree decl, tree exp)
{
enum m68k_function_kind kind;
-
+
/* We cannot use sibcalls for nested functions because we use the
static chain register for indirect calls. */
if (CALL_EXPR_STATIC_CHAIN (exp))
the same. */
if (decl && m68k_get_function_kind (decl) == kind)
return true;
-
+
return false;
}
return;
}
-/* Output a dbCC; jCC sequence. Note we do not handle the
+/* Output a dbCC; jCC sequence. Note we do not handle the
floating point version of this sequence (Fdbcc).
OPERANDS are as in the two peepholes. CODE is the code
returned by m68k_output_branch_<mode>. */
/* Legitimize PIC addresses. If the address is already
position-independent, we return ORIG. Newly generated
position-independent addresses go to REG. If we need more
- than one register, we lose.
+ than one register, we lose.
An address is legitimized by making an indirect reference
through the Global Offset Table with the name of the symbol
- used as an offset.
+ used as an offset.
- The assembler and linker are responsible for placing the
+ The assembler and linker are responsible for placing the
address of the symbol in the GOT. The function prologue
is responsible for initializing a5 to the starting address
of the GOT.
The assembler is also responsible for translating a symbol name
- into a constant displacement from the start of the GOT.
+ into a constant displacement from the start of the GOT.
A quick example may make things a little clearer:
movel a5@(_foo:w), a0
movel #12345, a0@
-
- That (in a nutshell) is how *all* symbol and label references are
+
+ That (in a nutshell) is how *all* symbol and label references are
handled. */
rtx
/* legitimize both operands of the PLUS */
gcc_assert (GET_CODE (XEXP (orig, 0)) == PLUS);
-
+
base = legitimize_pic_address (XEXP (XEXP (orig, 0), 0), Pmode, reg);
orig = legitimize_pic_address (XEXP (XEXP (orig, 0), 1), Pmode,
base == reg ? 0 : reg);
is the simpliest way of generating a call. The difference between
__tls_get_addr() and libcall is that the result is returned in D0
instead of A0. To workaround this, we use m68k_libcall_value_in_a0_p
- which temporarily switches returning the result to A0. */
+ which temporarily switches returning the result to A0. */
m68k_libcall_value_in_a0_p = true;
a0 = emit_library_call_value (m68k_get_tls_get_addr (), NULL_RTX, LCT_PURE,
Pmode, x, Pmode);
m68k_libcall_value_in_a0_p = false;
-
+
insns = get_insns ();
end_sequence ();
/* Emit instruction sequence that calls __m68k_read_tp.
A pseudo register with result of __m68k_read_tp call is returned. */
-static rtx
+static rtx
m68k_call_m68k_read_tp (void)
{
rtx a0;
is the simpliest way of generating a call. The difference between
__m68k_read_tp() and libcall is that the result is returned in D0
instead of A0. To workaround this, we use m68k_libcall_value_in_a0_p
- which temporarily switches returning the result to A0. */
+ which temporarily switches returning the result to A0. */
/* Emit the call sequence. */
m68k_libcall_value_in_a0_p = true;
rtx eqv;
rtx a0;
rtx x;
-
+
/* Attach a unique REG_EQUIV, to allow the RTL optimizers to
share the LDM result with other LD model accesses. */
eqv = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, const0_rtx),
to get the desired constant. */
/* This code has been fixed for cross-compilation. */
-
+
static int inited_68881_table = 0;
static const char *const strings_68881[7] = {
if (real_identical (r, &values_68881[i]))
return (codes_68881[i]);
}
-
+
if (GET_MODE (x) == SFmode)
return 0;
unspec = XEXP (addr.offset, 0);
if (GET_CODE (unspec) == PLUS && CONST_INT_P (XEXP (unspec, 1)))
unspec = XEXP (unspec, 0);
- if (GET_CODE (unspec) != UNSPEC
+ if (GET_CODE (unspec) != UNSPEC
|| (XINT (unspec, 1) != UNSPEC_RELOC16
&& XINT (unspec, 1) != UNSPEC_RELOC32))
return orig_x;
x = replace_equiv_address_nv (orig_x, x);
return x;
}
-
+
\f
/* A C compound statement to output to stdio stream STREAM the
assembler syntax for an instruction operand that is a memory
It is possible for PIC to generate a (plus (label_ref...) (reg...))
and we handle that just like we would a (plus (symbol_ref...) (reg...)).
- This routine is responsible for distinguishing between -fpic and -fPIC
+ This routine is responsible for distinguishing between -fpic and -fPIC
style relocations in an address. When generating -fpic code the
offset is output in word mode (e.g. movel a5@(_foo:w), a0). When generating
-fPIC code the offset is output in long mode (e.g. movel a5@(_foo:l), a0) */
case CPU_CFV3:
insn_size = sched_get_attr_size_int (insn);
-
+
/* ColdFire V3 and V4 cores have instruction buffers that can
accumulate up to 8 instructions regardless of instructions'
sizes. So we should take care not to "prefetch" 24 one-word
#define DEBUGGER_REGNO(REGNO) (REGNO)
#if 0
-/* SVR4 m68k assembler is bitching on the `comm i,1,1' which askes for
+/* SVR4 m68k assembler is bitching on the `comm i,1,1' which askes for
1 byte alignment. Don't generate alignment for COMMON seems to be
safer until we the assembler is fixed. */
#undef ASM_OUTPUT_ALIGNED_COMMON
/* Currently, JUMP_TABLES_IN_TEXT_SECTION must be defined in order to
keep switch tables in the text section. */
-
+
#define JUMP_TABLES_IN_TEXT_SECTION 1
/* In m68k svr4, using swbeg is the standard way to do switch
} \
while (0)
-/* Don't try using XFmode on the 68010. */
+/* Don't try using XFmode on the 68010. */
#undef LONG_DOUBLE_TYPE_MODE
#define LONG_DOUBLE_TYPE_MODE (TARGET_68020 ? XFmode : DFmode)
-/* Definitions of MCore target.
+/* Definitions of MCore target.
Copyright (C) 1998-2024 Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
ASM_OUTPUT_LABEL(FILE, NAME); \
} \
while (0)
-
+
/* Output the size directive for a decl in rest_of_decl_compilation
in the case where we did not do so before the initializer.
Once we find the error_mark_node, we know that the value of
#define CTORS_SECTION_ASM_OP "\t.section\t.ctors,\"aw\""
#undef DTORS_SECTION_ASM_OP
#define DTORS_SECTION_ASM_OP "\t.section\t.dtors,\"aw\""
-
+
#endif /* __MCORE_ELF_H__ */
emit_insn (gen_movsi (nval, val));
val = nval;
}
-
+
if (direction > 0)
insn = gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, val);
else
insn = gen_subsi3 (stack_pointer_rtx, stack_pointer_rtx, val);
-
+
emit_insn (insn);
}
}
{
int reg;
int live_regs_mask = 0;
-
+
* count = 0;
for (reg = 0; reg < FIRST_PSEUDO_REGISTER; reg++)
case REG:
fprintf (stream, "(%s)", reg_names[REGNO (x)]);
break;
-
+
case PLUS:
{
rtx base = XEXP (x, 0);
HOST_WIDE_INT val = INTVAL (exp);
/* Easy constants. */
- if ( CONST_OK_FOR_I (val)
- || CONST_OK_FOR_M (val)
- || CONST_OK_FOR_N (val)
+ if ( CONST_OK_FOR_I (val)
+ || CONST_OK_FOR_M (val)
+ || CONST_OK_FOR_N (val)
|| (code == PLUS && CONST_OK_FOR_L (val)))
- return 1;
+ return 1;
else if (code == AND
&& ( CONST_OK_FOR_M (~val)
|| CONST_OK_FOR_N (~val)))
return 2;
- else if (code == PLUS
- && ( CONST_OK_FOR_I (-val)
- || CONST_OK_FOR_M (-val)
- || CONST_OK_FOR_N (-val)))
- return 2;
+ else if (code == PLUS
+ && ( CONST_OK_FOR_I (-val)
+ || CONST_OK_FOR_M (-val)
+ || CONST_OK_FOR_N (-val)))
+ return 2;
- return 5;
+ return 5;
}
-/* What does an and instruction cost - we do this b/c immediates may
+/* What does an and instruction cost - we do this b/c immediates may
have been relaxed. We want to ensure that cse will cse relaxed immeds
out. Otherwise we'll get bad code (multiple reloads of the same const). */
return 2;
val = INTVAL (XEXP (x, 1));
-
+
/* Do it directly. */
if (CONST_OK_FOR_K (val) || CONST_OK_FOR_M (~val))
return 2;
/* Takes two instructions to load. */
else if (TARGET_HARDLIT && mcore_const_ok_for_inline (val))
return 4;
-
+
/* Takes a lrw to load. */
return 5;
}
case FIX:
*total = COSTS_N_INSNS (100);
return true;
-
+
default:
return false;
}
if (GET_CODE (op1) == CONST_INT)
{
HOST_WIDE_INT val = INTVAL (op1);
-
+
switch (code)
{
case GTU:
code = code == LE ? LT : GE;
}
break;
-
+
default:
break;
}
}
-
+
if (CONSTANT_P (op1) && GET_CODE (op1) != CONST_INT)
op1 = force_reg (SImode, op1);
code = NE;
invert = true;
/* FALLTHRU */
-
+
case NE: /* Use normal condition, cmpne. */
if (GET_CODE (op1) == CONST_INT && ! CONST_OK_FOR_K (INTVAL (op1)))
op1 = force_reg (SImode, op1);
code = GT;
invert = true;
/* FALLTHRU */
-
+
case GT: /* Use normal condition, reversed cmplt. */
if (GET_CODE (op1) == CONST_INT)
op1 = force_reg (SImode, op1);
code = LT;
invert = true;
/* FALLTHRU */
-
+
case LT: /* Use normal condition, cmplt. */
- if (GET_CODE (op1) == CONST_INT &&
+ if (GET_CODE (op1) == CONST_INT &&
/* covered by btsti x,31. */
INTVAL (op1) != 0 &&
! CONST_OK_FOR_J (INTVAL (op1)))
code = LEU;
invert = true;
/* FALLTHRU */
-
+
case LEU: /* Use normal condition, reversed cmphs. */
if (GET_CODE (op1) == CONST_INT && INTVAL (op1) != 0)
op1 = force_reg (SImode, op1);
code = GEU;
invert = true;
/* FALLTHRU */
-
+
case GEU: /* Use normal condition, cmphs. */
if (GET_CODE (op1) == CONST_INT && INTVAL (op1) != 0)
op1 = force_reg (SImode, op1);
{
static char buffer[20];
rtx addr = operands [index];
-
+
if (REG_P (addr))
{
if (TARGET_CG_DATA)
{
gcc_assert (mcore_current_function_name);
-
+
ASM_OUTPUT_CG_EDGE (asm_out_file, mcore_current_function_name,
"unknown", 1);
}
{
gcc_assert (mcore_current_function_name);
gcc_assert (GET_CODE (addr) == SYMBOL_REF);
-
+
ASM_OUTPUT_CG_EDGE (asm_out_file, mcore_current_function_name,
XSTR (addr, 0), 0);
}
-
+
sprintf (buffer, "jbsr\t%%%d", index);
}
{
if (value >= 0 && value <= 127)
return 1;
-
+
/* Try exact power of two. */
if (CONST_OK_FOR_M (value))
return 1;
-
+
/* Try exact power of two - 1. */
if (CONST_OK_FOR_N (value) && value != -1)
return 1;
-
+
return 0;
}
mcore_const_ok_for_inline (HOST_WIDE_INT value)
{
HOST_WIDE_INT x, y;
-
+
return try_constant_tricks (value, & x, & y) > 0;
}
{
HOST_WIDE_INT x, y;
- return try_constant_tricks (value, & x, & y) == 2;
-}
+ return try_constant_tricks (value, & x, & y) == 2;
+}
/* Try tricks to load a constant inline and return the trick number if
success (0 is non-inlinable).
-
+
0: not inlinable
1: single instruction (do the usual thing)
2: single insn followed by a 'not'
if (const_ok_for_mcore (value))
return 1; /* Do the usual thing. */
-
- if (! TARGET_HARDLIT)
+
+ if (! TARGET_HARDLIT)
return 0;
if (const_ok_for_mcore (~value))
return 11;
}
-
+
return 0;
}
/* Check whether reg is dead at first. This is done by searching ahead
for either the next use (i.e., reg is live), a death note, or a set of
- reg. Don't just use dead_or_set_p() since reload does not always mark
+ reg. Don't just use dead_or_set_p() since reload does not always mark
deaths (especially if PRESERVE_DEATH_NOTES_REGNO_P is not defined). We
can ignore subregs by extracting the actual register. BRC */
if ((mask & 0x1) == 0x1)
{
out_operands[1] = GEN_INT (bit);
-
+
output_asm_insn ("bseti\t%0,%1", out_operands);
}
mask >>= 1;
- }
+ }
return "";
}
if ((mask & 0x1) == 0x0)
{
out_operands[1] = GEN_INT (bit);
-
+
output_asm_insn ("bclri\t%0,%1", out_operands);
}
-
+
mask >>= 1;
- }
+ }
return "";
}
/* First output the test if folded into the pattern. */
- if (test)
+ if (test)
output_asm_insn (test, operands);
/* Load the constant - for now, only support constants that can be
output_asm_insn ("bgeni\t%0,%P1", out_operands);
else if (CONST_OK_FOR_N (load_value))
output_asm_insn ("bmaski\t%0,%N1", out_operands);
-
+
/* Output the constant adjustment. */
if (load_value > adjust_value)
{
return "";
}
-/* Outputs the peephole for moving a constant that gets not'ed followed
+/* Outputs the peephole for moving a constant that gets not'ed followed
by an and (i.e. combine the not and the and into andn). BRC */
const char *
if (x >= 0 && x <= 127)
load_op = "movi\t%0,%1";
-
+
/* Try exact power of two. */
else if (CONST_OK_FOR_M (x))
load_op = "bgeni\t%0,%P1";
-
+
/* Try exact power of two - 1. */
else if (CONST_OK_FOR_N (x))
load_op = "bmaski\t%0,%N1";
-
+
else
{
load_op = "BADMOVI-andn\t%0, %1";
turned into lrw's. Our caller uses try_constant_tricks to back
off to an lrw rather than calling this routine. */
gcc_assert (trick_no != 0);
-
+
if (trick_no == 1)
x = value;
/* operands: 0 = dst, 1 = load immed., 2 = immed. adjustment. */
out_operands[0] = operands[0];
out_operands[1] = GEN_INT (x);
-
+
if (trick_no > 2)
out_operands[2] = GEN_INT (y);
if (x >= 0 && x <= 127)
sprintf (load_op, "movi\t%s,%%1", dst_fmt);
-
+
/* Try exact power of two. */
else if (CONST_OK_FOR_M (x))
sprintf (load_op, "bgeni\t%s,%%P1", dst_fmt);
-
+
/* Try exact power of two - 1. */
else if (CONST_OK_FOR_N (x))
sprintf (load_op, "bmaski\t%s,%%N1", dst_fmt);
-
+
else
{
sprintf (load_op, "BADMOVI-inline_const %s, %%1", dst_fmt);
gcc_unreachable ();
- }
+ }
switch (trick_no)
{
default:
return "";
}
-
+
output_asm_insn (buf, out_operands);
return "";
if (GET_CODE (dst) == REG)
{
if (GET_CODE (src) == REG)
- {
+ {
if (REGNO (src) == CC_REG) /* r-c */
- return "mvc\t%0";
- else
+ return "mvc\t%0";
+ else
return "mov\t%0,%1"; /* r-r*/
}
else if (GET_CODE (src) == MEM)
{
- if (GET_CODE (XEXP (src, 0)) == LABEL_REF)
+ if (GET_CODE (XEXP (src, 0)) == LABEL_REF)
return "lrw\t%0,[%1]"; /* a-R */
else
switch (GET_MODE (src)) /* r-m */
else if (GET_CODE (src) == CONST_INT)
{
HOST_WIDE_INT x, y;
-
+
if (CONST_OK_FOR_I (INTVAL (src))) /* r-I */
return "movi\t%0,%1";
else if (CONST_OK_FOR_M (INTVAL (src))) /* r-M */
return "bmaski\t%0,%N1\t// %1 %x1";
else if (try_constant_tricks (INTVAL (src), &x, &y)) /* R-P */
return output_inline_const (SImode, operands); /* 1-2 insns */
- else
+ else
return "lrw\t%0,%x1\t// %1"; /* Get it from literal pool. */
}
else
{
int dstreg = REGNO (dst);
int srcreg = REGNO (src);
-
+
/* Ensure the second source not overwritten. */
if (srcreg + 1 == dstreg)
return "mov %R0,%R1\n\tmov %0,%1";
rtx memexp = XEXP (src, 0);
int dstreg = REGNO (dst);
int basereg = -1;
-
+
if (GET_CODE (memexp) == LABEL_REF)
return "lrw\t%0,[%1]\n\tlrw\t%R0,[%R1]";
- else if (GET_CODE (memexp) == REG)
+ else if (GET_CODE (memexp) == REG)
basereg = REGNO (memexp);
else if (GET_CODE (memexp) == PLUS)
{
{
/* Just load them in reverse order. */
return "ldw\t%R0,%R1\n\tldw\t%0,%1";
-
+
/* XXX: alternative: move basereg to basereg+1
and then fall through. */
}
{
if (GET_CODE (op) == CONST_INT && CONST_OK_FOR_M (~INTVAL (op)))
return 1;
-
+
return 0;
}
gen_rtx_IOR (SImode, operands[0],
GEN_INT (mask))));
}
-
+
return 1;
}
if (width == 8 && posn % 8 == 0)
/* Byte sized and aligned; let caller break it up. */
return 0;
-
+
if (width == 16 && posn % 16 == 0)
/* Short sized and aligned; let caller break it up. */
return 0;
bits. */
if (width + posn != (int) GET_MODE_SIZE (SImode))
{
- ereg = force_reg (SImode, GEN_INT ((1 << width) - 1));
+ ereg = force_reg (SImode, GEN_INT ((1 << width) - 1));
emit_insn (gen_rtx_SET (sreg, gen_rtx_AND (SImode, sreg, ereg)));
}
if (posn != 0)
emit_insn (gen_rtx_SET (sreg, gen_rtx_ASHIFT (SImode, sreg,
GEN_INT (posn))));
-
+
emit_insn (gen_rtx_SET (operands[0],
gen_rtx_IOR (SImode, operands[0], sreg)));
if (active[phase])
{
active[phase] = false;
-
+
x = adjust_address (dst_mem, mode[phase], offset_st);
emit_insn (gen_rtx_SET (x, temp[phase]));
/* Might have to spill bytes to re-assemble a big argument that
was passed partially in registers and partially on the stack. */
nbytes = crtl->args.pretend_args_size;
-
+
/* Determine how much space for spilled anonymous args (e.g., stdarg). */
if (current_function_anonymous_args)
nbytes += (NPARM_REGS - number_of_regs_before_varargs) * UNITS_PER_WORD;
-
+
infp->arg_size = nbytes;
/* How much space to save non-volatile registers we stomp. */
/* Make sure we have a whole number of words for the locals. */
if (infp->local_size % STACK_BYTES)
infp->local_size = (infp->local_size + STACK_BYTES - 1) & ~ (STACK_BYTES -1);
-
+
/* Only thing we know we have to pad is the outbound space, since
we've aligned our locals assuming that base of locals is aligned. */
infp->pad_local = 0;
step = localregarg + infp->pad_reg;
infp->reg_offset = infp->local_size;
-
+
if (outbounds + step <= ADDI_REACH && !frame_pointer_needed)
{
step += outbounds;
infp->reg_offset += outbounds;
outbounds = 0;
}
-
+
infp->arg_offset = step - 4;
infp->growth[growths++] = step;
infp->reg_growth = growths;
infp->local_growth = growths;
-
+
/* If we haven't already folded it in. */
if (outbounds)
infp->growth[growths++] = outbounds;
-
+
goto finish;
}
step = ADDI_REACH; /* As much up front as we can. */
if (step > all)
step = all;
-
+
/* XXX: Consider whether step will still be aligned; we believe so. */
infp->arg_offset = step - 4;
infp->growth[growths++] = step;
/* Finish off if we need to do so. */
if (outbounds)
infp->growth[growths++] = outbounds;
-
+
goto finish;
}
if (infp->local_size % STACK_BYTES)
infp->pad_local = STACK_BYTES - (infp->local_size % STACK_BYTES);
-
+
step = infp->local_size + infp->pad_local;
-
+
if (!frame_pointer_needed)
{
step += outbounds;
outbounds = 0;
}
-
+
infp->growth[growths++] = step;
infp->local_growth = growths;
/* If there's any left to be done. */
if (outbounds)
infp->growth[growths++] = outbounds;
-
+
goto finish;
}
/* XXX: optimizations that we'll want to play with....
-- regarg is not aligned, but it's a small number of registers;
- use some of localsize so that regarg is aligned and then
+ use some of localsize so that regarg is aligned and then
save the registers. */
/* Simple encoding; plods down the stack buying the pieces as it goes.
-- but it is safe for all alignments. */
if (regarg % STACK_BYTES != 0)
infp->pad_reg = STACK_BYTES - (regarg % STACK_BYTES);
-
+
infp->growth[growths++] = infp->arg_size + infp->reg_size + infp->pad_reg;
infp->reg_growth = growths;
infp->arg_offset = infp->growth[0] - 4;
infp->reg_offset = 0;
-
+
if (frame_pointer_needed)
{
if (infp->local_size % STACK_BYTES != 0)
infp->pad_local = STACK_BYTES - (infp->local_size % STACK_BYTES);
-
+
infp->growth[growths++] = infp->local_size + infp->pad_local;
infp->local_growth = growths;
-
+
infp->growth[growths++] = outbounds;
}
else
{
if ((infp->local_size + outbounds) % STACK_BYTES != 0)
infp->pad_local = STACK_BYTES - ((infp->local_size + outbounds) % STACK_BYTES);
-
+
infp->growth[growths++] = infp->local_size + infp->pad_local + outbounds;
infp->local_growth = growths;
}
finish:
gcc_assert (infp->reg_offset >= 0);
gcc_assert (growths <= MAX_STACK_GROWS);
-
+
for (i = 0; i < growths; i++)
gcc_assert (!(infp->growth[i] % STACK_BYTES));
}
number_of_regs_before_varargs = *args_so_far;
if (!TYPE_NO_NAMED_ARGS_STDARG_P (TREE_TYPE (current_function_decl)))
number_of_regs_before_varargs += mcore_num_arg_regs (arg.mode, arg.type);
-
+
/* There is a bug somewhere in the arg handling code.
Until I can find it this workaround always pushes the
last named argument onto the stack. */
number_of_regs_before_varargs = *args_so_far;
-
+
/* The last named argument may be split between argument registers
and the stack. Allow for this here. */
if (number_of_regs_before_varargs > NPARM_REGS)
/* Find out what we're doing. */
layout_mcore_frame (&fi);
-
+
space_allocated = fi.arg_size + fi.reg_size + fi.local_size +
fi.outbound_size + fi.pad_outbound + fi.pad_local + fi.pad_reg;
rtx x;
x = DECL_RTL (current_function_decl);
-
+
gcc_assert (GET_CODE (x) == MEM);
-
+
x = XEXP (x, 0);
-
+
gcc_assert (GET_CODE (x) == SYMBOL_REF);
-
+
free (mcore_current_function_name);
-
+
mcore_current_function_name = xstrdup (XSTR (x, 0));
-
+
ASM_OUTPUT_CG_NODE (asm_out_file, mcore_current_function_name, space_allocated);
if (cfun->calls_alloca)
if (mcore_naked_function_p ())
return;
-
+
/* Handle stdarg+regsaves in one shot: can't be more than 64 bytes. */
output_stack_adjust (-1, fi.growth[growth++]); /* Grows it. */
{
int i;
int offs = fi.reg_offset;
-
+
for (i = 15; i >= 0; i--)
{
if (offs == 0 && i == 15 && ((fi.reg_mask & 0xc000) == 0xc000))
/* If we haven't already purchased to 'fp'. */
if (growth < fi.local_growth)
output_stack_adjust (-1, fi.growth[growth++]); /* Grows it. */
-
+
emit_insn (gen_movsi (frame_pointer_rtx, stack_pointer_rtx));
/* ... and then go any remaining distance for outbounds, etc. */
int offs;
int growth = MAX_STACK_GROWS - 1 ;
-
+
/* Find out what we're doing. */
layout_mcore_frame(&fi);
register save information back off the stack. */
while (growth >= fi.reg_growth)
output_stack_adjust ( 1, fi.growth[growth--]);
-
+
offs = fi.reg_offset;
-
+
for (i = 15; i >= 0; i--)
{
if (offs == 0 && i == 15 && ((fi.reg_mask & 0xc000) == 0xc000))
/* Find the starting register. */
first_reg = 15;
-
+
while (fi.reg_mask & (1 << first_reg))
first_reg--;
-
+
first_reg++;
emit_insn (gen_load_multiple (gen_rtx_REG (SImode, first_reg),
if (pool_size)
{
fprintf (asm_out_file, "\t.align 2\n");
-
+
for (i = 0; i < pool_size; i++)
{
pool_node * p = pool_vector + i;
(*targetm.asm_out.internal_label) (asm_out_file, "L", CODE_LABEL_NUMBER (p->label));
-
+
output_asm_insn (".long %0", &p->value);
}
-
+
pool_size = 0;
}
is_cond_candidate (rtx insn)
{
/* The only things we conditionalize are those that can be directly
- changed into a conditional. Only bother with SImode items. If
+ changed into a conditional. Only bother with SImode items. If
we wanted to be a little more aggressive, we could also do other
modes such as DImode with reg-reg move or load 0. */
if (NONJUMP_INSN_P (insn))
GET_CODE (dst) != SUBREG) ||
GET_MODE (dst) != SImode)
return COND_NO;
-
+
src = XEXP (pat, 1);
if ((GET_CODE (src) == REG ||
GET_CODE (SUBREG_REG (src)) == REG)) &&
GET_MODE (src) == SImode)
return COND_MOV_INSN;
- else if (GET_CODE (src) == CONST_INT &&
+ else if (GET_CODE (src) == CONST_INT &&
INTVAL (src) == 0)
return COND_CLR_INSN;
else if (GET_CODE (src) == PLUS &&
/* Some insns that we don't bother with:
(set (rx:DI) (ry:DI))
(set (rx:DI) (const_int 0))
- */
+ */
}
else if (JUMP_P (insn)
switch (num)
{
- case COND_MOV_INSN:
+ case COND_MOV_INSN:
case COND_CLR_INSN:
if (cond)
c_insn = gen_movt0 (dst, src, dst);
else
c_insn = gen_incscc_false (dst, dst);
break;
-
+
case COND_DEC_INSN:
if (cond)
c_insn = gen_decscc (dst, dst);
used any more beyond this point for the mcore). */
REG_NOTES (c_insn) = REG_NOTES (insn);
}
-
+
if (num == COND_BRANCH_INSN)
{
/* For jumps, we need to be a little bit careful and emit the new jump
This way, the barrier following the old (uncond) jump will get
deleted, but the label won't. */
c_insn = emit_jump_insn_before (c_insn, insn);
-
+
++ LABEL_NUSES (dst);
-
+
JUMP_LABEL (c_insn) = dst;
}
else
c_insn = emit_insn_after (c_insn, insn);
delete_insn (insn);
-
+
return as_a <rtx_insn *> (c_insn);
}
/* Attempt to change a basic block into a series of conditional insns. This
- works by taking the branch at the end of the 1st block and scanning for the
+ works by taking the branch at the end of the 1st block and scanning for the
end of the 2nd block. If all instructions in the 2nd block have cond.
versions and the label at the start of block 3 is the same as the target
from the branch at block 1, then conditionalize all insn in block 2 using
the inverse condition of the branch at block 1. (Note I'm bending the
definition of basic block here.)
- e.g., change:
+ e.g., change:
bt L2 <-- end of block 1 (delete)
- mov r7,r8
- addu r7,1
+ mov r7,r8
+ addu r7,1
br L3 <-- end of block 2
L2: ... <-- start of block 3 (NUSES==1)
int br_lab_num;
int blk_size = 0;
-
+
/* Check that the first insn is a candidate conditional jump. This is
the one that we'll eliminate. If not, advance to the next insn to
try. */
/* Scan forward for the start of block 2: it must start with a
label and that label must be the same as the branch target
label from block 1. We don't care about whether block 2 actually
- ends with a branch or a label (an uncond. branch is
+ ends with a branch or a label (an uncond. branch is
conditionalizable). */
for (insn = NEXT_INSN (first); insn; insn = NEXT_INSN (insn))
{
enum rtx_code code;
-
+
code = GET_CODE (insn);
/* Look for the label at the start of block 3. */
just return the next insn so we can start over from that point. */
if (code != BARRIER && code != NOTE && !is_cond_candidate (insn))
return NEXT_INSN (insn);
-
+
/* Remember the last real insn before the label (i.e. end of block 2). */
if (code == JUMP_INSN || code == INSN)
{
if (!insn)
return insn;
-
- /* It is possible for this optimization to slow performance if the blocks
- are long. This really depends upon whether the branch is likely taken
+
+ /* It is possible for this optimization to slow performance if the blocks
+ are long. This really depends upon whether the branch is likely taken
or not. If the branch is taken, we slow performance in many cases. But,
- if the branch is not taken, we always help performance (for a single
- block, but for a double block (i.e. when the optimization is re-applied)
+ if the branch is not taken, we always help performance (for a single
+ block, but for a double block (i.e. when the optimization is re-applied)
this is not true since the 'right thing' depends on the overall length of
- the collapsed block). As a compromise, don't apply this optimization on
+ the collapsed block). As a compromise, don't apply this optimization on
blocks larger than size 2 (unlikely for the mcore) when speed is important.
- the best threshold depends on the latencies of the instructions (i.e.,
+ the best threshold depends on the latencies of the instructions (i.e.,
the branch penalty). */
if (optimize > 1 && blk_size > 2)
return insn;
it is the destination of the branch from block 1. Also, all
instructions in the block 2 are conditionalizable. So, apply the
conditionalization and delete the branch. */
- start_blk_3_lab = insn;
-
- for (insn = NEXT_INSN (end_blk_1_br); insn != start_blk_3_lab;
+ start_blk_3_lab = insn;
+
+ for (insn = NEXT_INSN (end_blk_1_br); insn != start_blk_3_lab;
insn = NEXT_INSN (insn))
{
rtx_insn *newinsn;
if (insn->deleted ())
continue;
-
+
/* Try to form a conditional variant of the instruction and emit it. */
if ((newinsn = emit_new_cond_insn (insn, cond)))
{
}
/* Note whether we will delete the label starting blk 3 when the jump
- gets deleted. If so, we want to re-apply this optimization at the
+ gets deleted. If so, we want to re-apply this optimization at the
last real instruction right before the label. */
if (LABEL_NUSES (start_blk_3_lab) == 1)
{
if (! start_blk_3_lab)
return end_blk_2_insn;
-
+
/* Return the insn right after the label at the start of block 3. */
return NEXT_INSN (start_blk_3_lab);
}
outer loop that traverses through the insns scanning for a branch
that signifies an opportunity to apply the optimization. Note that
this optimization is applied late. If we could apply it earlier,
- say before cse 2, it may expose more optimization opportunities.
- but, the pay back probably isn't really worth the effort (we'd have
+ say before cse 2, it may expose more optimization opportunities.
+ but, the pay back probably isn't really worth the effort (we'd have
to update all reg/flow/notes/links/etc to make it work - and stick it
in before cse 2). */
{
/* Reset this variable. */
current_function_anonymous_args = 0;
-
+
if (optimize == 0)
return;
-
+
/* Conditionalize blocks where we can. */
conditionalize_optimization ();
/* Strip any and all of the subreg wrappers. */
while (GET_CODE (x) == SUBREG)
x = SUBREG_REG (x);
-
+
while (GET_CODE (y) == SUBREG)
y = SUBREG_REG (y);
}
\f
-/* Compute the number of word sized registers needed to
+/* Compute the number of word sized registers needed to
hold a function argument of mode MODE and type TYPE. */
int
&& (size % UNITS_PER_WORD != 0)
&& (reg + mcore_num_arg_regs (mode, type) <= (FIRST_PARM_REG + NPARM_REGS)))
{
- rtx arg_regs [NPARM_REGS];
+ rtx arg_regs [NPARM_REGS];
int nregs;
rtx result;
rtvec rtvec;
-
+
for (nregs = 0; size > 0; size -= UNITS_PER_WORD)
{
arg_regs [nregs] =
gcc_assert (ARRAY_SIZE (arg_regs) == 6);
rtvec = gen_rtvec (nregs, arg_regs[0], arg_regs[1], arg_regs[2],
arg_regs[3], arg_regs[4], arg_regs[5]);
-
+
result = gen_rtx_PARALLEL (mode, rtvec);
return result;
}
-
+
return gen_rtx_REG (mode, reg);
}
{
machine_mode mode;
int unsigned_p;
-
+
mode = TYPE_MODE (valtype);
/* Since we promote return types, we must promote the mode here too. */
mode = promote_function_mode (valtype, mode, &unsigned_p, func, 1);
-
+
return handle_structs_in_regs (mode, valtype, FIRST_RET_REG);
}
mcore_function_arg (cumulative_args_t cum, const function_arg_info &arg)
{
int arg_reg;
-
+
if (!arg.named || arg.end_marker_p ())
return 0;
return 0;
arg_reg = ROUND_REG (*get_cumulative_args (cum), arg.mode);
-
+
if (arg_reg < NPARM_REGS)
return handle_structs_in_regs (arg.mode, arg.type,
FIRST_PARM_REG + arg_reg);
if (targetm.calls.must_pass_in_stack (arg))
return 0;
-
+
/* REG is not the *hardware* register number of the register that holds
the argument, it is the *argument* register number. So for example,
the first argument to a function goes in argument register 0, which
tree idp;
rtlname = XEXP (DECL_RTL (decl), 0);
-
+
if (GET_CODE (rtlname) == MEM)
rtlname = XEXP (rtlname, 0);
gcc_assert (GET_CODE (rtlname) == SYMBOL_REF);
oldname = XSTR (rtlname, 0);
-
+
if (mcore_dllexport_name_p (oldname))
return; /* Already done. */
rtx newrtl;
rtlname = XEXP (DECL_RTL (decl), 0);
-
+
if (GET_CODE (rtlname) == MEM)
rtlname = XEXP (rtlname, 0);
gcc_assert (GET_CODE (rtlname) == SYMBOL_REF);
oldname = XSTR (rtlname, 0);
-
+
gcc_assert (!mcore_dllexport_name_p (oldname));
if (mcore_dllimport_name_p (oldname))
return; /* Already done. */
error ("initialized variable %q+D is marked dllimport", decl);
return;
}
-
+
/* `extern' needn't be specified with dllimport.
Specify `extern' now and hope for the best. Sigh. */
if (VAR_P (decl)
mcore_mark_dllexport (decl);
else if (mcore_dllimport_p (decl))
mcore_mark_dllimport (decl);
-
+
/* It might be that DECL has already been marked as dllimport, but
a subsequent definition nullified that. The attribute is gone
but DECL_RTL still has @i.__imp_foo. We need to remove that. */
const char * prefix;
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
-
+
/* Strip off any encoding in name. */
name = (* targetm.strip_name_encoding) (name);
prefix = ".rdata$";
else
prefix = ".data$";
-
+
len = strlen (name) + strlen (prefix);
string = XALLOCAVEC (char, len + 1);
-
+
sprintf (string, "%s%s", prefix, name);
set_decl_section_name (decl, string);
#ifdef OBJECT_FORMAT_ELF
static void
-mcore_asm_named_section (const char *name,
+mcore_asm_named_section (const char *name,
unsigned int flags ATTRIBUTE_UNUSED,
tree decl ATTRIBUTE_UNUSED)
{
static bool
mcore_base_register_rtx_p (const_rtx x, bool strict_p)
{
- return REG_P(x) && mcore_reg_ok_for_base_p (x, strict_p);
+ return REG_P(x) && mcore_reg_ok_for_base_p (x, strict_p);
}
/* A legitimate index for a QI is 0..15, for HI is 0..30, for SI is 0..60,
and for DI is 0..56 because we use two SI loads, etc. */
-static bool
+static bool
mcore_legitimate_index_p (machine_mode mode, const_rtx op)
{
if (CONST_INT_P (op))
if (GET_MODE_SIZE (mode) == 1
&& ((unsigned HOST_WIDE_INT) INTVAL (op)) <= 15)
return true;
- }
+ }
return false;
}
-
+
/* Worker function for TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P.
Allow REG
#define GCC_MCORE_H
/* RBE: need to move these elsewhere. */
-#undef LIKE_PPC_ABI
+#undef LIKE_PPC_ABI
#define MCORE_STRUCT_ARGS
/* RBE: end of "move elsewhere". */
#define TARGET_8ALIGN 1
extern char * mcore_current_function_name;
-
+
/* Target machine storage Layout. */
#define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \
/* Every structures size must be a multiple of 8 bits. */
#define STRUCTURE_SIZE_BOUNDARY 8
-/* Look at the fundamental type that is used for a bit-field and use
+/* Look at the fundamental type that is used for a bit-field and use
that to impose alignment on the enclosing structure.
struct s {int a:8}; should have same alignment as "int", not "char". */
#define PCC_BITFIELD_TYPE_MATTERS 1
(TREE_CODE (TYPE) == ARRAY_TYPE \
&& TYPE_MODE (TREE_TYPE (TYPE)) == QImode \
&& (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN))
-
+
/* Set this nonzero if move instructions will actually fail to work
when given unaligned data. */
#define STRICT_ALIGNMENT 1
/* Standard register usage. */
-/* Register allocation for our first guess
+/* Register allocation for our first guess
r0 stack pointer
r1 scratch, target reg for xtrb?
but prevents the compiler from extending the lifetime of these
registers. */
#define TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P hook_bool_mode_true
-
+
/* The class value for index registers, and the one for base regs. */
#define INDEX_REG_CLASS NO_REGS
#define BASE_REG_CLASS GENERAL_REGS
mcore_secondary_reload_class (CLASS, MODE, X)
/* Return the maximum number of consecutive registers
- needed to represent mode MODE in a register of class CLASS.
+ needed to represent mode MODE in a register of class CLASS.
On MCore this is the size of MODE in words. */
#define CLASS_MAX_NREGS(CLASS, MODE) \
#define ROUND_ADVANCE(SIZE) \
((SIZE + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
-/* Round a register number up to a proper boundary for an arg of mode
- MODE.
-
+/* Round a register number up to a proper boundary for an arg of mode
+ MODE.
+
We round to an even reg for things larger than a word. */
#define ROUND_REG(X, MODE) \
((TARGET_8ALIGN \
#define REGNO_OK_FOR_INDEX_P(REGNO) 0
-/* Maximum number of registers that can appear in a valid memory
+/* Maximum number of registers that can appear in a valid memory
address. */
#define MAX_REGS_PER_ADDRESS 1
reg_names[STACK_POINTER_REGNUM], \
(STACK_BOUNDARY / BITS_PER_UNIT))
-
+
/* Output a reference to a label. */
#undef ASM_OUTPUT_LABELREF
#define ASM_OUTPUT_LABELREF(STREAM, NAME) \
0 a call from src to dst
1 the call is special (e.g. dst is "unknown" or "alloca")
2 the call is special (e.g., the src is a table instead of routine)
-
- Frame sizes are augmented with timestamps to help later tools
+
+ Frame sizes are augmented with timestamps to help later tools
differentiate between static entities with same names in different
files. */
extern long mcore_current_compilation_timestamp;
/* This says how to output an assembler line
to define a global common symbol, with alignment information. */
-/* XXX - for now we ignore the alignment. */
+/* XXX - for now we ignore the alignment. */
#undef ASM_OUTPUT_ALIGNED_COMMON
#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
do \
#define builtin_define(TXT) cpp_define (pfile, TXT)
#define builtin_assert(TXT) cpp_assert (pfile, TXT)
-/* Define preprocessor symbols for MicroBlaze.
+/* Define preprocessor symbols for MicroBlaze.
Symbols which do not start with __ are deprecated. */
-void
+void
microblaze_cpp_define (cpp_reader *pfile)
{
builtin_assert ("cpu=microblaze");
builtin_define ("__BIG_ENDIAN__");
builtin_define ("__MICROBLAZEEB__");
}
- if (!TARGET_SOFT_MUL)
+ if (!TARGET_SOFT_MUL)
{
if (!flag_iso)
builtin_define ("HAVE_HW_MUL");
builtin_define ("HAVE_HW_FPU_SQRT");
builtin_define ("__HAVE_HW_FPU_SQRT__");
}
-}
+}
extern void microblaze_expand_divide (rtx *);
extern void microblaze_expand_conditional_branch (machine_mode, rtx *);
extern void microblaze_expand_conditional_branch_reg (machine_mode, rtx *);
-extern void microblaze_expand_conditional_branch_sf (rtx *);
+extern void microblaze_expand_conditional_branch_sf (rtx *);
extern int microblaze_can_use_return_insn (void);
extern void print_operand (FILE *, rtx, int);
extern void print_operand_address (FILE *, rtx);
#endif /* RTX_CODE */
/* Declare functions in microblaze-c.cc. */
-extern void microblaze_cpp_define (struct cpp_reader *);
+extern void microblaze_cpp_define (struct cpp_reader *);
#endif /* GCC_MICROBLAZE_PROTOS_H */
ADDRESS_REG
-A natural register or a register + const_int offset address.
-The register satisfies microblaze_valid_base_register_p and the
+A natural register or a register + const_int offset address.
+The register satisfies microblaze_valid_base_register_p and the
offset is a const_arith_operand.
ADDRESS_REG_INDEX
/* Classifies symbols
SYMBOL_TYPE_GENERAL
-
+
A general symbol. */
enum microblaze_symbol_type
{
struct microblaze_address_info
{
enum microblaze_address_type type;
- rtx regA; /* Contains valid values on ADDRESS_REG, ADDRESS_REG_INDEX,
+ rtx regA; /* Contains valid values on ADDRESS_REG, ADDRESS_REG_INDEX,
ADDRESS_SYMBOLIC. */
rtx regB; /* Contains valid values on ADDRESS_REG_INDEX. */
rtx offset; /* Contains valid values on ADDRESS_CONST_INT and ADDRESS_REG. */
int initialized; /* != 0 if frame size already calculated. */
int num_gp; /* number of gp registers saved. */
long insns_len; /* length of insns. */
- int alloc_stack; /* Flag to indicate if the current function
+ int alloc_stack; /* Flag to indicate if the current function
must not create stack space. (As an optimization). */
};
data area takes 2 instructions). */
int microblaze_section_threshold = -1;
-/* Prevent scheduling potentially exception causing instructions in
+/* Prevent scheduling potentially exception causing instructions in
delay slots. -mcpu=v3.00.a or v4.00.a turns this on. */
int microblaze_no_unsafe_delay;
/* Set to one if the targeted core has the CLZ insn. */
int microblaze_has_clz = 0;
-/* Which CPU pipeline do we use. We haven't really standardized on a CPU
- version having only a particular type of pipeline. There can still be
- options on the CPU to scale pipeline features up or down. :(
- Bad Presentation (??), so we let the MD file rely on the value of
- this variable instead Making PIPE_5 the default. It should be backward
+/* Which CPU pipeline do we use. We haven't really standardized on a CPU
+ version having only a particular type of pipeline. There can still be
+ options on the CPU to scale pipeline features up or down. :(
+ Bad Presentation (??), so we let the MD file rely on the value of
+ this variable instead Making PIPE_5 the default. It should be backward
optimal with PIPE_3 MicroBlazes. */
enum pipeline_type microblaze_pipe = MICROBLAZE_PIPE_5;
};
/* MicroBlaze specific machine attributes.
- interrupt_handler - Interrupt handler attribute to add interrupt prologue
+ interrupt_handler - Interrupt handler attribute to add interrupt prologue
and epilogue and use appropriate interrupt return.
save_volatiles - Similar to interrupt handler, but use normal return. */
int interrupt_handler;
const_int
ADDRESS_REG_INDEX %0 %1 NULL NULL
- ADDRESS_SYMBOLIC r0 / NULL NULL symbol
- sda_base_reg
+ ADDRESS_SYMBOLIC r0 / NULL NULL symbol
+ sda_base_reg
ADDRESS_CONST_INT r0 NULL const NULL
result = gen_rtx_PLUS (Pmode, ptr_reg, constant);
if (SMALL_INT (constant))
return result;
- /* Otherwise we fall through so the code below will fix the
+ /* Otherwise we fall through so the code below will fix the
constant. */
xinsn = result;
}
*total -= 2;
}
else
- /* Double the worst cost of shifts when there is no barrel shifter and
+ /* Double the worst cost of shifts when there is no barrel shifter and
the shift amount is in a reg. */
*total = COSTS_N_INSNS (32 * 4);
return true;
return COSTS_N_INSNS (microblaze_address_insns (addr, GET_MODE (addr)));
}
-/* Return nonzero if X is an address which needs a temporary register when
+/* Return nonzero if X is an address which needs a temporary register when
reloaded while generating PIC code. */
int
return 0;
}
-/* Convert a version number of the form "vX.YY.Z" to an integer encoding
+/* Convert a version number of the form "vX.YY.Z" to an integer encoding
for easier range comparison. */
static int
microblaze_version_to_int (const char *version)
}
else
{
- /* We agree to use 5 pipe-stage model even on area optimized 3
+ /* We agree to use 5 pipe-stage model even on area optimized 3
pipe-stage variants. */
#if 0
microblaze_select_flags &= ~(MICROBLAZE_MASK_NO_UNSAFE_DELAY);
|| MICROBLAZE_VERSION_COMPARE (microblaze_select_cpu,
"v5.00.c") == 0)
{
- /* Pattern compares are to be turned on by default only when
+ /* Pattern compares are to be turned on by default only when
compiling for MB v5.00.'z'. */
target_flags |= MASK_PATTERN_COMPARE;
}
if (microblaze_is_interrupt_variant ())
{
- if (df_regs_ever_live_p (regno)
+ if (df_regs_ever_live_p (regno)
|| regno == MB_ABI_MSR_SAVE_REG
|| ((interrupt_handler || fast_interrupt)
&& (regno == MB_ABI_ASM_TEMP_REGNUM
*/
static HOST_WIDE_INT
-compute_frame_size (HOST_WIDE_INT size)
+compute_frame_size (HOST_WIDE_INT size)
{
int regno;
HOST_WIDE_INT total_size; /* # bytes that the entire frame takes up. */
}
/* Implement INITIAL_ELIMINATION_OFFSET. FROM is either the frame
- pointer or argument pointer or the return address pointer. TO is either
+ pointer or argument pointer or the return address pointer. TO is either
the stack pointer or hard frame pointer. */
HOST_WIDE_INT
}
/* Print operands using format code.
-
+
The MicroBlaze specific codes are:
'X' X is CONST_INT, prints 32 bits in hexadecimal format = "0x%08x",
'j' Print low word of const_double (int or float) value as hex
's' Print -1 if operand is negative, 0 if positive (sign extend)
'@' Print the name of the temporary register (rMB_ABI_ASM_TEMP_REGNUM).
- '#' Print nop if the delay slot of a branch is not filled.
+ '#' Print nop if the delay slot of a branch is not filled.
*/
void
val[1] = INTVAL (op) & 0x00000000ffffffffLL;
if (val[0] == 0 && val[1] < 0)
val[0] = -1;
-
+
}
fprintf (file, "0x%8.8lx", (letter == 'h') ? val[0] : val[1]);
}
reference whose address is ADDR. ADDR is an RTL expression.
Possible address classifications and output formats are,
-
+
ADDRESS_REG "%0, r0"
ADDRESS_REG with non-zero "%0, <addr_const>"
- offset
+ offset
- ADDRESS_REG_INDEX "rA, RB"
+ ADDRESS_REG_INDEX "rA, RB"
(if rA is r0, rA and rB are swapped)
ADDRESS_CONST_INT "r0, <addr_const>"
- ADDRESS_SYMBOLIC "rBase, <addr_const>"
- (rBase is a base register suitable for the
+ ADDRESS_SYMBOLIC "rBase, <addr_const>"
+ (rBase is a base register suitable for the
symbol's type)
*/
break;
case ADDRESS_REG_INDEX:
if (REGNO (info.regA) == 0)
- /* Make rB == r0 instead of rA == r0. This helps reduce read port
+ /* Make rB == r0 instead of rA == r0. This helps reduce read port
congestion. */
fprintf (file, "%s,%s", reg_names[REGNO (info.regB)],
reg_names[REGNO (info.regA)]);
}
/* Emit either a label, .comm, or .lcomm directive, and mark that the symbol
- is used, so that we don't emit an .extern for it in
+ is used, so that we don't emit an .extern for it in
microblaze_asm_file_end. */
void
const char *section, const char *fmt, int size)
{
- fputs (section, stream);
+ fputs (section, stream);
assemble_name (stream, name);
fprintf (stream, fmt, size);
}
#define BITSET_P(VALUE,BIT) (((VALUE) & (1L << (BIT))) != 0)
-/* Save or restore instructions based on whether this is the prologue or
+/* Save or restore instructions based on whether this is the prologue or
epilogue. prologue is 1 for the prologue. */
static void
save_restore_insns (int prologue)
&& !cfun->returns_pcc_struct)
{
tree type = build_pointer_type (fntype);
- tree function_result_decl = build_decl (BUILTINS_LOCATION, PARM_DECL,
+ tree function_result_decl = build_decl (BUILTINS_LOCATION, PARM_DECL,
NULL_TREE, type);
DECL_ARG_TYPE (function_result_decl) = type;
rtx reg_rtx;
rtx mem_rtx;
- /* In case of interrupt handlers use addki instead of addi for changing the
+ /* In case of interrupt handlers use addki instead of addi for changing the
stack pointer value. */
if (microblaze_can_use_return_insn ())
if (fsiz > 0)
{
- /* Restore SUB_RETURN_ADDR_REGNUM at first. This is to prevent the
- sequence of load-followed by a use (in rtsd) in every prologue. Saves
- a load-use stall cycle :) This is also important to handle alloca.
+ /* Restore SUB_RETURN_ADDR_REGNUM at first. This is to prevent the
+ sequence of load-followed by a use (in rtsd) in every prologue. Saves
+ a load-use stall cycle :) This is also important to handle alloca.
(See comments for if (frame_pointer_needed) below. */
if (!crtl->is_leaf || interrupt_handler)
emit_move_insn (reg_rtx, mem_rtx);
}
- /* It is important that this is done after we restore the return address
- register (above). When alloca is used, we want to restore the
- sub-routine return address only from the current stack top and not
- from the frame pointer (which we restore below). (frame_pointer + 0)
- might have been over-written since alloca allocates memory on the
+ /* It is important that this is done after we restore the return address
+ register (above). When alloca is used, we want to restore the
+ sub-routine return address only from the current stack top and not
+ from the frame pointer (which we restore below). (frame_pointer + 0)
+ might have been over-written since alloca allocates memory on the
current stack. */
if (frame_pointer_needed)
emit_insn (gen_movsi (stack_pointer_rtx, hard_frame_pointer_rtx));
/* Implement TARGET_SECONDARY_RELOAD. */
static reg_class_t
-microblaze_secondary_reload (bool in_p ATTRIBUTE_UNUSED, rtx x ATTRIBUTE_UNUSED,
- reg_class_t rclass, machine_mode mode ATTRIBUTE_UNUSED,
+microblaze_secondary_reload (bool in_p ATTRIBUTE_UNUSED, rtx x ATTRIBUTE_UNUSED,
+ reg_class_t rclass, machine_mode mode ATTRIBUTE_UNUSED,
secondary_reload_info *sri ATTRIBUTE_UNUSED)
{
if (rclass == ST_REGS)
case SECCAT_RODATA_MERGE_STR:
case SECCAT_RODATA_MERGE_STR_INIT:
/* MB binutils have various issues with mergeable string sections and
- relaxation/relocation. Currently, turning mergeable sections
+ relaxation/relocation. Currently, turning mergeable sections
into regular readonly sections. */
return readonly_data_section;
/*
Encode info about sections into the RTL based on a symbol's declaration.
- The default definition of this hook, default_encode_section_info in
+ The default definition of this hook, default_encode_section_info in
`varasm.cc', sets a number of commonly-useful bits in SYMBOL_REF_FLAGS. */
static void
If the string size is below the threshold, put it into .sdata2.
If the front-end is done, we must be being called from toplev.cc.
In that case, do nothing. */
-void
+void
microblaze_asm_output_ident (const char *string)
{
const char *section_asm_op;
{
/* Table lookup software divides. Works for all (nr/dr) where (0 <= nr,dr <= 15). */
- rtx regt1 = gen_reg_rtx (SImode);
+ rtx regt1 = gen_reg_rtx (SImode);
rtx reg18 = gen_rtx_REG (SImode, R_TMP);
rtx regqi = gen_reg_rtx (QImode);
rtx_code_label *div_label = gen_label_rtx ();
insn = emit_insn (gen_iorsi3 (regt1, operands[1], operands[2]));
cjump = emit_jump_insn_after (gen_cbranchsi4 (
- gen_rtx_GTU (SImode, regt1, GEN_INT (15)),
+ gen_rtx_GTU (SImode, regt1, GEN_INT (15)),
regt1, GEN_INT (15), div_label), insn);
- LABEL_NUSES (div_label) = 1;
+ LABEL_NUSES (div_label) = 1;
JUMP_LABEL (cjump) = div_label;
emit_insn (gen_rtx_CLOBBER (SImode, reg18));
mem_rtx = gen_rtx_MEM (QImode,
gen_rtx_PLUS (Pmode, regt1, div_table_rtx));
- insn = emit_insn (gen_movqi (regqi, mem_rtx));
+ insn = emit_insn (gen_movqi (regqi, mem_rtx));
insn = emit_insn (gen_movsi (operands[0], gen_rtx_SUBREG (SImode, regqi, 0)));
- jump = emit_jump_insn_after (gen_jump (div_end_label), insn);
+ jump = emit_jump_insn_after (gen_jump (div_end_label), insn);
JUMP_LABEL (jump) = div_end_label;
- LABEL_NUSES (div_end_label) = 1;
+ LABEL_NUSES (div_end_label) = 1;
emit_barrier ();
emit_label (div_label);
- ret = emit_library_call_value (gen_rtx_SYMBOL_REF (Pmode, "__divsi3"),
+ ret = emit_library_call_value (gen_rtx_SYMBOL_REF (Pmode, "__divsi3"),
operands[0], LCT_NORMAL,
GET_MODE (operands[0]),
operands[1], GET_MODE (operands[1]),
operands[2], GET_MODE (operands[2]));
if (ret != operands[0])
- emit_move_insn (operands[0], ret);
+ emit_move_insn (operands[0], ret);
emit_label (div_end_label);
emit_insn (gen_blockage ());
#define TARGET_LEGITIMIZE_ADDRESS microblaze_legitimize_address
#undef TARGET_LEGITIMATE_ADDRESS_P
-#define TARGET_LEGITIMATE_ADDRESS_P microblaze_legitimate_address_p
+#define TARGET_LEGITIMATE_ADDRESS_P microblaze_legitimate_address_p
#undef TARGET_FRAME_POINTER_REQUIRED
#define TARGET_FRAME_POINTER_REQUIRED microblaze_frame_pointer_required
#define TARGET_PROMOTE_FUNCTION_MODE default_promote_function_mode_always_promote
#undef TARGET_FUNCTION_VALUE
-#define TARGET_FUNCTION_VALUE microblaze_function_value
+#define TARGET_FUNCTION_VALUE microblaze_function_value
#undef TARGET_SECONDARY_RELOAD
#define TARGET_SECONDARY_RELOAD microblaze_secondary_reload
#define TARGET_ASM_INIT_SECTIONS microblaze_elf_asm_init_sections
#undef TARGET_OPTION_OVERRIDE
-#define TARGET_OPTION_OVERRIDE microblaze_option_override
+#define TARGET_OPTION_OVERRIDE microblaze_option_override
#undef TARGET_LEGITIMATE_CONSTANT_P
#define TARGET_LEGITIMATE_CONSTANT_P microblaze_legitimate_constant_p
/* The default is to not need GOT for TLS. */
#define TLS_NEEDS_GOT 0
-/* What is the default setting for -mcpu= . We set it to v4.00.a even though
- we are actually ahead. This is safest version that has generate code
+/* What is the default setting for -mcpu= . We set it to v4.00.a even though
+ we are actually ahead. This is safest version that has generate code
compatible for the original ISA */
#define MICROBLAZE_DEFAULT_CPU "v4.00.a"
#define MB_ABI_SUB_RETURN_ADDR_REGNUM 15
#define MB_ABI_DEBUG_RETURN_ADDR_REGNUM 16
#define MB_ABI_EXCEPTION_RETURN_ADDR_REGNUM 17
-#define MB_ABI_ASM_TEMP_REGNUM 18
+#define MB_ABI_ASM_TEMP_REGNUM 18
/* This is our temp register. */
#define MB_ABI_FRAME_POINTER_REGNUM 19
#define MB_ABI_PIC_ADDR_REGNUM 20
#define MB_ABI_STATIC_CHAIN_REGNUM 3
#define MB_ABI_TEMP1_REGNUM 11
#define MB_ABI_TEMP2_REGNUM 12
-#define MB_ABI_MSR_SAVE_REG 11
+#define MB_ABI_MSR_SAVE_REG 11
/* Volatile register used to save MSR in interrupt handlers. */
(GP_REG_FIRST + MB_ABI_SUB_RETURN_ADDR_REGNUM)
/* Initial state of return address on entry to func = R15.
- Actually, the RA is at R15+8, but gcc doesn't know how
- to generate this.
+ Actually, the RA is at R15+8, but gcc doesn't know how
+ to generate this.
NOTE: GDB has a workaround and expects this incorrect value.
If this is fixed, a corresponding fix to GDB is needed. */
#define INCOMING_RETURN_ADDR_RTX \
rMB_ABI_INTR_RETUREN_ADDR_REGNUM is a fixed
register(return address for interrupt), and will not be used for
anything else. */
-
+
#define FRAME_POINTER_REGNUM FRP_REG_NUM
#define HARD_FRAME_POINTER_REGNUM \
(GP_REG_FIRST + MB_ABI_FRAME_POINTER_REGNUM)
&& (((VALUE) & 0x0000ffff) != 0 \
|| (((VALUE) & ~2147483647) != 0 \
&& ((VALUE) & ~2147483647) != ~2147483647)))
-
+
#define PREFERRED_RELOAD_CLASS(X,CLASS) \
((CLASS) != ALL_REGS \
? (CLASS) \
int fp_code; /* Mode of FP arguments */
int num_adjusts; /* number of adjustments made */
/* Adjustments made to args pass in regs. */
- /* ??? The size is doubled to work around a bug in the code that sets the
+ /* ??? The size is doubled to work around a bug in the code that sets the
adjustments in function_arg. */
rtx adjust[MAX_ARGS_IN_REGISTERS * 2];
} CUMULATIVE_ARGS;
#define MAX_REGS_PER_ADDRESS 2
-/* Identify valid constant addresses. Exclude if PIC addr which
+/* Identify valid constant addresses. Exclude if PIC addr which
needs scratch register. */
#define CONSTANT_ADDRESS_P(X) microblaze_constant_address_p(X)
/* ASM_OUTPUT_ALIGNED_COMMON and ASM_OUTPUT_ALIGNED_LOCAL
Unfortunately, we still need to set the section explicitly. Somehow,
- our binutils assign .comm and .lcomm variables to the "current" section
+ our binutils assign .comm and .lcomm variables to the "current" section
in the assembly file, rather than where they implicitly belong. We need to
remove this explicit setting in GCC when binutils can understand sections
better. */
#undef TARGET_ASM_NAMED_SECTION
#define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section
-/* Define the strings to put out for each section in the object file.
-
- Note: For ctors/dtors, we want to give these sections the SHF_WRITE
- attribute to allow shared libraries to patch/resolve addresses into
- these locations. On Microblaze, there is no concept of shared libraries
+/* Define the strings to put out for each section in the object file.
+
+ Note: For ctors/dtors, we want to give these sections the SHF_WRITE
+ attribute to allow shared libraries to patch/resolve addresses into
+ these locations. On Microblaze, there is no concept of shared libraries
yet, so this is for future use. */
#define TEXT_SECTION_ASM_OP "\t.text"
#define DATA_SECTION_ASM_OP "\t.data"
"\tbrlid r15, " #FUNC "\n\t nop\n" \
TEXT_SECTION_ASM_OP);
-/* We need to group -lm as well, since some Newlib math functions
+/* We need to group -lm as well, since some Newlib math functions
reference __errno! */
#undef LIB_SPEC
#define LIB_SPEC \
|| DECL_TEMPLATE_INSTANTIATION (decl)
|| DECL_ARTIFICIAL (decl)))
return false;
-
- /* Overrides of the class dllimport decls by out-of-class definitions are
+
+ /* Overrides of the class dllimport decls by out-of-class definitions are
handled by tree.cc:merge_dllimport_decl_attributes. */
return true;
}
return true;
}
-static inline void maybe_add_dllimport (tree decl)
+static inline void maybe_add_dllimport (tree decl)
{
if (i386_pe_type_dllimport_p (decl))
DECL_DLLIMPORT_P (decl) = 1;
}
-static inline void maybe_add_dllexport (tree decl)
+static inline void maybe_add_dllexport (tree decl)
{
if (i386_pe_type_dllexport_p (decl))
- {
+ {
tree decl_attrs = DECL_ATTRIBUTES (decl);
if (lookup_attribute ("dllexport", decl_attrs) != NULL_TREE)
/* Already done. */
tree member;
gcc_assert (CLASS_TYPE_P (t));
-
-
+
+
if (lookup_attribute ("dllexport", TYPE_ATTRIBUTES (t)) != NULL_TREE)
{
tree tmv = TYPE_MAIN_VARIANT (t);
{
tree thunk;
maybe_add_dllexport (member);
-
+
/* Also add the attribute to its thunks. */
for (thunk = DECL_THUNKS (member); thunk;
thunk = TREE_CHAIN (thunk))
{
tree thunk;
maybe_add_dllimport (member);
-
+
/* Also add the attribute to its thunks. */
for (thunk = DECL_THUNKS (member); thunk;
thunk = DECL_CHAIN (thunk))
maybe_add_dllimport (thunk);
}
-
+
/* Check vtables */
for (member = CLASSTYPE_VTABLES (t);
member; member = DECL_CHAIN (member))
/* We leave typeinfo tables alone. We can't mark TI objects as
dllimport, since the address of a secondary VTT may be needed
for static initialization of a primary VTT. VTT's of
- dllimport'd classes should always be link-once COMDAT. */
+ dllimport'd classes should always be link-once COMDAT. */
}
}
if (TREE_CODE (decl) == FUNCTION_DECL
&& DECL_DECLARED_INLINE_P (decl)
&& !flag_keep_inline_dllexport)
- return false;
+ return false;
if (lookup_attribute ("dllexport", DECL_ATTRIBUTES (decl)))
return true;
tree arg;
function_args_iterator args_iter;
- gcc_assert (TREE_CODE (decl) == FUNCTION_DECL);
+ gcc_assert (TREE_CODE (decl) == FUNCTION_DECL);
if (prototype_p (type))
{
- /* This attribute is ignored for variadic functions. */
+ /* This attribute is ignored for variadic functions. */
if (stdarg_p (type))
return NULL_TREE;
tree new_id = NULL_TREE;
if (TREE_CODE (decl) == FUNCTION_DECL)
- {
+ {
unsigned int ccvt = ix86_get_callcvt (TREE_TYPE (decl));
if ((ccvt & IX86_CALLCVT_STDCALL) != 0)
{
tree
i386_pe_mangle_decl_assembler_name (tree decl, tree id)
{
- tree new_id = i386_pe_maybe_mangle_decl_assembler_name (decl, id);
+ tree new_id = i386_pe_maybe_mangle_decl_assembler_name (decl, id);
return (new_id ? new_id : id);
}
flags |= SYMBOL_FLAG_DLLEXPORT;
else if (i386_pe_determine_dllimport_p (decl))
flags |= SYMBOL_FLAG_DLLIMPORT;
-
+
SYMBOL_REF_FLAGS (symbol) = flags;
}
&& DECL_DECLARED_INLINE_P (exp))
return false;
#endif
-
+
return default_binds_local_p_1 (exp, 0);
}
*f++ ='d'; /* This is necessary for older versions of gas. */
*f++ ='r';
}
- else
+ else
{
if (flags & SECTION_CODE)
*f++ = 'x';
Instead, have the linker pick one, without warning.
If 'selectany' attribute has been specified, MS compiler
sets 'discard' characteristic, rather than telling linker
- to warn of size or content mismatch, so do the same. */
+ to warn of size or content mismatch, so do the same. */
bool discard = (flags & SECTION_CODE)
|| (TREE_CODE (decl) != IDENTIFIER_NODE
&& lookup_attribute ("selectany",
rounded += (BIGGEST_ALIGNMENT / BITS_PER_UNIT) - 1;
rounded = (rounded / (BIGGEST_ALIGNMENT / BITS_PER_UNIT)
* (BIGGEST_ALIGNMENT / BITS_PER_UNIT));
-
+
mingw_pe_maybe_record_exported_symbol (decl, name, 1);
fprintf (stream, "\t.comm\t");
{
called_fn = DECL_STRUCT_FUNCTION (called_fn_tree);
if (called_fn == NULL
- || DECL_WEAK (called_fn_tree)
+ || DECL_WEAK (called_fn_tree)
|| has_inlined_assembly (called_fn)
|| !is_leaf_function (called_fn)
|| !called_fn->machine->does_not_use_frame_header)
return false;
}
-/* Return true if ADDR matches the pattern for the L{B,H,W,D}{,U}X load
+/* Return true if ADDR matches the pattern for the L{B,H,W,D}{,U}X load
indexed address instruction. Note that such addresses are
not considered legitimate in the TARGET_LEGITIMATE_ADDRESS_P
sense, because their use is so restricted. */
+ set_src_cost (XEXP (XEXP (x, 1), 0), mode, speed));
return true;
}
-
+
/* Fall through. */
case IOR:
/* Probe at TEST_ADDR, test if TEST_ADDR == LAST_ADDR and branch. */
xops[1] = reg2;
strcpy (tmp, "%(%<bne\t%0,%1,");
- output_asm_insn (strcat (tmp, &loop_lab[1]), xops);
+ output_asm_insn (strcat (tmp, &loop_lab[1]), xops);
if (TARGET_64BIT)
output_asm_insn ("sd\t$0,0(%0)%)", xops);
else
{
return (mips_cost->memory_latency
+ memory_move_secondary_cost (mode, rclass, in));
-}
+}
/* Implement TARGET_SECONDARY_MEMORY_NEEDED.
mips_fmadd_bypass (rtx_insn *out_insn, rtx_insn *in_insn)
{
int dst_reg, src_reg;
-
+
gcc_assert (get_attr_type (in_insn) == TYPE_FMADD);
gcc_assert (get_attr_type (out_insn) == TYPE_FMADD);
optimised to use word loads. */
#define LOCAL_ALIGNMENT(TYPE, ALIGN) \
DATA_ALIGNMENT (TYPE, ALIGN)
-
+
#define PAD_VARARGS_DOWN \
(targetm.calls.function_arg_padding (TYPE_MODE (type), type) == PAD_DOWNWARD)
"%{!EB:%{!EL:%(endian_spec)}}", \
\
/* Configuration-independent MIPS rules. */ \
- BASE_DRIVER_SELF_SPECS
+ BASE_DRIVER_SELF_SPECS
/* Use trap rather than break for all but MIPS I ISA. Force -no-mips16,
so that MIPS16 assembler code requires an explicit ".set mips16".
if (!outgoing)
return gen_rtx_REG (mode, MMIX_RETURN_VALUE_REGNUM);
-
+
/* Return values that fit in a register need no special handling.
There's no register hole when parameters are passed in global
registers. */
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-
+
#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
asm_fprintf (FILE, "+"); \
asm_fprintf (FILE, "%U%s", real_name); \
} \
- while (0)
+ while (0)
#undef SIZE_TYPE
#undef PTRDIFF_TYPE
{
rtx base = XEXP (addr, 0);
rtx index = XEXP (addr, 1);
-
+
if (REG_P (index) && !REG_OK_FOR_INDEX_P (index))
{
rtx x = base;
for (i = 0x04000; i < 0x40000; i <<= 1)
if ((mask & i) == 0)
++ count;
-
+
mask |= 0x3c000;
}
popcount (unsigned int mask)
{
unsigned int count = 0;
-
+
while (mask)
{
++ count;
if (x == stack_pointer_rtx && rclass != SP_REGS)
return (TARGET_AM33 ? GENERAL_REGS : ADDRESS_REGS);
else if (MEM_P (x)
- || (REG_P (x)
+ || (REG_P (x)
&& !HARD_REGISTER_P (x))
|| (GET_CODE (x) == SUBREG
&& REG_P (SUBREG_REG (x))
src2_regnum = true_regnum (src2);
src2_class = REGNO_REG_CLASS (src2_regnum);
-
+
if (dest_regnum == src1_regnum)
return "add %2,%0";
if (dest_regnum == src2_regnum)
move cost above. This is not a problem. */
static int
-mn10300_memory_move_cost (machine_mode mode ATTRIBUTE_UNUSED,
+mn10300_memory_move_cost (machine_mode mode ATTRIBUTE_UNUSED,
reg_class_t iclass, bool in ATTRIBUTE_UNUSED)
{
enum reg_class rclass = (enum reg_class) iclass;
}
}
goto do_arith_costs;
-
+
case MINUS:
case AND:
case IOR:
0xdc jmp fnaddr
<disp>
- Note that the two extra insns are effectively nops; they
+ Note that the two extra insns are effectively nops; they
clobber the flags but do not affect the contents of D0 or D1. */
disp = expand_binop (SImode, sub_optab, fnaddr,
|| (TARGET_AM33 && REGNO_REG_CLASS (regno) == ADDRESS_REGS)
|| REGNO_REG_CLASS (regno) == EXTENDED_REGS)
return GET_MODE_SIZE (mode) <= 4;
-
+
return false;
}
}
/* This function is used to help split:
-
+
(set (reg) (and (reg) (int)))
-
+
into:
-
+
(set (reg) (shift (reg) (int))
(set (reg) (shift (reg) (int))
-
+
where the shitfs will be shorter than the "and" insn.
It returns the number of bits that should be shifted. A positive
check its values prior to any changes made by OP. */
if (pliw1->op == LIW_OP_CMP)
{
- /* Two sequential comparisons means dead code, which ought to
+ /* Two sequential comparisons means dead code, which ought to
have been eliminated given that bundling only happens with
optimization. We cannot bundle them in any case. */
gcc_assert (pliw1->op != pliw2->op);
|| pliw2->op == LIW_OP_OR
|| pliw2->op == LIW_OP_XOR))
return false;
-
+
pliw2->src = pliw1->src;
return true;
}
if (liw1.slot == LIW_OP2 || liw2.slot == LIW_OP1)
{
struct liw_data temp;
-
+
temp = liw1;
liw1 = liw2;
liw2 = temp;
if (GET_MODE (cmp_reg) == CC_FLOATmode)
lcc = gen_FLcc (comparison, label);
else
- lcc = gen_Lcc (comparison, label);
+ lcc = gen_Lcc (comparison, label);
rtx_insn *jump = emit_jump_insn_before (lcc, branch);
mark_jump_label (XVECEXP (lcc, 0, 0), jump, 0);
loop_optimizer_finalize ();
- df_finish_pass (false);
+ df_finish_pass (false);
DUMP ("SETLB scan complete", NULL_RTX);
}
/* Define how to find the value returned by a function.
VALTYPE is the data type of the value (as a tree).
If the precise function being called is known, FUNC is its
- FUNCTION_DECL; otherwise, FUNC is 0.
+ FUNCTION_DECL; otherwise, FUNC is 0.
We always return values in register $r0 for moxie. */
static rtx
-moxie_function_value (const_tree valtype,
+moxie_function_value (const_tree valtype,
const_tree fntype_or_decl ATTRIBUTE_UNUSED,
bool outgoing ATTRIBUTE_UNUSED)
{
case REG:
fprintf (file, "(%s)", reg_names[REGNO (x)]);
break;
-
+
case PLUS:
switch (GET_CODE (XEXP (x, 1)))
{
case CONST_INT:
- fprintf (file, "%ld(%s)",
+ fprintf (file, "%ld(%s)",
INTVAL(XEXP (x, 1)), reg_names[REGNO (XEXP (x, 0))]);
break;
case SYMBOL_REF:
case CONST:
{
rtx plus = XEXP (XEXP (x, 1), 0);
- if (GET_CODE (XEXP (plus, 0)) == SYMBOL_REF
+ if (GET_CODE (XEXP (plus, 0)) == SYMBOL_REF
&& CONST_INT_P (XEXP (plus, 1)))
{
output_addr_const(file, XEXP (plus, 0));
/* Set the per-function-data initializer. */
init_machine_status = moxie_init_machine_status;
-#ifdef TARGET_MOXIEBOX
+#ifdef TARGET_MOXIEBOX
target_flags |= MASK_HAS_MULX;
#endif
}
if (df_regs_ever_live_p (regno) && (! call_used_or_fixed_reg_p (regno)))
cfun->machine->callee_saved_reg_size += 4;
- cfun->machine->size_for_adjusting_sp =
+ cfun->machine->size_for_adjusting_sp =
crtl->args.pretend_args_size
- + cfun->machine->local_vars_size
+ + cfun->machine->local_vars_size
+ (ACCUMULATE_OUTGOING_ARGS
? (HOST_WIDE_INT) crtl->outgoing_args_size : 0);
}
if (cfun->machine->size_for_adjusting_sp > 0)
{
- int i = cfun->machine->size_for_adjusting_sp;
+ int i = cfun->machine->size_for_adjusting_sp;
while ((i >= 255) && (i <= 510))
{
- insn = emit_insn (gen_subsi3 (stack_pointer_rtx,
- stack_pointer_rtx,
+ insn = emit_insn (gen_subsi3 (stack_pointer_rtx,
+ stack_pointer_rtx,
GEN_INT (255)));
RTX_FRAME_RELATED_P (insn) = 1;
i -= 255;
}
if (i <= 255)
{
- insn = emit_insn (gen_subsi3 (stack_pointer_rtx,
- stack_pointer_rtx,
+ insn = emit_insn (gen_subsi3 (stack_pointer_rtx,
+ stack_pointer_rtx,
GEN_INT (i)));
RTX_FRAME_RELATED_P (insn) = 1;
}
rtx reg = gen_rtx_REG (SImode, MOXIE_R12);
insn = emit_move_insn (reg, GEN_INT (i));
RTX_FRAME_RELATED_P (insn) = 1;
- insn = emit_insn (gen_subsi3 (stack_pointer_rtx,
- stack_pointer_rtx,
+ insn = emit_insn (gen_subsi3 (stack_pointer_rtx,
+ stack_pointer_rtx,
reg));
RTX_FRAME_RELATED_P (insn) = 1;
}
if (cfun->machine->callee_saved_reg_size <= 255)
{
emit_move_insn (reg, hard_frame_pointer_rtx);
- emit_insn (gen_subsi3
- (reg, reg,
+ emit_insn (gen_subsi3
+ (reg, reg,
GEN_INT (cfun->machine->callee_saved_reg_size)));
}
else
moxie_initial_elimination_offset (int from, int to)
{
int ret;
-
+
if ((from) == FRAME_POINTER_REGNUM && (to) == HARD_FRAME_POINTER_REGNUM)
{
/* Compute this since we need to use cfun->machine->local_vars_size. */
CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
int regno;
int regs = 8 - *cum;
-
+
*pretend_size = regs < 0 ? 0 : GET_MODE_SIZE (SImode) * regs;
-
+
if (no_rtl)
return;
-
+
for (regno = *cum; regno < 8; regno++)
{
rtx reg = gen_rtx_REG (SImode, regno);
rtx slot = gen_rtx_PLUS (Pmode,
gen_rtx_REG (SImode, ARG_POINTER_REGNUM),
GEN_INT (UNITS_PER_WORD * (3 + (regno-2))));
-
+
emit_move_insn (gen_rtx_MEM (SImode, slot), reg);
}
}
if (*cum < 8)
return gen_rtx_REG (arg.mode, *cum);
- else
+ else
return NULL_RTX;
}
if (strict_p)
return HARD_REGNO_OK_FOR_BASE_P (regno)
|| HARD_REGNO_OK_FOR_BASE_P (reg_renumber[regno]);
- else
+ else
return !HARD_REGISTER_NUM_P (regno)
|| HARD_REGNO_OK_FOR_BASE_P (regno);
}
Special Registers...
$pc - 32-bit program counter.
-
+
*/
#define REGISTER_NAMES { \
#define MOXIE_FP 0
#define MOXIE_SP 1
#define MOXIE_R0 2
-#define MOXIE_R1 3
+#define MOXIE_R1 3
#define MOXIE_R2 4
#define MOXIE_R3 5
#define MOXIE_R4 6
#define ACCUMULATE_OUTGOING_ARGS 1
/* A C statement (sans semicolon) for initializing the variable CUM
- for the state at the beginning of the argument list.
+ for the state at the beginning of the argument list.
For moxie, the first arg is passed in register 2 (aka $r0). */
#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,FNDECL,N_NAMED_ARGS) \
(CUM = MOXIE_R0)
/* Every structures size must be a multiple of 8 bits. */
#define STRUCTURE_SIZE_BOUNDARY 8
-/* Look at the fundamental type that is used for a bit-field and use
+/* Look at the fundamental type that is used for a bit-field and use
that to impose alignment on the enclosing structure.
struct s {int a:8}; should have same alignment as "int", not "char". */
#define PCC_BITFIELD_TYPE_MATTERS 1
(TREE_CODE (TYPE) == ARRAY_TYPE \
&& TYPE_MODE (TREE_TYPE (TYPE)) == QImode \
&& (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN))
-
+
/* Set this nonzero if move instructions will actually fail to work
when given unaligned data. */
#define STRICT_ALIGNMENT 1
#define ELIMINABLE_REGS \
{{ FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM }, \
- { ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM }}
+ { ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM }}
/* This macro returns the initial difference between the specified pair
of registers. */
#undef TARGET_LIBC_HAS_FUNCTION
#define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function
-/* When building shared libraries, the initialization and finalization
+/* When building shared libraries, the initialization and finalization
functions for the library are .init and .fini respectively. */
#define COLLECT_SHARED_INIT_FUNC(STREAM,FUNC) \
/* Definitions of ELF target support for Altera Nios II.
Copyright (C) 2012-2024 Free Software Foundation, Inc.
- Contributed by Jonah Graham (jgraham@altera.com),
+ Contributed by Jonah Graham (jgraham@altera.com),
Will Reece (wreece@altera.com), and Jeff DaSilva (jdasilva@altera.com).
Contributed by Mentor Graphics, Inc.
/* Target machine subroutines for Altera Nios II.
Copyright (C) 2012-2024 Free Software Foundation, Inc.
- Contributed by Jonah Graham (jgraham@altera.com),
+ Contributed by Jonah Graham (jgraham@altera.com),
Will Reece (wreece@altera.com), and Jeff DaSilva (jdasilva@altera.com).
Contributed by Mentor Graphics, Inc.
nios2_fpu_compare_enabled (enum rtx_code cond, machine_mode mode)
{
if (mode == SFmode)
- switch (cond)
+ switch (cond)
{
case EQ: return N2FPU_OP_ENABLED_P (fcmpeqs);
case NE: return N2FPU_OP_ENABLED_P (fcmpnes);
default: break;
}
else if (mode == DFmode)
- switch (cond)
+ switch (cond)
{
case EQ: return N2FPU_OP_ENABLED_P (fcmpeqd);
case NE: return N2FPU_OP_ENABLED_P (fcmpned);
if (cfun->machine->initialized)
return cfun->machine->total_size;
-
+
/* Calculate space needed for gp registers. */
save_reg_size = 0;
for (regno = 0; regno <= LAST_GP_REG; regno++)
{
unsigned i;
unsigned r;
-
+
for (i = 0; (r = EH_RETURN_DATA_REGNO (i)) != INVALID_REGNUM; i++)
if (!(save_mask & (1 << r)))
{
#define TEMP_REG_NUM 8
/* Emit conditional trap for checking stack limit. SIZE is the number of
- additional bytes required.
+ additional bytes required.
GDB prologue analysis depends on this generating a direct comparison
to the SP register, so the adjustment to add SIZE needs to be done on
{
unsigned offset = cfun->machine->save_reg_size - 4;
rtx base;
-
+
if (frame_pointer_needed)
base = hard_frame_pointer_rtx;
else
prologue_saved_reg_p (unsigned regno)
{
gcc_assert (GP_REG_P (regno));
-
+
if (df_regs_ever_live_p (regno) && !call_used_or_fixed_reg_p (regno))
return true;
by the offset from the frame pointer to the stack pointer. */
if (to == HARD_FRAME_POINTER_REGNUM)
offset -= (cfun->machine->save_regs_offset
- + cfun->machine->fp_save_offset);
+ + cfun->machine->fp_save_offset);
return offset;
}
/* Process -mgprel-sec= and -m0rel-sec=. */
if (nios2_gprel_sec)
{
- if (regcomp (&nios2_gprel_sec_regex, nios2_gprel_sec,
+ if (regcomp (&nios2_gprel_sec_regex, nios2_gprel_sec,
REG_EXTENDED | REG_NOSUB))
error ("%<-mgprel-sec=%> argument is not a valid regular expression");
}
if (nios2_r0rel_sec)
{
- if (regcomp (&nios2_r0rel_sec_regex, nios2_r0rel_sec,
+ if (regcomp (&nios2_r0rel_sec_regex, nios2_r0rel_sec,
REG_EXTENDED | REG_NOSUB))
error ("%<-mr0rel-sec=%> argument is not a valid regular expression");
}
*total = COSTS_N_INSNS (5); /* Guess? */
else if (speed)
*total = COSTS_N_INSNS (2); /* Latency adjustment. */
- else
+ else
*total = COSTS_N_INSNS (1);
if (TARGET_HAS_MULX && GET_MODE (x) == DImode)
{
*total = COSTS_N_INSNS (5); /* Guess? */
else if (speed)
*total = COSTS_N_INSNS (2); /* Latency adjustment. */
- else
+ else
*total = COSTS_N_INSNS (1);
return false;
}
{
if (!speed)
*total = COSTS_N_INSNS (1);
- else
+ else
*total = COSTS_N_INSNS (2); /* Latency adjustment. */
return false;
}
-
+
case ZERO_EXTRACT:
if (TARGET_HAS_BMX)
{
rtx ret = gen_rtx_REG (Pmode, FIRST_RETVAL_REGNO);
rtx fn;
rtx_insn *insn;
-
+
if (!nios2_tls_symbol)
nios2_tls_symbol = init_one_libfunc ("__tls_get_addr");
}
else if (!reg_or_0_operand (*op2, mode))
*op2 = force_reg (mode, *op2);
-
+
check_rebuild_cmp:
if (code == GT || code == GTU || code == LE || code == LEU)
{
return false;
}
-/* Return true if X is an expression of the form
+/* Return true if X is an expression of the form
(PLUS reg large_constant). */
static bool
nios2_plus_large_constant_p (rtx x)
&& nios2_regno_ok_for_base_p (REGNO (base), strict_p)
&& (offset == NULL_RTX
|| nios2_valid_addr_offset_p (offset)
- || (nios2_large_constant_allowed ()
+ || (nios2_large_constant_allowed ()
&& nios2_symbolic_constant_p (offset))
|| nios2_unspec_reloc_p (offset)));
}
/* Else, fall through. */
case LABEL_REF:
- if (nios2_large_constant_allowed ()
+ if (nios2_large_constant_allowed ()
&& nios2_symbolic_constant_p (operand))
return true;
return false;
rtx op0 = XEXP (operand, 0);
rtx op1 = XEXP (operand, 1);
- if (nios2_valid_addr_expr_p (op0, op1, strict_p)
+ if (nios2_valid_addr_expr_p (op0, op1, strict_p)
|| nios2_valid_addr_expr_p (op1, op0, strict_p))
return true;
}
This requires a 16-bit relocation and isn't valid with R2
io-variant load/stores. */
case LO_SUM:
- if (TARGET_ARCH_R2
+ if (TARGET_ARCH_R2
&& (TARGET_BYPASS_CACHE || TARGET_BYPASS_CACHE_VOLATILE))
return false;
else
the (plus reg symbolic_constant) and (plus reg (const ...)) forms
but giving (plus reg symbol_ref) address modes the same cost as those
that don't require splitting. Also, from a theoretical point of view:
- - This is in line with the recommendation in the GCC internals
+ - This is in line with the recommendation in the GCC internals
documentation to make address forms involving multiple
- registers more expensive than single-register forms.
- - OTOH it still encourages fwprop1 to propagate constants into
+ registers more expensive than single-register forms.
+ - OTOH it still encourages fwprop1 to propagate constants into
address expressions more aggressively.
- We should discourage splitting (symbol + offset) into hi/lo pairs
to allow CSE'ing the symbol when it's used with more than one offset,
but not so heavily as to avoid this addressing mode at all. */
static int
-nios2_address_cost (rtx address,
+nios2_address_cost (rtx address,
machine_mode mode ATTRIBUTE_UNUSED,
- addr_space_t as ATTRIBUTE_UNUSED,
+ addr_space_t as ATTRIBUTE_UNUSED,
bool speed ATTRIBUTE_UNUSED)
{
if (nios2_plus_large_constant_p (address))
}
-/* Return true if X is something that needs to be split into a
+/* Return true if X is something that needs to be split into a
high/lo_sum pair. */
bool
nios2_large_constant_p (rtx x)
}
/* Given an RTX X that satisfies nios2_large_constant_p, split it into
- high and lo_sum parts using TEMP as a scratch register. Emit the high
- instruction and return the lo_sum expression.
+ high and lo_sum parts using TEMP as a scratch register. Emit the high
+ instruction and return the lo_sum expression.
Also handle special cases involving constant integers. */
rtx
nios2_split_large_constant (rtx x, rtx temp)
return gen_rtx_PLUS (Pmode, temp, gen_int_mode (low, Pmode));
}
}
-
+
emit_insn (gen_rtx_SET (temp, gen_rtx_HIGH (Pmode, copy_rtx (x))));
return gen_rtx_LO_SUM (Pmode, temp, copy_rtx (x));
}
}
/* Given a MEM OP with an address that includes a splittable symbol or
- other large constant, emit some instructions to do the split and
+ other large constant, emit some instructions to do the split and
return a new MEM. */
rtx
nios2_split_large_constant_memory_operand (rtx op)
|| startswith (section, ".sbss.")
|| strcmp (section, ".sdata") == 0
|| startswith (section, ".sdata.")
- || (nios2_gprel_sec
+ || (nios2_gprel_sec
&& regexec (&nios2_gprel_sec_regex, section, 0, NULL, 0) == 0));
}
static bool
nios2_r0rel_section_name_p (const char *section)
{
- return (nios2_r0rel_sec
+ return (nios2_r0rel_sec
&& regexec (&nios2_r0rel_sec_regex, section, 0, NULL, 0) == 0);
}
base = nios2_legitimize_tls_address (base);
else if (flag_pic)
base = nios2_load_pic_address (base, UNSPEC_PIC_SYM, NULL_RTX);
- else if (!nios2_large_constant_allowed ()
+ else if (!nios2_large_constant_allowed ()
&& nios2_symbolic_constant_p (addr))
return nios2_split_large_constant (addr, gen_reg_rtx (Pmode));
else if (CONST_INT_P (addr))
machine_mode mode ATTRIBUTE_UNUSED)
{
rtx op0, op1;
-
+
if (CONSTANT_P (x))
return nios2_legitimize_constant_address (x);
}
}
else if (gprel_constant_p (from) || r0rel_constant_p (from))
- /* Handled directly by movsi_internal as gp + offset
+ /* Handled directly by movsi_internal as gp + offset
or r0 + offset. */
;
else if (nios2_large_constant_p (from))
/* This case covers either a regular symbol reference or an UNSPEC
- representing a 32-bit offset. We split the former
+ representing a 32-bit offset. We split the former
only conditionally and the latter always. */
{
- if (!nios2_large_constant_allowed ()
+ if (!nios2_large_constant_allowed ()
|| nios2_large_unspec_reloc_p (from))
{
rtx lo = nios2_split_large_constant (from, to);
return true;
}
}
- else
+ else
/* This is a TLS or PIC symbol. */
{
from = nios2_legitimize_constant_address (from);
z: prints the third register immediate operand in assembly
instructions. Outputs const0_rtx as the 'zero' register
instead of '0'.
-
+
y: same as 'z', but for specifically for logical instructions,
where the processing for immediates are slightly different.
static char buf[256];
const char *op1, *op2, *op3;
int ln = 256, n = 0;
-
+
int N = N2FPU_N (code);
int num_operands = N2FPU (code).num_operands;
const char *insn_name = N2FPU_NAME (code);
static rtx
nios2_function_arg (cumulative_args_t cum_v, const function_arg_info &arg)
{
- CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
+ CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
rtx return_rtx = NULL_RTX;
if (cum->regs_used < NUM_ARG_REGS)
static int
nios2_arg_partial_bytes (cumulative_args_t cum_v, const function_arg_info &arg)
{
- CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
+ CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
HOST_WIDE_INT param_size = arg.promoted_size_in_bytes ();
gcc_assert (param_size >= 0);
nios2_function_arg_advance (cumulative_args_t cum_v,
const function_arg_info &arg)
{
- CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
+ CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
HOST_WIDE_INT param_size = arg.promoted_size_in_bytes ();
gcc_assert (param_size >= 0);
const function_arg_info &arg,
int *pretend_size, int second_time)
{
- CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
+ CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
CUMULATIVE_ARGS local_cum;
cumulative_args_t local_cum_v = pack_cumulative_args (&local_cum);
int regs_to_push;
else
{
error ("invalid argument to built-in function %s", d->name);
- return has_target_p ? gen_reg_rtx (ops[0].mode) : const0_rtx;
- }
+ return has_target_p ? gen_reg_rtx (ops[0].mode) : const0_rtx;
+ }
}
/* Expand ldio/stio and ldex/ldsex/stex/stsex form load-store
mem = gen_rtx_MEM (SImode, addr);
create_input_operand (&ops[0], mem, SImode);
-
+
return nios2_expand_builtin_insn (d, 1, ops, false);
}
val = expand_normal (CALL_EXPR_ARG (exp, 0));
create_input_operand (&ops[1], val, SImode);
create_output_operand (&ops[0], target, SImode);
-
+
return nios2_expand_builtin_insn (d, 2, ops, true);
}
if (INTVAL (imm) != 0 && INTVAL (imm) != 1)
{
error ("the ENI instruction operand must be either 0 or 1");
- return const0_rtx;
+ return const0_rtx;
}
create_integer_operand (&ops[0], INTVAL (imm));
-
+
return nios2_expand_builtin_insn (d, 1, ops, false);
}
if (ISSPACE (*t))
continue;
if (!ISDIGIT (*t))
- {
+ {
error ("%<custom-%s=%> argument should be "
"a non-negative integer", N2FPU_NAME (code));
return false;
error ("%<custom-%s=%> is not recognized as FPU instruction",
argstr + 7);
return false;
- }
+ }
}
else
{
false, false};
/* Function to classify kinds of add instruction patterns. */
-static enum nios2_add_insn_kind
+static enum nios2_add_insn_kind
nios2_add_insn_classify (rtx_insn *insn ATTRIBUTE_UNUSED,
rtx lhs, rtx rhs1, rtx rhs2)
{
{
int start, i, end = XVECLEN (op, 0) - 1, last_regno = -1;
unsigned int regset = 0;
- rtx base_reg, offset;
+ rtx base_reg, offset;
rtx first_elt = XVECEXP (op, 0, 0);
bool inc_p = true;
bool wb_p = base_reg_adjustment_p (first_elt, &base_reg, &offset);
max_labelno = max_label_num ();
min_labelno = get_first_label_num ();
label_align = XCNEWVEC (unsigned char, max_labelno - min_labelno + 1);
-
+
/* Iterate on inserting alignment and adjusting branch lengths until
no more changes. */
while (changed)
const int cdx_reg_alloc_order[] =
{
/* Call-clobbered GPRs within CDX 3-bit encoded range. */
- 2, 3, 4, 5, 6, 7,
+ 2, 3, 4, 5, 6, 7,
/* Call-saved GPRs within CDX 3-bit encoded range. */
16, 17,
/* Other call-clobbered GPRs. */
/* Definitions of target machine for Altera Nios II.
Copyright (C) 2012-2024 Free Software Foundation, Inc.
- Contributed by Jonah Graham (jgraham@altera.com),
+ Contributed by Jonah Graham (jgraham@altera.com),
Will Reece (wreece@altera.com), and Jeff DaSilva (jdasilva@altera.com).
Contributed by Mentor Graphics, Inc.
29 r29 ea Exception Return Address
30 r30 ba Breakpoint Return Address
31 r31 ra Return Address
-
+
32 ctl0 status
33 ctl1 estatus STATUS saved by exception
34 ctl2 bstatus STATUS saved by break
40 First Pseudo Register
In addition, r12 is used as the static chain register and r13, r14, and r15
- are clobbered by PLT code sequences.
+ are clobbered by PLT code sequences.
The definitions for all the hard register numbers are located in nios2.md.
*/
if (mask)
{
rtx op = GEN_INT (mask | (is_call << GOMP_DIM_MAX));
-
+
/* Emit fork at all levels. This helps form SESE regions, as
it creates a block with a single successor before entering a
partitooned region. That is a good candidate for the end of
const char *ptx_type = nvptx_ptx_type_from_mode (mode, false);
const char *pfx = "\t.reg";
const char *sfx = ";\n";
-
+
if (for_proto)
pfx = "(.param", sfx = "_out) ";
-
+
s << pfx << ptx_type << " " << reg_names[NVPTX_RETURN_REGNUM] << sfx;
}
{
if (for_proto)
return return_in_mem;
-
+
/* Named return values can cause us to return a pointer as well
as expect an argument for the return location. This is
optimization-level specific, so no caller can make use of
for (; args; args = TREE_CHAIN (args), not_atomic_weak_arg--)
{
tree type = prototyped ? TREE_VALUE (args) : TREE_TYPE (args);
-
+
if (not_atomic_weak_arg)
argno = write_arg_type (s, -1, argno, type, prototyped);
else
nvptx_maybe_record_fnsym (rtx sym)
{
tree decl = SYMBOL_REF_DECL (sym);
-
+
if (decl && TREE_CODE (decl) == FUNCTION_DECL && DECL_EXTERNAL (decl))
nvptx_record_needed_fndecl (decl);
}
bool return_in_mem = write_return_type (s, false, result_type);
if (return_in_mem)
argno = write_arg_type (s, 0, argno, ptr_type_node, true);
-
+
/* Declare and initialize incoming arguments. */
tree args = TYPE_ARG_TYPES (fntype);
bool prototyped = true;
nvptx_gen_unpack (rtx dst0, rtx dst1, rtx src)
{
rtx res;
-
+
switch (GET_MODE (src))
{
case E_DImode:
nvptx_gen_pack (rtx dst, rtx src0, rtx src1)
{
rtx res;
-
+
switch (GET_MODE (dst))
{
case E_DImode:
case E_BImode:
{
rtx tmp = gen_reg_rtx (SImode);
-
+
start_sequence ();
emit_insn (gen_sel_truesi (tmp, src, GEN_INT (1), const0_rtx));
emit_insn (nvptx_gen_shuffle (tmp, tmp, idx, kind));
end_sequence ();
}
break;
-
+
default:
gcc_unreachable ();
}
/* Generate instruction(s) to spill or fill register REG to/from the
worker broadcast array. PM indicates what is to be done, REP
how many loop iterations will be executed (0 for not a loop). */
-
+
static rtx
nvptx_gen_shared_bcast (rtx reg, propagate_mask pm, unsigned rep,
broadcast_data_t *data, bool vector)
case E_BImode:
{
rtx tmp = gen_reg_rtx (SImode);
-
+
start_sequence ();
if (pm & PM_read)
emit_insn (gen_sel_truesi (tmp, reg, GEN_INT (1), const0_rtx));
if (data->offset)
addr = gen_rtx_PLUS (Pmode, addr, GEN_INT (data->offset));
}
-
+
addr = gen_rtx_MEM (mode, addr);
if (pm == PM_read)
res = gen_rtx_SET (addr, reg);
{
/* We're using a ptr, increment it. */
start_sequence ();
-
+
emit_insn (res);
emit_insn (gen_adddi3 (data->ptr, data->ptr,
GEN_INT (GET_MODE_SIZE (GET_MODE (reg)))));
init_frag.val = 0;
init_frag.offset = 0;
init_frag.remaining--;
-
+
if (sym)
{
bool function = (SYMBOL_REF_DECL (sym)
fprintf (asm_out_file, "\t\tcall ");
if (result != NULL_RTX)
fprintf (asm_out_file, "(%s_in), ", reg_names[NVPTX_RETURN_REGNUM]);
-
+
if (decl)
{
char *replaced_dots = NULL;
{
nvptx_shuffle_kind kind = (nvptx_shuffle_kind) UINTVAL (x);
/* Same order as nvptx_shuffle_kind. */
- static const char *const kinds[] =
+ static const char *const kinds[] =
{".up", ".down", ".bfly", ".idx"};
fputs (kinds[kind], file);
}
{
/* Parent parallel. */
parallel *parent;
-
+
/* Next sibling parallel. */
parallel *next;
forked_block = join_block = 0;
forked_insn = join_insn = 0;
fork_insn = joining_insn = 0;
-
+
if (parent)
{
next = parent->inner;
block = elt->second;
remap = block;
}
-
+
/* Split block before insn. The insn is in the new block */
edge e = split_block (block, PREV_INSN (elt->first));
nvptx_dump_pars (par, 0);
fprintf (dump_file, "\n");
}
-
+
return par;
}
the node itself and one for the output edges. Such back edges are
referred to as 'Brackets'. Cycle equivalent nodes will have the
same set of brackets.
-
+
Determining bracket equivalency is done by maintaining a list of
brackets in such a manner that the list length and final bracket
uniquely identify the set.
algorithm. Notice it doesn't actually find the set of nodes within
a particular region, just unorderd sets of nodes that are the
entries and exits of SESE regions.
-
+
After determining cycle equivalency, we need to find the minimal
set of SESE regions. Do this with a DFS coloring walk of the
complete graph. We're either 'looking' or 'coloring'. When
back.first ? back.first->index : 0, back.second);
brackets.safe_push (bracket (back));
}
-
+
void append (bb_sese *child);
void remove (const pseudo_node_t &);
if (dump_file)
fprintf (dump_file, "Block %d(%d), parent (%d), orientation %+d\n",
b->index, n, p, dir);
-
+
BB_SET_SESE (b, new bb_sese (n, p, dir));
p = n;
-
+
n += 3;
list->quick_push (b);
FOR_EACH_EDGE (e, ei, edges)
{
basic_block target = *(basic_block *)((char *)e + offset);
-
+
if (target->flags & BB_VISITED)
n = nvptx_sese_number (n, p, dir, target, list);
}
/* Non-parental ancestor node -- a backlink. */
int d = usd * t_sese->dir;
int back = t_sese->node + d;
-
+
if (hi_back > back)
{
hi_back = back;
sese->push (pseudo_node_t (nullptr, 0));
}
}
-
+
/* If this node leads directly or indirectly to a no-return region of
the graph, then fake a backedge to entry node. */
if (!sese->brackets.length () || !edges || !edges->length ())
node_child = t_sese->high;
}
}
-
+
sese->push (node_child);
}
}
gcc_assert (coloring < 0 || (sese && coloring == sese->color));
return;
}
-
+
block->flags |= BB_VISITED;
if (sese)
{
edge e;
edge_iterator ei;
-
+
FOR_EACH_EDGE (e, ei, block->succs)
nvptx_sese_color (color_counts, regions, e->dest, coloring);
}
basic_block block;
int ix;
- /* First clear each BB of the whole function. */
+ /* First clear each BB of the whole function. */
FOR_ALL_BB_FN (block, cfun)
{
block->flags &= ~BB_VISITED;
if (dump_file)
fprintf (dump_file, "Searching graph starting at %d\n", block->index);
-
+
/* Number the nodes reachable from block initial DFS order. */
int depth = nvptx_sese_number (2, 0, +1, block, &spanlist);
{
unsigned count;
const char *comma = "";
-
+
fprintf (dump_file, "Found %d cycle equivalents\n",
color_counts.length ());
for (ix = 0; color_counts.iterate (ix, &count); ix++)
}
fprintf (dump_file, "\n");
}
-
+
/* Now we've colored every block in the subgraph. We now need to
determine the minimal set of SESE regions that cover that
subgraph. Do this with a DFS walk of the complete function.
{
const char *comma = "";
int len = regions.length ();
-
+
fprintf (dump_file, "SESE regions:");
for (ix = 0; ix != len; ix++)
{
}
fprintf (dump_file, "\n\n");
}
-
+
for (ix = 0; blocks.iterate (ix, &block); ix++)
delete BB_GET_SESE (block);
}
idx = gen_reg_rtx (SImode);
pred = gen_reg_rtx (BImode);
label = gen_label_rtx ();
-
+
emit_insn (gen_rtx_SET (idx, GEN_INT (fs)));
/* Allow worker function to initialize anything needed. */
rtx init = fn (tmp, PM_loop_begin, fs, data, vector);
{
if (!(pm & PM_read_write))
return 0;
-
+
return nvptx_gen_warp_bcast (reg);
}
/* Single neutering according to MASK. FROM is the incoming block and
TO is the outgoing block. These may be the same block. Insert at
start of FROM:
-
+
if (tid.<axis>) goto end.
and insert before ending branch of TO (if there is such an insn):
{
if (nvptx_optimize)
nvptx_optimize_inner (par);
-
+
unsigned inner_mask = par->mask;
/* Do the inner parallels first. */
& (GOMP_DIM_MASK (GOMP_DIM_WORKER)
| GOMP_DIM_MASK (GOMP_DIM_VECTOR)));
unsigned skip_mask = 0, neuter_mask = 0;
-
+
if (par->inner)
nvptx_neuter_pars (par->inner, modes, outer | me);
if (skip_mask)
nvptx_skip_par (skip_mask, par);
-
+
if (par->next)
nvptx_neuter_pars (par->next, modes, outer);
}
if (dump_file)
df_dump (dump_file);
-
+
/* Mark unused regs as unused. */
int max_regs = max_reg_num ();
for (int i = LAST_VIRTUAL_REGISTER + 1; i < max_regs; i++)
{
if (ignore)
return target;
-
+
rtx src = expand_expr (CALL_EXPR_ARG (exp, 0),
NULL_RTX, mode, EXPAND_NORMAL);
if (!REG_P (src))
NULL_RTX, SImode, EXPAND_NORMAL);
rtx op = expand_expr (CALL_EXPR_ARG (exp, 2),
NULL_RTX, SImode, EXPAND_NORMAL);
-
+
if (!REG_P (idx) && GET_CODE (idx) != CONST_INT)
idx = copy_to_mode_reg (SImode, idx);
{
if (ignore)
return target;
-
+
rtx arg = expand_expr (CALL_EXPR_ARG (exp, 0),
NULL_RTX, mode, EXPAND_NORMAL);
if (!REG_P (arg))
machine_mode ARG_UNUSED (m), int ARG_UNUSED (ignore))
{
machine_mode mode = TYPE_MODE (TREE_TYPE (exp));
-
+
if (!target)
target = gen_reg_rtx (mode);
cmp = copy_to_mode_reg (mode, cmp);
if (!REG_P (src))
src = copy_to_mode_reg (mode, src);
-
+
if (mode == SImode)
pat = gen_atomic_compare_and_swapsi_1 (target, mem, cmp, src, const0_rtx);
else
fn = NVPTX_BUILTIN_SHUFFLELL;
arg_type = long_long_unsigned_type_node;
}
-
+
tree call = nvptx_builtin_decl (fn, true);
tree bits = build_int_cst (unsigned_type_node, shift);
tree kind = build_int_cst (unsigned_type_node, SHUFFLE_DOWN);
nvptx_global_lock_addr ()
{
tree v = global_lock_var;
-
+
if (!v)
{
tree name = get_identifier ("__reduction_lock");
gimple *init_end = gimple_seq_last (init_seq);
gsi_insert_seq_before (gsi, init_seq, GSI_SAME_STMT);
-
+
/* Split the block just after the init stmts. */
basic_block pre_bb = gsi_bb (*gsi);
edge pre_edge = split_block (pre_bb, init_end);
tree expect_var = make_ssa_name (arg_type);
tree actual_var = make_ssa_name (arg_type);
tree write_var = make_ssa_name (arg_type);
-
+
/* Build and insert the reduction calculation. */
gimple_seq red_seq = NULL;
tree write_expr = fold_build1 (code, var_type, expect_var);
basic_block update_bb = locked_edge->dest;
lock_bb = locked_edge->src;
*gsi = gsi_for_stmt (gsi_stmt (*gsi));
-
+
/* Create the lock loop ... */
locked_edge->flags ^= EDGE_TRUE_VALUE | EDGE_FALLTHRU;
locked_edge->probability = profile_probability::even ();
tree ref_in = build_simple_mem_ref (ptr);
TREE_THIS_VOLATILE (ref_in) = 1;
gimplify_assign (acc_in, ref_in, &red_seq);
-
+
tree acc_out = make_ssa_name (var_type);
tree update_expr = fold_build2 (op, var_type, ref_in, var);
gimplify_assign (acc_out, update_expr, &red_seq);
-
+
tree ref_out = build_simple_mem_ref (ptr);
TREE_THIS_VOLATILE (ref_out) = 1;
gimplify_assign (ref_out, acc_out, &red_seq);
if (!integer_zerop (ref_to_res))
var = build_simple_mem_ref (ref_to_res);
}
-
+
if (level == GOMP_DIM_WORKER
|| (level == GOMP_DIM_VECTOR && oa->vector_length > PTX_WARP_SIZE))
{
tree init = omp_reduction_init_op (gimple_location (call), rcode,
TREE_TYPE (var));
gimple_seq seq = NULL;
-
+
push_gimplify_context (true);
if (level == GOMP_DIM_VECTOR && oa->vector_length == PTX_WARP_SIZE)
/* Fixup flags from call_bb to init_bb. */
init_edge->flags ^= EDGE_FALLTHRU | EDGE_TRUE_VALUE;
init_edge->probability = profile_probability::even ();
-
+
/* Set the initialization stmts. */
gimple_seq init_seq = NULL;
tree init_var = make_ssa_name (TREE_TYPE (var));
gsi_prev (&gsi);
edge inited_edge = split_block (gsi_bb (gsi), gsi_stmt (gsi));
basic_block dst_bb = inited_edge->dest;
-
+
/* Create false edge from call_bb to dst_bb. */
edge nop_edge = make_edge (call_bb, dst_bb, EDGE_FALSE_VALUE);
nop_edge->probability = profile_probability::even ();
tree var = gimple_call_arg (call, 2);
int level = TREE_INT_CST_LOW (gimple_call_arg (call, 3));
gimple_seq seq = NULL;
-
+
push_gimplify_context (true);
if (level == GOMP_DIM_WORKER
|| (level == GOMP_DIM_VECTOR && oa->vector_length > PTX_WARP_SIZE))
if (lhs)
gimplify_assign (lhs, var, &seq);
-
+
pop_gimplify_context (NULL);
gsi_replace_with_seq (&gsi, seq, true);
#define SIG_ATOMIC_TYPE "int"
-
+
#define INT8_TYPE "signed char"
#define INT16_TYPE "short int"
#define INT32_TYPE "int"
#define UINT16_TYPE "short unsigned int"
#define UINT32_TYPE "unsigned int"
#define UINT64_TYPE "long long unsigned int"
-
+
#define INT_LEAST8_TYPE "signed char"
#define INT_LEAST16_TYPE "short int"
#define INT_LEAST32_TYPE "int"
#define UINT_LEAST16_TYPE "short unsigned int"
#define UINT_LEAST32_TYPE "unsigned int"
#define UINT_LEAST64_TYPE "long long unsigned int"
-
+
#define INT_FAST8_TYPE "int"
#define INT_FAST16_TYPE "int"
#define INT_FAST32_TYPE "int"
#define INTMAX_TYPE "long long int"
#define UINTMAX_TYPE "long long unsigned int"
-
+
#define INTPTR_TYPE "long int"
#define UINTPTR_TYPE "long unsigned int"
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-/* Common OpenBSD configuration.
+/* Common OpenBSD configuration.
All OpenBSD architectures include this file, which is intended as
- a repository for common defines.
+ a repository for common defines.
Some defines are common to all architectures, a few of them are
triggered by OBSD_* guards, so that we won't override architecture
defaults by mistakes.
- OBSD_HAS_CORRECT_SPECS:
+ OBSD_HAS_CORRECT_SPECS:
another mechanism provides correct specs already.
- OBSD_NO_DYNAMIC_LIBRARIES:
+ OBSD_NO_DYNAMIC_LIBRARIES:
no implementation of dynamic libraries.
- OBSD_OLD_GAS:
+ OBSD_OLD_GAS:
older flavor of gas which needs help for PIC.
OBSD_HAS_DECLARE_FUNCTION_NAME, OBSD_HAS_DECLARE_FUNCTION_SIZE,
- OBSD_HAS_DECLARE_OBJECT:
+ OBSD_HAS_DECLARE_OBJECT:
PIC support, FUNCTION_NAME/FUNCTION_SIZE are independent, whereas
the corresponding logic for OBJECTS is necessarily coupled.
There are also a few `default' defines such as ASM_WEAKEN_LABEL,
- intended as common ground for arch that don't provide
+ intended as common ground for arch that don't provide
anything suitable. */
/* OPENBSD_NATIVE is defined only when gcc is configured as part of
/* CPP_SPEC appropriate for OpenBSD. We deal with -posix and -pthread.
XXX the way threads are handled currently is not very satisfying,
- since all code must be compiled with -pthread to work.
+ since all code must be compiled with -pthread to work.
This two-stage defines makes it easy to pick that for targets that
have subspecs. */
#ifdef CPP_CPU_SPEC
#define CPP_SPEC OBSD_CPP_SPEC
#ifdef OBSD_OLD_GAS
-/* ASM_SPEC appropriate for OpenBSD. For some architectures, OpenBSD
- still uses a special flavor of gas that needs to be told when generating
+/* ASM_SPEC appropriate for OpenBSD. For some architectures, OpenBSD
+ still uses a special flavor of gas that needs to be told when generating
pic code. */
#undef ASM_SPEC
#define ASM_SPEC "%{" FPIE1_OR_FPIC1_SPEC ":-k} %{" FPIE2_OR_FPIC2_SPEC ":-k -K}"
\f
/* - we use . - _func instead of a local label,
- - we put extra spaces in expressions such as
+ - we put extra spaces in expressions such as
.type _func , @function
This is more readable for a human being and confuses c++filt less. */
/* Define the strings used for the .type and .size directives.
These strings generally do not vary from one system running OpenBSD
to another, but if a given system needs to use different pseudo-op
- names for these, they may be overridden in the arch specific file. */
+ names for these, they may be overridden in the arch specific file. */
/* OpenBSD assembler is hacked to have .type & .size support even in a.out
- format object files. Functions size are supported but not activated
- yet (look for GRACE_PERIOD_EXPIRED in gas/config/obj-aout.c).
+ format object files. Functions size are supported but not activated
+ yet (look for GRACE_PERIOD_EXPIRED in gas/config/obj-aout.c).
SET_ASM_OP is needed for attribute alias to work. */
#undef TYPE_ASM_OP
/* These macros generate the special .type and .size directives which
are used to set the corresponding fields of the linker symbol table
- entries under OpenBSD. These macros also have to output the starting
+ entries under OpenBSD. These macros also have to output the starting
labels for the relevant functions/objects. */
#ifndef OBSD_HAS_DECLARE_FUNCTION_NAME
/* Extra assembler code needed to declare a function properly.
- Some assemblers may also need to also have something extra said
+ Some assemblers may also need to also have something extra said
about the function's return value. We allow for that here. */
#undef ASM_DECLARE_FUNCTION_NAME
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
/* Output the size directive for a decl in rest_of_decl_compilation
in the case where we did not do so before the initializer.
Once we find the error_mark_node, we know that the value of
- size_directive_output was set by ASM_DECLARE_OBJECT_NAME
+ size_directive_output was set by ASM_DECLARE_OBJECT_NAME
when it was run for the same decl. */
#undef ASM_FINISH_DECLARE_OBJECT
#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
\f
/* Those are `generic' ways to weaken/globalize a label. We shouldn't need
to override a processor specific definition. Hence, #ifndef ASM_*
- In case overriding turns out to be needed, one can always #undef ASM_*
+ In case overriding turns out to be needed, one can always #undef ASM_*
before including this file. */
/* Tell the assembler that a symbol is weak. */
-/* Note: netbsd arm32 assembler needs a .globl here. An override may
+/* Note: netbsd arm32 assembler needs a .globl here. An override may
be needed when/if we go for arm32 support. */
#ifndef ASM_WEAKEN_LABEL
#define ASM_WEAKEN_LABEL(FILE,NAME) \
size_t 8 bytes
ptrdiff_t 8 bytes
wchar 4 bytes
-
+
Make GCC agree with types.h. */
#undef SIZE_TYPE
#define SIZE_TYPE "long unsigned int"
the RTL to avoid scheduling related problems. For example, the
store and load could be separated by a call to a pure or const
function which has no frame and this function might also use SP-16.
-
+
On the 64-bit port, I couldn't get SECONDARY_MEMORY_NEEDED to work
with LRA, so I modified the move patterns to use SP-40. The HP
compiler also uses this slot in the frame marker for moving data
/* This file should be included last. */
#include "target-def.h"
-/* Return nonzero if there is a bypass for the output of
+/* Return nonzero if there is a bypass for the output of
OUT_INSN and the fp store IN_INSN. */
int
pa_fpstore_bypass_p (rtx_insn *out_insn, rtx_insn *in_insn)
return (GET_MODE_SIZE (store_mode) == GET_MODE_SIZE (other_mode));
}
-
+
#ifndef DO_FRAME_NOTES
#ifdef INCOMING_RETURN_ADDR_RTX
gcc_assert (reg);
gcc_assert (GET_CODE (XEXP (orig, 0)) == PLUS);
-
+
base = legitimize_pic_address (XEXP (XEXP (orig, 0), 0), Pmode, reg);
orig = legitimize_pic_address (XEXP (XEXP (orig, 0), 1), Pmode,
base == reg ? 0 : reg);
if (GET_CODE (addr) != SYMBOL_REF)
return addr;
- switch (SYMBOL_REF_TLS_MODEL (addr))
+ switch (SYMBOL_REF_TLS_MODEL (addr))
{
case TLS_MODEL_GLOBAL_DYNAMIC:
tmp = gen_reg_rtx (Pmode);
insn = get_insns ();
end_sequence ();
t2 = gen_reg_rtx (Pmode);
- emit_libcall_block (insn, t2, t1,
+ emit_libcall_block (insn, t2, t1,
gen_rtx_UNSPEC (Pmode, gen_rtvec (1, const0_rtx),
UNSPEC_TLSLDBASE));
emit_insn (gen_tld_offset_load (ret, addr, t2));
&& !HARD_REGISTER_P (operand0))
copy_reg_pointer (operand0, operand1);
}
-
+
/* When MEMs are broken out, the REG_POINTER flag doesn't
get set. In some cases, we can set the REG_POINTER flag
from the declaration for the MEM. */
&& GET_CODE (operands[0]) == REG);
gcc_assert (!reg_overlap_mentioned_p (high_reg, addr));
-
+
/* No overlap between high target register and address
register. (We do this in a non-obvious way to
save a register file writeback) */
operands[0] = XEXP (addr, 0);
gcc_assert (GET_CODE (operands[1]) == REG
&& GET_CODE (operands[0]) == REG);
-
+
gcc_assert (!reg_overlap_mentioned_p (high_reg, addr));
/* No overlap between high target register and address
register. (We do this in a non-obvious way to save a
else
{
rtx xoperands[2];
-
+
gcc_assert (operands[1] == CONST0_RTX (GET_MODE (operands[0])));
-
+
/* This is a pain. You have to be prepared to deal with an
arbitrary address here including pre/post increment/decrement.
so avoid this in the MD. */
gcc_assert (GET_CODE (operands[0]) == REG);
-
+
xoperands[1] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1);
xoperands[0] = operands[0];
output_asm_insn ("copy %%r0,%0\n\tcopy %%r0,%1", xoperands);
first slot is only used when the frame pointer is needed. */
if (size || frame_pointer_needed)
size += pa_starting_frame_offset ();
-
+
/* If the current function calls __builtin_eh_return, then we need
to allocate stack space for registers that will hold data for
the exception handler. */
to do for functions which make no calls and allocate no
frame? Do we need to allocate a frame, or can we just omit
the save? For now we'll just omit the save.
-
+
We don't want a note on this insn as the frame marker can
move if there is a dynamic stack allocation. */
if (flag_pic && actual_fsize != 0 && !TARGET_64BIT)
/* A fpload can't be issued until one cycle before a
preceding arithmetic operation has finished if
the target of the fpload is the destination of the
- arithmetic operation.
+ arithmetic operation.
Exception: For PA7100LC, PA7200 and PA7300, the cost
is 3 cycles, unless they bundle together. We also
default:
gcc_unreachable ();
}
-
+
if (!read_only_operand (base, VOIDmode) && !flag_pic)
fputs ("-$global$", file);
if (offset)
if (profile_flag)
fprintf (asm_out_file, "\t.IMPORT _mcount,%s\n", aswhat);
}
-
+
static void
pa_elf_file_start (void)
{
pa_output_lbranch (rtx dest, rtx_insn *insn, int xdelay)
{
rtx xoperands[4];
-
+
xoperands[0] = dest;
/* First, free up the delay slot. */
}
else
return "addib,%C2 %1,%0,%3";
-
+
case 8:
/* Handle weird backwards branch with a fulled delay slot
which is nullified. */
return pa_output_lbranch (operands[3], insn, xdelay);
}
-
+
}
/* Deal with gross reload from FP register case. */
else if (which_alternative == 1)
pa_output_arg_descriptor (insn);
if (TARGET_PA_20)
return "bve,l,n (%%r22),%%r2\n\tnop";
- return "ble 0(%%sr4,%%r22)\n\tcopy %%r31,%%r2";
+ return "ble 0(%%sr4,%%r22)\n\tcopy %%r31,%%r2";
}
if (TARGET_PORTABLE_RUNTIME)
}
/* Now the normal case -- we can reach $$dyncall directly or
- we're sure that we can get there via a long-branch stub.
+ we're sure that we can get there via a long-branch stub.
No need to check target flags as the length uniquely identifies
the remaining cases. */
The ASM_OUTPUT_ALIGNED_BSS macro needs to be defined to call this
function on the SOM port to prevent uninitialized global data from
being placed in the data section. */
-
+
void
pa_asm_output_aligned_bss (FILE *stream,
const char *name,
gcc_assert (lab != NULL_RTX);
if (INSN_ADDRESSES_SET_P ())
- return INSN_ADDRESSES (INSN_UID (lab)) > INSN_ADDRESSES (INSN_UID (insn));
+ return INSN_ADDRESSES (INSN_UID (lab)) > INSN_ADDRESSES (INSN_UID (insn));
while (insn)
{
to match the HP Compiler ABI. */
static rtx
-pa_function_value (const_tree valtype,
- const_tree func ATTRIBUTE_UNUSED,
+pa_function_value (const_tree valtype,
+ const_tree func ATTRIBUTE_UNUSED,
bool outgoing ATTRIBUTE_UNUSED)
{
machine_mode valmode;
and the function is in a COMDAT group, place the plabel reference in the
.data.rel.ro.local section. The linker ignores references to symbols in
discarded sections from this section. */
-
+
static section *
pa_elf_select_rtx_section (machine_mode mode, rtx x,
unsigned HOST_WIDE_INT align)
if (COMPLEX_MODE_P (from) || VECTOR_MODE_P (from)
|| COMPLEX_MODE_P (to) || VECTOR_MODE_P (to))
return false;
-
+
/* There is no way to load QImode or HImode values directly from memory
to a FP register. SImode loads to the FP registers are not zero
extended. On the 64-bit target, this conflicts with the definition
}
/* Implement TARGET_MODES_TIEABLE_P.
-
+
We should return FALSE for QImode and HImode because these modes
are not ok in the floating-point registers. However, this prevents
tieing these modes to SImode and DImode in the general registers.
must provide patterns for doing indexed integer stores, or the move
expanders must force the address of an indexed store to a register.
We have adopted the latter approach.
-
+
Another function of pa_legitimate_address_p is to ensure that
the base register is a valid pointer for indexed instructions.
On targets that have non-equivalent space registers, we have to
{
HOST_WIDE_INT size;
- size = mode != BLKmode ? GET_MODE_SIZE (mode) : int_size_in_bytes (type);
+ size = mode != BLKmode ? GET_MODE_SIZE (mode) : int_size_in_bytes (type);
/* The 64-bit runtime does not restrict the size of stack frames,
but the gcc calling conventions limit argument sizes to 1G. Our
} machine_function;
/* Define this macro if it is advisable to hold scalars in registers
- in a wider mode than that declared by the program. In such cases,
+ in a wider mode than that declared by the program. In such cases,
the value is constrained to be within the bounds of the declared
type, but kept valid in the wider mode. The signedness of the
extension may differ from that of the type. */
This needs to be 8 when TARGET_64BIT is true to allow building various
TImode routines in libgcc. However, we also need the DImode DIVMOD
routines because they are not currently implemented in pa.md.
-
+
The HP runtime specification doesn't provide the alignment requirements
and calling conventions for TImode variables. */
#ifdef IN_LIBGCC2
of arguments scanned so far (including the invisible argument,
if any, which holds the structure-value-address). Thus, 4 or
more means all following args should go on the stack.
-
+
The INCOMING field tracks whether this is an "incoming" or
"outgoing" argument.
-
+
The INDIRECT field indicates whether this is an indirect
call or not.
-
+
The NARGS_PROTOTYPE field indicates that an argument does not
have a prototype when it less than or equal to 0. */
#define MIN_CACHELINE_SIZE 32
\f
-/* Addressing modes, and classification of registers for them.
+/* Addressing modes, and classification of registers for them.
Using autoincrement addressing modes on PA8000 class machines is
not profitable. */
/* Higher than the default as we prefer to use simple move insns
(better scheduling and delay slot filling) and because our
- built-in block move is really a 2X unrolled loop.
+ built-in block move is really a 2X unrolled loop.
Believe it or not, this has to be big enough to allow for copying all
arguments passed in registers to avoid infinite recursion during argument
#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
fprintf (FILE, "\t.word L$%d\n", VALUE)
-/* This is how to output an element of a case-vector that is relative.
+/* This is how to output an element of a case-vector that is relative.
Since we always place jump tables in the text section, the difference
is absolute and requires no relocation. */
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
pa_asm_output_aligned_bss (FILE, NAME, SIZE, ALIGN)
-
+
/* This says how to output an assembler line to define a global common symbol
with size SIZE (in bytes) and alignment ALIGN (in bits). */
#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
pa_asm_output_aligned_local (FILE, NAME, SIZE, ALIGN)
-
+
/* All HP assemblers use "!" to separate logical lines. */
#define IS_ASM_LOGICAL_LINE_SEPARATOR(C, STR) ((C) == '!')
instructions for non-PIC and PIC, respectively. Import stubs are
seven and five instructions for HP-UX and ELF targets, respectively.
The default stub group size for ELF targets is 217856 bytes.
- FIXME: We need an option to set the maximum offset. */
+ FIXME: We need an option to set the maximum offset. */
#define MAX_PCREL17F_OFFSET (TARGET_HPUX ? 198164 : 217856)
#define NEED_INDICATE_EXEC_STACK 0
/* 1 if N is a possible register number for function argument passing. */
#define FUNCTION_ARG_REGNO_P(N) \
- (((N) >= 23 && (N) <= 26) || (! TARGET_SOFT_FLOAT && (N) >= 32 && (N) <= 39))
+ (((N) >= 23 && (N) <= 26) || (! TARGET_SOFT_FLOAT && (N) >= 32 && (N) <= 39))
/* How to refer to registers in assembler output.
This sequence is indexed by compiler's hard-register-number (see above). */
linked executables and shared libraries. */
#define LDD_SUFFIX "chatr"
/* Look for lines like "dynamic /usr/lib/X11R5/libX11.sl"
- or "static /usr/lib/X11R5/libX11.sl".
+ or "static /usr/lib/X11R5/libX11.sl".
HPUX 10.20 also has lines like "static branch prediction ..."
so we filter that out explicitly.
#define GTHREAD_USE_WEAK 0
/* Shared library suffix. Collect2 strips the version string after
- this suffix when generating constructor/destructor names. */
+ this suffix when generating constructor/destructor names. */
#define SHLIB_SUFFIX ".sl"
/* We don't have named sections. */
/* This file should be included last. */
#include "target-def.h"
-/* this is the current value returned by the macro FIRST_PARM_OFFSET
+/* this is the current value returned by the macro FIRST_PARM_OFFSET
defined in tm.h */
int current_first_parm_offset;
#undef TARGET_SECONDARY_RELOAD
#define TARGET_SECONDARY_RELOAD pdp11_secondary_reload
-#undef TARGET_REGISTER_MOVE_COST
+#undef TARGET_REGISTER_MOVE_COST
#define TARGET_REGISTER_MOVE_COST pdp11_register_move_cost
#undef TARGET_PREFERRED_RELOAD_CLASS
alloca storage if any. */
void
pdp11_expand_prologue (void)
-{
+{
HOST_WIDE_INT fsize = get_frame_size ();
unsigned regno;
rtx x, via_ac = NULL;
emit_insn (gen_setd ());
emit_insn (gen_seti ());
}
-
+
/* Save CPU registers. */
for (regno = R0_REGNUM; regno <= PC_REGNUM; regno++)
if (pdp11_saved_regno (regno))
}
/* Save FPU registers. */
- for (regno = AC0_REGNUM; regno <= AC3_REGNUM; regno++)
+ for (regno = AC0_REGNUM; regno <= AC3_REGNUM; regno++)
if (pdp11_saved_regno (regno))
{
x = gen_rtx_PRE_DEC (Pmode, stack_pointer_rtx);
void
pdp11_expand_epilogue (void)
-{
+{
HOST_WIDE_INT fsize = get_frame_size ();
unsigned regno;
rtx x, reg, via_ac = NULL;
bool sameoff = false;
enum { REGOP, OFFSOP, MEMOP, PUSHOP, POPOP, CNSTOP, RNDOP } optype;
long sval[2];
-
+
/* If either piece order is accepted and one is pre-decrement
while the other is post-increment, set order to be high order
word first. That will force the pre-decrement to be turned
into a pointer adjust, then offset addressing.
Otherwise, if either operand uses pre-decrement, that means
- the order is low order first.
+ the order is low order first.
Otherwise, if both operands are registers and destination is
higher than source and they overlap, do low order word (highest
register number) first. */
the push increases the offset to each source word.
In theory there are other cases like this, for example dest == pop,
but those don't occur in real life so ignore those. */
- if (GET_CODE (operands[0]) == MEM
+ if (GET_CODE (operands[0]) == MEM
&& GET_CODE (XEXP (operands[0], 0)) == PRE_DEC
&& REGNO (XEXP (XEXP (operands[0], 0), 0)) == STACK_POINTER_REGNUM
&& reg_overlap_mentioned_p (stack_pointer_rtx, operands[1]))
else
gcc_assert (useorder == either || useorder == order);
-
+
for (op = 0; op < opcount; op++)
{
/* First classify the operand. */
supposed to allow to happen. Return failure for such cases. */
if (optype == RNDOP)
return false;
-
+
if (action != NULL)
action[op] = no_action;
-
+
/* If the operand uses pre-decrement addressing but we
want to get the parts high order first,
decrement the former register explicitly
XEXP (XEXP (operands[op], 0), 0));
optype = OFFSOP;
}
- /* If the operand uses post-increment mode but we want
+ /* If the operand uses post-increment mode but we want
to get the parts low order first, change the operand
into ordinary indexing and remember to increment
the register explicitly when we're done. */
REAL_VALUE_TO_TARGET_DOUBLE
(*CONST_DOUBLE_REAL_VALUE (operands[op]), sval);
}
-
+
for (i = 0; i < words; i++)
{
if (order == big)
rtx inops[2];
rtx exops[4][2];
rtx adjops[2];
-
+
pdp11_action action[2];
int i, words;
-
+
words = GET_MODE_BITSIZE (GET_MODE (operands[0])) / 16;
adjops[1] = gen_rtx_CONST_INT (HImode, words * 2);
inops[0] = operands[0];
inops[1] = operands[1];
-
+
pdp11_expand_operands (inops, exops, 2, words, action, either);
-
+
/* Check for explicit decrement before. */
if (action[0] == dec_before)
{
else
sprintf (label, "*%s_%u", prefix, num);
}
-
+
/* Output an ascii string. */
void
output_ascii (FILE *file, const char *p, int size)
int i, c;
const char *pseudo = "\t.ascii\t";
bool delim = false;
-
+
if (TARGET_DEC_ASM)
{
if (p[size - 1] == '\0')
assemble_name (file, name);
fputs (":", file);
ASM_OUTPUT_SKIP (file, size);
- }
+ }
}
/* Special format operators handled here:
pdp11_asm_print_operand (FILE *file, rtx x, int code)
{
long sval[2];
-
+
if (code == '#')
{
if (TARGET_DEC_ASM)
/* Register to register moves are cheap if both are general
registers. */
-static int
+static int
pdp11_register_move_cost (machine_mode mode ATTRIBUTE_UNUSED,
reg_class_t c1, reg_class_t c2)
{
const int asize = (mode == QImode) ? 2 : GET_MODE_SIZE (mode);
rtx src, dest;
const char *fmt;
-
+
switch (code)
{
case CONST_INT:
if (GET_RTX_LENGTH (code) > 1)
src = XEXP (x, 1);
dest = XEXP (x, 0);
-
+
/* If optimizing for size, claim everything costs 2 per word, plus
whatever the operands require. */
if (!speed)
case DIV:
*total = 10 * asize * asize;
break;
-
+
case MOD:
/* Fake value because it's accounted for under DIV, since we
use a divmod pattern. */
case of a one bit shift. */
*total = asize;
break;
-
+
default:
*total = asize;
break;
}
}
}
-
+
/* Now see if we're looking at a SET. If yes, then look at the
source to see if this is a move or an arithmetic operation, and
continue accordingly to handle the operands. */
bool speed)
{
int cost = 0;
-
+
if (GET_CODE (addr) != REG)
{
if (!simple_memory_operand (addr, mode))
the actual operation plus a clobber, or the implicit compare plus
the actual operation. Find the actual operation. */
pat = PATTERN (insn);
-
+
if (GET_CODE (pat) == PARALLEL)
{
set = XVECEXP (pat, 0, 0);
if (GET_CODE (set) != SET)
return 0;
}
-
+
/* Pick up the SET source and destination RTL. */
dest = XEXP (set, 0);
src = XEXP (set, 1);
src2 = XEXP (src, 1);
base_cost += pdp11_addr_cost (src2, mode, ADDR_SPACE_GENERIC, speed);
}
-
+
return base_cost;
}
/* Decode the address now. */
indirection:
-
+
addr = XEXP (op, 0);
switch (GET_CODE (addr))
case REG:
/* (R0) - no extra cost */
return 1;
-
+
case PRE_DEC:
case POST_INC:
case PRE_MODIFY:
case POST_MODIFY:
/* -(R0), (R0)+ - cheap! */
return 1;
-
+
case MEM:
- /* cheap - is encoded in addressing mode info!
+ /* cheap - is encoded in addressing mode info!
-- except for @(R0), which has to be @0(R0) !!! */
if (GET_CODE (XEXP (addr, 0)) == REG)
return 0;
-
+
op=addr;
goto indirection;
-
+
case CONST_INT:
- case LABEL_REF:
+ case LABEL_REF:
case CONST:
case SYMBOL_REF:
/* @#address - extra cost */
default:
break;
}
-
+
return FALSE;
}
/* Decode the address now. */
indirection:
-
+
addr = XEXP (op, 0);
switch (GET_CODE (addr))
case REG:
/* (R0) - no extra cost */
return 1;
-
+
case PRE_DEC:
case POST_INC:
case PRE_MODIFY:
case POST_MODIFY:
return 0;
-
+
case MEM:
- /* cheap - is encoded in addressing mode info!
+ /* cheap - is encoded in addressing mode info!
-- except for @(R0), which has to be @0(R0) !!! */
if (GET_CODE (XEXP (addr, 0)) == REG)
return 0;
-
+
op=addr;
goto indirection;
-
+
case CONST_INT:
- case LABEL_REF:
+ case LABEL_REF:
case CONST:
case SYMBOL_REF:
/* @#address - extra cost */
default:
break;
}
-
+
return FALSE;
}
So we disallow all mode changes involving FPRs. */
if (FLOAT_MODE_P (from) != FLOAT_MODE_P (to))
return false;
-
+
return !reg_classes_intersect_p (FPU_REGS, rclass);
}
Given an rtx X being reloaded into a reg required to be
in class CLASS, return the class of reg to actually use.
In general this is just CLASS; but on some machines
- in some cases it is preferable to use a more restrictive class.
+ in some cases it is preferable to use a more restrictive class.
loading is easier into LOAD_FPU_REGS than FPU_REGS! */
Given an rtx X being reloaded into a reg required to be
in class CLASS, return the class of reg to actually use.
In general this is just CLASS; but on some machines
- in some cases it is preferable to use a more restrictive class.
+ in some cases it is preferable to use a more restrictive class.
loading is easier into LOAD_FPU_REGS than FPU_REGS! */
/* TARGET_SECONDARY_RELOAD.
- FPU registers AC4 and AC5 (class NO_LOAD_FPU_REGS) require an
+ FPU registers AC4 and AC5 (class NO_LOAD_FPU_REGS) require an
intermediate register (AC0-AC3: LOAD_FPU_REGS). Everything else
can be loaded/stored directly. */
-static reg_class_t
+static reg_class_t
pdp11_secondary_reload (bool in_p ATTRIBUTE_UNUSED,
rtx x,
reg_class_t reload_class,
if (reload_class != NO_LOAD_FPU_REGS || GET_CODE (x) != REG ||
REGNO_REG_CLASS (REGNO (x)) == LOAD_FPU_REGS)
return NO_REGS;
-
+
return LOAD_FPU_REGS;
}
static bool
pdp11_secondary_memory_needed (machine_mode, reg_class_t c1, reg_class_t c2)
{
- int fromfloat = (c1 == LOAD_FPU_REGS || c1 == NO_LOAD_FPU_REGS ||
+ int fromfloat = (c1 == LOAD_FPU_REGS || c1 == NO_LOAD_FPU_REGS ||
c1 == FPU_REGS);
- int tofloat = (c2 == LOAD_FPU_REGS || c2 == NO_LOAD_FPU_REGS ||
+ int tofloat = (c2 == LOAD_FPU_REGS || c2 == NO_LOAD_FPU_REGS ||
c2 == FPU_REGS);
-
+
return (fromfloat != tofloat);
}
/* accept @#address */
if (CONSTANT_ADDRESS_P (operand))
return true;
-
+
switch (GET_CODE (operand))
{
case REG:
/* accept (R0) */
return !strict || REGNO_OK_FOR_BASE_P (REGNO (operand));
-
+
case PLUS:
/* accept X(R0) */
return GET_CODE (XEXP (operand, 0)) == REG
xfoob = XEXP (operand, 0);
/* (MEM:xx (MEM:xx ())) is not valid for SI, DI and currently
- also forbidden for float, because we have to handle this
+ also forbidden for float, because we have to handle this
in output_move_double and/or output_move_quad() - we could
- do it, but currently it's not worth it!!!
- now that DFmode cannot go into CPU register file,
- maybe I should allow float ...
+ do it, but currently it's not worth it!!!
+ now that DFmode cannot go into CPU register file,
+ maybe I should allow float ...
but then I have to handle memory-to-memory moves in movdf ?? */
if (GET_MODE_BITSIZE(mode) > 16)
return false;
reg number REGNO. */
enum reg_class
pdp11_regno_reg_class (int regno)
-{
+{
if (regno == ARG_POINTER_REGNUM)
return NOTSP_REG;
else if (regno == CC_REGNUM || regno == FCC_REGNUM)
for (regno = AC0_REGNUM; regno <= AC5_REGNUM; regno++)
if (pdp11_saved_regno (regno))
offset += 8;
-
+
return offset;
-}
+}
/* Return the offset between two registers, one to be eliminated, and the other
its replacement, at the start of a routine. */
{
char buf[256];
int i;
-
+
restart:
switch (GET_CODE (x))
{
On the pdp11 the value is found in R0 (or ac0??? not without FPU!!!! ) */
static rtx
-pdp11_function_value (const_tree valtype,
+pdp11_function_value (const_tree valtype,
const_tree fntype_or_decl ATTRIBUTE_UNUSED,
bool outgoing ATTRIBUTE_UNUSED)
{
{
rtx r, test;
rtx_code_label *lb;
-
+
if (CONST_INT_P (operands[2]) && pdp11_small_shift (INTVAL (operands[2])))
emit_insn ((*shift_sc) (operands[0], operands[1], operands[2]));
else if (TARGET_40_PLUS)
inops[0] = operands[0];
pdp11_expand_operands (inops, exops, 1, 2, action, either);
}
-
+
if (!small)
{
/* Loop case, generate the top of loop label. */
/* Worker function for TARGET_TRAMPOLINE_INIT.
- trampoline - how should i do it in separate i+d ?
- have some allocate_trampoline magic???
+ trampoline - how should i do it in separate i+d ?
+ have some allocate_trampoline magic???
the following should work for shared I/D:
if (!startswith (ident, "GCC:"))
fprintf (asm_out_file, "\t.ident\t\"%s\"\n", ident);
}
-
+
}
/* This emits a (user) label, which gets a "_" prefix except for DEC
assemble_name (file, label1);
putc (',', file);
assemble_name (file, label2);
- }
+ }
putc ('\n', file);
}
{
const char *rwro = (flags & SECTION_WRITE) ? "rw" : "ro";
const char *insdat = (flags & SECTION_CODE) ? "i" : "d";
-
+
gcc_assert (TARGET_DEC_ASM);
fprintf (asm_out_file, "\t.psect\t%s,con,%s,%s\n", name, insdat, rwro);
}
".bss");
}
}
-
+
static void
pdp11_file_start (void)
{
default_file_start ();
-
+
if (TARGET_DEC_ASM)
fprintf (asm_out_file, "\t.enabl\tlsb,reg\n\n");
}
#define SHORT_TYPE_SIZE 16
#define INT_TYPE_SIZE (TARGET_INT16 ? 16 : 32)
#define LONG_TYPE_SIZE 32
-#define LONG_LONG_TYPE_SIZE 64
+#define LONG_LONG_TYPE_SIZE 64
/* machine types from ansi */
#define SIZE_TYPE "short unsigned int" /* definition of size_t */
/* Define that floats are in VAX order, not high word first as for ints. */
#define FLOAT_WORDS_BIG_ENDIAN 0
-/* Width of a word, in units (bytes).
+/* Width of a word, in units (bytes).
UNITS OR BYTES - seems like units */
#define UNITS_PER_WORD 2
extern const struct real_format pdp11_d_format;
/* Maximum sized of reasonable data type -- DImode ...*/
-#define MAX_FIXED_MODE_SIZE 64
+#define MAX_FIXED_MODE_SIZE 64
/* Allocation boundary (in *bits*) for storing pointers in memory. */
#define POINTER_BOUNDARY 16
All registers that the compiler knows about must be given numbers,
even those that are not normally considered general registers.
- we have 8 integer registers, plus 6 float
+ we have 8 integer registers, plus 6 float
(don't use scratch float !) */
/* 1 for registers that have pervasive standard uses
On the pdp, these are:
Reg 7 = pc;
reg 6 = sp;
- reg 5 = fp; not necessarily!
+ reg 5 = fp; not necessarily!
*/
#define FIXED_REGISTERS \
For any two classes, it is very desirable that there be another
class that represents their union. */
-
+
/* The pdp has a couple of classes:
MUL_REGS are used for odd numbered regs, to use in 16-bit multiplication
GENERAL_REGS is all cpu
LOAD_FPU_REGS is the first four cpu regs, they are easier to load
NO_LOAD_FPU_REGS is ac4 and ac5, currently - difficult to load them
-FPU_REGS is all fpu regs
+FPU_REGS is all fpu regs
CC_REGS is the condition codes (CPU and FPU)
*/
/* Return TRUE if the class is a CPU register. */
#define CPU_REG_CLASS(CLASS) \
(CLASS >= NOTR0_REG && CLASS <= GENERAL_REGS)
-
+
/* Return the maximum number of consecutive registers
needed to represent mode MODE in a register of class CLASS. */
#define CLASS_MAX_NREGS(CLASS, MODE) \
#define PUSH_ROUNDING(BYTES) pdp11_push_rounding (BYTES)
-/* current_first_parm_offset stores the # of registers pushed on the
+/* current_first_parm_offset stores the # of registers pushed on the
stack */
extern int current_first_parm_offset;
If the precise function being called is known, FUNC is its FUNCTION_DECL;
otherwise, FUNC is 0. */
#define BASE_RETURN_VALUE_REG(MODE) \
- (FLOAT_MODE_P (MODE) ? AC0_REGNUM : RETVAL_REGNUM)
+ (FLOAT_MODE_P (MODE) ? AC0_REGNUM : RETVAL_REGNUM)
/* 1 if N is a possible register number for function argument passing.
- not used on pdp */
#define DEFAULT_SIGNED_CHAR 1
/* Max number of bytes we can move from memory to memory
- in one reasonably fast instruction.
+ in one reasonably fast instruction.
*/
#define MOVE_MAX 2
{
return (CODE == CLZ || CODE == CTZ) ? false : true;
}
-
+
rtx expand (function_expander &e) const override
{
switch (e.op_info->op)
if (overloaded_p && !instance.base->can_be_overloaded_p (instance.pred))
return nullptr;
b.append_base_name (instance.base_name);
-
+
if (!overloaded_p)
{
b.append_name (operand_suffixes[instance.op_info->op]);
rl78_start_function (FILE *file)
{
int i;
-
+
add_vector_labels (file, "interrupt");
add_vector_labels (file, "vector");
Don't do this until the fixed IBM assembler is more generally available.
When this becomes permanently defined, the ASM_OUTPUT_EXTERNAL,
ASM_OUTPUT_EXTERNAL_LIBCALL, and RS6000_OUTPUT_BASENAME macros will no
- longer be needed. Also, the extern declaration of mcount in
+ longer be needed. Also, the extern declaration of mcount in
rs6000_xcoff_file_start will no longer be needed. */
/* #define ASM_SPEC "-u %(asm_cpu)" */
%{mpe: -I%R/usr/lpp/ppe.poe/include} \
%{pthread: -D_THREAD_SAFE}"
-/* The GNU C++ standard library requires that these macros be
+/* The GNU C++ standard library requires that these macros be
defined. Synchronize with libstdc++ os_defines.h. */
#define CPLUSPLUS_CPP_SPEC_COMMON \
"-D_ALL_SOURCE -D__COMPATMATH__ \
#define LD_INIT_SWITCH "-binitfini"
#ifndef _AIX52
-extern long long int atoll(const char *);
+extern long long int atoll(const char *);
#endif
/* This target uses the aix64.opt file. */
#endif
/* If __APPLE_ALTIVEC__ is defined, the compiler supports 'vector',
- 'pixel' and 'bool' as context-sensitive AltiVec keywords (in
+ 'pixel' and 'bool' as context-sensitive AltiVec keywords (in
non-AltiVec contexts, they revert to their original meanings,
if any), so we do not need to define them as macros. Also,
avoid defining them as macros for C++ with strict ANSI, as
default, as kernel code doesn't save/restore those registers. */
#define OS_MISSING_ALTIVEC (flag_mkernel || flag_apple_kext)
-/* Darwin has support for section anchors on powerpc*.
+/* Darwin has support for section anchors on powerpc*.
It is disabled for any section containing a "zero-sized item" (because these
are re-written as size=1 to be compatible with the OSX ld64).
The re-writing would interfere with the computation of anchor offsets.
Therefore, we place zero-sized items in their own sections and make such
sections unavailable to section anchoring. */
-#undef TARGET_ASM_OUTPUT_ANCHOR
+#undef TARGET_ASM_OUTPUT_ANCHOR
#define TARGET_ASM_OUTPUT_ANCHOR darwin_asm_output_anchor
#undef TARGET_USE_ANCHORS_FOR_SYMBOL_P
arch = strcmp (argv[0], "cpu") == 0;
if (!arch && strcmp (argv[0], "tune"))
return NULL;
-
+
if (arch)
cpu = "powerpc";
/************************[ Target stuff ]***********************************/
-/* Define the actual types of some ANSI-mandated types.
+/* Define the actual types of some ANSI-mandated types.
Needs to agree with <machine/ansi.h>. GCC defaults come from c-decl.cc,
c-common.cc, and config/<arch>/<arch>.h. */
/************************[ Target stuff ]***********************************/
-/* Define the actual types of some ANSI-mandated types.
+/* Define the actual types of some ANSI-mandated types.
Needs to agree with <machine/ansi.h>. GCC defaults come from c-decl.cc,
c-common.cc, and config/<arch>/<arch>.h. */
|| (faulting_insn & 0xFC1F8000) == 0xBC018000 /* stmw xxx, -yyy(%r1) */)
{
char *shell_name;
-
+
fnotice (stderr, "Out of stack space.\n");
shell_name = getenv ("SHELL");
if (shell_name != NULL)
{ "zsh", "limit stacksize 32m" }
};
size_t i;
-
+
for (i = 0; i < ARRAY_SIZE (shell_commands); i++)
if (strcmp (shell_commands[i][0], shell_name + 1) == 0)
{
- fnotice (stderr,
+ fnotice (stderr,
"Try running '%s' in the shell to raise its limit.\n",
shell_commands[i][1]);
}
}
-
+
if (global_dc->m_abort_on_error)
fancy_abort (__FILE__, __LINE__, __FUNCTION__);
exit (FATAL_EXIT_CODE);
}
- fprintf (stderr, "[address=%08lx pc=%08x]\n",
+ fprintf (stderr, "[address=%08lx pc=%08x]\n",
uc->uc_mcontext->MC_FLD(es).MC_FLD(dar),
uc->uc_mcontext->MC_FLD(ss).MC_FLD(srr0));
internal_error ("segmentation fault");
sigemptyset(&sact.sa_mask);
sact.sa_flags = SA_ONSTACK | SA_SIGINFO;
sact.sa_sigaction = segv_handler;
- if (sigaction (SIGSEGV, &sact, 0) < 0)
+ if (sigaction (SIGSEGV, &sact, 0) < 0)
fatal_error (input_location, "While setting up signal handler: %m");
}
\f
/* We are 32-bit all the time, so optimize a little. */
#undef TARGET_64BIT
#define TARGET_64BIT 0
-
+
/* We don't need to generate entries in .fixup, except when
-mrelocatable or -mrelocatable-lib is given. */
#undef RELOCATABLE_NEEDS_FIXUP
#ifdef __cplusplus
extern "C" {
-#endif
+#endif
/*
* unsigned int __cntlzw(unsigned int)
* void __mtfsb1(int)
* double __setflm(double)
*
- * dcbt intrinsics
+ * dcbt intrinsics
* void __protected_unlimited_stream_set (unsigned int direction, const void *add, unsigned int ID)
* void __protected_stream_set (unsigned int direction, const void *add, unsigned int ID)
* void __protected_stream_stop_all (void)
#ifdef __powerpc64__
#define __mtspr(spr, value) \
__asm__ volatile ("mtspr %0,%1" : : "n" (spr), "r" (value))
-
+
#define __mfspr(spr) __extension__ \
({ unsigned long long result; \
__asm__ volatile ("mfspr %0,%1" : "=r" (result) : "n" (spr)); \
#define __dcbf(base) \
__asm__ volatile ("dcbf %y0" : "=Z" (*(__V4SI*) (base)) : : "memory")
-
+
#define __dcbz(base) \
__asm__ volatile ("dcbz %y0" : "=Z" (*(__V4SI*) (base)) : : "memory")
#define __icbi(base) \
__asm__ volatile ("icbi %y0" : "=Z" (*(__V4SI*) (base)) : : "memory")
-
+
#define __dcbt_TH1000(EATRUNC, D, UG, ID) \
__asm__ volatile ("dcbt %y0,8" \
: "=Z" (*(__V4SI*) (__SIZE_TYPE__)((((__SIZE_TYPE__) (EATRUNC)) & ~0x7F) \
#define __mtfsf(mask,value) \
__asm__ volatile ("mtfsf %0,%1" : : "n" (mask), "d" ((double) (value)))
-
+
#define __mtfsfi(bits,field) \
__asm__ volatile ("mtfsfi %0,%1" : : "n" (bits), "n" (field))
/* __builtin_fabs may perform unnecessary rounding. */
-/* Rename __fabs and __fabsf to work around internal prototypes defined
- in bits/mathcalls.h with some glibc versions. */
-#define __fabs __ppu_fabs
-#define __fabsf __ppu_fabsf
+/* Rename __fabs and __fabsf to work around internal prototypes defined
+ in bits/mathcalls.h with some glibc versions. */
+#define __fabs __ppu_fabs
+#define __fabsf __ppu_fabsf
static __inline__ double __fabs(double x) __attribute__((always_inline));
static __inline__ double
&& TARGET_LONG_DOUBLE_128
&& t == long_double_type_node));
}
-
+
/* Return true iff ARGTYPE can be compatibly passed as PARMTYPE. */
static bool
The AIX ABI for the RS/6000 specifies that all structures are
returned in memory. The Darwin ABI does the same.
-
+
For the Darwin 64 Bit ABI, a function result can be returned in
registers or in memory, depending on the size of the return data
type. If it is returned in registers, the value occupies the same
registers as it would if it were the first and only function
argument. Otherwise, the function places its result in memory at
the location pointed to by GPR3.
-
- The SVR4 ABI specifies that structures <= 8 bytes are returned in r3/r4,
+
+ The SVR4 ABI specifies that structures <= 8 bytes are returned in r3/r4,
but a draft put them in memory, and GCC used to implement the draft
instead of the final standard. Therefore, aix_struct_return
controls this instead of DEFAULT_ABI; V.4 targets needing backward
rs6000_darwin64_struct_check_p (machine_mode mode, const_tree type)
{
return rs6000_darwin64_abi
- && ((mode == BLKmode
- && TREE_CODE (type) == RECORD_TYPE
+ && ((mode == BLKmode
+ && TREE_CODE (type) == RECORD_TYPE
&& int_size_in_bytes (type) > 0)
- || (type && TREE_CODE (type) == RECORD_TYPE
+ || (type && TREE_CODE (type) == RECORD_TYPE
&& int_size_in_bytes (type) == 8)) ? 1 : 0;
}
{
fprintf (stderr, "function_adv: words = %2d, align=%d, size=%d",
cum->words, TYPE_ALIGN (type), size);
- fprintf (stderr,
+ fprintf (stderr,
"nargs = %4d, proto = %d, mode = %4s (darwin64 abi)\n",
cum->nargs_prototype, cum->prototype,
GET_MODE_NAME (mode));
/* We need to deal with the fact that the darwin ppc64 ABI is defined by an
earlier version of gcc, with the property that it always applied alignment
adjustments to the va-args (even for zero-sized types). The cheapest way
- to deal with this is to replicate the effect of the part of
- std_gimplify_va_arg_expr that carries out the align adjust, for the case
- of relevance.
+ to deal with this is to replicate the effect of the part of
+ std_gimplify_va_arg_expr that carries out the align adjust, for the case
+ of relevance.
We don't need to check for pass-by-reference because of the test above.
We can return a simplifed answer, since we know there's no offset to add. */
machine_mode mode,
int *punsignedp ATTRIBUTE_UNUSED,
const_tree, int);
-extern bool rs6000_return_in_memory (const_tree type,
+extern bool rs6000_return_in_memory (const_tree type,
const_tree fntype ATTRIBUTE_UNUSED);
extern bool rs6000_return_in_msb (const_tree valtype);
extern bool rs6000_pass_by_reference (cumulative_args_t,
/* Freeze lr_save_p. We've just emitted rtl that depends on the
state of lr_save_p so any change from here on would be a bug. In
particular, stop rs6000_ra_ever_killed from considering the SET
- of lr we may have added just above. */
+ of lr we may have added just above. */
cfun->machine->lr_save_state = info->lr_save_p + 1;
}
/* Allocate SIZE_INT bytes on the stack using a store with update style insn
and set the appropriate attributes for the generated insn. Return the
first insn which adjusts the stack pointer or the last insn before
- the stack adjustment loop.
+ the stack adjustment loop.
SIZE_INT is used to create the CFI note for the allocation.
try_split (PATTERN (insn), insn, 0);
size_rtx = tmp_reg;
}
-
+
if (TARGET_32BIT)
insn = emit_insn (gen_movsi_update_stack (stack_pointer_rtx,
stack_pointer_rtx,
if (newptr_regno != 1 && REGNO (frame_reg_rtx) != newptr_regno)
frame_reg_rtx = gen_rtx_REG (Pmode, newptr_regno);
-
+
if (end_save + ptr_off != 0)
{
rtx offset = GEN_INT (end_save + ptr_off);
already in a register. In some cases, this mask may be a constant
that we can discover with ud-chains, in which case the above
transformation is ok. However, the common usage here is for the
- mask to be produced by an UNSPEC_LVSL, in which case the mask
+ mask to be produced by an UNSPEC_LVSL, in which case the mask
cannot be known at compile time. In such a case we would have to
generate several instructions to compute M' as above at run time,
and a cost model is needed again.
{
if (GET_MODE (op) != V2DFmode)
return false;
-
+
enum rtx_code code = GET_CODE (op);
if (code != PLUS && code != SMIN && code != SMAX)
return false;
return 0;
if (GET_CODE (XEXP (lhs, 0)) == AND)
return 0;
-
+
*special = SH_NOSWAP_ST;
return 1;
}
break;
}
gcc_assert (swap_insn);
-
+
/* Find the load. */
insn_info = DF_INSN_INFO_GET (swap_insn);
rtx_insn *load_insn = 0;
return gen_rtx_AND (GET_MODE (align), canon, GEN_INT (-16));
}
-/* Check whether an rtx is an alignment mask, and if so, return
+/* Check whether an rtx is an alignment mask, and if so, return
a fully-expanded rtx for the masking operation. */
static rtx
alignment_mask (rtx_insn *insn)
remove_insn (to_delete[i].replace_insn);
to_delete[i].replace_insn->set_deleted ();
}
-
+
free (to_delete);
}
{
/* If remainder length < word length, branch to final
cleanup compare. */
-
+
if (!bytes_is_const)
{
do_ifelse (CCmode, LT, cmp_rem, GEN_INT (load_mode_size),
if (MEM_P (dest))
return gen_altivec_stvx_v4si_internal (dest, src);
- else
+ else
return gen_altivec_lvx_v4si_internal (dest, src);
}
emit_insn (stores[i]);
num_reg = 0;
}
-
+
}
return 1;
}
}
- /* Set the Darwin64 ABI as default for 64-bit Darwin.
+ /* Set the Darwin64 ABI as default for 64-bit Darwin.
So far, the only darwin64 targets are also MACH-O. */
if (TARGET_MACHO
- && DEFAULT_ABI == ABI_DARWIN
+ && DEFAULT_ABI == ABI_DARWIN
&& TARGET_64BIT)
{
if (main_target_opt != NULL && !main_target_opt->x_rs6000_darwin64_abi)
}
/* Return true if the vector misalignment factor is supported by the
- target. */
+ target. */
static bool
rs6000_builtin_support_vector_misalignment (machine_mode mode,
const_tree type,
/* Return alignment of TYPE. Existing alignment is ALIGN. HOW
selects whether the alignment is abi mandated, optional, or
both abi and optional alignment. */
-
+
unsigned int
rs6000_data_alignment (tree type, unsigned int align, enum data_align how)
{
to determine whether -mcmodel=medium code can use TOC pointer
relative addressing for OP. This means the alignment of the TOC
pointer must also be taken into account, and unfortunately that is
- only 8 bytes. */
+ only 8 bytes. */
#ifndef POWERPC64_TOC_POINTER_ALIGNMENT
#define POWERPC64_TOC_POINTER_ALIGNMENT 8
/* Return true if OP is a toc pointer relative address (the output
of create_TOC_reference). If STRICT, do not match non-split
- -mcmodel=large/medium toc pointer relative addresses. If the pointers
- are non-NULL, place base and offset pieces in TOCREL_BASE_RET and
+ -mcmodel=large/medium toc pointer relative addresses. If the pointers
+ are non-NULL, place base and offset pieces in TOCREL_BASE_RET and
TOCREL_OFFSET_RET respectively. */
bool
tocref = create_TOC_reference (modaddr, NULL_RTX);
rtx modmem = gen_const_mem (Pmode, tocref);
set_mem_alias_set (modmem, get_TOC_alias_set ());
-
+
rtx modreg = gen_reg_rtx (Pmode);
emit_insn (gen_rtx_SET (modreg, modmem));
This takes into account how many parallel operations we
can actually do of a given type, and also the latency.
P8:
- int add/sub 6/cycle
+ int add/sub 6/cycle
mul 2/cycle
vect add/sub/mul 2/cycle
fp add/sub/mul 2/cycle
dfp 1/cycle
*/
-
+
static int
rs6000_reassociation_width (unsigned int opc ATTRIBUTE_UNUSED,
machine_mode mode)
return 1;
if (VECTOR_MODE_P (mode))
return 4;
- if (INTEGRAL_MODE_P (mode))
+ if (INTEGRAL_MODE_P (mode))
return 1;
if (FLOAT_MODE_P (mode))
return 4;
? reg - 32
: reg - FIRST_ALTIVEC_REGNO + 32);
-#ifdef TARGET_REGNAMES
+#ifdef TARGET_REGNAMES
if (TARGET_REGNAMES)
fprintf (file, "%%vs%d", vsx_reg);
else
darwin_file_start ();
/* Determine the argument to -mcpu=. Default to G3 if not specified. */
-
+
if (rs6000_default_cpu != 0 && rs6000_default_cpu[0] != '\0')
cpu_id = rs6000_default_cpu;
return false;
}
/* fall through */
-
+
case ASHIFTRT:
case LSHIFTRT:
case ROTATE:
for (i = 0, xprev = x1, eprev = e0; i < passes - 2;
++i, xprev = xnext, eprev = enext) {
-
+
/* enext = eprev * eprev */
enext = gen_reg_rtx (mode);
emit_insn (gen_mul (enext, eprev, eprev));
vperm 9,10,11,12
- places the desired result in vr9. However, in LE mode the
+ places the desired result in vr9. However, in LE mode the
vector contents will be
vr10 = 00000003 00000002 00000001 00000000
one_vec = true;
break;
}
-
+
/* Look for splat patterns. */
if (one_vec)
{
int n_elts;
/* Special handling for structs in darwin64. */
- if (TARGET_MACHO
+ if (TARGET_MACHO
&& rs6000_darwin64_struct_check_p (TYPE_MODE (valtype), valtype))
{
CUMULATIVE_ARGS valcum;
IDENTIFIER_POINTER (tname));
else
fprintf (stderr, "function: unknown\n");
-
+
fprintf (stderr, "args:");
rs6000_debug_target_options (args, " ");
fprintf (stderr, "\n");
rs6000_function_specific_restore (struct gcc_options *opts,
struct gcc_options */* opts_set */,
struct cl_target_option *ptr)
-
+
{
opts->x_rs6000_isa_flags = ptr->x_rs6000_isa_flags;
opts->x_rs6000_isa_flags_explicit = ptr->x_rs6000_isa_flags_explicit;
rtx set = XVECEXP (pattern, 0, 0);
if (GET_CODE (set) != SET)
return false;
-
+
rtx clobber = XVECEXP (pattern, 0, 1);
if (GET_CODE (clobber) != CLOBBER)
return false;
This file is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
- Software Foundation; either version 3 of the License, or (at your option)
+ Software Foundation; either version 3 of the License, or (at your option)
any later version.
This file is distributed in the hope that it will be useful, but WITHOUT
/* Specify a default halt action for spu_hcmpeq and spu_hcmpgt intrinsics.
- * Users can override the action by defining it prior to including this
+ * Users can override the action by defining it prior to including this
* header file.
*/
#ifndef SPU_HALT_ACTION
#endif
/* Specify a default stop action for the spu_stop intrinsic.
- * Users can override the action by defining it prior to including this
+ * Users can override the action by defining it prior to including this
* header file.
*/
#ifndef SPU_STOP_ACTION
/* Specify a default action for unsupported intrinsic.
- * Users can override the action by defining it prior to including this
+ * Users can override the action by defining it prior to including this
* header file.
*/
#ifndef SPU_UNSUPPORTED_ACTION
#endif
-/* Casting intrinsics - from scalar to quadword
+/* Casting intrinsics - from scalar to quadword
*/
static __inline qword si_from_uchar(unsigned char c) {
return ((qword)(dc));
}
-/* Add intrinsics
+/* Add intrinsics
*/
#define si_a(_a, _b) ((qword)(vec_add((vec_uint4)(_a), (vec_uint4)(_b))))
static __inline qword si_ai(qword a, int b)
{
- return ((qword)(vec_add((vec_int4)(a),
+ return ((qword)(vec_add((vec_int4)(a),
vec_splat((vec_int4)(si_from_int(b)), 0))));
}
static __inline qword si_ahi(qword a, short b)
{
- return ((qword)(vec_add((vec_short8)(a),
+ return ((qword)(vec_add((vec_short8)(a),
vec_splat((vec_short8)(si_from_short(b)), 1))));
}
static __inline qword si_andbi(qword a, signed char b)
{
- return ((qword)(vec_and((vec_char16)(a),
+ return ((qword)(vec_and((vec_char16)(a),
vec_splat((vec_char16)(si_from_char(b)), 3))));
}
static __inline qword si_andhi(qword a, signed short b)
{
- return ((qword)(vec_and((vec_short8)(a),
+ return ((qword)(vec_and((vec_short8)(a),
vec_splat((vec_short8)(si_from_short(b)), 1))));
}
static __inline qword si_fcmeq(qword a, qword b)
{
vec_float4 msb = (vec_float4)((vec_uint4){0x80000000, 0x80000000, 0x80000000, 0x80000000});
-
- return ((qword)(vec_cmpeq(vec_andc((vec_float4)(a), msb),
+
+ return ((qword)(vec_cmpeq(vec_andc((vec_float4)(a), msb),
vec_andc((vec_float4)(b), msb))));
}
biteq = (vec_uint4) vec_cmpeq((vec_uint4)aabs,(vec_uint4)babs);
biteq = vec_and(biteq,(vec_uint4)vec_slo((vec_uchar16)biteq,x.v));
- /*
+ /*
B) Check if a is NaN, store in high word
-
+
B1) If the high word is greater than max_exp (indicates a NaN)
- B2) If the low word is greater than 0
+ B2) If the low word is greater than 0
*/
a_gt = (vec_uint4)vec_cmpgt(aabs,nan_mask);
static __inline qword si_fcmgt(qword a, qword b)
{
vec_float4 msb = (vec_float4)((vec_uint4){0x80000000, 0x80000000, 0x80000000, 0x80000000});
-
+
return ((qword)(vec_cmpgt(vec_andc((vec_float4)(a), msb),
vec_andc((vec_float4)(b), msb))));
}
/* Shift 4 bytes */
x.i[3] = 4 << 3;
- // absolute value of a,b
+ // absolute value of a,b
vec_uint4 aabs = vec_and((vec_uint4)a, sign_mask);
vec_uint4 babs = vec_and((vec_uint4)b, sign_mask);
b_nan = vec_or(b_nan, vec_and((vec_uint4)vec_slo((vec_uchar16)b_nan,x.v),b_inf));
b_nan = (vec_uint4)vec_perm((vec_uchar16)b_nan, (vec_uchar16)b_nan, splat_hi);
- // A) Check if the exponents are different
+ // A) Check if the exponents are different
vec_uint4 gt_hi = (vec_uint4)vec_cmpgt(aabs,babs);
// B) Check if high word equal, and low word greater
vec_uint4 eq = (vec_uint4)vec_cmpeq(aabs, babs);
vec_uint4 eqgt = vec_and(eq,vec_slo(gt_lo,x.v));
- // If either A or B is true, return true (unless NaNs detected)
+ // If either A or B is true, return true (unless NaNs detected)
vec_uint4 r = vec_or(gt_hi, eqgt);
// splat the high words of the comparison step
static __inline qword si_ceqbi(qword a, signed char b)
{
- return ((qword)(vec_cmpeq((vec_char16)(a),
+ return ((qword)(vec_cmpeq((vec_char16)(a),
vec_splat((vec_char16)(si_from_char(b)), 3))));
}
static __inline qword si_ceqhi(qword a, signed short b)
{
- return ((qword)(vec_cmpeq((vec_short8)(a),
+ return ((qword)(vec_cmpeq((vec_short8)(a),
vec_splat((vec_short8)(si_from_short(b)), 1))));
}
static __inline qword si_ceqi(qword a, signed int b)
{
- return ((qword)(vec_cmpeq((vec_int4)(a),
+ return ((qword)(vec_cmpeq((vec_int4)(a),
vec_splat((vec_int4)(si_from_int(b)), 0))));
}
aabs = vec_and((vec_uint4)a,sign_mask);
babs = vec_and((vec_uint4)b,sign_mask);
- /*
+ /*
B) Check if a is NaN, store in high word
-
+
B1) If the high word is greater than max_exp (indicates a NaN)
- B2) If the low word is greater than 0
+ B2) If the low word is greater than 0
*/
a_gt = (vec_uint4)vec_cmpgt(aabs,nan_mask);
result = vec_andc(result, anan);
/* Promote high words to 64 bits and return */
- return ((qword)(vec_perm((vec_uchar16)result, (vec_uchar16)result, hihi_promote)));
+ return ((qword)(vec_perm((vec_uchar16)result, (vec_uchar16)result, hihi_promote)));
}
/* Shift 4 bytes */
x.i[3] = 4 << 3;
- // absolute value of a,b
+ // absolute value of a,b
vec_uint4 aabs = vec_and((vec_uint4)a, sign_mask);
vec_uint4 babs = vec_and((vec_uint4)b, sign_mask);
// pick the one we want
vec_int4 bval=(vec_int4)vec_sel((vec_uchar16)babs, (vec_uchar16)bneg, (vec_uchar16)bsel);
- // A) Check if the exponents are different
+ // A) Check if the exponents are different
vec_uint4 gt_hi = (vec_uint4)vec_cmpgt(aval,bval);
// B) Check if high word equal, and low word greater
vec_uint4 eq = (vec_uint4)vec_cmpeq(aval, bval);
vec_uint4 eqgt = vec_and(eq,vec_slo(gt_lo,x.v));
- // If either A or B is true, return true (unless NaNs detected)
+ // If either A or B is true, return true (unless NaNs detected)
vec_uint4 r = vec_or(gt_hi, eqgt);
// splat the high words of the comparison step
static __inline qword si_cgtbi(qword a, signed char b)
{
- return ((qword)(vec_cmpgt((vec_char16)(a),
+ return ((qword)(vec_cmpgt((vec_char16)(a),
vec_splat((vec_char16)(si_from_char(b)), 3))));
}
static __inline qword si_cgthi(qword a, signed short b)
{
- return ((qword)(vec_cmpgt((vec_short8)(a),
+ return ((qword)(vec_cmpgt((vec_short8)(a),
vec_splat((vec_short8)(si_from_short(b)), 1))));
}
static __inline qword si_cgti(qword a, signed int b)
{
- return ((qword)(vec_cmpgt((vec_int4)(a),
+ return ((qword)(vec_cmpgt((vec_int4)(a),
vec_splat((vec_int4)(si_from_int(b)), 0))));
}
static __inline qword si_clgtbi(qword a, unsigned char b)
{
- return ((qword)(vec_cmpgt((vec_uchar16)(a),
+ return ((qword)(vec_cmpgt((vec_uchar16)(a),
vec_splat((vec_uchar16)(si_from_uchar(b)), 3))));
}
static __inline qword si_clgti(qword a, unsigned int b)
{
- return ((qword)(vec_cmpgt((vec_uint4)(a),
+ return ((qword)(vec_cmpgt((vec_uint4)(a),
vec_splat((vec_uint4)(si_from_uint(b)), 0))));
}
vec_uint4 sign = (vec_uint4)vec_sra((vec_int4)(a), (vec_uint4)vec_splat(((vec_uint4)si_from_int(31)), 0));
sign = (vec_uint4)vec_perm((vec_uchar16)sign,(vec_uchar16)sign,splat_hi);
vec_uint4 aabs = vec_and((vec_uint4)a,sign_mask);
-
+
union {
vec_uchar16 v;
int i[4];
/* Shift 4 bytes */
x.i[3] = 4 << 3;
-
+
/* Nan or +inf or -inf */
if (b & 0x70)
{
{
vec_uint4 a_nan = (vec_uint4)vec_cmpgt(aabs, nan_mask);
a_nan = vec_or(a_nan, vec_and((vec_uint4)vec_slo((vec_uchar16)a_nan,x.v),a_inf));
- a_nan = (vec_uint4)vec_perm((vec_uchar16)a_nan, (vec_uchar16)a_nan, splat_hi);
+ a_nan = (vec_uint4)vec_perm((vec_uchar16)a_nan, (vec_uchar16)a_nan, splat_hi);
result = vec_or(result, a_nan);
}
- /* inf */
+ /* inf */
if (b & 0x30)
{
a_inf = vec_and((vec_uint4)vec_slo((vec_uchar16)a_inf,x.v), a_inf);
- a_inf = (vec_uint4)vec_perm((vec_uchar16)a_inf, (vec_uchar16)a_inf, splat_hi);
+ a_inf = (vec_uint4)vec_perm((vec_uchar16)a_inf, (vec_uchar16)a_inf, splat_hi);
/* +inf */
if (b & 0x20)
result = vec_or(vec_andc(a_inf, sign), result);
/* -inf */
if (b & 0x10)
result = vec_or(vec_and(a_inf, sign), result);
- }
+ }
}
/* 0 or denorm */
if (b & 0xF)
cnt = vec_add(cnt, vec_and(tmp1, vec_cmpeq(cnt, eight)));
cnt = vec_add(cnt, vec_and(tmp2, vec_cmpeq(cnt, sixteen)));
cnt = vec_add(cnt, vec_and(tmp3, vec_cmpeq(cnt, twentyfour)));
-
+
return (qword)((vec_sr((vec_uint4)(cnt), (vec_uint4)(twentyfour))));
}
vec_char16 av;
av = (vec_char16)(a);
- return ((qword)(vec_unpackh(vec_perm(av, av, ((vec_uchar16){1, 3, 5, 7, 9,11,13,15,
+ return ((qword)(vec_unpackh(vec_perm(av, av, ((vec_uchar16){1, 3, 5, 7, 9,11,13,15,
0, 0, 0, 0, 0, 0, 0, 0})))));
}
vec_short8 av;
av = (vec_short8)(a);
- return ((qword)(vec_unpackh(vec_perm(av, av, ((vec_uchar16){2, 3, 6, 7,
+ return ((qword)(vec_unpackh(vec_perm(av, av, ((vec_uchar16){2, 3, 6, 7,
10,11,14,15,
- 0, 0, 0, 0,
+ 0, 0, 0, 0,
0, 0, 0, 0})))));
}
vec_int4 av;
av = (vec_int4)(a);
- return ((qword)(vec_perm(av, vec_sra(av, ((vec_uint4){31,31,31,31})),
- ((vec_uchar16){20, 21, 22, 23,
- 4, 5, 6, 7,
- 28, 29, 30, 31,
+ return ((qword)(vec_perm(av, vec_sra(av, ((vec_uint4){31,31,31,31})),
+ ((vec_uchar16){20, 21, 22, 23,
+ 4, 5, 6, 7,
+ 28, 29, 30, 31,
12, 13, 14, 15}))));
}
}
-/* Compare and halt
+/* Compare and halt
*/
static __inline void si_heq(qword a, qword b)
{
*/
static __inline qword si_mpya(qword a, qword b, qword c)
{
- return ((qword)(vec_msum(vec_and((vec_short8)(a),
- ((vec_short8){0, -1, 0, -1, 0, -1, 0, -1})),
+ return ((qword)(vec_msum(vec_and((vec_short8)(a),
+ ((vec_short8){0, -1, 0, -1, 0, -1, 0, -1})),
(vec_short8)(b), (vec_int4)(c))));
}
in = (vec_uchar16)(a);
mask = (vec_short8)(vec_splat(in, 3));
- return ((qword)(vec_sra(vec_sl(mask, ((vec_ushort8){0, 1, 2, 3, 4, 5, 6, 7})),
+ return ((qword)(vec_sra(vec_sl(mask, ((vec_ushort8){0, 1, 2, 3, 4, 5, 6, 7})),
vec_splat_u16(15))));
}
*/
static __inline qword si_fms(qword a, qword b, qword c)
{
- return ((qword)(vec_madd((vec_float4)(a), (vec_float4)(b),
+ return ((qword)(vec_madd((vec_float4)(a), (vec_float4)(b),
vec_sub(((vec_float4){0.0f}), (vec_float4)(c)))));
}
static __inline qword si_mpyi(qword a, short b)
{
- return ((qword)(vec_mulo((vec_short8)(a),
+ return ((qword)(vec_mulo((vec_short8)(a),
vec_splat((vec_short8)(si_from_short(b)), 1))));
}
static __inline qword si_mpyui(qword a, unsigned short b)
{
- return ((qword)(vec_mulo((vec_ushort8)(a),
+ return ((qword)(vec_mulo((vec_ushort8)(a),
vec_splat((vec_ushort8)(si_from_ushort(b)), 1))));
}
static __inline qword si_orbi(qword a, unsigned char b)
{
- return ((qword)(vec_or((vec_uchar16)(a),
+ return ((qword)(vec_or((vec_uchar16)(a),
vec_splat((vec_uchar16)(si_from_uchar(b)), 3))));
}
static __inline qword si_orhi(qword a, unsigned short b)
{
- return ((qword)(vec_or((vec_ushort8)(a),
+ return ((qword)(vec_or((vec_ushort8)(a),
vec_splat((vec_ushort8)(si_from_ushort(b)), 1))));
}
static __inline qword si_ori(qword a, unsigned int b)
{
- return ((qword)(vec_or((vec_uint4)(a),
+ return ((qword)(vec_or((vec_uint4)(a),
vec_splat((vec_uint4)(si_from_uint(b)), 0))));
}
static __inline qword si_rothi(qword a, int b)
{
- return ((qword)(vec_rl((vec_ushort8)(a),
+ return ((qword)(vec_rl((vec_ushort8)(a),
vec_splat((vec_ushort8)(si_from_int(b)), 1))));
}
static __inline qword si_roti(qword a, int b)
{
- return ((qword)(vec_rl((vec_uint4)(a),
+ return ((qword)(vec_rl((vec_uint4)(a),
vec_splat((vec_uint4)(si_from_int(b)), 0))));
}
vec_uchar16 v;
int i[4];
} left, right;
-
+
count <<= 3;
left.i[3] = count;
right.i[3] = 0 - count;
static __inline qword si_rotqby(qword a, qword count)
{
vec_uchar16 left, right;
-
+
left = vec_sl(vec_splat((vec_uchar16)(count), 3), vec_splat_u8(3));
right = vec_sub(vec_splat_u8(0), left);
return ((qword)(vec_or(vec_slo((vec_uchar16)(a), left), vec_sro((vec_uchar16)(a), right))));
{
vec_uchar16 x, y;
vec_uchar16 result;
-
+
x = vec_splat((vec_uchar16)(si_from_int(count & 7)), 3);
y = (vec_uchar16)(vec_sr((vec_uint4)vec_sro((vec_uchar16)(a), ((vec_uchar16)((vec_uint4){0,0,0,120}))),
(vec_uint4)vec_sub(vec_splat_u8(8), x)));
{
vec_uchar16 x, y;
vec_uchar16 result;
-
+
x = vec_and(vec_splat((vec_uchar16)(count), 3), vec_splat_u8(7));
y = (vec_uchar16)(vec_sr((vec_uint4)vec_sro((vec_uchar16)(a), ((vec_uchar16)((vec_uint4){0,0,0,120}))),
(vec_uint4)vec_sub(vec_splat_u8(8), x)));
-
+
result = vec_or(vec_sll((qword)(a), x), y);
return ((qword)(result));
}
{
vec_uchar16 pat;
- pat = vec_sel(((vec_uchar16){0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15}),
+ pat = vec_sel(((vec_uchar16){0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15}),
vec_sr((vec_uchar16)(pattern), vec_splat_u8(3)),
vec_sra((vec_uchar16)(pattern), vec_splat_u8(7)));
- return ((qword)(vec_perm(vec_perm(a, b, pattern),
+ return ((qword)(vec_perm(vec_perm(a, b, pattern),
((vec_uchar16){0, 0, 0, 0, 0, 0, 0, 0,
0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x80, 0x80, 0x80}),
pat)));
{
vec_uint4 zero = (vec_uint4){0};
vec_ushort8 sum_a, sum_b;
-
+
sum_a = (vec_ushort8)vec_sum4s((vec_uchar16)(a), zero);
sum_b = (vec_ushort8)vec_sum4s((vec_uchar16)(b), zero);
static __inline qword si_xorbi(qword a, unsigned char b)
{
- return ((qword)(vec_xor((vec_uchar16)(a),
+ return ((qword)(vec_xor((vec_uchar16)(a),
vec_splat((vec_uchar16)(si_from_uchar(b)), 3))));
}
static __inline qword si_xorhi(qword a, unsigned short b)
{
- return ((qword)(vec_xor((vec_ushort8)(a),
+ return ((qword)(vec_xor((vec_ushort8)(a),
vec_splat((vec_ushort8)(si_from_ushort(b)), 1))));
}
static __inline qword si_xori(qword a, unsigned int b)
{
- return ((qword)(vec_xor((vec_uint4)(a),
+ return ((qword)(vec_xor((vec_uint4)(a),
vec_splat((vec_uint4)(si_from_uint(b)), 0))));
}
static __inline void si_stqx(qword a, qword b, qword c)
{
- vec_st((vec_uchar16)(a),
+ vec_st((vec_uchar16)(a),
si_to_uint((qword)(vec_add((vec_uint4)(b), (vec_uint4)(c)))),
(vector unsigned char *)(0));
}
This file is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
- Software Foundation; either version 3 of the License, or (at your option)
+ Software Foundation; either version 3 of the License, or (at your option)
any later version.
This file is distributed in the hope that it will be useful, but WITHOUT
* =======
*/
#define spu_avg(_a, _b) vec_avg(_a, _b)
-
+
/* spu_bisled
* spu_bisled_d
static __inline vec_ullong2 spu_nand(vec_ullong2 a, vec_ullong2 b)
{
- return ((vec_ullong2)(si_nand((qword)(a), (qword)(b))));
+ return ((vec_ullong2)(si_nand((qword)(a), (qword)(b))));
}
static __inline vec_llong2 spu_nand(vec_llong2 a, vec_llong2 b)
{
- return ((vec_llong2)(si_nand((qword)(a), (qword)(b))));
+ return ((vec_llong2)(si_nand((qword)(a), (qword)(b))));
}
static __inline vec_double2 spu_nand(vec_double2 a, vec_double2 b)
static __inline vec_uchar16 spu_rlqwbyte(vec_uchar16 a, int count)
{
return ((vec_uchar16)(si_rotqby((qword)(a), si_from_int(count))));
-}
+}
static __inline vec_char16 spu_rlqwbyte(vec_char16 a, int count)
{
static __inline vec_ushort8 spu_rlqwbyte(vec_ushort8 a, int count)
{
return ((vec_ushort8)(si_rotqby((qword)(a), si_from_int(count))));
-}
+}
static __inline vec_short8 spu_rlqwbyte(vec_short8 a, int count)
{
static __inline vec_ushort8 spu_sumb(vec_uchar16 a, vec_uchar16 b)
{
return ((vec_ushort8)(si_sumb((qword)(a), (qword)(b))));
-}
+}
/* spu_sync
This file is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
- Software Foundation; either version 3 of the License, or (at your option)
+ Software Foundation; either version 3 of the License, or (at your option)
any later version.
This file is distributed in the hope that it will be useful, but WITHOUT
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
-/* Single token vector data types for the PowerPC SIMD/Vector Multi-media
+/* Single token vector data types for the PowerPC SIMD/Vector Multi-media
eXtension */
#ifndef _VEC_TYPES_H_
#define OBJECT_FORMAT_COFF
/* Define the magic numbers that we recognize as COFF.
-
+
AIX 4.3 adds U803XTOCMAGIC (0757) for 64-bit objects and AIX V5 adds
U64_TOCMAGIC (0767), but collect2.cc does not include files in the
correct order to conditionally define the symbolic name in this macro.
-
+
The AIX linker accepts import/export files as object files,
so accept "#!" (0x2321) magic number. */
#define MY_ISCOFF(magic) \
/* This is how we tell the assembler that two symbols have the same value. */
#define SET_ASM_OP "\t.set "
-/* This is how we tell the assembler to equate two values.
+/* This is how we tell the assembler to equate two values.
The semantic of AIX assembler's .set do not correspond to middle-end expectations.
We output aliases as alternative symbols in the front of the definition
via DECLARE_FUNCTION_NAME and DECLARE_OBJECT_NAME.
-/* Configuration common to all targets running RTEMS.
+/* Configuration common to all targets running RTEMS.
Copyright (C) 2000-2024 Free Software Foundation, Inc.
This file is part of GCC.
if (GET_CODE (x) == PLUS
&& GET_CODE (XEXP (x, 0)) == PLUS
- && REG_P (XEXP (XEXP (x, 0), 0))
+ && REG_P (XEXP (XEXP (x, 0), 0))
&& REG_P (XEXP (x, 1)))
return force_reg (SImode, x);
switch (GET_MODE_SIZE (mode))
{
- default:
+ default:
case 4: factor = 4; break;
case 2: factor = 2; break;
case 1: factor = 1; break;
case PLUS:
{
rtx base, index;
-
+
/* Only allow REG+INT addressing. */
base = XEXP (mem, 0);
index = XEXP (mem, 1);
fprintf (file, "#");
/* Trickery to avoid problems with shifting 32 bits at a time. */
v = v >> 16;
- v = v >> 16;
+ v = v >> 16;
rx_print_integer (file, v);
break;
}
{
gcc_assert (GET_MODE (src) != DImode);
gcc_assert (GET_MODE (src) != DFmode);
-
+
src_template = "(%A1 - __pid_base)[%P1]";
}
else if (MEM_P (src) && rx_small_data_operand (XEXP (src, 0)))
{
gcc_assert (GET_MODE (src) != DImode);
gcc_assert (GET_MODE (src) != DFmode);
-
+
src_template = "%%gp(%A1)[%G1]";
}
else
{
gcc_assert (GET_MODE (dest) != DImode);
gcc_assert (GET_MODE (dest) != DFmode);
-
+
dst_template = "%%gp(%A0)[%G0]";
}
else
&& ! VECTOR_MODE_P (mode)
)
return gen_rtx_REG (SImode, FUNC_RETURN_REGNUM);
-
+
return gen_rtx_REG (mode, FUNC_RETURN_REGNUM);
}
/* This is for fast interrupt handlers. Any register in
the range r10 to r13 (inclusive) that is currently
- marked as fixed is now a viable, call-used register. */
+ marked as fixed is now a viable, call-used register. */
for (r = 10; r <= 13; r++)
if (fixed_regs[r])
{
current_is_fast_interrupt
= fndecl ? is_fast_interrupt_func (fndecl) : false;
-
+
if (prev_was_fast_interrupt != current_is_fast_interrupt)
{
use_fixed_regs = current_is_fast_interrupt;
break;
}
}
-
+
/* We have assumed that there are at least two registers pushed... */
gcc_assert (acc_high != 0);
gcc_assert (CONST_INT_P (operands[0]));
stack_adjust = INTVAL (operands[0]);
-
+
gcc_assert (GET_CODE (operands[1]) == PARALLEL);
last_reg = XVECLEN (operands[1], 0) - (is_popm ? 2 : 3);
return vector;
}
-
+
/* Generate a PARALLEL which will satisfy the rx_load_multiple_vector predicate. */
static rtx
gen_rx_popm_vector (unsigned int low, unsigned int high)
{
- unsigned int i;
+ unsigned int i;
unsigned int count = (high - low) + 2;
rtx vector;
{
return ! is_fast_interrupt_func (decl)
&& ! is_interrupt_func (decl)
- && ! is_naked_func (decl);
+ && ! is_naked_func (decl);
}
static bool
gcc_unreachable ();
}
break;
-
+
case LABEL_REF:
case SYMBOL_REF:
return true;
&& ((INTVAL (b) > 128) || INTVAL (b) < -127))
/* Try to discourage REG + <large OFF> when optimizing for size. */
return COSTS_N_INSNS (2);
-
+
return COSTS_N_INSNS (1);
}
zero = false;
factor = 2;
break;
-
+
case CODE_FOR_plussi3_zero_extendqi:
case CODE_FOR_andsi3_zero_extendqi:
case CODE_FOR_iorsi3_zero_extendqi:
zero = true;
factor = 1;
break;
-
+
case CODE_FOR_plussi3_sign_extendqi:
case CODE_FOR_andsi3_sign_extendqi:
case CODE_FOR_iorsi3_sign_extendqi:
zero = false;
factor = 1;
break;
- }
+ }
/* We are expecting: (SET (REG) (<OP> (REG) (<EXTEND> (MEM)))). */
extend = single_set (insn);
gcc_assert ((zero && (GET_CODE (extend) == ZERO_EXTEND))
|| (! zero && (GET_CODE (extend) == SIGN_EXTEND)));
-
+
mem = XEXP (extend, 0);
gcc_checking_assert (MEM_P (mem));
if (REG_P (XEXP (mem, 0)))
#undef WCHAR_TYPE
#define WCHAR_TYPE SH_ELF_WCHAR_TYPE
-
+
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
-/* Definitions of target machine for GNU compiler for Renesas / SuperH SH
+/* Definitions of target machine for GNU compiler for Renesas / SuperH SH
non-Linux embedded targets.
Copyright (C) 2002-2024 Free Software Foundation, Inc.
Contributed by J"orn Rennecke <joern.rennecke@superh.com>
/* Define because we use the label and we do not need them. */
#define NO_PROFILE_COUNTERS 1
-
+
#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(STREAM,LABELNO) \
do \
#define TARGET_PRINT_OPERAND_PUNCT_VALID_P sh_print_operand_punct_valid_p
#undef TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA
#define TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA sh_asm_output_addr_const_extra
-
+
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE sh_output_function_epilogue
PASS_POS_INSERT_BEFORE, "sched2", 1);
}
-/* Implement TARGET_OPTION_OVERRIDE macro. Validate and override
+/* Implement TARGET_OPTION_OVERRIDE macro. Validate and override
various options, and do some machine dependent initialization. */
static void
sh_option_override (void)
fetched as a pair from a longword boundary. For size use 16 bit
alignment to get more compact code.
Aligning all jumps increases the code size, even if it might
- result in slightly faster code. Thus, it is set to the smallest
+ result in slightly faster code. Thus, it is set to the smallest
alignment possible if not specified by the user. */
if (flag_align_loops && !str_align_loops)
str_align_loops = optimize_size ? "2" : "4";
t = 1;
else
return -1;
-
+
return t ^ (cmpval == cmpop);
}
We punt for now, since this is likely very rare. */
gcc_assert (!REG_P (XEXP (inside, 1)));
break;
-
+
case LABEL_REF:
return "mov.l %1,%0" "\n"
" mov.l %1+4,%T0";
sh_ashlsi_clobbers_t_reg_p (rtx shift_amount)
{
gcc_assert (CONST_INT_P (shift_amount));
-
+
const int shift_amount_i = INTVAL (shift_amount) & 31;
/* Special case for shift count of 31: use and-rotl sequence. */
/* For right shifts the constant might be negative. */
const int shift_amount_i = std::abs (INTVAL (shift_amount)) & 31;
-
+
/* Special case for shift count of 31: use shll-movt sequence. */
if (shift_amount_i == 31)
return true;
}
/* Return true if it is potentially beneficial to use a dynamic shift
- instruction (shad / shar) instead of a combination of 1/2/8/16
+ instruction (shad / shar) instead of a combination of 1/2/8/16
shift instructions for the specified shift count.
If dynamic shifts are not available, always return false. */
bool
/* The lower-subreg pass decides whether to split multi-word regs
into individual regs by looking at the cost for a SET of certain
modes with the following patterns:
- (set (reg) (reg))
+ (set (reg) (reg))
(set (reg) (const_int 0))
On machines that support vector-move operations a multi-word move
is the same cost as individual reg move. On SH there is no
|| GET_MODE (XEXP (x, 0)) == HImode))
{
/* Handle SH2A's movu.b and movu.w insn. */
- *total = sh_address_cost (XEXP (XEXP (x, 0), 0),
- GET_MODE (XEXP (x, 0)),
+ *total = sh_address_cost (XEXP (XEXP (x, 0), 0),
+ GET_MODE (XEXP (x, 0)),
MEM_ADDR_SPACE (XEXP (x, 0)), speed)
+ COSTS_N_INSNS (1);
return true;
rtx xx = XVECEXP (x, 0, i);
if (GET_CODE (xx) == SET && MEM_P (XEXP (xx, 0)))
{
- *total = sh_address_cost (XEXP (XEXP (xx, 0), 0),
+ *total = sh_address_cost (XEXP (XEXP (xx, 0), 0),
GET_MODE (XEXP (xx, 0)),
MEM_ADDR_SPACE (XEXP (xx, 0)), speed)
+ COSTS_N_INSNS (1);
const int mov_insn_sz = mov_insn_size (mode, consider_sh2a);
const int mode_sz = GET_MODE_SIZE (mode);
int r = 15 * mov_insn_sz * disp_scale;
-
+
/* If the mov insn will be split into multiple loads/stores, the
maximum possible displacement is a bit smaller. */
if (mode_sz > mov_insn_sz)
return 3;
}
- /* 'reg + reg' addressing. Account a slightly higher cost because of
+ /* 'reg + reg' addressing. Account a slightly higher cost because of
increased pressure on R0. */
if (GET_CODE (x) == PLUS && ! CONSTANT_P (XEXP (x, 1)))
return 3;
from = PREV_INSN (from);
/* Don't emit a constant table int the middle of global pointer setting,
- since that that would move the addressing base GOT into another table.
+ since that that would move the addressing base GOT into another table.
We need the first mov instruction before the _GLOBAL_OFFSET_TABLE_
in the pool anyway, so just move up the whole constant pool.
later insn. */
/* ??? We shouldn't have to use FOUNDINSN here.
- This dates back to when we used LOG_LINKS to find
+ This dates back to when we used LOG_LINKS to find
the most recent insn which sets the register. */
if (foundinsn
if (temp < 0)
{
rtx adj_reg, tmp_reg, mem;
-
+
/* If we reached here, the most likely case is the (sibcall)
epilogue. Put a special push/pop sequence for such case as
the last resort. This looks lengthy but would not be problem
r5 have been reserved as fixed registers or assigned
as global registers, and they change during an
interrupt. There are possible ways to handle this:
-
+
- If we are adjusting the frame pointer (r14), we can do
with a single temp register and an ordinary push / pop
on the stack.
/* For an ISR with RESBANK attribute assigned, don't pop PR
register. */
if (TEST_HARD_REG_BIT (live_regs_mask, PR_REG)
- && !sh_cfun_resbank_handler_p ())
+ && !sh_cfun_resbank_handler_p ())
{
if (!frame_pointer_needed)
emit_insn (gen_blockage ());
fpscr_deferred = true;
/* For an ISR with RESBANK attribute assigned, don't pop
following registers, R0-R14, MACH, MACL and GBR. */
- else if (j != PR_REG && TEST_HARD_REG_BIT (live_regs_mask, j)
+ else if (j != PR_REG && TEST_HARD_REG_BIT (live_regs_mask, j)
&& ! (sh_cfun_resbank_handler_p ()
&& ((j >= FIRST_GENERAL_REG
&& j < LAST_GENERAL_REG)
In some cases it is possible that a requested offset might seem unaligned
or inappropriate for the mode size, like offset = 2 and mode size = 4.
This is compensated by adjusting the base address so that the effective
- address of the displacement move insn will be aligned.
+ address of the displacement move insn will be aligned.
This is not the best possible way of rebasing the base address, as it
does not look at other present displacement addressings around it.
bool
sh_frame_pointer_required (void)
{
-/* If needed override this in other tm.h files to cope with various OS
+/* If needed override this in other tm.h files to cope with various OS
lossage requiring a frame pointer. */
if (SUBTARGET_FRAME_POINTER_REQUIRED)
return true;
<= sh_max_mov_insn_displacement (mode, false))
return R0_REGS;
- /* When reload is trying to address a QImode or HImode subreg on the stack,
+ /* When reload is trying to address a QImode or HImode subreg on the stack,
force any subreg byte into R0_REGS, as this is going to become a
displacement address.
We could restrict this to SUBREG_BYTE (x) > 0, but if the actual reg
is on the stack, the memref to it might already require a displacement
and that has to be added to the final address. At this point we don't
know the cumulative displacement so we assume the worst case. */
- if ((mode == QImode || mode == HImode) && rclass != R0_REGS
+ if ((mode == QImode || mode == HImode) && rclass != R0_REGS
&& GET_CODE (x) == SUBREG && true_regnum (x) == -1)
return R0_REGS;
*offset2 = adj.mov_disp;
return true;
}
-
+
return false;
}
: reg_ (br), disp_ (d)
{
}
-
+
inline bool
base_reg_disp::is_reg (void) const
{
op_is_t_count++;
}
}
-
+
return op_is_t_count == 2;
}
#else
#define IS_LITTLE_ENDIAN_OPTION "%{!mb:"
#endif
-
+
#if TARGET_CPU_DEFAULT & MASK_HARD_SH2A
#define UNSUPPORTED_SH2A IS_LITTLE_ENDIAN_OPTION \
"%{m2a*|!m1:%{!m2*:%{!m3*:%{!m4*:%eSH2a does not support little-endian}}}}}"
return X << (Y & 31);
else
return X >> (-Y) & 31);
-
+
The dynamic shift library routines in lib1funcs.S do not use the sign bit
like the hardware dynamic shifts and truncate the shift count to 31.
We define SHIFT_COUNT_TRUNCATED to 0 and express the implied shift count
m_split_insns (split_insns),
m_ccreg (NULL_RTX)
{
- // Overwrite default name in pass_data base class.
+ // Overwrite default name in pass_data base class.
this->name = name;
}
/* Definitions of target machine for GCC,
- for SuperH with targeting the VXWorks run time environment.
+ for SuperH with targeting the VXWorks run time environment.
Copyright (C) 2003-2024 Free Software Foundation, Inc.
Contributed by CodeSourcery, LLC.
-
+
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
directive since Sun as treats undeclared sections as @progbits,
which conflicts with .bss* sections which are @nobits. */
targetm.asm_out.named_section (section, flags & ~SECTION_LINKONCE, decl);
-
+
/* Sun as separates declaration of a group section and of the group
itself, using the .group directive and the #comdat flag. */
fprintf (asm_out_file, "\t.group\t%s," SECTION_NAME_FORMAT ",#comdat\n",
/************************[ Target stuff ]***********************************/
-/* Define the actual types of some ANSI-mandated types.
+/* Define the actual types of some ANSI-mandated types.
Needs to agree with <machine/ansi.h>. GCC defaults come from c-decl.cc,
c-common.cc, and config/<arch>/<arch>.h. */
/* DWARF bits. */
-/* Follow Irix 6 and not the Dwarf2 draft in using 64-bit offsets.
+/* Follow Irix 6 and not the Dwarf2 draft in using 64-bit offsets.
Obviously the Dwarf2 folks havn't tried to actually build systems
with their spec. On a 64-bit system, only 64-bit relocs become
RELATIVE relocations. */
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
-
+
#undef PTRDIFF_TYPE
#define PTRDIFF_TYPE "int"
-
+
#undef WCHAR_TYPE
#define WCHAR_TYPE "int"
-
+
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
/* DWARF bits. */
-/* Follow Irix 6 and not the Dwarf2 draft in using 64-bit offsets.
+/* Follow Irix 6 and not the Dwarf2 draft in using 64-bit offsets.
Obviously the Dwarf2 folks haven't tried to actually build systems
with their spec. On a 64-bit system, only 64-bit relocs become
RELATIVE relocations. */
extern int memory_ok_for_ldd (rtx);
extern int v9_regcmp_p (enum rtx_code);
/* Function used for V8+ code generation. Returns 1 if the high
- 32 bits of REG are 0 before INSN. */
+ 32 bits of REG are 0 before INSN. */
extern int sparc_check_64 (rtx, rtx_insn *);
extern rtx gen_df_reg (rtx, int);
extern void sparc_expand_compare_and_swap (rtx op[]);
|| sparc_cpu == PROCESSOR_M8)
? 128 : (sparc_cpu == PROCESSOR_NIAGARA7
? 256 : 512)));
-
+
/* Disable save slot sharing for call-clobbered registers by default.
The IRA sharing algorithm works on single registers only and this
if (insn_type == TYPE_IALU || insn_type == TYPE_SHIFT)
return 0;
}
-
+
return cost;
}
return cost;
}
}
-
+
static int
set_extends (rtx_insn *insn)
{
SPARC_BUILTIN_FPCMPUR16SHL,
SPARC_BUILTIN_FPCMPUR32SHL,
SPARC_BUILTIN_LAST_FPCMPSHL = SPARC_BUILTIN_FPCMPUR32SHL,
-
+
SPARC_BUILTIN_MAX
};
def_builtin_const ("__builtin_vis_fpcmpugt32", CODE_FOR_fpcmpugt32si_vis,
SPARC_BUILTIN_FPCMPUGT32, di_ftype_v2si_v2si);
}
-
+
def_builtin_const ("__builtin_vis_fpmax8", CODE_FOR_maxv8qi3,
SPARC_BUILTIN_FPMAX8, v8qi_ftype_v8qi_v8qi);
def_builtin_const ("__builtin_vis_fpmax16", CODE_FOR_maxv4hi3,
tree di_ftype_v2si_v2si_si = build_function_type_list (intDI_type_node,
v2si, v2si,
intSI_type_node, 0);
-
+
def_builtin_const ("__builtin_vis_fpcmple8shl", CODE_FOR_fpcmple8dishl,
SPARC_BUILTIN_FPCMPLE8SHL, di_ftype_v8qi_v8qi_si);
def_builtin_const ("__builtin_vis_fpcmpgt8shl", CODE_FOR_fpcmpgt8dishl,
tree si_ftype_v2si_v2si_si = build_function_type_list (intSI_type_node,
v2si, v2si,
intSI_type_node, 0);
-
+
def_builtin_const ("__builtin_vis_fpcmple8shl", CODE_FOR_fpcmple8sishl,
SPARC_BUILTIN_FPCMPLE8SHL, si_ftype_v8qi_v8qi_si);
def_builtin_const ("__builtin_vis_fpcmpgt8shl", CODE_FOR_fpcmpgt8sishl,
t_1 = force_reg (SImode, GEN_INT (0x01010101));
/* sel = { A*2, A*2+1, B*2, B*2+1, ... } */
break;
-
+
case E_V8QImode:
/* input = xAxBxCxDxExFxGxH */
sel = expand_simple_binop (DImode, AND, sel,
(MASK_FPU + MASK_HARD_QUAD + MASK_VIS + MASK_VIS2 + MASK_VIS3 \
+ MASK_VIS4 + MASK_CBCOND + MASK_FMAF + MASK_FSMULD \
+ MASK_POPC + MASK_SUBXC)
-
+
/* TARGET_HARD_MUL: Use 32-bit hardware multiply instructions but not %y. */
#define TARGET_HARD_MUL \
(TARGET_SPARCLITE || TARGET_SPARCLET \
#define FINI_SECTION_ASM_OP "\t.section\t\".fini\""
/* Define the pseudo-ops used to switch to the .ctors and .dtors sections.
-
+
Note that we want to give these sections the SHF_WRITE attribute
because these sections will actually contain data (i.e. tables of
addresses of functions in the current root executable or shared library
use the `-z text' option when building a shared library, you will get
errors unless the .ctors and .dtors sections are marked as writable
via the SHF_WRITE attribute.) */
-
+
#undef CTORS_SECTION_ASM_OP
#define CTORS_SECTION_ASM_OP "\t.section\t\".ctors\",#alloc,#write"
#undef DTORS_SECTION_ASM_OP
extern void xstormy16_split_cbranch (machine_mode, rtx, rtx, rtx);
extern int short_memory_operand (rtx, machine_mode);
extern bool nonimmediate_nonstack_operand (rtx, machine_mode);
-extern enum reg_class xstormy16_secondary_reload_class
+extern enum reg_class xstormy16_secondary_reload_class
(enum reg_class, machine_mode, rtx);
extern void xstormy16_split_move (machine_mode, rtx, rtx);
extern void xstormy16_expand_move (machine_mode, rtx, rtx);
-extern void xstormy16_expand_arith (machine_mode, enum rtx_code,
+extern void xstormy16_expand_arith (machine_mode, enum rtx_code,
rtx, rtx, rtx);
-extern const char * xstormy16_output_shift (machine_mode, enum rtx_code,
+extern const char * xstormy16_output_shift (machine_mode, enum rtx_code,
rtx, rtx, rtx);
extern bool xstormy16_below100_symbol (rtx, machine_mode);
extern bool xstormy16_splittable_below100_operand (rtx, machine_mode);
*total = COSTS_N_INSNS (speed_p ? 18 + 5 : 6);
else if (mode == SImode)
*total = COSTS_N_INSNS (speed_p ? 3 * 18 + 14 : 17);
- else
+ else
*total = COSTS_N_INSNS (speed_p ? 18 + 3 : 4);
return false;
/* This declaration must be present, but it can be an abort if profiling is
not implemented. */
-
+
#define FUNCTION_PROFILER(FILE, LABELNO) xstormy16_function_profiler ()
\f
mark_current_function_as_interrupt (void)
{
tree name;
-
+
if (current_function_decl == NULL_TREE)
{
warning (0, "cannot set interrupt attribute: no current function");
warning (0, "cannot set interrupt attribute: no such identifier");
return;
}
-
+
decl_attributes (¤t_function_decl,
tree_cons (name, NULL_TREE, NULL_TREE), 0);
}
tree sect_ident;
const char *sect, *alias;
enum GHS_section_kind kind;
-
+
type = pragma_lex (&x);
-
+
if (type == CPP_EOF && !repeat)
goto reset;
else if (type == CPP_NAME)
else
goto bad;
repeat = 0;
-
+
if (pragma_lex (&x) != CPP_EQ)
goto bad;
if (pragma_lex (&x) != CPP_NAME)
goto bad;
-
+
alias = IDENTIFIER_POINTER (x);
-
+
type = pragma_lex (&x);
if (type == CPP_COMMA)
repeat = 1;
else if (type != CPP_EOF)
warning (OPT_Wpragmas, "junk at end of %<#pragma%> ghs section");
-
+
if (streq (sect, "data")) kind = GHS_SECTION_KIND_DATA;
else if (streq (sect, "text")) kind = GHS_SECTION_KIND_TEXT;
else if (streq (sect, "rodata")) kind = GHS_SECTION_KIND_RODATA;
warning (0, "unrecognized section name %qE", sect_ident);
return;
}
-
+
if (streq (alias, "default"))
GHS_current_section_names [kind] = NULL;
else
/* #pragma ghs section \n: Reset all section names back to their defaults. */
{
int i;
-
+
for (i = COUNT_OF_GHS_SECTION_KINDS; i--;)
GHS_current_section_names [i] = NULL;
}
ghs_pragma_interrupt (cpp_reader * pfile ATTRIBUTE_UNUSED)
{
tree x;
-
+
if (pragma_lex (&x) != CPP_EOF)
warning (OPT_Wpragmas, "junk at end of %<#pragma%> ghs interrupt");
-
+
mark_current_function_as_interrupt ();
}
ghs_pragma_starttda (cpp_reader * pfile ATTRIBUTE_UNUSED)
{
tree x;
-
+
if (pragma_lex (&x) != CPP_EOF)
warning (OPT_Wpragmas, "junk at end of %<#pragma%> ghs starttda");
-
+
push_data_area (DATA_AREA_TDA);
}
ghs_pragma_startsda (cpp_reader * pfile ATTRIBUTE_UNUSED)
{
tree x;
-
+
if (pragma_lex (&x) != CPP_EOF)
warning (OPT_Wpragmas, "junk at end of %<#pragma%> ghs startsda");
-
+
push_data_area (DATA_AREA_SDA);
}
ghs_pragma_startzda (cpp_reader * pfile ATTRIBUTE_UNUSED)
{
tree x;
-
+
if (pragma_lex (&x) != CPP_EOF)
warning (OPT_Wpragmas, "junk at end of %<#pragma%> ghs startzda");
-
+
push_data_area (DATA_AREA_ZDA);
}
ghs_pragma_endtda (cpp_reader * pfile ATTRIBUTE_UNUSED)
{
tree x;
-
+
if (pragma_lex (&x) != CPP_EOF)
warning (OPT_Wpragmas, "junk at end of %<#pragma%> ghs endtda");
-
+
pop_data_area (DATA_AREA_TDA);
}
ghs_pragma_endsda (cpp_reader * pfile ATTRIBUTE_UNUSED)
{
tree x;
-
+
if (pragma_lex (&x) != CPP_EOF)
warning (OPT_Wpragmas, "junk at end of %<#pragma%> ghs endsda");
-
+
pop_data_area (DATA_AREA_SDA);
}
ghs_pragma_endzda (cpp_reader * pfile ATTRIBUTE_UNUSED)
{
tree x;
-
+
if (pragma_lex (&x) != CPP_EOF)
warning (OPT_Wpragmas, "junk at end of %<#pragma%> ghs endzda");
-
+
pop_data_area (DATA_AREA_ZDA);
}
const char * GHS_default_section_names [(int) COUNT_OF_GHS_SECTION_KINDS];
const char * GHS_current_section_names [(int) COUNT_OF_GHS_SECTION_KINDS];
-/* Track the current data area set by the data area pragma (which
+/* Track the current data area set by the data area pragma (which
can be nested). Tested by check_default_data_area. */
data_area_stack_element * data_area_stack = NULL;
size = arg.promoted_size_in_bytes ();
if (size < 1)
size = 1;
-
+
if (!TARGET_GCC_ABI)
align = UNITS_PER_WORD;
else if (arg.type)
case CONST_INT:
fprintf (file, "%d", (INTVAL (x) >= 0) ? 0 : -1);
break;
-
+
case CONST_DOUBLE:
const_double_split (x, &high, &low);
fprintf (file, "%ld", (long) high);
case CONST_INT:
fprintf (file, "%ld", (long) INTVAL (x));
break;
-
+
case CONST_DOUBLE:
const_double_split (x, &high, &low);
fprintf (file, "%ld", (long) low);
break;
case 'O':
gcc_assert (special_symbolref_operand (x, VOIDmode));
-
+
if (GET_CODE (x) == CONST)
x = XEXP (XEXP (x, 0), 0);
else
gcc_assert (GET_CODE (x) == SYMBOL_REF);
-
+
if (SYMBOL_REF_ZDA_P (x))
fprintf (file, "zdaoff");
else if (SYMBOL_REF_SDA_P (x))
break;
case 'Q':
gcc_assert (special_symbolref_operand (x, VOIDmode));
-
+
if (GET_CODE (x) == CONST)
x = XEXP (XEXP (x, 0), 0);
else
gcc_assert (GET_CODE (x) == SYMBOL_REF);
-
+
if (SYMBOL_REF_ZDA_P (x))
fprintf (file, "r0");
else if (SYMBOL_REF_SDA_P (x))
fprintf (file, "[r0]");
}
break;
-
+
case CONST_INT:
{
unsigned HOST_WIDE_INT v = INTVAL (x);
/* Trickery to avoid problems with shifting
32-bits at a time on a 32-bit host. */
v = v >> 16;
- v = v >> 16;
+ v = v >> 16;
fprintf (file, HOST_WIDE_INT_PRINT_HEX, v);
break;
}
case CONST_DOUBLE:
fprintf (file, HOST_WIDE_INT_PRINT_HEX, CONST_DOUBLE_LOW (x));
break;
-
+
case CONST_INT:
case SYMBOL_REF:
case CONST:
output_addr_const will normally barf at this, but it is OK to omit
the truncate and just emit the difference of the two labels. The
.hword directive will automatically handle the truncation for us.
-
+
Returns true if rtx was handled, false otherwise. */
static bool
|| GET_CODE (src) == SYMBOL_REF
|| GET_CODE (src) == CONST)
{
- if (TARGET_V850E_UP)
+ if (TARGET_V850E_UP)
return "mov hilo(%1),%0";
else
return "movhi hi(%1),%.,%0\n\tmovea lo(%1),%0,%0";
case E_SFmode:
max_offset = (1 << 8);
break;
-
+
default:
break;
}
registers that need to be saved. To detect this we note that the
helper functions always push at least register r29 (provided
that the function is not an interrupt handler). */
-
+
if (TARGET_PROLOG_FUNCTION
&& (i == 2 || ((i >= 20) && (i < 30))))
{
}
}
}
-
+
if (p_reg_saved)
*p_reg_saved = reg_saved;
emit_insn (gen_save_interrupt ());
actual_fsize -= INTERRUPT_FIXED_SAVE_SIZE;
-
+
if (((1L << LINK_POINTER_REGNUM) & reg_saved) != 0)
actual_fsize -= INTERRUPT_ALL_SAVE_SIZE;
rtx insn = emit_insn (save_all);
INSN_CODE (insn) = code;
actual_fsize -= alloc_stack;
-
+
}
else
save_all = NULL_RTX;
init_stack_alloc = compute_register_save_size (NULL);
else
init_stack_alloc = actual_fsize;
-
+
/* Save registers at the beginning of the stack frame. */
offset = init_stack_alloc - 4;
-
+
if (init_stack_alloc)
increment_stack (- (signed) init_stack_alloc, true);
-
+
/* Save the return pointer first. */
if (num_save > 0 && REGNO (save_regs[num_save-1]) == LINK_POINTER_REGNUM)
{
save_regs[--num_save]));
offset -= 4;
}
-
+
for (i = 0; i < num_save; i++)
{
F (emit_move_insn (gen_rtx_MEM (SImode,
}
code = recog (restore_all, NULL, NULL);
-
+
if (code >= 0)
{
rtx insn;
{
if (lookup_attribute ("sda", DECL_ATTRIBUTES (decl)) != NULL_TREE)
return DATA_AREA_SDA;
-
+
if (lookup_attribute ("tda", DECL_ATTRIBUTES (decl)) != NULL_TREE)
return DATA_AREA_TDA;
-
+
if (lookup_attribute ("zda", DECL_ATTRIBUTES (decl)) != NULL_TREE)
return DATA_AREA_ZDA;
v850_set_data_area (tree decl, v850_data_area data_area)
{
tree name;
-
+
switch (data_area)
{
case DATA_AREA_SDA: name = get_identifier ("sda"); break;
data_area = DATA_AREA_ZDA;
else
gcc_unreachable ();
-
+
switch (TREE_CODE (decl))
{
case VAR_DECL:
*no_add_attrs = true;
}
break;
-
+
default:
break;
}
if (DECL_SECTION_NAME (decl))
{
const char *name = DECL_SECTION_NAME (decl);
-
+
if (streq (name, ".zdata") || streq (name, ".zbss"))
v850_set_data_area (decl, DATA_AREA_ZDA);
else if (size <= small_memory_max [(int) SMALL_MEMORY_ZDA])
v850_set_data_area (decl, DATA_AREA_ZDA);
}
-
+
if (v850_get_data_area (decl) == DATA_AREA_NORMAL)
return;
}
unsigned long int last;
int i;
static char buff [256]; /* XXX */
-
+
if (count <= 2)
{
error ("bogus JR construction: %d", count);
gcc_assert (GET_CODE (XVECEXP (op, 0, 1)) == SET);
gcc_assert (GET_CODE (SET_SRC (XVECEXP (op, 0, 1))) == PLUS);
gcc_assert (GET_CODE (XEXP (SET_SRC (XVECEXP (op, 0, 1)), 1)) == CONST_INT);
-
+
stack_bytes = INTVAL (XEXP (SET_SRC (XVECEXP (op, 0, 1)), 1));
/* Each pop will remove 4 bytes from the stack.... */
for (i = 2; i < count; i++)
{
rtx vector_element = XVECEXP (op, 0, i);
-
+
gcc_assert (GET_CODE (vector_element) == SET);
gcc_assert (GET_CODE (SET_DEST (vector_element)) == REG);
gcc_assert (register_is_ok_for_epilogue (SET_DEST (vector_element),
SImode));
-
+
mask |= 1 << REGNO (SET_DEST (vector_element));
}
{
gcc_assert (!stack_bytes);
gcc_assert (mask & (1 << 29));
-
+
last = 29;
}
We ignore this here, and generate a JR anyway. We will
be popping more registers than is strictly necessary, but
it does save code space. */
-
+
if (TARGET_LONG_CALLS)
{
char name[40];
-
+
if (first == last)
sprintf (name, "__return_%s", reg_names [first]);
else
sprintf (name, "__return_%s_%s", reg_names [first], reg_names [last]);
-
+
sprintf (buff, "movhi hi(%s), r0, r6\n\tmovea lo(%s), r6, r6\n\tjmp r6",
name, name);
}
else
sprintf (buff, "jr __return_%s_%s", reg_names [first], reg_names [last]);
}
-
+
return buff;
}
unsigned long int last;
int i;
static char buff [255]; /* XXX */
-
- if (count <= (TARGET_LONG_CALLS ? 3 : 2))
+
+ if (count <= (TARGET_LONG_CALLS ? 3 : 2))
{
error ("bogus JARL construction: %d", count);
return NULL;
gcc_assert (GET_CODE (SET_SRC (XVECEXP (op, 0, 0))) == PLUS);
gcc_assert (GET_CODE (XEXP (SET_SRC (XVECEXP (op, 0, 0)), 0)) == REG);
gcc_assert (GET_CODE (XEXP (SET_SRC (XVECEXP (op, 0, 0)), 1)) == CONST_INT);
-
+
/* Work out how many bytes to push onto the stack after storing the
registers. */
stack_bytes = INTVAL (XEXP (SET_SRC (XVECEXP (op, 0, 0)), 1));
for (i = 1; i < count - (TARGET_LONG_CALLS ? 3 : 2); i++)
{
rtx vector_element = XVECEXP (op, 0, i);
-
+
gcc_assert (GET_CODE (vector_element) == SET);
gcc_assert (GET_CODE (SET_SRC (vector_element)) == REG);
gcc_assert (register_is_ok_for_epilogue (SET_SRC (vector_element),
SImode));
-
+
mask |= 1 << REGNO (SET_SRC (vector_element));
}
- /* Scan for the first register to push. */
+ /* Scan for the first register to push. */
for (first = 0; first < 32; first++)
{
if (mask & (1 << first))
{
gcc_assert (!stack_bytes);
gcc_assert (mask & (1 << 29));
-
+
last = 29;
}
We ignore this here, and generate a JARL anyway. We will
be pushing more registers than is strictly necessary, but
it does save code space. */
-
+
if (TARGET_LONG_CALLS)
{
char name[40];
-
+
if (first == last)
sprintf (name, "__save_%s", reg_names [first]);
else
sprintf (name, "__save_%s_%s", reg_names [first], reg_names [last]);
-
+
if (TARGET_V850E3V5_UP)
sprintf (buff, "mov hilo(%s), r11\n\tjarl [r11], r10", name);
else
case DATA_AREA_TDA:
switch_to_section (tdata_section);
break;
-
+
default:
switch_to_section (bss_section);
break;
}
-
+
ASM_OUTPUT_ALIGN (file, floor_log2 (align / BITS_PER_UNIT));
#ifdef ASM_DECLARE_OBJECT_NAME
last_assemble_variable_decl = decl;
case DATA_AREA_TDA:
fprintf (file, "%s", TCOMMON_ASM_OP);
break;
-
+
default:
fprintf (file, "%s", COMMON_ASM_OP);
break;
}
}
-
+
assemble_name (file, name);
fprintf (file, ",%u,%u\n", size, align / BITS_PER_UNIT);
}
fprintf (file, "%s", LOCAL_ASM_OP);
assemble_name (file, name);
fprintf (file, "\n");
-
+
ASM_OUTPUT_ALIGNED_DECL_COMMON (file, decl, name, size, align);
}
/* Initialize the default names of the v850 specific sections,
if this has not been done before. */
-
+
if (GHS_default_section_names [(int) GHS_SECTION_KIND_SDATA] == NULL)
{
GHS_default_section_names [(int) GHS_SECTION_KIND_SDATA]
GHS_default_section_names [(int) GHS_SECTION_KIND_TDATA]
= ".tdata";
-
+
GHS_default_section_names [(int) GHS_SECTION_KIND_ZDATA]
= ".zdata";
GHS_default_section_names [(int) GHS_SECTION_KIND_ROZDATA]
= ".rozdata";
}
-
+
if (current_function_decl == NULL_TREE
&& (VAR_P (decl)
|| TREE_CODE (decl) == CONST_DECL
{
default:
gcc_unreachable ();
-
+
case DATA_AREA_SDA:
kind = ((TREE_READONLY (decl))
? GHS_SECTION_KIND_ROSDATA
: GHS_SECTION_KIND_SDATA);
break;
-
+
case DATA_AREA_TDA:
kind = GHS_SECTION_KIND_TDATA;
break;
-
+
case DATA_AREA_ZDA:
kind = ((TREE_READONLY (decl))
? GHS_SECTION_KIND_ROZDATA
: GHS_SECTION_KIND_ZDATA);
break;
-
+
case DATA_AREA_NORMAL: /* default data area */
if (TREE_READONLY (decl))
kind = GHS_SECTION_KIND_RODATA;
int i;
static char buff[ 120 ]; /* XXX */
int use_callt = 0;
-
+
if (count <= 2)
{
error ("bogus DISPOSE construction: %d", count);
gcc_assert (GET_CODE (XVECEXP (op, 0, 1)) == SET);
gcc_assert (GET_CODE (SET_SRC (XVECEXP (op, 0, 1))) == PLUS);
gcc_assert (GET_CODE (XEXP (SET_SRC (XVECEXP (op, 0, 1)), 1)) == CONST_INT);
-
+
stack_bytes = INTVAL (XEXP (SET_SRC (XVECEXP (op, 0, 1)), 1));
/* Each pop will remove 4 bytes from the stack.... */
for (i = 2; i < count; i++)
{
rtx vector_element = XVECEXP (op, 0, i);
-
+
gcc_assert (GET_CODE (vector_element) == SET);
gcc_assert (GET_CODE (SET_DEST (vector_element)) == REG);
gcc_assert (register_is_ok_for_epilogue (SET_DEST (vector_element),
for (i = 20; i < 32; i++)
if (mask & (1 << i))
break;
-
+
if (i == 31)
sprintf (buff, "callt ctoff(__callt_return_r31c)");
else
{
static char regs [100]; /* XXX */
int done_one;
-
+
/* Generate the DISPOSE instruction. Note we could just issue the
bit mask as a number as the assembler can cope with this, but for
the sake of our readers we turn it into a textual description. */
regs[0] = 0;
done_one = 0;
-
+
for (i = 20; i < 32; i++)
{
if (mask & (1 << i))
{
int first;
-
+
if (done_one)
strcat (regs, ", ");
else
done_one = 1;
-
+
first = i;
strcat (regs, reg_names[ first ]);
-
+
for (i++; i < 32; i++)
if ((mask & (1 << i)) == 0)
break;
-
+
if (i > first + 1)
{
strcat (regs, " - ");
}
}
}
-
+
sprintf (buff, "dispose %d {%s}, r31", stack_bytes / 4, regs);
}
-
+
return buff;
}
int i;
static char buff[ 120 ]; /* XXX */
int use_callt = 0;
-
+
if (XVECLEN (op, 0) <= 1)
{
error ("bogus PREPEARE construction: %d", XVECLEN (op, 0));
gcc_assert (GET_CODE (XVECEXP (op, 0, 0)) == SET);
gcc_assert (GET_CODE (SET_SRC (XVECEXP (op, 0, 0))) == PLUS);
gcc_assert (GET_CODE (XEXP (SET_SRC (XVECEXP (op, 0, 0)), 1)) == CONST_INT);
-
+
stack_bytes = INTVAL (XEXP (SET_SRC (XVECEXP (op, 0, 0)), 1));
for (i = 1; i < XVECLEN (op, 0); i++)
{
rtx vector_element = XVECEXP (op, 0, i);
-
+
if (GET_CODE (vector_element) == CLOBBER)
continue;
-
+
gcc_assert (GET_CODE (vector_element) == SET);
gcc_assert (GET_CODE (SET_SRC (vector_element)) == REG);
gcc_assert (register_is_ok_for_epilogue (SET_SRC (vector_element),
sprintf (buff, "callt ctoff(__callt_save_r2_r%d)", (mask & (1 << 31)) ? 31 : 29 );
return buff;
}
-
+
for (i = 20; i < 32; i++)
if (mask & (1 << i))
break;
static char regs [100]; /* XXX */
int done_one;
-
+
/* Generate the PREPARE instruction. Note we could just issue the
bit mask as a number as the assembler can cope with this, but for
- the sake of our readers we turn it into a textual description. */
+ the sake of our readers we turn it into a textual description. */
regs[0] = 0;
done_one = 0;
-
+
for (i = 20; i < 32; i++)
{
if (mask & (1 << i))
{
int first;
-
+
if (done_one)
strcat (regs, ", ");
else
done_one = 1;
-
+
first = i;
strcat (regs, reg_names[ first ]);
-
+
for (i++; i < 32; i++)
if ((mask & (1 << i)) == 0)
break;
-
+
if (i > first + 1)
{
strcat (regs, " - ");
}
}
}
-
+
sprintf (buff, "prepare {%s}, %d", regs, (- stack_bytes) / 4);
}
-
+
return buff;
}
/* Worker function for TARGET_FUNCTION_VALUE. */
static rtx
-v850_function_value (const_tree valtype,
+v850_function_value (const_tree valtype,
const_tree fn_decl_or_type ATTRIBUTE_UNUSED,
bool outgoing ATTRIBUTE_UNUSED)
{
+ (GET_MODE_NUNITS (mode) * UNITS_PER_WORD))))
return true;
- return false;
+ return false;
}
static int
if (REGNO (operands[1]) & 1)
/* Use two store word instructions to synthesise a store double. */
return "st.w %1, %0 ; st.w %R1, %R0 ";
-
+
return "st.dw %1, %0";
}
#if TARGET_CPU_DEFAULT == TARGET_CPU_v850e1
#undef MASK_DEFAULT
-#define MASK_DEFAULT MASK_V850E /* No practical difference. */
+#define MASK_DEFAULT MASK_V850E /* No practical difference. */
#undef SUBTARGET_ASM_SPEC
#define SUBTARGET_ASM_SPEC "%{!mv*:-mv850e1}"
#undef SUBTARGET_CPP_SPEC
#if TARGET_CPU_DEFAULT == TARGET_CPU_v850e2
#undef MASK_DEFAULT
-#define MASK_DEFAULT MASK_V850E2
+#define MASK_DEFAULT MASK_V850E2
#undef SUBTARGET_ASM_SPEC
#define SUBTARGET_ASM_SPEC "%{!mv*:-mv850e2}"
#undef SUBTARGET_CPP_SPEC
#define TARGET_VERSION fprintf (stderr, " (Renesas V850E3V5)");
#endif
-#define TARGET_V850E3V5_UP ((TARGET_V850E3V5))
+#define TARGET_V850E3V5_UP ((TARGET_V850E3V5))
#define TARGET_V850E2V3_UP ((TARGET_V850E2V3) || TARGET_V850E3V5_UP)
#define TARGET_V850E2_UP ((TARGET_V850E2) || TARGET_V850E2V3_UP)
#define TARGET_V850E_UP ((TARGET_V850E) || TARGET_V850E2_UP)
#define EXTRA_SPECS \
{ "subtarget_asm_spec", SUBTARGET_ASM_SPEC }, \
- { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }
+ { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }
/* Macro to decide when FPU instructions can be used. */
For any two classes, it is very desirable that there be another
class that represents their union. */
-
+
enum reg_class
{
NO_REGS, EVEN_REGS, GENERAL_REGS, ALL_REGS, LIM_REG_CLASSES
Since they use reg_renumber, they are safe only once reg_renumber
has been allocated, which happens in reginfo.cc during register
allocation. */
-
+
#define REGNO_OK_FOR_BASE_P(regno) \
(((regno) < FIRST_PSEUDO_REGISTER \
&& (regno) != CC_REGNUM \
/* Register containing return address from latest function call. */
#define LINK_POINTER_REGNUM LP_REGNUM
-
+
/* On some machines the offset between the frame pointer and starting
offset of the automatic variables is not known until after register
allocation has been done (for example, because the saved registers
Do not define this macro if it would be the same as
`FRAME_POINTER_REGNUM'. */
-#undef HARD_FRAME_POINTER_REGNUM
+#undef HARD_FRAME_POINTER_REGNUM
#define HARD_FRAME_POINTER_REGNUM 29
/* Base register for access to arguments of the function. */
#define NO_FUNCTION_CSE 1
/* The four different data regions on the v850. */
-typedef enum
+typedef enum
{
DATA_AREA_NORMAL,
DATA_AREA_SDA,
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN))
-#undef ASM_OUTPUT_ALIGNED_BSS
+#undef ASM_OUTPUT_ALIGNED_BSS
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
v850_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
#undef ASM_OUTPUT_LOCAL
#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \
v850_output_local (FILE, DECL, NAME, SIZE, ALIGN)
-
+
/* Globalizing directive for a label. */
#define GLOBAL_ASM_OP "\t.global "
can appear in the "ghs section" pragma. These names are used to index
into the GHS_default_section_names[] and GHS_current_section_names[]
that are defined in v850.cc, and so the ordering of each must remain
- consistent.
+ consistent.
- These arrays give the default and current names for each kind of
+ These arrays give the default and current names for each kind of
section defined by the GHS pragmas. The current names can be changed
- by the "ghs section" pragma. If the current names are null, use
+ by the "ghs section" pragma. If the current names are null, use
the default names. Note that the two arrays have different types.
For the *normal* section kinds (like .data, .text, etc.) we do not
want to explicitly force the name of these sections, but would rather
- let the linker (or at least the back end) choose the name of the
+ let the linker (or at least the back end) choose the name of the
section, UNLESS the user has forced a specific name for these section
kinds. To accomplish this set the name in ghs_default_section_names
to null. */
enum GHS_section_kind
-{
+{
GHS_SECTION_KIND_DEFAULT,
GHS_SECTION_KIND_TEXT,
- GHS_SECTION_KIND_DATA,
+ GHS_SECTION_KIND_DATA,
GHS_SECTION_KIND_RODATA,
GHS_SECTION_KIND_BSS,
GHS_SECTION_KIND_SDATA,
data area approach is no longer used, these pointers are no longer
supported.
- The macro and function pointers are described below.
+ The macro and function pointers are described below.
INIT_EXPANDERS:
A difficulty is setting the correct instruction parity at run time.
- TRAMPOLINE_SIZE
+ TRAMPOLINE_SIZE
A C expression for the size in bytes of the trampoline, as an integer. */
#define TRAMPOLINE_SIZE (visium_cpu == PROCESSOR_GR6 ? 24 : 20)
-/* Target-independent configuration for VxWorks and VxWorks AE.
+/* Target-independent configuration for VxWorks and VxWorks AE.
Copyright (C) 2005-2024 Free Software Foundation, Inc.
Contributed by CodeSourcery, LLC.
vxworks_emutls_var_fields (tree type, tree *name)
{
tree field, next_field;
-
+
*name = get_identifier ("__tls_var");
-
+
field = build_decl (BUILTINS_LOCATION, FIELD_DECL,
get_identifier ("size"), unsigned_type_node);
DECL_CONTEXT (field) = type;
{
vec<constructor_elt, va_gc> *v;
vec_alloc (v, 3);
-
+
tree type = TREE_TYPE (var);
tree field = TYPE_FIELDS (type);
-
+
constructor_elt elt = {field, fold_convert (TREE_TYPE (field), tmpl_addr)};
v->quick_push (elt);
-
+
field = DECL_CHAIN (field);
elt.index = field;
elt.value = build_int_cst (TREE_TYPE (field), 0);
v->quick_push (elt);
-
+
field = DECL_CHAIN (field);
elt.index = field;
elt.value = fold_convert (TREE_TYPE (field), DECL_SIZE_UNIT (decl));
v->quick_push (elt);
-
+
return build_constructor (type, v);
}
the toolchain user is expected to provide whatever linker level glue is
required to get things to operate properly. */
- targetm.have_ctors_dtors =
+ targetm.have_ctors_dtors =
TARGET_VXWORKS_HAVE_CTORS_DTORS || HAVE_INITFINI_ARRAY_SUPPORT;
/* PIC is only supported for RTPs. flags_pic might be < 0 here, in
#undef VXWORKS_LINK_SPEC
#define VXWORKS_LINK_SPEC \
"-r %{v:-V}"
-
+
#undef VXWORKS_LIBGCC_SPEC
#define VXWORKS_LIBGCC_SPEC \
"-lgcc"
return expr;
return build2_loc (EXPR_LOCATION (expr), COMPOUND_EXPR, TREE_TYPE (t),
TREE_OPERAND (expr, 0), t);
- }
+ }
/* Disable until we figure out how to decide whether the functions are
present in runtime. */
convert (typex, arg1));
return convert (type, expr);
}
-
+
return NULL_TREE;
}
return expr;
return build2_loc (EXPR_LOCATION (expr), COMPOUND_EXPR, TREE_TYPE (t),
TREE_OPERAND (expr, 0), t);
- }
+ }
/* Convert e.g. (long)round(d) -> lround(d). */
/* If we're converting to char, we may encounter differing behavior
#if !defined (USED_FOR_TARGET)
#include "insn-modes.h"
#include "signop.h"
-#include "wide-int.h"
+#include "wide-int.h"
#include "wide-int-print.h"
/* On targets that don't need polynomial offsets, target-specific code
"use -Wno-error=coverage-mismatch to tolerate "
"the mismatch but performance may drop if the "
"function is hot\n");
-
+
if (!seen_error ()
&& !warned++)
{
fn_b_ctrs[counter] = fn_n_ctrs[counter];
fn_n_ctrs[counter] += num;
-
+
fn_ctr_mask |= 1 << counter;
return 1;
}
gcc_assert (no < fn_n_ctrs[counter] - fn_b_ctrs[counter]);
no += fn_b_ctrs[counter];
-
+
/* "no" here is an array index, scaled to bytes later. */
return build4 (ARRAY_REF, gcov_type_node, fn_v_ctrs[counter],
build_int_cst (integer_type_node, no), NULL, NULL);
DECL_SIZE_UNIT (var) = TYPE_SIZE_UNIT (array_type);
varpool_node::finalize_decl (var);
}
-
+
fn_b_ctrs[i] = fn_n_ctrs[i] = 0;
fn_v_ctrs[i] = NULL_TREE;
}
tree array_type;
gcc_assert (counters);
-
+
/* ctr_info::num */
field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE,
get_gcov_unsigned_t ());
fields = field;
-
+
/* ctr_info::values */
field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE,
build_pointer_type (get_gcov_type ()));
DECL_CHAIN (field) = fields;
fields = field;
-
+
finish_builtin_struct (ctr_info, "__gcov_ctr_info", fields, NULL_TREE);
/* key */
build_pointer_type (build_qualified_type
(gcov_info_type, TYPE_QUAL_CONST)));
fields = field;
-
+
/* ident */
field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE,
get_gcov_unsigned_t ());
DECL_CHAIN (field) = fields;
fields = field;
-
+
/* lineno_checksum */
field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE,
get_gcov_unsigned_t ());
CONSTRUCTOR_APPEND_ELT (v1, fields,
build1 (ADDR_EXPR, TREE_TYPE (fields), key));
fields = DECL_CHAIN (fields);
-
+
/* ident */
CONSTRUCTOR_APPEND_ELT (v1, fields,
build_int_cstu (get_gcov_unsigned_t (),
if (var)
CONSTRUCTOR_APPEND_ELT (ctr, DECL_CHAIN (TYPE_FIELDS (ctr_type)),
build_fold_addr_expr (var));
-
+
CONSTRUCTOR_APPEND_ELT (v2, NULL, build_constructor (ctr_type, ctr));
}
-
+
CONSTRUCTOR_APPEND_ELT (v1, fields,
build_constructor (TREE_TYPE (fields), v2));
merge_fn_type);
DECL_CHAIN (field) = fields;
fields = field;
-
+
/* n_functions */
field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE,
get_gcov_unsigned_t ());
DECL_CHAIN (field) = fields;
fields = field;
-
+
/* function_info pointer pointer */
fn_info_ptr_type = build_pointer_type
(build_qualified_type (fn_info_ptr_type, TYPE_QUAL_CONST));
for (ix = 0; ix != GCOV_COUNTERS; ix++)
if ((1u << ix) & prg_ctr_mask)
n_counters++;
-
+
/* Build the info and fn_info types. These are mutually recursive. */
gcov_info_type = lang_hooks.types.make_type (RECORD_TYPE);
gcov_fn_info_type = lang_hooks.types.make_type (RECORD_TYPE);
gcov_fn_info_ptr_type = build_pointer_type
(build_qualified_type (gcov_fn_info_type, TYPE_QUAL_CONST));
build_info_type (gcov_info_type, gcov_fn_info_ptr_type);
-
+
/* Build the gcov info var, this is referred to in its own
initializer. */
gcov_info_var = build_decl (BUILTINS_LOCATION,
{
tree init = build_fn_info (data, gcov_fn_info_type, gcov_info_var);
tree var = build_var (fn, gcov_fn_info_type, -1);
-
+
DECL_INITIAL (var) = init;
varpool_node::finalize_decl (var);
-
+
CONSTRUCTOR_APPEND_ELT (ctor, NULL,
build1 (ADDR_EXPR, gcov_fn_info_ptr_type, var));
return ctor;
DECL_NAME (fn_info_ary) = get_identifier (name_buf);
DECL_INITIAL (fn_info_ary) = build_constructor (fn_info_ary_type, ctor);
varpool_node::finalize_decl (fn_info_ary);
-
+
DECL_INITIAL (gcov_info_var)
= build_info (TREE_TYPE (gcov_info_var), fn_info_ary, object_checksum);
varpool_node::finalize_decl (gcov_info_var);
{
vec<constructor_elt, va_gc> *fn_ctor = NULL;
struct coverage_data *fn;
-
+
for (fn = functions_head; fn; fn = fn->next)
{
fn_ctor = coverage_obj_fn (fn_ctor, fn->fn_decl, fn);
/* The location of the argument. */
location_t loc;
};
-
+
struct rejection_reason {
enum rejection_reason_code code;
union {
conv->rvaluedness_matches_p
= (TYPE_REF_IS_RVALUE (rto) == TYPE_REF_IS_RVALUE (rfrom));
else
- conv->rvaluedness_matches_p
+ conv->rvaluedness_matches_p
= (TYPE_REF_IS_RVALUE (rto) == !is_lvalue);
if ((gl_kind & clk_bitfield) != 0
break;
if (TYPE_PTR_P (type1) && TYPE_PTR_P (type2))
break;
- if (TREE_CODE (type1) == ENUMERAL_TYPE
+ if (TREE_CODE (type1) == ENUMERAL_TYPE
&& TREE_CODE (type2) == ENUMERAL_TYPE)
break;
- if (TYPE_PTR_P (type1)
+ if (TYPE_PTR_P (type1)
&& null_ptr_cst_p (args[1]))
{
type2 = type1;
break;
}
- if (null_ptr_cst_p (args[0])
+ if (null_ptr_cst_p (args[0])
&& TYPE_PTR_P (type2))
{
type1 = type2;
if (ARITHMETIC_TYPE_P (type1))
break;
return;
-
+
default:
gcc_unreachable ();
}
if (complain & tf_error)
{
auto_diagnostic_group d;
- error ("call of %<(%T) (%A)%> is ambiguous",
+ error ("call of %<(%T) (%A)%> is ambiguous",
TREE_TYPE (obj), build_tree_list_vec (*args));
print_z_candidates (location_of (TREE_TYPE (obj)), candidates);
}
else
{
tree fnname = ovl_op_identifier (ismodop, ismodop ? code2 : code);
- const char *msg = (flag_permissive)
+ const char *msg = (flag_permissive)
? G_("no %<%D(int)%> declared for postfix %qs,"
" trying prefix operator instead")
: G_("no %<%D(int)%> declared for postfix %qs");
else if (complain & tf_warning)
maybe_warn_array_conv (loc, convs, expr);
- /* If necessary, create a temporary.
+ /* If necessary, create a temporary.
VA_ARG_EXPR and CONSTRUCTOR expressions are special cases
that need temporaries, even when their types are reference
tree bitfield_type;
/* If VAL is a bitfield, then -- since it has already been converted
- to TYPE -- it cannot have a precision greater than TYPE.
+ to TYPE -- it cannot have a precision greater than TYPE.
If it has a smaller precision, we must widen it here. For
example, passing "int f:3;" to a function expecting an "int" will
if we call convert_bitfield_to_declared_type, the bitfield will
be converted to "long long". */
bitfield_type = is_bitfield_expr_with_lowered_type (val);
- if (bitfield_type
+ if (bitfield_type
&& TYPE_PRECISION (TREE_TYPE (val)) < TYPE_PRECISION (type))
val = convert_to_integer_nofold (TYPE_MAIN_VARIANT (bitfield_type), val);
return dispatcher_decl;
}
-/* fn is a function version dispatcher that is marked used. Mark all the
+/* fn is a function version dispatcher that is marked used. Mark all the
semantically identical function versions it will dispatch as used. */
void
auto_diagnostic_group d;
if (warning (OPT_Wconversion, "choosing %qD over %qD", w->fn, l->fn)
&& warning (OPT_Wconversion, " for conversion from %qH to %qI",
- source, w->second_conv->type))
+ source, w->second_conv->type))
{
inform (input_location, " because conversion sequence "
"for the argument is better");
tree f2 = TREE_TYPE (cand2->fn);
tree p1 = TYPE_ARG_TYPES (f1);
tree p2 = TYPE_ARG_TYPES (f2);
-
+
/* Check if cand1->fn and cand2->fn are versions of the same function. It
is possible that cand1->fn and cand2->fn are function versions but of
different functions. Check types to see if they are versions of the same
/* Id for dumping the class hierarchy. */
int class_dump_id;
-
+
/* The number of nested classes being processed. If we are not in the
scope of any class, this is zero. */
error ("cannot convert from base class %qT to derived "
"class %qT because the base is virtual",
BINFO_TYPE (binfo), BINFO_TYPE (d_binfo));
- }
+ }
else
{
if (want_pointer)
if ((DECL_CONV_FN_P (fn) || TREE_CODE (fn) == TEMPLATE_DECL)
&& !same_type_p (TREE_TYPE (fn_type), TREE_TYPE (method_type)))
continue;
-
+
/* For templates, the template parameters must be identical. */
if (TREE_CODE (fn) == TEMPLATE_DECL)
{
if (!DECL_INHERITED_CTOR (fn))
/* Defer to the other function. */
return false;
-
+
tree basem = DECL_INHERITED_CTOR_BASE (method);
tree basef = DECL_INHERITED_CTOR_BASE (fn);
if (flag_new_inheriting_ctors)
if (DECL_VINDEX (dtor))
return false; /* Virtual */
-
+
if (!TREE_PRIVATE (dtor) && !TREE_PROTECTED (dtor))
return true; /* Public */
{
/* We convert via virtual base. Adjust the fixed
offset to be from there. */
- offset =
+ offset =
size_diffop (offset,
fold_convert (ssizetype,
BINFO_OFFSET (virtual_offset)));
case CONST_DECL:
DECL_NONLOCAL (field) = 1;
break;
-
+
case VAR_DECL:
if (TREE_CODE (t) == UNION_TYPE
&& cxx_dialect < cxx11)
"a member of a union", field);
}
goto data_member;
-
+
case FIELD_DECL:
if (TREE_CODE (t) == UNION_TYPE)
{
&& DECL_CONTEXT (*iter) == t
&& move_fn_p (*iter))
return true;
-
+
return false;
}
/* [dcl.init.aggr]
An aggregate is an array or a class with no user-provided
- constructors ... and no virtual functions.
+ constructors ... and no virtual functions.
Again, other conditions for being an aggregate are checked
elsewhere. */
vec<tree, va_gc> *accesses = BINFO_BASE_ACCESSES (binfo);
tree base_binfo;
unsigned i;
-
+
for (i = 0; BINFO_BASE_ITERATE (binfo, i, base_binfo); i++)
{
tree basetype = TREE_TYPE (base_binfo);
basetype);
}
}
-
+
/* If the class has no user-declared constructor, but does have
non-static const or reference data members that can never be
initialized, issue a warning. */
stores cannot alias stores to void*! */
tree field;
- field = build_decl (input_location,
+ field = build_decl (input_location,
FIELD_DECL, get_vfield_name (t), vtbl_ptr_type_node);
DECL_VIRTUAL_P (field) = 1;
DECL_ARTIFICIAL (field) = 1;
/* COMPLETE_TYPE_P is now true. */
maybe_warn_about_overly_private_class (t);
-
+
if (is_std_init_list (t))
{
/* People keep complaining that the compiler crashes on an invalid
control of FLAGS. Permit pointers to member function if FLAGS
permits. If TEMPLATE_ONLY, the name of the overloaded function was
a template-id, and EXPLICIT_TARGS are the explicitly provided
- template arguments.
+ template arguments.
If OVERLOAD is for one or more member functions, then ACCESS_PATH
is the base path used to reference those member functions. If
DECL_ARTIFICIAL (decl) = 1;
SET_DECL_SELF_REFERENCE_P (decl);
set_underlying_type (decl);
- set_instantiating_module (decl);
+ set_instantiating_module (decl);
if (processing_template_decl)
decl = push_template_decl (decl);
compute the indices -- but do not add to the vtable -- when
building the main vtable for a class. */
if (binfo == TYPE_BINFO (vid->derived)
- || (BINFO_VIRTUAL_P (binfo)
+ || (BINFO_VIRTUAL_P (binfo)
/* If BINFO is RTTI_BINFO, then (since BINFO does not
correspond to VID->DERIVED), we are building a primary
construction virtual table. Since this is a primary
}
/* Subroutine of check_constexpr_ctor_body_1 and constexpr_fn_retval.
- In C++11 mode checks that the TYPE_DECLs in the BIND_EXPR_VARS of a
+ In C++11 mode checks that the TYPE_DECLs in the BIND_EXPR_VARS of a
BIND_EXPR conform to 7.1.5/3/4 on typedef and alias declarations. */
static bool
return false;
unsigned nelts = 0;
-
+
if (body)
{
if (TREE_CODE (body) != CONSTRUCTOR)
call_stack.pop ();
}
-vec<tree>
+vec<tree>
cx_error_context (void)
{
vec<tree> r = vNULL;
(refers) to the C subobject of the most derived object.
But it can also be an invalid case. */
-
+
/* Get the most derived object. */
obj = get_component_with_type (obj, mdtype, NULL_TREE);
if (obj == error_mark_node)
vec_safe_reserve (CONSTRUCTOR_ELTS (ary_ctor), num_elts);
for (unsigned ix = 0; ix != num_elts; ix++)
{
- constructor_elt elt =
+ constructor_elt elt =
{
build_int_cst (size_type_node, ix),
extract_string_elt (string, chars_per_elt, ix)
case COMPONENT_REF:
if (is_overloaded_fn (t))
{
- /* We can only get here in checking mode via
+ /* We can only get here in checking mode via
build_non_dependent_expr, because any expression that
calls or takes the address of the function will have
pulled a FUNCTION_DECL out of the COMPONENT_REF. */
for (tree b = BLOCK_SUBBLOCKS (replace_blk); b; b = BLOCK_CHAIN (b))
BLOCK_SUPERCONTEXT (b) = replace_blk;
BIND_EXPR_BLOCK (first) = replace_blk;
- /* The top block has one child, so far, and we have now got a
+ /* The top block has one child, so far, and we have now got a
superblock. */
BLOCK_SUPERCONTEXT (replace_blk) = top_block;
BLOCK_SUBBLOCKS (top_block) = replace_blk;
/* Before initial resume is called, the responsibility for cleanup on
exception falls to the ramp. After that, the coroutine body code
- should do the cleanup. This is signalled by the flag
+ should do the cleanup. This is signalled by the flag
'initial_await_resume_called'. */
tree not_iarc
for (i = 0; i < vec_len; ++i)
{
tree elem = TREE_VEC_ELT (elems, i);
- TREE_VEC_ELT (folded_elems, i) =
+ TREE_VEC_ELT (folded_elems, i) =
(elem && !TYPE_P (elem)) ? cplus_expand_constant (elem) : elem;
}
/* Represents an argument pack of types (or templates). An argument
pack stores zero or more arguments that will be used to instantiate
- a parameter pack.
+ a parameter pack.
ARGUMENT_PACK_ARGS retrieves the arguments stored in the argument
pack.
DEFTREECODE (TYPE_ARGUMENT_PACK, "type_argument_pack", tcc_type, 0)
/* Represents an argument pack of values, which can be used either for
- non-type template arguments or function call arguments.
+ non-type template arguments or function call arguments.
NONTYPE_ARGUMENT_PACK plays precisely the same role as
TYPE_ARGUMENT_PACK, but will be used for packing non-type template
Example:
template<typename... Values>
- struct tied : tuple<Values&...> {
+ struct tied : tuple<Values&...> {
// ...
};
/* Selects the Ith parameter out of an argument pack. This node will
be used when instantiating pack expansions; see
- tsubst_pack_expansion.
+ tsubst_pack_expansion.
ARGUMENT_PACK_SELECT_FROM_PACK contains the *_ARGUMENT_PACK node
from which the argument will be selected.
binding_slot *bslot);
extern void lazy_load_pendings (tree decl);
extern module_state *preprocess_module (module_state *, location_t,
- bool in_purview,
+ bool in_purview,
bool is_import, bool export_p,
cpp_reader *reader);
extern void preprocessed_module (cpp_reader *reader);
}
/* Inline bodies. */
-
+
inline tree
ovl_first (tree node)
{
&& TREE_CODE (val) == INTEGER_CST
&& ENUM_UNDERLYING_TYPE (type)
&& !int_fits_type_p (val, ENUM_UNDERLYING_TYPE (type)))
- warning_at (loc, OPT_Wconversion,
+ warning_at (loc, OPT_Wconversion,
"the result of the conversion is unspecified because "
"%qE is outside the range of type %qT",
expr, type);
whose underlying type is fixed (10.2) can be converted to a
prvalue of its underlying type. Moreover, if integral promotion
can be applied to its underlying type, a prvalue of an unscoped
- enumeration type whose underlying type is fixed can also be
+ enumeration type whose underlying type is fixed can also be
converted to a prvalue of the promoted underlying type. */
return type_promotes_to (prom);
}
:: operator-function-id
:: qualifier-id
( expression )
- id-expression
+ id-expression
GNU Extensions:
__builtin_va_arg ( assignment-expression , type-id )
__builtin_is_virtual_base_of ( type-id , type-id )
- __has_nothrow_assign ( type-id )
+ __has_nothrow_assign ( type-id )
__has_nothrow_constructor ( type-id )
__has_nothrow_copy ( type-id )
- __has_trivial_assign ( type-id )
+ __has_trivial_assign ( type-id )
__has_trivial_constructor ( type-id )
__has_trivial_copy ( type-id )
__has_unique_object_representations ( type-id )
__has_trivial_destructor ( type-id )
- __has_virtual_destructor ( type-id )
+ __has_virtual_destructor ( type-id )
__is_abstract ( type-id )
__is_base_of ( type-id , type-id )
__is_class ( type-id )
pp_cxx_left_paren (this);
type_id (TREE_OPERAND (t, 0));
pp_cxx_right_paren (this);
- break;
+ break;
case NOEXCEPT_EXPR:
pp_cxx_ws_string (this, "noexcept");
/* A function parameter pack or non-type template
parameter pack. */
pp_cxx_ws_string (this, "...");
-
+
id_expression (DECL_NAME (t));
}
abstract_declarator (TREE_TYPE (t));
/* Avoid crashing later. */
define_label (location, DECL_NAME (label));
}
- else
+ else
warn_for_unused_label (label);
}
}
if (! TREE_PUBLIC (newdecl))
{
warning_at (newdecl_loc,
- OPT_Wshadow,
+ OPT_Wshadow,
fndecl_built_in_p (olddecl)
? G_("shadowing built-in function %q#D")
: G_("shadowing library function %q#D"), olddecl);
"new declaration %q#D ambiguates built-in "
"declaration %q#D", newdecl, olddecl);
else
- warning (OPT_Wshadow,
+ warning (OPT_Wshadow,
fndecl_built_in_p (olddecl)
? G_("shadowing built-in function %q#D")
: G_("shadowing library function %q#D"), olddecl);
/* Replace the old RTL to avoid problems with inlining. */
COPY_DECL_RTL (newdecl, olddecl);
}
- else
+ else
{
/* Even if the types match, prefer the new declarations type
for built-ins which have not been explicitly declared,
versions of G++ silently ignore the linkage-specification
for this example:
- namespace N {
+ namespace N {
extern int i;
extern "C" int i;
}
= TYPE_NEXT_VARIANT (TYPE_NEXT_VARIANT (t));
break;
}
- }
+ }
else
for (tree t = TYPE_MAIN_VARIANT (remove); ;
t = TYPE_NEXT_VARIANT (t))
named_label_entry **slot
= named_labels->find_slot_with_hash (id, hash, INSERT);
named_label_entry *old = *slot;
-
+
if (old && old->label_decl)
{
if (!making_local_p)
return build_typename_type (context, name, fullname, tag_type);
want_template = TREE_CODE (fullname) == TEMPLATE_ID_EXPR;
-
+
if (!t)
{
if (complain & tf_error)
}
return error_mark_node;
}
-
+
/* Pull out the template from an injected-class-name (or multiple). */
if (want_template)
t = maybe_get_template_decl_from_type_decl (t);
return error_mark_node;
t = TYPE_NAME (t);
}
-
+
if (DECL_ARTIFICIAL (t) || !(complain & tf_keep_type_decl))
t = TREE_TYPE (t);
name = "top level";
else if (type_dep == 0)
{
- /* __FUNCTION__ */
+ /* __FUNCTION__ */
name = fname_as_string (type_dep);
release_name = true;
}
DECL_INITIAL (decl) = error_mark_node;
}
alias = lookup_attribute ("alias", DECL_ATTRIBUTES (decl)) != 0;
-
+
if (alias && TREE_CODE (decl) == FUNCTION_DECL)
record_key_method_defined (decl);
(Scalars are always complete types, so there is nothing to
check.) This code just sets COMPLETE_P; errors (if necessary)
are issued below. */
- if ((initialized || aggregate_definition_p)
+ if ((initialized || aggregate_definition_p)
&& !complete_p
&& COMPLETE_TYPE_P (complete_type (type)))
{
else
/* It must be a simple expression, e.g., int i = 3; */
return value_dependent_expression_p (init);
-
+
return false;
}
DECL_DECOMP_BASE (decl) = cond;
}
}
- int save_read = DECL_READ_P (decl);
+ int save_read = DECL_READ_P (decl);
for (unsigned i = 0; i < count; ++i)
{
location_t sloc = input_location;
that any access checks will be done relative to the current
scope, rather than the scope of the anonymous function. */
build_cleanup (decl);
-
+
/* Now start the function. */
cleanup = start_cleanup_fn (ob_parm);
push_deferring_access_checks (dk_no_check);
fcall = build_cleanup (decl);
pop_deferring_access_checks ();
-
+
/* Create the body of the anonymous function. */
compound_stmt = begin_compound_stmt (BCS_FN_BODY);
finish_expr_stmt (fcall);
DECL_NONADDRESSABLE_P (field) = 1;
fields = field;
- field = build_decl (input_location, FIELD_DECL, delta_identifier,
+ field = build_decl (input_location, FIELD_DECL, delta_identifier,
delta_type_node);
DECL_NONADDRESSABLE_P (field) = 1;
DECL_CHAIN (field) = fields;
else if (warn_vla > 0)
{
if (name)
- warning_at (name_loc, OPT_Wvla,
+ warning_at (name_loc, OPT_Wvla,
"variable length array %qD is used", name);
else
- warning (OPT_Wvla,
+ warning (OPT_Wvla,
"variable length array is used");
}
return error_mark_node;
if (at_function_scope_p ())
{
- /* [dcl.meaning]
+ /* [dcl.meaning]
A declarator-id shall not be qualified except
- for ...
+ for ...
None of the cases are permitted in block
scope. */
else if (TYPE_P (qualifying_scope))
error ("invalid use of qualified-name %<%T::%D%>",
qualifying_scope, decl);
- else
+ else
error ("invalid use of qualified-name %<%D::%D%>",
qualifying_scope, decl);
return error_mark_node;
if ((rqual || memfn_quals) && TREE_CODE (type) == FUNCTION_TYPE)
{
type = apply_memfn_quals (type, memfn_quals, rqual);
-
+
/* We have now dealt with these qualifiers. */
memfn_quals = TYPE_UNQUALIFIED;
rqual = REF_QUAL_NONE;
&& pedantic)
{
if (storage_class == sc_static)
- pedwarn (declspecs->locations[ds_storage_class], OPT_Wpedantic,
+ pedwarn (declspecs->locations[ds_storage_class], OPT_Wpedantic,
"%<static%> specifier invalid for function %qs "
"declared out of global scope", name);
else
- pedwarn (declspecs->locations[ds_inline], OPT_Wpedantic,
+ pedwarn (declspecs->locations[ds_inline], OPT_Wpedantic,
"%<inline%> specifier invalid for function %qs "
"declared out of global scope", name);
}
}
if (storage_class == sc_extern && pedantic)
{
- pedwarn (input_location, OPT_Wpedantic,
+ pedwarn (input_location, OPT_Wpedantic,
"cannot explicitly declare member %q#D to have "
"extern linkage", decl);
storage_class = sc_none;
}
else if (IDENTIFIER_CONV_OP_P (DECL_NAME (decl)))
TYPE_HAS_CONVERSION (class_type) = true;
-
+
/* Destructors are handled in check_methods. */
}
"enumerated type", decl);
return false;
}
-
+
tree type = non_reference (TREE_VALUE (arg));
if (type == error_mark_node)
return false;
|| operator_code == COMPOUND_EXPR)
warning_at (loc, OPT_Weffc__,
"user-defined %qD always evaluates both arguments", decl);
-
+
/* More Effective C++ rule 6. */
if (operator_code == POSTINCREMENT_EXPR
|| operator_code == POSTDECREMENT_EXPR
if (TREE_CODE (decl) != TYPE_DECL)
/* Found not-a-type. */
return NULL_TREE;
-
+
/* Look for invalid nested type:
class C {
class C {};
}
/* Begin compiling the definition of an enumeration type.
- NAME is its name,
+ NAME is its name,
if ENUMTYPE is not NULL_TREE then the type has alredy been found.
ENUM_UNDERLYING_TYPE (enumtype) = underlying_type;
else
{
- error ("underlying type %qT of %qT must be an integral type",
+ error ("underlying type %qT of %qT must be an integral type",
underlying_type, enumtype);
ENUM_UNDERLYING_TYPE (enumtype) = integer_type_node;
}
tree minnode, maxnode;
tree t;
- bool fixed_underlying_type_p
+ bool fixed_underlying_type_p
= ENUM_UNDERLYING_TYPE (enumtype) != NULL_TREE;
/* We built up the VALUES in reverse order. */
type = value ? TREE_TYPE (value) : NULL_TREE;
decl = build_decl (loc, CONST_DECL, name, type);
-
+
DECL_CONTEXT (decl) = enumtype;
TREE_CONSTANT (decl) = 1;
TREE_READONLY (decl) = 1;
/* Possibly warn about unused parameters. */
if (warn_unused_parameter
- && !processing_template_decl
+ && !processing_template_decl
&& !DECL_CLONED_FUNCTION_P (fndecl))
do_warn_unused_parameter (fndecl);
/* Id for dumping the raw trees. */
int raw_dump_id;
-
+
extern cpp_reader *parse_in;
static tree start_objects (bool, unsigned, bool, bool);
if (TREE_PURPOSE (args))
{
/* [basic.stc.dynamic.allocation]
-
+
The first parameter shall not have an associated default
argument. */
error_at (loc, "the first parameter of %<operator new%> cannot "
if (DECL_VISIBILITY_SPECIFIED (fn))
{
DECL_VISIBILITY (decl) = DECL_VISIBILITY (fn);
- DECL_VISIBILITY_SPECIFIED (decl) =
+ DECL_VISIBILITY_SPECIFIED (decl) =
DECL_VISIBILITY_SPECIFIED (fn);
}
else
? TYPE_ATTRIBUTES (TREE_TYPE (decl))
: DECL_ATTRIBUTES (decl));
tree attr = lookup_attribute ("visibility", attribs);
-
+
if (args != error_mark_node)
{
tree pattern = DECL_TEMPLATE_RESULT (TI_TEMPLATE (tinfo));
to refer to a temporary variable that does not have its
DECL_CONTEXT() properly set. */
-static tree
+static tree
fix_temporary_vars_context_r (tree *node,
int * /*unused*/,
void *ctx)
/* Make sure temporary variables in the initialiser all have
their DECL_CONTEXT() set to a value different from NULL_TREE.
This can happen when global variables initializers are built.
- In that case, the DECL_CONTEXT() of the global variables _AND_ of all
+ In that case, the DECL_CONTEXT() of the global variables _AND_ of all
the temporary variables that might have been generated in the
accompanying initializers is NULL_TREE, meaning the variables have been
declared in the global namespace.
guard,
/*noconvert=*/true,
tf_warning_or_error);
- guard_cond = cp_build_binary_op (input_location, EQ_EXPR, guard_cond,
+ guard_cond = cp_build_binary_op (input_location, EQ_EXPR, guard_cond,
integer_zero_node,
tf_warning_or_error);
}
/* Collect source file references recursively, starting from NAMESPC. */
-static void
-collect_source_refs (tree namespc)
+static void
+collect_source_refs (tree namespc)
{
/* Iterate over names in this name space. */
for (tree t = NAMESPACE_LEVEL (namespc)->names; t; t = TREE_CHAIN (t))
const char *
class_key_or_enum_as_string (tree t)
{
- if (TREE_CODE (t) == ENUMERAL_TYPE)
+ if (TREE_CODE (t) == ENUMERAL_TYPE)
{
if (SCOPED_ENUM_P (t))
return "enum class";
&& TYPE_LANG_SPECIFIC (t) && CLASSTYPE_TEMPLATE_INFO (t)
&& (TREE_CODE (CLASSTYPE_TI_TEMPLATE (t)) != TEMPLATE_DECL
|| PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE (t)));
-
+
if (! (flags & TFF_UNQUALIFIED_NAME))
dump_scope (pp, CP_DECL_CONTEXT (decl), flags | TFF_SCOPE);
flags &= ~TFF_UNQUALIFIED_NAME;
dump_scope (pp, CP_DECL_CONTEXT (t), flags);
flags &= ~TFF_UNQUALIFIED_NAME;
if ((flags & TFF_DECL_SPECIFIERS)
- && DECL_TEMPLATE_PARM_P (t)
+ && DECL_TEMPLATE_PARM_P (t)
&& TEMPLATE_PARM_PARAMETER_PACK (DECL_INITIAL (t)))
pp_string (pp, "...");
if (DECL_NAME (t))
&& (!ARGUMENT_PACK_P (arg)
|| TREE_VEC_LENGTH (ARGUMENT_PACK_ARGS (arg)) > 0))
pp_separate_with_comma (pp);
-
+
if (!arg)
pp_string (pp, M_("<template parameter error>"));
else
{
tree arg;
call_expr_arg_iterator iter;
-
+
pp_cxx_left_paren (pp);
FOR_EACH_CALL_EXPR_ARG (arg, iter, t)
{
{
tree arg;
aggr_init_expr_arg_iterator iter;
-
+
pp_cxx_left_paren (pp);
FOR_EACH_AGGR_INIT_EXPR_ARG (arg, iter, t)
{
t = t0;
if (template_backtrace_limit
- && n_total > template_backtrace_limit)
+ && n_total > template_backtrace_limit)
{
int skip = n_total - template_backtrace_limit;
int head = template_backtrace_limit / 2;
skip = 2;
head = (template_backtrace_limit - 1) / 2;
}
-
+
for (n = 0; n < head; n++)
{
gcc_assert (t != NULL);
"contexts, use -ftemplate-backtrace-limit=0 to "
"disable ]\n"),
"locus", xloc.file, xloc.line, skip);
-
+
do {
loc = t->locus;
t = t->next;
} while (t != NULL && --skip > 0);
}
}
-
+
while (t != NULL)
{
while (t->next != NULL && t->locus == t->next->locus)
|| strcmp (arg, "objective-c++") == 0
|| strcmp (arg, "objective-c++-cpp-output") == 0))
library = 1;
-
+
saw_speclang = 1;
break;
{
gcc_assert (!TYPE_HAS_COMPLEX_DFLT (type)
|| errorcount != 0);
-
+
if (TREE_CODE (type) != UNION_TYPE)
{
tree field;
if (current_function_decl != NULL_TREE
&& !DECL_DECLARED_CONSTEXPR_P (current_function_decl))
return alloc_call;
-
+
tree call_expr = extract_call_expr (alloc_call);
if (call_expr == error_mark_node)
return alloc_call;
/* This size won't actually be used. */
size_exp = size_one_node;
goto no_destructor;
- }
+ }
size_exp = size_in_bytes (type);
else if (explicit_init_p)
{
tree auto_node = make_auto ();
-
+
type = auto_node;
if (by_reference_p)
/* Add the reference now, so deduction doesn't lose
// synthetic ones.
int len_a = TREE_VEC_LENGTH (inner_a);
int len_b = TREE_VEC_LENGTH (inner_b);
-
+
for (int ix = 0, len = MAX (len_a, len_b); ix != len; ix++)
{
tree parm_a = NULL_TREE;
if (DECL_VIRTUAL_P (parm_a))
parm_a = NULL_TREE;
}
-
+
tree parm_b = NULL_TREE;
if (ix < len_b)
{
if (!same_type_p (TREE_TYPE (parm_a), TREE_TYPE (parm_b)))
return false;
}
- else
+ else
{
if (TEMPLATE_TYPE_PARAMETER_PACK (TREE_TYPE (parm_a))
!= TEMPLATE_TYPE_PARAMETER_PACK (TREE_TYPE (parm_b)))
c_common_finish ();
}
-ovl_op_info_t ovl_op_info[2][OVL_OP_MAX] =
+ovl_op_info_t ovl_op_info[2][OVL_OP_MAX] =
{
{
{NULL_TREE, NULL, NULL, ERROR_MARK, OVL_OP_ERROR_MARK, 0},
state = module_end;
goto header_unit;
}
-
+
if (type == CPP_PADDING || type == CPP_COMMENT)
break;
{
if (!RECORD_OR_UNION_CODE_P (TREE_CODE (t)))
return false;
-
+
auto *lt = (struct lang_type *) (ggc_internal_cleared_alloc
(sizeof (struct lang_type)));
TYPE_LANG_SPECIFIC (t) = lt;
::= <special-name>
::= [<module-name>] <source-name>
::= [<module-name>] <unnamed-type-name>
- ::= <local-source-name>
+ ::= <local-source-name>
::= F <source-name> # member-like constrained friend
<local-source-name> ::= L <source-name> <discriminator> */
C++0x extensions
<type> ::= RR <type> # rvalue reference-to
- <type> ::= Dt <expression> # decltype of an id-expression or
+ <type> ::= Dt <expression> # decltype of an id-expression or
# class member access
<type> ::= DT <expression> # decltype of an expression
<type> ::= Dn # decltype of nullptr
return;
}
else
- write_string (name);
+ write_string (name);
switch (code)
{
case CAST_EXPR:
write_type (TREE_TYPE (expr));
- if (list_length (TREE_OPERAND (expr, 0)) == 1)
+ if (list_length (TREE_OPERAND (expr, 0)) == 1)
write_expression (TREE_VALUE (TREE_OPERAND (expr, 0)));
else
{
c = new module_client (fd, fd);
}
}
-
+
}
break;
}
line = l;
errmsg = "reading";
}
-
+
close (fd);
}
}
public:
allocator *memory; /* Obtainer of memory. */
-
+
public:
bytes_out (allocator *memory)
: parent (), memory (memory)
if (unsigned pad = pos & (boundary - 1))
write (boundary - pad);
}
-
+
public:
char *write (unsigned count, bool exact = false)
{
uint32_t entry; /* 0 */
uint32_t phoff; /* 0 */
uint32_t shoff; /* Section Header Offset in file */
- uint32_t flags;
+ uint32_t flags;
uint16_t ehsize; /* ELROND Header SIZE -- sizeof (header) */
uint16_t phentsize; /* 0 */
uint16_t phnum; /* 0 */
}
#endif
grow (*data, length);
-#if MAPPED_READING
+#if MAPPED_READING
data->buffer = hdr.buffer + pos;
#else
if (::read (fd, data->buffer, data->size) != ssize_t (length))
EK_USING, /* A using declaration (at namespace scope). */
EK_NAMESPACE, /* A namespace. */
EK_REDIRECT, /* Redirect to a template_decl. */
- EK_EXPLICIT_HWM,
+ EK_EXPLICIT_HWM,
EK_BINDING = EK_EXPLICIT_HWM, /* Implicitly encoded. */
EK_FOR_BINDING, /* A decl being inserted for a binding. */
EK_INNER_DECL, /* A decl defined outside of its imported
private:
/* Placement of bit fields in discriminator. */
- enum disc_bits
+ enum disc_bits
{
DB_ZERO_BIT, /* Set to disambiguate identifier from flags */
DB_SPECIAL_BIT, /* First dep slot is special. */
gcc_checking_assert (I < 2 || !is_binding ());
return bool ((discriminator >> I) & 1);
}
-
+
public:
bool is_binding () const
{
private:
void add_deduction_guides (tree decl);
- public:
+ public:
void find_dependencies (module_state *);
bool finalize_dependencies ();
vec<depset *> connect ();
result.create (size);
stack.create (50);
}
- ~tarjan ()
+ ~tarjan ()
{
gcc_assert (!stack.length ());
stack.release ();
depset::entity_kind_name () const
{
/* Same order as entity_kind. */
- static const char *const names[] =
+ static const char *const names[] =
{"decl", "specialization", "partial", "using",
"namespace", "redirect", "binding"};
entity_kind kind = get_entity_kind ();
MK_local_friend, /* Found by CTX, index. */
MK_indirect_lwm = MK_enum,
-
+
/* Template specialization kinds below. These are all found via
primary template and specialization args. */
MK_template_mask = 0x10, /* A template specialization. */
public:
/* Serialize various definitions. */
bool read_definition (tree decl);
-
+
private:
bool is_matching_decl (tree existing, tree decl, bool is_typedef);
static bool install_implicit_member (tree decl);
void end ();
public:
- enum tags
+ enum tags
{
tag_backref = -1, /* Upper bound on the backrefs. */
tag_value = 0, /* Write by value. */
static bool is_deleted (value_type &) { return false; }
static void mark_deleted (value_type &) { gcc_unreachable (); }
-
+
static void remove (value_type &) {}
};
/* Table keyed by ord_loc_info, used for noting. */
static bool is_deleted (value_type &) { return false; }
static void mark_deleted (value_type &) { gcc_unreachable (); }
-
+
static void remove (value_type &) {}
};
/* Table keyed by line_map_macro, used for noting. */
if (TREE_CODE (decl) == TEMPLATE_DECL)
{
tree res_orig = DECL_CLONED_FUNCTION (DECL_TEMPLATE_RESULT (decl));
-
+
target = DECL_TI_TEMPLATE (res_orig);
}
else
size_t len = strlen (r);
cmi_repo = XNEWVEC (char, len + 1);
memcpy (cmi_repo, r, len + 1);
-
+
if (len > 1 && IS_DIR_SEPARATOR (cmi_repo[len-1]))
len--;
if (len == 1 && cmi_repo[0] == '.')
RB (t->function_decl.disregard_inline_limits);
RB (t->function_decl.pure_flag);
RB (t->function_decl.looping_const_or_pure_flag);
-
+
RB (t->function_decl.has_debug_args_flag);
RB (t->function_decl.versioned_function);
WT (((lang_tree_node *)t)->overload.function);
WT (t->common.chain);
break;
-
+
case PTRMEM_CST:
WT (((lang_tree_node *)t)->ptrmem.member);
break;
/* TEMPLATE_PARM_DESCENDANTS (AKA TREE_CHAIN) is an internal
cache, do not stream. */
break;
-
+
case TRAIT_EXPR:
WT (((lang_tree_node *)t)->trait_expression.type1);
WT (((lang_tree_node *)t)->trait_expression.type2);
RU (t->label_decl.label_decl_uid);
RU (t->label_decl.eh_landing_pad_nr);
break;
-
+
case FUNCTION_DECL:
{
unsigned bltin = u ();
trees_in::add_indirects (tree decl)
{
unsigned count = 0;
-
+
tree inner = decl;
if (TREE_CODE (inner) == TEMPLATE_DECL)
{
trees_out::install_entity (tree decl, depset *dep)
{
gcc_checking_assert (streaming_p ());
-
+
/* Write the entity index, so we can insert it as soon as we
know this is new. */
u (dep ? dep->cluster + 1 : 0);
unsigned saved_unused = unused;
unused = 0;
-
+
merge_kind mk = merge_kind (mk_u);
tree decl = start ();
if (!tree_node_bools (decl))
decl = NULL_TREE;
}
-
+
/* Insert into map. */
tag = insert (decl);
if (decl)
if (streaming_p ())
{
/* We know the ordering of the 4 id tags. */
- static const char *const kinds[] =
+ static const char *const kinds[] =
{"", "conv_op ", "anon ", "lambda "};
dump (dumper::TREE)
&& dump ("Written:%d %sidentifier:%N", tag,
existing = check_mergeable_decl
(mk, inner, existing, key);
-
+
if (!existing && DECL_ALIAS_TEMPLATE_P (decl))
{} // FIXME: Insert into specialization
// tables, we'll need the arguments for that!
{
// FIXME:QOI Check matching defn
}
-
+
return true;
}
friend_decls; friend_decls = TREE_CHAIN (friend_decls))
{
tree f = TREE_VALUE (friend_decls);
-
+
DECL_BEFRIENDING_CLASSES (f)
= tree_cons (NULL_TREE, type, DECL_BEFRIENDING_CLASSES (f));
dump () && dump ("Class %N befriending %C:%N",
if (DECL_NAME (known_decl) != DECL_NAME (new_decl))
break;
-
+
new_decl = maybe_duplicate (new_decl);
if (!cp_tree_equal (DECL_INITIAL (known_decl),
a_export = DECL_MODULE_EXPORT_P (TREE_CODE (a_ent) == CONST_DECL
? TYPE_NAME (TREE_TYPE (a_ent))
: STRIP_TEMPLATE (a_ent));
-
+
bool b_using = b->get_entity_kind () == depset::EK_USING;
bool b_export;
if (b_using)
if (a_kind != b_kind)
/* Different entity kinds, order by that. */
return a_kind < b_kind ? -1 : +1;
-
+
tree a_decl = a->get_entity ();
tree b_decl = b->get_entity ();
if (a_kind == depset::EK_USING)
interval.ordinary.first, interval.ordinary.second,
interval.macro.first, interval.macro.second);
spans->quick_push (interval);
-
+
/* Start an interval for the main file. */
interval.ordinary.first = interval.ordinary.second;
interval.macro.second = interval.macro.first;
{
if (parent)
parent->mangle (include_partition);
- if (include_partition || !is_partition ())
+ if (include_partition || !is_partition ())
{
// Partitions are significant for global initializer
// functions
dump () && dump ("Writing namespace:%u %N%s%s%s%s",
b->cluster, ns,
- flags & 1 ? ", public" : "",
+ flags & 1 ? ", public" : "",
flags & 2 ? ", inline" : "",
flags & 4 ? ", purview" : "",
flags & 8 ? ", export" : "");
dump () && dump ("Read namespace:%u %P%s%s%s%s",
entity_index, parent, id,
- flags & 1 ? ", public" : "",
+ flags & 1 ? ", public" : "",
flags & 2 ? ", inline" : "",
flags & 4 ? ", purview" : "",
flags & 8 ? ", export" : "");
}
added = true;
}
- }
+ }
}
else if (IS_ORDINARY_LOC (loc))
{
unsigned offset = 0, range_bits = 0;
ord_loc_info *base = nullptr;
for (auto iter = begin; iter != end; ++iter)
- {
+ {
if (base && iter->src == base->src)
{
if (base->offset + base->span +
spans.close ();
filenames.release ();
-
+
dump.outdent ();
if (!sec.end (from ()))
return false;
list = tls_aggregates;
}
-
+
sec.end (to, to->name (MOD_SNAME_PFX ".ini"), crc_ptr);
dump.outdent ();
post_load_processing ();
dump.outdent ();
if (!sec.end (from ()))
- return false;
+ return false;
return true;
}
return true;
}
-// Finish module writing after we've emitted all dynamic initializers.
+// Finish module writing after we've emitted all dynamic initializers.
void
module_state::write_end (elf_out *to, cpp_reader *reader,
ok = false;
function_depth--;
-
+
announce (flag_module_lazy ? "lazy" : "imported");
loadedness = ML_LANGUAGE;
slurp->lru = ++lazy_lru;
slurp->current = old_current;
}
-
+
if (mslot && mslot->is_lazy ())
{
/* Oops, the section didn't set this slot. */
dump () && dump ("Loading entity %M[%u] section:%u", this, index, snum);
bool ok = load_section (snum, mslot);
-
+
dump.pop (n);
return ok;
if (translate != xlate_kind::import)
return nullptr;
-
+
/* Create the translation text. */
loc = ordinary_loc_of (lmaps, loc);
const line_map_ordinary *map
if (modules_p ())
{
auto *cb = cpp_get_callbacks (reader);
-
+
cb->translate_include = maybe_translate_include;
cb->user_deferred_macro = module_state::deferred_macro;
if (flag_header_unit)
binding->previous = IDENTIFIER_BINDING (name);
IDENTIFIER_BINDING (name) = binding;
-
+
return binding;
}
if (TREE_CODE (*slot) != BINDING_VECTOR)
return NULL;
-
+
unsigned clusters = BINDING_VECTOR_NUM_CLUSTERS (*slot);
binding_cluster *cluster = BINDING_VECTOR_CLUSTER_BASE (*slot);
{
return LOOKUP_FOUND_P (scope);
}
-
+
void mark_seen (tree scope); /* Mark and add to scope vector. */
static void mark_found (tree scope)
{
if (seen_p (scope))
found = found_p (scope);
- else
+ else
{
found = search_namespace (scope);
if (!found && usings)
{
tree args = ARGUMENT_PACK_ARGS (arg);
int i, len = TREE_VEC_LENGTH (args);
- for (i = 0; i < len; ++i)
+ for (i = 0; i < len; ++i)
adl_template_arg (TREE_VEC_ELT (args, i));
}
/* It's not a template template argument, but it is a type template
name_lookup::search_adl (tree fns, vec<tree, va_gc> *args)
{
gcc_checking_assert (!vec_safe_length (scopes));
-
+
/* Gather each associated entity onto the lookup's scope list. */
unsigned ix;
tree arg;
(10.2) is visible if there is an associated entity
attached to M with the same innermost enclosing
non-inline namespace as D.
- [basic.lookup.argdep]/4.4 */
+ [basic.lookup.argdep]/4.4 */
if (!inst_path)
/* Not 2nd phase. */
if (DECL_NAME (decl) != name)
continue;
-
+
if (TREE_CODE (decl) == USING_DECL)
{
decl = strip_using_decl (decl);
some erroneous cases get though. */
gcc_assert (errorcount);
}
-
+
/* Using source location would be the best thing here, but we can
get identically-located decls in the following circumstances:
/* We have found a type introduced by a using
declaration at class scope that refers to a dependent
type.
-
+
using typename :: [opt] nested-name-specifier unqualified-id ;
*/
decl = make_typename_type (USING_DECL_SCOPE (decl),
return;
}
-
+
/* We handle these in check_explicit_instantiation_namespace. */
if (processing_explicit_instantiation)
return;
order. So, iterate over the namespace hash, inserting
visible names into a vector. Then sort the vector. Then
determine spelling distance. */
-
+
tree ns = lvl->this_entity;
auto_vec<tree> vec;
else
maybe_add_fuzzy_binding (vec, binding, kind);
}
-
+
vec.qsort ([] (const void *a_, const void *b_)
{
return strcmp (IDENTIFIER_POINTER (*(const tree *)a_),
/* Ignore internal names with spaces in them. */
if (strchr (str, ' '))
continue;
-
+
/* Don't suggest names that are reserved for use by the
implementation, unless NAME began with an underscore. */
if (!consider_implementation_names
if (how != TAG_how::HIDDEN_FRIEND)
/* No longer hidden. */
STAT_TYPE_HIDDEN_P (*slot) = false;
-
+
return type;
}
else if (tree decl = strip_using_decl (MAYBE_STAT_DECL (bind)))
create that namespace and add it to the container's binding-vector. */
tree
-add_imported_namespace (tree ctx, tree name, location_t loc, unsigned import,
+add_imported_namespace (tree ctx, tree name, location_t loc, unsigned import,
bool inline_p, bool visible_p)
{
// FIXME: Something is not correct about the VISIBLE_P handling. We
if (TREE_CODE (fn) == TEMPLATE_DECL)
/* FIXME: Handle TEMPLATE_DECLs. */
continue;
-
+
/* Ignore this FUNCTION_DECL if it refers to a builtin declaration
of a builtin function. */
if (TREE_CODE (fn) == FUNCTION_DECL
don't accidentally mix integers. */
enum class LOOK_where
{
- BLOCK = 1 << 0, /* Consider block scopes. */
- CLASS = 1 << 1, /* Consider class scopes. */
- NAMESPACE = 1 << 2, /* Consider namespace scopes. */
+ BLOCK = 1 << 0, /* Consider block scopes. */
+ CLASS = 1 << 1, /* Consider class scopes. */
+ NAMESPACE = 1 << 2, /* Consider namespace scopes. */
ALL = BLOCK | CLASS | NAMESPACE,
BLOCK_NAMESPACE = BLOCK | NAMESPACE,
clone = fns[idx];
if (!clone)
- continue;
+ continue;
/* Update CLONE's source position information to match FN's. */
DECL_SOURCE_LOCATION (clone) = DECL_SOURCE_LOCATION (fn);
/* If this type was already complete, and we see another definition,
that's an error. Likewise if the type is already being defined:
- this can happen, eg, when it's defined from within an expression
+ this can happen, eg, when it's defined from within an expression
(c++/84605). */
if (type != error_mark_node
&& (COMPLETE_TYPE_P (type) || TYPE_BEING_DEFINED (type)))
use a qualified name.
Parse with an empty set of declaration specifiers since we're
- trying to match a decl-specifier-seq of the first parameter.
+ trying to match a decl-specifier-seq of the first parameter.
This must be non-null so that cp_parser_simple_type_specifier
will recognize a constrained placeholder type such as:
'C<int> auto' where C is a type concept. */
parser->lexer);
cast = build_functional_cast (combined_loc, type, expression_list,
tf_warning_or_error);
-
+
/* [expr.const]/1: In an integral constant expression "only type
conversions to integral or enumeration type can be used". */
if (TREE_CODE (type) == TYPE_DECL)
class initializer. In this case, the TREE_PURPOSE will be a
_TYPE node (representing the base class expansion we're
initializing) and the TREE_VALUE will be a TREE_LIST
- containing the initialization arguments.
+ containing the initialization arguments.
The resulting expansion looks somewhat different from most
expansions. Rather than returning just one _EXPANSION, we
{
/* Determine which parameter packs will be expanded in this
argument. */
- cp_walk_tree (&TREE_VALUE (value), &find_parameter_packs_r,
+ cp_walk_tree (&TREE_VALUE (value), &find_parameter_packs_r,
&ppd, ppd.visited);
}
}
if (PACK_EXPANSION_P (BINFO_TYPE (pbase_binfo)))
{
- expanded_bases =
+ expanded_bases =
tsubst_pack_expansion (BINFO_TYPE (pbase_binfo),
args, tf_error, NULL_TREE);
if (expanded_bases == error_mark_node)
base = TREE_VEC_ELT (expanded_bases, idx);
else
/* Substitute to figure out the base class. */
- base = tsubst (BINFO_TYPE (pbase_binfo), args, tf_error,
+ base = tsubst (BINFO_TYPE (pbase_binfo), args, tf_error,
NULL_TREE);
if (base == error_mark_node)
/* friend class C<T>; */
friend_type = tsubst (friend_type, args,
tf_warning_or_error, NULL_TREE);
-
+
/* Otherwise it's
friend class C;
if (arg_pack)
{
- int my_len =
+ int my_len =
TREE_VEC_LENGTH (ARGUMENT_PACK_ARGS (arg_pack));
/* Don't bother trying to do a partial substitution with
return the local specialization (which will be a single
parm). */
tree spec = retrieve_local_specialization (t);
- if (spec
+ if (spec
&& TREE_CODE (spec) == PARM_DECL
&& TREE_CODE (TREE_TYPE (spec)) != TYPE_PACK_EXPANSION)
RETURN (spec);
spec = tsubst (TREE_VALUE (specs), args, complain, in_decl);
if (spec == error_mark_node)
return spec;
- new_specs = add_exception_specifier (new_specs, spec,
+ new_specs = add_exception_specifier (new_specs, spec,
complain);
}
TREE_VEC_ELT (rhs, 1) = RECUR (TREE_VEC_ELT (rhs, 1));
TREE_VEC_ELT (rhs, 2) = RECUR (TREE_VEC_ELT (rhs, 2));
cond = build2 (TREE_CODE (cond), TREE_TYPE (cond),
- lhs, rhs);
+ lhs, rhs);
}
else
cond = RECUR (cond);
int idx, level;
template_parm_level_and_index (TREE_PURPOSE (pack), &level, &idx);
- TREE_VEC_ELT (TREE_TYPE (pack), i - start) =
+ TREE_VEC_ELT (TREE_TYPE (pack), i - start) =
TMPL_ARG (targs, level, idx);
}
}
TMPL_ARG (targs, level, idx) = result;
}
else if (ARGUMENT_PACK_INCOMPLETE_P (old_pack)
- && (ARGUMENT_PACK_ARGS (old_pack)
+ && (ARGUMENT_PACK_ARGS (old_pack)
== ARGUMENT_PACK_EXPLICIT_ARGS (old_pack)))
{
/* We only had the explicitly-provided arguments before, but
(void *) DECL_PENDING_INLINE_INFO (node));
need_indent = false;
}
-
+
if ((VAR_OR_FUNCTION_DECL_P (node)
|| TREE_CODE (node) == FIELD_DECL
|| TREE_CODE (node) == TYPE_DECL
NULL_TREE, integer_type_node);
DECL_CHAIN (fld_flg) = fields;
fields = fld_flg;
-
+
tree fld_cnt = build_decl (BUILTINS_LOCATION, FIELD_DECL,
NULL_TREE, integer_type_node);
DECL_CHAIN (fld_cnt) = fields;
comdat_linkage for details.) Since we want these objects
to have external linkage so that copies do not have to be
emitted in code outside the runtime library, we make them
- non-COMDAT here.
+ non-COMDAT here.
It might also not be necessary to follow this detail of the
ABI. */
/* [class.access]
In the case of overloaded function names, access control is
- applied to the function selected by overloaded resolution.
+ applied to the function selected by overloaded resolution.
We cannot check here, even if RVAL is only a single non-static
member function, since we do not know what the "this" pointer
will be. For:
class A { protected: void f(); };
- class B : public A {
+ class B : public A {
void g(A *p) {
f(); // OK
p->f(); // Not OK.
lookup_conversions_r (TYPE_BINFO (type), 0, 0, NULL_TREE, NULL_TREE, &convs);
tree list = NULL_TREE;
-
+
/* Flatten the list-of-lists */
for (; convs; convs = TREE_CHAIN (convs))
{
if (fn && template_id && fn != error_mark_node)
fn = build2 (TEMPLATE_ID_EXPR, unknown_type_node, fn, tmpl_args);
-
+
return cp_expr (fn, loc);
}
&& OMP_CLAUSE_CODE (c) != OMP_CLAUSE_SHARED
&& DECL_P (t))
bitmap_clear_bit (&aligned_head, DECL_UID (t));
-
+
if (VAR_P (t) && CP_DECL_THREAD_LOCAL_P (t))
share_name = "threadprivate";
else switch (cxx_omp_predetermined_sharing_1 (t))
if (!NON_UNION_CLASS_TYPE_P (base)
|| !NON_UNION_CLASS_TYPE_P (derived))
return false;
-
+
if (same_type_p (base, derived))
return true;
if (cplus_array_htab == NULL)
cplus_array_htab = hash_table<cplus_array_hasher>::create_ggc (61);
-
+
hash = TYPE_UID (elt_type);
if (index_type)
hash ^= TYPE_UID (index_type);
cai.type = elt_type;
cai.domain = index_type;
- tree *e = cplus_array_htab->find_slot_with_hash (&cai, hash, INSERT);
+ tree *e = cplus_array_htab->find_slot_with_hash (&cai, hash, INSERT);
if (*e)
/* We have found the type: we're done. */
return (tree) *e;
if (TYPE_STRUCTURAL_EQUALITY_P (to_type))
SET_TYPE_STRUCTURAL_EQUALITY (t);
else if (TYPE_CANONICAL (to_type) != to_type)
- TYPE_CANONICAL (t)
+ TYPE_CANONICAL (t)
= cp_build_reference_type_for_mode (TYPE_CANONICAL (to_type), mode, rval);
else
TYPE_CANONICAL (t) = t;
return overload;
}
-/* NODE is on the overloads of OVL. Remove it.
+/* NODE is on the overloads of OVL. Remove it.
The removed node is unaltered and may continue to be iterated
from (i.e. it is safe to remove a node from an overload one is
currently iterating over). */
overloaded functions. Returns 2 if the function is actually
overloaded, i.e., if it is impossible to know the type of the
function without performing overload resolution. */
-
+
int
is_overloaded_fn (tree x)
{
/* Making a new main variant of a class type is broken. */
gcc_assert (!CLASS_TYPE_P (type) || new_type == type);
-
+
return new_type;
}
WALK_SUBTREE (PACK_EXPANSION_EXTRA_ARGS (t));
*walk_subtrees_p = 0;
break;
-
+
case EXPR_PACK_EXPANSION:
WALK_SUBTREE (TREE_OPERAND (t, 0));
WALK_SUBTREE (PACK_EXPANSION_EXTRA_ARGS (t));
*initp = inits;
}
-/* Like stabilize_expr, but for an initialization.
+/* Like stabilize_expr, but for an initialization.
If the initialization is for an object of class type, this function
takes care not to introduce additional temporaries.
tsubst_flags_t, int);
static tree cp_pointer_int_sum (location_t, enum tree_code, tree, tree,
tsubst_flags_t);
-static tree rationalize_conditional_expr (enum tree_code, tree,
+static tree rationalize_conditional_expr (enum tree_code, tree,
tsubst_flags_t);
static bool comp_ptr_ttypes_real (tree, tree, int);
static bool comp_except_types (tree, tree, bool);
else if (CLASS_TYPE_P (type))
{
if (modules_p ())
- /* TYPE could be a class member we've not loaded the definition of. */
+ /* TYPE could be a class member we've not loaded the definition of. */
lazy_load_pendings (TYPE_NAME (TYPE_MAIN_VARIANT (type)));
if (CLASSTYPE_TEMPLATE_INSTANTIATION (type))
tree
composite_pointer_type (const op_location_t &location,
tree t1, tree t2, tree arg1, tree arg2,
- composite_pointer_operation operation,
+ composite_pointer_operation operation,
tsubst_flags_t complain)
{
tree class1;
switch (operation)
{
case CPO_COMPARISON:
- pedwarn (location, OPT_Wpedantic,
+ pedwarn (location, OPT_Wpedantic,
"ISO C++ forbids comparison between pointer "
"of type %<void *%> and pointer-to-function");
break;
}
/* Wrapper around cp_common_type that is used by c-common.cc and other
- front end optimizations that remove promotions.
+ front end optimizations that remove promotions.
Return the common type for two arithmetic types T1 and T2 under the
usual arithmetic conversions. The default conversions have already
/* Return the common type of two pointer types T1 and T2. This is the
type for the result of most arithmetic operations if the operands
have the given two types.
-
+
We assume that comp_target_types has already been done and returned
nonzero; if that isn't so, this may crash. */
if (flag_checking && param_use_canonical_types)
{
bool result = structural_comptypes (t1, t2, strict);
-
+
if (result && TYPE_CANONICAL (t1) != TYPE_CANONICAL (t2))
/* The two types are structurally equivalent, but their
canonical types were different. This is a failure of the
canonical type propagation code.*/
- internal_error
+ internal_error
("canonical types differ for identical types %qT and %qT",
t1, t2);
else if (!result && TYPE_CANONICAL (t1) == TYPE_CANONICAL (t2))
/* Two types are structurally different, but the canonical
types are the same. This means we were over-eager in
assigning canonical types. */
- internal_error
+ internal_error
("same canonical type node for different types %qT and %qT",
t1, t2);
-
+
return result;
}
if (!flag_checking && param_use_canonical_types)
constant expression in that case. And, if we do try to
compute the value, we'll likely end up with SAVE_EXPRs, which
the template substitution machinery does not expect to see. */
- || (processing_template_decl
+ || (processing_template_decl
&& COMPLETE_TYPE_P (type)
&& TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST))
{
types whose size cannot be taken. This routine should be used only
in some other routine that has already produced a diagnostic about
using the size of such a type. */
-tree
+tree
cxx_sizeof_nowarn (tree type)
{
if (TREE_CODE (type) == FUNCTION_TYPE
if (e == NULL_TREE || e == error_mark_node
|| (!TYPE_P (e) && !require_potential_rvalue_constant_expression (e)))
return e;
-
+
if (TYPE_P (e))
/* [dcl.align]/3:
-
+
When the alignment-specifier is of the form
alignas(type-id), it shall have the same effect as
alignas(alignof(type-id)). */
e, ALIGNOF_EXPR,
/*std_alignof=*/true,
/*complain=*/true);
-
+
/* If we reach this point, it means the alignas expression if of
the form "alignas(assignment-expression)", so we should follow
what is stated by [dcl.align]/2. */
error ("%<alignas%> argument has non-integral type %qT", TREE_TYPE (e));
return error_mark_node;
}
-
+
return cxx_constant_value (e);
}
case COMPONENT_REF:
{
tree field;
-
+
field = TREE_OPERAND (exp, 1);
if (TREE_CODE (field) != FIELD_DECL || !DECL_BIT_FIELD_TYPE (field))
return NULL_TREE;
object_type, dtor_type);
return error_mark_node;
}
-
+
}
else if (!DERIVED_FROM_P (dtor_type, TYPE_MAIN_VARIANT (object_type)))
{
&& identifier_p (name)
&& (expr = objc_maybe_build_component_ref (object, name)))
return expr;
-
+
/* [expr.ref]
The type of the first expression shall be "class object" (of a
return error_mark_node;
}
}
-
+
if (TREE_CODE (name) == TEMPLATE_ID_EXPR)
{
is_template_id = true;
Must also handle REFERENCE_TYPEs for C++. */
tree
-build_x_indirect_ref (location_t loc, tree expr, ref_operator errorstring,
+build_x_indirect_ref (location_t loc, tree expr, ref_operator errorstring,
tree lookups, tsubst_flags_t complain)
{
tree orig_expr = expr;
/* Used by the C-common bits. */
tree
-build_function_call (location_t /*loc*/,
+build_function_call (location_t /*loc*/,
tree function, tree params)
{
return cp_build_function_call (function, params, tf_warning_or_error);
if (DECL_MAIN_P (function))
{
if (complain & tf_error)
- pedwarn (input_location, OPT_Wpedantic,
+ pedwarn (input_location, OPT_Wpedantic,
"ISO C++ forbids calling %<::main%> from within program");
else
return error_mark_node;
else if (DECL_P (original))
error_at (input_location,
"%qD cannot be used as a function", original);
- else
+ else
error_at (input_location,
"expression cannot be used as a function");
}
{
if (c_dialect_objc () && objc_message_selector ())
error_at (loc,
- too_many_p
+ too_many_p
? G_("too many arguments to method %q#D")
: G_("too few arguments to method %q#D"),
objc_message_selector ());
if ((null_node_p (orig_op0) || null_node_p (orig_op1))
/* It's reasonable to use pointer values as operands of &&
and ||, so NULL is no exception. */
- && code != TRUTH_ANDIF_EXPR && code != TRUTH_ORIF_EXPR
+ && code != TRUTH_ANDIF_EXPR && code != TRUTH_ORIF_EXPR
&& ( /* Both are NULL (or 0) and the operation was not a
comparison or a pointer subtraction. */
- (null_ptr_cst_p (orig_op0) && null_ptr_cst_p (orig_op1)
- && code != EQ_EXPR && code != NE_EXPR && code != MINUS_EXPR)
+ (null_ptr_cst_p (orig_op0) && null_ptr_cst_p (orig_op1)
+ && code != EQ_EXPR && code != NE_EXPR && code != MINUS_EXPR)
/* Or if one of OP0 or OP1 is neither a pointer nor NULL. */
|| (!null_ptr_cst_p (orig_op0)
&& !TYPE_PTR_OR_PTRMEM_P (type0))
- || (!null_ptr_cst_p (orig_op1)
+ || (!null_ptr_cst_p (orig_op1)
&& !TYPE_PTR_OR_PTRMEM_P (type1)))
&& (complain & tf_warning))
{
complain);
op1 = cp_convert (TREE_TYPE (op0), integer_one_node, complain);
}
- else
+ else
{
op0 = build_ptrmemfunc_access_expr (op0, pfn_identifier);
op1 = cp_convert (TREE_TYPE (op0), op1, complain);
tree delta0;
tree delta1;
- type = composite_pointer_type (location, type0, type1, op0, op1,
+ type = composite_pointer_type (location, type0, type1, op0, op1,
CPO_COMPARISON, complain);
if (!same_type_p (TREE_TYPE (op0), type))
(op0.pfn == op1.pfn
&& ((op0.delta == op1.delta)
- || (!op0.pfn && op0.delta & 1 == 0
+ || (!op0.pfn && op0.delta & 1 == 0
&& op1.delta & 1 == 0))
The reason for the `!op0.pfn' bit is that a NULL
LSB of the DELTA field is 0. */
e1 = cp_build_binary_op (location, BIT_AND_EXPR,
- delta0,
+ delta0,
integer_one_node,
complain);
e1 = cp_build_binary_op (location,
The reason for the `!op0.pfn' bit is that a NULL
pointer-to-member is any member with a zero PFN; the
DELTA field is unspecified. */
-
+
e1 = cp_build_binary_op (location,
EQ_EXPR, delta0, delta1, complain);
e2 = cp_build_binary_op (location,
/* Report something read-only. */
if (CP_TYPE_CONST_P (TREE_TYPE (arg))
- || TREE_READONLY (arg))
+ || TREE_READONLY (arg))
{
if (complain & tf_error)
cxx_readonly_error (location, arg,
else
return error_mark_node;
}
- else if (!TYPE_PTROB_P (argtype))
+ else if (!TYPE_PTROB_P (argtype))
{
if (complain & tf_error)
pedwarn (location, OPT_Wpointer_arith,
need to ask Objective-C to build the increment or decrement
expression for it. */
if (objc_is_property_ref (arg))
- return objc_build_incr_expr_for_property_ref (input_location, code,
- arg, inc);
+ return objc_build_incr_expr_for_property_ref (input_location, code,
+ arg, inc);
/* Complain about anything else that is not a true lvalue. */
if (!lvalue_or_else (arg, ((code == PREINCREMENT_EXPR
/* Build and return a conditional expression IFEXP ? OP1 : OP2. */
tree
-build_x_conditional_expr (location_t loc, tree ifexp, tree op1, tree op2,
+build_x_conditional_expr (location_t loc, tree ifexp, tree op1, tree op2,
tsubst_flags_t complain)
{
tree orig_ifexp = ifexp;
WARN_CAST_QUAL, we still want to issue a warning. */
if (cast == CAST_EXPR && !warn_cast_qual)
return false;
-
+
if (!casts_away_constness (src_type, dest_type, complain))
return false;
&& TYPE_PRECISION (type) > TYPE_PRECISION (TREE_TYPE (value))
/* Don't warn about converting any constant. */
&& !TREE_CONSTANT (value))
- warning_at (loc, OPT_Wint_to_pointer_cast,
+ warning_at (loc, OPT_Wint_to_pointer_cast,
"cast to pointer from integer of different size");
/* A C-style cast can be a const_cast. */
tree
build_modify_expr (location_t location,
tree lhs, tree /*lhs_origtype*/,
- enum tree_code modifycode,
+ enum tree_code modifycode,
location_t /*rhs_location*/, tree rhs,
tree /*rhs_origtype*/)
{
/* Helper function for get_delta_difference which assumes FROM is a base
class of TO. Returns a delta for the conversion of pointer-to-member
- of FROM to pointer-to-member of TO. If the conversion is invalid and
+ of FROM to pointer-to-member of TO. If the conversion is invalid and
tf_error is not set in COMPLAIN returns error_mark_node, otherwise
returns zero. If FROM is not a base class of TO, returns NULL_TREE.
- If C_CAST_P is true, this conversion is taking place as part of a
+ If C_CAST_P is true, this conversion is taking place as part of a
C-style cast. */
static tree
}
/* Returns nonzero if casting from TYPE1 to TYPE2 casts away
- constness.
+ constness.
??? This function returns non-zero if casting away qualifiers not
just const. We would like to return to the caller exactly which
void
cxx_readonly_error (location_t loc, tree arg, enum lvalue_use errstring)
{
-
+
/* This macro is used to emit diagnostics to ensure that all format
strings are complete sentences, visible to gettext and checked at
compile time. */
-
+
#define ERROR_FOR_ASSIGNMENT(LOC, AS, ASM, IN, DE, ARG) \
do { \
switch (errstring) \
/* This provides a better instantiation backtrace in case of
error. */
if (fn && DECL_USE_TEMPLATE (fn))
- push_tinst_level_loc (fn,
+ push_tinst_level_loc (fn,
(current_instantiation () != actual_inst)
? DECL_SOURCE_LOCATION (fn)
: input_location);
{
tree result = build_functional_cast_1 (loc, exp, parms, complain);
protected_set_expr_location (result, loc);
- return result;
+ return result;
}
\f
vec<constructor_elt, va_gc> *array_elements;
vec_alloc (array_elements, num_args);
-
+
tree initial = NULL_TREE;
tree arg3 = NULL_TREE;
else
call_expr = build_call_expr (vlt_register_pairs_fndecl, 4, arg1, arg2,
size_hint_arg, vtable_address);
-
+
append_to_statement_list (call_expr, &body);
num_calls_to_regpair++;
}
{
const char *vptr_name = "unknown";
int vptr_offset = 0;
-
+
if (TREE_CODE (vtbl_ptr_array[i]) == POINTER_PLUS_EXPR)
{
tree arg0 = TREE_OPERAND (vtbl_ptr_array[i], 0);
vtv_register_class_hierarchy_information (tree init_routine_body)
{
bool registered_something = false;
-
+
init_functions ();
if (num_vtable_map_nodes == 0)
The main function is cse_insn, and between here and that function
a couple of helper functions is defined to keep the size of cse_insn
within reasonable proportions.
-
+
Data is shared between the main and helper functions via STRUCT SET,
that contains all data related for every set in the instruction that
is being processed.
-
+
Note that cse_main processes all sets in the instruction. Most
passes in GCC only process simple SET insns or single_set insns, but
CSE processes insns with multiple sets as well. */
Do not make this change if REG1 is a hard register, because it will
then be used in the sequel and we may be changing a two-operand insn
into a three-operand insn.
-
+
This is the last transformation that cse_insn will try to do. */
static void
/* Return index used to reference STRING of LEN characters in the string table
in OB. The string might or might not include a trailing '\0'.
- Then put the index onto the INDEX_STREAM.
+ Then put the index onto the INDEX_STREAM.
When PERSISTENT is set, the string S is supposed to not change during
duration of the OB and thus OB can keep pointer into it. */
/* Output STRING of LEN characters to the string table in OB. The
string might or might not include a trailing '\0'. Then put the
- index onto the INDEX_STREAM.
+ index onto the INDEX_STREAM.
When PERSISTENT is set, the string S is supposed to not change during
duration of the OB and thus OB can keep pointer into it. */
switch to the next one. */
if (pos + nbits > BITS_PER_BITPACK_WORD)
{
- bp->word = val
+ bp->word = val
= streamer_read_uhwi ((class lto_input_block *)bp->stream);
bp->pos = nbits;
return val & mask;
the kernel has only one def of the relevant register).
If the address that is being auto-inc or auto-dec in DEST_NODE
is used in SRC_NODE then do not remove the edge to make sure
- reg-moves will not be created for this address.
+ reg-moves will not be created for this address.
TODO: support the removal of all anti-deps edges, i.e. including those
whose register has multiple defs in the loop. */
- if (flag_modulo_sched_allow_regmoves
+ if (flag_modulo_sched_allow_regmoves
&& (t == ANTI_DEP && dt == REG_DEP)
&& !def_has_ccmode_p (dest_node->insn)
&& !autoinc_var_is_used_p (dest_node->insn, src_node->insn))
BBINDEX_TO_POSTORDER is array mapping back BB->index to postorder position.
PENDING will be freed.
- The worklists are bitmaps indexed by postorder positions.
+ The worklists are bitmaps indexed by postorder positions.
The function implements standard algorithm for dataflow solving with two
worklists (we are processing WORKLIST and storing new BBs to visit in
EXECUTE_IF_SET_IN_BITMAP (all_blocks, 0, bb_index, bi)
{
class df_rd_bb_info *bb_info = df_rd_get_bb_info (bb_index);
-
+
/* When bitmaps are already initialized, just clear them. */
if (bb_info->kill.obstack)
{
EXECUTE_IF_SET_IN_BITMAP (df_lr->out_of_date_transfer_functions, 0, bb_index, bi)
{
class df_lr_bb_info *bb_info = df_lr_get_bb_info (bb_index);
-
+
/* When bitmaps are already initialized, just clear them. */
if (bb_info->use.obstack)
{
if (!df)
return;
- bitmap_initialize (&saved_def, &bitmap_default_obstack);
+ bitmap_initialize (&saved_def, &bitmap_default_obstack);
bitmap_initialize (&saved_use, &bitmap_default_obstack);
bitmap_initialize (&all_blocks, &bitmap_default_obstack);
EXECUTE_IF_SET_IN_BITMAP (df_live->out_of_date_transfer_functions, 0, bb_index, bi)
{
class df_live_bb_info *bb_info = df_live_get_bb_info (bb_index);
-
+
/* When bitmaps are already initialized, just clear them. */
if (bb_info->kill.obstack)
{
EXECUTE_IF_SET_IN_BITMAP (df_word_lr->out_of_date_transfer_functions, 0, bb_index, bi)
{
class df_word_lr_bb_info *bb_info = df_word_lr_get_bb_info (bb_index);
-
+
/* When bitmaps are already initialized, just clear them. */
if (bb_info->use.obstack)
{
Return true if BB input data has changed. */
typedef bool (*df_confluence_function_n) (edge);
-/* Transfer function for blocks.
+/* Transfer function for blocks.
Return true if BB output data has changed. */
typedef bool (*df_transfer_function) (int);
/* Don't print trace for locations that are reserved or from
within a system header. */
const line_map_ordinary *m = NULL;
- location_t l =
+ location_t l =
linemap_resolve_location (line_table, resolved_def_loc,
LRK_SPELLING_LOCATION, &m);
location_t l0 = l;
l0 = get_location_from_adhoc_loc (line_table, l0);
if (l0 < RESERVED_LOCATION_COUNT || LINEMAP_SYSP (m))
continue;
-
+
/* We need to print the context of the macro definition only
when the locus of the first displayed diagnostic (displayed
before this trace) was inside the definition of the
diagnostic_set_caret_max_width (diagnostic_context *context, int value)
{
/* One minus to account for the leading empty space. */
- value = value ? value - 1
+ value = value ? value - 1
: (isatty (fileno (pp_buffer (context->m_printer)->m_stream))
? get_terminal_width () - 1 : INT_MAX);
-
- if (value <= 0)
+
+ if (value <= 0)
value = INT_MAX;
context->m_source_printing.max_width = value;
|| diagnostic_count (DK_SORRY) > 0)
&& !m_abort_on_error)
{
- expanded_location s
+ expanded_location s
= expand_location (diagnostic_location (diagnostic));
fnotice (stderr, "%s:%d: confused by earlier errors, bailing out\n",
s.file, s.line);
/* Returns the list of basic blocks immediately dominated by BB, in the
direction DIR. */
-auto_vec<basic_block>
+auto_vec<basic_block>
get_dominated_by (enum cdi_direction dir, basic_block bb)
{
unsigned int dir_index = dom_convert_dir_to_idx (dir);
direction DIR) by some block between N_REGION ones stored in REGION,
except for blocks in the REGION itself. */
-auto_vec<basic_block>
+auto_vec<basic_block>
get_dominated_by_region (enum cdi_direction dir, basic_block *region,
unsigned n_region)
{
produce a vector containing all dominated blocks. The vector will be sorted
in preorder. */
-auto_vec<basic_block>
+auto_vec<basic_block>
get_dominated_to_depth (enum cdi_direction dir, basic_block bb, int depth)
{
auto_vec<basic_block> bbs;
/* Returns the list of basic blocks including BB dominated by BB, in the
direction DIR. The vector will be sorted in preorder. */
-auto_vec<basic_block>
+auto_vec<basic_block>
get_all_dominated_blocks (enum cdi_direction dir, basic_block bb)
{
return get_dominated_to_depth (dir, bb, 0);
a.low |= HOST_WIDE_INT_1U << bitpos;
else
a.high |= HOST_WIDE_INT_1 << (bitpos - HOST_BITS_PER_WIDE_INT);
-
+
return a;
}
{
/* (null), LANG, TREE, RTL, IPA. */
char suffix = " ltri"[dfi->dkind];
-
+
if (snprintf (dump_id, sizeof (dump_id), ".%03d%c", dfi->num, suffix) < 0)
dump_id[0] = '\0';
}
const unsigned int dnum = DWARF_FRAME_REGNUM (regno);
const unsigned int rnum = DWARF2_FRAME_REG_OUT (dnum, 1);
const unsigned int dcol = DWARF_REG_TO_UNWIND_COLUMN (rnum);
-
+
poly_int64 slotoffset = dcol * GET_MODE_SIZE (slotmode);
poly_int64 regsize = GET_MODE_SIZE (regmode);
cur_row->cfa.offset += delta;
}
-
+
maybe_record_trace_start (start, origin);
cur_trace->end_true_args_size = save_args_size;
start of the trace, we can wind up increasing the
size of the unwind info due to extra advance opcodes.
Instead, put the remember immediately before the next
- state change. We know there must be one, because the
+ state change. We know there must be one, because the
state at the beginning and head of the trace differ. */
add_cfi_insn = before_next_cfi_note (prev_ti->head);
cfi = new_cfi ();
return a->v.val_file == b->v.val_file;
case dw_val_class_decl_ref:
return a->v.val_decl_ref == b->v.val_decl_ref;
-
+
case dw_val_class_const_double:
return (a->v.val_double.high == b->v.val_double.high
&& a->v.val_double.low == b->v.val_double.low);
unsigned r = val1->v.val_unsigned;
if (for_eh_or_skip >= 0)
r = DWARF2_FRAME_REG_OUT (r, for_eh_or_skip);
- gcc_assert (size_of_uleb128 (r)
+ gcc_assert (size_of_uleb128 (r)
== size_of_uleb128 (val1->v.val_unsigned));
- dw2_asm_output_data_uleb128 (r, NULL);
+ dw2_asm_output_data_uleb128 (r, NULL);
}
break;
case DW_OP_fbreg:
unsigned r = val1->v.val_unsigned;
if (for_eh_or_skip >= 0)
r = DWARF2_FRAME_REG_OUT (r, for_eh_or_skip);
- gcc_assert (size_of_uleb128 (r)
+ gcc_assert (size_of_uleb128 (r)
== size_of_uleb128 (val1->v.val_unsigned));
- dw2_asm_output_data_uleb128 (r, NULL);
+ dw2_asm_output_data_uleb128 (r, NULL);
dw2_asm_output_data_sleb128 (val2->v.val_int, NULL);
}
break;
}
}
-/* Output a sequence of location operations.
+/* Output a sequence of location operations.
The for_eh_or_skip parameter controls whether register numbers are
converted using DWARF2_FRAME_REG_OUT, which is needed in the case that
hard reg numbers have been processed via DWARF_FRAME_REGNUM (i.e. for unwind
{
enum dwarf_location_atom opc = loc->dw_loc_opc;
/* Output the opcode. */
- if (for_eh_or_skip >= 0
+ if (for_eh_or_skip >= 0
&& opc >= DW_OP_breg0 && opc <= DW_OP_breg31)
{
unsigned r = (opc - DW_OP_breg0);
gcc_assert (r <= 31);
opc = (enum dwarf_location_atom) (DW_OP_breg0 + r);
}
- else if (for_eh_or_skip >= 0
+ else if (for_eh_or_skip >= 0
&& opc >= DW_OP_reg0 && opc <= DW_OP_reg31)
{
unsigned r = (opc - DW_OP_reg0);
case DW_OP_regx:
{
unsigned r = DWARF2_FRAME_REG_OUT (val1->v.val_unsigned, 1);
- gcc_assert (size_of_uleb128 (r)
+ gcc_assert (size_of_uleb128 (r)
== size_of_uleb128 (val1->v.val_unsigned));
fputc (',', asm_out_file);
dw2_asm_output_data_uleb128_raw (r);
}
break;
-
+
case DW_OP_constu:
case DW_OP_plus_uconst:
case DW_OP_piece:
case DW_OP_bregx:
{
unsigned r = DWARF2_FRAME_REG_OUT (val1->v.val_unsigned, 1);
- gcc_assert (size_of_uleb128 (r)
+ gcc_assert (size_of_uleb128 (r)
== size_of_uleb128 (val1->v.val_unsigned));
fputc (',', asm_out_file);
dw2_asm_output_data_uleb128_raw (r);
{
typedef const_tree compare_type;
-
+
static hashval_t hash (cached_dw_loc_list *);
static bool equal (cached_dw_loc_list *, const_tree);
};
}
/* Create and return a new die with TAG_VALUE as tag. */
-
+
dw_die_ref
new_die_raw (enum dwarf_tag tag_value)
{
}
static dw_die_ref maybe_create_die_with_external_ref (tree);
-struct GTY(()) sym_off_pair
+struct GTY(()) sym_off_pair
{
const char * GTY((skip)) sym;
unsigned HOST_WIDE_INT off;
{
unsigned i;
unsigned long aranges_length = size_of_aranges ();
-
+
if (!XCOFF_DEBUGGING_INFO)
{
if (DWARF_INITIAL_LENGTH_SIZE - dwarf_offset_size == 4)
dw2_asm_output_data (1, DW_LNS_set_prologue_end,
"set prologue end");
break;
-
+
case LI_set_epilogue_begin:
dw2_asm_output_data (1, DW_LNS_set_epilogue_begin,
"set epilogue begin");
struct array_descr_info info;
/* Only these cv-qualifiers are currently handled. */
const int cv_qual_mask = (TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE
- | TYPE_QUAL_RESTRICT | TYPE_QUAL_ATOMIC |
+ | TYPE_QUAL_RESTRICT | TYPE_QUAL_ATOMIC |
ENCODE_QUAL_ADDR_SPACE(~0U));
/* DW_AT_endianity is specified only for base types in the standard. */
const bool reverse_type
if (GET_CODE (varloc) == EXPR_LIST)
varloc = XEXP (varloc, 0);
}
- do
+ do
{
if (GET_CODE (varloc) == CONST
|| GET_CODE (varloc) == SIGN_EXTEND
frame_pointer_fb_offset = -offset;
/* ??? AVR doesn't set up valid eliminations when there is no stack frame
- in which to eliminate. This is because it's stack pointer isn't
+ in which to eliminate. This is because it's stack pointer isn't
directly accessible as a register within the ISA. To work around
this, assume that while we cannot provide a proper value for
frame_pointer_fb_offset, we won't need one either. We can use
??? This is a temporary measure until after we're able to generate
regular DWARF for the complex Ada type system. */
-static void
+static void
add_gnat_descriptive_type_attribute (dw_die_ref die, tree type,
dw_die_ref context_die)
{
/* DWARF 2 doesn't provide a way to identify a program's source-level
entry point. DW_AT_calling_convention attributes are only meant
to describe functions' calling conventions. However, lacking a
- better way to signal the Fortran main program, we used this for
- a long time, following existing custom. Now, DWARF 4 has
+ better way to signal the Fortran main program, we used this for
+ a long time, following existing custom. Now, DWARF 4 has
DW_AT_main_subprogram, which we add below, but some tools still
rely on the old way, which we thus keep. */
value = DW_CC_program;
tree node_or_origin = node ? node : origin;
tree ultimate_origin;
dw_die_ref parm_die = NULL;
-
+
if (DECL_P (node_or_origin))
{
parm_die = lookup_decl_die (node);
{
if (dwarf_version >= 3 || !dwarf_strict)
{
- /* We should use ranges for non-contiguous code section
+ /* We should use ranges for non-contiguous code section
addresses. Use the actual code range for the initial
- section, since the HOT/COLD labels might precede an
+ section, since the HOT/COLD labels might precede an
alignment offset. */
bool range_list_added = false;
add_ranges_by_labels (subr_die, fde->dw_fde_begin,
if (TREE_PUBLIC (decl))
add_AT_flag (seg_die, DW_AT_external, 1);
- if (decl_name != NULL
+ if (decl_name != NULL
&& IDENTIFIER_POINTER (decl_name) != NULL)
{
name = dwarf2_name (decl, 1);
if (DECL_ARTIFICIAL (decl))
add_AT_flag (seg_die, DW_AT_artificial, 1);
- name = concat ("__second_sect_of_", name, NULL);
+ name = concat ("__second_sect_of_", name, NULL);
add_AT_low_high_pc (seg_die, fde->dw_fde_second_begin,
fde->dw_fde_second_end, false);
add_name_attribute (seg_die, name);
if (!generic_type_instances)
return;
-
+
FOR_EACH_VEC_ELT (*generic_type_instances, i, t)
if (COMPLETE_TYPE_P (t))
gen_generic_params_dies (t);
that second line number entry. */
/* Recall that this end-of-prologue indication is *not* the same thing
as the end_prologue debug hook. The NOTE_INSN_PROLOGUE_END note,
- to which the hook corresponds, follows the last insn that was
+ to which the hook corresponds, follows the last insn that was
emitted by gen_prologue. What we need is to precede the first insn
that had been emitted after NOTE_INSN_FUNCTION_BEG, i.e. the first
insn that corresponds to something the user wrote. These may be
? "Define macro" : "Undefine macro");
dw2_asm_output_data_uleb128 (ref->lineno,
"At line number "
- HOST_WIDE_INT_PRINT_UNSIGNED,
+ HOST_WIDE_INT_PRINT_UNSIGNED,
ref->lineno);
dw2_asm_output_nstring (ref->info, -1, "The macro");
break;
get_full_len (*val2->v.val_wide)
* HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR);
break;
- case dw_val_class_addr:
+ case dw_val_class_addr:
inchash::add_rtx (val2->v.val_addr, hstate);
break;
default:
}
else
gcc_unreachable ();
-
+
return r;
}
#endif
/* Unlink INSN from the insn chain.
This function knows how to handle sequences.
-
+
This function does not invalidate data flow information associated with
INSN (i.e. does not call df_insn_delete). That makes this function
usable for only disconnecting an insn from the chain, and re-emit it
SECTION refers to the table associated with the hot part while value 1
refers to the table associated with the cold part. If the function has
not been partitioned, value 0 refers to the single exception table. */
-
+
static void
output_one_function_exception_table (int section)
{
STACK_POINTER. This renders the HARD_FRAME_POINTER unusable for accessing
aligned variables, which is reflected in ix86_can_eliminate.
We normally still have the realigned STACK_POINTER that we can use.
- But if there is a stack restore still present at reload, it can trigger
+ But if there is a stack restore still present at reload, it can trigger
mark_not_eliminable for the STACK_POINTER, leaving no way to eliminate
FRAME_POINTER into a hard reg.
To prevent this situation, we force need_drap if we emit a stack
/* Record the new stack level for nonlocal gotos. */
if (cfun->nonlocal_goto_save_area)
update_nonlocal_goto_save_area ();
-
+
/* Record the new stack level for SJLJ exceptions. */
if (targetm_common.except_unwind_info (&global_options) == UI_SJLJ)
update_sjlj_context ();
if (GET_MODE_CLASS (from_mode) == MODE_PARTIAL_INT
&& pow2p_hwi (from_size))
from_size --;
-
+
/* Assume cost of zero-extend and sign-extend is the same. */
which = (to_size < from_size ? all->trunc : all->zext);
if (target == 0 || !REG_P (target) || !valid_multiword_target_p (target))
target = gen_reg_rtx (mode);
- /* In case we're about to clobber a base register or something
+ /* In case we're about to clobber a base register or something
(see gcc.c-torture/execute/20040625-1.c). */
if (reg_mentioned_p (target, op0))
target = gen_reg_rtx (mode);
/* Only deduct something for a REM if the last divide done was
for a different constant. Then set the constant of the last
divide. */
- max_cost = (unsignedp
+ max_cost = (unsignedp
? udiv_cost (speed, compute_mode)
: sdiv_cost (speed, compute_mode));
if (rem_flag && ! (last_div_const != 0 && op1_is_constant
int cse_not_expected;
static bool block_move_libcall_safe_for_call_parm (void);
-static bool emit_block_move_via_pattern (rtx, rtx, rtx, unsigned, unsigned,
+static bool emit_block_move_via_pattern (rtx, rtx, rtx, unsigned, unsigned,
HOST_WIDE_INT, unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT, bool);
/* Variant of convert_modes for ABI parameter passing/return.
Return an rtx for a value that would result from converting X from
an integer mode IMODE to a narrower floating point mode MODE. */
-
+
rtx
convert_wider_int_to_float (machine_mode mode, machine_mode imode, rtx x)
{
/* A subroutine of emit_block_move. Expand a cpymem or movmem pattern;
return true if successful.
-
+
X is the destination of the copy or move.
Y is the source of the copy or move.
SIZE is the size of the block to be moved.
else if (GET_MODE (to_rtx) == VOIDmode)
to_rtx = adjust_address (to_rtx, BLKmode, 0);
}
-
+
rtx stemp = NULL_RTX, old_to_rtx = NULL_RTX;
if (offset != 0)
{
/* If TEMP is a VOIDmode constant and the mode of the type of EXP is not
the same as that of TARGET, adjust the constant. This is needed, for
- example, in case it is a CONST_DOUBLE or CONST_WIDE_INT and we want
+ example, in case it is a CONST_DOUBLE or CONST_WIDE_INT and we want
only a word-sized value. */
if (CONSTANT_P (temp) && GET_MODE (temp) == VOIDmode
&& TREE_CODE (exp) != ERROR_MARK
#undef REDUCE_BIT_FIELD
-/* Return TRUE if expression STMT is suitable for replacement.
- Never consider memory loads as replaceable, because those don't ever lead
+/* Return TRUE if expression STMT is suitable for replacement.
+ Never consider memory loads as replaceable, because those don't ever lead
into constant expressions. */
static bool
bool
try_tablejump (tree index_type, tree index_expr, tree minval, tree range,
- rtx table_label, rtx default_label,
+ rtx table_label, rtx default_label,
profile_probability default_probability)
{
rtx index;
SIGNED, &quo))
return wide_int_to_tree (TREE_TYPE (arg1), quo);
- return NULL_TREE;
+ return NULL_TREE;
}
\f
/* This is nonzero if we should defer warnings about undefined
and the operand is a signaling NaN. */
if (HONOR_SNANS (arg1)
&& REAL_VALUE_ISSIGNALING_NAN (TREE_REAL_CST (arg1)))
- return NULL_TREE;
+ return NULL_TREE;
/* With flag_rounding_math we should respect the current rounding mode
unless the conversion is exact. */
Double check this so we won't get false
positives for GENERIC. */
|| (c0->index
- && (TREE_CODE (c0->index) != INTEGER_CST
+ && (TREE_CODE (c0->index) != INTEGER_CST
|| compare_tree_int (c0->index, i)))
|| (c1->index
- && (TREE_CODE (c1->index) != INTEGER_CST
+ && (TREE_CODE (c1->index) != INTEGER_CST
|| compare_tree_int (c1->index, i))))
return false;
}
two different values, which will be stored in *CVAL1 and *CVAL2; if
they are nonzero it means that some operands have already been found.
No variables may be used anywhere else in the expression except in the
- comparisons.
+ comparisons.
If this is true, return 1. Otherwise, return zero. */
A || ~B
or
A && ~B
- LOC is the location of the resulting expression. OP is the inner
+ LOC is the location of the resulting expression. OP is the inner
logical operation; the left-hand side in the examples above, while CMPOP
is the right-hand side. RHS_ONLY is used to prevent us from accidentally
removing a condition that guards another, as in
if (NULL_TREE == i_type || TYPE_PRECISION (i_type) != total_bytes)
return 0;
-
+
value = TREE_FIXED_CST (expr);
i_value = double_int_to_tree (i_type, value.data);
side-effects. */
&& simple_condition_p (TREE_OPERAND (arg1, 0)))
{
- tem = fold_build2_loc (loc, ncode, type,
+ tem = fold_build2_loc (loc, ncode, type,
arg0, TREE_OPERAND (arg1, 0));
return fold_build2_loc (loc, icode, type, tem,
TREE_OPERAND (arg1, 1));
case TRUNC_DIV_EXPR:
/* Fall through */
-
+
case FLOOR_DIV_EXPR:
/* Simplify A / (B << N) where A and B are positive and B is
a power of 2, to A >> (N + log2(B)). */
l0 = fold_convert_loc (loc, type, TREE_OPERAND (arg0, 0));
l1 = fold_convert_loc (loc, type, TREE_OPERAND (arg0, 1));
-
+
n0 = fold_build1_loc (loc, TRUTH_NOT_EXPR, type, l0);
n1 = fold_build1_loc (loc, TRUTH_NOT_EXPR, type, l1);
-
+
if ((operand_equal_p (n0, a0, 0)
&& operand_equal_p (n1, a1, 0))
|| (operand_equal_p (n0, a1, 0)
#include "mathbuiltins.def"
- gfc_define_builtin ("__builtin_roundl", mfunc_longdouble[0],
+ gfc_define_builtin ("__builtin_roundl", mfunc_longdouble[0],
BUILT_IN_ROUNDL, "roundl", ATTR_CONST_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_round", mfunc_double[0],
+ gfc_define_builtin ("__builtin_round", mfunc_double[0],
BUILT_IN_ROUND, "round", ATTR_CONST_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_roundf", mfunc_float[0],
+ gfc_define_builtin ("__builtin_roundf", mfunc_float[0],
BUILT_IN_ROUNDF, "roundf", ATTR_CONST_NOTHROW_LEAF_LIST);
gfc_define_builtin ("__builtin_truncl", mfunc_longdouble[0],
gfc_define_builtin ("__builtin_truncf", mfunc_float[0],
BUILT_IN_TRUNCF, "truncf", ATTR_CONST_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_cabsl", func_clongdouble_longdouble,
+ gfc_define_builtin ("__builtin_cabsl", func_clongdouble_longdouble,
BUILT_IN_CABSL, "cabsl", ATTR_CONST_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_cabs", func_cdouble_double,
+ gfc_define_builtin ("__builtin_cabs", func_cdouble_double,
BUILT_IN_CABS, "cabs", ATTR_CONST_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_cabsf", func_cfloat_float,
+ gfc_define_builtin ("__builtin_cabsf", func_cfloat_float,
BUILT_IN_CABSF, "cabsf", ATTR_CONST_NOTHROW_LEAF_LIST);
-
- gfc_define_builtin ("__builtin_copysignl", mfunc_longdouble[1],
+
+ gfc_define_builtin ("__builtin_copysignl", mfunc_longdouble[1],
BUILT_IN_COPYSIGNL, "copysignl",
ATTR_CONST_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_copysign", mfunc_double[1],
+ gfc_define_builtin ("__builtin_copysign", mfunc_double[1],
BUILT_IN_COPYSIGN, "copysign",
ATTR_CONST_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_copysignf", mfunc_float[1],
+ gfc_define_builtin ("__builtin_copysignf", mfunc_float[1],
BUILT_IN_COPYSIGNF, "copysignf",
ATTR_CONST_NOTHROW_LEAF_LIST);
-
- gfc_define_builtin ("__builtin_nextafterl", mfunc_longdouble[1],
+
+ gfc_define_builtin ("__builtin_nextafterl", mfunc_longdouble[1],
BUILT_IN_NEXTAFTERL, "nextafterl",
ATTR_CONST_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_nextafter", mfunc_double[1],
+ gfc_define_builtin ("__builtin_nextafter", mfunc_double[1],
BUILT_IN_NEXTAFTER, "nextafter",
ATTR_CONST_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_nextafterf", mfunc_float[1],
+ gfc_define_builtin ("__builtin_nextafterf", mfunc_float[1],
BUILT_IN_NEXTAFTERF, "nextafterf",
ATTR_CONST_NOTHROW_LEAF_LIST);
-
+
/* Some built-ins depend on rounding mode. Depending on compilation options, they
will be "pure" or "const". */
attr = flag_rounding_math ? ATTR_PURE_NOTHROW_LEAF_LIST : ATTR_CONST_NOTHROW_LEAF_LIST;
- gfc_define_builtin ("__builtin_rintl", mfunc_longdouble[0],
+ gfc_define_builtin ("__builtin_rintl", mfunc_longdouble[0],
BUILT_IN_RINTL, "rintl", attr);
- gfc_define_builtin ("__builtin_rint", mfunc_double[0],
+ gfc_define_builtin ("__builtin_rint", mfunc_double[0],
BUILT_IN_RINT, "rint", attr);
- gfc_define_builtin ("__builtin_rintf", mfunc_float[0],
+ gfc_define_builtin ("__builtin_rintf", mfunc_float[0],
BUILT_IN_RINTF, "rintf", attr);
- gfc_define_builtin ("__builtin_remainderl", mfunc_longdouble[1],
+ gfc_define_builtin ("__builtin_remainderl", mfunc_longdouble[1],
BUILT_IN_REMAINDERL, "remainderl", attr);
- gfc_define_builtin ("__builtin_remainder", mfunc_double[1],
+ gfc_define_builtin ("__builtin_remainder", mfunc_double[1],
BUILT_IN_REMAINDER, "remainder", attr);
- gfc_define_builtin ("__builtin_remainderf", mfunc_float[1],
+ gfc_define_builtin ("__builtin_remainderf", mfunc_float[1],
BUILT_IN_REMAINDERF, "remainderf", attr);
-
- gfc_define_builtin ("__builtin_logbl", mfunc_longdouble[0],
+
+ gfc_define_builtin ("__builtin_logbl", mfunc_longdouble[0],
BUILT_IN_LOGBL, "logbl", ATTR_CONST_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_logb", mfunc_double[0],
+ gfc_define_builtin ("__builtin_logb", mfunc_double[0],
BUILT_IN_LOGB, "logb", ATTR_CONST_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_logbf", mfunc_float[0],
+ gfc_define_builtin ("__builtin_logbf", mfunc_float[0],
BUILT_IN_LOGBF, "logbf", ATTR_CONST_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_frexpl", mfunc_longdouble[4],
+ gfc_define_builtin ("__builtin_frexpl", mfunc_longdouble[4],
BUILT_IN_FREXPL, "frexpl", ATTR_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_frexp", mfunc_double[4],
+ gfc_define_builtin ("__builtin_frexp", mfunc_double[4],
BUILT_IN_FREXP, "frexp", ATTR_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_frexpf", mfunc_float[4],
+ gfc_define_builtin ("__builtin_frexpf", mfunc_float[4],
BUILT_IN_FREXPF, "frexpf", ATTR_NOTHROW_LEAF_LIST);
-
- gfc_define_builtin ("__builtin_fabsl", mfunc_longdouble[0],
+
+ gfc_define_builtin ("__builtin_fabsl", mfunc_longdouble[0],
BUILT_IN_FABSL, "fabsl", ATTR_CONST_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_fabs", mfunc_double[0],
+ gfc_define_builtin ("__builtin_fabs", mfunc_double[0],
BUILT_IN_FABS, "fabs", ATTR_CONST_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_fabsf", mfunc_float[0],
+ gfc_define_builtin ("__builtin_fabsf", mfunc_float[0],
BUILT_IN_FABSF, "fabsf", ATTR_CONST_NOTHROW_LEAF_LIST);
-
+
gfc_define_builtin ("__builtin_scalbnl", mfunc_longdouble[2],
BUILT_IN_SCALBNL, "scalbnl", ATTR_CONST_NOTHROW_LEAF_LIST);
gfc_define_builtin ("__builtin_scalbn", mfunc_double[2],
BUILT_IN_SCALBN, "scalbn", ATTR_CONST_NOTHROW_LEAF_LIST);
gfc_define_builtin ("__builtin_scalbnf", mfunc_float[2],
BUILT_IN_SCALBNF, "scalbnf", ATTR_CONST_NOTHROW_LEAF_LIST);
-
+
gfc_define_builtin ("__builtin_fmaxl", mfunc_longdouble[1],
BUILT_IN_FMAXL, "fmaxl", ATTR_CONST_NOTHROW_LEAF_LIST);
gfc_define_builtin ("__builtin_fmax", mfunc_double[1],
gfc_define_builtin ("__builtin_fminf", mfunc_float[1],
BUILT_IN_FMINF, "fminf", ATTR_CONST_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_fmodl", mfunc_longdouble[1],
+ gfc_define_builtin ("__builtin_fmodl", mfunc_longdouble[1],
BUILT_IN_FMODL, "fmodl", ATTR_CONST_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_fmod", mfunc_double[1],
+ gfc_define_builtin ("__builtin_fmod", mfunc_double[1],
BUILT_IN_FMOD, "fmod", ATTR_CONST_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_fmodf", mfunc_float[1],
+ gfc_define_builtin ("__builtin_fmodf", mfunc_float[1],
BUILT_IN_FMODF, "fmodf", ATTR_CONST_NOTHROW_LEAF_LIST);
/* iround{f,,l}, lround{f,,l} and llround{f,,l} */
ftype = build_function_type_list (integer_type_node,
- float_type_node, NULL_TREE);
+ float_type_node, NULL_TREE);
gfc_define_builtin("__builtin_iroundf", ftype, BUILT_IN_IROUNDF,
"iroundf", ATTR_CONST_NOTHROW_LEAF_LIST);
ftype = build_function_type_list (long_integer_type_node,
- float_type_node, NULL_TREE);
+ float_type_node, NULL_TREE);
gfc_define_builtin ("__builtin_lroundf", ftype, BUILT_IN_LROUNDF,
"lroundf", ATTR_CONST_NOTHROW_LEAF_LIST);
ftype = build_function_type_list (long_long_integer_type_node,
- float_type_node, NULL_TREE);
+ float_type_node, NULL_TREE);
gfc_define_builtin ("__builtin_llroundf", ftype, BUILT_IN_LLROUNDF,
"llroundf", ATTR_CONST_NOTHROW_LEAF_LIST);
ftype = build_function_type_list (integer_type_node,
- double_type_node, NULL_TREE);
+ double_type_node, NULL_TREE);
gfc_define_builtin("__builtin_iround", ftype, BUILT_IN_IROUND,
"iround", ATTR_CONST_NOTHROW_LEAF_LIST);
ftype = build_function_type_list (long_integer_type_node,
- double_type_node, NULL_TREE);
+ double_type_node, NULL_TREE);
gfc_define_builtin ("__builtin_lround", ftype, BUILT_IN_LROUND,
"lround", ATTR_CONST_NOTHROW_LEAF_LIST);
ftype = build_function_type_list (long_long_integer_type_node,
- double_type_node, NULL_TREE);
+ double_type_node, NULL_TREE);
gfc_define_builtin ("__builtin_llround", ftype, BUILT_IN_LLROUND,
"llround", ATTR_CONST_NOTHROW_LEAF_LIST);
ftype = build_function_type_list (integer_type_node,
- long_double_type_node, NULL_TREE);
+ long_double_type_node, NULL_TREE);
gfc_define_builtin("__builtin_iroundl", ftype, BUILT_IN_IROUNDL,
"iroundl", ATTR_CONST_NOTHROW_LEAF_LIST);
ftype = build_function_type_list (long_integer_type_node,
- long_double_type_node, NULL_TREE);
+ long_double_type_node, NULL_TREE);
gfc_define_builtin ("__builtin_lroundl", ftype, BUILT_IN_LROUNDL,
"lroundl", ATTR_CONST_NOTHROW_LEAF_LIST);
ftype = build_function_type_list (long_long_integer_type_node,
- long_double_type_node, NULL_TREE);
+ long_double_type_node, NULL_TREE);
gfc_define_builtin ("__builtin_llroundl", ftype, BUILT_IN_LLROUNDL,
"llroundl", ATTR_CONST_NOTHROW_LEAF_LIST);
/* These are used to implement the ** operator. */
- gfc_define_builtin ("__builtin_powl", mfunc_longdouble[1],
+ gfc_define_builtin ("__builtin_powl", mfunc_longdouble[1],
BUILT_IN_POWL, "powl", ATTR_CONST_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_pow", mfunc_double[1],
+ gfc_define_builtin ("__builtin_pow", mfunc_double[1],
BUILT_IN_POW, "pow", ATTR_CONST_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_powf", mfunc_float[1],
+ gfc_define_builtin ("__builtin_powf", mfunc_float[1],
BUILT_IN_POWF, "powf", ATTR_CONST_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_cpowl", mfunc_clongdouble[1],
+ gfc_define_builtin ("__builtin_cpowl", mfunc_clongdouble[1],
BUILT_IN_CPOWL, "cpowl", ATTR_CONST_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_cpow", mfunc_cdouble[1],
+ gfc_define_builtin ("__builtin_cpow", mfunc_cdouble[1],
BUILT_IN_CPOW, "cpow", ATTR_CONST_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_cpowf", mfunc_cfloat[1],
+ gfc_define_builtin ("__builtin_cpowf", mfunc_cfloat[1],
BUILT_IN_CPOWF, "cpowf", ATTR_CONST_NOTHROW_LEAF_LIST);
gfc_define_builtin ("__builtin_powil", mfunc_longdouble[2],
BUILT_IN_POWIL, "powil", ATTR_CONST_NOTHROW_LEAF_LIST);
gfc_define_builtin ("__builtin_cbrtf", mfunc_float[0],
BUILT_IN_CBRTF, "cbrtf",
ATTR_CONST_NOTHROW_LEAF_LIST);
- gfc_define_builtin ("__builtin_cexpil", func_longdouble_clongdouble,
+ gfc_define_builtin ("__builtin_cexpil", func_longdouble_clongdouble,
BUILT_IN_CEXPIL, "cexpil",
ATTR_CONST_NOTHROW_LEAF_LIST);
gfc_define_builtin ("__builtin_cexpi", func_double_cdouble,
int need_math = (MATH_LIBRARY[0] != '\0');
/* Whether we should link a static libgfortran. */
- int static_lib = 0;
+ int static_lib = 0;
/* Whether we need to link statically. */
int static_linking = 0;
}
c = next_char_not_space ();
-
+
negative_flag = 0;
switch (c)
{
= G_("Positive width required in format string at %L");
const char *nonneg_required
= G_("Nonnegative width required in format string at %L");
- const char *unexpected_element
+ const char *unexpected_element
= G_("Unexpected element %qc in format string at %L");
const char *unexpected_end
= G_("Unexpected end of format string in format string at %L");
error = zero_width;
goto syntax;
}
- if (!gfc_notify_std (GFC_STD_F2008, "%<G0%> in format at %L",
+ if (!gfc_notify_std (GFC_STD_F2008, "%<G0%> in format at %L",
&format_locus))
return false;
u = format_lex ();
}
goto format_item;
-
+
syntax:
if (mode != MODE_FORMAT)
format_locus.nextc += format_string_pos;
for (i=e->value.character.length-1;i>format_string_pos-1;i--)
if (e->value.character.string[i] != ' ')
{
- format_locus.nextc += format_length + 1;
+ format_locus.nextc += format_length + 1;
gfc_warning (0,
- "Extraneous characters in format at %L", &format_locus);
+ "Extraneous characters in format at %L", &format_locus);
break;
}
return rv;
n = 0;
c = gfc_constructor_first (e->value.constructor);
len = c->expr->value.character.length;
-
+
for ( ; c; c = gfc_constructor_next (c))
n += len;
if (tag == &tag_newunit)
{
- if (!gfc_notify_std (GFC_STD_F2008, "NEWUNIT specifier at %L",
+ if (!gfc_notify_std (GFC_STD_F2008, "NEWUNIT specifier at %L",
&e->where))
return false;
}
if (!gfc_check_vardef_context (e, false, false, false, context))
return false;
}
-
+
if (tag == &tag_convert)
{
if (!gfc_notify_std (GFC_STD_GNU, "CONVERT tag at %L", &e->where))
derived = sym->ts.u.derived;
else
return false;
- if ((k == M_WRITE || k == M_PRINT) &&
+ if ((k == M_WRITE || k == M_PRINT) &&
(gfc_find_specific_dtio_proc (derived, true, true) != NULL))
return true;
if ((k == M_READ) &&
/* If we are writing, make sure the internal unit can be changed. */
gcc_assert (k != M_PRINT);
if (k == M_WRITE
- && !gfc_check_vardef_context (e, false, false, false,
+ && !gfc_check_vardef_context (e, false, false, false,
_("internal unit in WRITE")))
return false;
}
e = gfc_get_variable_expr (gfc_find_sym_in_symtree (n->sym));
t = gfc_check_vardef_context (e, false, false, false, NULL);
gfc_free_expr (e);
-
+
if (!t)
{
gfc_error ("NAMELIST %qs in READ statement at %L contains"
"procedure", n->sym->name, dt->namelist->name, loc);
return false;
}
-
+
if ((n->sym->ts.type == BT_DERIVED)
&& (n->sym->ts.u.derived->attr.alloc_comp
|| n->sym->ts.u.derived->attr.pointer_comp))
"or POINTER components", n->sym->name,
dt->namelist->name, loc))
return false;
-
+
if (!t)
{
gfc_error ("NAMELIST object %qs in namelist %qs at %L has "
}
if (dt->extra_comma
- && !gfc_notify_std (GFC_STD_LEGACY, "Comma before i/o item list at %L",
+ && !gfc_notify_std (GFC_STD_LEGACY, "Comma before i/o item list at %L",
&dt->extra_comma->where))
return false;
}
gfc_unset_implicit_pure (NULL);
-
+
if (inquire->id != NULL && inquire->pending == NULL)
{
gfc_error ("INQUIRE statement at %L requires a PENDING= specifier with "
if (!gfc_reference_st_label (wait->err, ST_LABEL_TARGET))
return false;
-
+
if (!gfc_reference_st_label (wait->end, ST_LABEL_TARGET))
return false;
Fortran 2003 ISO_C_BINDING intrinsic module. */
#ifndef NAMED_INTCST
-# define NAMED_INTCST(a,b,c,d)
+# define NAMED_INTCST(a,b,c,d)
#endif
#ifndef NAMED_REALCST
-# define NAMED_REALCST(a,b,c,d)
+# define NAMED_REALCST(a,b,c,d)
#endif
#ifndef NAMED_CMPXCST
-# define NAMED_CMPXCST(a,b,c,d)
+# define NAMED_CMPXCST(a,b,c,d)
#endif
#ifndef NAMED_LOGCST
-# define NAMED_LOGCST(a,b,c)
+# define NAMED_LOGCST(a,b,c)
#endif
#ifndef NAMED_CHARKNDCST
-# define NAMED_CHARKNDCST(a,b,c)
+# define NAMED_CHARKNDCST(a,b,c)
#endif
#ifndef NAMED_FUNCTION
/* The arguments to NAMED_*CST are:
-- an internal name
-- the symbol name in the module, as seen by Fortran code
- -- the value it has, for use in trans-types.cc
+ -- the value it has, for use in trans-types.cc
-- the standard that supports this type */
NAMED_INTCST (ISOCBINDING_INT, "c_int", gfc_c_int_kind, GFC_STD_F2003)
NAMED_CHARKNDCST (ISOCBINDING_CHAR, "c_char", gfc_default_character_kind)
#ifndef NAMED_CHARCST
-# define NAMED_CHARCST(a,b,c)
+# define NAMED_CHARCST(a,b,c)
#endif
-/* Use langhooks to deal with host to target translations. */
+/* Use langhooks to deal with host to target translations. */
NAMED_CHARCST (ISOCBINDING_NULL_CHAR, "c_null_char", \
lang_hooks.to_target_charset ('\0'))
NAMED_CHARCST (ISOCBINDING_ALERT, "c_alert", \
lang_hooks.to_target_charset ('\v'))
#ifndef DERIVED_TYPE
-# define DERIVED_TYPE(a,b,c)
+# define DERIVED_TYPE(a,b,c)
#endif
DERIVED_TYPE (ISOCBINDING_PTR, "c_ptr", \
-- an internal name
-- the symbol name in the module, as seen by Fortran code
-- the value it has
- -- the standard that supports this type */
+ -- the standard that supports this type */
NAMED_INTCST (ISOFORTRANENV_FILE_ATOMIC_INT_KIND, "atomic_int_kind", \
gfc_atomic_int_kind, GFC_STD_F2008)
/* We want to use this function to check for a common-block-name
that can exist in a bind statement, so removed the "static"
declaration of the function in match.cc. */
-
+
match gfc_match_common_name (char *name);
match gfc_match_common (void);
new_st.op = EXEC_OACC_ROUTINE;
new_st.ext.omp_clauses = c;
- return MATCH_YES;
+ return MATCH_YES;
cleanup:
gfc_current_locus = old_loc;
n->sym->name, &n->where);
}
}
-
+
for (n = omp_clauses->lists[OMP_LIST_TO]; n; n = n->next)
n->sym->mark = 0;
for (n = omp_clauses->lists[OMP_LIST_FROM]; n; n = n->next)
gfc_statement st = omp_code_to_statement (omp_current_ctx->code);
gfc_statement oacc_st = oacc_code_to_statement (code);
gfc_error ("The %s directive cannot be specified within "
- "a %s region at %L", gfc_ascii_statement (oacc_st),
+ "a %s region at %L", gfc_ascii_statement (oacc_st),
gfc_ascii_statement (st), &code->loc);
}
}
gfc_statement st = oacc_code_to_statement (omp_current_ctx->code);
gfc_statement omp_st = omp_code_to_statement (code);
gfc_error ("The %s directive cannot be specified within "
- "a %s region at %L", gfc_ascii_statement (omp_st),
+ "a %s region at %L", gfc_ascii_statement (omp_st),
gfc_ascii_statement (st), &code->loc);
}
}
gfc_source_form gfc_current_form;
static gfc_linebuf *line_head, *line_tail;
-
+
locus gfc_current_locus;
const char *gfc_source_file;
static FILE *gfc_src_file;
gfc_linebuf *lb;
gfc_file *f;
- while(line_head != NULL)
+ while(line_head != NULL)
{
lb = line_head->next;
free (line_head);
line_head = lb;
}
-
- while(file_head != NULL)
+
+ while(file_head != NULL)
{
f = file_head->next;
free (file_head->filename);
free (file_head);
- file_head = f;
+ file_head = f;
}
}
char *q;
size_t len;
int i;
-
+
p = path;
while (*p == ' ' || *p == '\t') /* someone might do "-I include" */
if (*p++ == '\0')
{
end_flag = 1;
return;
- }
+ }
if (gfc_current_locus.u.lb->next
&& !gfc_current_locus.u.lb->next->dbg_emitted)
if (gfc_current_locus.u.lb != NULL)
gfc_current_locus.nextc = gfc_current_locus.u.lb->line;
- else
+ else
{
gfc_current_locus.nextc = NULL;
end_flag = 1;
- }
+ }
}
next_char (void)
{
gfc_char_t c;
-
+
if (gfc_current_locus.nextc == NULL)
return '\n';
openacc_locus = old_loc;
gfc_current_locus = start;
}
- else
+ else
r = false;
}
else
openmp_locus = old_loc;
gfc_current_locus = start;
}
- else
+ else
r = false;
}
else
continue_line = gfc_linebuf_linenum (gfc_current_locus.u.lb);
/* If -fopenmp/-fopenacc, we need to handle here 2 things:
- 1) don't treat !$omp/!$acc|c$omp/c$acc|*$omp / *$acc as comments,
+ 1) don't treat !$omp/!$acc|c$omp/c$acc|*$omp / *$acc as comments,
but directives
2) handle OpenMP conditional compilation, where
!$|c$|*$ should be treated as 2 spaces if the characters
skip_comment_line ();
else
gfc_advance_line ();
-
+
if (gfc_at_eof ())
goto not_continuation;
{
gfc_current_locus.nextc--;
if (warn_ampersand && in_string == INSTRING_WARN)
- gfc_warning (OPT_Wampersand,
+ gfc_warning (OPT_Wampersand,
"Missing %<&%> in continued character "
"constant at %C");
}
load_line returns whether the line was truncated.
NOTE: The error machinery isn't available at this point, so we can't
- easily report line and column numbers consistent with other
+ easily report line and column numbers consistent with other
parts of gfortran. */
static bool
if (c == '\n')
{
/* Check for illegal use of ampersand. See F95 Standard 3.3.1.3. */
- if (gfc_current_form == FORM_FREE
+ if (gfc_current_form == FORM_FREE
&& !seen_printable && seen_ampersand)
{
if (pedantic)
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
-<http://www.gnu.org/licenses/>. */
+<http://www.gnu.org/licenses/>. */
/* The core algorithm is based on Andy Vaught's g95 tree. Also the
way to build UNION_TYPE is borrowed from Richard Henderson.
-
+
Transform common blocks. An integral part of this is processing
equivalence variables. Equivalenced variables that are not in a
common block end up in a private block of their own.
Each common block or local equivalence list is declared as a union.
Variables within the block are represented as a field within the
- block with the proper offset.
-
+ block with the proper offset.
+
So if two variables are equivalenced, they just point to a common
area in memory.
-
+
Mathematically, laying out an equivalence block is equivalent to
solving a linear system of equations. The matrix is usually a
sparse matrix in which each row contains all zero elements except
overdetermined, underdetermined or have a unique solution. If the
system is inconsistent, the program is not standard conforming.
The solution vector is integral, since all of the pivots are +1 or -1.
-
+
How we lay out an equivalence block is a little less complicated.
In an equivalence list with n elements, there are n-1 conditions to
be satisfied. The conditions partition the variables into what we
common block is made up of a series of segments that are joined one
after the other. In the linear system, a segment is a block
diagonal.
-
+
To lay out a segment we first start with some variable and
determine its length. The first variable is assumed to start at
offset one and extends to however long it is. We then traverse the
list of equivalences to find an unused condition that involves at
least one of the variables currently in the segment.
-
+
Each equivalence condition amounts to the condition B+b=C+c where B
and C are the offsets of the B and C variables, and b and c are
constants which are nonzero for array elements, substrings or
structure components. So for
-
+
EQUIVALENCE(B(2), C(3))
we have
B + 2*size of B's elements = C + 3*size of C's elements.
-
+
If B and C are known we check to see if the condition already
holds. If B is known we can solve for C. Since we know the length
of C, we can see if the minimum and maximum extents of the segment
are affected. Eventually, we make a full pass through the
equivalence list without finding any new conditions and the segment
is fully specified.
-
+
At this point, the segment is added to the current common block.
Since we know the minimum extent of the segment, everything in the
segment is translated to its position in the common block. The
usual case here is that there are no equivalence statements and the
common block is series of segments with one variable each, which is
a diagonal matrix in the matrix formulation.
-
+
Each segment is described by a chain of segment_info structures. Each
segment_info structure describes the extents of a single variable within
the segment. This list is maintained in the order the elements are
positioned within the segment. If two elements have the same starting
offset the smaller will come first. If they also have the same size their
- ordering is undefined.
-
+ ordering is undefined.
+
Once all common blocks have been created, the list of equivalences
is examined for still-unused equivalence conditions. We create a
block for each merged equivalence list. */
/* Return a field that is the size of the union, if an equivalence has
overlapping initializers. Merge the initializers into a single
- initializer for this new field, then free the old ones. */
+ initializer for this new field, then free the old ones. */
static tree
get_init_field (segment_info *head, tree union_type, tree *field_init,
&chk[s->offset],
(size_t)s->length);
}
-
+
for (i = 0; i < length; i++)
CONSTRUCTOR_APPEND_ELT (v, NULL, build_int_cst (type, data[i]));
array element number (zero based). Bounds and elements are guaranteed
to be constants. If something goes wrong we generate an error and
return zero. */
-
+
static HOST_WIDE_INT
element_number (gfc_array_ref *ar)
{
mpz_init (n);
for (i = 0; i < rank; i++)
- {
+ {
if (ar->dimen_type[i] != DIMEN_ELEMENT)
gfc_internal_error ("element_number(): Bad dimension type");
mpz_sub (n, *get_mpz (ar->start[i]), *get_mpz (as->lower[i]));
else
mpz_sub_ui (n, *get_mpz (ar->start[i]), 1);
-
+
mpz_mul (n, n, multiplier);
mpz_add (offset, offset, n);
-
+
if (as && as->upper[i] && as->lower[i])
{
mpz_sub (extent, *get_mpz (as->upper[i]), *get_mpz (as->lower[i]));
}
else
mpz_set_ui (extent, 0);
-
+
if (mpz_sgn (extent) < 0)
mpz_set_ui (extent, 0);
-
+
mpz_mul (multiplier, multiplier, extent);
- }
-
+ }
+
i = mpz_get_ui (offset);
-
+
mpz_clear (multiplier);
mpz_clear (offset);
mpz_clear (extent);
mpz_clear (n);
-
+
return i;
}
a = get_segment_info (eq2->expr->symtree->n.sym,
v->offset + offset1 - offset2);
-
+
current_segment = add_segments (current_segment, a);
}
for (z = ns->equiv; z; z = z->next)
for (y = z->eq; y; y = y->eq)
{
- if (y->used)
+ if (y->used)
continue;
sym = z->expr->symtree->n.sym;
current_segment = get_segment_info (sym, 0);
for (; n != NULL; n = n->next)
{
if (iterator && prev->u2.ns != n->u2.ns)
- {
+ {
BLOCK_SUBBLOCKS (tree_block) = gfc_finish_block (&iter_block);
TREE_VEC_ELT (iterator, 5) = tree_block;
for (tree c = omp_clauses; c != prev_clauses;
omp_clauses = gfc_trans_add_clause (node, omp_clauses);
}
if (iterator)
- {
+ {
BLOCK_SUBBLOCKS (tree_block) = gfc_finish_block (&iter_block);
TREE_VEC_ELT (iterator, 5) = tree_block;
for (tree c = omp_clauses; c != prev_clauses;
}
/* update, enter_data, exit_data, cache. */
-static tree
+static tree
gfc_trans_oacc_executable_directive (gfc_code *code)
{
stmtblock_t block;
gfc_start_block (&block);
oacc_clauses = gfc_trans_omp_clauses (&block, code->ext.omp_clauses,
code->loc, false, true, code->op);
- stmt = build1_loc (input_location, construct_code, void_type_node,
+ stmt = build1_loc (input_location, construct_code, void_type_node,
oacc_clauses);
gfc_add_expr_to_block (&block, stmt);
return gfc_finish_block (&block);
DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
BT_BOOL, BT_BOOL, BT_ULONGLONG, BT_ULONGLONG,
BT_ULONGLONG, BT_PTR_ULONGLONG, BT_PTR_ULONGLONG)
-DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_VPTR_PTR_I1_BOOL_INT_INT,
+DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_VPTR_PTR_I1_BOOL_INT_INT,
BT_BOOL, BT_VOLATILE_PTR, BT_PTR, BT_I1, BT_BOOL, BT_INT,
BT_INT)
-DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_VPTR_PTR_I2_BOOL_INT_INT,
+DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_VPTR_PTR_I2_BOOL_INT_INT,
BT_BOOL, BT_VOLATILE_PTR, BT_PTR, BT_I2, BT_BOOL, BT_INT,
BT_INT)
-DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_VPTR_PTR_I4_BOOL_INT_INT,
+DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_VPTR_PTR_I4_BOOL_INT_INT,
BT_BOOL, BT_VOLATILE_PTR, BT_PTR, BT_I4, BT_BOOL, BT_INT,
BT_INT)
-DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_VPTR_PTR_I8_BOOL_INT_INT,
+DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_VPTR_PTR_I8_BOOL_INT_INT,
BT_BOOL, BT_VOLATILE_PTR, BT_PTR, BT_I8, BT_BOOL, BT_INT,
BT_INT)
-DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_VPTR_PTR_I16_BOOL_INT_INT,
+DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_VPTR_PTR_I16_BOOL_INT_INT,
BT_BOOL, BT_VOLATILE_PTR, BT_PTR, BT_I16, BT_BOOL, BT_INT,
BT_INT)
DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_SIZE_VPTR_PTR_PTR_INT_INT, BT_BOOL, BT_SIZE,
the hidden struct return argument, and (abi willing) complex args.
Return the new parameter list. */
-static vec<tree>
+static vec<tree>
assign_parms_augmented_arg_list (struct assign_parm_data_all *all)
{
tree fndecl = current_function_decl;
else if (DECL_MODE (res) == VOIDmode)
/* If return mode is void, this decl rtl should not be used. */
set_parm_rtl (res, NULL_RTX);
- else
+ else
{
/* Compute the return values into a pseudo reg, which we will copy
into the true return register after the cleanups are done. */
/* seq.first and seq.last are the ends of the doubly-linked chain of
rtl for the current function. Both are reset to null at the
- start of rtl generation for the function.
+ start of rtl generation for the function.
start_sequence saves both of these on seq.next and then starts
a new, nested sequence of insns.
/* Build the relative path to the target-specific tool directory. */
self_tooldir_prefix = concat (tooldir_base_prefix, target_machine,
dir_separator, NULL);
- self_tooldir_prefix = concat (self_exec_prefix, target_machine,
+ self_tooldir_prefix = concat (self_exec_prefix, target_machine,
dir_separator, target_version, dir_separator,
self_tooldir_prefix, NULL);
prefix_from_string (concat (self_tooldir_prefix, "bin", NULL), &target_path);
/* Add the target-specific libexec prefix. */
- self_libexec_prefix = concat (self_libexec_prefix, target_machine,
+ self_libexec_prefix = concat (self_libexec_prefix, target_machine,
dir_separator, target_version,
dir_separator, NULL);
prefix_from_string (self_libexec_prefix, &target_path);
prefix_from_env ("PATH", &path);
}
-int
+int
main (int ac, char **av)
{
const char *exe_name;
/* Prepend - if necessary. */
if (is_ar && av[1] && av[1][0] != '-')
av[1] = concat ("-", av[1], NULL);
-
+
/* Create new command line with plugin - if we have one, otherwise just
copy the command through. */
nargv = XCNEWVEC (const char *, ac + j + 1); /* +j plugin args +1 for NULL. */
/* Run utility */
/* ??? the const is misplaced in pex_one's argv? */
- err_msg = pex_one (PEX_LAST|PEX_SEARCH,
- exe_name,
+ err_msg = pex_one (PEX_LAST|PEX_SEARCH,
+ exe_name,
CONST_CAST2 (char * const *, const char **, nargv),
concat ("gcc-", exe_name, NULL),
NULL,NULL, &status, &err);
- if (err_msg)
+ if (err_msg)
fprintf (stderr, "Error running %s: %s\n", exe_name, err_msg);
else if (status)
{
"%{foo=*:bar%*}%{foo=*:one%*two}"
matches -foo=hello then it will produce:
-
+
barhello onehellotwo
*/
if (*p == 0 || *p == '}')
get_random_number (void)
{
unsigned HOST_WIDE_INT ret = 0;
- int fd;
+ int fd;
- fd = open ("/dev/urandom", O_RDONLY);
+ fd = open ("/dev/urandom", O_RDONLY);
if (fd >= 0)
{
read (fd, &ret, sizeof (HOST_WIDE_INT));
return (c == ' ' || c == '\t');
}
-/* Insert backslash before spaces in ORIG (usually a file path), to
+/* Insert backslash before spaces in ORIG (usually a file path), to
avoid being broken by spec parser.
This function is needed as do_spec_1 treats white space (' ' and '\t')
as the end of an argument. But in case of -plugin /usr/gcc install/xxx.so,
the file name should be treated as a single argument rather than being
- broken into multiple. Solution is to insert '\\' before the space in a
+ broken into multiple. Solution is to insert '\\' before the space in a
file name.
-
- This function converts and only converts all occurrence of ' '
+
+ This function converts and only converts all occurrence of ' '
to '\\' + ' ' and '\t' to '\\' + '\t'. For example:
"a b" -> "a\\ b"
"a b" -> "a\\ \\ b"
if (gcov_position () - pos < (gcov_position_t) length)
{
const char *name;
-
+
name = gcov_read_string ();
printf (", `%s'", name ? name : "NULL");
unsigned artificial = gcov_read_unsigned ();
if (flags)
{
char c = '(';
-
+
if (flags & GCOV_ARC_ON_TREE)
printf ("%ctree", c), c = ',';
if (flags & GCOV_ARC_FAKE)
GCOV_LINKAGE inline void
gcov_rewrite (void)
{
- gcov_var.mode = -1;
+ gcov_var.mode = -1;
gcov_var.error = GCOV_FILE_NO_ERROR;
fseek (gcov_var.file, 0L, SEEK_SET);
}
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
- <http://www.gnu.org/licenses/>.
+ <http://www.gnu.org/licenses/>.
It is expected that more hunks of gcse.cc and postreload-gcse.cc should
migrate into this file. */
/* For each block, compute whether X is transparent. X is either an
expression or an assignment [though we don't care which, for this context
an assignment is treated as an expression]. For each block where an
- element of X is modified, reset the INDX bit in BMAP.
+ element of X is modified, reset the INDX bit in BMAP.
BLOCKS_WITH_CALLS indicates which blocks contain CALL_INSNs which kill
memory.
make the existing occurrences of expressions fully redundant. This
routine examines the set of insertions and deletions and if the ratio
of insertions to deletions is too high for a particular expression, then
- the expression is removed from the insertion/deletion sets.
+ the expression is removed from the insertion/deletion sets.
N_ELEMS is the number of elements in the hash table. */
{
struct set_data s;
rtx pattern;
-
+
gcc_assert (INSN_P (insn));
/* Optimize common case. */
instruction FROM, if live ranges of inputs are shrunk. Also
maintain live_in information if live range of register referred
in FROM is shrunk.
-
+
Return 0 if register pressure doesn't change, otherwise return
the number by which register pressure is decreased.
-
+
NOTE: Register pressure won't be increased in this function. */
static int
unsigned HOST_WIDE_INT memory_request
= ((unsigned HOST_WIDE_INT)n_basic_blocks_for_fn (cfun)
* SBITMAP_SET_SIZE (max_reg_num ()) * sizeof (SBITMAP_ELT_TYPE));
-
+
/* Trying to perform global optimizations on flow graphs which have
a high connectivity will take a long time and is unlikely to be
particularly useful.
if (startswith(attr->name, "*internal_dfa_insn_code"))
outf = dfa_file;
else if (startswith (attr->name, "*insn_default_latency"))
- outf = latency_file;
+ outf = latency_file;
else
outf = attr_file;
}
md5_init_ctx (&ctx);
- for (i = 1; i < argc; i++)
+ for (i = 1; i < argc; i++)
dosum (&ctx, argv[i]);
md5_finish_ctx (&ctx, result);
struct fileloc lexer_line;
int lexer_toplevel_done;
-static void
+static void
update_lineno (const char *l, size_t len)
{
while (len-- > 0)
"*"/[^/] /* do nothing */
}
-<in_comment>"*/" { BEGIN(INITIAL); }
+<in_comment>"*/" { BEGIN(INITIAL); }
<in_struct_comment>"*/" { BEGIN(in_struct); }
["/] |
<in_struct_comment,in_comment>"*" {
- error_at_line (&lexer_line,
+ error_at_line (&lexer_line,
"unterminated comment or string; unexpected EOF");
}
{
va_list ap;
- fprintf (stderr, "%s:%d: parse error: ",
+ fprintf (stderr, "%s:%d: parse error: ",
get_input_file_name (lexer_line.file), lexer_line.line);
va_start (ap, msg);
/* Fatal message while reading state. */
-static void
+static void
fatal_reading_state (struct state_token_st* tok, const char*msg)
{
if (tok)
fatal ("%s:%d:%d: Invalid state file; %s",
- tok->stok_file, tok->stok_line, tok->stok_col,
- msg);
+ tok->stok_file, tok->stok_line, tok->stok_col,
+ msg);
else
- fatal ("%s:%d: Invalid state file; %s",
+ fatal ("%s:%d: Invalid state file; %s",
state_path, state_line, msg);
}
goto again;
/* Skip comments starting with semi-colon. */
if (c == ';')
- {
+ {
do
{
c = getc (state_file);
else
fatal_reading_state (t0, "Bad structures syntax");
if (countstruct != nbstruct)
- fatal_reading_state_printf (NULL_STATE_TOKEN,
+ fatal_reading_state_printf (NULL_STATE_TOKEN,
"expected %d structures but got %d",
nbstruct, countstruct);
if (verbosity_level >= 2)
The field has a tag of "1". This allows us to make the presence
of a field of type TYPE depend on some boolean "desc" being true. */
union_fields = create_field (NULL, type, "");
- union_fields->opt =
+ union_fields->opt =
create_string_option (union_fields->opt, "dot", "");
- union_fields->opt =
+ union_fields->opt =
create_string_option (union_fields->opt, "tag", "1");
- union_type =
+ union_type =
new_structure (xasprintf ("%s_%d", "fake_union", id++), TYPE_UNION,
&lexer_line, union_fields, NULL, NULL);
/* Create the field and give it the new fake union type. Add a "desc"
tag that specifies the condition under which the field is valid. */
return create_field_all (next, union_type, name,
- create_string_option (0, "desc", cond),
+ create_string_option (0, "desc", cond),
this_file, line);
}
rtvec_tp = create_pointer (find_structure ("rtvec_def", TYPE_STRUCT));
tree_tp = create_pointer (find_structure ("tree_node", TYPE_UNION));
mem_attrs_tp = create_pointer (find_structure ("mem_attrs", TYPE_STRUCT));
- reg_attrs_tp =
+ reg_attrs_tp =
create_pointer (find_structure ("reg_attrs", TYPE_STRUCT));
- basic_block_tp =
+ basic_block_tp =
create_pointer (find_structure ("basic_block_def", TYPE_STRUCT));
constant_tp =
create_pointer (find_structure ("constant_descriptor_rtx", TYPE_STRUCT));
/* NOTE_INSN_MAX is used as the default field for line
number notes. */
if (c == NOTE_INSN_MAX)
- note_flds->opt =
+ note_flds->opt =
create_string_option (nodot, "default", "");
else
- note_flds->opt =
+ note_flds->opt =
create_string_option (nodot, "tag", note_insn_name[c]);
}
note_union_tp = new_structure ("rtx_def_note_subunion", TYPE_UNION,
t = rtx_tp, subname = "rt_rtx";
else
{
- error_at_line
+ error_at_line
(&lexer_line,
"rtx type `%s' has `0' in position "
HOST_SIZE_T_PRINT_UNSIGNED ", can't handle",
create_string_option (subfields->opt, "desc",
"NOTE_KIND (&%0)");
if (t == symbol_union_tp)
- subfields->opt =
+ subfields->opt =
create_string_option (subfields->opt, "desc",
"CONSTANT_POOL_ADDRESS_P (&%0)");
}
{
size_t i;
for (i = 0; i < nb_plugin_files; i++)
- if (inpf == plugin_files[i])
+ if (inpf == plugin_files[i])
{
inpf->inpoutf = plugin_output;
return plugin_output;
printf ("%s write #%-3d %s\n", progname, nbwrittenfiles, of->name);
free (backupname);
}
- else
- {
+ else
+ {
/* output file remains unchanged. */
if (verbosity_level >= 2)
printf ("%s keep %s\n", progname, of->name);
maybe_undef_p = 1;
else if (strcmp (oo->name, "desc") == 0 && oo->kind == OPTION_STRING)
desc = oo->info.string;
- else if (strcmp (oo->name, "nested_ptr") == 0
+ else if (strcmp (oo->name, "nested_ptr") == 0
&& oo->kind == OPTION_NESTED)
nested_ptr_d = (const struct nested_ptr_data *) oo->info.nested;
else if (strcmp (oo->name, "dot") == 0)
{
fprintf (stderr,
"%s:%d: warning: field `%s' is missing `tag' or `default' option\n",
- get_input_file_name (d->line->file), d->line->line,
+ get_input_file_name (d->line->file), d->line->line,
f->name);
continue;
}
for (v = variables; v; v = v->next)
{
- outf_p f =
+ outf_p f =
get_output_file_with_visibility (CONST_CAST (input_file*,
v->line.file));
struct flist *fli;
static void
dump_fileloc (int indent, struct fileloc line)
{
- printf ("%*cfileloc: file = %s, line = %d\n", indent, ' ',
+ printf ("%*cfileloc: file = %s, line = %d\n", indent, ' ',
get_input_file_name (line.file),
line.line);
}
num_build_headers++;
}
if (verbosity_level >= 1)
- printf ("%s parsed %d files with %d GTY types\n",
+ printf ("%s parsed %d files with %d GTY types\n",
progname, (int) num_gt_files, type_count);
DBGPRINT_COUNT_TYPE ("structures after parsing", structures);
DBGPRINT_COUNT_TYPE ("structures before write_state", structures);
if (hit_error)
- fatal ("didn't write state file %s after errors",
+ fatal ("didn't write state file %s after errors",
write_state_filename);
DBGPRINTF ("before write_state %s", write_state_filename);
/* Variable length structure representing an input file. A hash table
ensure uniqueness for a given input file name. The only function
allocating input_file-s is input_file_by_name. */
-struct input_file_st
+struct input_file_st
{
struct outf* inpoutf; /* Cached corresponding output file, computed
in get_output_file_with_visibility. */
}
/* Give the file location of a type, if any. */
-inline struct fileloc*
+inline struct fileloc*
type_fileloc (type_p t)
{
- if (!t)
+ if (!t)
return NULL;
if (union_or_struct_p (t))
return &t->u.s.line;
static int
s_hook_eq_p (const void *p1, const void *p2)
{
- return (strcmp (((const struct s_hook *) p1)->name,
+ return (strcmp (((const struct s_hook *) p1)->name,
((const struct s_hook *) p2)->name) == 0);
}
if (i != shp->pos)
printf ("\n\n");
- /* Print header. Function-valued hooks have a parameter list,
+ /* Print header. Function-valued hooks have a parameter list,
unlike POD-valued ones. */
deftype = hook_array[i].param ? "deftypefn" : "deftypevr";
printf ("@%s {%s} ", deftype, hook_array[i].docname);
return ne;
}
-/* Determine whether O or its children uses the conditional operation
+/* Determine whether O or its children uses the conditional operation
group GRP. */
static bool
fprintf (stderr, "%s decision tree has %u leafs, maximum depth %u and "
"a total number of %u nodes\n",
- gimple ? "GIMPLE" : "GENERIC",
+ gimple ? "GIMPLE" : "GENERIC",
root->num_leafs, root->max_level, root->total_size);
/* First split out the transform part of equal leafs. */
else
fatal_at (token, "iterator cannot be used as operator-list");
}
- else
+ else
op->substitutes.safe_push (idb);
}
op->nargs = arity;
void
parser::parse_operator_list (location_t)
{
- const cpp_token *token = peek ();
+ const cpp_token *token = peek ();
const char *id = get_ident ();
if (get_operator (id, true) != 0)
user_id *op = new user_id (id, true);
int arity = -1;
-
+
while ((token = peek_ident ()) != 0)
{
- token = peek ();
+ token = peek ();
const char *oper = get_ident ();
id_base *idb = get_operator (oper, true);
-
+
if (idb == 0)
fatal_at (token, "no such operator '%s'", oper);
puts ("");
- printf ("#define BITS_PER_UNIT (%d)\n", bits_per_unit);
-
+ printf ("#define BITS_PER_UNIT (%d)\n", bits_per_unit);
+
if (max_bitsize_mode_any_int == 0)
{
for (max = 1, i = modes[MODE_INT]; i; i = i->next)
fprintf (h_file, "#define NUM_OPTAB_PATTERNS %u\n",
(unsigned) patterns.length ());
- fprintf (h_file,
+ fprintf (h_file,
"typedef enum optab_tag optab;\n"
"typedef enum optab_tag convert_optab;\n"
"typedef enum optab_tag direct_optab;\n"
/* First free larger continuous areas to the OS.
This allows other allocators to grab these areas if needed.
- This is only done on larger chunks to avoid fragmentation.
+ This is only done on larger chunks to avoid fragmentation.
This does not always work because the free_pages list is only
approximately sorted. */
prev = newprev;
}
- /* Now give back the fragmented pages to the OS, but keep the address
+ /* Now give back the fragmented pages to the OS, but keep the address
space to reuse it next time. */
for (p = G.free_pages; p; )
p = p->next;
}
/* Give the page back to the kernel, but don't free the mapping.
- This avoids fragmentation in the virtual memory map of the
+ This avoids fragmentation in the virtual memory map of the
process. Next time we can reuse it by just touching it. */
madvise (start, len, MADV_DONTNEED);
/* Don't count those pages as mapped to not touch the garbage collector
ggc_round_alloc_size (size_t requested_size)
{
size_t size = 0;
-
+
ggc_round_alloc_size_1 (requested_size, NULL, &size);
return size;
}
minbound = aref.sizrng[0];
}
}
-
+
/* The range of the byte offset into the reference. Adjusted below. */
offset_int offrange[2] = { aref.offrng[0], aref.offrng[1] };
to method that was partitioned elsehwere.
In this case we have static VAR_DECL or FUNCTION_DECL
that has no corresponding callgraph/varpool node
- declaring the body.
+ declaring the body.
3) COMDAT functions referred by external vtables that
we devirtualize only during final compilation stage.
At this time we already decided that we will not output
As observed in PR20991 for already optimized out comdat virtual functions
it may be tempting to not necessarily give up because the copy will be
- output elsewhere when corresponding vtable is output.
+ output elsewhere when corresponding vtable is output.
This is however not possible - ABI specify that COMDATs are output in
units where they are used and when the other unit was compiled with LTO
it is possible that vtable was kept public while the function itself
/* Fold a call to the __strncat_chk builtin with arguments DEST, SRC,
LEN, and SIZE. */
-static bool
+static bool
gimple_fold_builtin_strncat_chk (gimple_stmt_iterator *gsi)
{
gimple *stmt = gsi_stmt (*gsi);
simplified form of the call as a tree. FCODE is the BUILT_IN_*
code of the function to be simplified. */
-static bool
+static bool
gimple_fold_builtin_fprintf (gimple_stmt_iterator *gsi,
tree fp, tree fmt, tree arg,
enum built_in_function fcode)
#endif
location_t loc = gimple_location (gsi_stmt (*gsi));
-
+
tree host_eq = make_ssa_name (boolean_type_node);
gimple *host_ass = gimple_build_assign
(host_eq, EQ_EXPR, arg0, build_int_cst (TREE_TYPE (arg0), val_host));
return changed;
}
-/* Canonicalize and possibly invert the boolean EXPR; return NULL_TREE
+/* Canonicalize and possibly invert the boolean EXPR; return NULL_TREE
if EXPR is null or we don't know how.
If non-null, the result always has boolean type. */
/* We can only deal with variables whose definitions are assignments. */
if (!is_gimple_assign (stmt))
return NULL_TREE;
-
+
/* If we have an inverted comparison, apply DeMorgan's law and rewrite
!var AND (op2a code2 op2b) => !(var OR !(op2a code2 op2b))
Then we only have to consider the simpler non-inverted cases. */
tree t;
tree partial = NULL_TREE;
bool is_and = (innercode == BIT_AND_EXPR);
-
+
/* Check for boolean identities that don't require recursive examination
of inner1/inner2:
inner1 AND (inner1 AND inner2) => inner1 AND inner2 => var
/* Save partial result for later. */
partial = t;
}
-
+
/* Compute the second partial result, (inner2 AND (op2a code op2b)) */
if (TREE_CODE (inner2) == SSA_NAME
&& is_gimple_assign (s = SSA_NAME_DEF_STMT (inner2))
for (i = 0; i < gimple_phi_num_args (stmt); i++)
{
tree arg = gimple_phi_arg_def (stmt, i);
-
+
/* If this PHI has itself as an argument, ignore it.
If all the other args produce the same result,
we're still OK. */
/* We can only deal with variables whose definitions are assignments. */
if (!is_gimple_assign (stmt))
return NULL_TREE;
-
+
/* If we have an inverted comparison, apply DeMorgan's law and rewrite
!var OR (op2a code2 op2b) => !(var AND !(op2a code2 op2b))
Then we only have to consider the simpler non-inverted cases. */
if (t)
return t;
}
-
+
/* If the definition is an AND or OR expression, we may be able to
simplify by reassociating. */
if (TREE_CODE (TREE_TYPE (var)) == BOOLEAN_TYPE
tree t;
tree partial = NULL_TREE;
bool is_or = (innercode == BIT_IOR_EXPR);
-
+
/* Check for boolean identities that don't require recursive examination
of inner1/inner2:
inner1 OR (inner1 OR inner2) => inner1 OR inner2 => var
? boolean_true_node
: or_var_with_comparison (type, inner1, false, code2, op2a,
op2b, outer_cond_bb));
-
+
/* Next, redistribute/reassociate the OR across the inner tests.
Compute the first partial result, (inner1 OR (op2a code op2b)) */
if (TREE_CODE (inner1) == SSA_NAME
else if (integer_zerop (t))
return inner2;
}
-
+
/* Handle the AND case, where we are redistributing:
(inner1 AND inner2) OR (op2a code2 op2b)
=> (t AND (inner2 OR (op2a code op2b))) */
/* Save partial result for later. */
partial = t;
}
-
+
/* Compute the second partial result, (inner2 OR (op2a code op2b)) */
if (TREE_CODE (inner2) == SSA_NAME
&& is_gimple_assign (s = SSA_NAME_DEF_STMT (inner2))
else if (partial && same_bool_result_p (t, partial))
return t;
}
-
+
/* Handle the AND case, where we are redistributing:
(inner1 AND inner2) OR (op2a code2 op2b)
=> (t AND (inner1 OR (op2a code2 op2b)))
=> (t AND partial) */
- else
+ else
{
if (integer_zerop (t))
return boolean_false_node;
for (i = 0; i < gimple_phi_num_args (stmt); i++)
{
tree arg = gimple_phi_arg_def (stmt, i);
-
+
/* If this PHI has itself as an argument, ignore it.
If all the other args produce the same result,
we're still OK. */
}
/* Lookup virtual method with index TOKEN in a virtual table V
- at OFFSET.
+ at OFFSET.
Set CAN_REFER if non-NULL to false if method
is not referable or if the virtual table is ill-formed (such as rewriten
by non-C++ produced symbol). Otherwise just return NULL in that calse. */
return as_a <gphi *> (ptr);
}
};
-
+
enum gsi_iterator_update
{
GSI_NEW_STMT = 2, /* Move the iterator to the first statement added. */
#include "tree-cfgcleanup.h"
/* Unroll and Jam transformation
-
+
This is a combination of two transformations, where the second
is not always valid. It's applicable if a loop nest has redundancies
over the iterations of an outer loop while not having that with
1 0 0 w a[0][0] b[0][0]
4 1 0 r a[2][0] b[2][0]
5 1 0 w a[1][0] b[1][0]
- 2 0 1 r a[1][0] b[1][1]
+ 2 0 1 r a[1][0] b[1][1]
3 0 1 w a[0][0] b[0][1]
Note how access 2 accesses the same element as access 5
for array 'a' but not for array 'b'. */
/* __builtin_setjmp_{setup,receiver} aren't ECF_RETURNS_TWICE and for RTL
these builtins are modelled as non-local label jumps to the label
that is passed to these two builtins, so pretend we have a non-local
- label during GIMPLE passes too. See PR60003. */
+ label during GIMPLE passes too. See PR60003. */
cfun->has_nonlocal_label = 1;
/* NEXT_LABEL is the label __builtin_longjmp will jump to. Its address is
gimple_match_op::gimple_match_op (const gimple_match_cond &cond_in,
code_helper code_in, tree type_in,
tree op0, tree op1)
- : cond (cond_in), code (code_in), type (type_in), reverse (false),
+ : cond (cond_in), code (code_in), type (type_in), reverse (false),
num_ops (2)
{
ops[0] = op0;
dump_generic_node (pp, gimple_assign_rhs3 (gs), spc, flags, false);
pp_greater (pp);
break;
-
+
case VEC_PERM_EXPR:
if (flags & TDF_GIMPLE)
pp_string (pp, "__VEC_PERM (");
static const char *const unique_args[] = {IFN_UNIQUE_CODES};
#undef DEF
enums = unique_args;
-
+
limit = ARRAY_SIZE (unique_args);
break;
-
+
case IFN_GOACC_LOOP:
#define DEF(X) #X
static const char *const loop_args[] = {IFN_GOACC_LOOP_CODES};
return m_tab[v] != NULL;
}
-// Retrieve the global range of NAME from cache memory if it exists.
+// Retrieve the global range of NAME from cache memory if it exists.
// Return the value in R.
bool
// If the cache couldn't set the value, mark it as failed.
if (!ok_p)
m_update->propagation_failed (bb);
- if (DEBUG_RANGE_CACHE)
+ if (DEBUG_RANGE_CACHE)
{
if (!ok_p)
{
FOR_EACH_EDGE (e, ei, bb->succs)
if (m_on_entry.bb_range_p (name, e->dest))
{
- if (DEBUG_RANGE_CACHE)
+ if (DEBUG_RANGE_CACHE)
fprintf (dump_file, " bb%d",e->dest->index);
m_update->add (e->dest);
}
- if (DEBUG_RANGE_CACHE)
+ if (DEBUG_RANGE_CACHE)
fprintf (dump_file, "\n");
}
}
#ifndef GCC_SSA_RANGE_CACHE_H
#define GCC_SSA_RANGE_CACHE_H
-#include "gimple-range-gori.h"
+#include "gimple-range-gori.h"
#include "gimple-range-infer.h"
#include "gimple-range-phi.h"
bitmap active_p;
};
-// This class provides all the caches a global ranger may need, and makes
+// This class provides all the caches a global ranger may need, and makes
// them available for gori-computes to query so outgoing edges can be
// properly calculated.
// arguments are 32 bit, causing a trap when we create a case_range.
// Until this is resolved (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87798)
// punt on switches where the labels don't match the argument.
- if (gimple_switch_num_labels (sw) > 1 &&
+ if (gimple_switch_num_labels (sw) > 1 &&
TYPE_PRECISION (TREE_TYPE (CASE_LOW (gimple_switch_label (sw, 1)))) !=
TYPE_PRECISION (TREE_TYPE (gimple_switch_index (sw))))
return false;
// For a COND_EXPR, the TRUE edge will return [1,1] and the false edge a [0,0].
//
// For SWITCH_EXPR, it is awkward to calculate ranges. When a request
-// is made, the entire switch is evaluated and the results cached.
+// is made, the entire switch is evaluated and the results cached.
// Any future requests to that switch will use the cached value, providing
// dramatic decrease in computation time.
//
// If there is any known range for b_4 coming into this block, it can refine
// the results. This allows for cascading results to be propagated.
// if b_4 is [100, 200] on entry to the block, feeds into the calculation
-// of a_2 = [92, 192], and finally on the true edge the range would be
+// of a_2 = [92, 192], and finally on the true edge the range would be
// an empty range [] because it is not possible for the true edge to be taken.
//
-// expr_range_in_bb is simply a wrapper which calls ssa_range_in_bb for
+// expr_range_in_bb is simply a wrapper which calls ssa_range_in_bb for
// SSA_NAMES and otherwise simply calculates the range of the expression.
//
// The constructor takes a flag value to use on edges to check for the
// PHI cycle members qa_9, qa_10
// Initial value : 0
// modifier stmt: qa_20 = qa_10 + 1;
-//
+//
// Based on just this analysis, We can project that qa_9 and qa_10 will have
// a range of [0, +INF].
range_on_entry (r, bb, name);
gcc_checking_assert (r.undefined_p ()
|| range_compatible_p (r.type (), TREE_TYPE (name)));
-
+
if (idx)
tracer.trailer (idx, "range_on_exit", true, name, r);
return true;
}
// Called during dominator walks to register any inferred ranges that take
-// effect from this point forward.
+// effect from this point forward.
void
gimple_ranger::register_inferred_ranges (gimple *s)
{
clobber_first = true;
unsigned HOST_WIDE_INT pos = group->start / BITS_PER_UNIT;
- FOR_EACH_VEC_ELT (split_stores, i, split_store)
+ FOR_EACH_VEC_ELT (split_stores, i, split_store)
if (split_store->bytepos != pos)
{
clobber_first = false;
else if (handled_load (def_stmt, &ops[0], bitsize, bitpos,
bitregion_start, bitregion_end))
rhs_code = MEM_REF;
- else if (gimple_assign_rhs_code (def_stmt) == BIT_NOT_EXPR)
+ else if (gimple_assign_rhs_code (def_stmt) == BIT_NOT_EXPR)
{
tree rhs1 = gimple_assign_rhs1 (def_stmt);
if (TREE_CODE (rhs1) == SSA_NAME
(CAND_ADD) S0: Y = B + (i' * S)
is called a "basis" for S1. In both cases, S1 may be replaced by
-
+
S1': X = Y + (i - i') * S,
where (i - i') * S is folded to the extent possible.
given at least one entry in the candidate table. Such statements
include addition, pointer addition, subtraction, multiplication,
negation, copies, and nontrivial type casts. If a statement may
- represent more than one expression of the forms of S1 above,
+ represent more than one expression of the forms of S1 above,
multiple "interpretations" are stored in the table and chained
together. Examples:
Strength reduction in addressing
--------------------------------
There is another kind of candidate known as CAND_REF. A CAND_REF
- describes a statement containing a memory reference having
+ describes a statement containing a memory reference having
complex addressing that might benefit from strength reduction.
- Specifically, we are interested in references for which
+ Specifically, we are interested in references for which
get_inner_reference returns a base address, offset, and bitpos as
follows:
offset: MULT_EXPR (PLUS_EXPR (T2, C2), C3)
bitpos: C4 * BITS_PER_UNIT
- Here T1 and T2 are arbitrary trees, and C1, C2, C3, C4 are
+ Here T1 and T2 are arbitrary trees, and C1, C2, C3, C4 are
arbitrary integer constants. Note that C2 may be zero, in which
case the offset will be MULT_EXPR (T2, C3).
Strength reduction of CAND_REFs uses the same infrastructure as
that used by CAND_MULTs and CAND_ADDs. We record T1 in the base (B)
- field, MULT_EXPR (T2, C3) in the stride (S) field, and
+ field, MULT_EXPR (T2, C3) in the stride (S) field, and
C1 + (C2 * C3) + C4 in the index (i) field. A basis for a CAND_REF
- is thus another CAND_REF with the same B and S values. When at
+ is thus another CAND_REF with the same B and S values. When at
least two CAND_REFs are chained together using the basis relation,
each of them is replaced as above, resulting in improved code
generation for addressing.
is its derived base name (as is the case with argument x_0).
The hidden basis for statement (6) is the nearest dominating candidate
- whose base name is the derived base name (x_0) of the feeding phi (4),
+ whose base name is the derived base name (x_0) of the feeding phi (4),
and whose stride is identical to that of the statement. We can then
create the new "phi basis" (4a) and feeding adds along incoming arcs (3a),
allowing the final replacement of (6) by the strength-reduced (6r).
extracting the derived base name, and searching for a basis in the
usual manner after substituting the derived base name.
- Note that the transformation is only valid when the original phi and
+ Note that the transformation is only valid when the original phi and
the statements that define the phi's arguments are all at the same
position in the loop hierarchy. */
/* The type to be used to interpret the stride field when the stride
is not a constant. Normally the same as the type of the recorded
stride, but when the stride has been cast we need to maintain that
- knowledge in order to make legal substitutions without losing
+ knowledge in order to make legal substitutions without losing
precision. When the stride is a constant, this will be sizetype. */
tree stride_type;
lhs = gimple_assign_lhs (gs);
rhs1 = gimple_assign_rhs1 (gs);
lhs_mode = TYPE_MODE (TREE_TYPE (lhs));
-
+
switch (gimple_assign_rhs_code (gs))
{
case MULT_EXPR:
will go away. */
case SSA_NAME:
return 0;
-
+
default:
;
}
-
+
gcc_unreachable ();
}
return (slsr_cand_t) NULL;
result = stmt_cand_map->get (def);
-
+
if (result && (*result)->kind != CAND_REF)
return *result;
ctype = base_cand->cand_type;
stype = TREE_TYPE (stride_in);
if (has_single_use (base_in))
- savings = (base_cand->dead_savings
+ savings = (base_cand->dead_savings
+ stmt_cost (base_cand->cand_stmt, speed));
}
else if (base_cand->kind == CAND_ADD
stride = wide_int_to_tree (TREE_TYPE (stride_in), temp);
ctype = base_cand->cand_type;
if (has_single_use (base_in))
- savings = (base_cand->dead_savings
+ savings = (base_cand->dead_savings
+ stmt_cost (base_cand->cand_stmt, speed));
}
}
ctype = TREE_TYPE (base_in);
stype = subtrahend_cand->cand_type;
if (has_single_use (addend_in))
- savings = (subtrahend_cand->dead_savings
+ savings = (subtrahend_cand->dead_savings
+ stmt_cost (subtrahend_cand->cand_stmt, speed));
}
subtrahend_cand = lookup_cand (subtrahend_cand->next_interp);
}
}
-
+
base_cand = lookup_cand (base_cand->next_interp);
}
/* Y = (B + i') * S, S constant, c = kS for some integer k
X = Y + c
============================
- X = (B + (i'+ k)) * S
+ X = (B + (i'+ k)) * S
OR
Y = B + (i' * S), S constant, c = kS for some integer k
X = Y + c
ctype = base_cand->cand_type;
stype = base_cand->stride_type;
if (has_single_use (base_in))
- savings = (base_cand->dead_savings
+ savings = (base_cand->dead_savings
+ stmt_cost (base_cand->cand_stmt, speed));
}
which comes from the cast, and the base candidate's cast,
which is no longer applicable. */
if (has_single_use (rhs1))
- savings = (base_cand->dead_savings
+ savings = (base_cand->dead_savings
+ stmt_cost (base_cand->cand_stmt, speed));
c = alloc_cand_and_find_basis (base_cand->kind, gs,
base_cand = lookup_cand (base_cand->next_interp);
}
}
- else
+ else
{
/* If nothing is known about the RHS, create fresh CAND_ADD and
CAND_MULT interpretations:
appropriate entry in the candidate table.
This interface is included for completeness, but is unnecessary
- if this pass immediately follows a pass that performs copy
+ if this pass immediately follows a pass that performs copy
propagation, such as DOM. */
static void
{
/* Propagate all data from the base candidate. */
if (has_single_use (rhs1))
- savings = (base_cand->dead_savings
+ savings = (base_cand->dead_savings
+ stmt_cost (base_cand->cand_stmt, speed));
c = alloc_cand_and_find_basis (base_cand->kind, gs,
base_cand = lookup_cand (base_cand->next_interp);
}
}
- else
+ else
{
/* If nothing is known about the RHS, create fresh CAND_ADD and
CAND_MULT interpretations:
slsr_cand_t c;
fprintf (dump_file, "\nStrength reduction candidate vector:\n\n");
-
+
FOR_EACH_VEC_ELT (cand_vec, i, c)
if (c != NULL)
dump_candidate (c);
unsigned i;
fprintf (dump_file, "\nIncrement vector:\n\n");
-
+
for (i = 0; i < incr_vec_len; i++)
{
fprintf (dump_file, "%3d increment: ", i);
&& lookup_cand (c->basis)->def_phi != c->def_phi);
}
-/* Calculate the increment required for candidate C relative to
+/* Calculate the increment required for candidate C relative to
its basis. */
static offset_int
stmt_to_print = gsi_stmt (gsi);
}
}
-
+
if (dump_file && (dump_flags & TDF_DETAILS))
{
fputs ("With: ", dump_file);
incr_vec_index (const offset_int &increment)
{
unsigned i;
-
+
for (i = 0; i < incr_vec_len && increment != incr_vec[i].incr; i++)
;
basis_type = TREE_TYPE (basis_name);
lhs = make_temp_ssa_name (basis_type, NULL, "slsr");
- /* Occasionally people convert integers to pointers without a
+ /* Occasionally people convert integers to pointers without a
cast, leading us into trouble if we aren't careful. */
enum tree_code plus_code
= POINTER_TYPE_P (basis_type) ? POINTER_PLUS_EXPR : PLUS_EXPR;
slsr_cand_t basis;
location_t loc;
- /* Look up the LHS SSA name from C's basis. This will be the
+ /* Look up the LHS SSA name from C's basis. This will be the
RHS1 of the adds we will introduce to create new phi arguments. */
basis = lookup_cand (c->basis);
basis_name = gimple_assign_lhs (basis->cand_stmt);
}
/* Compute the expected costs of inserting basis adjustments for
- candidate C with phi-definition PHI. The cost of inserting
+ candidate C with phi-definition PHI. The cost of inserting
one adjustment is given by ONE_ADD_COST. If PHI has arguments
which are themselves phi results, recursively calculate costs
for those phis as well. */
return retval;
}
/* For candidate C, each sibling of candidate C, and each dependent of
- candidate C, determine whether the candidate is dependent upon a
+ candidate C, determine whether the candidate is dependent upon a
phi that hides its basis. If not, replace the candidate unconditionally.
Otherwise, determine whether the cost of introducing compensation code
for the candidate is offset by the gains from strength reduction. If
of a copy or cast; there is no value in replacing it. */
if (c->kind == CAND_MULT && wi::to_offset (c->stride) != 1)
{
- /* A candidate dependent upon a phi will replace a multiply by
+ /* A candidate dependent upon a phi will replace a multiply by
a constant with an add, and will insert at most one add for
each phi argument. Add these costs with the potential dead-code
savings to determine profitability. */
int mult_savings = stmt_cost (c->cand_stmt, speed);
gimple *phi = lookup_cand (c->def_phi)->cand_stmt;
tree phi_result = gimple_phi_result (phi);
- int one_add_cost = add_cost (speed,
+ int one_add_cost = add_cost (speed,
TYPE_MODE (TREE_TYPE (phi_result)));
int add_costs = one_add_cost + phi_add_costs (phi, c, one_add_cost);
int cost = add_costs - mult_savings - c->dead_savings;
incr_vec[i].initializer = NULL_TREE;
incr_vec[i].init_bb = NULL;
}
-
+
break;
}
}
incr_vec[incr_vec_len].incr = increment;
incr_vec[incr_vec_len].count = c->basis || is_phi_adjust ? 1 : 0;
incr_vec[incr_vec_len].cost = COST_INFINITE;
-
+
/* Optimistically record the first occurrence of this increment
as providing an initializer (if it does); we will revise this
opinion later if it doesn't dominate all other occurrences.
{
unsigned i;
slsr_cand_t phi_cand = *stmt_cand_map->get (phi);
-
+
if (phi_cand->visited)
return;
phi_cand->visited = 1;
arg_cand = base_cand_from_table (arg);
diff = arg_cand->index - basis->index;
}
-
+
if (incr == diff)
{
tree basis_lhs = gimple_assign_lhs (basis->cand_stmt);
}
if (c->dependent)
- local_cost = lowest_cost_path (local_cost, repl_savings,
+ local_cost = lowest_cost_path (local_cost, repl_savings,
lookup_cand (c->dependent), incr,
count_phis);
}
ncd = nearest_common_dominator (CDI_DOMINATORS, bb1, bb2);
-
+
/* If both candidates are in the same block, the earlier
candidate wins. */
if (bb1 == ncd && bb2 == ncd)
if (gimple_code (arg_def) == GIMPLE_PHI)
ncd = ncd_with_phi (c, incr, as_a <gphi *> (arg_def), ncd, where);
- else
+ else
{
offset_int diff;
slsr_cand_t arg_cand = base_cand_from_table (arg);
diff = arg_cand->index - basis->index;
}
-
+
basic_block pred = gimple_phi_arg_edge (phi, i)->src;
-
+
if ((incr == diff) || (!address_arithmetic_p && incr == -diff))
ncd = ncd_for_two_cands (ncd, pred, *where, NULL, where);
}
ncd = gimple_bb (c->cand_stmt);
*where = c;
}
-
+
if (phi_dependent_cand_p (c))
ncd = ncd_with_phi (c, incr,
as_a <gphi *> (lookup_cand (c->def_phi)->cand_stmt),
return true;
}
-
+
/* Return TRUE iff all required increments for candidates feeding PHI
are profitable (and legal!) to replace on behalf of candidate C. */
return cast_lhs;
}
-/* Replace the RHS of the statement represented by candidate C with
+/* Replace the RHS of the statement represented by candidate C with
NEW_CODE, NEW_RHS1, and NEW_RHS2, provided that to do so doesn't
leave C unchanged or just interchange its operands. The original
operation and operands are in OLD_CODE, OLD_RHS1, and OLD_RHS2.
{
tree stride_type = TREE_TYPE (c->stride);
tree orig_type = TREE_TYPE (orig_rhs2);
-
+
if (types_compatible_p (orig_type, stride_type))
rhs2 = c->stride;
else
rhs2 = introduce_cast_before_cand (c, orig_type, c->stride);
-
+
stmt_to_print = replace_rhs_if_not_dup (repl_code, basis_name, rhs2,
orig_code, orig_rhs1, orig_rhs2,
c);
tree stride_type = TREE_TYPE (c->stride);
tree orig_type = TREE_TYPE (orig_rhs2);
gcc_assert (repl_code != POINTER_PLUS_EXPR);
-
+
if (types_compatible_p (orig_type, stride_type))
rhs2 = c->stride;
else
rhs2 = introduce_cast_before_cand (c, orig_type, c->stride);
-
+
if (orig_code != MINUS_EXPR
|| !operand_equal_p (basis_name, orig_rhs1, 0)
|| !operand_equal_p (rhs2, orig_rhs2, 0))
tree lhs = gimple_assign_lhs (c->cand_stmt);
tree lhs_type = TREE_TYPE (lhs);
tree basis_type = TREE_TYPE (basis_name);
-
+
if (types_compatible_p (lhs_type, basis_type))
{
gassign *copy_stmt = gimple_build_assign (lhs, basis_name);
}
else
gcc_unreachable ();
-
+
if (dump_file && (dump_flags & TDF_DETAILS) && stmt_to_print)
{
fputs ("With: ", dump_file);
/* Only process profitable increments. Nothing useful can be done
to a cast or copy. */
if (i >= 0
- && profitable_increment_p (i)
+ && profitable_increment_p (i)
&& orig_code != SSA_NAME
&& !CONVERT_EXPR_CODE_P (orig_code))
{
if (all_phi_incrs_profitable (c, phi))
{
- /* Look up the LHS SSA name from C's basis. This will be
+ /* Look up the LHS SSA name from C's basis. This will be
the RHS1 of the adds we will introduce to create new
phi arguments. */
slsr_cand_t basis = lookup_cand (c->basis);
check_memop_access (stmt, dst, NULL_TREE, len);
return true;
}
-
+
default:
if (check_atomic_builtin (stmt))
return true;
}
/* Callback for walk_stmt_load_store_ops.
-
+
Return TRUE if OP will dereference the tree stored in DATA, FALSE
otherwise.
-/* Tree lowering to gimple for middle end use only.
+/* Tree lowering to gimple for middle end use only.
This converts the GENERIC functions-as-trees tree representation into
the GIMPLE form.
Copyright (C) 2013-2024 Free Software Foundation, Inc.
if (!VOID_TYPE_P (TREE_TYPE (else_)))
else_ = build_fold_addr_expr_loc (loc, else_);
-
+
expr
= build3 (COND_EXPR, type, TREE_OPERAND (expr, 0), then_, else_);
rtype = "teams";
else
gcc_unreachable ();
-
+
error ("%qE not specified in enclosing %qs",
DECL_NAME (lang_hooks.decls.omp_report_decl (decl)), rtype);
inform (ctx->location, "enclosing %qs", rtype);
}
}
}
-
+
if (TREE_CODE (decl) == PARM_DECL
|| (!is_global_var (decl)
&& DECL_CONTEXT (decl) == current_function_decl))
/* Don't call omp_finish_clause on implicitly added OMP_CLAUSE_PRIVATE
in simd. Those are only added for the local vars inside of simd body
and they don't need to be e.g. default constructible. */
- if (code != OMP_CLAUSE_PRIVATE || ctx->region_type != ORT_SIMD)
+ if (code != OMP_CLAUSE_PRIVATE || ctx->region_type != ORT_SIMD)
lang_hooks.decls.omp_finish_clause (clause, pre_p,
(ctx->region_type & ORT_ACC) != 0);
if (gimplify_omp_ctxp)
-1 indeterminate
0 evaluate all operations and constants just to the range and
precision of the type
- 1 evaluate operations and constants of type _Decimal32
- and _Decimal64 to the range and precision of the _Decimal64
- type, evaluate _Decimal128 operations and constants to the
+ 1 evaluate operations and constants of type _Decimal32
+ and _Decimal64 to the range and precision of the _Decimal64
+ type, evaluate _Decimal128 operations and constants to the
range and precision of the _Decimal128 type;
2 evaluate all operations and constants to the range and
precision of the _Decimal128 type. */
/* Define va_list, if desired, from __gnuc_va_list. */
/* We deliberately do not define va_list when called from
stdio.h, because ANSI C says that stdio.h is not supposed to define
- va_list. stdio.h needs to have access to that data type,
+ va_list. stdio.h needs to have access to that data type,
but must not use that name. It should use the name __gnuc_va_list,
which is safe because it is reserved for the implementation. */
typedef _Atomic __SIZE_TYPE__ atomic_size_t;
typedef _Atomic __PTRDIFF_TYPE__ atomic_ptrdiff_t;
typedef _Atomic __INTMAX_TYPE__ atomic_intmax_t;
-typedef _Atomic __UINTMAX_TYPE__ atomic_uintmax_t;
+typedef _Atomic __UINTMAX_TYPE__ atomic_uintmax_t;
#if !(defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L)
/* Note that these macros require __auto_type to remove
_Atomic qualifiers (and const qualifiers, if those are valid on
macro operands).
-
+
Also note that the header file uses the generic form of __atomic
builtins, which requires the address to be taken of the value
parameter, and then we pass that value on. This allows the macros
symbols in the _FOO_T_ family, stays defined even after its
corresponding type is defined). If we define wchar_t, then we
must undef _WCHAR_T_; for BSD/386 1.1 (and perhaps others), if
- we undef _WCHAR_T_, then we must also define rune_t, since
+ we undef _WCHAR_T_, then we must also define rune_t, since
headers like runetype.h assume that if machine/ansi.h is included,
and _BSD_WCHAR_T_ is not defined, then rune_t is available.
machine/ansi.h says, "Note that _WCHAR_T_ and _RUNE_T_ must be of
Bvariable*
Gcc_backend::local_variable(Bfunction* function, const std::string& name,
- Btype* btype, Bvariable* decl_var,
+ Btype* btype, Bvariable* decl_var,
unsigned int flags, Location location)
{
tree type_tree = btype->get_tree();
#endif
/* The first input file with an extension of .go. */
- const char *first_go_file = NULL;
+ const char *first_go_file = NULL;
/* Whether we saw any -g option. */
bool saw_opt_g = false;
break;
default:
- gcc_unreachable ();
+ gcc_unreachable ();
}
isl_ast_expr *arg_expr = isl_ast_expr_get_op_arg (expr, 0);
tree res = gcc_expression_from_isl_expression (type, arg_expr, ip);
/* Inserts in iv_map a tuple (OLD_LOOP->num, NEW_NAME) for the induction
variables of the loops around GBB in SESE.
-
+
FIXME: Instead of using a vec<tree> that maps each loop id to a possible
chrec, we could consider using a map<int, tree> that maps loop ids to the
corresponding tree expressions. */
isl_ast_node_list_free (node_list);
return next_e;
}
-
+
/* Creates a new if region corresponding to isl's cond. */
edge translate_isl_ast_to_gimple::
}
bitmap_set_bit (in_sese_region, bb->index);
-
+
basic_block dom = get_immediate_dominator (CDI_DOMINATORS, bb);
FOR_EACH_EDGE (e, ei, bb->preds)
if (e->src == dom
/* Compute alias-sets for all data references in DRS. */
-static bool
+static bool
build_alias_set (scop_p scop)
{
int num_vertices = scop->drs.length ();
hstate.add_int (key.loop_num);
inchash::add_expr (key.expr, hstate);
key.hash = hstate.end ();
-
+
bool existed;
tree &chrec = seir_cache->get_or_insert (key, &existed);
if (!existed)
MAX_STAGES provides us with a limit
after which we give up scheduling; the caller must have unrolled at least
as many copies of the loop body and recorded delay_pairs for them.
-
+
INSNS is the number of real (non-debug) insns in one iteration of
the loop. MAX_UID can be used to test whether an insn belongs to
the first iteration of the loop; all of them have a uid lower than
}
return 0;
}
-
+
else if (n_control == 1 && n_replace == 0 && n_spec == 0)
{
rtx_insn *pro, *other;
rtx_insn *prev = NULL;
int i;
unsigned regno;
-
+
if ((current_sched_info->flags & DO_PREDICATION) == 0
|| (ORIG_PAT (next) != NULL_RTX
&& PREDICATED_PAT (next) == NULL_RTX))
code to divide by a constant, we want to be able to use the same algorithm
all the time. All of these inverses (are implied to) have bit 32 set.
- For the record, here's the function that computed the table; it's a
+ For the record, here's the function that computed the table; it's a
vastly simplified version of the function of the same name from gcc. */
struct prime_ent const prime_tab[] = {
if (!found_tail)
loop->bad = true;
-
+
/* Find the predecessor, and make sure nothing else jumps into this loop. */
if (!loop->bad)
{
}
loops = loops->next;
}
-
+
FOR_EACH_BB_FN (bb, cfun)
{
if (bb->next_bb != EXIT_BLOCK_PTR_FOR_FN (cfun))
/* The following values are collected before calling the target's optimize
function and are not valid earlier. */
-
+
/* Record information about control flow: whether the loop has calls
or asm statements, whether it has edges that jump out of the loop,
or edges that jump within the loop. */
to be either long or long long. */
#define HOST_BITS_PER_WIDE_INT 64
-#if INT64_T_IS_LONG
+#if INT64_T_IS_LONG
# define HOST_WIDE_INT long
# define HOST_WIDE_INT_C(X) X ## L
#else
/* Determine whether the total insn_cost on non-jump insns in
basic block BB is less than MAX_COST. This function returns
- false if the cost of any instruction could not be estimated.
+ false if the cost of any instruction could not be estimated.
The cost of the non-jump insns in BB is scaled by REG_BR_PROB_BASE
as those insns are being speculated. MAX_COST is scaled with SCALE
if (HOST_STAT_FOR_64BIT_INODES (cur->name, &st))
{
- /* Dirs that don't exist or have denied permissions are
+ /* Dirs that don't exist or have denied permissions are
silently ignored, unless verbose. */
if ((errno != ENOENT) && (errno != EPERM))
cpp_errno (pfile, CPP_DL_ERROR, cur->name);
profile_probability::very_unlikely ());
}
if (GET_CODE (target) == SUBREG && SUBREG_PROMOTED_VAR_P (target))
- /* If this is a scalar in a register that is stored in a wider mode
+ /* If this is a scalar in a register that is stored in a wider mode
than the declared mode, compute the result into its declared mode
and then convert to the wider mode. Our value is the computed
expression. */
&& JUMP_P (last)
&& any_condjump_p (last)
&& !find_reg_note (last, REG_BR_PROB, 0))
- add_reg_br_prob_note (last,
+ add_reg_br_prob_note (last,
profile_probability::very_unlikely ());
emit_jump (done_label);
goto do_error_label;
&& JUMP_P (last)
&& any_condjump_p (last)
&& !find_reg_note (last, REG_BR_PROB, 0))
- add_reg_br_prob_note (last,
+ add_reg_br_prob_note (last,
profile_probability::very_unlikely ());
emit_jump (done_label);
}
if (find_widening_optab_handler (umul_widen_optab, wmode, mode)
!= CODE_FOR_nothing)
return true;
-
+
if (find_widening_optab_handler (smul_widen_optab, wmode, mode)
!= CODE_FOR_nothing)
return true;
rtx ret = expand_mult (wmode, op0, op1, NULL_RTX, uns, true);
delete_insns_since (last);
return ret != NULL_RTX;
-}
+}
/* Add mul overflow checking to the statement STMT. */
&& JUMP_P (last)
&& any_condjump_p (last)
&& !find_reg_note (last, REG_BR_PROB, 0))
- add_reg_br_prob_note (last,
+ add_reg_br_prob_note (last,
profile_probability::very_unlikely ());
emit_jump (done_label);
}
NULL_RTX, NULL, done_label,
profile_probability::very_likely ());
}
-
+
}
else if (int_mode_for_size (prec / 2, 1).exists (&hmode)
&& 2 * GET_MODE_PRECISION (hmode) == prec)
FOR_EACH_DEFINED_SYMBOL (symbol)
{
struct cgraph_node *fun;
- symbol->aux = NULL;
+ symbol->aux = NULL;
if (!symbol->get_comdat_group ()
&& !symbol->alias
&& (!(fun = dyn_cast <cgraph_node *> (symbol))
{
/* Extra paranoia; compare the sizes. We do not have information
about virtual inheritance offsets, so just be sure that these
- match.
+ match.
Do this as very last check so the not very informative error
is not output too often. */
if (DECL_SIZE (prevailing->decl) != DECL_SIZE (vtable->decl))
{
tree i1 = TYPE_DOMAIN (t1);
tree i2 = TYPE_DOMAIN (t2);
-
+
if (i1 && i2
&& TYPE_MAX_VALUE (i1)
&& TYPE_MAX_VALUE (i2)
warn_odr (t1, t2, f1, f2, warn, warned,
G_("a type with different number of fields "
"is defined in another translation unit"));
-
+
return false;
}
}
if (symtab->dump_file)
{
fprintf (symtab->dump_file, "ODR base violation\n");
-
+
print_node (symtab->dump_file, "", val->type, 0);
putc ('\n',symtab->dump_file);
print_node (symtab->dump_file, "", type, 0);
}
/* Return true if N has reference from live virtual table
- (and thus can be a destination of polymorphic call).
+ (and thus can be a destination of polymorphic call).
Be conservatively correct when callgraph is not built or
if the method may be referred externally. */
/* Keep this test constant time.
It is unlikely this can happen except for the case where speculative
- devirtualization introduced many speculative edges to this node.
+ devirtualization introduced many speculative edges to this node.
In this case the target is very likely alive anyway. */
if (node->ref_list.referring.length () > 100)
return true;
/* The only case when method of anonymous namespace becomes unreferable
is when we completely optimized it out. */
if (flag_ltrans
- || !target
+ || !target
|| !type_in_anonymous_namespace_p (DECL_CONTEXT (target)))
*completep = false;
return;
}
/* Method can only be called by polymorphic call if any
- of vtables referring to it are alive.
+ of vtables referring to it are alive.
While this holds for non-anonymous functions, too, there are
cases where we want to keep them in the list; for example
*completep = false;
}
-/* See if BINFO's type matches OUTER_TYPE. If so, look up
+/* See if BINFO's type matches OUTER_TYPE. If so, look up
BINFO of subtype of OTR_TYPE at OFFSET and in that BINFO find
method in vtable and insert method to NODES array
or BASES_TO_CONSIDER if this array is non-NULL.
/* Walking bases that have no virtual method is pointless exercise. */
if (polymorphic_type_binfo_p (base_binfo))
record_target_from_binfo (nodes, bases_to_consider, base_binfo, otr_type,
- type_binfos,
+ type_binfos,
otr_token, outer_type, offset, inserted,
matched_vtables, anonymous, completep);
if (BINFO_VTABLE (binfo))
type_binfos.pop ();
}
-
+
/* Look up virtual methods matching OTR_TYPE (with OFFSET and OTR_TOKEN)
- of TYPE, insert them to NODES, recurse into derived nodes.
+ of TYPE, insert them to NODES, recurse into derived nodes.
INSERTED is used to avoid duplicate insertions of methods into NODES.
MATCHED_VTABLES are used to avoid duplicate walking vtables.
Clear COMPLETEP if unreferable target is found.
type->anonymous_namespace, completep);
}
for (i = 0; i < type->derived_types.length (); i++)
- possible_polymorphic_call_targets_1 (nodes, inserted,
+ possible_polymorphic_call_targets_1 (nodes, inserted,
matched_vtables,
otr_type,
type->derived_types[i],
}
/* T is known constant value of virtual table pointer.
- Store virtual table to V and its offset to OFFSET.
+ Store virtual table to V and its offset to OFFSET.
Return false if T does not look like virtual table reference. */
bool
unsigned HOST_WIDE_INT *offset)
{
/* We expect &MEM[(void *)&virtual_table + 16B].
- We obtain object's BINFO from the context of the virtual table.
+ We obtain object's BINFO from the context of the virtual table.
This one contains pointer to virtual table represented via
POINTER_PLUS_EXPR. Verify that this pointer matches what
we propagated through.
temporarily change to one of base types. INCLUDE_DERIVED_TYPES make
us to walk the inheritance graph for all derivations.
- If COMPLETEP is non-NULL, store true if the list is complete.
+ If COMPLETEP is non-NULL, store true if the list is complete.
CACHE_TOKEN (if non-NULL) will get stored to an unique ID of entry
in the target cache. If user needs to visit every target list
just once, it can memoize them.
else
target = NULL;
- /* In the case we get complete method, we don't need
+ /* In the case we get complete method, we don't need
to walk derivations. */
if (target && DECL_FINAL_P (target))
context.speculative_maybe_derived_type = false;
if (target && DECL_CXX_DESTRUCTOR_P (target))
context.maybe_in_construction = false;
- /* In the case we get complete method, we don't need
+ /* In the case we get complete method, we don't need
to walk derivations. */
if (target && DECL_FINAL_P (target))
{
}
FOR_EACH_DEFINED_FUNCTION (n)
- {
+ {
bool update = false;
if (!opt_for_fn (n->decl, flag_devirtualize))
continue;
possible_polymorphic_call_targets (e);
if (dump_file)
- dump_possible_polymorphic_call_targets
+ dump_possible_polymorphic_call_targets
(dump_file, e, (dump_flags & TDF_DETAILS));
npolymorphic++;
const char *rname = streamer_read_string (data_in, &ib);
unsigned int nvals = streamer_read_uhwi (&ib);
char *name;
-
+
obstack_grow (&odr_enum_obstack, rname, strlen (rname) + 1);
name = XOBFINISH (&odr_enum_obstack, char *);
present in the callgraph).
We provide access to the ipa_fn_summary data structure and
- basic logic updating the parameters when inlining is performed.
+ basic logic updating the parameters when inlining is performed.
The summaries are context sensitive. Context means
1) partial assignment of known constant values of operands
lhs_free = true;
/* Writes to parameters, parameters passed by value and return value
- (either directly or passed via invisible reference) are free.
+ (either directly or passed via invisible reference) are free.
TODO: We ought to handle testcase like
struct a {int a,b;};
}
/* Return probability (based on REG_BR_PROB_BASE) that I-th parameter of STMT
- will change since last invocation of STMT.
+ will change since last invocation of STMT.
Value 0 is reserved for compile time invariants.
For common parameters it is REG_BR_PROB_BASE. For loop invariants it
/* We would have to do non-trivial analysis to really work out what
is the probability of value to change (i.e. when init statement
- is in a sibling loop of the call).
+ is in a sibling loop of the call).
We do an conservative estimate: when call is executed N times more often
than the statement defining value, we take the frequency 1/N. */
max = max.max (BASIC_BLOCK_FOR_FN (cfun, index)->count);
if (dump_file)
{
- fprintf (dump_file, " Set with count ");
+ fprintf (dump_file, " Set with count ");
max.dump (dump_file);
- fprintf (dump_file, " and used with count ");
+ fprintf (dump_file, " and used with count ");
bb->count.dump (dump_file);
fprintf (dump_file, " freq %f\n",
- max.to_sreal_scale (bb->count).to_double ());
+ max.to_sreal_scale (bb->count).to_double ());
}
BITMAP_FREE (info.bb_set);
/* Return true when the basic blocks contains only clobbers followed by RESX.
Such BBs are kept around to make removal of dead stores possible with
presence of EH and will be optimized out by optimize_clobbers later in the
- game.
+ game.
NEED_EH is used to recurse in case the clobber has non-EH predecessors
that can be clobber only, too.. When it is false, the RESX is not necessary
When optimizing and analyzing for early inliner, initialize node params
so we can produce correct BB predicates. */
-
+
if (opt_for_fn (node->decl, optimize))
{
calculate_dominance_info (CDI_DOMINATORS);
}
else
{
- int prob = e->nonconst_predicate.probability
+ int prob = e->nonconst_predicate.probability
(info->conds, m_possible_truths,
m_inline_param_summary);
gcc_checking_assert (prob >= 0);
bitpack_d bp = streamer_read_bitpack (ib);
if (es)
- es->is_return_callee_uncaptured = bp_unpack_value (&bp, 1);
+ es->is_return_callee_uncaptured = bp_unpack_value (&bp, 1);
else
- bp_unpack_value (&bp, 1);
+ bp_unpack_value (&bp, 1);
p.stream_in (ib);
if (es)
es->param[i].change_prob = streamer_read_uhwi (ib);
bitpack_d bp = streamer_read_bitpack (ib);
es->param[i].points_to_local_or_readonly_memory
- = bp_unpack_value (&bp, 1);
+ = bp_unpack_value (&bp, 1);
es->param[i].points_to_possible_sra_candidate
- = bp_unpack_value (&bp, 1);
+ = bp_unpack_value (&bp, 1);
}
}
else
it. Set by simple_edge_hints in ipa-inline-analysis.cc. */
INLINE_HINT_declared_inline = 32,
/* Programs are usually still organized for non-LTO compilation and thus
- if functions are in different modules, inlining may not be so important.
+ if functions are in different modules, inlining may not be so important.
Set by simple_edge_hints in ipa-inline-analysis.cc. */
INLINE_HINT_cross_module = 64,
/* We know that the callee is hot by profile. */
sreal time;
};
-/* Summary about function and stack frame sizes. We keep this info
+/* Summary about function and stack frame sizes. We keep this info
for inline clones and also for WPA streaming. For this reason this is not
part of ipa_fn_summary which exists only for offline functions. */
class ipa_size_summary
return false;
}
-/* Clear DECL_RTL of NODE.
+/* Clear DECL_RTL of NODE.
Helper for call_for_symbol_thunks_and_aliases. */
static bool
return false;
return true;
}
-
+
case COMPONENT_REF:
case POINTER_PLUS_EXPR:
case PLUS_EXPR:
/* Scale counts of NODE edges by NUM/DEN. */
static void
-update_noncloned_counts (struct cgraph_node *node,
+update_noncloned_counts (struct cgraph_node *node,
profile_count num, profile_count den)
{
struct cgraph_edge *e;
if (dump_file)
fprintf (dump_file, "\nSaving body of %s for later reuse\n",
node->dump_name ());
-
+
gcc_assert (node == cgraph_node::get (node->decl));
/* first_clone will be turned into real function. */
unsigned int todo = 0;
struct cgraph_edge *e, *next;
bool has_inline = false;
-
+
/* FIXME: Currently the pass manager is adding inline transform more than
once to some clones. This needs revisiting after WPA cleanups. */
if (cfun->after_inlining)
static profile_count spec_rem;
/* Return false when inlining edge E would lead to violating
- limits on function unit growth or stack usage growth.
+ limits on function unit growth or stack usage growth.
The relative function body growth limit is present generally
to avoid problems with non-linear behavior of the compiler.
!= opts_for_fn (callee->decl)->x_##flag)
/* Decide if we can inline the edge and possibly update
- inline_failed reason.
+ inline_failed reason.
We check whether inlining is possible at all and whether
- caller growth limits allow doing so.
+ caller growth limits allow doing so.
if REPORT is true, output reason to the dump file. */
};
/* Decide if we can inline the edge and possibly update
- inline_failed reason.
+ inline_failed reason.
We check whether inlining is possible at all and whether
caller growth limits allow doing so. */
/* EDGE is self recursive edge.
We handle two cases - when function A is inlining into itself
or when function A is being inlined into another inliner copy of function
- A within function B.
+ A within function B.
In first case OUTER_NODE points to the toplevel copy of A, while
in the second case OUTER_NODE points to the outermost copy of A in B.
Deciding reliably on when to do recursive inlining without profile feedback
is tricky. For now we disable recursive inlining when probability of self
- recursion is low.
+ recursion is low.
Recursive inlining of self recursive call within loop also results in
large loop depths that generally optimize badly. We may want to throttle
}
/* Return true when NODE has uninlinable caller;
- set HAS_HOT_CALL if it has hot call.
+ set HAS_HOT_CALL if it has hot call.
Worker for cgraph_for_node_and_aliases. */
static bool
}
/* Decide if inlining NODE would reduce unit size by eliminating
- the offline copy of function.
+ the offline copy of function.
When COLD is true the cold calls are considered, too. */
static bool
return sreal::max ();
}
/* When profile is available. Compute badness as:
-
+
time_saved * caller_count
goodness = -------------------------------------------------
growth_of_caller * overall_growth * combined_size
If UPDATE_SINCE is non-NULL check if edges called within that function
are inlinable (typically UPDATE_SINCE is the inline clone we introduced
where all edges have new context).
-
+
This is used when we know that edge badnesses are going only to increase
(we introduced new call site) and thus all we need is to insert newly
created edges into heap. */
&& (!max_count.initialized_p () || !max_count.nonzero_p ()))
{
sreal cached_badness = edge_badness (edge, false);
-
+
int old_size_est = estimate_edge_size (edge);
sreal old_time_est = estimate_edge_time (edge);
int old_hints_est = estimate_edge_hints (edge);
resolve_noninline_speculation (&edge_heap, edge);
continue;
}
-
+
callee = edge->callee->ultimate_alias_target ();
growth = estimate_edge_growth (edge);
if (dump_file)
symtab->remove_unreachable_nodes (dump_file);
/* Inline functions with a property that after inlining into all callers the
- code size will shrink because the out-of-line copy is eliminated.
+ code size will shrink because the out-of-line copy is eliminated.
We do this regardless on the callee size as long as function growth limits
are met. */
if (dump_file)
}
/* Return true if it seems valid to use placement new to build EXPECTED_TYPE
- at position CUR_OFFSET within TYPE.
+ at position CUR_OFFSET within TYPE.
POD can be changed to an instance of a polymorphic type by
placement new. Here we play safe and assume that any
}
and we look for type at offset sizeof(int), we end up with B and offset 0.
If the same is produced by multiple inheritance, we end up with A and offset
- sizeof(int).
+ sizeof(int).
If we cannot find corresponding class, give up by setting
- THIS->OUTER_TYPE to OTR_TYPE and THIS->OFFSET to NULL.
+ THIS->OUTER_TYPE to OTR_TYPE and THIS->OFFSET to NULL.
Return true when lookup was successful.
When CONSIDER_PLACEMENT_NEW is false, reject contexts that may be made
Because of the way the bases are packed into a class, the
field's size may be smaller than type size, so it needs
to be done with a care. */
-
+
if (pos <= (unsigned HOST_WIDE_INT)cur_offset
&& (pos + size) >= (unsigned HOST_WIDE_INT)cur_offset
+ POINTER_SIZE
if (speculative)
return true;
clear_outer_type (otr_type);
- invalid = true;
+ invalid = true;
return false;
}
}
outer_type = TYPE_MAIN_VARIANT (TREE_TYPE (base));
offset = off;
/* Make very conservative assumption that all objects
- may be in construction.
-
+ may be in construction.
+
It is up to caller to revisit this via
get_dynamic_type or decl_maybe_in_construction_p. */
maybe_in_construction = true;
}
/* CST is an invariant (address of decl), try to get meaningful
- polymorphic call context for polymorphic call of method
+ polymorphic call context for polymorphic call of method
if instance of OTR_TYPE that is located at offset OFF of this invariant.
Return FALSE if nothing meaningful can be found. */
&& !SSA_NAME_IS_DEFAULT_DEF (op)
/* We might be called via fold_stmt during cfgcleanup where
SSA form need not be up-to-date. */
- && !name_registered_for_update_p (op)
+ && !name_registered_for_update_p (op)
&& (gimple_assign_single_p (SSA_NAME_DEF_STMT (op))
|| gimple_code (SSA_NAME_DEF_STMT (op)) == GIMPLE_PHI))
{
*global_visited = new hash_set<tree>;
if ((*global_visited)->add (op))
goto done;
- }
+ }
else
{
if (!visited)
/* Handle the case we inlined into a thunk. In this case
thunk has THIS pointer of type bar, but it really receives
- address to its base type foo which sits in bar at
+ address to its base type foo which sits in bar at
0-thunk.fixed_offset. It starts with code that adds
think.fixed_offset to the pointer to compensate for this.
not part of outer type. */
if (otr_type && !contains_type_p (outer_type, offset,
otr_type))
- {
+ {
invalid = true;
if (instance)
*instance = base_pointer;
&& gimple_assign_single_p (SSA_NAME_DEF_STMT (base_pointer)))
base_type = TREE_TYPE (gimple_assign_rhs1
(SSA_NAME_DEF_STMT (base_pointer)));
-
+
if (base_type && POINTER_TYPE_P (base_type))
combine_speculation_with (TYPE_MAIN_VARIANT (TREE_TYPE (base_type)),
offset,
/* FIXME: We should support construction contexts. */
return NULL;
}
-
+
*type_offset = tree_to_shwi (BINFO_OFFSET (binfo)) * BITS_PER_UNIT;
return DECL_CONTEXT (vtable);
}
/* We need to obtain reference to virtual table pointer. It is better
to look it up in the code rather than build our own. This require bit
of pattern matching, but we end up verifying that what we found is
- correct.
+ correct.
What we pattern match is:
tmp = instance->_vptr.A; // vtbl ptr load
tmp2 = tmp[otr_token]; // vtable lookup
OBJ_TYPE_REF(tmp2;instance->0) (instance);
-
+
We want to start alias oracle walk from vtbl pointer load,
but we may not be able to identify it, for example, when PRE moved the
load around. */
}
}
}
-
+
/* If we failed to look up the reference in code, build our own. */
if (!instance_ref)
{
&tci, NULL, &function_entry_reached, aa_walk_budget);
/* If we did not find any type changing statements, we may still drop
- maybe_in_construction flag if the context already have outer type.
+ maybe_in_construction flag if the context already have outer type.
Here we make special assumptions about both constructors and
destructors which are all the functions that are allowed to alter the
only these). We then must detect that statements in section 2 change
the dynamic type and can try to derive the new type. That is enough
and we can stop, we will never see the calls into constructors of
- sub-objects in this code.
+ sub-objects in this code.
Therefore if the static outer type was found (outer_type)
we can safely ignore tci.speculative that is set on calls and give up
return false;
/* If outer type already contains speculation as a filed,
- it is useless. We already know from OUTER_TYPE
+ it is useless. We already know from OUTER_TYPE
SPEC_TYPE and that it is not in the construction. */
if (contains_type_p (outer_type, offset - spec_offset,
spec_outer_type, false, false))
return false;
/* If speculative outer type is not more specified than outer
- type, just give up.
+ type, just give up.
We can only decide this safely if we can compare types with OUTER_TYPE.
*/
if ((!in_lto_p || odr_type_p (outer_type))
}
/* Improve THIS with speculation described by NEW_OUTER_TYPE, NEW_OFFSET,
- NEW_MAYBE_DERIVED_TYPE
+ NEW_MAYBE_DERIVED_TYPE
If OTR_TYPE is set, assume the context is used with OTR_TYPE. */
bool
/* It may be easy to check if second context permits the first
and set INVALID otherwise. This is not easy to do in general;
contains_type_p may return false negatives for non-comparable
- types.
+ types.
If OTR_TYPE is known, we however can expect that
restrict_to_inner_class should have discovered the same base
node corresponding to the target and produce a speculative call.
This call may or may not survive through IPA optimization based on decision
- of inliner.
+ of inliner.
- Finally we propagate the following flags: unlikely executed, executed
once, executed at startup and executed at exit. These flags are used to
control code size/performance threshold and code placement (by producing
unsigned int i;
gcov_type overall_time = 0, cumulated_time = 0, cumulated_size = 0,
overall_size = 0;
-
+
fprintf (dump_file, "Histogram:\n");
for (i = 0; i < histogram.length (); i++)
{
cumulated_size += histogram[i]->size;
}
fprintf (dump_file, "Determined min count: %" PRId64
- " Time:%3.2f%% Size:%3.2f%%\n",
+ " Time:%3.2f%% Size:%3.2f%%\n",
(int64_t)threshold,
cumulated_time * 100.0 / overall_time,
cumulated_size * 100.0 / overall_size);
callsite CALL) by looking for assignments to its virtual table pointer. If
it is, return true. ARG is the object itself (not a pointer
to it, unless dereferenced). BASE is the base of the memory access as
- returned by get_ref_base_and_extent, as is the offset.
+ returned by get_ref_base_and_extent, as is the offset.
This is helper function for detect_type_change and detect_type_change_ssa
that does the heavy work which is usually unnecesary. */
}
}
-/* If TARGET is an addr_expr of a function declaration, make it the
+/* If TARGET is an addr_expr of a function declaration, make it the
(SPECULATIVE)destination of an indirect edge IE and return the edge.
Otherwise, return NULL. */
{
/* We are better to ensure we can refer to it.
- In the case of static functions we are out of luck, since we already
+ In the case of static functions we are out of luck, since we already
removed its body. In the case of public functions we may or may
not introduce the reference. */
if (!canonicalize_constructor_val (target, NULL)
callee_t))
continue;
}
-
+
if (dump_file)
{
fprintf (dump_file, "Statement can throw: ");
if (!node->alias && opt_for_fn (node->decl, flag_ipa_reference))
{
node_g = &node_info->global;
- bool read_all =
+ bool read_all =
(node_g->statics_read == all_module_statics
|| bitmap_equal_p (node_g->statics_read, all_module_statics));
- bool written_all =
+ bool written_all =
(node_g->statics_written == all_module_statics
|| bitmap_equal_p (node_g->statics_written,
all_module_statics));
2) Via DFS walk find all possible basic blocks where we can split
and chose best one.
3) If split point is found, split at the specified BB by creating a clone
- and updating function to call it.
+ and updating function to call it.
The decisions what functions to split are in execute_split_functions
- and consider_split.
+ and consider_split.
There are several possible future improvements for this pass including:
value computed in header from function parameter in very cheap way, we
can just recompute it.
5) Support splitting of nested functions.
- 6) Support non-SSA arguments.
+ 6) Support non-SSA arguments.
7) There is nothing preventing us from producing multiple parts of single function
when needed or splitting also the parts. */
else
break;
}
-
+
done:
BITMAP_FREE (seen);
worklist.release ();
/* Splitting functions brings the target out of comdat group; this will
lead to code duplication if the function is reused by other unit.
- Limit this duplication. This is consistent with limit in tree-sra.cc
+ Limit this duplication. This is consistent with limit in tree-sra.cc
FIXME: with LTO we ought to be able to do better! */
if (DECL_ONE_ONLY (current_function_decl)
&& current->split_size >= (unsigned int) param_max_inline_insns_auto + 10)
we can pass more than that. */
if (num_args != bitmap_count_bits (current->ssa_names_to_pass))
{
-
+
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file,
" Refused: need to pass non-param values\n");
if (!best_split_point.split_bbs
|| best_split_point.count
> current->count
- || (best_split_point.count == current->count
+ || (best_split_point.count == current->count
&& best_split_point.split_size < current->split_size))
-
+
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " New best split point!\n");
for ssa uses and store them in USED_SSA_NAMES and for any non-SSA automatic
vars stored in NON_SSA_VARS.
- When BB has edge to RETURN_BB, collect uses in RETURN_BB too.
+ When BB has edge to RETURN_BB, collect uses in RETURN_BB too.
Return false when BB contains something that prevents it from being put into
split function. */
/* FIXME: We can split regions containing EH. We cannot however
split RESX, EH_DISPATCH and EH_POINTER referring to same region
into different partitions. This would require tracking of
- EH regions and checking in consider_split_point if they
+ EH regions and checking in consider_split_point if they
are not used elsewhere. */
if (gimple_code (stmt) == GIMPLE_RESX)
{
profile_count to = node->count;
profile_count::adjust_for_ipa_scaling (&to, &orig_count);
struct cgraph_edge *e;
-
+
for (e = node->callees; e; e = e->next_callee)
e->count = e->count.apply_scale (to, orig_count);
for (e = node->indirect_calls; e; e = e->next_callee)
"Giving up; last block mismatch.\n");
match = false;
}
- else
+ else
{
basic_block srcbb, dstbb;
struct cgraph_edge *e, *e2;
if (srce->probability.initialized_p ())
dste->probability = srce->probability;
}
- }
- else
+ }
+ else
{
for (i = 0; i < EDGE_COUNT (srcbb->succs); i++)
{
If assume_return_or_eh we can further assume that the function ends
either by retrn statement or EH (no trapping or infinite loops).
This is useful when sumarizing function in passes like ipa-modref.
-
+
Seeing assume_return_or_eh to false is used to prove that given
statmeent will be executed even if the function gets into infinite
loop or trap. */
from the BBs in DFS subtree of A. If A is always executed there are no
edges out of this subtree. This can be tested by checking that A.low == A.preorder
and B.high == A.postorder.
-
+
This is first step. Do backward DFS walk and record preorder, postorder
and predecessor info. Initialize stack in postorder. */
worklist we = {EXIT_BLOCK_PTR_FOR_FN (fun), NULL};
void register_odr_enum (tree type);
/* Return vector containing possible targets of polymorphic call E.
- If COMPLETEP is non-NULL, store true if the list is complete.
+ If COMPLETEP is non-NULL, store true if the list is complete.
CACHE_TOKEN (if non-NULL) will get stored to an unique ID of entry
in the target cache. If user needs to visit every target list
just once, it can memoize them.
context, n);
}
-/* Return true if BINFO corresponds to a type with virtual methods.
+/* Return true if BINFO corresponds to a type with virtual methods.
Every type has several BINFOs. One is the BINFO associated by the type
while other represents bases of derived types. The BINFOs representing
return !TREE_PUBLIC (TYPE_STUB_DECL (t));
}
-/* Return true of T is type with One Definition Rule info attached.
+/* Return true of T is type with One Definition Rule info attached.
It means that either it is anonymous type or it has assembler name
set. */
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-/* This file implements two related passes:
+/* This file implements two related passes:
- pass_data_ipa_function_and_variable_visibility run just after
symbol table, references and callgraph are built
/* COMDAT functions must be shared only if they have address taken,
otherwise we can produce our own private implementation with
- -fwhole-program.
+ -fwhole-program.
Return true when turning COMDAT function static cannot lead to wrong
code when the resulting object links with a library defining same COMDAT.
node = node->get_alias_target ();
if (node->weakref)
return false;
-
+
return (node->get_availability () > AVAIL_INTERPOSABLE
&& !decl_binds_to_current_def_p (node->decl)
&& !node->can_be_discarded_p ());
}
/* In LTO we can remove COMDAT groups and weak symbols.
- Either turn them into normal symbols or external symbol depending on
+ Either turn them into normal symbols or external symbol depending on
resolution info. */
static void
enable more optimization.
TODO: We can also update virtual tables. */
- if (node->callers
+ if (node->callers
&& can_replace_by_local_alias (node))
{
cgraph_node *alias = dyn_cast<cgraph_node *>
nodes even when they are reachable.
- virtual functions are kept in callgraph even if they seem unreachable in
- hope calls to them will be devirtualized.
+ hope calls to them will be devirtualized.
Again we remove them after inlining. In late optimization some
devirtualization may happen, but it is not important since we won't inline
}
if (!address_taken && !written
/* Making variable in explicit section readonly can cause section
- type conflict.
+ type conflict.
See e.g. gcc.c-torture/compile/pr23237.c */
&& vnode->get_section () == NULL)
{
{
if (dump_file)
fprintf (dump_file, " %s (write-only)", vnode->dump_name ());
- vnode->call_for_symbol_and_aliases (set_writeonly_bit, &remove_p,
+ vnode->call_for_symbol_and_aliases (set_writeonly_bit, &remove_p,
true);
}
}
FUNCTION is current single user of a variable, VAR is variable that uses it.
Latttice is stored in SINGLE_USER_MAP.
- We represent:
+ We represent:
- TOP by no entry in SIGNLE_USER_MAP
- BOTTOM by BOTTOM in AUX pointer (to save lookups)
- known single user by cgraph pointer in SINGLE_USER_MAP. */
IRA_CURR_LOOP_TREE_NODE and IRA_CURR_REGNO_ALLOCNO_MAP. If BB_P,
basic block nodes of LOOP_NODE is also processed (before its
subloop nodes).
-
+
If BB_P is set and POSTORDER_FUNC is given, the basic blocks in
the loop are passed in the *reverse* post-order of the *reverse*
CFG. This is only used by ira_create_allocno_live_ranges, which
{
if (prev == NULL)
*roots = node->first;
- else
+ else
prev->next = node->first;
if (next != NULL)
next->prev = last;
{
a = ira_allocnos[i];
allocno_data = ALLOCNO_COLOR_DATA (a);
-
+
if (hard_reg_set_empty_p (allocno_data->profitable_hard_regs))
continue;
hv = (add_allocno_hard_regs
finish_allocno_hard_regs_nodes_forest (void)
{
allocno_hard_regs_node_t node, next;
-
+
ira_free (allocno_hard_regs_subnodes);
for (node = hard_regs_roots; node != NULL; node = next)
{
ira_object_t obj = ALLOCNO_OBJECT (a, k);
ira_object_t conflict_obj;
ira_object_conflict_iterator oci;
-
+
FOR_EACH_OBJECT_CONFLICT (obj, conflict_obj, oci)
{
int size;
for (i = 0; i < data->hard_regs_subnodes_num; i++)
{
allocno_hard_regs_node_t temp_node;
-
+
temp_node = allocno_hard_regs_nodes[i + node_preorder_num];
ira_assert (temp_node->preorder_num == i + node_preorder_num);
subnodes[i].left_conflict_size = (temp_node->check != node_check_tick
HARD_REG_SET temp_set;
int j, n, hard_regno;
enum reg_class aclass;
-
+
temp_set = temp_node->hard_regs->set & profitable_hard_regs;
aclass = ALLOCNO_CLASS (a);
for (n = 0, j = ira_class_hard_regs_num[aclass] - 1; j >= 0; j--)
{
int size, parent_i;
allocno_hard_regs_node_t parent;
-
+
size = (subnodes[i].left_conflict_subnodes_size
+ MIN (subnodes[i].max_node_impact
- subnodes[i].left_conflict_subnodes_size,
subnodes[i].left_conflict_subnodes_size -= diff;
}
if (i != 0
- || (conflict_size
+ || (conflict_size
+ ira_reg_class_max_nregs[ALLOCNO_CLASS (a)][ALLOCNO_MODE (a)]
> data->available_regs_num))
return false;
for (k = 0; k < nobj; k++)
{
ira_object_t obj = ALLOCNO_OBJECT (a, k);
-
+
data->profitable_hard_regs
&= ~OBJECT_TOTAL_CONFLICT_HARD_REGS (obj);
}
if (nregs == nobj && nregs > 1)
{
int num = OBJECT_SUBWORD (conflict_obj);
-
+
if (REG_WORDS_BIG_ENDIAN)
CLEAR_HARD_REG_BIT
(ALLOCNO_COLOR_DATA (conflict_a)->profitable_hard_regs,
update_conflict_allocno_hard_prefs (ira_allocno_t allocno)
{
int l, nr = ALLOCNO_NUM_OBJECTS (allocno);
-
+
for (l = 0; l < nr; l++)
{
ira_object_t conflict_obj, obj = ALLOCNO_OBJECT (allocno, l);
ira_object_conflict_iterator oci;
-
+
FOR_EACH_OBJECT_CONFLICT (obj, conflict_obj, oci)
{
ira_allocno_t conflict_a = OBJECT_ALLOCNO (conflict_obj);
{
int k;
int set_to_test_start = 0, set_to_test_end = nwords;
-
+
if (nregs == nwords)
{
if (REG_WORDS_BIG_ENDIAN)
if (! retry_p)
start_update_cost ();
mem_cost += ALLOCNO_UPDATED_MEMORY_COST (a);
-
+
ira_allocate_and_copy_costs (&ALLOCNO_UPDATED_HARD_REG_COSTS (a),
aclass, ALLOCNO_HARD_REG_COSTS (a));
a_costs = ALLOCNO_UPDATED_HARD_REG_COSTS (a);
ira_object_t conflict_obj;
ira_object_t obj = ALLOCNO_OBJECT (a, word);
ira_object_conflict_iterator oci;
-
+
/* Take preferences of conflicting allocnos into account. */
FOR_EACH_OBJECT_CONFLICT (obj, conflict_obj, oci)
{
!= curr_allocno_process))
{
int k, *conflict_costs;
-
+
ALLOCNO_COLOR_DATA (conflict_a)->last_process
= curr_allocno_process;
ira_allocate_and_copy_costs
get_cap_member (ira_allocno_t a)
{
ira_allocno_t member;
-
+
while ((member = ALLOCNO_CAP_MEMBER (a)) != NULL)
a = member;
return a;
freq2 = ALLOCNO_COLOR_DATA (t2)->thread_freq;
if ((diff = freq1 - freq2) != 0)
return diff;
-
+
if ((diff = ALLOCNO_NUM (t2) - ALLOCNO_NUM (t1)) != 0)
return diff;
enum reg_class aclass;
allocno_color_data_t data, conflict_data;
int size, i, n = ALLOCNO_NUM_OBJECTS (a);
-
+
data = ALLOCNO_COLOR_DATA (a);
data->in_graph_p = false;
allocno_stack_vec.safe_push (a);
ira_object_t obj = ALLOCNO_OBJECT (a, i);
ira_object_t conflict_obj;
ira_object_conflict_iterator oci;
-
+
FOR_EACH_OBJECT_CONFLICT (obj, conflict_obj, oci)
{
ira_allocno_t conflict_a = OBJECT_ALLOCNO (conflict_obj);
fprintf (ira_dump_file, " colorable\n");
}
}
-
+
}
}
}
ira_object_t conflict_obj;
ira_object_t obj = ALLOCNO_OBJECT (a, word);
ira_object_conflict_iterator oci;
-
+
FOR_EACH_OBJECT_CONFLICT (obj, conflict_obj, oci)
{
ira_allocno_t conflict_a = OBJECT_ALLOCNO (conflict_obj);
ira_object_t conflict_obj;
ira_object_t obj = ALLOCNO_OBJECT (a, word);
ira_object_conflict_iterator oci;
-
+
FOR_EACH_OBJECT_CONFLICT (obj, conflict_obj, oci)
{
ira_allocno_t conflict_a = OBJECT_ALLOCNO (conflict_obj);
ira_remove_pref (pref);
}
}
-
+
if (flag_ira_algorithm == IRA_ALGORITHM_PRIORITY)
{
n = 0;
if (node != ira_loop_tree_root)
{
ira_assert (current_loops != NULL);
-
+
if (node->bb != NULL)
{
FOR_BB_INSNS (node->bb, insn)
{
case 'g':
return NO_REGS;
-
+
default:
/* ??? Is this the best way to handle memory constraints? */
cn = lookup_constraint (constraints);
return NO_REGS;
cl = next_cl;
break;
-
+
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
{
}
}
return cheap_reg;
-}
+}
/* Determine whether INSN is a register to register copy of the type where
we do not need to make the source and destiniation registers conflict.
make_early_clobber_and_input_conflicts ();
curr_point++;
-
+
/* Mark each used value as live. */
FOR_EACH_INSN_USE (use, insn)
mark_ref_live (use);
live_range_t r, prev_r, next_r;
sbitmap_iterator sbi;
bool born_p, dead_p, prev_born_p, prev_dead_p;
-
+
auto_sbitmap born (ira_max_point);
auto_sbitmap dead (ira_max_point);
bitmap_clear (born);
stack. Pushing thread allocnos one after another onto the
stack increases chances of removing copies when the allocnos
get the same hard reg.
-
+
We also use a modification of Chaitin-Briggs algorithm which
works for intersected register classes of allocnos. To
figure out trivial colorability of allocnos, the mentioned
if (targetm.compute_pressure_classes)
n = targetm.compute_pressure_classes (pressure_classes);
else
- {
+ {
n = 0;
for (cl = 0; cl < N_REG_CLASSES; cl++)
{
& ~no_unit_alloc_regs);
if (ira_reg_class_subunion[cl1][cl2] == NO_REGS
|| (hard_reg_set_subset_p (temp_set2, temp_hard_regset)
-
+
&& (temp_set2 != temp_hard_regset
|| cl3 == GENERAL_REGS
/* If the allocatable hard register sets are the
{
int cost;
enum reg_class *p1, *p2;
-
+
if (last_move_cost[cl1][cl2] == 65535)
{
ira_register_move_cost[mode][cl1][cl2] = 65535;
else
{
cost = last_move_cost[cl1][cl2];
-
+
for (p2 = ®_class_subclasses[cl2][0];
*p2 != LIM_REG_CLASSES; p2++)
if (ira_class_hard_regs_num[*p2] > 0
&& (ira_reg_class_max_nregs[*p2][mode]
<= ira_class_hard_regs_num[*p2]))
cost = MAX (cost, ira_register_move_cost[mode][cl1][*p2]);
-
+
for (p1 = ®_class_subclasses[cl1][0];
*p1 != LIM_REG_CLASSES; p1++)
if (ira_class_hard_regs_num[*p1] > 0
&& (ira_reg_class_max_nregs[*p1][mode]
<= ira_class_hard_regs_num[*p1]))
cost = MAX (cost, ira_register_move_cost[mode][*p1][cl2]);
-
+
ira_assert (cost <= 65535);
ira_register_move_cost[mode][cl1][cl2] = cost;
-
+
if (ira_class_subset_p[cl1][cl2])
ira_may_move_in_cost[mode][cl1][cl2] = 0;
else
ira_may_move_in_cost[mode][cl1][cl2] = cost;
-
+
if (ira_class_subset_p[cl2][cl1])
ira_may_move_out_cost[mode][cl1][cl2] = 0;
else
case '\0':
len = 0;
break;
-
+
case '%':
/* The commutative modifier is handled above. */
break;
win_p = true;
}
break;
-
+
case 'g':
goto op_success;
break;
-
+
default:
{
enum constraint_num cn = lookup_constraint (p);
goto fail;
break;
}
-
+
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
{
continue;
sregno = REGNO (src);
dregno = REGNO (dest);
-
+
/* We don't want to mess with hard regs if register classes
are small. */
if (sregno == dregno
|| sregno == STACK_POINTER_REGNUM
|| dregno == STACK_POINTER_REGNUM)
continue;
-
+
dest_death = NULL_RTX;
for (p = NEXT_INSN (insn); p; p = NEXT_INSN (p))
continue;
if (BLOCK_FOR_INSN (p) != bb)
break;
-
+
if (reg_set_p (src, p) || reg_set_p (dest, p)
/* If SRC is an asm-declared register, it must not be
replaced in any asm. Unfortunately, the REG_EXPR
|| (GET_CODE (PATTERN (p)) == USE
&& reg_overlap_mentioned_p (src, XEXP (PATTERN (p), 0))))
break;
-
+
/* See if all of SRC dies in P. This test is slightly
more conservative than it needs to be. */
if ((note = find_regno_note (p, REG_DEAD, sregno))
&& GET_MODE (XEXP (note, 0)) == GET_MODE (src))
{
int failed = 0;
-
+
/* We can do the optimization. Scan forward from INSN
again, replacing regs as we go. Set FAILED if a
replacement can't be done. In that case, we can't
move the death note for SRC. This should be
rare. */
-
+
/* Set to stop at next insn. */
for (q = next_real_insn (insn);
q != next_real_insn (p);
if (sregno < FIRST_PSEUDO_REGISTER
&& reg_mentioned_p (dest, PATTERN (q)))
failed = 1;
-
+
/* Attempt to replace all uses. */
else if (!validate_replace_rtx (src, dest, q))
failed = 1;
-
+
/* If this succeeded, but some part of the
register is still present, undo the
replacement. */
failed = 1;
}
}
-
+
/* If DEST dies here, remove the death note and
save it for later. Make sure ALL of DEST dies
here; again, this is overly conservative. */
}
}
}
-
+
if (! failed)
{
/* Move death note of SRC from P to INSN. */
XEXP (note, 1) = REG_NOTES (insn);
REG_NOTES (insn) = note;
}
-
+
/* DEST is also dead if INSN has a REG_UNUSED note for
DEST. */
if (! dest_death
PUT_REG_NOTE_KIND (dest_death, REG_DEAD);
remove_note (insn, dest_death);
}
-
+
/* Put death note of DEST on P if we saw it die. */
if (dest_death)
{
}
break;
}
-
+
/* If SRC is a hard register which is set or killed in
some other way, we can't do this optimization. */
else if (sregno < FIRST_PSEUDO_REGISTER && dead_or_set_p (p, src))
if (frame_pointer_needed)
for (i = 0; i < fp_reg_count; i++)
df_set_regs_ever_live (HARD_FRAME_POINTER_REGNUM + i, true);
-
+
ira_no_alloc_regs = no_unit_alloc_regs;
CLEAR_HARD_REG_SET (eliminable_regset);
int i, nwords;
enum reg_class pclass;
ira_object_t obj;
-
+
pclass = ira_pressure_class_translate[REGNO_REG_CLASS (hard_regno)];
nwords = ALLOCNO_NUM_OBJECTS (a);
for (i = 0; i < nwords; i++)
}
else if (memref_referenced_p (memref, x, false))
return true;
-
+
return false;
}
return true;
return memref_referenced_p (memref, XEXP (x, 0), true);
-
+
case POST_MODIFY:
case PRE_MODIFY:
/* op0 = op0 + op1 */
next_elem = elem->next ();
insn = elem->insn ();
set = single_set (insn);
-
+
/* Init insns can set up equivalence when the reg is a destination or
a source (in this case the destination is memory). */
if (set != 0 && (REG_P (SET_DEST (set)) || REG_P (SET_SRC (set))))
&& REGNO (SET_DEST (set)) == (unsigned int) i)
x = SET_SRC (set);
else
- {
+ {
gcc_assert (REG_P (SET_SRC (set))
&& REGNO (SET_SRC (set)) == (unsigned int) i);
x = SET_DEST (set);
else if (function_invariant_p (x))
{
machine_mode mode;
-
+
mode = GET_MODE (SET_DEST (set));
if (GET_CODE (x) == PLUS
|| x == frame_pointer_rtx || x == arg_pointer_rtx)
return true;
if (HARD_REGISTER_P (x))
return false;
-
+
return true;
case MEM:
(typically induction variables), as this increases the freedom for our
intended transformation, and does not limit the second instruction
scheduler pass. */
-
+
static void
find_moveable_pseudos (void)
{
df_ref def, use;
uid_luid[INSN_UID (insn)] = i++;
-
+
def = df_single_def (insn_info);
use = df_single_use (insn_info);
if (use
for (note = REG_NOTES (def_insn); note; note = XEXP (note, 1))
if (REG_NOTE_KIND (note) == REG_EQUIV && MEM_P (XEXP (note, 0)))
break;
-
+
if (note)
{
if (dump_file)
}
}
}
-
+
FOR_EACH_BB_FN (bb, cfun)
{
bitmap_clear (bb_local + bb->index);
contains_X_constraint_p (const char *str)
{
int c;
-
+
while ((c = *str))
{
str += CONSTRAINT_LEN (c, str);
}
return false;
}
-
+
/* Change INSN's scratches into pseudos and save their location.
Return true if we changed any scratch. */
bool
int i;
bool insn_changed_p;
rtx reg, *loc;
-
+
extract_insn (insn);
insn_changed_p = false;
for (i = 0; i < recog_data.n_operands; i++)
edge_iterator ei;
edge e;
bool output_jump_reload_p = false;
-
+
if (ira_use_lra_p)
{
/* First put potential jump output reloads on the output edges
FOR_ALL_BB_FN (bb, cfun)
bb->loop_father = NULL;
current_loops = NULL;
-
+
regstat_free_ri ();
regstat_free_n_sets_and_refs ();
}
ctxt.new_cast (x, bool_type, loc),
op_blocks[op->op_operand], /* on_true */
next_block, /* on_false */
- loc);
+ loc);
break;
default:
}
/* This function is like rebuild_jump_labels, but doesn't run over
- forced_labels. It can be used on insn chains that aren't the
+ forced_labels. It can be used on insn chains that aren't the
main function chain. */
void
rebuild_jump_labels_chain (rtx_insn *chain)
struct lang_hooks_for_decls decls;
struct lang_hooks_for_types types;
-
+
struct lang_hooks_for_lto lto;
/* Returns a TREE_VEC of the generic parameters of an instantiation of
return 0;
cmp_arg1 = XEXP (SET_SRC (cmp_orig), 0);
cmp_arg2 = XEXP (SET_SRC (cmp_orig), 1);
- if (cmp_arg2 != const0_rtx
+ if (cmp_arg2 != const0_rtx
|| GET_CODE (cmp_arg1) != PLUS)
return 0;
reg_orig = XEXP (cmp_arg1, 0);
- if (XEXP (cmp_arg1, 1) != GEN_INT (-1)
+ if (XEXP (cmp_arg1, 1) != GEN_INT (-1)
|| !REG_P (reg_orig))
return 0;
cc_reg = SET_DEST (cmp_orig);
-
+
inc = XVECEXP (PATTERN (prev_insn), 0, 1);
}
else
return 0;
if (rtx_equal_p (XEXP (condition, 0), reg)
- /* For the third case: */
+ /* For the third case: */
|| ((cc_reg != NULL_RTX)
&& (XEXP (condition, 0) == cc_reg)
&& (rtx_equal_p (reg_orig, reg)))
if (current_loops)
loop_optimizer_finalize ();
return false;
- }
+ }
}
} // anon namespace
return;
}
- /* Check whether the loop rolls enough to consider.
+ /* Check whether the loop rolls enough to consider.
Consult also loop bounds and profile; in the case the loop has more
than one exit it may well loop less than determined maximal number
of iterations. */
}
/* Do not unroll loops with branches inside -- it increases number
- of mispredicts.
+ of mispredicts.
TODO: this heuristic needs tunning; call inside the loop body
is also relatively good reason to not unroll. */
if (num_loop_branches (loop) > 1)
= lra_reg_info[conflict_regno].biggest_mode;
int biggest_conflict_nregs
= hard_regno_nregs (conflict_hr, biggest_conflict_mode);
-
+
nregs_diff
= (biggest_conflict_nregs
- hard_regno_nregs (conflict_hr,
if (try_only_hard_regno < 0 && regno < lra_new_regno_start)
{
enum reg_class pref_class = reg_preferred_class (regno);
-
+
if (regno_allocno_class_array[regno] != pref_class)
{
hard_regno = find_hard_regno_for_1 (regno, cost, -1, first_p,
|| hard_regno != reg_renumber[conflict_regno])
{
int conflict_hard_regno = reg_renumber[conflict_regno];
-
+
biggest_mode = lra_reg_info[conflict_regno].biggest_mode;
biggest_nregs = hard_regno_nregs (conflict_hard_regno,
biggest_mode);
{
enum reg_class rclass = lra_get_allocno_class (regno);
enum reg_class spill_class;
-
+
if (targetm.spill_class == NULL
|| lra_reg_info[regno].restore_rtx == NULL_RTX
|| ! bitmap_bit_p (&lra_inheritance_pseudos, regno)
bool clobber_p = false;
rtx_insn *prev_insn, *next_insn;
rtx_insn *start_insn = NULL, *first_insn = NULL, *second_insn = NULL;
-
+
EXECUTE_IF_SET_IN_BITMAP (&lra_reg_info[regno].insn_bitmap, 0, uid, bi)
{
if (start_insn == NULL)
either case. */
bool asm_p = false, spill_p = false;
bitmap_head failed_reload_insns, failed_reload_pseudos, over_split_insns;
-
+
if (lra_dump_file != NULL)
fprintf (lra_dump_file,
"\n****** Splitting a hard reg after assignment #%d: ******\n\n",
int coalesced_moves;
int max_regno = max_reg_num ();
bitmap_head involved_insns_bitmap;
-
+
timevar_push (TV_LRA_COALESCE);
if (lra_dump_file != NULL)
enum machine_mode reg_mode)
{
int i, j, hard_regno, class_size, nregs;
-
+
if (hard_reg_set_subset_p (reg_class_contents[reg_class], lra_no_alloc_regs))
return false;
class_size = ira_class_hard_regs_num[reg_class];
update_equiv (int regno)
{
rtx x;
-
+
if ((x = ira_reg_equiv[regno].memory) != NULL_RTX)
ira_reg_equiv[regno].memory
= simplify_replace_fn_rtx (x, NULL_RTX, loc_equivalence_callback,
bool asm_p = asm_noperands (PATTERN (curr_insn)) >= 0;
int hr;
HARD_REG_SET temp_hard_reg_set;
-
+
if (asm_p && (hr = get_hard_regno (out_rtx)) >= 0
&& hard_regno_nregs (hr, inmode) > 1)
{
if (GET_CODE (in_rtx) == SUBREG)
{
rtx subreg_reg = SUBREG_REG (in_rtx);
-
+
/* If SUBREG_REG is dying here and sub-registers IN_RTX
and NEW_IN_REG are similar, we can use the same hard
register for REG and SUBREG_REG. */
machine_mode mode)
{
HARD_REG_SET temp;
-
+
lra_assert (hard_reg_set_subset_p (reg_class_contents[rclass], set));
temp = set & ~lra_no_alloc_regs;
return (hard_reg_set_subset_p
{
static unsigned int small_class_check[LIM_REG_CLASSES];
static int small_class_input_nums[LIM_REG_CLASSES];
-
+
if (SMALL_REGISTER_CLASS_P (op_class)
/* We are interesting in classes became small because of fixing
some hard regs, e.g. by an user through GCC options. */
print_curr_insn_alt (nalt);
fprintf (lra_dump_file, "\n");
}
-
+
bool matching_early_clobber[MAX_RECOG_OPERANDS];
curr_small_class_check++;
overall = losers = addr_losers = 0;
|| curr_operand_mode[nop] == BLKmode)
&& curr_operand_mode[m] != curr_operand_mode[nop])
break;
-
+
m_hregno = get_hard_regno (*curr_id->operand_loc[m]);
/* We are supposed to match a previous operand.
If we do, we win if that one did. If we do
&& REG_USERVAR_P (m_reg))
{
int i;
-
+
for (i = 0; i < early_clobbered_regs_num; i++)
if (m == early_clobbered_nops[i])
break;
nop);
reject += 3;
}
-
+
/* If reload requires moving value through secondary
memory, it will need one more insn at least. */
if (this_alternative != NO_REGS
SCRATCH, SCRATCH,
curr_insn);
rtx addr = *ad.inner;
-
+
new_reg = lra_create_new_reg (Pmode, NULL_RTX, cl, NULL, "addr");
/* addr => new_base. */
lra_emit_move (new_reg, addr);
if (curr_static_id->operand[i].is_operator)
continue;
-
+
old = op = *curr_id->operand_loc[i];
if (GET_CODE (old) == SUBREG)
old = SUBREG_REG (old);
change_p = true;
lra_update_dup (curr_id, i);
}
-
+
if (change_p)
/* If we've changed the instruction then any alternative that
we chose previously may no longer be valid. */
for (j = 0; goal_alt_matched[i][j] != -1; j++)
{
rtx op2 = *curr_id->operand_loc[goal_alt_matched[i][j]];
-
+
if (REG_P (op2) && REGNO (op) != REGNO (op2))
break;
}
else
{
enum reg_class rclass, common_class;
-
+
if (REG_P (op) && goal_alt[i] != NO_REGS
&& (regno = REGNO (op)) >= new_regno_start
&& (rclass = get_reg_class (regno)) == ALL_REGS
enum reg_class to_class, from_class;
int n, nop;
signed char changed_nops[MAX_RECOG_OPERANDS + 1];
-
+
/* Check conditions for second memory reload and original insn: */
if ((targetm.secondary_memory_needed
== hook_bool_mode_reg_class_t_reg_class_t_false)
lra_insn_recog_data_t id = lra_get_insn_recog_data (to);
struct lra_static_insn_data *static_id = id->insn_static_data;
-
+
if (id->used_insn_alternative == LRA_UNKNOWN_ALT
|| (set = single_set (from)) == NULL_RTX)
return false;
cannot be changed. Such insns might be not in
init_insns because we don't update equiv data
during insn transformations.
-
+
As an example, let suppose that a pseudo got
hard register and on the 1st pass was not
changed to equivalent constant. We generate an
if (lra_dump_file != NULL)
fprintf (lra_dump_file,
" ((((((((((((((((((((((((((((((((((((((((((((((((\n");
-
+
if (call_save_p)
{
mode = HARD_REGNO_CALLER_SAVE_MODE (hard_regno,
unsigned int uid;
bitmap_iterator bi;
HARD_REG_SET ignore;
-
+
lra_assert (from != NULL && to != NULL);
ignore = lra_no_alloc_regs;
EXECUTE_IF_SET_IN_BITMAP (&lra_reg_info[regno].insn_bitmap, 0, uid, bi)
lra_insn_recog_data_t id = lra_insn_recog_data[uid];
struct lra_static_insn_data *static_id = id->insn_static_data;
struct lra_insn_reg *reg;
-
+
for (reg = id->regs; reg != NULL; reg = reg->next)
if (reg->regno < FIRST_PSEUDO_REGISTER)
SET_HARD_REG_BIT (ignore, reg->regno);
int dst_regno = REGNO (dstreg);
rtx_insn *insn2 = regno_potential_cand[src_regno].insn;
- if (insn2 != NULL
+ if (insn2 != NULL
&& dst_regno >= FIRST_PSEUDO_REGISTER
&& reg_renumber[dst_regno] < 0
&& BLOCK_FOR_INSN (insn2) == BLOCK_FOR_INSN (insn))
EXECUTE_IF_SET_IN_BITMAP (gen_insns, 0, uid, bi)
{
rtx_insn *insn2 = lra_insn_recog_data[uid]->insn;
-
+
cand = insn_to_cand[INSN_UID (insn2)];
gcc_assert (cand != NULL);
/* Ignore the reload insn. */
bitmap_set_bit (&temp_bitmap, uid);
}
}
-
+
if (CALL_P (insn))
{
function_abi callee_abi = insn_callee_abi (insn);
EXECUTE_IF_SET_IN_BITMAP (gen_insns, 0, uid, bi)
{
rtx_insn *insn2 = lra_insn_recog_data[uid]->insn;
-
+
cand = insn_to_cand[INSN_UID (insn2)];
gcc_assert (cand != NULL);
if (call_used_input_regno_present_p (callee_abi, insn2))
bitmap_set_bit (gen_insns, INSN_UID (insn));
}
}
- }
+ }
}
\f
basic_block bb = e->dest;
remat_bb_data_t bb_info;
bitmap bb_pavin, pred_pavout;
-
+
bb_info = get_remat_bb_data (bb);
bb_pavin = &bb_info->pavin_cands;
pred_pavout = &get_remat_bb_data (pred)->pavout_cands;
basic_block bb = e->dest;
remat_bb_data_t bb_info;
bitmap bb_avin, pred_avout;
-
+
bb_info = get_remat_bb_data (bb);
bb_avin = &bb_info->avin_cands;
pred_avout = &get_remat_bb_data (pred)->avout_cands;
"scratch pseudo copy");
ira_register_new_scratch_op (remat_insn, i, id->icode);
}
-
+
}
/* Insert rematerialization insns using the data-flow data calculated
/* Check clobbers do not kill something living. */
gcc_assert (REG_P (saved_op));
- int ignore_regno = REGNO (saved_op);
+ int ignore_regno = REGNO (saved_op);
dst_hard_regno = dst_regno < FIRST_PSEUDO_REGISTER
? dst_regno : reg_renumber[dst_regno];
if (ok_p)
{
rtx remat_pat = copy_insn (PATTERN (cand->insn));
-
+
start_sequence ();
emit_insn (remat_pat);
remat_insn = get_insns ();
EXECUTE_IF_SET_IN_BITMAP (avail_cands, 0, cid, bi)
{
cand = all_cands[cid];
-
+
/* Ignore the reload insn. */
if (src_regno == cand->reload_regno
&& dst_regno == cand->regno)
EXECUTE_IF_SET_IN_BITMAP (avail_cands, 0, cid, bi)
{
cand = all_cands[cid];
-
+
if (call_used_input_regno_present_p (callee_abi, cand->insn))
bitmap_set_bit (&temp_bitmap, cand->index);
}
const char *fmt;
enum rtx_code code;
bool res = false;
-
+
if (*loc == NULL_RTX)
return res;
code = GET_CODE (*loc);
FOR_BB_INSNS_SAFE (bb, insn, curr)
{
bool removed_pseudo_p = false;
-
+
if (bitmap_bit_p (changed_insns, INSN_UID (insn)))
{
rtx *link_loc, link;
delete_insn (insn);
continue;
}
-
+
lra_insn_recog_data_t id = lra_get_insn_recog_data (insn);
struct lra_insn_reg *reg;
if (reg->regno >= FIRST_PSEUDO_REGISTER
&& lra_reg_info [reg->regno].nrefs == 0)
break;
-
+
if (reg != NULL)
{
/* Pseudos still can be in debug insns in some very rare
delete_insn (insn);
continue;
}
-
+
struct lra_static_insn_data *static_id = id->insn_static_data;
bool insn_change_p = false;
| Spilled pseudo | -------------------
| to memory |<----| Rematerialization |
| substitution | -------------------
- ----------------
+ ----------------
| No susbtitions
- V
+ V
-------------------------
| Hard regs substitution, |
| devirtalization, and |------> Finish
if (! ok_p)
{
rtx_insn *insn;
-
+
delete_insns_since (last);
/* Generate x = disp; x = x + base; x = x + index_scale. */
emit_move_insn (x, disp);
{
int old;
rtx_insn *insn;
-
+
if (GET_CODE (y) != PLUS)
{
if (rtx_equal_p (x, y))
struct lra_static_insn_data *static_data;
enum rtx_code code;
rtx link;
-
+
if (! INSN_P (insn))
return;
data = lra_get_insn_recog_data (insn);
return offset;
}
-/* Dump all func insns in a slim form. */
+/* Dump all func insns in a slim form. */
void
lra_dump_insns (FILE *f)
{
}
/* Dump all func insns in a slim form with TITLE when the dump file is open and
- lra_verbose >=7. */
+ lra_verbose >=7. */
void
lra_dump_insns_if_possible (const char *title)
{
if (! JUMP_P (insn))
{
rtx_insn *last;
-
+
if (lra_dump_file != NULL)
{
fprintf (lra_dump_file, " %s after:\n", title);
/* Put output reload insns on successor BBs: */
edge_iterator ei;
edge e;
-
+
FOR_EACH_EDGE (e, ei, BLOCK_FOR_INSN (insn)->succs)
if (e->dest != EXIT_BLOCK_PTR_FOR_FN (cfun))
{
*loc = subst;
return true;
}
-
+
}
else if (code == REG && (int) REGNO (x) == old_regno)
{
lra_verbose = verbose;
lra_asm_error_p = false;
lra_pmode_pseudo = gen_reg_rtx (Pmode);
-
+
timevar_push (TV_LRA);
/* Make sure that the last insn is a note. Some subsequent passes
else
{
bool spill_p = !lra_assign (fails_p);
-
+
if (lra_undo_inheritance ())
live_p = false;
if (spill_p && ! fails_p)
if (boundary_p && node->analyzed
&& node->get_partitioning_class () == SYMBOL_PARTITION)
{
- /* Inline clones cannot be part of boundary.
+ /* Inline clones cannot be part of boundary.
gcc_assert (!node->inlined_to);
FIXME: At the moment they can be, when partition contains an inline
if (node->same_comdat_group)
{
ref = LCC_NOT_FOUND;
- for (struct symtab_node *n = node->same_comdat_group;
+ for (struct symtab_node *n = node->same_comdat_group;
ref == LCC_NOT_FOUND && n != node; n = n->same_comdat_group)
ref = lto_symtab_encoder_lookup (encoder, n);
}
thunk_info::get (node)->stream_out (ob);
}
-/* Output the varpool NODE to OB.
+/* Output the varpool NODE to OB.
If NODE is not in SET, then NODE is a boundary. */
static void
if (node->same_comdat_group)
{
ref = LCC_NOT_FOUND;
- for (struct symtab_node *n = node->same_comdat_group;
+ for (struct symtab_node *n = node->same_comdat_group;
ref == LCC_NOT_FOUND && n != node; n = n->same_comdat_group)
ref = lto_symtab_encoder_lookup (encoder, n);
}
LDPR_NUM_KNOWN, node->resolution);
}
-/* Output the varpool NODE to OB.
+/* Output the varpool NODE to OB.
If NODE is not in SET, then NODE is a boundary. */
static void
nref = lto_symtab_encoder_lookup (encoder, ref->referred);
gcc_assert (nref != LCC_NOT_FOUND);
streamer_write_hwi_stream (ob->main_stream, nref);
-
+
node = dyn_cast <cgraph_node *> (ref->referring);
if (node)
{
means that we need to insert the nodes in specific order. This order is
ignored by the partitioning logic earlier. */
-lto_symtab_encoder_t
+lto_symtab_encoder_t
compute_ltrans_boundary (lto_symtab_encoder_t in_encoder)
{
struct cgraph_edge *edge;
/* Read a cgraph from IB using the info in FILE_DATA. */
-static vec<symtab_node *>
+static vec<symtab_node *>
input_cgraph_1 (struct lto_file_decl_data *file_data,
class lto_input_block *ib)
{
omp_lto_input_declare_variant_alt (ib, cnode, nodes);
}
}
-
+
/* Input profile_info from IB. */
static void
input_profile_summary (class lto_input_block *ib,
ib = lto_create_simple_input_block (file_data, LTO_section_symtab_nodes,
&data, &len);
- if (!ib)
+ if (!ib)
fatal_error (input_location,
"cannot find LTO cgraph in %s", file_data->file_name);
input_profile_summary (ib, file_data);
struct bitpack_d bp;
bp = bitpack_create (ob->main_stream);
clone_info *info = clone_info::get (node);
-
+
bp_pack_value (&bp, (info && info->param_adjustments != NULL), 1);
streamer_write_bitpack (&bp);
if (ipa_param_adjustments *adjustments
/* This optimization saves location cache operations during gimple
streaming. */
-
+
if (current_file == stream_file
&& current_line == stream_line
&& current_col == stream_col
/* Read reference to tree from IB and DATA_IN.
This is used for streaming tree bodies where we know that
- the tree is already in cache or is indexable and
+ the tree is already in cache or is indexable and
must be matched with stream_write_tree_ref. */
tree
/* Output reference to tree T to the stream.
- Assume that T is already in encoder cache.
+ Assume that T is already in encoder cache.
This is used to stream tree bodies where we know the DFS walk arranged
everything to cache. Must be matched with stream_read_tree_ref. */
Randomness would inhibit incremental LTO. */
if (section_type == LTO_section_opts || flag_ltrans)
strcpy (post, "");
- else if (f != NULL)
+ else if (f != NULL)
sprintf (post, "." HOST_WIDE_INT_PRINT_HEX_PURE, f->id);
else if (flag_wpa)
strcpy (post, "");
else
- sprintf (post, "." HOST_WIDE_INT_PRINT_HEX_PURE, get_random_seed (false));
+ sprintf (post, "." HOST_WIDE_INT_PRINT_HEX_PURE, get_random_seed (false));
char *res = concat (section_name_prefix, sep, add, post, NULL);
if (buffer)
free (buffer);
would bring it out of sync with libcpp linemap); point to current
one. */
static lto_location_cache *current_cache;
-
+
private:
static int cmp_loc (const void *pa, const void *pb);
typedef struct lto_out_decl_state *lto_out_decl_state_ptr;
-/* Compact representation of a index <-> resolution pair. Unpacked to an
+/* Compact representation of a index <-> resolution pair. Unpacked to an
vector later. */
-struct res_pair
+struct res_pair
{
ld_plugin_symbol_resolution_t res;
unsigned index;
cf_protection_option = foption;
}
}
-
+
/* The following does what the old LTO option code did,
union all target and a selected set of common options. */
for (i = 0; i < fdecoded_options.length (); ++i)
decoded_options[existing_opt].value = 1;
}
break;
-
+
case OPT_foffload_abi_:
case OPT_foffload_abi_host_opts_:
It would be good to warn on mismatches, but it is bit hard to do as
we do not know what nothing translates to. */
-
+
for (unsigned int j = 0; j < decoded_options.length ();)
if (decoded_options[j].opt_index == OPT_fPIC
|| decoded_options[j].opt_index == OPT_fpic)
}
if ((p = strrchr (argv[i], '@'))
- && p != argv[i]
+ && p != argv[i]
&& sscanf (p, "@%li%n", &loffset, &consumed) >= 1
&& strlen (p) == (unsigned int) consumed)
{
obstack_ptr_grow (&argv_obstack, "-o");
obstack_ptr_grow (&argv_obstack, flto_out);
}
- else
+ else
{
const char *list_option = "-fltrans-output-list=";
{
for (i = 0; i < ltoobj_argc; ++i)
if (early_debug_object_names[i] != NULL)
- printf ("%s\n", early_debug_object_names[i]);
+ printf ("%s\n", early_debug_object_names[i]);
}
/* These now belong to collect2. */
free (flto_out);
fclose (mstream);
if (!jobserver)
{
- /* Avoid passing --jobserver-fd= and similar flags
+ /* Avoid passing --jobserver-fd= and similar flags
unless jobserver mode is explicitly enabled. */
putenv (xstrdup ("MAKEFLAGS="));
putenv (xstrdup ("MFLAGS="));
{
for (i = 0; i < ltoobj_argc; ++i)
if (early_debug_object_names[i] != NULL)
- printf ("%s\n", early_debug_object_names[i]);
+ printf ("%s\n", early_debug_object_names[i]);
}
nr = 0;
free (ltrans_priorities);
<http://www.gnu.org/licenses/>. */
/* LTO contributions to the "compilers" array in gcc.cc. */
-
+
{"@lto", "lto1 %(cc1_options) %i %{!fsyntax-only:%(invoke_as)}",
/*cpp_spec=*/NULL, /*combinable=*/1, /*needs_preprocessing=*/0},
{
/* Ensure we have a function type. */
gcc_assert (TREE_CODE (*node) == FUNCTION_TYPE);
-
+
/* Ensure we have a variadic function. */
gcc_assert (!prototype_p (*node) || stdarg_p (*node));
error ("%s: %s", fname, errmsg);
else
error ("%s: %s: %s", fname, errmsg, xstrerror (err));
-
+
if (lo->fd != -1)
lto_obj_file_close ((lto_file *) lo);
free (lo);
}
/* If symbol NODE is really part of other symbol's definition (i.e. it is
- internal label, thunk, alias or so), return the outer symbol.
+ internal label, thunk, alias or so), return the outer symbol.
When add_symbol_to_partition_1 is called on the outer symbol it must
eventually add NODE, too. */
static symtab_node *
/* If we have duplicated symbol contained in something we cannot duplicate,
we are very badly screwed. The other way is possible, so we do not
- assert this in add_symbol_to_partition_1.
+ assert this in add_symbol_to_partition_1.
Be lax about comdats; they may or may not be duplicated and we may
end up in need to duplicate keyed comdat because it has unkeyed alias. */
otherwise. Do not account references to external symbols: they will
never become local. Finally do not account references to duplicated
symbols: they will be always local. */
- if (n1 == n2
+ if (n1 == n2
|| !n2->definition
|| n2->get_partitioning_class () != SYMBOL_PARTITION)
return false;
if (!symbol_partitioned_p (order[i]))
add_symbol_to_partition (partition, order[i]);
-
+
/* Once we added a new node to the partition, we also want to add
all referenced variables unless they was already added into some
add_symbol_to_partition adds possibly multiple nodes and
variables that are needed to satisfy needs of ORDER[i].
We remember last visited cgraph and varpool node from last iteration
- of outer loop that allows us to process every new addition.
+ of outer loop that allows us to process every new addition.
At the same time we compute size of the boundary into COST. Every
callgraph or IPA reference edge leaving the partition contributes into
Later we stop building partition if its size is 9/8 of the target wight. */
if (partition->insns < partition_size * 7 / 8
|| best_cost == -1
- || (!cost
+ || (!cost
|| ((sreal)best_internal * (sreal) cost
< ((sreal) internal * (sreal)best_cost))))
{
name);
return true;
}
- /* Avoid mangling of already mangled clones.
+ /* Avoid mangling of already mangled clones.
??? should have a flag whether a symbol has a 'private' name already,
since we produce some symbols like that i.e. for global constructors
that are not really clones.
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (node->decl)));
/* Promoting a symbol also promotes all transparent aliases with exception
- of weakref where the visibility flags are always wrong and set to
+ of weakref where the visibility flags are always wrong and set to
!PUBLIC. */
ipa_ref *ref;
for (unsigned i = 0; node->iterate_direct_aliases (i, ref); i++)
delete lto_clone_numbers;
}
-/* Rename statics in the whole unit in the case that
+/* Rename statics in the whole unit in the case that
we do -flto-partition=none. */
void
return false;
}
gcc_checking_assert (TREE_CHAIN (prevailing) == TREE_CHAIN (decl));
-
+
if (TREE_CODE (prevailing) == FUNCTION_DECL)
{
if (fndecl_built_in_p (prevailing) != fndecl_built_in_p (decl))
|| TREE_CODE (TREE_TYPE (decl)) != METHOD_TYPE
|| !TYPE_METHOD_BASETYPE (TREE_TYPE (decl))
|| !odr_type_p (TYPE_METHOD_BASETYPE (TREE_TYPE (decl)))
- || !odr_type_violation_reported_p
+ || !odr_type_violation_reported_p
(TYPE_METHOD_BASETYPE (TREE_TYPE (decl))))
diag = warning_at (DECL_SOURCE_LOCATION (decl),
OPT_Wodr,
{
symtab->symtab_initialize_asm_name_hash ();
- /* Do the actual merging.
+ /* Do the actual merging.
At this point we invalidate hash translating decls into symtab nodes
because after removing one of duplicate decls the hash is not correcly
updated to the other duplicate. */
&& !node->previous_sharing_asm_name)
lto_symtab_merge_symbols_1 (node);
- /* Resolve weakref aliases whose target are now in the compilation unit.
+ /* Resolve weakref aliases whose target are now in the compilation unit.
also re-populate the hash translating decls into symtab nodes*/
FOR_EACH_SYMBOL (node)
{
&& node2 != node)
lto_varpool_replace_node (dyn_cast <varpool_node *> (node2),
vnode);
-
+
/* Abstract functions may have duplicated cgraph nodes attached;
remove them. */
{
ArgNo += 1;
}
- /*
+ /*
IF ArgNo>0
THEN
DEC(ArgNo)
/*
DebugString - writes a string to the debugging device (Scn.Write).
- It interprets
+ It interprets
as carriage return, linefeed.
*/
/*
DebugString - writes a string to the debugging device (Scn.Write).
- It interprets
+ It interprets
as carriage return, linefeed.
*/
/*
DebugString - writes a string to the debugging device (Scn.Write).
- It interprets
+ It interprets
as carriage return, linefeed.
*/
static unsigned int Capture (DynamicStrings_String__opaque s)
{
- /*
+ /*
* #undef GM2_DEBUG_DYNAMICSTINGS
* #if defined(GM2_DEBUG_DYNAMICSTINGS)
* # define DSdbEnter doDSdbEnter
a = CheckPoisoned (a);
b = CheckPoisoned (b);
}
- /*
+ /*
IF (a#NIL) AND (a#b) AND (a^.head^.state=marked)
THEN
writeString('warning trying to add to a marked string') ; writeLn
static int BufferedRead (FIO_File f, unsigned int nBytes, void * dest);
/*
- HandleEscape - translates
+ HandleEscape - translates
and \t into their respective ascii codes.
*/
/*
- HandleEscape - translates
+ HandleEscape - translates
and \t into their respective ascii codes.
*/
/* make a local copy of each unbounded array. */
memcpy (fname, fname_, _fname_high+1);
- /*
+ /*
The following functions are wrappers for the above.
*/
return FIO_exists (const_cast<void*> (static_cast<const void*>(fname)), StrLib_StrLen ((const char *) fname, _fname_high));
if (f != Error)
{
fd = static_cast<FIO_FileDescriptor> (Indexing_GetIndice (FileInfo, f));
- /*
+ /*
we allow users to close files which have an error status
*/
if (fd != NULL)
FIO_FileDescriptor fd;
CheckAccess (f, FIO_openedforread, false);
- /*
+ /*
we will read a character and then push it back onto the input stream,
having noted the file status, we also reset the status.
*/
extern "C" DynamicStrings_String FormatStrings_Sprintf4 (DynamicStrings_String fmt, const unsigned char *w1_, unsigned int _w1_high, const unsigned char *w2_, unsigned int _w2_high, const unsigned char *w3_, unsigned int _w3_high, const unsigned char *w4_, unsigned int _w4_high);
/*
- HandleEscape - translates \a, \b, \e, \f,
+ HandleEscape - translates \a, \b, \e, \f,
, \r, \x[hex] \[octal] into
their respective ascii codes. It also converts \[any] into
a single [any] character.
/*
- HandleEscape - translates \a, \b, \e, \f,
+ HandleEscape - translates \a, \b, \e, \f,
, \r, \x[hex] \[octal] into
their respective ascii codes. It also converts \[any] into
a single [any] character.
EXTERN DynamicStrings_String FormatStrings_Sprintf4 (DynamicStrings_String fmt, const unsigned char *w1_, unsigned int _w1_high, const unsigned char *w2_, unsigned int _w2_high, const unsigned char *w3_, unsigned int _w3_high, const unsigned char *w4_, unsigned int _w4_high);
/*
- HandleEscape - translates \a, \b, \e, \f,
+ HandleEscape - translates \a, \b, \e, \f,
, \r, \x[hex] \[octal]
into their respective ascii codes. It also converts
\[any] into a single [any] character.
struct ReadReal__T1_a { char array[MaxLineLength+1]; };
ReadReal__T1 a;
- /*
+ /*
#undef GM2_DEBUG_FPUIO
if defined(GM2_DEBUG_FPUIO)
# define InitString(X) InitStringDB(X, __FILE__, __LINE__)
static void doraw (termios_TERMIOS term)
{
- /*
+ /*
* from man 3 termios
* termios_p->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
* | INLCR | IGNCR | ICRNL | IXON);
static void dononraw (termios_TERMIOS term)
{
- /*
+ /*
* we undo these settings, (although we leave the character size alone)
*
* from man 3 termios
static M2Dependent_ModuleChain LookupModule (M2Dependent_DependencyState state, void * name, void * libname);
/*
- toCString - replace any character sequence
+ toCString - replace any character sequence
into a newline.
*/
/*
- toCString - replace any character sequence
+ toCString - replace any character sequence
into a newline.
*/
extern "C" void M2RTS_AssignmentException (void * filename, unsigned int line, unsigned int column, void * scope, void * message)
{
- /*
+ /*
The following are the runtime exception handler routines.
*/
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException)), filename, line, column, scope, message);
static int Min (int i, int j)
{
- /*
+ /*
Max - returns the minimum: i or j.
*/
if (i < j)
unsigned int i;
unsigned int h;
- /*
+ /*
translateNameToString - takes a format specification string, a, and
if they consist of of %a then this is translated
into a String and %a is replaced by %s.
memcpy (a, a_, _a_high+1);
memcpy (w, w_, _w_high+1);
- /*
+ /*
DoFormat1 -
*/
if (translateNameToCharStar ((char *) a, _a_high, 1))
/* make a local copy of each unbounded array. */
memcpy (a, a_, _a_high+1);
- /*
+ /*
errorFormat routines provide a printf capability for the error handle.
*/
if (static_cast<mcError_error__opaque> (e)->s == NULL)
/* make a local copy of each unbounded array. */
memcpy (a, a_, _a_high+1);
- /*
+ /*
WarnFormat0 - displays the source module and line together
with the encapsulated format string.
Used for simple warning messages tied to the current token.
static void registerImport (nameKey_Name ident, bool scoped);
/*
- FileUnit := DefinitionModule |
- ImplementationOrProgramModule
+ FileUnit := DefinitionModule |
+ ImplementationOrProgramModule
first symbols:implementationtok, moduletok, definitiontok
-
+
cannot reachend
*/
static void FileUnit (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ProgramModule := 'MODULE' Ident
+ ProgramModule := 'MODULE' Ident
% curmodule := lookupModule (curident) %
-
+
% enterScope (curmodule) %
- [ Priority ] ';' { Import } Block
- Ident
+ [ Priority ] ';' { Import } Block
+ Ident
% checkEndName (curmodule, curident, 'program module') %
-
+
% leaveScope %
- '.'
+ '.'
first symbols:moduletok
-
+
cannot reachend
*/
static void ProgramModule (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ImplementationModule := 'IMPLEMENTATION' 'MODULE'
- Ident
+ ImplementationModule := 'IMPLEMENTATION' 'MODULE'
+ Ident
% curmodule := lookupImp (curident) %
-
+
% enterScope (lookupDef (curident)) %
-
+
% enterScope (curmodule) %
- [ Priority ] ';' { Import }
- Block Ident
+ [ Priority ] ';' { Import }
+ Block Ident
% checkEndName (curmodule, curident, 'implementation module') %
-
+
% leaveScope ; leaveScope %
- '.'
+ '.'
first symbols:implementationtok
-
+
cannot reachend
*/
static void ImplementationModule (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ImplementationOrProgramModule := ImplementationModule |
- ProgramModule
+ ImplementationOrProgramModule := ImplementationModule |
+ ProgramModule
first symbols:moduletok, implementationtok
-
+
cannot reachend
*/
static void ImplementationOrProgramModule (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- Number := Integer | Real
+ Number := Integer | Real
first symbols:realtok, integertok
-
+
cannot reachend
*/
static void Number (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- Qualident := Ident { '.' Ident }
+ Qualident := Ident { '.' Ident }
first symbols:identtok
-
+
cannot reachend
*/
static void Qualident (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ConstExpression := SimpleConstExpr [ Relation SimpleConstExpr ]
+ ConstExpression := SimpleConstExpr [ Relation SimpleConstExpr ]
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void ConstExpression (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- Relation := '=' | '#' | '<>' | '<' | '<=' |
- '>' | '>=' | 'IN'
+ Relation := '=' | '#' | '<>' | '<' | '<=' |
+ '>' | '>=' | 'IN'
first symbols:intok, greaterequaltok, greatertok, lessequaltok, lesstok, lessgreatertok, hashtok, equaltok
-
+
cannot reachend
*/
static void Relation (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SimpleConstExpr := UnaryOrConstTerm { AddOperator
- ConstTerm }
+ SimpleConstExpr := UnaryOrConstTerm { AddOperator
+ ConstTerm }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void SimpleConstExpr (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- UnaryOrConstTerm := '+' ConstTerm |
- '-' ConstTerm |
- ConstTerm
+ UnaryOrConstTerm := '+' ConstTerm |
+ '-' ConstTerm |
+ ConstTerm
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void UnaryOrConstTerm (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- AddOperator := '+' | '-' | 'OR'
+ AddOperator := '+' | '-' | 'OR'
first symbols:ortok, minustok, plustok
-
+
cannot reachend
*/
static void AddOperator (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ConstTerm := ConstFactor { MulOperator ConstFactor }
+ ConstTerm := ConstFactor { MulOperator ConstFactor }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok
-
+
cannot reachend
*/
static void ConstTerm (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- MulOperator := '*' | '/' | 'DIV' | 'MOD' |
- 'REM' | 'AND' | '&'
+ MulOperator := '*' | '/' | 'DIV' | 'MOD' |
+ 'REM' | 'AND' | '&'
first symbols:ambersandtok, andtok, remtok, modtok, divtok, dividetok, timestok
-
+
cannot reachend
*/
static void MulOperator (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ConstFactor := Number | ConstString |
- ConstSetOrQualidentOrFunction |
- '(' ConstExpression ')' |
- 'NOT' ConstFactor |
- ConstAttribute
+ ConstFactor := Number | ConstString |
+ ConstSetOrQualidentOrFunction |
+ '(' ConstExpression ')' |
+ 'NOT' ConstFactor |
+ ConstAttribute
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok
-
+
cannot reachend
*/
static void ConstFactor (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ConstString := string
+ ConstString := string
first symbols:stringtok
-
+
cannot reachend
*/
static void ConstString (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ComponentElement := ConstExpression [ '..' ConstExpression ]
+ ComponentElement := ConstExpression [ '..' ConstExpression ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ComponentElement (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ComponentValue := ComponentElement [ 'BY' ConstExpression ]
+ ComponentValue := ComponentElement [ 'BY' ConstExpression ]
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void ComponentValue (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ArraySetRecordValue := ComponentValue { ',' ComponentValue }
+ ArraySetRecordValue := ComponentValue { ',' ComponentValue }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ArraySetRecordValue (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- Constructor := '{' [ ArraySetRecordValue ] '}'
+ Constructor := '{' [ ArraySetRecordValue ] '}'
first symbols:lcbratok
-
+
cannot reachend
*/
static void Constructor (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ConstSetOrQualidentOrFunction := Qualident [ Constructor |
- ConstActualParameters ] |
- Constructor
+ ConstSetOrQualidentOrFunction := Qualident [ Constructor |
+ ConstActualParameters ] |
+ Constructor
first symbols:lcbratok, identtok
-
+
cannot reachend
*/
static void ConstSetOrQualidentOrFunction (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ConstActualParameters := ActualParameters
+ ConstActualParameters := ActualParameters
first symbols:lparatok
-
+
cannot reachend
*/
static void ConstActualParameters (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' ConstAttributeExpression
- ')' ')'
+ ConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' ConstAttributeExpression
+ ')' ')'
first symbols:attributetok
-
+
cannot reachend
*/
static void ConstAttribute (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ConstAttributeExpression := Ident | '<' Qualident
- ',' Ident '>'
+ ConstAttributeExpression := Ident | '<' Qualident
+ ',' Ident '>'
first symbols:lesstok, identtok
-
+
cannot reachend
*/
static void ConstAttributeExpression (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ByteAlignment := ''
+ ByteAlignment := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
static void ByteAlignment (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- OptAlignmentExpression := [ AlignmentExpression ]
+ OptAlignmentExpression := [ AlignmentExpression ]
first symbols:lparatok
-
+
reachend
*/
static void OptAlignmentExpression (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- AlignmentExpression := '(' ConstExpression ')'
+ AlignmentExpression := '(' ConstExpression ')'
first symbols:lparatok
-
+
cannot reachend
*/
static void AlignmentExpression (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- Alignment := [ ByteAlignment ]
+ Alignment := [ ByteAlignment ]
first symbols:ldirectivetok
-
+
reachend
*/
static void Alignment (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- TypeDeclaration := Ident
+ TypeDeclaration := Ident
% VAR n: node ; %
-
+
% n := makeTypeImp (curident) %
- '=' Type Alignment
+ '=' Type Alignment
first symbols:identtok
-
+
cannot reachend
*/
static void TypeDeclaration (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- Type := ( SimpleType | ArrayType | RecordType |
- SetType | PointerType |
- ProcedureType )
+ Type := ( SimpleType | ArrayType | RecordType |
+ SetType | PointerType |
+ ProcedureType )
first symbols:lparatok, lsbratok, proceduretok, pointertok, settok, packedsettok, oftok, recordtok, arraytok, identtok
-
+
cannot reachend
*/
static void Type (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SimpleType := Qualident [ SubrangeType ] |
- Enumeration | SubrangeType
+ SimpleType := Qualident [ SubrangeType ] |
+ Enumeration | SubrangeType
first symbols:lsbratok, lparatok, identtok
-
+
cannot reachend
*/
static void SimpleType (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- Enumeration := '(' ( IdentList ) ')'
+ Enumeration := '(' ( IdentList ) ')'
first symbols:lparatok
-
+
cannot reachend
*/
static void Enumeration (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- IdentList := Ident { ',' Ident }
+ IdentList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
static void IdentList (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SubrangeType := '[' ConstExpression '..' ConstExpression
- ']'
+ SubrangeType := '[' ConstExpression '..' ConstExpression
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
static void SubrangeType (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ArrayType := 'ARRAY' SimpleType { ',' SimpleType }
- 'OF' Type
+ ArrayType := 'ARRAY' SimpleType { ',' SimpleType }
+ 'OF' Type
first symbols:arraytok
-
+
cannot reachend
*/
static void ArrayType (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- RecordType := 'RECORD' [ DefaultRecordAttributes ]
- FieldListSequence 'END'
+ RecordType := 'RECORD' [ DefaultRecordAttributes ]
+ FieldListSequence 'END'
first symbols:recordtok
-
+
cannot reachend
*/
static void RecordType (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- DefaultRecordAttributes := ''
+ DefaultRecordAttributes := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
static void DefaultRecordAttributes (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- RecordFieldPragma := [ '' ]
+ RecordFieldPragma := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
static void RecordFieldPragma (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- FieldPragmaExpression := Ident PragmaConstExpression
+ FieldPragmaExpression := Ident PragmaConstExpression
first symbols:identtok
-
+
cannot reachend
*/
static void FieldPragmaExpression (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- PragmaConstExpression := [ '(' ConstExpression ')' ]
+ PragmaConstExpression := [ '(' ConstExpression ')' ]
first symbols:lparatok
-
+
reachend
*/
static void PragmaConstExpression (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- AttributeExpression := Ident '(' ConstExpression
- ')'
+ AttributeExpression := Ident '(' ConstExpression
+ ')'
first symbols:identtok
-
+
cannot reachend
*/
static void AttributeExpression (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- FieldListSequence := FieldListStatement { ';' FieldListStatement }
+ FieldListSequence := FieldListStatement { ';' FieldListStatement }
first symbols:casetok, identtok, semicolontok
-
+
reachend
*/
static void FieldListSequence (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- FieldListStatement := [ FieldList ]
+ FieldListStatement := [ FieldList ]
first symbols:identtok, casetok
-
+
reachend
*/
static void FieldListStatement (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- FieldList := IdentList ':' Type RecordFieldPragma |
- 'CASE' CaseTag 'OF' Varient { '|' Varient }
- [ 'ELSE' FieldListSequence ] 'END'
+ FieldList := IdentList ':' Type RecordFieldPragma |
+ 'CASE' CaseTag 'OF' Varient { '|' Varient }
+ [ 'ELSE' FieldListSequence ] 'END'
first symbols:casetok, identtok
-
+
cannot reachend
*/
static void FieldList (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- TagIdent := [ Ident ]
+ TagIdent := [ Ident ]
first symbols:identtok
-
+
reachend
*/
static void TagIdent (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- CaseTag := TagIdent [ ':' Qualident ]
+ CaseTag := TagIdent [ ':' Qualident ]
first symbols:colontok, identtok
-
+
reachend
*/
static void CaseTag (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- Varient := [ VarientCaseLabelList ':' FieldListSequence ]
+ Varient := [ VarientCaseLabelList ':' FieldListSequence ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
reachend
*/
static void Varient (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- VarientCaseLabelList := VarientCaseLabels { ','
- VarientCaseLabels }
+ VarientCaseLabelList := VarientCaseLabels { ','
+ VarientCaseLabels }
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void VarientCaseLabelList (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- VarientCaseLabels := ConstExpression [ '..' ConstExpression ]
+ VarientCaseLabels := ConstExpression [ '..' ConstExpression ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void VarientCaseLabels (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SilentConstExpression := SilentSimpleConstExpr [
- SilentRelation SilentSimpleConstExpr ]
+ SilentConstExpression := SilentSimpleConstExpr [
+ SilentRelation SilentSimpleConstExpr ]
first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void SilentConstExpression (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SilentRelation := '=' | '#' | '<>' | '<' |
- '<=' | '>' | '>=' | 'IN'
+ SilentRelation := '=' | '#' | '<>' | '<' |
+ '<=' | '>' | '>=' | 'IN'
first symbols:intok, greaterequaltok, greatertok, lessequaltok, lesstok, lessgreatertok, hashtok, equaltok
-
+
cannot reachend
*/
static void SilentRelation (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SilentSimpleConstExpr := SilentUnaryOrConstTerm
- { SilentAddOperator SilentConstTerm }
+ SilentSimpleConstExpr := SilentUnaryOrConstTerm
+ { SilentAddOperator SilentConstTerm }
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void SilentSimpleConstExpr (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SilentUnaryOrConstTerm := '+' SilentConstTerm |
- '-' SilentConstTerm |
- SilentConstTerm
+ SilentUnaryOrConstTerm := '+' SilentConstTerm |
+ '-' SilentConstTerm |
+ SilentConstTerm
first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void SilentUnaryOrConstTerm (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SilentAddOperator := '+' | '-' | 'OR'
+ SilentAddOperator := '+' | '-' | 'OR'
first symbols:ortok, minustok, plustok
-
+
cannot reachend
*/
static void SilentAddOperator (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SilentConstTerm := SilentConstFactor { SilentMulOperator
- SilentConstFactor }
+ SilentConstTerm := SilentConstFactor { SilentMulOperator
+ SilentConstFactor }
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok
-
+
cannot reachend
*/
static void SilentConstTerm (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SilentMulOperator := '*' | '/' | 'DIV' |
- 'MOD' | 'REM' | 'AND' |
- '&'
+ SilentMulOperator := '*' | '/' | 'DIV' |
+ 'MOD' | 'REM' | 'AND' |
+ '&'
first symbols:ambersandtok, andtok, remtok, modtok, divtok, dividetok, timestok
-
+
cannot reachend
*/
static void SilentMulOperator (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SilentConstFactor := Number | SilentConstString |
- SilentConstSetOrQualidentOrFunction |
- '(' SilentConstExpression ')' |
- 'NOT' SilentConstFactor |
- SilentConstAttribute
+ SilentConstFactor := Number | SilentConstString |
+ SilentConstSetOrQualidentOrFunction |
+ '(' SilentConstExpression ')' |
+ 'NOT' SilentConstFactor |
+ SilentConstAttribute
first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok
-
+
cannot reachend
*/
static void SilentConstFactor (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SilentConstString := string
+ SilentConstString := string
first symbols:stringtok
-
+
cannot reachend
*/
static void SilentConstString (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SilentConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' SilentConstAttributeExpression
- ')' ')'
+ SilentConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' SilentConstAttributeExpression
+ ')' ')'
first symbols:attributetok
-
+
cannot reachend
*/
static void SilentConstAttribute (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SilentConstAttributeExpression := Ident |
- '<' Ident ','
- SilentConstString
- '>'
+ SilentConstAttributeExpression := Ident |
+ '<' Ident ','
+ SilentConstString
+ '>'
first symbols:lesstok, identtok
-
+
cannot reachend
*/
static void SilentConstAttributeExpression (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SilentComponentElement := SilentConstExpression
- [ '..' SilentConstExpression ]
+ SilentComponentElement := SilentConstExpression
+ [ '..' SilentConstExpression ]
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void SilentComponentElement (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SilentComponentValue := SilentComponentElement [
- 'BY' SilentConstExpression ]
+ SilentComponentValue := SilentComponentElement [
+ 'BY' SilentConstExpression ]
first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void SilentComponentValue (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SilentArraySetRecordValue := SilentComponentValue
- { ',' SilentComponentValue }
+ SilentArraySetRecordValue := SilentComponentValue
+ { ',' SilentComponentValue }
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void SilentArraySetRecordValue (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SilentConstructor := '{' [ SilentArraySetRecordValue ]
- '}'
+ SilentConstructor := '{' [ SilentArraySetRecordValue ]
+ '}'
first symbols:lcbratok
-
+
cannot reachend
*/
static void SilentConstructor (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SilentConstSetOrQualidentOrFunction := SilentConstructor |
- Qualident
- [ SilentConstructor |
- SilentActualParameters ]
+ SilentConstSetOrQualidentOrFunction := SilentConstructor |
+ Qualident
+ [ SilentConstructor |
+ SilentActualParameters ]
first symbols:identtok, lcbratok
-
+
cannot reachend
*/
static void SilentConstSetOrQualidentOrFunction (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SilentElement := SilentConstExpression [ '..' SilentConstExpression ]
+ SilentElement := SilentConstExpression [ '..' SilentConstExpression ]
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void SilentElement (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SilentActualParameters := '(' [ SilentExpList ]
- ')'
+ SilentActualParameters := '(' [ SilentExpList ]
+ ')'
first symbols:lparatok
-
+
cannot reachend
*/
static void SilentActualParameters (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SilentExpList := SilentConstExpression { ',' SilentConstExpression }
+ SilentExpList := SilentConstExpression { ',' SilentConstExpression }
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void SilentExpList (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SetType := ( 'SET' | 'PACKEDSET' ) 'OF' SimpleType
+ SetType := ( 'SET' | 'PACKEDSET' ) 'OF' SimpleType
first symbols:oftok, packedsettok, settok
-
+
cannot reachend
*/
static void SetType (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- PointerType := 'POINTER' 'TO' Type
+ PointerType := 'POINTER' 'TO' Type
first symbols:pointertok
-
+
cannot reachend
*/
static void PointerType (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ProcedureType := 'PROCEDURE' [ FormalTypeList ]
+ ProcedureType := 'PROCEDURE' [ FormalTypeList ]
first symbols:proceduretok
-
+
cannot reachend
*/
static void ProcedureType (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- FormalTypeList := '(' ( ')' FormalReturn |
- ProcedureParameters ')'
- FormalReturn )
+ FormalTypeList := '(' ( ')' FormalReturn |
+ ProcedureParameters ')'
+ FormalReturn )
first symbols:lparatok
-
+
cannot reachend
*/
static void FormalTypeList (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- FormalReturn := [ ':' OptReturnType ]
+ FormalReturn := [ ':' OptReturnType ]
first symbols:colontok
-
+
reachend
*/
static void FormalReturn (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- OptReturnType := '[' Qualident ']' |
- Qualident
+ OptReturnType := '[' Qualident ']' |
+ Qualident
first symbols:identtok, lsbratok
-
+
cannot reachend
*/
static void OptReturnType (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ProcedureParameters := ProcedureParameter { ','
- ProcedureParameter }
+ ProcedureParameters := ProcedureParameter { ','
+ ProcedureParameter }
first symbols:identtok, arraytok, periodperiodperiodtok, vartok
-
+
cannot reachend
*/
static void ProcedureParameters (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ProcedureParameter := '...' | 'VAR' FormalType |
- FormalType
+ ProcedureParameter := '...' | 'VAR' FormalType |
+ FormalType
first symbols:arraytok, identtok, vartok, periodperiodperiodtok
-
+
cannot reachend
*/
static void ProcedureParameter (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- VarIdent := Ident
+ VarIdent := Ident
% VAR n: node ; %
-
+
% n := makeVar (curident) %
- [ '[' ConstExpression ']' ]
+ [ '[' ConstExpression ']' ]
first symbols:identtok
-
+
cannot reachend
*/
static void VarIdent (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- VarIdentList := VarIdent { ',' VarIdent }
+ VarIdentList := VarIdent { ',' VarIdent }
first symbols:identtok
-
+
cannot reachend
*/
static void VarIdentList (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- VariableDeclaration := VarIdentList ':' Type Alignment
+ VariableDeclaration := VarIdentList ':' Type Alignment
first symbols:identtok
-
+
cannot reachend
*/
static void VariableDeclaration (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- Designator := Qualident { SubDesignator }
+ Designator := Qualident { SubDesignator }
first symbols:identtok
-
+
cannot reachend
*/
static void Designator (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SubDesignator := '.' Ident | '[' ArrayExpList ']' |
- '^'
+ SubDesignator := '.' Ident | '[' ArrayExpList ']' |
+ '^'
first symbols:uparrowtok, lsbratok, periodtok
-
+
cannot reachend
*/
static void SubDesignator (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ArrayExpList := Expression { ',' Expression }
+ ArrayExpList := Expression { ',' Expression }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ArrayExpList (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ExpList := Expression { ',' Expression }
+ ExpList := Expression { ',' Expression }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ExpList (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- Expression := SimpleExpression [ Relation SimpleExpression ]
+ Expression := SimpleExpression [ Relation SimpleExpression ]
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void Expression (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SimpleExpression := UnaryOrTerm { AddOperator Term }
+ SimpleExpression := UnaryOrTerm { AddOperator Term }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void SimpleExpression (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- UnaryOrTerm := '+' Term | '-' Term |
- Term
+ UnaryOrTerm := '+' Term | '-' Term |
+ Term
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void UnaryOrTerm (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- Term := Factor { MulOperator Factor }
+ Term := Factor { MulOperator Factor }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok
-
+
cannot reachend
*/
static void Term (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- Factor := Number | string | SetOrDesignatorOrFunction |
- '(' Expression ')' |
- 'NOT' ( Factor | ConstAttribute )
+ Factor := Number | string | SetOrDesignatorOrFunction |
+ '(' Expression ')' |
+ 'NOT' ( Factor | ConstAttribute )
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok
-
+
cannot reachend
*/
static void Factor (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SetOrDesignatorOrFunction := Qualident [ Constructor |
- SimpleDes
- [ ActualParameters ] ] |
- Constructor
+ SetOrDesignatorOrFunction := Qualident [ Constructor |
+ SimpleDes
+ [ ActualParameters ] ] |
+ Constructor
first symbols:lcbratok, identtok
-
+
cannot reachend
*/
static void SetOrDesignatorOrFunction (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- SimpleDes := { SubDesignator }
+ SimpleDes := { SubDesignator }
first symbols:periodtok, lsbratok, uparrowtok
-
+
reachend
*/
static void SimpleDes (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ActualParameters := '(' [ ExpList ] ')'
+ ActualParameters := '(' [ ExpList ] ')'
first symbols:lparatok
-
+
cannot reachend
*/
static void ActualParameters (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ExitStatement := 'EXIT'
+ ExitStatement := 'EXIT'
first symbols:exittok
-
+
cannot reachend
*/
static void ExitStatement (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ReturnStatement := 'RETURN' [ Expression ]
+ ReturnStatement := 'RETURN' [ Expression ]
first symbols:returntok
-
+
cannot reachend
*/
static void ReturnStatement (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- Statement := [ AssignmentOrProcedureCall |
- IfStatement | CaseStatement |
- WhileStatement |
- RepeatStatement |
- LoopStatement | ForStatement |
- WithStatement | AsmStatement |
- ExitStatement | ReturnStatement |
- RetryStatement ]
+ Statement := [ AssignmentOrProcedureCall |
+ IfStatement | CaseStatement |
+ WhileStatement |
+ RepeatStatement |
+ LoopStatement | ForStatement |
+ WithStatement | AsmStatement |
+ ExitStatement | ReturnStatement |
+ RetryStatement ]
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok
-
+
reachend
*/
static void Statement (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- RetryStatement := 'RETRY'
+ RetryStatement := 'RETRY'
first symbols:retrytok
-
+
cannot reachend
*/
static void RetryStatement (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- AssignmentOrProcedureCall := Designator ( ':=' Expression |
- ActualParameters |
-
+ AssignmentOrProcedureCall := Designator ( ':=' Expression |
+ ActualParameters |
+
% epsilon %
- )
+ )
first symbols:identtok
-
+
cannot reachend
*/
static void AssignmentOrProcedureCall (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- StatementSequence := Statement { ';' Statement }
+ StatementSequence := Statement { ';' Statement }
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok
-
+
reachend
*/
static void StatementSequence (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- IfStatement := 'IF' Expression 'THEN' StatementSequence
- { 'ELSIF' Expression 'THEN' StatementSequence }
- [ 'ELSE' StatementSequence ] 'END'
+ IfStatement := 'IF' Expression 'THEN' StatementSequence
+ { 'ELSIF' Expression 'THEN' StatementSequence }
+ [ 'ELSE' StatementSequence ] 'END'
first symbols:iftok
-
+
cannot reachend
*/
static void IfStatement (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- CaseStatement := 'CASE' Expression 'OF' Case { '|'
- Case }
- CaseEndStatement
+ CaseStatement := 'CASE' Expression 'OF' Case { '|'
+ Case }
+ CaseEndStatement
first symbols:casetok
-
+
cannot reachend
*/
static void CaseStatement (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- CaseEndStatement := 'END' | 'ELSE' StatementSequence
- 'END'
+ CaseEndStatement := 'END' | 'ELSE' StatementSequence
+ 'END'
first symbols:elsetok, endtok
-
+
cannot reachend
*/
static void CaseEndStatement (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- Case := [ CaseLabelList ':' StatementSequence ]
+ Case := [ CaseLabelList ':' StatementSequence ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
reachend
*/
static void Case (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- CaseLabelList := CaseLabels { ',' CaseLabels }
+ CaseLabelList := CaseLabels { ',' CaseLabels }
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void CaseLabelList (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- CaseLabels := ConstExpression [ '..' ConstExpression ]
+ CaseLabels := ConstExpression [ '..' ConstExpression ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void CaseLabels (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- WhileStatement := 'WHILE' Expression 'DO' StatementSequence
- 'END'
+ WhileStatement := 'WHILE' Expression 'DO' StatementSequence
+ 'END'
first symbols:whiletok
-
+
cannot reachend
*/
static void WhileStatement (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- RepeatStatement := 'REPEAT' StatementSequence 'UNTIL'
- Expression
+ RepeatStatement := 'REPEAT' StatementSequence 'UNTIL'
+ Expression
first symbols:repeattok
-
+
cannot reachend
*/
static void RepeatStatement (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ForStatement := 'FOR' Ident ':=' Expression 'TO'
- Expression [ 'BY' ConstExpression ]
- 'DO' StatementSequence 'END'
+ ForStatement := 'FOR' Ident ':=' Expression 'TO'
+ Expression [ 'BY' ConstExpression ]
+ 'DO' StatementSequence 'END'
first symbols:fortok
-
+
cannot reachend
*/
static void ForStatement (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- LoopStatement := 'LOOP' StatementSequence 'END'
+ LoopStatement := 'LOOP' StatementSequence 'END'
first symbols:looptok
-
+
cannot reachend
*/
static void LoopStatement (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- WithStatement := 'WITH' Designator 'DO' StatementSequence
- 'END'
+ WithStatement := 'WITH' Designator 'DO' StatementSequence
+ 'END'
first symbols:withtok
-
+
cannot reachend
*/
static void WithStatement (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ProcedureDeclaration := ProcedureHeading ';' ProcedureBlock
- Ident
+ ProcedureDeclaration := ProcedureHeading ';' ProcedureBlock
+ Ident
first symbols:proceduretok
-
+
cannot reachend
*/
static void ProcedureDeclaration (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- DefProcedureIdent := Ident
+ DefProcedureIdent := Ident
% curproc := makeProcedure (curident) ;
setProcedureComment (lastcomment, curident) ;
putCommentDefProcedure (curproc) ;
%
-
+
first symbols:identtok
-
+
cannot reachend
*/
static void DefProcedureIdent (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ProcedureIdent := Ident
+ ProcedureIdent := Ident
% curproc := lookupSym (curident) ;
IF curproc=NIL
THEN
setProcedureComment (lastcomment, curident) ;
putCommentModProcedure (curproc) ;
%
-
+
first symbols:identtok
-
+
cannot reachend
*/
static void ProcedureIdent (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- DefineBuiltinProcedure := [ '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' Ident ')' ')' |
- '__INLINE__' ]
+ DefineBuiltinProcedure := [ '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' Ident ')' ')' |
+ '__INLINE__' ]
first symbols:inlinetok, attributetok
-
+
reachend
*/
static void DefineBuiltinProcedure (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ProcedureHeading := 'PROCEDURE' DefineBuiltinProcedure
- ( ProcedureIdent
+ ProcedureHeading := 'PROCEDURE' DefineBuiltinProcedure
+ ( ProcedureIdent
% enterScope (curproc) %
- [ FormalParameters ] AttributeNoReturn )
+ [ FormalParameters ] AttributeNoReturn )
first symbols:proceduretok
-
+
cannot reachend
*/
static void ProcedureHeading (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- Builtin := [ '__BUILTIN__' | '__INLINE__' ]
+ Builtin := [ '__BUILTIN__' | '__INLINE__' ]
first symbols:inlinetok, builtintok
-
+
reachend
*/
static void Builtin (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- DefProcedureHeading := 'PROCEDURE' Builtin ( DefProcedureIdent
- [ DefFormalParameters ]
- AttributeNoReturn )
+ DefProcedureHeading := 'PROCEDURE' Builtin ( DefProcedureIdent
+ [ DefFormalParameters ]
+ AttributeNoReturn )
first symbols:proceduretok
-
+
cannot reachend
*/
static void DefProcedureHeading (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ProcedureBlock := { Declaration } [ 'BEGIN' ProcedureBlockBody ]
- 'END'
+ ProcedureBlock := { Declaration } [ 'BEGIN' ProcedureBlockBody ]
+ 'END'
% leaveScope %
-
+
first symbols:proceduretok, moduletok, consttok, typetok, vartok, endtok, begintok
-
+
cannot reachend
*/
static void ProcedureBlock (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- Block := { Declaration } InitialBlock FinalBlock
- 'END'
+ Block := { Declaration } InitialBlock FinalBlock
+ 'END'
first symbols:proceduretok, moduletok, finallytok, begintok, consttok, typetok, vartok, endtok
-
+
cannot reachend
*/
static void Block (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- InitialBlock := [ 'BEGIN' InitialBlockBody ]
+ InitialBlock := [ 'BEGIN' InitialBlockBody ]
first symbols:begintok
-
+
reachend
*/
static void InitialBlock (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- FinalBlock := [ 'FINALLY' FinalBlockBody ]
+ FinalBlock := [ 'FINALLY' FinalBlockBody ]
first symbols:finallytok
-
+
reachend
*/
static void FinalBlock (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- InitialBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ InitialBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
static void InitialBlockBody (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- FinalBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ FinalBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
static void FinalBlockBody (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ProcedureBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ ProcedureBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
static void ProcedureBlockBody (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- NormalPart := StatementSequence
+ NormalPart := StatementSequence
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok, semicolontok
-
+
reachend
*/
static void NormalPart (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ExceptionalPart := StatementSequence
+ ExceptionalPart := StatementSequence
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok, semicolontok
-
+
reachend
*/
static void ExceptionalPart (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- Declaration := 'CONST' { ConstantDeclaration ';' } |
- 'TYPE' { TypeDeclaration ';' } |
- 'VAR' { VariableDeclaration ';' } |
- ProcedureDeclaration ';' |
- ModuleDeclaration ';'
+ Declaration := 'CONST' { ConstantDeclaration ';' } |
+ 'TYPE' { TypeDeclaration ';' } |
+ 'VAR' { VariableDeclaration ';' } |
+ ProcedureDeclaration ';' |
+ ModuleDeclaration ';'
first symbols:moduletok, proceduretok, vartok, typetok, consttok
-
+
cannot reachend
*/
static void Declaration (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- DefFormalParameters := '(' [ DefMultiFPSection ]
- ')' FormalReturn
+ DefFormalParameters := '(' [ DefMultiFPSection ]
+ ')' FormalReturn
first symbols:lparatok
-
+
cannot reachend
*/
static void DefFormalParameters (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- DefMultiFPSection := DefExtendedFP |
- FPSection [ ';' DefMultiFPSection ]
+ DefMultiFPSection := DefExtendedFP |
+ FPSection [ ';' DefMultiFPSection ]
first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
static void DefMultiFPSection (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- FormalParameters := '(' [ MultiFPSection ] ')'
- FormalReturn
+ FormalParameters := '(' [ MultiFPSection ] ')'
+ FormalReturn
first symbols:lparatok
-
+
cannot reachend
*/
static void FormalParameters (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- AttributeNoReturn := [ '' ]
+ AttributeNoReturn := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
static void AttributeNoReturn (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- AttributeUnused := [ '' ]
+ AttributeUnused := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
static void AttributeUnused (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- MultiFPSection := ExtendedFP | FPSection [ ';'
- MultiFPSection ]
+ MultiFPSection := ExtendedFP | FPSection [ ';'
+ MultiFPSection ]
first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
static void MultiFPSection (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- FPSection := NonVarFPSection |
- VarFPSection
+ FPSection := NonVarFPSection |
+ VarFPSection
first symbols:vartok, identtok
-
+
cannot reachend
*/
static void FPSection (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- DefExtendedFP := DefOptArg | '...'
+ DefExtendedFP := DefOptArg | '...'
first symbols:lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
static void DefExtendedFP (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ExtendedFP := OptArg | '...'
+ ExtendedFP := OptArg | '...'
first symbols:lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
static void ExtendedFP (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- VarFPSection := 'VAR' IdentList ':' FormalType [
- AttributeUnused ]
+ VarFPSection := 'VAR' IdentList ':' FormalType [
+ AttributeUnused ]
first symbols:vartok
-
+
cannot reachend
*/
static void VarFPSection (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- NonVarFPSection := IdentList ':' FormalType [ AttributeUnused ]
+ NonVarFPSection := IdentList ':' FormalType [ AttributeUnused ]
first symbols:identtok
-
+
cannot reachend
*/
static void NonVarFPSection (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- OptArg := '[' Ident ':' FormalType [ '=' ConstExpression ]
- ']'
+ OptArg := '[' Ident ':' FormalType [ '=' ConstExpression ]
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
static void OptArg (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- DefOptArg := '[' Ident ':' FormalType '=' ConstExpression
- ']'
+ DefOptArg := '[' Ident ':' FormalType '=' ConstExpression
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
static void DefOptArg (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- FormalType := { 'ARRAY' 'OF' } Qualident
+ FormalType := { 'ARRAY' 'OF' } Qualident
first symbols:identtok, arraytok
-
+
cannot reachend
*/
static void FormalType (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ModuleDeclaration := 'MODULE' Ident [ Priority ]
- ';' { Import } [ Export ]
- Block Ident
+ ModuleDeclaration := 'MODULE' Ident [ Priority ]
+ ';' { Import } [ Export ]
+ Block Ident
first symbols:moduletok
-
+
cannot reachend
*/
static void ModuleDeclaration (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- Priority := '[' ConstExpression ']'
+ Priority := '[' ConstExpression ']'
first symbols:lsbratok
-
+
cannot reachend
*/
static void Priority (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- Export := 'EXPORT' ( 'QUALIFIED' IdentList |
- 'UNQUALIFIED'
+ Export := 'EXPORT' ( 'QUALIFIED' IdentList |
+ 'UNQUALIFIED'
% putDefUnqualified (curmodule) %
- IdentList |
- IdentList ) ';'
+ IdentList |
+ IdentList ) ';'
first symbols:exporttok
-
+
cannot reachend
*/
static void Export (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- FromImport := 'FROM' Ident
+ FromImport := 'FROM' Ident
% registerImport (curident, FALSE) %
- 'IMPORT' IdentList ';'
+ 'IMPORT' IdentList ';'
first symbols:fromtok
-
+
cannot reachend
*/
static void FromImport (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ImportModuleList := Ident
+ ImportModuleList := Ident
% registerImport (curident, TRUE) %
- { ',' Ident
+ { ',' Ident
% registerImport (curident, TRUE) %
- }
+ }
first symbols:identtok
-
+
cannot reachend
*/
static void ImportModuleList (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- WithoutFromImport := 'IMPORT' ImportModuleList ';'
+ WithoutFromImport := 'IMPORT' ImportModuleList ';'
first symbols:importtok
-
+
cannot reachend
*/
static void WithoutFromImport (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- Import := FromImport | WithoutFromImport
+ Import := FromImport | WithoutFromImport
first symbols:importtok, fromtok
-
+
cannot reachend
*/
static void Import (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- DefinitionModule :=
+ DefinitionModule :=
% VAR c: BOOLEAN ; %
-
+
% c := FALSE %
- 'DEFINITION' 'MODULE' [ 'FOR'
- string
-
+ 'DEFINITION' 'MODULE' [ 'FOR'
+ string
+
% c := TRUE %
- ] Ident
- ';'
+ ] Ident
+ ';'
% curmodule := lookupDef (curident) %
-
+
% IF c THEN putDefForC (curmodule) END %
-
+
% enterScope (curmodule) %
- { Import } [ Export ] { Definition }
- 'END' Ident '.'
+ { Import } [ Export ] { Definition }
+ 'END' Ident '.'
% checkEndName (curmodule, curident, 'definition module') %
-
+
% leaveScope %
-
+
first symbols:definitiontok
-
+
cannot reachend
*/
static void DefinitionModule (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- DefTypeDeclaration := { Ident
+ DefTypeDeclaration := { Ident
% VAR n: node ; %
-
+
% n := makeType (curident) %
- ( ';'
+ ( ';'
% putTypeHidden (n) ;
putTypeOpaque (n) %
- | '=' Type Alignment
- ';' ) }
+ | '=' Type Alignment
+ ';' ) }
first symbols:identtok
-
+
reachend
*/
static void DefTypeDeclaration (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- ConstantDeclaration := Ident
+ ConstantDeclaration := Ident
% VAR n: node ; %
-
+
% n := makeConst (curident) %
- '=' ConstExpression
+ '=' ConstExpression
first symbols:identtok
-
+
cannot reachend
*/
static void ConstantDeclaration (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- Definition := 'CONST' { ConstantDeclaration ';' } |
- 'TYPE' { DefTypeDeclaration } |
- 'VAR' { VariableDeclaration ';' } |
- DefProcedureHeading ';'
+ Definition := 'CONST' { ConstantDeclaration ';' } |
+ 'TYPE' { DefTypeDeclaration } |
+ 'VAR' { VariableDeclaration ';' } |
+ DefProcedureHeading ';'
first symbols:proceduretok, vartok, typetok, consttok
-
+
cannot reachend
*/
static void Definition (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- AsmStatement := 'ASM' [ 'VOLATILE' ] '(' AsmOperands
- ')'
+ AsmStatement := 'ASM' [ 'VOLATILE' ] '(' AsmOperands
+ ')'
first symbols:asmtok
-
+
cannot reachend
*/
static void AsmStatement (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- AsmOperands := string [ AsmOperandSpec ]
+ AsmOperands := string [ AsmOperandSpec ]
first symbols:stringtok
-
+
cannot reachend
*/
static void AsmOperands (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- AsmOperandSpec := [ ':' AsmList [ ':' AsmList [
- ':' TrashList ] ] ]
+ AsmOperandSpec := [ ':' AsmList [ ':' AsmList [
+ ':' TrashList ] ] ]
first symbols:colontok
-
+
reachend
*/
static void AsmOperandSpec (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- AsmList := [ AsmElement ] { ',' AsmElement }
+ AsmList := [ AsmElement ] { ',' AsmElement }
first symbols:lsbratok, stringtok, commatok
-
+
reachend
*/
static void AsmList (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- NamedOperand := '[' Ident ']'
+ NamedOperand := '[' Ident ']'
first symbols:lsbratok
-
+
cannot reachend
*/
static void NamedOperand (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- AsmOperandName := [ NamedOperand ]
+ AsmOperandName := [ NamedOperand ]
first symbols:lsbratok
-
+
reachend
*/
static void AsmOperandName (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- AsmElement := AsmOperandName string '(' Expression
- ')'
+ AsmElement := AsmOperandName string '(' Expression
+ ')'
first symbols:stringtok, lsbratok
-
+
cannot reachend
*/
static void AsmElement (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2);
/*
- TrashList := [ string ] { ',' string }
+ TrashList := [ string ] { ',' string }
first symbols:commatok, stringtok
-
+
reachend
*/
{
mcPrintf_printf0 ((const char *) "\\nskipping token *** ", 21);
}
- /*
+ /*
yes the ORD(currenttoken) looks ugly, but it is *much* safer than
using currenttoken<sometok as a change to the ordering of the
token declarations below would cause this to break. Using ORD() we are
static void Ident (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2)
{
curident = nameKey_makekey (mcLexBuf_currentstring);
- /*
+ /*
PushTF(makekey(currentstring), identtok)
*/
Expect (mcReserved_identtok, stopset0, stopset1, stopset2);
static void string (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2)
{
- /*
+ /*
PushTF(makekey(currentstring), stringtok) ;
BuildString
*/
static void Integer (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2)
{
- /*
+ /*
PushTF(makekey(currentstring), integertok) ;
BuildNumber
*/
static void Real (mcp1_SetOfStop0 stopset0, mcp1_SetOfStop1 stopset1, mcp1_SetOfStop2 stopset2)
{
- /*
+ /*
PushTF(makekey(currentstring), realtok) ;
BuildNumber
*/
/*
- FileUnit := DefinitionModule |
- ImplementationOrProgramModule
+ FileUnit := DefinitionModule |
+ ImplementationOrProgramModule
first symbols:implementationtok, moduletok, definitiontok
-
+
cannot reachend
*/
/*
- ProgramModule := 'MODULE' Ident
+ ProgramModule := 'MODULE' Ident
% curmodule := lookupModule (curident) %
-
+
% enterScope (curmodule) %
- [ Priority ] ';' { Import } Block
- Ident
+ [ Priority ] ';' { Import } Block
+ Ident
% checkEndName (curmodule, curident, 'program module') %
-
+
% leaveScope %
- '.'
+ '.'
first symbols:moduletok
-
+
cannot reachend
*/
/*
- ImplementationModule := 'IMPLEMENTATION' 'MODULE'
- Ident
+ ImplementationModule := 'IMPLEMENTATION' 'MODULE'
+ Ident
% curmodule := lookupImp (curident) %
-
+
% enterScope (lookupDef (curident)) %
-
+
% enterScope (curmodule) %
- [ Priority ] ';' { Import }
- Block Ident
+ [ Priority ] ';' { Import }
+ Block Ident
% checkEndName (curmodule, curident, 'implementation module') %
-
+
% leaveScope ; leaveScope %
- '.'
+ '.'
first symbols:implementationtok
-
+
cannot reachend
*/
/*
- ImplementationOrProgramModule := ImplementationModule |
- ProgramModule
+ ImplementationOrProgramModule := ImplementationModule |
+ ProgramModule
first symbols:moduletok, implementationtok
-
+
cannot reachend
*/
/*
- Number := Integer | Real
+ Number := Integer | Real
first symbols:realtok, integertok
-
+
cannot reachend
*/
/*
- Qualident := Ident { '.' Ident }
+ Qualident := Ident { '.' Ident }
first symbols:identtok
-
+
cannot reachend
*/
/*
- ConstExpression := SimpleConstExpr [ Relation SimpleConstExpr ]
+ ConstExpression := SimpleConstExpr [ Relation SimpleConstExpr ]
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- Relation := '=' | '#' | '<>' | '<' | '<=' |
- '>' | '>=' | 'IN'
+ Relation := '=' | '#' | '<>' | '<' | '<=' |
+ '>' | '>=' | 'IN'
first symbols:intok, greaterequaltok, greatertok, lessequaltok, lesstok, lessgreatertok, hashtok, equaltok
-
+
cannot reachend
*/
/*
- SimpleConstExpr := UnaryOrConstTerm { AddOperator
- ConstTerm }
+ SimpleConstExpr := UnaryOrConstTerm { AddOperator
+ ConstTerm }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- UnaryOrConstTerm := '+' ConstTerm |
- '-' ConstTerm |
- ConstTerm
+ UnaryOrConstTerm := '+' ConstTerm |
+ '-' ConstTerm |
+ ConstTerm
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- AddOperator := '+' | '-' | 'OR'
+ AddOperator := '+' | '-' | 'OR'
first symbols:ortok, minustok, plustok
-
+
cannot reachend
*/
/*
- ConstTerm := ConstFactor { MulOperator ConstFactor }
+ ConstTerm := ConstFactor { MulOperator ConstFactor }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok
-
+
cannot reachend
*/
/*
- MulOperator := '*' | '/' | 'DIV' | 'MOD' |
- 'REM' | 'AND' | '&'
+ MulOperator := '*' | '/' | 'DIV' | 'MOD' |
+ 'REM' | 'AND' | '&'
first symbols:ambersandtok, andtok, remtok, modtok, divtok, dividetok, timestok
-
+
cannot reachend
*/
/*
- ConstFactor := Number | ConstString |
- ConstSetOrQualidentOrFunction |
- '(' ConstExpression ')' |
- 'NOT' ConstFactor |
- ConstAttribute
+ ConstFactor := Number | ConstString |
+ ConstSetOrQualidentOrFunction |
+ '(' ConstExpression ')' |
+ 'NOT' ConstFactor |
+ ConstAttribute
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok
-
+
cannot reachend
*/
/*
- ConstString := string
+ ConstString := string
first symbols:stringtok
-
+
cannot reachend
*/
/*
- ComponentElement := ConstExpression [ '..' ConstExpression ]
+ ComponentElement := ConstExpression [ '..' ConstExpression ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- ComponentValue := ComponentElement [ 'BY' ConstExpression ]
+ ComponentValue := ComponentElement [ 'BY' ConstExpression ]
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- ArraySetRecordValue := ComponentValue { ',' ComponentValue }
+ ArraySetRecordValue := ComponentValue { ',' ComponentValue }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- Constructor := '{' [ ArraySetRecordValue ] '}'
+ Constructor := '{' [ ArraySetRecordValue ] '}'
first symbols:lcbratok
-
+
cannot reachend
*/
/*
- ConstSetOrQualidentOrFunction := Qualident [ Constructor |
- ConstActualParameters ] |
- Constructor
+ ConstSetOrQualidentOrFunction := Qualident [ Constructor |
+ ConstActualParameters ] |
+ Constructor
first symbols:lcbratok, identtok
-
+
cannot reachend
*/
/*
- ConstActualParameters := ActualParameters
+ ConstActualParameters := ActualParameters
first symbols:lparatok
-
+
cannot reachend
*/
/*
- ConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' ConstAttributeExpression
- ')' ')'
+ ConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' ConstAttributeExpression
+ ')' ')'
first symbols:attributetok
-
+
cannot reachend
*/
/*
- ConstAttributeExpression := Ident | '<' Qualident
- ',' Ident '>'
+ ConstAttributeExpression := Ident | '<' Qualident
+ ',' Ident '>'
first symbols:lesstok, identtok
-
+
cannot reachend
*/
/*
- ByteAlignment := ''
+ ByteAlignment := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
/*
- OptAlignmentExpression := [ AlignmentExpression ]
+ OptAlignmentExpression := [ AlignmentExpression ]
first symbols:lparatok
-
+
reachend
*/
/*
- AlignmentExpression := '(' ConstExpression ')'
+ AlignmentExpression := '(' ConstExpression ')'
first symbols:lparatok
-
+
cannot reachend
*/
/*
- Alignment := [ ByteAlignment ]
+ Alignment := [ ByteAlignment ]
first symbols:ldirectivetok
-
+
reachend
*/
/*
- TypeDeclaration := Ident
+ TypeDeclaration := Ident
% VAR n: node ; %
-
+
% n := makeTypeImp (curident) %
- '=' Type Alignment
+ '=' Type Alignment
first symbols:identtok
-
+
cannot reachend
*/
/*
- Type := ( SimpleType | ArrayType | RecordType |
- SetType | PointerType |
- ProcedureType )
+ Type := ( SimpleType | ArrayType | RecordType |
+ SetType | PointerType |
+ ProcedureType )
first symbols:lparatok, lsbratok, proceduretok, pointertok, settok, packedsettok, oftok, recordtok, arraytok, identtok
-
+
cannot reachend
*/
/*
- SimpleType := Qualident [ SubrangeType ] |
- Enumeration | SubrangeType
+ SimpleType := Qualident [ SubrangeType ] |
+ Enumeration | SubrangeType
first symbols:lsbratok, lparatok, identtok
-
+
cannot reachend
*/
/*
- Enumeration := '(' ( IdentList ) ')'
+ Enumeration := '(' ( IdentList ) ')'
first symbols:lparatok
-
+
cannot reachend
*/
/*
- IdentList := Ident { ',' Ident }
+ IdentList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
/*
- SubrangeType := '[' ConstExpression '..' ConstExpression
- ']'
+ SubrangeType := '[' ConstExpression '..' ConstExpression
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- ArrayType := 'ARRAY' SimpleType { ',' SimpleType }
- 'OF' Type
+ ArrayType := 'ARRAY' SimpleType { ',' SimpleType }
+ 'OF' Type
first symbols:arraytok
-
+
cannot reachend
*/
/*
- RecordType := 'RECORD' [ DefaultRecordAttributes ]
- FieldListSequence 'END'
+ RecordType := 'RECORD' [ DefaultRecordAttributes ]
+ FieldListSequence 'END'
first symbols:recordtok
-
+
cannot reachend
*/
/*
- DefaultRecordAttributes := ''
+ DefaultRecordAttributes := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
/*
- RecordFieldPragma := [ '' ]
+ RecordFieldPragma := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
/*
- FieldPragmaExpression := Ident PragmaConstExpression
+ FieldPragmaExpression := Ident PragmaConstExpression
first symbols:identtok
-
+
cannot reachend
*/
/*
- PragmaConstExpression := [ '(' ConstExpression ')' ]
+ PragmaConstExpression := [ '(' ConstExpression ')' ]
first symbols:lparatok
-
+
reachend
*/
/*
- AttributeExpression := Ident '(' ConstExpression
- ')'
+ AttributeExpression := Ident '(' ConstExpression
+ ')'
first symbols:identtok
-
+
cannot reachend
*/
/*
- FieldListSequence := FieldListStatement { ';' FieldListStatement }
+ FieldListSequence := FieldListStatement { ';' FieldListStatement }
first symbols:casetok, identtok, semicolontok
-
+
reachend
*/
/*
- FieldListStatement := [ FieldList ]
+ FieldListStatement := [ FieldList ]
first symbols:identtok, casetok
-
+
reachend
*/
/*
- FieldList := IdentList ':' Type RecordFieldPragma |
- 'CASE' CaseTag 'OF' Varient { '|' Varient }
- [ 'ELSE' FieldListSequence ] 'END'
+ FieldList := IdentList ':' Type RecordFieldPragma |
+ 'CASE' CaseTag 'OF' Varient { '|' Varient }
+ [ 'ELSE' FieldListSequence ] 'END'
first symbols:casetok, identtok
-
+
cannot reachend
*/
/*
- TagIdent := [ Ident ]
+ TagIdent := [ Ident ]
first symbols:identtok
-
+
reachend
*/
/*
- CaseTag := TagIdent [ ':' Qualident ]
+ CaseTag := TagIdent [ ':' Qualident ]
first symbols:colontok, identtok
-
+
reachend
*/
/*
- Varient := [ VarientCaseLabelList ':' FieldListSequence ]
+ Varient := [ VarientCaseLabelList ':' FieldListSequence ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
reachend
*/
/*
- VarientCaseLabelList := VarientCaseLabels { ','
- VarientCaseLabels }
+ VarientCaseLabelList := VarientCaseLabels { ','
+ VarientCaseLabels }
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- VarientCaseLabels := ConstExpression [ '..' ConstExpression ]
+ VarientCaseLabels := ConstExpression [ '..' ConstExpression ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- SilentConstExpression := SilentSimpleConstExpr [
- SilentRelation SilentSimpleConstExpr ]
+ SilentConstExpression := SilentSimpleConstExpr [
+ SilentRelation SilentSimpleConstExpr ]
first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- SilentRelation := '=' | '#' | '<>' | '<' |
- '<=' | '>' | '>=' | 'IN'
+ SilentRelation := '=' | '#' | '<>' | '<' |
+ '<=' | '>' | '>=' | 'IN'
first symbols:intok, greaterequaltok, greatertok, lessequaltok, lesstok, lessgreatertok, hashtok, equaltok
-
+
cannot reachend
*/
/*
- SilentSimpleConstExpr := SilentUnaryOrConstTerm
- { SilentAddOperator SilentConstTerm }
+ SilentSimpleConstExpr := SilentUnaryOrConstTerm
+ { SilentAddOperator SilentConstTerm }
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- SilentUnaryOrConstTerm := '+' SilentConstTerm |
- '-' SilentConstTerm |
- SilentConstTerm
+ SilentUnaryOrConstTerm := '+' SilentConstTerm |
+ '-' SilentConstTerm |
+ SilentConstTerm
first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- SilentAddOperator := '+' | '-' | 'OR'
+ SilentAddOperator := '+' | '-' | 'OR'
first symbols:ortok, minustok, plustok
-
+
cannot reachend
*/
/*
- SilentConstTerm := SilentConstFactor { SilentMulOperator
- SilentConstFactor }
+ SilentConstTerm := SilentConstFactor { SilentMulOperator
+ SilentConstFactor }
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok
-
+
cannot reachend
*/
/*
- SilentMulOperator := '*' | '/' | 'DIV' |
- 'MOD' | 'REM' | 'AND' |
- '&'
+ SilentMulOperator := '*' | '/' | 'DIV' |
+ 'MOD' | 'REM' | 'AND' |
+ '&'
first symbols:ambersandtok, andtok, remtok, modtok, divtok, dividetok, timestok
-
+
cannot reachend
*/
/*
- SilentConstFactor := Number | SilentConstString |
- SilentConstSetOrQualidentOrFunction |
- '(' SilentConstExpression ')' |
- 'NOT' SilentConstFactor |
- SilentConstAttribute
+ SilentConstFactor := Number | SilentConstString |
+ SilentConstSetOrQualidentOrFunction |
+ '(' SilentConstExpression ')' |
+ 'NOT' SilentConstFactor |
+ SilentConstAttribute
first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok
-
+
cannot reachend
*/
/*
- SilentConstString := string
+ SilentConstString := string
first symbols:stringtok
-
+
cannot reachend
*/
/*
- SilentConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' SilentConstAttributeExpression
- ')' ')'
+ SilentConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' SilentConstAttributeExpression
+ ')' ')'
first symbols:attributetok
-
+
cannot reachend
*/
/*
- SilentConstAttributeExpression := Ident |
- '<' Ident ','
- SilentConstString
- '>'
+ SilentConstAttributeExpression := Ident |
+ '<' Ident ','
+ SilentConstString
+ '>'
first symbols:lesstok, identtok
-
+
cannot reachend
*/
/*
- SilentComponentElement := SilentConstExpression
- [ '..' SilentConstExpression ]
+ SilentComponentElement := SilentConstExpression
+ [ '..' SilentConstExpression ]
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- SilentComponentValue := SilentComponentElement [
- 'BY' SilentConstExpression ]
+ SilentComponentValue := SilentComponentElement [
+ 'BY' SilentConstExpression ]
first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- SilentArraySetRecordValue := SilentComponentValue
- { ',' SilentComponentValue }
+ SilentArraySetRecordValue := SilentComponentValue
+ { ',' SilentComponentValue }
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- SilentConstructor := '{' [ SilentArraySetRecordValue ]
- '}'
+ SilentConstructor := '{' [ SilentArraySetRecordValue ]
+ '}'
first symbols:lcbratok
-
+
cannot reachend
*/
/*
- SilentConstSetOrQualidentOrFunction := SilentConstructor |
- Qualident
- [ SilentConstructor |
- SilentActualParameters ]
+ SilentConstSetOrQualidentOrFunction := SilentConstructor |
+ Qualident
+ [ SilentConstructor |
+ SilentActualParameters ]
first symbols:identtok, lcbratok
-
+
cannot reachend
*/
/*
- SilentElement := SilentConstExpression [ '..' SilentConstExpression ]
+ SilentElement := SilentConstExpression [ '..' SilentConstExpression ]
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- SilentActualParameters := '(' [ SilentExpList ]
- ')'
+ SilentActualParameters := '(' [ SilentExpList ]
+ ')'
first symbols:lparatok
-
+
cannot reachend
*/
/*
- SilentExpList := SilentConstExpression { ',' SilentConstExpression }
+ SilentExpList := SilentConstExpression { ',' SilentConstExpression }
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- SetType := ( 'SET' | 'PACKEDSET' ) 'OF' SimpleType
+ SetType := ( 'SET' | 'PACKEDSET' ) 'OF' SimpleType
first symbols:oftok, packedsettok, settok
-
+
cannot reachend
*/
/*
- PointerType := 'POINTER' 'TO' Type
+ PointerType := 'POINTER' 'TO' Type
first symbols:pointertok
-
+
cannot reachend
*/
/*
- ProcedureType := 'PROCEDURE' [ FormalTypeList ]
+ ProcedureType := 'PROCEDURE' [ FormalTypeList ]
first symbols:proceduretok
-
+
cannot reachend
*/
/*
- FormalTypeList := '(' ( ')' FormalReturn |
- ProcedureParameters ')'
- FormalReturn )
+ FormalTypeList := '(' ( ')' FormalReturn |
+ ProcedureParameters ')'
+ FormalReturn )
first symbols:lparatok
-
+
cannot reachend
*/
/*
- FormalReturn := [ ':' OptReturnType ]
+ FormalReturn := [ ':' OptReturnType ]
first symbols:colontok
-
+
reachend
*/
/*
- OptReturnType := '[' Qualident ']' |
- Qualident
+ OptReturnType := '[' Qualident ']' |
+ Qualident
first symbols:identtok, lsbratok
-
+
cannot reachend
*/
/*
- ProcedureParameters := ProcedureParameter { ','
- ProcedureParameter }
+ ProcedureParameters := ProcedureParameter { ','
+ ProcedureParameter }
first symbols:identtok, arraytok, periodperiodperiodtok, vartok
-
+
cannot reachend
*/
/*
- ProcedureParameter := '...' | 'VAR' FormalType |
- FormalType
+ ProcedureParameter := '...' | 'VAR' FormalType |
+ FormalType
first symbols:arraytok, identtok, vartok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- VarIdent := Ident
+ VarIdent := Ident
% VAR n: node ; %
-
+
% n := makeVar (curident) %
- [ '[' ConstExpression ']' ]
+ [ '[' ConstExpression ']' ]
first symbols:identtok
-
+
cannot reachend
*/
/*
- VarIdentList := VarIdent { ',' VarIdent }
+ VarIdentList := VarIdent { ',' VarIdent }
first symbols:identtok
-
+
cannot reachend
*/
/*
- VariableDeclaration := VarIdentList ':' Type Alignment
+ VariableDeclaration := VarIdentList ':' Type Alignment
first symbols:identtok
-
+
cannot reachend
*/
/*
- Designator := Qualident { SubDesignator }
+ Designator := Qualident { SubDesignator }
first symbols:identtok
-
+
cannot reachend
*/
/*
- SubDesignator := '.' Ident | '[' ArrayExpList ']' |
- '^'
+ SubDesignator := '.' Ident | '[' ArrayExpList ']' |
+ '^'
first symbols:uparrowtok, lsbratok, periodtok
-
+
cannot reachend
*/
/*
- ArrayExpList := Expression { ',' Expression }
+ ArrayExpList := Expression { ',' Expression }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- ExpList := Expression { ',' Expression }
+ ExpList := Expression { ',' Expression }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- Expression := SimpleExpression [ Relation SimpleExpression ]
+ Expression := SimpleExpression [ Relation SimpleExpression ]
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- SimpleExpression := UnaryOrTerm { AddOperator Term }
+ SimpleExpression := UnaryOrTerm { AddOperator Term }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- UnaryOrTerm := '+' Term | '-' Term |
- Term
+ UnaryOrTerm := '+' Term | '-' Term |
+ Term
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- Term := Factor { MulOperator Factor }
+ Term := Factor { MulOperator Factor }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok
-
+
cannot reachend
*/
/*
- Factor := Number | string | SetOrDesignatorOrFunction |
- '(' Expression ')' |
- 'NOT' ( Factor | ConstAttribute )
+ Factor := Number | string | SetOrDesignatorOrFunction |
+ '(' Expression ')' |
+ 'NOT' ( Factor | ConstAttribute )
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok
-
+
cannot reachend
*/
/*
- SetOrDesignatorOrFunction := Qualident [ Constructor |
- SimpleDes
- [ ActualParameters ] ] |
- Constructor
+ SetOrDesignatorOrFunction := Qualident [ Constructor |
+ SimpleDes
+ [ ActualParameters ] ] |
+ Constructor
first symbols:lcbratok, identtok
-
+
cannot reachend
*/
/*
- SimpleDes := { SubDesignator }
+ SimpleDes := { SubDesignator }
first symbols:periodtok, lsbratok, uparrowtok
-
+
reachend
*/
/*
- ActualParameters := '(' [ ExpList ] ')'
+ ActualParameters := '(' [ ExpList ] ')'
first symbols:lparatok
-
+
cannot reachend
*/
/*
- ExitStatement := 'EXIT'
+ ExitStatement := 'EXIT'
first symbols:exittok
-
+
cannot reachend
*/
/*
- ReturnStatement := 'RETURN' [ Expression ]
+ ReturnStatement := 'RETURN' [ Expression ]
first symbols:returntok
-
+
cannot reachend
*/
/*
- Statement := [ AssignmentOrProcedureCall |
- IfStatement | CaseStatement |
- WhileStatement |
- RepeatStatement |
- LoopStatement | ForStatement |
- WithStatement | AsmStatement |
- ExitStatement | ReturnStatement |
- RetryStatement ]
+ Statement := [ AssignmentOrProcedureCall |
+ IfStatement | CaseStatement |
+ WhileStatement |
+ RepeatStatement |
+ LoopStatement | ForStatement |
+ WithStatement | AsmStatement |
+ ExitStatement | ReturnStatement |
+ RetryStatement ]
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok
-
+
reachend
*/
/*
- RetryStatement := 'RETRY'
+ RetryStatement := 'RETRY'
first symbols:retrytok
-
+
cannot reachend
*/
/*
- AssignmentOrProcedureCall := Designator ( ':=' Expression |
- ActualParameters |
-
+ AssignmentOrProcedureCall := Designator ( ':=' Expression |
+ ActualParameters |
+
% epsilon %
- )
+ )
first symbols:identtok
-
+
cannot reachend
*/
/*
- StatementSequence := Statement { ';' Statement }
+ StatementSequence := Statement { ';' Statement }
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok
-
+
reachend
*/
/*
- IfStatement := 'IF' Expression 'THEN' StatementSequence
- { 'ELSIF' Expression 'THEN' StatementSequence }
- [ 'ELSE' StatementSequence ] 'END'
+ IfStatement := 'IF' Expression 'THEN' StatementSequence
+ { 'ELSIF' Expression 'THEN' StatementSequence }
+ [ 'ELSE' StatementSequence ] 'END'
first symbols:iftok
-
+
cannot reachend
*/
/*
- CaseStatement := 'CASE' Expression 'OF' Case { '|'
- Case }
- CaseEndStatement
+ CaseStatement := 'CASE' Expression 'OF' Case { '|'
+ Case }
+ CaseEndStatement
first symbols:casetok
-
+
cannot reachend
*/
/*
- CaseEndStatement := 'END' | 'ELSE' StatementSequence
- 'END'
+ CaseEndStatement := 'END' | 'ELSE' StatementSequence
+ 'END'
first symbols:elsetok, endtok
-
+
cannot reachend
*/
/*
- Case := [ CaseLabelList ':' StatementSequence ]
+ Case := [ CaseLabelList ':' StatementSequence ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
reachend
*/
/*
- CaseLabelList := CaseLabels { ',' CaseLabels }
+ CaseLabelList := CaseLabels { ',' CaseLabels }
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- CaseLabels := ConstExpression [ '..' ConstExpression ]
+ CaseLabels := ConstExpression [ '..' ConstExpression ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- WhileStatement := 'WHILE' Expression 'DO' StatementSequence
- 'END'
+ WhileStatement := 'WHILE' Expression 'DO' StatementSequence
+ 'END'
first symbols:whiletok
-
+
cannot reachend
*/
/*
- RepeatStatement := 'REPEAT' StatementSequence 'UNTIL'
- Expression
+ RepeatStatement := 'REPEAT' StatementSequence 'UNTIL'
+ Expression
first symbols:repeattok
-
+
cannot reachend
*/
/*
- ForStatement := 'FOR' Ident ':=' Expression 'TO'
- Expression [ 'BY' ConstExpression ]
- 'DO' StatementSequence 'END'
+ ForStatement := 'FOR' Ident ':=' Expression 'TO'
+ Expression [ 'BY' ConstExpression ]
+ 'DO' StatementSequence 'END'
first symbols:fortok
-
+
cannot reachend
*/
/*
- LoopStatement := 'LOOP' StatementSequence 'END'
+ LoopStatement := 'LOOP' StatementSequence 'END'
first symbols:looptok
-
+
cannot reachend
*/
/*
- WithStatement := 'WITH' Designator 'DO' StatementSequence
- 'END'
+ WithStatement := 'WITH' Designator 'DO' StatementSequence
+ 'END'
first symbols:withtok
-
+
cannot reachend
*/
/*
- ProcedureDeclaration := ProcedureHeading ';' ProcedureBlock
- Ident
+ ProcedureDeclaration := ProcedureHeading ';' ProcedureBlock
+ Ident
first symbols:proceduretok
-
+
cannot reachend
*/
/*
- DefProcedureIdent := Ident
+ DefProcedureIdent := Ident
% curproc := makeProcedure (curident) ;
setProcedureComment (lastcomment, curident) ;
putCommentDefProcedure (curproc) ;
%
-
+
first symbols:identtok
-
+
cannot reachend
*/
/*
- ProcedureIdent := Ident
+ ProcedureIdent := Ident
% curproc := lookupSym (curident) ;
IF curproc=NIL
THEN
setProcedureComment (lastcomment, curident) ;
putCommentModProcedure (curproc) ;
%
-
+
first symbols:identtok
-
+
cannot reachend
*/
/*
- DefineBuiltinProcedure := [ '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' Ident ')' ')' |
- '__INLINE__' ]
+ DefineBuiltinProcedure := [ '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' Ident ')' ')' |
+ '__INLINE__' ]
first symbols:inlinetok, attributetok
-
+
reachend
*/
/*
- ProcedureHeading := 'PROCEDURE' DefineBuiltinProcedure
- ( ProcedureIdent
+ ProcedureHeading := 'PROCEDURE' DefineBuiltinProcedure
+ ( ProcedureIdent
% enterScope (curproc) %
- [ FormalParameters ] AttributeNoReturn )
+ [ FormalParameters ] AttributeNoReturn )
first symbols:proceduretok
-
+
cannot reachend
*/
/*
- Builtin := [ '__BUILTIN__' | '__INLINE__' ]
+ Builtin := [ '__BUILTIN__' | '__INLINE__' ]
first symbols:inlinetok, builtintok
-
+
reachend
*/
/*
- DefProcedureHeading := 'PROCEDURE' Builtin ( DefProcedureIdent
- [ DefFormalParameters ]
- AttributeNoReturn )
+ DefProcedureHeading := 'PROCEDURE' Builtin ( DefProcedureIdent
+ [ DefFormalParameters ]
+ AttributeNoReturn )
first symbols:proceduretok
-
+
cannot reachend
*/
/*
- ProcedureBlock := { Declaration } [ 'BEGIN' ProcedureBlockBody ]
- 'END'
+ ProcedureBlock := { Declaration } [ 'BEGIN' ProcedureBlockBody ]
+ 'END'
% leaveScope %
-
+
first symbols:proceduretok, moduletok, consttok, typetok, vartok, endtok, begintok
-
+
cannot reachend
*/
/*
- Block := { Declaration } InitialBlock FinalBlock
- 'END'
+ Block := { Declaration } InitialBlock FinalBlock
+ 'END'
first symbols:proceduretok, moduletok, finallytok, begintok, consttok, typetok, vartok, endtok
-
+
cannot reachend
*/
/*
- InitialBlock := [ 'BEGIN' InitialBlockBody ]
+ InitialBlock := [ 'BEGIN' InitialBlockBody ]
first symbols:begintok
-
+
reachend
*/
/*
- FinalBlock := [ 'FINALLY' FinalBlockBody ]
+ FinalBlock := [ 'FINALLY' FinalBlockBody ]
first symbols:finallytok
-
+
reachend
*/
/*
- InitialBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ InitialBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
/*
- FinalBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ FinalBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
/*
- ProcedureBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ ProcedureBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
/*
- NormalPart := StatementSequence
+ NormalPart := StatementSequence
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok, semicolontok
-
+
reachend
*/
/*
- ExceptionalPart := StatementSequence
+ ExceptionalPart := StatementSequence
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok, semicolontok
-
+
reachend
*/
/*
- Declaration := 'CONST' { ConstantDeclaration ';' } |
- 'TYPE' { TypeDeclaration ';' } |
- 'VAR' { VariableDeclaration ';' } |
- ProcedureDeclaration ';' |
- ModuleDeclaration ';'
+ Declaration := 'CONST' { ConstantDeclaration ';' } |
+ 'TYPE' { TypeDeclaration ';' } |
+ 'VAR' { VariableDeclaration ';' } |
+ ProcedureDeclaration ';' |
+ ModuleDeclaration ';'
first symbols:moduletok, proceduretok, vartok, typetok, consttok
-
+
cannot reachend
*/
/*
- DefFormalParameters := '(' [ DefMultiFPSection ]
- ')' FormalReturn
+ DefFormalParameters := '(' [ DefMultiFPSection ]
+ ')' FormalReturn
first symbols:lparatok
-
+
cannot reachend
*/
/*
- DefMultiFPSection := DefExtendedFP |
- FPSection [ ';' DefMultiFPSection ]
+ DefMultiFPSection := DefExtendedFP |
+ FPSection [ ';' DefMultiFPSection ]
first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- FormalParameters := '(' [ MultiFPSection ] ')'
- FormalReturn
+ FormalParameters := '(' [ MultiFPSection ] ')'
+ FormalReturn
first symbols:lparatok
-
+
cannot reachend
*/
/*
- AttributeNoReturn := [ '' ]
+ AttributeNoReturn := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
/*
- AttributeUnused := [ '' ]
+ AttributeUnused := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
/*
- MultiFPSection := ExtendedFP | FPSection [ ';'
- MultiFPSection ]
+ MultiFPSection := ExtendedFP | FPSection [ ';'
+ MultiFPSection ]
first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- FPSection := NonVarFPSection |
- VarFPSection
+ FPSection := NonVarFPSection |
+ VarFPSection
first symbols:vartok, identtok
-
+
cannot reachend
*/
/*
- DefExtendedFP := DefOptArg | '...'
+ DefExtendedFP := DefOptArg | '...'
first symbols:lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- ExtendedFP := OptArg | '...'
+ ExtendedFP := OptArg | '...'
first symbols:lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- VarFPSection := 'VAR' IdentList ':' FormalType [
- AttributeUnused ]
+ VarFPSection := 'VAR' IdentList ':' FormalType [
+ AttributeUnused ]
first symbols:vartok
-
+
cannot reachend
*/
/*
- NonVarFPSection := IdentList ':' FormalType [ AttributeUnused ]
+ NonVarFPSection := IdentList ':' FormalType [ AttributeUnused ]
first symbols:identtok
-
+
cannot reachend
*/
/*
- OptArg := '[' Ident ':' FormalType [ '=' ConstExpression ]
- ']'
+ OptArg := '[' Ident ':' FormalType [ '=' ConstExpression ]
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- DefOptArg := '[' Ident ':' FormalType '=' ConstExpression
- ']'
+ DefOptArg := '[' Ident ':' FormalType '=' ConstExpression
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- FormalType := { 'ARRAY' 'OF' } Qualident
+ FormalType := { 'ARRAY' 'OF' } Qualident
first symbols:identtok, arraytok
-
+
cannot reachend
*/
/*
- ModuleDeclaration := 'MODULE' Ident [ Priority ]
- ';' { Import } [ Export ]
- Block Ident
+ ModuleDeclaration := 'MODULE' Ident [ Priority ]
+ ';' { Import } [ Export ]
+ Block Ident
first symbols:moduletok
-
+
cannot reachend
*/
/*
- Priority := '[' ConstExpression ']'
+ Priority := '[' ConstExpression ']'
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- Export := 'EXPORT' ( 'QUALIFIED' IdentList |
- 'UNQUALIFIED'
+ Export := 'EXPORT' ( 'QUALIFIED' IdentList |
+ 'UNQUALIFIED'
% putDefUnqualified (curmodule) %
- IdentList |
- IdentList ) ';'
+ IdentList |
+ IdentList ) ';'
first symbols:exporttok
-
+
cannot reachend
*/
/*
- FromImport := 'FROM' Ident
+ FromImport := 'FROM' Ident
% registerImport (curident, FALSE) %
- 'IMPORT' IdentList ';'
+ 'IMPORT' IdentList ';'
first symbols:fromtok
-
+
cannot reachend
*/
/*
- ImportModuleList := Ident
+ ImportModuleList := Ident
% registerImport (curident, TRUE) %
- { ',' Ident
+ { ',' Ident
% registerImport (curident, TRUE) %
- }
+ }
first symbols:identtok
-
+
cannot reachend
*/
/*
- WithoutFromImport := 'IMPORT' ImportModuleList ';'
+ WithoutFromImport := 'IMPORT' ImportModuleList ';'
first symbols:importtok
-
+
cannot reachend
*/
/*
- Import := FromImport | WithoutFromImport
+ Import := FromImport | WithoutFromImport
first symbols:importtok, fromtok
-
+
cannot reachend
*/
/*
- DefinitionModule :=
+ DefinitionModule :=
% VAR c: BOOLEAN ; %
-
+
% c := FALSE %
- 'DEFINITION' 'MODULE' [ 'FOR'
- string
-
+ 'DEFINITION' 'MODULE' [ 'FOR'
+ string
+
% c := TRUE %
- ] Ident
- ';'
+ ] Ident
+ ';'
% curmodule := lookupDef (curident) %
-
+
% IF c THEN putDefForC (curmodule) END %
-
+
% enterScope (curmodule) %
- { Import } [ Export ] { Definition }
- 'END' Ident '.'
+ { Import } [ Export ] { Definition }
+ 'END' Ident '.'
% checkEndName (curmodule, curident, 'definition module') %
-
+
% leaveScope %
-
+
first symbols:definitiontok
-
+
cannot reachend
*/
/*
- DefTypeDeclaration := { Ident
+ DefTypeDeclaration := { Ident
% VAR n: node ; %
-
+
% n := makeType (curident) %
- ( ';'
+ ( ';'
% putTypeHidden (n) ;
putTypeOpaque (n) %
- | '=' Type Alignment
- ';' ) }
+ | '=' Type Alignment
+ ';' ) }
first symbols:identtok
-
+
reachend
*/
/*
- ConstantDeclaration := Ident
+ ConstantDeclaration := Ident
% VAR n: node ; %
-
+
% n := makeConst (curident) %
- '=' ConstExpression
+ '=' ConstExpression
first symbols:identtok
-
+
cannot reachend
*/
/*
- Definition := 'CONST' { ConstantDeclaration ';' } |
- 'TYPE' { DefTypeDeclaration } |
- 'VAR' { VariableDeclaration ';' } |
- DefProcedureHeading ';'
+ Definition := 'CONST' { ConstantDeclaration ';' } |
+ 'TYPE' { DefTypeDeclaration } |
+ 'VAR' { VariableDeclaration ';' } |
+ DefProcedureHeading ';'
first symbols:proceduretok, vartok, typetok, consttok
-
+
cannot reachend
*/
/*
- AsmStatement := 'ASM' [ 'VOLATILE' ] '(' AsmOperands
- ')'
+ AsmStatement := 'ASM' [ 'VOLATILE' ] '(' AsmOperands
+ ')'
first symbols:asmtok
-
+
cannot reachend
*/
/*
- AsmOperands := string [ AsmOperandSpec ]
+ AsmOperands := string [ AsmOperandSpec ]
first symbols:stringtok
-
+
cannot reachend
*/
/*
- AsmOperandSpec := [ ':' AsmList [ ':' AsmList [
- ':' TrashList ] ] ]
+ AsmOperandSpec := [ ':' AsmList [ ':' AsmList [
+ ':' TrashList ] ] ]
first symbols:colontok
-
+
reachend
*/
/*
- AsmList := [ AsmElement ] { ',' AsmElement }
+ AsmList := [ AsmElement ] { ',' AsmElement }
first symbols:lsbratok, stringtok, commatok
-
+
reachend
*/
/*
- NamedOperand := '[' Ident ']'
+ NamedOperand := '[' Ident ']'
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- AsmOperandName := [ NamedOperand ]
+ AsmOperandName := [ NamedOperand ]
first symbols:lsbratok
-
+
reachend
*/
/*
- AsmElement := AsmOperandName string '(' Expression
- ')'
+ AsmElement := AsmOperandName string '(' Expression
+ ')'
first symbols:stringtok, lsbratok
-
+
cannot reachend
*/
/*
- TrashList := [ string ] { ',' string }
+ TrashList := [ string ] { ',' string }
first symbols:commatok, stringtok
-
+
reachend
*/
static void registerImport (nameKey_Name ident, bool scoped);
/*
- FileUnit := DefinitionModule |
- ImplementationOrProgramModule
+ FileUnit := DefinitionModule |
+ ImplementationOrProgramModule
first symbols:implementationtok, moduletok, definitiontok
-
+
cannot reachend
*/
static void FileUnit (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ProgramModule := 'MODULE' Ident
+ ProgramModule := 'MODULE' Ident
% curmodule := lookupModule (curident) %
-
+
% enterScope (curmodule) %
- [ Priority ] ';' { Import } Block
- Ident
+ [ Priority ] ';' { Import } Block
+ Ident
% checkEndName (curmodule, curident, 'program module') %
-
+
% leaveScope %
-
+
% setEnumsComplete (curmodule) %
- '.'
+ '.'
first symbols:moduletok
-
+
cannot reachend
*/
static void ProgramModule (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ImplementationModule := 'IMPLEMENTATION' 'MODULE'
- Ident
+ ImplementationModule := 'IMPLEMENTATION' 'MODULE'
+ Ident
% curmodule := lookupImp (curident) %
-
+
% enterScope (lookupDef (curident)) %
-
+
% enterScope (curmodule) %
- [ Priority ] ';' { Import }
- Block Ident
+ [ Priority ] ';' { Import }
+ Block Ident
% checkEndName (curmodule, curident, 'implementation module') %
-
+
% leaveScope ; leaveScope %
-
+
% setEnumsComplete (curmodule) %
- '.'
+ '.'
first symbols:implementationtok
-
+
cannot reachend
*/
static void ImplementationModule (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ImplementationOrProgramModule := ImplementationModule |
- ProgramModule
+ ImplementationOrProgramModule := ImplementationModule |
+ ProgramModule
first symbols:moduletok, implementationtok
-
+
cannot reachend
*/
static void ImplementationOrProgramModule (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- Number := Integer | Real
+ Number := Integer | Real
first symbols:realtok, integertok
-
+
cannot reachend
*/
static void Number (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- Qualident := Ident { '.' Ident }
+ Qualident := Ident { '.' Ident }
first symbols:identtok
-
+
cannot reachend
*/
static void Qualident (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ConstantDeclaration := Ident '=' ConstExpression
+ ConstantDeclaration := Ident '=' ConstExpression
first symbols:identtok
-
+
cannot reachend
*/
static void ConstantDeclaration (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ConstExpression := SimpleConstExpr [ Relation SimpleConstExpr ]
+ ConstExpression := SimpleConstExpr [ Relation SimpleConstExpr ]
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void ConstExpression (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- Relation := '=' | '#' | '<>' | '<' | '<=' |
- '>' | '>=' | 'IN'
+ Relation := '=' | '#' | '<>' | '<' | '<=' |
+ '>' | '>=' | 'IN'
first symbols:intok, greaterequaltok, greatertok, lessequaltok, lesstok, lessgreatertok, hashtok, equaltok
-
+
cannot reachend
*/
static void Relation (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SimpleConstExpr := UnaryOrConstTerm { AddOperator
- ConstTerm }
+ SimpleConstExpr := UnaryOrConstTerm { AddOperator
+ ConstTerm }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void SimpleConstExpr (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- UnaryOrConstTerm := '+' ConstTerm |
- '-' ConstTerm |
- ConstTerm
+ UnaryOrConstTerm := '+' ConstTerm |
+ '-' ConstTerm |
+ ConstTerm
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void UnaryOrConstTerm (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- AddOperator := '+' | '-' | 'OR'
+ AddOperator := '+' | '-' | 'OR'
first symbols:ortok, minustok, plustok
-
+
cannot reachend
*/
static void AddOperator (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ConstTerm := ConstFactor { MulOperator ConstFactor }
+ ConstTerm := ConstFactor { MulOperator ConstFactor }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok
-
+
cannot reachend
*/
static void ConstTerm (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- MulOperator := '*' | '/' | 'DIV' | 'MOD' |
- 'REM' | 'AND' | '&'
+ MulOperator := '*' | '/' | 'DIV' | 'MOD' |
+ 'REM' | 'AND' | '&'
first symbols:ambersandtok, andtok, remtok, modtok, divtok, dividetok, timestok
-
+
cannot reachend
*/
static void MulOperator (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ConstFactor := Number | ConstString |
- ConstSetOrQualidentOrFunction |
- '(' ConstExpression ')' |
- 'NOT' ConstFactor |
- ConstAttribute
+ ConstFactor := Number | ConstString |
+ ConstSetOrQualidentOrFunction |
+ '(' ConstExpression ')' |
+ 'NOT' ConstFactor |
+ ConstAttribute
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok
-
+
cannot reachend
*/
static void ConstFactor (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ConstString := string
+ ConstString := string
first symbols:stringtok
-
+
cannot reachend
*/
static void ConstString (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ComponentElement := ConstExpression [ '..' ConstExpression ]
+ ComponentElement := ConstExpression [ '..' ConstExpression ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ComponentElement (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ComponentValue := ComponentElement [ 'BY' ConstExpression ]
+ ComponentValue := ComponentElement [ 'BY' ConstExpression ]
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void ComponentValue (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ArraySetRecordValue := ComponentValue { ',' ComponentValue }
+ ArraySetRecordValue := ComponentValue { ',' ComponentValue }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ArraySetRecordValue (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- Constructor := '{' [ ArraySetRecordValue ] '}'
+ Constructor := '{' [ ArraySetRecordValue ] '}'
first symbols:lcbratok
-
+
cannot reachend
*/
static void Constructor (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ConstSetOrQualidentOrFunction := Qualident [ Constructor |
- ConstActualParameters ] |
- Constructor
+ ConstSetOrQualidentOrFunction := Qualident [ Constructor |
+ ConstActualParameters ] |
+ Constructor
first symbols:lcbratok, identtok
-
+
cannot reachend
*/
static void ConstSetOrQualidentOrFunction (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ConstActualParameters := ActualParameters
+ ConstActualParameters := ActualParameters
first symbols:lparatok
-
+
cannot reachend
*/
static void ConstActualParameters (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' ConstAttributeExpression
- ')' ')'
+ ConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' ConstAttributeExpression
+ ')' ')'
first symbols:attributetok
-
+
cannot reachend
*/
static void ConstAttribute (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ConstAttributeExpression := Ident | '<' Qualident
- ',' Ident '>'
+ ConstAttributeExpression := Ident | '<' Qualident
+ ',' Ident '>'
first symbols:lesstok, identtok
-
+
cannot reachend
*/
static void ConstAttributeExpression (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ByteAlignment := ''
+ ByteAlignment := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
static void ByteAlignment (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- OptAlignmentExpression := [ AlignmentExpression ]
+ OptAlignmentExpression := [ AlignmentExpression ]
first symbols:lparatok
-
+
reachend
*/
static void OptAlignmentExpression (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- AlignmentExpression := '(' ConstExpression ')'
+ AlignmentExpression := '(' ConstExpression ')'
first symbols:lparatok
-
+
cannot reachend
*/
static void AlignmentExpression (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- Alignment := [ ByteAlignment ]
+ Alignment := [ ByteAlignment ]
first symbols:ldirectivetok
-
+
reachend
*/
static void Alignment (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- TypeDeclaration := Ident
+ TypeDeclaration := Ident
% typeDes := lookupSym (curident) %
- '=' Type Alignment
+ '=' Type Alignment
first symbols:identtok
-
+
cannot reachend
*/
static void TypeDeclaration (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- Type := ( DefSimpleType | ArrayType |
- RecordType | SetType | PointerType |
- ProcedureType )
+ Type := ( DefSimpleType | ArrayType |
+ RecordType | SetType | PointerType |
+ ProcedureType )
first symbols:proceduretok, pointertok, settok, packedsettok, oftok, recordtok, arraytok, identtok, lparatok, lsbratok
-
+
cannot reachend
*/
static void Type (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SimpleType := Qualident [ SubrangeType ] |
- Enumeration | SubrangeType
+ SimpleType := Qualident [ SubrangeType ] |
+ Enumeration | SubrangeType
first symbols:lsbratok, lparatok, identtok
-
+
cannot reachend
*/
static void SimpleType (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- EnumIdentList :=
+ EnumIdentList :=
% VAR n, f: node ; %
-
+
% n := makeEnum () %
- Ident
+ Ident
% f := makeEnumField (n, curident) %
- { ',' Ident
+ { ',' Ident
% f := makeEnumField (n, curident) %
- }
+ }
first symbols:identtok
-
+
cannot reachend
*/
static void EnumIdentList (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- Enumeration := '(' ( EnumIdentList ) ')'
+ Enumeration := '(' ( EnumIdentList ) ')'
first symbols:lparatok
-
+
cannot reachend
*/
static void Enumeration (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- IdentList := Ident { ',' Ident }
+ IdentList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
static void IdentList (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SubrangeType := '[' ConstExpression '..' ConstExpression
- ']'
+ SubrangeType := '[' ConstExpression '..' ConstExpression
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
static void SubrangeType (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ArrayType := 'ARRAY' SimpleType { ',' SimpleType }
- 'OF' Type
+ ArrayType := 'ARRAY' SimpleType { ',' SimpleType }
+ 'OF' Type
first symbols:arraytok
-
+
cannot reachend
*/
static void ArrayType (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- RecordType := 'RECORD' [ DefaultRecordAttributes ]
- FieldListSequence 'END'
+ RecordType := 'RECORD' [ DefaultRecordAttributes ]
+ FieldListSequence 'END'
first symbols:recordtok
-
+
cannot reachend
*/
static void RecordType (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- DefaultRecordAttributes := ''
+ DefaultRecordAttributes := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
static void DefaultRecordAttributes (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- RecordFieldPragma := [ '' ]
+ RecordFieldPragma := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
static void RecordFieldPragma (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- FieldPragmaExpression := Ident PragmaConstExpression
+ FieldPragmaExpression := Ident PragmaConstExpression
first symbols:identtok
-
+
cannot reachend
*/
static void FieldPragmaExpression (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- PragmaConstExpression := [ '(' ConstExpression ')' ]
+ PragmaConstExpression := [ '(' ConstExpression ')' ]
first symbols:lparatok
-
+
reachend
*/
static void PragmaConstExpression (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- AttributeExpression := Ident '(' ConstExpression
- ')'
+ AttributeExpression := Ident '(' ConstExpression
+ ')'
first symbols:identtok
-
+
cannot reachend
*/
static void AttributeExpression (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- FieldListSequence := FieldListStatement { ';' FieldListStatement }
+ FieldListSequence := FieldListStatement { ';' FieldListStatement }
first symbols:casetok, identtok, semicolontok
-
+
reachend
*/
static void FieldListSequence (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- FieldListStatement := [ FieldList ]
+ FieldListStatement := [ FieldList ]
first symbols:identtok, casetok
-
+
reachend
*/
static void FieldListStatement (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- FieldList := IdentList ':' Type RecordFieldPragma |
- 'CASE' CaseTag 'OF' Varient { '|' Varient }
- [ 'ELSE' FieldListSequence ] 'END'
+ FieldList := IdentList ':' Type RecordFieldPragma |
+ 'CASE' CaseTag 'OF' Varient { '|' Varient }
+ [ 'ELSE' FieldListSequence ] 'END'
first symbols:casetok, identtok
-
+
cannot reachend
*/
static void FieldList (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- TagIdent := [ Ident ]
+ TagIdent := [ Ident ]
first symbols:identtok
-
+
reachend
*/
static void TagIdent (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- CaseTag := TagIdent [ ':' Qualident ]
+ CaseTag := TagIdent [ ':' Qualident ]
first symbols:colontok, identtok
-
+
reachend
*/
static void CaseTag (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- Varient := [ VarientCaseLabelList ':' FieldListSequence ]
+ Varient := [ VarientCaseLabelList ':' FieldListSequence ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
reachend
*/
static void Varient (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- VarientCaseLabelList := VarientCaseLabels { ','
- VarientCaseLabels }
+ VarientCaseLabelList := VarientCaseLabels { ','
+ VarientCaseLabels }
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void VarientCaseLabelList (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- VarientCaseLabels := ConstExpression [ '..' ConstExpression ]
+ VarientCaseLabels := ConstExpression [ '..' ConstExpression ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void VarientCaseLabels (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SilentConstExpression := SilentSimpleConstExpr [
- SilentRelation SilentSimpleConstExpr ]
+ SilentConstExpression := SilentSimpleConstExpr [
+ SilentRelation SilentSimpleConstExpr ]
first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void SilentConstExpression (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SilentRelation := '=' | '#' | '<>' | '<' |
- '<=' | '>' | '>=' | 'IN'
+ SilentRelation := '=' | '#' | '<>' | '<' |
+ '<=' | '>' | '>=' | 'IN'
first symbols:intok, greaterequaltok, greatertok, lessequaltok, lesstok, lessgreatertok, hashtok, equaltok
-
+
cannot reachend
*/
static void SilentRelation (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SilentSimpleConstExpr := SilentUnaryOrConstTerm
- { SilentAddOperator SilentConstTerm }
+ SilentSimpleConstExpr := SilentUnaryOrConstTerm
+ { SilentAddOperator SilentConstTerm }
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void SilentSimpleConstExpr (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SilentUnaryOrConstTerm := '+' SilentConstTerm |
- '-' SilentConstTerm |
- SilentConstTerm
+ SilentUnaryOrConstTerm := '+' SilentConstTerm |
+ '-' SilentConstTerm |
+ SilentConstTerm
first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void SilentUnaryOrConstTerm (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SilentAddOperator := '+' | '-' | 'OR'
+ SilentAddOperator := '+' | '-' | 'OR'
first symbols:ortok, minustok, plustok
-
+
cannot reachend
*/
static void SilentAddOperator (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SilentConstTerm := SilentConstFactor { SilentMulOperator
- SilentConstFactor }
+ SilentConstTerm := SilentConstFactor { SilentMulOperator
+ SilentConstFactor }
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok
-
+
cannot reachend
*/
static void SilentConstTerm (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SilentMulOperator := '*' | '/' | 'DIV' |
- 'MOD' | 'REM' | 'AND' |
- '&'
+ SilentMulOperator := '*' | '/' | 'DIV' |
+ 'MOD' | 'REM' | 'AND' |
+ '&'
first symbols:ambersandtok, andtok, remtok, modtok, divtok, dividetok, timestok
-
+
cannot reachend
*/
static void SilentMulOperator (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SilentConstFactor := Number | SilentConstString |
- SilentConstSetOrQualidentOrFunction |
- '(' SilentConstExpression ')' |
- 'NOT' SilentConstFactor |
- SilentConstAttribute
+ SilentConstFactor := Number | SilentConstString |
+ SilentConstSetOrQualidentOrFunction |
+ '(' SilentConstExpression ')' |
+ 'NOT' SilentConstFactor |
+ SilentConstAttribute
first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok
-
+
cannot reachend
*/
static void SilentConstFactor (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SilentConstString := string
+ SilentConstString := string
first symbols:stringtok
-
+
cannot reachend
*/
static void SilentConstString (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SilentConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' SilentConstAttributeExpression
- ')' ')'
+ SilentConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' SilentConstAttributeExpression
+ ')' ')'
first symbols:attributetok
-
+
cannot reachend
*/
static void SilentConstAttribute (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SilentConstAttributeExpression := Ident |
- '<' Ident ','
- SilentConstString
- '>'
+ SilentConstAttributeExpression := Ident |
+ '<' Ident ','
+ SilentConstString
+ '>'
first symbols:lesstok, identtok
-
+
cannot reachend
*/
static void SilentConstAttributeExpression (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SilentComponentElement := SilentConstExpression
- [ '..' SilentConstExpression ]
+ SilentComponentElement := SilentConstExpression
+ [ '..' SilentConstExpression ]
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void SilentComponentElement (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SilentComponentValue := SilentComponentElement [
- 'BY' SilentConstExpression ]
+ SilentComponentValue := SilentComponentElement [
+ 'BY' SilentConstExpression ]
first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void SilentComponentValue (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SilentArraySetRecordValue := SilentComponentValue
- { ',' SilentComponentValue }
+ SilentArraySetRecordValue := SilentComponentValue
+ { ',' SilentComponentValue }
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void SilentArraySetRecordValue (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SilentConstructor := '{' [ SilentArraySetRecordValue ]
- '}'
+ SilentConstructor := '{' [ SilentArraySetRecordValue ]
+ '}'
first symbols:lcbratok
-
+
cannot reachend
*/
static void SilentConstructor (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SilentConstSetOrQualidentOrFunction := SilentConstructor |
- Qualident
- [ SilentConstructor |
- SilentActualParameters ]
+ SilentConstSetOrQualidentOrFunction := SilentConstructor |
+ Qualident
+ [ SilentConstructor |
+ SilentActualParameters ]
first symbols:identtok, lcbratok
-
+
cannot reachend
*/
static void SilentConstSetOrQualidentOrFunction (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SilentElement := SilentConstExpression [ '..' SilentConstExpression ]
+ SilentElement := SilentConstExpression [ '..' SilentConstExpression ]
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void SilentElement (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SilentActualParameters := '(' [ SilentExpList ]
- ')'
+ SilentActualParameters := '(' [ SilentExpList ]
+ ')'
first symbols:lparatok
-
+
cannot reachend
*/
static void SilentActualParameters (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SilentExpList := SilentConstExpression { ',' SilentConstExpression }
+ SilentExpList := SilentConstExpression { ',' SilentConstExpression }
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void SilentExpList (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SetType := ( 'SET' | 'PACKEDSET' ) 'OF' SimpleType
+ SetType := ( 'SET' | 'PACKEDSET' ) 'OF' SimpleType
first symbols:oftok, packedsettok, settok
-
+
cannot reachend
*/
static void SetType (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- PointerType := 'POINTER' 'TO' Type
+ PointerType := 'POINTER' 'TO' Type
first symbols:pointertok
-
+
cannot reachend
*/
static void PointerType (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ProcedureType := 'PROCEDURE' [ FormalTypeList ]
+ ProcedureType := 'PROCEDURE' [ FormalTypeList ]
first symbols:proceduretok
-
+
cannot reachend
*/
static void ProcedureType (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- FormalTypeList := '(' ( ')' FormalReturn |
- ProcedureParameters ')'
- FormalReturn )
+ FormalTypeList := '(' ( ')' FormalReturn |
+ ProcedureParameters ')'
+ FormalReturn )
first symbols:lparatok
-
+
cannot reachend
*/
static void FormalTypeList (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- FormalReturn := [ ':' OptReturnType ]
+ FormalReturn := [ ':' OptReturnType ]
first symbols:colontok
-
+
reachend
*/
static void FormalReturn (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- OptReturnType := '[' Qualident ']' |
- Qualident
+ OptReturnType := '[' Qualident ']' |
+ Qualident
first symbols:identtok, lsbratok
-
+
cannot reachend
*/
static void OptReturnType (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ProcedureParameters := ProcedureParameter { ','
- ProcedureParameter }
+ ProcedureParameters := ProcedureParameter { ','
+ ProcedureParameter }
first symbols:identtok, arraytok, periodperiodperiodtok, vartok
-
+
cannot reachend
*/
static void ProcedureParameters (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ProcedureParameter := '...' | 'VAR' FormalType |
- FormalType
+ ProcedureParameter := '...' | 'VAR' FormalType |
+ FormalType
first symbols:arraytok, identtok, vartok, periodperiodperiodtok
-
+
cannot reachend
*/
static void ProcedureParameter (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- VarIdent := Ident [ '[' ConstExpression ']' ]
+ VarIdent := Ident [ '[' ConstExpression ']' ]
first symbols:identtok
-
+
cannot reachend
*/
static void VarIdent (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- VarIdentList := VarIdent { ',' VarIdent }
+ VarIdentList := VarIdent { ',' VarIdent }
first symbols:identtok
-
+
cannot reachend
*/
static void VarIdentList (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- VariableDeclaration := VarIdentList ':' Type Alignment
+ VariableDeclaration := VarIdentList ':' Type Alignment
first symbols:identtok
-
+
cannot reachend
*/
static void VariableDeclaration (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- DefVarIdent := Ident [ '[' ConstExpression ']' ]
+ DefVarIdent := Ident [ '[' ConstExpression ']' ]
first symbols:identtok
-
+
cannot reachend
*/
static void DefVarIdent (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- DefVarIdentList := DefVarIdent { ',' DefVarIdent }
+ DefVarIdentList := DefVarIdent { ',' DefVarIdent }
first symbols:identtok
-
+
cannot reachend
*/
static void DefVarIdentList (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- DefVariableDeclaration :=
+ DefVariableDeclaration :=
% typeDes := NIL %
- DefVarIdentList ':' Type
- Alignment
+ DefVarIdentList ':' Type
+ Alignment
first symbols:identtok
-
+
cannot reachend
*/
static void DefVariableDeclaration (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- Designator := Qualident { SubDesignator }
+ Designator := Qualident { SubDesignator }
first symbols:identtok
-
+
cannot reachend
*/
static void Designator (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SubDesignator := '.' Ident | '[' ArrayExpList ']' |
- '^'
+ SubDesignator := '.' Ident | '[' ArrayExpList ']' |
+ '^'
first symbols:uparrowtok, lsbratok, periodtok
-
+
cannot reachend
*/
static void SubDesignator (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ArrayExpList := Expression { ',' Expression }
+ ArrayExpList := Expression { ',' Expression }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ArrayExpList (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ExpList := Expression { ',' Expression }
+ ExpList := Expression { ',' Expression }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ExpList (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- Expression := SimpleExpression [ Relation SimpleExpression ]
+ Expression := SimpleExpression [ Relation SimpleExpression ]
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void Expression (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SimpleExpression := UnaryOrTerm { AddOperator Term }
+ SimpleExpression := UnaryOrTerm { AddOperator Term }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void SimpleExpression (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- UnaryOrTerm := '+' Term | '-' Term |
- Term
+ UnaryOrTerm := '+' Term | '-' Term |
+ Term
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void UnaryOrTerm (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- Term := Factor { MulOperator Factor }
+ Term := Factor { MulOperator Factor }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok
-
+
cannot reachend
*/
static void Term (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- Factor := Number | string | SetOrDesignatorOrFunction |
- '(' Expression ')' |
- 'NOT' ( Factor | ConstAttribute )
+ Factor := Number | string | SetOrDesignatorOrFunction |
+ '(' Expression ')' |
+ 'NOT' ( Factor | ConstAttribute )
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok
-
+
cannot reachend
*/
static void Factor (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SetOrDesignatorOrFunction := Qualident [ Constructor |
- SimpleDes
- [ ActualParameters ] ] |
- Constructor
+ SetOrDesignatorOrFunction := Qualident [ Constructor |
+ SimpleDes
+ [ ActualParameters ] ] |
+ Constructor
first symbols:lcbratok, identtok
-
+
cannot reachend
*/
static void SetOrDesignatorOrFunction (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- SimpleDes := { SubDesignator }
+ SimpleDes := { SubDesignator }
first symbols:periodtok, lsbratok, uparrowtok
-
+
reachend
*/
static void SimpleDes (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ActualParameters := '(' [ ExpList ] ')'
+ ActualParameters := '(' [ ExpList ] ')'
first symbols:lparatok
-
+
cannot reachend
*/
static void ActualParameters (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ExitStatement := 'EXIT'
+ ExitStatement := 'EXIT'
first symbols:exittok
-
+
cannot reachend
*/
static void ExitStatement (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ReturnStatement := 'RETURN' [ Expression ]
+ ReturnStatement := 'RETURN' [ Expression ]
first symbols:returntok
-
+
cannot reachend
*/
static void ReturnStatement (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- Statement := [ AssignmentOrProcedureCall |
- IfStatement | CaseStatement |
- WhileStatement |
- RepeatStatement |
- LoopStatement | ForStatement |
- WithStatement | AsmStatement |
- ExitStatement | ReturnStatement |
- RetryStatement ]
+ Statement := [ AssignmentOrProcedureCall |
+ IfStatement | CaseStatement |
+ WhileStatement |
+ RepeatStatement |
+ LoopStatement | ForStatement |
+ WithStatement | AsmStatement |
+ ExitStatement | ReturnStatement |
+ RetryStatement ]
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok
-
+
reachend
*/
static void Statement (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- RetryStatement := 'RETRY'
+ RetryStatement := 'RETRY'
first symbols:retrytok
-
+
cannot reachend
*/
static void RetryStatement (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- AssignmentOrProcedureCall := Designator ( ':=' Expression |
- ActualParameters |
-
+ AssignmentOrProcedureCall := Designator ( ':=' Expression |
+ ActualParameters |
+
% epsilon %
- )
+ )
first symbols:identtok
-
+
cannot reachend
*/
static void AssignmentOrProcedureCall (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- StatementSequence := Statement { ';' Statement }
+ StatementSequence := Statement { ';' Statement }
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok
-
+
reachend
*/
static void StatementSequence (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- IfStatement := 'IF' Expression 'THEN' StatementSequence
- { 'ELSIF' Expression 'THEN' StatementSequence }
- [ 'ELSE' StatementSequence ] 'END'
+ IfStatement := 'IF' Expression 'THEN' StatementSequence
+ { 'ELSIF' Expression 'THEN' StatementSequence }
+ [ 'ELSE' StatementSequence ] 'END'
first symbols:iftok
-
+
cannot reachend
*/
static void IfStatement (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- CaseStatement := 'CASE' Expression 'OF' Case { '|'
- Case }
- CaseEndStatement
+ CaseStatement := 'CASE' Expression 'OF' Case { '|'
+ Case }
+ CaseEndStatement
first symbols:casetok
-
+
cannot reachend
*/
static void CaseStatement (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- CaseEndStatement := 'END' | 'ELSE' StatementSequence
- 'END'
+ CaseEndStatement := 'END' | 'ELSE' StatementSequence
+ 'END'
first symbols:elsetok, endtok
-
+
cannot reachend
*/
static void CaseEndStatement (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- Case := [ CaseLabelList ':' StatementSequence ]
+ Case := [ CaseLabelList ':' StatementSequence ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
reachend
*/
static void Case (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- CaseLabelList := CaseLabels { ',' CaseLabels }
+ CaseLabelList := CaseLabels { ',' CaseLabels }
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void CaseLabelList (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- CaseLabels := ConstExpression [ '..' ConstExpression ]
+ CaseLabels := ConstExpression [ '..' ConstExpression ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void CaseLabels (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- WhileStatement := 'WHILE' Expression 'DO' StatementSequence
- 'END'
+ WhileStatement := 'WHILE' Expression 'DO' StatementSequence
+ 'END'
first symbols:whiletok
-
+
cannot reachend
*/
static void WhileStatement (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- RepeatStatement := 'REPEAT' StatementSequence 'UNTIL'
- Expression
+ RepeatStatement := 'REPEAT' StatementSequence 'UNTIL'
+ Expression
first symbols:repeattok
-
+
cannot reachend
*/
static void RepeatStatement (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ForStatement := 'FOR' Ident ':=' Expression 'TO'
- Expression [ 'BY' ConstExpression ]
- 'DO' StatementSequence 'END'
+ ForStatement := 'FOR' Ident ':=' Expression 'TO'
+ Expression [ 'BY' ConstExpression ]
+ 'DO' StatementSequence 'END'
first symbols:fortok
-
+
cannot reachend
*/
static void ForStatement (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- LoopStatement := 'LOOP' StatementSequence 'END'
+ LoopStatement := 'LOOP' StatementSequence 'END'
first symbols:looptok
-
+
cannot reachend
*/
static void LoopStatement (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- WithStatement := 'WITH' Designator 'DO' StatementSequence
- 'END'
+ WithStatement := 'WITH' Designator 'DO' StatementSequence
+ 'END'
first symbols:withtok
-
+
cannot reachend
*/
static void WithStatement (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ProcedureDeclaration := ProcedureHeading ';' ProcedureBlock
- Ident
+ ProcedureDeclaration := ProcedureHeading ';' ProcedureBlock
+ Ident
first symbols:proceduretok
-
+
cannot reachend
*/
static void ProcedureDeclaration (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ProcedureIdent := Ident
+ ProcedureIdent := Ident
% curproc := lookupSym (curident) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
static void ProcedureIdent (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- DefineBuiltinProcedure := [ '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' Ident ')' ')' |
- '__INLINE__' ]
+ DefineBuiltinProcedure := [ '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' Ident ')' ')' |
+ '__INLINE__' ]
first symbols:inlinetok, attributetok
-
+
reachend
*/
static void DefineBuiltinProcedure (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ProcedureHeading := 'PROCEDURE' DefineBuiltinProcedure
- ( ProcedureIdent
+ ProcedureHeading := 'PROCEDURE' DefineBuiltinProcedure
+ ( ProcedureIdent
% enterScope (curproc) %
- [ FormalParameters ] AttributeNoReturn )
+ [ FormalParameters ] AttributeNoReturn )
first symbols:proceduretok
-
+
cannot reachend
*/
static void ProcedureHeading (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- Builtin := [ '__BUILTIN__' | '__INLINE__' ]
+ Builtin := [ '__BUILTIN__' | '__INLINE__' ]
first symbols:inlinetok, builtintok
-
+
reachend
*/
static void Builtin (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- DefProcedureHeading := 'PROCEDURE' Builtin ( ProcedureIdent
- [ DefFormalParameters ]
- AttributeNoReturn )
+ DefProcedureHeading := 'PROCEDURE' Builtin ( ProcedureIdent
+ [ DefFormalParameters ]
+ AttributeNoReturn )
first symbols:proceduretok
-
+
cannot reachend
*/
static void DefProcedureHeading (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ProcedureBlock := { Declaration } [ 'BEGIN' ProcedureBlockBody ]
- 'END'
+ ProcedureBlock := { Declaration } [ 'BEGIN' ProcedureBlockBody ]
+ 'END'
% leaveScope %
-
+
first symbols:proceduretok, moduletok, consttok, typetok, vartok, endtok, begintok
-
+
cannot reachend
*/
static void ProcedureBlock (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- Block := { Declaration } InitialBlock FinalBlock
- 'END'
+ Block := { Declaration } InitialBlock FinalBlock
+ 'END'
first symbols:proceduretok, moduletok, finallytok, begintok, consttok, typetok, vartok, endtok
-
+
cannot reachend
*/
static void Block (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- InitialBlock := [ 'BEGIN' InitialBlockBody ]
+ InitialBlock := [ 'BEGIN' InitialBlockBody ]
first symbols:begintok
-
+
reachend
*/
static void InitialBlock (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- FinalBlock := [ 'FINALLY' FinalBlockBody ]
+ FinalBlock := [ 'FINALLY' FinalBlockBody ]
first symbols:finallytok
-
+
reachend
*/
static void FinalBlock (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- InitialBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ InitialBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
static void InitialBlockBody (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- FinalBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ FinalBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
static void FinalBlockBody (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ProcedureBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ ProcedureBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
static void ProcedureBlockBody (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- NormalPart := StatementSequence
+ NormalPart := StatementSequence
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok, semicolontok
-
+
reachend
*/
static void NormalPart (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ExceptionalPart := StatementSequence
+ ExceptionalPart := StatementSequence
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok, semicolontok
-
+
reachend
*/
static void ExceptionalPart (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- Declaration := 'CONST' { ConstantDeclaration ';' } |
- 'TYPE' { TypeDeclaration ';' } |
- 'VAR' { VariableDeclaration ';' } |
- ProcedureDeclaration ';' |
- ModuleDeclaration ';'
+ Declaration := 'CONST' { ConstantDeclaration ';' } |
+ 'TYPE' { TypeDeclaration ';' } |
+ 'VAR' { VariableDeclaration ';' } |
+ ProcedureDeclaration ';' |
+ ModuleDeclaration ';'
first symbols:moduletok, proceduretok, vartok, typetok, consttok
-
+
cannot reachend
*/
static void Declaration (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- DefFormalParameters := '(' [ DefMultiFPSection ]
- ')' FormalReturn
+ DefFormalParameters := '(' [ DefMultiFPSection ]
+ ')' FormalReturn
first symbols:lparatok
-
+
cannot reachend
*/
static void DefFormalParameters (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- DefMultiFPSection := DefExtendedFP |
- FPSection [ ';' DefMultiFPSection ]
+ DefMultiFPSection := DefExtendedFP |
+ FPSection [ ';' DefMultiFPSection ]
first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
static void DefMultiFPSection (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- FormalParameters := '(' [ MultiFPSection ] ')'
- FormalReturn
+ FormalParameters := '(' [ MultiFPSection ] ')'
+ FormalReturn
first symbols:lparatok
-
+
cannot reachend
*/
static void FormalParameters (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- AttributeNoReturn := [ '' ]
+ AttributeNoReturn := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
static void AttributeNoReturn (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- AttributeUnused := [ '' ]
+ AttributeUnused := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
static void AttributeUnused (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- MultiFPSection := ExtendedFP | FPSection [ ';'
- MultiFPSection ]
+ MultiFPSection := ExtendedFP | FPSection [ ';'
+ MultiFPSection ]
first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
static void MultiFPSection (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- FPSection := NonVarFPSection |
- VarFPSection
+ FPSection := NonVarFPSection |
+ VarFPSection
first symbols:vartok, identtok
-
+
cannot reachend
*/
static void FPSection (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- DefExtendedFP := DefOptArg | '...'
+ DefExtendedFP := DefOptArg | '...'
first symbols:lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
static void DefExtendedFP (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ExtendedFP := OptArg | '...'
+ ExtendedFP := OptArg | '...'
first symbols:lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
static void ExtendedFP (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- VarFPSection := 'VAR' IdentList ':' FormalType [
- AttributeUnused ]
+ VarFPSection := 'VAR' IdentList ':' FormalType [
+ AttributeUnused ]
first symbols:vartok
-
+
cannot reachend
*/
static void VarFPSection (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- NonVarFPSection := IdentList ':' FormalType [ AttributeUnused ]
+ NonVarFPSection := IdentList ':' FormalType [ AttributeUnused ]
first symbols:identtok
-
+
cannot reachend
*/
static void NonVarFPSection (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- OptArg := '[' Ident ':' FormalType [ '=' ConstExpression ]
- ']'
+ OptArg := '[' Ident ':' FormalType [ '=' ConstExpression ]
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
static void OptArg (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- DefOptArg := '[' Ident ':' FormalType '=' ConstExpression
- ']'
+ DefOptArg := '[' Ident ':' FormalType '=' ConstExpression
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
static void DefOptArg (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- FormalType := { 'ARRAY' 'OF' } Qualident
+ FormalType := { 'ARRAY' 'OF' } Qualident
first symbols:identtok, arraytok
-
+
cannot reachend
*/
static void FormalType (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ModuleDeclaration := 'MODULE' Ident [ Priority ]
- ';' { Import } [ Export ]
- Block Ident
+ ModuleDeclaration := 'MODULE' Ident [ Priority ]
+ ';' { Import } [ Export ]
+ Block Ident
first symbols:moduletok
-
+
cannot reachend
*/
static void ModuleDeclaration (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- Priority := '[' ConstExpression ']'
+ Priority := '[' ConstExpression ']'
first symbols:lsbratok
-
+
cannot reachend
*/
static void Priority (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- Export := 'EXPORT' ( 'QUALIFIED' IdentList |
- 'UNQUALIFIED' IdentList |
- IdentList ) ';'
+ Export := 'EXPORT' ( 'QUALIFIED' IdentList |
+ 'UNQUALIFIED' IdentList |
+ IdentList ) ';'
first symbols:exporttok
-
+
cannot reachend
*/
static void Export (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- FromImport := 'FROM' Ident 'IMPORT' IdentList ';'
+ FromImport := 'FROM' Ident 'IMPORT' IdentList ';'
first symbols:fromtok
-
+
cannot reachend
*/
static void FromImport (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- ImportModuleList := Ident { ',' Ident }
+ ImportModuleList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
static void ImportModuleList (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- WithoutFromImport := 'IMPORT' ImportModuleList ';'
+ WithoutFromImport := 'IMPORT' ImportModuleList ';'
first symbols:importtok
-
+
cannot reachend
*/
static void WithoutFromImport (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- Import := FromImport | WithoutFromImport
+ Import := FromImport | WithoutFromImport
first symbols:importtok, fromtok
-
+
cannot reachend
*/
static void Import (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- DefinitionModule := 'DEFINITION' 'MODULE' [ 'FOR'
- string ]
- Ident ';'
+ DefinitionModule := 'DEFINITION' 'MODULE' [ 'FOR'
+ string ]
+ Ident ';'
% curmodule := lookupDef (curident) %
-
+
% enterScope (curmodule) %
- { Import } [ Export ] { Definition }
- 'END' Ident '.'
+ { Import } [ Export ] { Definition }
+ 'END' Ident '.'
% checkEndName (curmodule, curident, 'definition module') %
-
+
% leaveScope %
-
+
% setEnumsComplete (curmodule) %
-
+
first symbols:definitiontok
-
+
cannot reachend
*/
static void DefinitionModule (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- DefQualident := Ident
+ DefQualident := Ident
% typeExp := lookupSym (curident) %
- [ '.'
+ [ '.'
% IF NOT isDef (typeExp)
THEN
ErrorArray ('the first component of this qualident must be a definition module')
END %
- Ident
+ Ident
% typeExp := lookupInScope (typeExp, curident) ;
IF typeExp=NIL
THEN
ErrorArray ('identifier not found in definition module')
END %
- ]
+ ]
first symbols:identtok
-
+
cannot reachend
*/
static void DefQualident (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- DefOptSubrange := [ SubrangeType |
-
+ DefOptSubrange := [ SubrangeType |
+
% putType (typeDes, typeExp) %
- ]
+ ]
first symbols:lsbratok
-
+
reachend
*/
static void DefOptSubrange (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- DefTypeEquiv := DefQualident DefOptSubrange
+ DefTypeEquiv := DefQualident DefOptSubrange
first symbols:identtok
-
+
cannot reachend
*/
static void DefTypeEquiv (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- DefEnumIdentList :=
+ DefEnumIdentList :=
% VAR n, f: node ; %
-
+
% n := makeEnum () %
- Ident
+ Ident
% f := makeEnumField (n, curident) %
- { ',' Ident
+ { ',' Ident
% f := makeEnumField (n, curident) %
- }
+ }
% IF typeDes # NIL THEN putType (typeDes, n) END %
-
+
first symbols:identtok
-
+
cannot reachend
*/
static void DefEnumIdentList (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- DefEnumeration := '(' DefEnumIdentList ')'
+ DefEnumeration := '(' DefEnumIdentList ')'
first symbols:lparatok
-
+
cannot reachend
*/
static void DefEnumeration (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- DefSimpleType := DefTypeEquiv | DefEnumeration |
- SubrangeType
+ DefSimpleType := DefTypeEquiv | DefEnumeration |
+ SubrangeType
first symbols:lsbratok, lparatok, identtok
-
+
cannot reachend
*/
static void DefSimpleType (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- DefType := DefSimpleType | ArrayType |
- RecordType | SetType | PointerType |
- ProcedureType
+ DefType := DefSimpleType | ArrayType |
+ RecordType | SetType | PointerType |
+ ProcedureType
first symbols:proceduretok, pointertok, settok, packedsettok, oftok, recordtok, arraytok, identtok, lparatok, lsbratok
-
+
cannot reachend
*/
static void DefType (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- DefTypeDeclaration := { Ident
+ DefTypeDeclaration := { Ident
% typeDes := lookupSym (curident) %
- ( ';' | '=' DefType Alignment
- ';' ) }
+ ( ';' | '=' DefType Alignment
+ ';' ) }
first symbols:identtok
-
+
reachend
*/
static void DefTypeDeclaration (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- DefConstantDeclaration := Ident '=' ConstExpression
+ DefConstantDeclaration := Ident '=' ConstExpression
first symbols:identtok
-
+
cannot reachend
*/
static void DefConstantDeclaration (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- Definition := 'CONST' { DefConstantDeclaration ';' } |
- 'TYPE' { DefTypeDeclaration } |
- 'VAR' { DefVariableDeclaration ';' } |
- DefProcedureHeading ';'
+ Definition := 'CONST' { DefConstantDeclaration ';' } |
+ 'TYPE' { DefTypeDeclaration } |
+ 'VAR' { DefVariableDeclaration ';' } |
+ DefProcedureHeading ';'
first symbols:proceduretok, vartok, typetok, consttok
-
+
cannot reachend
*/
static void Definition (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- AsmStatement := 'ASM' [ 'VOLATILE' ] '(' AsmOperands
- ')'
+ AsmStatement := 'ASM' [ 'VOLATILE' ] '(' AsmOperands
+ ')'
first symbols:asmtok
-
+
cannot reachend
*/
static void AsmStatement (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- AsmOperands := string [ AsmOperandSpec ]
+ AsmOperands := string [ AsmOperandSpec ]
first symbols:stringtok
-
+
cannot reachend
*/
static void AsmOperands (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- AsmOperandSpec := [ ':' AsmList [ ':' AsmList [
- ':' TrashList ] ] ]
+ AsmOperandSpec := [ ':' AsmList [ ':' AsmList [
+ ':' TrashList ] ] ]
first symbols:colontok
-
+
reachend
*/
static void AsmOperandSpec (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- AsmList := [ AsmElement ] { ',' AsmElement }
+ AsmList := [ AsmElement ] { ',' AsmElement }
first symbols:lsbratok, stringtok, commatok
-
+
reachend
*/
static void AsmList (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- NamedOperand := '[' Ident ']'
+ NamedOperand := '[' Ident ']'
first symbols:lsbratok
-
+
cannot reachend
*/
static void NamedOperand (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- AsmOperandName := [ NamedOperand ]
+ AsmOperandName := [ NamedOperand ]
first symbols:lsbratok
-
+
reachend
*/
static void AsmOperandName (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- AsmElement := AsmOperandName string '(' Expression
- ')'
+ AsmElement := AsmOperandName string '(' Expression
+ ')'
first symbols:stringtok, lsbratok
-
+
cannot reachend
*/
static void AsmElement (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2);
/*
- TrashList := [ string ] { ',' string }
+ TrashList := [ string ] { ',' string }
first symbols:commatok, stringtok
-
+
reachend
*/
{
mcPrintf_printf0 ((const char *) "\\nskipping token *** ", 21);
}
- /*
+ /*
yes the ORD(currenttoken) looks ugly, but it is *much* safer than
using currenttoken<sometok as a change to the ordering of the
token declarations below would cause this to break. Using ORD() we are
static void string (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2)
{
- /*
+ /*
PushTF(makekey(currentstring), stringtok) ;
BuildString
*/
static void Integer (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2)
{
- /*
+ /*
PushTF(makekey(currentstring), integertok) ;
BuildNumber
*/
static void Real (mcp2_SetOfStop0 stopset0, mcp2_SetOfStop1 stopset1, mcp2_SetOfStop2 stopset2)
{
- /*
+ /*
PushTF(makekey(currentstring), realtok) ;
BuildNumber
*/
/*
- FileUnit := DefinitionModule |
- ImplementationOrProgramModule
+ FileUnit := DefinitionModule |
+ ImplementationOrProgramModule
first symbols:implementationtok, moduletok, definitiontok
-
+
cannot reachend
*/
/*
- ProgramModule := 'MODULE' Ident
+ ProgramModule := 'MODULE' Ident
% curmodule := lookupModule (curident) %
-
+
% enterScope (curmodule) %
- [ Priority ] ';' { Import } Block
- Ident
+ [ Priority ] ';' { Import } Block
+ Ident
% checkEndName (curmodule, curident, 'program module') %
-
+
% leaveScope %
-
+
% setEnumsComplete (curmodule) %
- '.'
+ '.'
first symbols:moduletok
-
+
cannot reachend
*/
/*
- ImplementationModule := 'IMPLEMENTATION' 'MODULE'
- Ident
+ ImplementationModule := 'IMPLEMENTATION' 'MODULE'
+ Ident
% curmodule := lookupImp (curident) %
-
+
% enterScope (lookupDef (curident)) %
-
+
% enterScope (curmodule) %
- [ Priority ] ';' { Import }
- Block Ident
+ [ Priority ] ';' { Import }
+ Block Ident
% checkEndName (curmodule, curident, 'implementation module') %
-
+
% leaveScope ; leaveScope %
-
+
% setEnumsComplete (curmodule) %
- '.'
+ '.'
first symbols:implementationtok
-
+
cannot reachend
*/
/*
- ImplementationOrProgramModule := ImplementationModule |
- ProgramModule
+ ImplementationOrProgramModule := ImplementationModule |
+ ProgramModule
first symbols:moduletok, implementationtok
-
+
cannot reachend
*/
/*
- Number := Integer | Real
+ Number := Integer | Real
first symbols:realtok, integertok
-
+
cannot reachend
*/
/*
- Qualident := Ident { '.' Ident }
+ Qualident := Ident { '.' Ident }
first symbols:identtok
-
+
cannot reachend
*/
/*
- ConstantDeclaration := Ident '=' ConstExpression
+ ConstantDeclaration := Ident '=' ConstExpression
first symbols:identtok
-
+
cannot reachend
*/
/*
- ConstExpression := SimpleConstExpr [ Relation SimpleConstExpr ]
+ ConstExpression := SimpleConstExpr [ Relation SimpleConstExpr ]
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- Relation := '=' | '#' | '<>' | '<' | '<=' |
- '>' | '>=' | 'IN'
+ Relation := '=' | '#' | '<>' | '<' | '<=' |
+ '>' | '>=' | 'IN'
first symbols:intok, greaterequaltok, greatertok, lessequaltok, lesstok, lessgreatertok, hashtok, equaltok
-
+
cannot reachend
*/
/*
- SimpleConstExpr := UnaryOrConstTerm { AddOperator
- ConstTerm }
+ SimpleConstExpr := UnaryOrConstTerm { AddOperator
+ ConstTerm }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- UnaryOrConstTerm := '+' ConstTerm |
- '-' ConstTerm |
- ConstTerm
+ UnaryOrConstTerm := '+' ConstTerm |
+ '-' ConstTerm |
+ ConstTerm
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- AddOperator := '+' | '-' | 'OR'
+ AddOperator := '+' | '-' | 'OR'
first symbols:ortok, minustok, plustok
-
+
cannot reachend
*/
/*
- ConstTerm := ConstFactor { MulOperator ConstFactor }
+ ConstTerm := ConstFactor { MulOperator ConstFactor }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok
-
+
cannot reachend
*/
/*
- MulOperator := '*' | '/' | 'DIV' | 'MOD' |
- 'REM' | 'AND' | '&'
+ MulOperator := '*' | '/' | 'DIV' | 'MOD' |
+ 'REM' | 'AND' | '&'
first symbols:ambersandtok, andtok, remtok, modtok, divtok, dividetok, timestok
-
+
cannot reachend
*/
/*
- ConstFactor := Number | ConstString |
- ConstSetOrQualidentOrFunction |
- '(' ConstExpression ')' |
- 'NOT' ConstFactor |
- ConstAttribute
+ ConstFactor := Number | ConstString |
+ ConstSetOrQualidentOrFunction |
+ '(' ConstExpression ')' |
+ 'NOT' ConstFactor |
+ ConstAttribute
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok
-
+
cannot reachend
*/
/*
- ConstString := string
+ ConstString := string
first symbols:stringtok
-
+
cannot reachend
*/
/*
- ComponentElement := ConstExpression [ '..' ConstExpression ]
+ ComponentElement := ConstExpression [ '..' ConstExpression ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- ComponentValue := ComponentElement [ 'BY' ConstExpression ]
+ ComponentValue := ComponentElement [ 'BY' ConstExpression ]
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- ArraySetRecordValue := ComponentValue { ',' ComponentValue }
+ ArraySetRecordValue := ComponentValue { ',' ComponentValue }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- Constructor := '{' [ ArraySetRecordValue ] '}'
+ Constructor := '{' [ ArraySetRecordValue ] '}'
first symbols:lcbratok
-
+
cannot reachend
*/
/*
- ConstSetOrQualidentOrFunction := Qualident [ Constructor |
- ConstActualParameters ] |
- Constructor
+ ConstSetOrQualidentOrFunction := Qualident [ Constructor |
+ ConstActualParameters ] |
+ Constructor
first symbols:lcbratok, identtok
-
+
cannot reachend
*/
/*
- ConstActualParameters := ActualParameters
+ ConstActualParameters := ActualParameters
first symbols:lparatok
-
+
cannot reachend
*/
/*
- ConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' ConstAttributeExpression
- ')' ')'
+ ConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' ConstAttributeExpression
+ ')' ')'
first symbols:attributetok
-
+
cannot reachend
*/
/*
- ConstAttributeExpression := Ident | '<' Qualident
- ',' Ident '>'
+ ConstAttributeExpression := Ident | '<' Qualident
+ ',' Ident '>'
first symbols:lesstok, identtok
-
+
cannot reachend
*/
/*
- ByteAlignment := ''
+ ByteAlignment := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
/*
- OptAlignmentExpression := [ AlignmentExpression ]
+ OptAlignmentExpression := [ AlignmentExpression ]
first symbols:lparatok
-
+
reachend
*/
/*
- AlignmentExpression := '(' ConstExpression ')'
+ AlignmentExpression := '(' ConstExpression ')'
first symbols:lparatok
-
+
cannot reachend
*/
/*
- Alignment := [ ByteAlignment ]
+ Alignment := [ ByteAlignment ]
first symbols:ldirectivetok
-
+
reachend
*/
/*
- TypeDeclaration := Ident
+ TypeDeclaration := Ident
% typeDes := lookupSym (curident) %
- '=' Type Alignment
+ '=' Type Alignment
first symbols:identtok
-
+
cannot reachend
*/
/*
- Type := ( DefSimpleType | ArrayType |
- RecordType | SetType | PointerType |
- ProcedureType )
+ Type := ( DefSimpleType | ArrayType |
+ RecordType | SetType | PointerType |
+ ProcedureType )
first symbols:proceduretok, pointertok, settok, packedsettok, oftok, recordtok, arraytok, identtok, lparatok, lsbratok
-
+
cannot reachend
*/
/*
- SimpleType := Qualident [ SubrangeType ] |
- Enumeration | SubrangeType
+ SimpleType := Qualident [ SubrangeType ] |
+ Enumeration | SubrangeType
first symbols:lsbratok, lparatok, identtok
-
+
cannot reachend
*/
/*
- EnumIdentList :=
+ EnumIdentList :=
% VAR n, f: node ; %
-
+
% n := makeEnum () %
- Ident
+ Ident
% f := makeEnumField (n, curident) %
- { ',' Ident
+ { ',' Ident
% f := makeEnumField (n, curident) %
- }
+ }
first symbols:identtok
-
+
cannot reachend
*/
/*
- Enumeration := '(' ( EnumIdentList ) ')'
+ Enumeration := '(' ( EnumIdentList ) ')'
first symbols:lparatok
-
+
cannot reachend
*/
/*
- IdentList := Ident { ',' Ident }
+ IdentList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
/*
- SubrangeType := '[' ConstExpression '..' ConstExpression
- ']'
+ SubrangeType := '[' ConstExpression '..' ConstExpression
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- ArrayType := 'ARRAY' SimpleType { ',' SimpleType }
- 'OF' Type
+ ArrayType := 'ARRAY' SimpleType { ',' SimpleType }
+ 'OF' Type
first symbols:arraytok
-
+
cannot reachend
*/
/*
- RecordType := 'RECORD' [ DefaultRecordAttributes ]
- FieldListSequence 'END'
+ RecordType := 'RECORD' [ DefaultRecordAttributes ]
+ FieldListSequence 'END'
first symbols:recordtok
-
+
cannot reachend
*/
/*
- DefaultRecordAttributes := ''
+ DefaultRecordAttributes := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
/*
- RecordFieldPragma := [ '' ]
+ RecordFieldPragma := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
/*
- FieldPragmaExpression := Ident PragmaConstExpression
+ FieldPragmaExpression := Ident PragmaConstExpression
first symbols:identtok
-
+
cannot reachend
*/
/*
- PragmaConstExpression := [ '(' ConstExpression ')' ]
+ PragmaConstExpression := [ '(' ConstExpression ')' ]
first symbols:lparatok
-
+
reachend
*/
/*
- AttributeExpression := Ident '(' ConstExpression
- ')'
+ AttributeExpression := Ident '(' ConstExpression
+ ')'
first symbols:identtok
-
+
cannot reachend
*/
/*
- FieldListSequence := FieldListStatement { ';' FieldListStatement }
+ FieldListSequence := FieldListStatement { ';' FieldListStatement }
first symbols:casetok, identtok, semicolontok
-
+
reachend
*/
/*
- FieldListStatement := [ FieldList ]
+ FieldListStatement := [ FieldList ]
first symbols:identtok, casetok
-
+
reachend
*/
/*
- FieldList := IdentList ':' Type RecordFieldPragma |
- 'CASE' CaseTag 'OF' Varient { '|' Varient }
- [ 'ELSE' FieldListSequence ] 'END'
+ FieldList := IdentList ':' Type RecordFieldPragma |
+ 'CASE' CaseTag 'OF' Varient { '|' Varient }
+ [ 'ELSE' FieldListSequence ] 'END'
first symbols:casetok, identtok
-
+
cannot reachend
*/
/*
- TagIdent := [ Ident ]
+ TagIdent := [ Ident ]
first symbols:identtok
-
+
reachend
*/
/*
- CaseTag := TagIdent [ ':' Qualident ]
+ CaseTag := TagIdent [ ':' Qualident ]
first symbols:colontok, identtok
-
+
reachend
*/
/*
- Varient := [ VarientCaseLabelList ':' FieldListSequence ]
+ Varient := [ VarientCaseLabelList ':' FieldListSequence ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
reachend
*/
/*
- VarientCaseLabelList := VarientCaseLabels { ','
- VarientCaseLabels }
+ VarientCaseLabelList := VarientCaseLabels { ','
+ VarientCaseLabels }
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- VarientCaseLabels := ConstExpression [ '..' ConstExpression ]
+ VarientCaseLabels := ConstExpression [ '..' ConstExpression ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- SilentConstExpression := SilentSimpleConstExpr [
- SilentRelation SilentSimpleConstExpr ]
+ SilentConstExpression := SilentSimpleConstExpr [
+ SilentRelation SilentSimpleConstExpr ]
first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- SilentRelation := '=' | '#' | '<>' | '<' |
- '<=' | '>' | '>=' | 'IN'
+ SilentRelation := '=' | '#' | '<>' | '<' |
+ '<=' | '>' | '>=' | 'IN'
first symbols:intok, greaterequaltok, greatertok, lessequaltok, lesstok, lessgreatertok, hashtok, equaltok
-
+
cannot reachend
*/
/*
- SilentSimpleConstExpr := SilentUnaryOrConstTerm
- { SilentAddOperator SilentConstTerm }
+ SilentSimpleConstExpr := SilentUnaryOrConstTerm
+ { SilentAddOperator SilentConstTerm }
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- SilentUnaryOrConstTerm := '+' SilentConstTerm |
- '-' SilentConstTerm |
- SilentConstTerm
+ SilentUnaryOrConstTerm := '+' SilentConstTerm |
+ '-' SilentConstTerm |
+ SilentConstTerm
first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- SilentAddOperator := '+' | '-' | 'OR'
+ SilentAddOperator := '+' | '-' | 'OR'
first symbols:ortok, minustok, plustok
-
+
cannot reachend
*/
/*
- SilentConstTerm := SilentConstFactor { SilentMulOperator
- SilentConstFactor }
+ SilentConstTerm := SilentConstFactor { SilentMulOperator
+ SilentConstFactor }
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok
-
+
cannot reachend
*/
/*
- SilentMulOperator := '*' | '/' | 'DIV' |
- 'MOD' | 'REM' | 'AND' |
- '&'
+ SilentMulOperator := '*' | '/' | 'DIV' |
+ 'MOD' | 'REM' | 'AND' |
+ '&'
first symbols:ambersandtok, andtok, remtok, modtok, divtok, dividetok, timestok
-
+
cannot reachend
*/
/*
- SilentConstFactor := Number | SilentConstString |
- SilentConstSetOrQualidentOrFunction |
- '(' SilentConstExpression ')' |
- 'NOT' SilentConstFactor |
- SilentConstAttribute
+ SilentConstFactor := Number | SilentConstString |
+ SilentConstSetOrQualidentOrFunction |
+ '(' SilentConstExpression ')' |
+ 'NOT' SilentConstFactor |
+ SilentConstAttribute
first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok
-
+
cannot reachend
*/
/*
- SilentConstString := string
+ SilentConstString := string
first symbols:stringtok
-
+
cannot reachend
*/
/*
- SilentConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' SilentConstAttributeExpression
- ')' ')'
+ SilentConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' SilentConstAttributeExpression
+ ')' ')'
first symbols:attributetok
-
+
cannot reachend
*/
/*
- SilentConstAttributeExpression := Ident |
- '<' Ident ','
- SilentConstString
- '>'
+ SilentConstAttributeExpression := Ident |
+ '<' Ident ','
+ SilentConstString
+ '>'
first symbols:lesstok, identtok
-
+
cannot reachend
*/
/*
- SilentComponentElement := SilentConstExpression
- [ '..' SilentConstExpression ]
+ SilentComponentElement := SilentConstExpression
+ [ '..' SilentConstExpression ]
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- SilentComponentValue := SilentComponentElement [
- 'BY' SilentConstExpression ]
+ SilentComponentValue := SilentComponentElement [
+ 'BY' SilentConstExpression ]
first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- SilentArraySetRecordValue := SilentComponentValue
- { ',' SilentComponentValue }
+ SilentArraySetRecordValue := SilentComponentValue
+ { ',' SilentComponentValue }
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- SilentConstructor := '{' [ SilentArraySetRecordValue ]
- '}'
+ SilentConstructor := '{' [ SilentArraySetRecordValue ]
+ '}'
first symbols:lcbratok
-
+
cannot reachend
*/
/*
- SilentConstSetOrQualidentOrFunction := SilentConstructor |
- Qualident
- [ SilentConstructor |
- SilentActualParameters ]
+ SilentConstSetOrQualidentOrFunction := SilentConstructor |
+ Qualident
+ [ SilentConstructor |
+ SilentActualParameters ]
first symbols:identtok, lcbratok
-
+
cannot reachend
*/
/*
- SilentElement := SilentConstExpression [ '..' SilentConstExpression ]
+ SilentElement := SilentConstExpression [ '..' SilentConstExpression ]
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- SilentActualParameters := '(' [ SilentExpList ]
- ')'
+ SilentActualParameters := '(' [ SilentExpList ]
+ ')'
first symbols:lparatok
-
+
cannot reachend
*/
/*
- SilentExpList := SilentConstExpression { ',' SilentConstExpression }
+ SilentExpList := SilentConstExpression { ',' SilentConstExpression }
first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- SetType := ( 'SET' | 'PACKEDSET' ) 'OF' SimpleType
+ SetType := ( 'SET' | 'PACKEDSET' ) 'OF' SimpleType
first symbols:oftok, packedsettok, settok
-
+
cannot reachend
*/
/*
- PointerType := 'POINTER' 'TO' Type
+ PointerType := 'POINTER' 'TO' Type
first symbols:pointertok
-
+
cannot reachend
*/
/*
- ProcedureType := 'PROCEDURE' [ FormalTypeList ]
+ ProcedureType := 'PROCEDURE' [ FormalTypeList ]
first symbols:proceduretok
-
+
cannot reachend
*/
/*
- FormalTypeList := '(' ( ')' FormalReturn |
- ProcedureParameters ')'
- FormalReturn )
+ FormalTypeList := '(' ( ')' FormalReturn |
+ ProcedureParameters ')'
+ FormalReturn )
first symbols:lparatok
-
+
cannot reachend
*/
/*
- FormalReturn := [ ':' OptReturnType ]
+ FormalReturn := [ ':' OptReturnType ]
first symbols:colontok
-
+
reachend
*/
/*
- OptReturnType := '[' Qualident ']' |
- Qualident
+ OptReturnType := '[' Qualident ']' |
+ Qualident
first symbols:identtok, lsbratok
-
+
cannot reachend
*/
/*
- ProcedureParameters := ProcedureParameter { ','
- ProcedureParameter }
+ ProcedureParameters := ProcedureParameter { ','
+ ProcedureParameter }
first symbols:identtok, arraytok, periodperiodperiodtok, vartok
-
+
cannot reachend
*/
/*
- ProcedureParameter := '...' | 'VAR' FormalType |
- FormalType
+ ProcedureParameter := '...' | 'VAR' FormalType |
+ FormalType
first symbols:arraytok, identtok, vartok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- VarIdent := Ident [ '[' ConstExpression ']' ]
+ VarIdent := Ident [ '[' ConstExpression ']' ]
first symbols:identtok
-
+
cannot reachend
*/
/*
- VarIdentList := VarIdent { ',' VarIdent }
+ VarIdentList := VarIdent { ',' VarIdent }
first symbols:identtok
-
+
cannot reachend
*/
/*
- VariableDeclaration := VarIdentList ':' Type Alignment
+ VariableDeclaration := VarIdentList ':' Type Alignment
first symbols:identtok
-
+
cannot reachend
*/
/*
- DefVarIdent := Ident [ '[' ConstExpression ']' ]
+ DefVarIdent := Ident [ '[' ConstExpression ']' ]
first symbols:identtok
-
+
cannot reachend
*/
/*
- DefVarIdentList := DefVarIdent { ',' DefVarIdent }
+ DefVarIdentList := DefVarIdent { ',' DefVarIdent }
first symbols:identtok
-
+
cannot reachend
*/
/*
- DefVariableDeclaration :=
+ DefVariableDeclaration :=
% typeDes := NIL %
- DefVarIdentList ':' Type
- Alignment
+ DefVarIdentList ':' Type
+ Alignment
first symbols:identtok
-
+
cannot reachend
*/
/*
- Designator := Qualident { SubDesignator }
+ Designator := Qualident { SubDesignator }
first symbols:identtok
-
+
cannot reachend
*/
/*
- SubDesignator := '.' Ident | '[' ArrayExpList ']' |
- '^'
+ SubDesignator := '.' Ident | '[' ArrayExpList ']' |
+ '^'
first symbols:uparrowtok, lsbratok, periodtok
-
+
cannot reachend
*/
/*
- ArrayExpList := Expression { ',' Expression }
+ ArrayExpList := Expression { ',' Expression }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- ExpList := Expression { ',' Expression }
+ ExpList := Expression { ',' Expression }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- Expression := SimpleExpression [ Relation SimpleExpression ]
+ Expression := SimpleExpression [ Relation SimpleExpression ]
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- SimpleExpression := UnaryOrTerm { AddOperator Term }
+ SimpleExpression := UnaryOrTerm { AddOperator Term }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- UnaryOrTerm := '+' Term | '-' Term |
- Term
+ UnaryOrTerm := '+' Term | '-' Term |
+ Term
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- Term := Factor { MulOperator Factor }
+ Term := Factor { MulOperator Factor }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok
-
+
cannot reachend
*/
/*
- Factor := Number | string | SetOrDesignatorOrFunction |
- '(' Expression ')' |
- 'NOT' ( Factor | ConstAttribute )
+ Factor := Number | string | SetOrDesignatorOrFunction |
+ '(' Expression ')' |
+ 'NOT' ( Factor | ConstAttribute )
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok
-
+
cannot reachend
*/
/*
- SetOrDesignatorOrFunction := Qualident [ Constructor |
- SimpleDes
- [ ActualParameters ] ] |
- Constructor
+ SetOrDesignatorOrFunction := Qualident [ Constructor |
+ SimpleDes
+ [ ActualParameters ] ] |
+ Constructor
first symbols:lcbratok, identtok
-
+
cannot reachend
*/
/*
- SimpleDes := { SubDesignator }
+ SimpleDes := { SubDesignator }
first symbols:periodtok, lsbratok, uparrowtok
-
+
reachend
*/
/*
- ActualParameters := '(' [ ExpList ] ')'
+ ActualParameters := '(' [ ExpList ] ')'
first symbols:lparatok
-
+
cannot reachend
*/
/*
- ExitStatement := 'EXIT'
+ ExitStatement := 'EXIT'
first symbols:exittok
-
+
cannot reachend
*/
/*
- ReturnStatement := 'RETURN' [ Expression ]
+ ReturnStatement := 'RETURN' [ Expression ]
first symbols:returntok
-
+
cannot reachend
*/
/*
- Statement := [ AssignmentOrProcedureCall |
- IfStatement | CaseStatement |
- WhileStatement |
- RepeatStatement |
- LoopStatement | ForStatement |
- WithStatement | AsmStatement |
- ExitStatement | ReturnStatement |
- RetryStatement ]
+ Statement := [ AssignmentOrProcedureCall |
+ IfStatement | CaseStatement |
+ WhileStatement |
+ RepeatStatement |
+ LoopStatement | ForStatement |
+ WithStatement | AsmStatement |
+ ExitStatement | ReturnStatement |
+ RetryStatement ]
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok
-
+
reachend
*/
/*
- RetryStatement := 'RETRY'
+ RetryStatement := 'RETRY'
first symbols:retrytok
-
+
cannot reachend
*/
/*
- AssignmentOrProcedureCall := Designator ( ':=' Expression |
- ActualParameters |
-
+ AssignmentOrProcedureCall := Designator ( ':=' Expression |
+ ActualParameters |
+
% epsilon %
- )
+ )
first symbols:identtok
-
+
cannot reachend
*/
/*
- StatementSequence := Statement { ';' Statement }
+ StatementSequence := Statement { ';' Statement }
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok
-
+
reachend
*/
/*
- IfStatement := 'IF' Expression 'THEN' StatementSequence
- { 'ELSIF' Expression 'THEN' StatementSequence }
- [ 'ELSE' StatementSequence ] 'END'
+ IfStatement := 'IF' Expression 'THEN' StatementSequence
+ { 'ELSIF' Expression 'THEN' StatementSequence }
+ [ 'ELSE' StatementSequence ] 'END'
first symbols:iftok
-
+
cannot reachend
*/
/*
- CaseStatement := 'CASE' Expression 'OF' Case { '|'
- Case }
- CaseEndStatement
+ CaseStatement := 'CASE' Expression 'OF' Case { '|'
+ Case }
+ CaseEndStatement
first symbols:casetok
-
+
cannot reachend
*/
/*
- CaseEndStatement := 'END' | 'ELSE' StatementSequence
- 'END'
+ CaseEndStatement := 'END' | 'ELSE' StatementSequence
+ 'END'
first symbols:elsetok, endtok
-
+
cannot reachend
*/
/*
- Case := [ CaseLabelList ':' StatementSequence ]
+ Case := [ CaseLabelList ':' StatementSequence ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
reachend
*/
/*
- CaseLabelList := CaseLabels { ',' CaseLabels }
+ CaseLabelList := CaseLabels { ',' CaseLabels }
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- CaseLabels := ConstExpression [ '..' ConstExpression ]
+ CaseLabels := ConstExpression [ '..' ConstExpression ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- WhileStatement := 'WHILE' Expression 'DO' StatementSequence
- 'END'
+ WhileStatement := 'WHILE' Expression 'DO' StatementSequence
+ 'END'
first symbols:whiletok
-
+
cannot reachend
*/
/*
- RepeatStatement := 'REPEAT' StatementSequence 'UNTIL'
- Expression
+ RepeatStatement := 'REPEAT' StatementSequence 'UNTIL'
+ Expression
first symbols:repeattok
-
+
cannot reachend
*/
/*
- ForStatement := 'FOR' Ident ':=' Expression 'TO'
- Expression [ 'BY' ConstExpression ]
- 'DO' StatementSequence 'END'
+ ForStatement := 'FOR' Ident ':=' Expression 'TO'
+ Expression [ 'BY' ConstExpression ]
+ 'DO' StatementSequence 'END'
first symbols:fortok
-
+
cannot reachend
*/
/*
- LoopStatement := 'LOOP' StatementSequence 'END'
+ LoopStatement := 'LOOP' StatementSequence 'END'
first symbols:looptok
-
+
cannot reachend
*/
/*
- WithStatement := 'WITH' Designator 'DO' StatementSequence
- 'END'
+ WithStatement := 'WITH' Designator 'DO' StatementSequence
+ 'END'
first symbols:withtok
-
+
cannot reachend
*/
/*
- ProcedureDeclaration := ProcedureHeading ';' ProcedureBlock
- Ident
+ ProcedureDeclaration := ProcedureHeading ';' ProcedureBlock
+ Ident
first symbols:proceduretok
-
+
cannot reachend
*/
/*
- ProcedureIdent := Ident
+ ProcedureIdent := Ident
% curproc := lookupSym (curident) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
/*
- DefineBuiltinProcedure := [ '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' Ident ')' ')' |
- '__INLINE__' ]
+ DefineBuiltinProcedure := [ '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' Ident ')' ')' |
+ '__INLINE__' ]
first symbols:inlinetok, attributetok
-
+
reachend
*/
/*
- ProcedureHeading := 'PROCEDURE' DefineBuiltinProcedure
- ( ProcedureIdent
+ ProcedureHeading := 'PROCEDURE' DefineBuiltinProcedure
+ ( ProcedureIdent
% enterScope (curproc) %
- [ FormalParameters ] AttributeNoReturn )
+ [ FormalParameters ] AttributeNoReturn )
first symbols:proceduretok
-
+
cannot reachend
*/
/*
- Builtin := [ '__BUILTIN__' | '__INLINE__' ]
+ Builtin := [ '__BUILTIN__' | '__INLINE__' ]
first symbols:inlinetok, builtintok
-
+
reachend
*/
/*
- DefProcedureHeading := 'PROCEDURE' Builtin ( ProcedureIdent
- [ DefFormalParameters ]
- AttributeNoReturn )
+ DefProcedureHeading := 'PROCEDURE' Builtin ( ProcedureIdent
+ [ DefFormalParameters ]
+ AttributeNoReturn )
first symbols:proceduretok
-
+
cannot reachend
*/
/*
- ProcedureBlock := { Declaration } [ 'BEGIN' ProcedureBlockBody ]
- 'END'
+ ProcedureBlock := { Declaration } [ 'BEGIN' ProcedureBlockBody ]
+ 'END'
% leaveScope %
-
+
first symbols:proceduretok, moduletok, consttok, typetok, vartok, endtok, begintok
-
+
cannot reachend
*/
/*
- Block := { Declaration } InitialBlock FinalBlock
- 'END'
+ Block := { Declaration } InitialBlock FinalBlock
+ 'END'
first symbols:proceduretok, moduletok, finallytok, begintok, consttok, typetok, vartok, endtok
-
+
cannot reachend
*/
/*
- InitialBlock := [ 'BEGIN' InitialBlockBody ]
+ InitialBlock := [ 'BEGIN' InitialBlockBody ]
first symbols:begintok
-
+
reachend
*/
/*
- FinalBlock := [ 'FINALLY' FinalBlockBody ]
+ FinalBlock := [ 'FINALLY' FinalBlockBody ]
first symbols:finallytok
-
+
reachend
*/
/*
- InitialBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ InitialBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
/*
- FinalBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ FinalBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
/*
- ProcedureBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ ProcedureBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
/*
- NormalPart := StatementSequence
+ NormalPart := StatementSequence
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok, semicolontok
-
+
reachend
*/
/*
- ExceptionalPart := StatementSequence
+ ExceptionalPart := StatementSequence
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok, semicolontok
-
+
reachend
*/
/*
- Declaration := 'CONST' { ConstantDeclaration ';' } |
- 'TYPE' { TypeDeclaration ';' } |
- 'VAR' { VariableDeclaration ';' } |
- ProcedureDeclaration ';' |
- ModuleDeclaration ';'
+ Declaration := 'CONST' { ConstantDeclaration ';' } |
+ 'TYPE' { TypeDeclaration ';' } |
+ 'VAR' { VariableDeclaration ';' } |
+ ProcedureDeclaration ';' |
+ ModuleDeclaration ';'
first symbols:moduletok, proceduretok, vartok, typetok, consttok
-
+
cannot reachend
*/
/*
- DefFormalParameters := '(' [ DefMultiFPSection ]
- ')' FormalReturn
+ DefFormalParameters := '(' [ DefMultiFPSection ]
+ ')' FormalReturn
first symbols:lparatok
-
+
cannot reachend
*/
/*
- DefMultiFPSection := DefExtendedFP |
- FPSection [ ';' DefMultiFPSection ]
+ DefMultiFPSection := DefExtendedFP |
+ FPSection [ ';' DefMultiFPSection ]
first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- FormalParameters := '(' [ MultiFPSection ] ')'
- FormalReturn
+ FormalParameters := '(' [ MultiFPSection ] ')'
+ FormalReturn
first symbols:lparatok
-
+
cannot reachend
*/
/*
- AttributeNoReturn := [ '' ]
+ AttributeNoReturn := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
/*
- AttributeUnused := [ '' ]
+ AttributeUnused := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
/*
- MultiFPSection := ExtendedFP | FPSection [ ';'
- MultiFPSection ]
+ MultiFPSection := ExtendedFP | FPSection [ ';'
+ MultiFPSection ]
first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- FPSection := NonVarFPSection |
- VarFPSection
+ FPSection := NonVarFPSection |
+ VarFPSection
first symbols:vartok, identtok
-
+
cannot reachend
*/
/*
- DefExtendedFP := DefOptArg | '...'
+ DefExtendedFP := DefOptArg | '...'
first symbols:lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- ExtendedFP := OptArg | '...'
+ ExtendedFP := OptArg | '...'
first symbols:lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- VarFPSection := 'VAR' IdentList ':' FormalType [
- AttributeUnused ]
+ VarFPSection := 'VAR' IdentList ':' FormalType [
+ AttributeUnused ]
first symbols:vartok
-
+
cannot reachend
*/
/*
- NonVarFPSection := IdentList ':' FormalType [ AttributeUnused ]
+ NonVarFPSection := IdentList ':' FormalType [ AttributeUnused ]
first symbols:identtok
-
+
cannot reachend
*/
/*
- OptArg := '[' Ident ':' FormalType [ '=' ConstExpression ]
- ']'
+ OptArg := '[' Ident ':' FormalType [ '=' ConstExpression ]
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- DefOptArg := '[' Ident ':' FormalType '=' ConstExpression
- ']'
+ DefOptArg := '[' Ident ':' FormalType '=' ConstExpression
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- FormalType := { 'ARRAY' 'OF' } Qualident
+ FormalType := { 'ARRAY' 'OF' } Qualident
first symbols:identtok, arraytok
-
+
cannot reachend
*/
/*
- ModuleDeclaration := 'MODULE' Ident [ Priority ]
- ';' { Import } [ Export ]
- Block Ident
+ ModuleDeclaration := 'MODULE' Ident [ Priority ]
+ ';' { Import } [ Export ]
+ Block Ident
first symbols:moduletok
-
+
cannot reachend
*/
/*
- Priority := '[' ConstExpression ']'
+ Priority := '[' ConstExpression ']'
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- Export := 'EXPORT' ( 'QUALIFIED' IdentList |
- 'UNQUALIFIED' IdentList |
- IdentList ) ';'
+ Export := 'EXPORT' ( 'QUALIFIED' IdentList |
+ 'UNQUALIFIED' IdentList |
+ IdentList ) ';'
first symbols:exporttok
-
+
cannot reachend
*/
/*
- FromImport := 'FROM' Ident 'IMPORT' IdentList ';'
+ FromImport := 'FROM' Ident 'IMPORT' IdentList ';'
first symbols:fromtok
-
+
cannot reachend
*/
/*
- ImportModuleList := Ident { ',' Ident }
+ ImportModuleList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
/*
- WithoutFromImport := 'IMPORT' ImportModuleList ';'
+ WithoutFromImport := 'IMPORT' ImportModuleList ';'
first symbols:importtok
-
+
cannot reachend
*/
/*
- Import := FromImport | WithoutFromImport
+ Import := FromImport | WithoutFromImport
first symbols:importtok, fromtok
-
+
cannot reachend
*/
/*
- DefinitionModule := 'DEFINITION' 'MODULE' [ 'FOR'
- string ]
- Ident ';'
+ DefinitionModule := 'DEFINITION' 'MODULE' [ 'FOR'
+ string ]
+ Ident ';'
% curmodule := lookupDef (curident) %
-
+
% enterScope (curmodule) %
- { Import } [ Export ] { Definition }
- 'END' Ident '.'
+ { Import } [ Export ] { Definition }
+ 'END' Ident '.'
% checkEndName (curmodule, curident, 'definition module') %
-
+
% leaveScope %
-
+
% setEnumsComplete (curmodule) %
-
+
first symbols:definitiontok
-
+
cannot reachend
*/
/*
- DefQualident := Ident
+ DefQualident := Ident
% typeExp := lookupSym (curident) %
- [ '.'
+ [ '.'
% IF NOT isDef (typeExp)
THEN
ErrorArray ('the first component of this qualident must be a definition module')
END %
- Ident
+ Ident
% typeExp := lookupInScope (typeExp, curident) ;
IF typeExp=NIL
THEN
ErrorArray ('identifier not found in definition module')
END %
- ]
+ ]
first symbols:identtok
-
+
cannot reachend
*/
/*
- DefOptSubrange := [ SubrangeType |
-
+ DefOptSubrange := [ SubrangeType |
+
% putType (typeDes, typeExp) %
- ]
+ ]
first symbols:lsbratok
-
+
reachend
*/
/*
- DefTypeEquiv := DefQualident DefOptSubrange
+ DefTypeEquiv := DefQualident DefOptSubrange
first symbols:identtok
-
+
cannot reachend
*/
/*
- DefEnumIdentList :=
+ DefEnumIdentList :=
% VAR n, f: node ; %
-
+
% n := makeEnum () %
- Ident
+ Ident
% f := makeEnumField (n, curident) %
- { ',' Ident
+ { ',' Ident
% f := makeEnumField (n, curident) %
- }
+ }
% IF typeDes # NIL THEN putType (typeDes, n) END %
-
+
first symbols:identtok
-
+
cannot reachend
*/
/*
- DefEnumeration := '(' DefEnumIdentList ')'
+ DefEnumeration := '(' DefEnumIdentList ')'
first symbols:lparatok
-
+
cannot reachend
*/
/*
- DefSimpleType := DefTypeEquiv | DefEnumeration |
- SubrangeType
+ DefSimpleType := DefTypeEquiv | DefEnumeration |
+ SubrangeType
first symbols:lsbratok, lparatok, identtok
-
+
cannot reachend
*/
/*
- DefType := DefSimpleType | ArrayType |
- RecordType | SetType | PointerType |
- ProcedureType
+ DefType := DefSimpleType | ArrayType |
+ RecordType | SetType | PointerType |
+ ProcedureType
first symbols:proceduretok, pointertok, settok, packedsettok, oftok, recordtok, arraytok, identtok, lparatok, lsbratok
-
+
cannot reachend
*/
/*
- DefTypeDeclaration := { Ident
+ DefTypeDeclaration := { Ident
% typeDes := lookupSym (curident) %
- ( ';' | '=' DefType Alignment
- ';' ) }
+ ( ';' | '=' DefType Alignment
+ ';' ) }
first symbols:identtok
-
+
reachend
*/
/*
- DefConstantDeclaration := Ident '=' ConstExpression
+ DefConstantDeclaration := Ident '=' ConstExpression
first symbols:identtok
-
+
cannot reachend
*/
/*
- Definition := 'CONST' { DefConstantDeclaration ';' } |
- 'TYPE' { DefTypeDeclaration } |
- 'VAR' { DefVariableDeclaration ';' } |
- DefProcedureHeading ';'
+ Definition := 'CONST' { DefConstantDeclaration ';' } |
+ 'TYPE' { DefTypeDeclaration } |
+ 'VAR' { DefVariableDeclaration ';' } |
+ DefProcedureHeading ';'
first symbols:proceduretok, vartok, typetok, consttok
-
+
cannot reachend
*/
/*
- AsmStatement := 'ASM' [ 'VOLATILE' ] '(' AsmOperands
- ')'
+ AsmStatement := 'ASM' [ 'VOLATILE' ] '(' AsmOperands
+ ')'
first symbols:asmtok
-
+
cannot reachend
*/
/*
- AsmOperands := string [ AsmOperandSpec ]
+ AsmOperands := string [ AsmOperandSpec ]
first symbols:stringtok
-
+
cannot reachend
*/
/*
- AsmOperandSpec := [ ':' AsmList [ ':' AsmList [
- ':' TrashList ] ] ]
+ AsmOperandSpec := [ ':' AsmList [ ':' AsmList [
+ ':' TrashList ] ] ]
first symbols:colontok
-
+
reachend
*/
/*
- AsmList := [ AsmElement ] { ',' AsmElement }
+ AsmList := [ AsmElement ] { ',' AsmElement }
first symbols:lsbratok, stringtok, commatok
-
+
reachend
*/
/*
- NamedOperand := '[' Ident ']'
+ NamedOperand := '[' Ident ']'
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- AsmOperandName := [ NamedOperand ]
+ AsmOperandName := [ NamedOperand ]
first symbols:lsbratok
-
+
reachend
*/
/*
- AsmElement := AsmOperandName string '(' Expression
- ')'
+ AsmElement := AsmOperandName string '(' Expression
+ ')'
first symbols:stringtok, lsbratok
-
+
cannot reachend
*/
/*
- TrashList := [ string ] { ',' string }
+ TrashList := [ string ] { ',' string }
first symbols:commatok, stringtok
-
+
reachend
*/
static void Real (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- FileUnit := DefinitionModule |
- ImplementationOrProgramModule
+ FileUnit := DefinitionModule |
+ ImplementationOrProgramModule
first symbols:implementationtok, moduletok, definitiontok
-
+
cannot reachend
*/
static void FileUnit (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ProgramModule := 'MODULE' Ident
+ ProgramModule := 'MODULE' Ident
% curmodule := lookupModule (curident) %
-
+
% enterScope (curmodule) %
-
+
% resetEnumPos (curmodule) %
- [ Priority ] ';' { Import } Block
- Ident
+ [ Priority ] ';' { Import } Block
+ Ident
% checkEndName (curmodule, curident, 'program module') %
-
+
% setConstExpComplete (curmodule) %
-
+
% leaveScope %
- '.'
+ '.'
first symbols:moduletok
-
+
cannot reachend
*/
static void ProgramModule (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ImplementationModule := 'IMPLEMENTATION' 'MODULE'
- Ident
+ ImplementationModule := 'IMPLEMENTATION' 'MODULE'
+ Ident
% curmodule := lookupImp (curident) %
-
+
% enterScope (lookupDef (curident)) %
-
+
% enterScope (curmodule) %
-
+
% resetEnumPos (curmodule) %
- [ Priority ] ';' { Import }
- Block Ident
+ [ Priority ] ';' { Import }
+ Block Ident
% checkEndName (curmodule, curident, 'implementation module') %
-
+
% setConstExpComplete (curmodule) %
-
+
% leaveScope ; leaveScope %
- '.'
+ '.'
first symbols:implementationtok
-
+
cannot reachend
*/
static void ImplementationModule (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ImplementationOrProgramModule := ImplementationModule |
- ProgramModule
+ ImplementationOrProgramModule := ImplementationModule |
+ ProgramModule
first symbols:moduletok, implementationtok
-
+
cannot reachend
*/
static void ImplementationOrProgramModule (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- Number := Integer | Real
+ Number := Integer | Real
first symbols:realtok, integertok
-
+
cannot reachend
*/
static void Number (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- Qualident := Ident { '.' Ident }
+ Qualident := Ident { '.' Ident }
first symbols:identtok
-
+
cannot reachend
*/
static void Qualident (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ConstantDeclaration :=
+ ConstantDeclaration :=
% VAR d, e: node ; %
- Ident
+ Ident
% d := lookupSym (curident) %
- '=' ConstExpression
+ '=' ConstExpression
% e := pop () %
-
+
% assert (isConst (d)) %
-
+
% putConst (d, e) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
static void ConstantDeclaration (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ConstExpressionNop := SimpleConstExpr
+ ConstExpressionNop := SimpleConstExpr
% VAR n: node ; %
- [ Relation SimpleConstExpr ]
-
+ [ Relation SimpleConstExpr ]
+
% n := makeConstExp () %
-
+
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void ConstExpressionNop (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ConstExpression :=
+ ConstExpression :=
% VAR n: node ; %
-
+
% n := push (makeConstExp ()) %
- SimpleConstExpr [ Relation SimpleConstExpr ]
+ SimpleConstExpr [ Relation SimpleConstExpr ]
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void ConstExpression (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- Relation := '=' | '#' | '<>' | '<' | '<=' |
- '>' | '>=' | 'IN'
+ Relation := '=' | '#' | '<>' | '<' | '<=' |
+ '>' | '>=' | 'IN'
first symbols:intok, greaterequaltok, greatertok, lessequaltok, lesstok, lessgreatertok, hashtok, equaltok
-
+
cannot reachend
*/
static void Relation (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- SimpleConstExpr := UnaryOrConstTerm { AddOperator
- ConstTerm }
+ SimpleConstExpr := UnaryOrConstTerm { AddOperator
+ ConstTerm }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void SimpleConstExpr (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- UnaryOrConstTerm := '+' ConstTerm |
- '-' ConstTerm |
- ConstTerm
+ UnaryOrConstTerm := '+' ConstTerm |
+ '-' ConstTerm |
+ ConstTerm
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void UnaryOrConstTerm (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- AddOperator := '+' | '-' | 'OR'
+ AddOperator := '+' | '-' | 'OR'
first symbols:ortok, minustok, plustok
-
+
cannot reachend
*/
static void AddOperator (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ConstTerm := ConstFactor { MulOperator ConstFactor }
+ ConstTerm := ConstFactor { MulOperator ConstFactor }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok
-
+
cannot reachend
*/
static void ConstTerm (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- MulOperator := '*' | '/' | 'DIV' | 'MOD' |
- 'REM' | 'AND' | '&'
+ MulOperator := '*' | '/' | 'DIV' | 'MOD' |
+ 'REM' | 'AND' | '&'
first symbols:ambersandtok, andtok, remtok, modtok, divtok, dividetok, timestok
-
+
cannot reachend
*/
static void MulOperator (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ConstFactor := Number | ConstString |
- ConstSetOrQualidentOrFunction |
- '(' ConstExpressionNop ')' |
- 'NOT' ConstFactor |
- ConstAttribute
+ ConstFactor := Number | ConstString |
+ ConstSetOrQualidentOrFunction |
+ '(' ConstExpressionNop ')' |
+ 'NOT' ConstFactor |
+ ConstAttribute
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok
-
+
cannot reachend
*/
static void ConstFactor (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ConstString := string
+ ConstString := string
first symbols:stringtok
-
+
cannot reachend
*/
static void ConstString (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ComponentElement := ConstExpressionNop [ '..' ConstExpressionNop ]
+ ComponentElement := ConstExpressionNop [ '..' ConstExpressionNop ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ComponentElement (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ComponentValue := ComponentElement [ 'BY' ConstExpressionNop ]
+ ComponentValue := ComponentElement [ 'BY' ConstExpressionNop ]
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void ComponentValue (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ArraySetRecordValue := ComponentValue { ',' ComponentValue }
+ ArraySetRecordValue := ComponentValue { ',' ComponentValue }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ArraySetRecordValue (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- Constructor := '{' [ ArraySetRecordValue ] '}'
+ Constructor := '{' [ ArraySetRecordValue ] '}'
first symbols:lcbratok
-
+
cannot reachend
*/
static void Constructor (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ConstSetOrQualidentOrFunction := Qualident [ Constructor |
- ConstActualParameters ] |
- Constructor
+ ConstSetOrQualidentOrFunction := Qualident [ Constructor |
+ ConstActualParameters ] |
+ Constructor
first symbols:lcbratok, identtok
-
+
cannot reachend
*/
static void ConstSetOrQualidentOrFunction (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ConstActualParameters := '(' [ ConstExpList ] ')'
+ ConstActualParameters := '(' [ ConstExpList ] ')'
first symbols:lparatok
-
+
cannot reachend
*/
static void ConstActualParameters (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ConstExpList := ConstExpressionNop { ',' ConstExpressionNop }
+ ConstExpList := ConstExpressionNop { ',' ConstExpressionNop }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ConstExpList (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' ConstAttributeExpression
- ')' ')'
+ ConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' ConstAttributeExpression
+ ')' ')'
first symbols:attributetok
-
+
cannot reachend
*/
static void ConstAttribute (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ConstAttributeExpression := Ident | '<' Qualident
- ',' Ident '>'
+ ConstAttributeExpression := Ident | '<' Qualident
+ ',' Ident '>'
first symbols:lesstok, identtok
-
+
cannot reachend
*/
static void ConstAttributeExpression (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ByteAlignment := ''
+ ByteAlignment := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
static void ByteAlignment (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- OptAlignmentExpression := [ AlignmentExpression ]
+ OptAlignmentExpression := [ AlignmentExpression ]
first symbols:lparatok
-
+
reachend
*/
static void OptAlignmentExpression (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- AlignmentExpression := '(' ConstExpressionNop ')'
+ AlignmentExpression := '(' ConstExpressionNop ')'
first symbols:lparatok
-
+
cannot reachend
*/
static void AlignmentExpression (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- Alignment := [ ByteAlignment ]
+ Alignment := [ ByteAlignment ]
first symbols:ldirectivetok
-
+
reachend
*/
static void Alignment (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- IdentList := Ident { ',' Ident }
+ IdentList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
static void IdentList (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- PushIdentList :=
+ PushIdentList :=
% VAR n: node ; %
-
+
% n := makeIdentList () %
- Ident
+ Ident
% checkDuplicate (putIdent (n, curident)) %
- { ',' Ident
+ { ',' Ident
% checkDuplicate (putIdent (n, curident)) %
- }
+ }
% n := push (n) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
static void PushIdentList (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- SubrangeType :=
+ SubrangeType :=
% VAR low, high: node ; d: CARDINAL ; %
- '['
+ '['
% d := depth () %
- ConstExpression
+ ConstExpression
% low := pop () %
-
+
% assert (d = depth ()) %
- '..' ConstExpression
+ '..' ConstExpression
% high := pop () %
-
+
% assert (d = depth ()) %
-
+
% typeExp := push (makeSubrange (low, high)) %
-
+
% assert (d = depth () - 1) %
- ']'
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
static void SubrangeType (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ArrayType := 'ARRAY'
+ ArrayType := 'ARRAY'
% VAR c: CARDINAL ; t, n: node ; %
-
+
% c := 0 %
- SimpleType
+ SimpleType
% INC (c) %
- { ',' SimpleType
+ { ',' SimpleType
% INC (c) %
- } 'OF' Type
+ } 'OF' Type
% n := push (makeIndexedArray (c, pop ())) %
-
+
first symbols:arraytok
-
+
cannot reachend
*/
static void ArrayType (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- RecordType := 'RECORD'
+ RecordType := 'RECORD'
% VAR n: node ; %
-
+
% n := push (makeRecord ()) %
-
+
% n := push (NIL) no varient %
- [ DefaultRecordAttributes ] FieldListSequence
-
+ [ DefaultRecordAttributes ] FieldListSequence
+
% assert (pop ()=NIL) %
- 'END'
+ 'END'
first symbols:recordtok
-
+
cannot reachend
*/
static void RecordType (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- DefaultRecordAttributes := ''
+ DefaultRecordAttributes := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
static void DefaultRecordAttributes (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- RecordFieldPragma := [ '' ]
+ RecordFieldPragma := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
static void RecordFieldPragma (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- FieldPragmaExpression := Ident PragmaConstExpression
+ FieldPragmaExpression := Ident PragmaConstExpression
first symbols:identtok
-
+
cannot reachend
*/
static void FieldPragmaExpression (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- PragmaConstExpression := [ '(' ConstExpressionNop
- ')' ]
+ PragmaConstExpression := [ '(' ConstExpressionNop
+ ')' ]
first symbols:lparatok
-
+
reachend
*/
static void PragmaConstExpression (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- AttributeExpression := Ident '(' ConstExpressionNop
- ')'
+ AttributeExpression := Ident '(' ConstExpressionNop
+ ')'
first symbols:identtok
-
+
cannot reachend
*/
static void AttributeExpression (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- FieldListSequence := FieldListStatement { ';' FieldListStatement }
+ FieldListSequence := FieldListStatement { ';' FieldListStatement }
first symbols:casetok, identtok, semicolontok
-
+
reachend
*/
static void FieldListSequence (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- FieldListStatement := [ FieldList ]
+ FieldListStatement := [ FieldList ]
first symbols:identtok, casetok
-
+
reachend
*/
static void FieldListStatement (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- FieldList :=
+ FieldList :=
% VAR r, i, f, t, n, v, w: node ; d: CARDINAL ; %
-
+
% d := depth () %
-
+
% v := pop () ; assert ((v=NIL) OR isVarient (v)) %
-
+
% r := peep () ; assert (isRecord (r) OR isVarientField (r)) %
-
+
% v := push (v) %
-
+
% assert (d=depth ()) %
-
+
% assert (((v=NIL) AND isRecord (r)) OR ((v#NIL) AND isVarientField (r))) %
- PushIdentList ':'
+ PushIdentList ':'
% assert (d=depth () - 1) %
-
+
% i := pop () %
- Type
+ Type
% assert (d=depth () - 1) %
-
+
% t := pop () %
- RecordFieldPragma
+ RecordFieldPragma
% assert (d=depth ()) %
-
+
% r := addFieldsToRecord (r, v, i, t) %
-
+
% assert (d=depth ()) %
- |
- 'CASE'
+ |
+ 'CASE'
% addRecordToList %
-
+
% d := depth () %
-
+
% v := pop () ; assert ((v=NIL) OR isVarient (v)) %
-
+
% r := peep () ; assert (isRecord (r) OR isVarientField (r)) %
-
+
% v := push (v) %
-
+
% assert (((v=NIL) AND isRecord (r)) OR ((v#NIL) AND isRecordField (r))) %
-
+
% w := push (makeVarient (r)) %
-
+
% assert (d = depth () - 1) %
-
+
% addVarientToList %
- CaseTag 'OF'
+ CaseTag 'OF'
% assert (d = depth () - 1) %
- Varient
+ Varient
% assert (d = depth () - 1) %
- { '|' Varient
+ { '|' Varient
% assert (d = depth () - 1) %
- }
+ }
% w := peep () ; assert (isVarient (w)) %
-
+
% assert (d = depth () - 1) %
- [ 'ELSE' FieldListSequence ] 'END'
-
+ [ 'ELSE' FieldListSequence ] 'END'
+
% w := pop () ; assert (isVarient (w)) %
-
+
% assert (d=depth ()) %
-
+
first symbols:casetok, identtok
-
+
cannot reachend
*/
static void FieldList (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- TagIdent := Ident |
+ TagIdent := Ident |
% curident := NulName %
-
+
first symbols:identtok
-
+
reachend
*/
static void TagIdent (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- CaseTag :=
+ CaseTag :=
% VAR tagident: Name ; q, v, w, r: node ; %
-
+
% w := pop () ; v := pop () ; r := peep () ; v := push (v) ; w := push (w) %
-
+
% assert (isVarient (w)) %
-
+
% assert ((v=NIL) OR isVarient (v)) %
-
+
% assert (isRecord (r) OR isVarientField (r)) %
-
+
% assert (isVarient (push (pop ()))) %
- TagIdent
+ TagIdent
% tagident := curident %
- ( ':' PushQualident
+ ( ':' PushQualident
% q := pop () %
-
+
% assert (isVarient (push (pop ()))) %
- |
+ |
% q := NIL %
- )
+ )
% buildVarientSelector (r, w, tagident, q) %
-
+
first symbols:colontok, identtok
-
+
reachend
*/
static void CaseTag (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- Varient :=
+ Varient :=
% VAR p, r, v, f: node ; d: CARDINAL ; %
-
+
% d := depth () %
-
+
% assert (isVarient (peep ())) %
- [
+ [
% v := pop () ; assert (isVarient (v)) %
-
+
% r := pop () %
-
+
% p := peep () %
-
+
% r := push (r) %
-
+
% f := push (buildVarientFieldRecord (v, p)) %
-
+
% v := push (v) %
- VarientCaseLabelList ':' FieldListSequence
-
+ VarientCaseLabelList ':' FieldListSequence
+
% v := pop () %
-
+
% f := pop () %
-
+
% assert (isVarientField (f)) %
-
+
% assert (isVarient (v)) %
-
+
% v := push (v) %
- ]
+ ]
% assert (isVarient (peep ())) %
-
+
% assert (d=depth ()) %
-
+
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
reachend
*/
static void Varient (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- VarientCaseLabelList := VarientCaseLabels { ','
- VarientCaseLabels }
+ VarientCaseLabelList := VarientCaseLabels { ','
+ VarientCaseLabels }
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void VarientCaseLabelList (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- VarientCaseLabels :=
+ VarientCaseLabels :=
% VAR l, h: node ; %
-
+
% h := NIL %
- ConstExpression
+ ConstExpression
% l := pop () %
- [ '..' ConstExpression
+ [ '..' ConstExpression
% h := pop () %
- ]
+ ]
% l, h could be saved if necessary. %
-
+
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void VarientCaseLabels (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- SetType := ( 'SET' | 'PACKEDSET' ) 'OF' SimpleType
-
+ SetType := ( 'SET' | 'PACKEDSET' ) 'OF' SimpleType
+
% VAR n: node ; %
-
+
% n := push (makeSet (pop ())) %
-
+
first symbols:oftok, packedsettok, settok
-
+
cannot reachend
*/
static void SetType (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- PointerType := 'POINTER' 'TO' Type
+ PointerType := 'POINTER' 'TO' Type
% VAR n: node ; %
-
+
% n := push (makePointer (pop ())) %
-
+
first symbols:pointertok
-
+
cannot reachend
*/
static void PointerType (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ProcedureType := 'PROCEDURE'
+ ProcedureType := 'PROCEDURE'
% curproc := push (makeProcType ()) %
- [ FormalTypeList ]
+ [ FormalTypeList ]
first symbols:proceduretok
-
+
cannot reachend
*/
static void ProcedureType (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- FormalTypeList := '(' ( ')' FormalReturn |
- ProcedureParameters ')'
- FormalReturn )
+ FormalTypeList := '(' ( ')' FormalReturn |
+ ProcedureParameters ')'
+ FormalReturn )
first symbols:lparatok
-
+
cannot reachend
*/
static void FormalTypeList (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- FormalReturn := [ ':' OptReturnType ]
+ FormalReturn := [ ':' OptReturnType ]
first symbols:colontok
-
+
reachend
*/
static void FormalReturn (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- OptReturnType := '[' PushQualident
+ OptReturnType := '[' PushQualident
% putReturnType (curproc, pop ()) %
-
+
% putOptReturn (curproc) %
- ']' | PushQualident
+ ']' | PushQualident
% putReturnType (curproc, pop ()) %
-
+
first symbols:identtok, lsbratok
-
+
cannot reachend
*/
static void OptReturnType (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ProcedureParameters := ProcedureParameter
+ ProcedureParameters := ProcedureParameter
% addParameter (curproc, pop ()) %
- { ',' ProcedureParameter
-
+ { ',' ProcedureParameter
+
% addParameter (curproc, pop ()) %
- }
+ }
first symbols:identtok, arraytok, periodperiodperiodtok, vartok
-
+
cannot reachend
*/
static void ProcedureParameters (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ProcedureParameter := '...'
+ ProcedureParameter := '...'
% VAR n: node ; %
-
+
% n := push (makeVarargs ()) %
- | 'VAR' FormalType
+ | 'VAR' FormalType
% n := push (makeVarParameter (NIL, pop (), curproc, TRUE)) %
- | FormalType
+ | FormalType
% n := push (makeNonVarParameter (NIL, pop (), curproc, TRUE)) %
-
+
first symbols:identtok, arraytok, vartok, periodperiodperiodtok
-
+
cannot reachend
*/
static void ProcedureParameter (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- VarIdent :=
+ VarIdent :=
% VAR n, a: node ; %
-
+
% n := pop () %
- Ident
+ Ident
% checkDuplicate (putIdent (n, curident)) %
-
+
% n := push (n) %
- [ '[' ConstExpression
+ [ '[' ConstExpression
% a := pop () could store, a, into, n. %
- ']' ]
+ ']' ]
first symbols:identtok
-
+
cannot reachend
*/
static void VarIdent (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- VarIdentList :=
+ VarIdentList :=
% VAR n: node ; %
-
+
% n := makeIdentList () %
-
+
% n := push (n) %
- VarIdent { ',' VarIdent }
+ VarIdent { ',' VarIdent }
first symbols:identtok
-
+
cannot reachend
*/
static void VarIdentList (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- VariableDeclaration :=
+ VariableDeclaration :=
% VAR v, d: node ; %
- VarIdentList
+ VarIdentList
% v := pop () %
- ':' Type
+ ':' Type
% d := makeVarDecl (v, pop ()) %
- Alignment
+ Alignment
first symbols:identtok
-
+
cannot reachend
*/
static void VariableDeclaration (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- Designator := Qualident { SubDesignator }
+ Designator := Qualident { SubDesignator }
first symbols:identtok
-
+
cannot reachend
*/
static void Designator (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- SubDesignator := '.' Ident | '[' ArrayExpList ']' |
- '^'
+ SubDesignator := '.' Ident | '[' ArrayExpList ']' |
+ '^'
first symbols:uparrowtok, lsbratok, periodtok
-
+
cannot reachend
*/
static void SubDesignator (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ArrayExpList := Expression { ',' Expression }
+ ArrayExpList := Expression { ',' Expression }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ArrayExpList (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ExpList := Expression { ',' Expression }
+ ExpList := Expression { ',' Expression }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ExpList (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- Expression := SimpleExpression [ Relation SimpleExpression ]
+ Expression := SimpleExpression [ Relation SimpleExpression ]
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void Expression (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- SimpleExpression := UnaryOrTerm { AddOperator Term }
+ SimpleExpression := UnaryOrTerm { AddOperator Term }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void SimpleExpression (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- UnaryOrTerm := '+' Term | '-' Term |
- Term
+ UnaryOrTerm := '+' Term | '-' Term |
+ Term
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void UnaryOrTerm (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- Term := Factor { MulOperator Factor }
+ Term := Factor { MulOperator Factor }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok
-
+
cannot reachend
*/
static void Term (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- Factor := Number | string | SetOrDesignatorOrFunction |
- '(' Expression ')' |
- 'NOT' ( Factor | ConstAttribute )
+ Factor := Number | string | SetOrDesignatorOrFunction |
+ '(' Expression ')' |
+ 'NOT' ( Factor | ConstAttribute )
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok
-
+
cannot reachend
*/
static void Factor (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- SetOrDesignatorOrFunction := Qualident [ Constructor |
- SimpleDes
- [ ActualParameters ] ] |
- Constructor
+ SetOrDesignatorOrFunction := Qualident [ Constructor |
+ SimpleDes
+ [ ActualParameters ] ] |
+ Constructor
first symbols:lcbratok, identtok
-
+
cannot reachend
*/
static void SetOrDesignatorOrFunction (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- SimpleDes := { SubDesignator }
+ SimpleDes := { SubDesignator }
first symbols:periodtok, lsbratok, uparrowtok
-
+
reachend
*/
static void SimpleDes (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ActualParameters := '(' [ ExpList ] ')'
+ ActualParameters := '(' [ ExpList ] ')'
first symbols:lparatok
-
+
cannot reachend
*/
static void ActualParameters (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ExitStatement := 'EXIT'
+ ExitStatement := 'EXIT'
first symbols:exittok
-
+
cannot reachend
*/
static void ExitStatement (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ReturnStatement := 'RETURN' [ Expression ]
+ ReturnStatement := 'RETURN' [ Expression ]
first symbols:returntok
-
+
cannot reachend
*/
static void ReturnStatement (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- Statement := [ AssignmentOrProcedureCall |
- IfStatement | CaseStatement |
- WhileStatement |
- RepeatStatement |
- LoopStatement | ForStatement |
- WithStatement | AsmStatement |
- ExitStatement | ReturnStatement |
- RetryStatement ]
+ Statement := [ AssignmentOrProcedureCall |
+ IfStatement | CaseStatement |
+ WhileStatement |
+ RepeatStatement |
+ LoopStatement | ForStatement |
+ WithStatement | AsmStatement |
+ ExitStatement | ReturnStatement |
+ RetryStatement ]
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok
-
+
reachend
*/
static void Statement (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- RetryStatement := 'RETRY'
+ RetryStatement := 'RETRY'
first symbols:retrytok
-
+
cannot reachend
*/
static void RetryStatement (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- AssignmentOrProcedureCall := Designator ( ':=' Expression |
- ActualParameters |
-
+ AssignmentOrProcedureCall := Designator ( ':=' Expression |
+ ActualParameters |
+
% epsilon %
- )
+ )
first symbols:identtok
-
+
cannot reachend
*/
static void AssignmentOrProcedureCall (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- StatementSequence := Statement { ';' Statement }
+ StatementSequence := Statement { ';' Statement }
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok
-
+
reachend
*/
static void StatementSequence (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- IfStatement := 'IF' Expression 'THEN' StatementSequence
- { 'ELSIF' Expression 'THEN' StatementSequence }
- [ 'ELSE' StatementSequence ] 'END'
+ IfStatement := 'IF' Expression 'THEN' StatementSequence
+ { 'ELSIF' Expression 'THEN' StatementSequence }
+ [ 'ELSE' StatementSequence ] 'END'
first symbols:iftok
-
+
cannot reachend
*/
static void IfStatement (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- CaseStatement := 'CASE' Expression 'OF' Case { '|'
- Case }
- CaseEndStatement
+ CaseStatement := 'CASE' Expression 'OF' Case { '|'
+ Case }
+ CaseEndStatement
first symbols:casetok
-
+
cannot reachend
*/
static void CaseStatement (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- CaseEndStatement := 'END' | 'ELSE' StatementSequence
- 'END'
+ CaseEndStatement := 'END' | 'ELSE' StatementSequence
+ 'END'
first symbols:elsetok, endtok
-
+
cannot reachend
*/
static void CaseEndStatement (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- Case := [ CaseLabelList ':' StatementSequence ]
+ Case := [ CaseLabelList ':' StatementSequence ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
reachend
*/
static void Case (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- CaseLabelList := CaseLabels { ',' CaseLabels }
+ CaseLabelList := CaseLabels { ',' CaseLabels }
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void CaseLabelList (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- CaseLabels := ConstExpressionNop [ '..' ConstExpressionNop ]
+ CaseLabels := ConstExpressionNop [ '..' ConstExpressionNop ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void CaseLabels (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- WhileStatement := 'WHILE' Expression 'DO' StatementSequence
- 'END'
+ WhileStatement := 'WHILE' Expression 'DO' StatementSequence
+ 'END'
first symbols:whiletok
-
+
cannot reachend
*/
static void WhileStatement (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- RepeatStatement := 'REPEAT' StatementSequence 'UNTIL'
- Expression
+ RepeatStatement := 'REPEAT' StatementSequence 'UNTIL'
+ Expression
first symbols:repeattok
-
+
cannot reachend
*/
static void RepeatStatement (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ForStatement := 'FOR' Ident ':=' Expression 'TO'
- Expression [ 'BY' ConstExpressionNop ]
- 'DO' StatementSequence 'END'
+ ForStatement := 'FOR' Ident ':=' Expression 'TO'
+ Expression [ 'BY' ConstExpressionNop ]
+ 'DO' StatementSequence 'END'
first symbols:fortok
-
+
cannot reachend
*/
static void ForStatement (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- LoopStatement := 'LOOP' StatementSequence 'END'
+ LoopStatement := 'LOOP' StatementSequence 'END'
first symbols:looptok
-
+
cannot reachend
*/
static void LoopStatement (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- WithStatement := 'WITH' Designator 'DO' StatementSequence
- 'END'
+ WithStatement := 'WITH' Designator 'DO' StatementSequence
+ 'END'
first symbols:withtok
-
+
cannot reachend
*/
static void WithStatement (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ProcedureDeclaration := ProcedureHeading ';' ProcedureBlock
- Ident
+ ProcedureDeclaration := ProcedureHeading ';' ProcedureBlock
+ Ident
% leaveScope %
-
+
first symbols:proceduretok
-
+
cannot reachend
*/
static void ProcedureDeclaration (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ProcedureIdent := Ident
+ ProcedureIdent := Ident
% curproc := lookupSym (curident) %
-
+
% enterScope (curproc) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
static void ProcedureIdent (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- DefProcedureIdent := Ident
+ DefProcedureIdent := Ident
% curproc := lookupSym (curident) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
static void DefProcedureIdent (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- DefineBuiltinProcedure := [ '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' Ident ')' ')' |
- '__INLINE__' ]
+ DefineBuiltinProcedure := [ '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' Ident ')' ')' |
+ '__INLINE__' ]
first symbols:inlinetok, attributetok
-
+
reachend
*/
static void DefineBuiltinProcedure (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ProcedureHeading := 'PROCEDURE' DefineBuiltinProcedure
- ( ProcedureIdent [ FormalParameters ]
- AttributeNoReturn )
+ ProcedureHeading := 'PROCEDURE' DefineBuiltinProcedure
+ ( ProcedureIdent [ FormalParameters ]
+ AttributeNoReturn )
first symbols:proceduretok
-
+
cannot reachend
*/
static void ProcedureHeading (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- Builtin := [ '__BUILTIN__' | '__INLINE__' ]
+ Builtin := [ '__BUILTIN__' | '__INLINE__' ]
first symbols:inlinetok, builtintok
-
+
reachend
*/
static void Builtin (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- DefProcedureHeading := 'PROCEDURE' Builtin ( DefProcedureIdent
- [ DefFormalParameters ]
- AttributeNoReturn )
+ DefProcedureHeading := 'PROCEDURE' Builtin ( DefProcedureIdent
+ [ DefFormalParameters ]
+ AttributeNoReturn )
first symbols:proceduretok
-
+
cannot reachend
*/
static void DefProcedureHeading (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ProcedureBlock := { Declaration } [ 'BEGIN' ProcedureBlockBody ]
- 'END'
+ ProcedureBlock := { Declaration } [ 'BEGIN' ProcedureBlockBody ]
+ 'END'
first symbols:proceduretok, moduletok, consttok, typetok, vartok, endtok, begintok
-
+
cannot reachend
*/
static void ProcedureBlock (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- Block := { Declaration } InitialBlock FinalBlock
- 'END'
+ Block := { Declaration } InitialBlock FinalBlock
+ 'END'
first symbols:proceduretok, moduletok, finallytok, begintok, consttok, typetok, vartok, endtok
-
+
cannot reachend
*/
static void Block (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- InitialBlock := [ 'BEGIN' InitialBlockBody ]
+ InitialBlock := [ 'BEGIN' InitialBlockBody ]
first symbols:begintok
-
+
reachend
*/
static void InitialBlock (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- FinalBlock := [ 'FINALLY' FinalBlockBody ]
+ FinalBlock := [ 'FINALLY' FinalBlockBody ]
first symbols:finallytok
-
+
reachend
*/
static void FinalBlock (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- InitialBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ InitialBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
static void InitialBlockBody (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- FinalBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ FinalBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
static void FinalBlockBody (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ProcedureBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ ProcedureBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
static void ProcedureBlockBody (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- NormalPart := StatementSequence
+ NormalPart := StatementSequence
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok, semicolontok
-
+
reachend
*/
static void NormalPart (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ExceptionalPart := StatementSequence
+ ExceptionalPart := StatementSequence
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok, semicolontok
-
+
reachend
*/
static void ExceptionalPart (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- Declaration := 'CONST' { ConstantDeclaration ';' } |
- 'TYPE' { TypeDeclaration } |
- 'VAR' { VariableDeclaration ';' } |
- ProcedureDeclaration ';' |
- ModuleDeclaration ';'
+ Declaration := 'CONST' { ConstantDeclaration ';' } |
+ 'TYPE' { TypeDeclaration } |
+ 'VAR' { VariableDeclaration ';' } |
+ ProcedureDeclaration ';' |
+ ModuleDeclaration ';'
first symbols:moduletok, proceduretok, vartok, typetok, consttok
-
+
cannot reachend
*/
static void Declaration (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- DefFormalParameters := '('
+ DefFormalParameters := '('
% paramEnter (curproc) %
- [ DefMultiFPSection ] ')'
-
+ [ DefMultiFPSection ] ')'
+
% paramLeave (curproc) %
- FormalReturn
+ FormalReturn
first symbols:lparatok
-
+
cannot reachend
*/
static void DefFormalParameters (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- DefMultiFPSection := DefExtendedFP |
- FPSection [ ';' DefMultiFPSection ]
+ DefMultiFPSection := DefExtendedFP |
+ FPSection [ ';' DefMultiFPSection ]
first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
static void DefMultiFPSection (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- FormalParameters := '('
+ FormalParameters := '('
% paramEnter (curproc) %
- [ MultiFPSection ] ')'
+ [ MultiFPSection ] ')'
% paramLeave (curproc) %
- FormalReturn
+ FormalReturn
first symbols:lparatok
-
+
cannot reachend
*/
static void FormalParameters (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- AttributeNoReturn := [ NoReturn |
+ AttributeNoReturn := [ NoReturn |
% setNoReturn (curproc, FALSE) %
- ]
+ ]
first symbols:ldirectivetok
-
+
reachend
*/
static void AttributeNoReturn (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- NoReturn := ''
+ NoReturn := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
static void NoReturn (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- AttributeUnused := [ Unused ]
+ AttributeUnused := [ Unused ]
first symbols:ldirectivetok
-
+
reachend
*/
static void AttributeUnused (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- Unused := ''
+ Unused := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
static void Unused (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- MultiFPSection := ExtendedFP | FPSection [ ';'
- MultiFPSection ]
+ MultiFPSection := ExtendedFP | FPSection [ ';'
+ MultiFPSection ]
first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
static void MultiFPSection (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- FPSection := NonVarFPSection |
- VarFPSection
+ FPSection := NonVarFPSection |
+ VarFPSection
first symbols:vartok, identtok
-
+
cannot reachend
*/
static void FPSection (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- DefExtendedFP := DefOptArg | '...'
+ DefExtendedFP := DefOptArg | '...'
% addParameter (curproc, makeVarargs ()) %
-
+
first symbols:lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
static void DefExtendedFP (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ExtendedFP := OptArg | '...'
+ ExtendedFP := OptArg | '...'
first symbols:lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
static void ExtendedFP (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- VarFPSection := 'VAR' PushIdentList
+ VarFPSection := 'VAR' PushIdentList
% VAR l, t: node ; %
- ':' FormalType
+ ':' FormalType
% t := pop () %
-
+
% l := pop () %
-
+
% curisused := TRUE %
- [ AttributeUnused ]
+ [ AttributeUnused ]
% addVarParameters (curproc, l, t, curisused) %
-
+
first symbols:vartok
-
+
cannot reachend
*/
static void VarFPSection (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- NonVarFPSection := PushIdentList
+ NonVarFPSection := PushIdentList
% VAR l, t: node ; %
- ':' FormalType
+ ':' FormalType
% t := pop () %
-
+
% l := pop () %
-
+
% curisused := TRUE %
- [ AttributeUnused ]
+ [ AttributeUnused ]
% addNonVarParameters (curproc, l, t, curisused) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
static void NonVarFPSection (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- OptArg :=
+ OptArg :=
% VAR p, init, type: node ; id: Name ; %
- '[' Ident
+ '[' Ident
% id := curident %
- ':' FormalType
+ ':' FormalType
% type := pop () %
-
+
% init := NIL %
- [ '=' ConstExpression
+ [ '=' ConstExpression
% init := pop () %
- ] ']'
+ ] ']'
% p := addOptParameter (curproc, id, type, init) %
-
+
first symbols:lsbratok
-
+
cannot reachend
*/
static void OptArg (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- DefOptArg :=
+ DefOptArg :=
% VAR p, init, type: node ; id: Name ; %
- '[' Ident
+ '[' Ident
% id := curident %
- ':' FormalType
+ ':' FormalType
% type := pop () %
- '=' ConstExpression
+ '=' ConstExpression
% init := pop () %
- ']'
+ ']'
% p := addOptParameter (curproc, id, type, init) %
-
+
first symbols:lsbratok
-
+
cannot reachend
*/
static void DefOptArg (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- FormalType :=
+ FormalType :=
% VAR c: CARDINAL ; %
-
+
% VAR n, a, s: node ; %
-
+
% c := 0 %
- { 'ARRAY' 'OF'
+ { 'ARRAY' 'OF'
% INC (c) %
- } PushQualident
+ } PushQualident
% pushNunbounded (c) %
-
+
first symbols:identtok, arraytok
-
+
cannot reachend
*/
static void FormalType (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ModuleDeclaration := 'MODULE' Ident [ Priority ]
- ';' { Import } [ Export ]
- Block Ident
+ ModuleDeclaration := 'MODULE' Ident [ Priority ]
+ ';' { Import } [ Export ]
+ Block Ident
first symbols:moduletok
-
+
cannot reachend
*/
static void ModuleDeclaration (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- Priority := '[' ConstExpressionNop ']'
+ Priority := '[' ConstExpressionNop ']'
first symbols:lsbratok
-
+
cannot reachend
*/
static void Priority (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- Export := 'EXPORT' ( 'QUALIFIED' IdentList |
- 'UNQUALIFIED' IdentList |
- IdentList ) ';'
+ Export := 'EXPORT' ( 'QUALIFIED' IdentList |
+ 'UNQUALIFIED' IdentList |
+ IdentList ) ';'
first symbols:exporttok
-
+
cannot reachend
*/
static void Export (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- FromIdentList := Ident
+ FromIdentList := Ident
% importInto (frommodule, curident, curmodule) %
- { ',' Ident
+ { ',' Ident
% importInto (frommodule, curident, curmodule) %
- }
+ }
first symbols:identtok
-
+
cannot reachend
*/
static void FromIdentList (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- FromImport := 'FROM' Ident
+ FromImport := 'FROM' Ident
% frommodule := lookupDef (curident) %
- 'IMPORT' FromIdentList ';'
+ 'IMPORT' FromIdentList ';'
first symbols:fromtok
-
+
cannot reachend
*/
static void FromImport (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- ImportModuleList := Ident { ',' Ident }
+ ImportModuleList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
static void ImportModuleList (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- WithoutFromImport := 'IMPORT' ImportModuleList ';'
+ WithoutFromImport := 'IMPORT' ImportModuleList ';'
first symbols:importtok
-
+
cannot reachend
*/
static void WithoutFromImport (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- Import := FromImport | WithoutFromImport
+ Import := FromImport | WithoutFromImport
first symbols:importtok, fromtok
-
+
cannot reachend
*/
static void Import (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- DefinitionModule := 'DEFINITION' 'MODULE' [ 'FOR'
- string ]
- Ident ';'
+ DefinitionModule := 'DEFINITION' 'MODULE' [ 'FOR'
+ string ]
+ Ident ';'
% curmodule := lookupDef (curident) %
-
+
% enterScope (curmodule) %
-
+
% resetEnumPos (curmodule) %
- { Import } [ Export ] { Definition }
- 'END' Ident '.'
+ { Import } [ Export ] { Definition }
+ 'END' Ident '.'
% checkEndName (curmodule, curident, 'definition module') %
-
+
% setConstExpComplete (curmodule) %
-
+
% leaveScope %
-
+
first symbols:definitiontok
-
+
cannot reachend
*/
static void DefinitionModule (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- PushQualident := Ident
+ PushQualident := Ident
% typeExp := push (lookupSym (curident)) %
-
+
% IF typeExp = NIL
THEN
metaError1 ('the symbol {%1k} is not visible in this scope (or any other nested scope)', curident)
END %
- [ '.'
+ [ '.'
% IF NOT isDef (typeExp)
THEN
ErrorArray ('the first component of this qualident must be a definition module')
END %
- Ident
+ Ident
% typeExp := replace (lookupInScope (typeExp, curident)) ;
IF typeExp=NIL
THEN
ErrorArray ('identifier not found in definition module')
END %
- ]
+ ]
first symbols:identtok
-
+
cannot reachend
*/
static void PushQualident (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- OptSubrange := [ SubrangeType
+ OptSubrange := [ SubrangeType
% VAR q, s: node ; %
-
+
% s := pop () %
-
+
% q := pop () %
-
+
% putSubrangeType (s, q) %
-
+
% typeExp := push (s) %
- ]
+ ]
first symbols:lsbratok
-
+
reachend
*/
static void OptSubrange (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- TypeEquiv := PushQualident OptSubrange
+ TypeEquiv := PushQualident OptSubrange
first symbols:identtok
-
+
cannot reachend
*/
static void TypeEquiv (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- EnumIdentList :=
+ EnumIdentList :=
% VAR f: node ; %
-
+
% typeExp := push (makeEnum ()) %
- Ident
+ Ident
% f := makeEnumField (typeExp, curident) %
- { ',' Ident
+ { ',' Ident
% f := makeEnumField (typeExp, curident) %
- }
+ }
first symbols:identtok
-
+
cannot reachend
*/
static void EnumIdentList (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- Enumeration := '(' EnumIdentList ')'
+ Enumeration := '(' EnumIdentList ')'
first symbols:lparatok
-
+
cannot reachend
*/
static void Enumeration (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- SimpleType :=
+ SimpleType :=
% VAR d: CARDINAL ; %
-
+
% d := depth () %
- ( TypeEquiv | Enumeration |
- SubrangeType )
+ ( TypeEquiv | Enumeration |
+ SubrangeType )
% assert (d = depth () - 1) %
-
+
first symbols:lsbratok, lparatok, identtok
-
+
cannot reachend
*/
static void SimpleType (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- Type := SimpleType | ArrayType | RecordType |
- SetType | PointerType | ProcedureType
+ Type := SimpleType | ArrayType | RecordType |
+ SetType | PointerType | ProcedureType
first symbols:proceduretok, pointertok, settok, packedsettok, oftok, recordtok, arraytok, identtok, lparatok, lsbratok
-
+
cannot reachend
*/
static void Type (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- TypeDeclaration := { Ident
+ TypeDeclaration := { Ident
% typeDes := lookupSym (curident) %
- ( ';' | '=' Type
+ ( ';' | '=' Type
% putType (typeDes, pop ()) %
- Alignment ';' ) }
+ Alignment ';' ) }
first symbols:identtok
-
+
reachend
*/
static void TypeDeclaration (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- Definition := 'CONST' { ConstantDeclaration ';' } |
- 'TYPE' { TypeDeclaration } |
- 'VAR' { VariableDeclaration ';' } |
- DefProcedureHeading ';'
+ Definition := 'CONST' { ConstantDeclaration ';' } |
+ 'TYPE' { TypeDeclaration } |
+ 'VAR' { VariableDeclaration ';' } |
+ DefProcedureHeading ';'
first symbols:proceduretok, vartok, typetok, consttok
-
+
cannot reachend
*/
static void Definition (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- AsmStatement := 'ASM' [ 'VOLATILE' ] '(' AsmOperands
- ')'
+ AsmStatement := 'ASM' [ 'VOLATILE' ] '(' AsmOperands
+ ')'
first symbols:asmtok
-
+
cannot reachend
*/
static void AsmStatement (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- AsmOperands := string [ AsmOperandSpec ]
+ AsmOperands := string [ AsmOperandSpec ]
first symbols:stringtok
-
+
cannot reachend
*/
static void AsmOperands (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- AsmOperandSpec := [ ':' AsmList [ ':' AsmList [
- ':' TrashList ] ] ]
+ AsmOperandSpec := [ ':' AsmList [ ':' AsmList [
+ ':' TrashList ] ] ]
first symbols:colontok
-
+
reachend
*/
static void AsmOperandSpec (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- AsmList := [ AsmElement ] { ',' AsmElement }
+ AsmList := [ AsmElement ] { ',' AsmElement }
first symbols:lsbratok, stringtok, commatok
-
+
reachend
*/
static void AsmList (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- NamedOperand := '[' Ident ']'
+ NamedOperand := '[' Ident ']'
first symbols:lsbratok
-
+
cannot reachend
*/
static void NamedOperand (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- AsmOperandName := [ NamedOperand ]
+ AsmOperandName := [ NamedOperand ]
first symbols:lsbratok
-
+
reachend
*/
static void AsmOperandName (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- AsmElement := AsmOperandName string '(' Expression
- ')'
+ AsmElement := AsmOperandName string '(' Expression
+ ')'
first symbols:stringtok, lsbratok
-
+
cannot reachend
*/
static void AsmElement (mcp3_SetOfStop0 stopset0, mcp3_SetOfStop1 stopset1, mcp3_SetOfStop2 stopset2);
/*
- TrashList := [ string ] { ',' string }
+ TrashList := [ string ] { ',' string }
first symbols:commatok, stringtok
-
+
reachend
*/
{
mcPrintf_printf0 ((const char *) "\\nskipping token *** ", 21);
}
- /*
+ /*
yes the ORD(currenttoken) looks ugly, but it is *much* safer than
using currenttoken<sometok as a change to the ordering of the
token declarations below would cause this to break. Using ORD() we are
/*
- FileUnit := DefinitionModule |
- ImplementationOrProgramModule
+ FileUnit := DefinitionModule |
+ ImplementationOrProgramModule
first symbols:implementationtok, moduletok, definitiontok
-
+
cannot reachend
*/
/*
- ProgramModule := 'MODULE' Ident
+ ProgramModule := 'MODULE' Ident
% curmodule := lookupModule (curident) %
-
+
% enterScope (curmodule) %
-
+
% resetEnumPos (curmodule) %
- [ Priority ] ';' { Import } Block
- Ident
+ [ Priority ] ';' { Import } Block
+ Ident
% checkEndName (curmodule, curident, 'program module') %
-
+
% setConstExpComplete (curmodule) %
-
+
% leaveScope %
- '.'
+ '.'
first symbols:moduletok
-
+
cannot reachend
*/
/*
- ImplementationModule := 'IMPLEMENTATION' 'MODULE'
- Ident
+ ImplementationModule := 'IMPLEMENTATION' 'MODULE'
+ Ident
% curmodule := lookupImp (curident) %
-
+
% enterScope (lookupDef (curident)) %
-
+
% enterScope (curmodule) %
-
+
% resetEnumPos (curmodule) %
- [ Priority ] ';' { Import }
- Block Ident
+ [ Priority ] ';' { Import }
+ Block Ident
% checkEndName (curmodule, curident, 'implementation module') %
-
+
% setConstExpComplete (curmodule) %
-
+
% leaveScope ; leaveScope %
- '.'
+ '.'
first symbols:implementationtok
-
+
cannot reachend
*/
/*
- ImplementationOrProgramModule := ImplementationModule |
- ProgramModule
+ ImplementationOrProgramModule := ImplementationModule |
+ ProgramModule
first symbols:moduletok, implementationtok
-
+
cannot reachend
*/
/*
- Number := Integer | Real
+ Number := Integer | Real
first symbols:realtok, integertok
-
+
cannot reachend
*/
/*
- Qualident := Ident { '.' Ident }
+ Qualident := Ident { '.' Ident }
first symbols:identtok
-
+
cannot reachend
*/
/*
- ConstantDeclaration :=
+ ConstantDeclaration :=
% VAR d, e: node ; %
- Ident
+ Ident
% d := lookupSym (curident) %
- '=' ConstExpression
+ '=' ConstExpression
% e := pop () %
-
+
% assert (isConst (d)) %
-
+
% putConst (d, e) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
/*
- ConstExpressionNop := SimpleConstExpr
+ ConstExpressionNop := SimpleConstExpr
% VAR n: node ; %
- [ Relation SimpleConstExpr ]
-
+ [ Relation SimpleConstExpr ]
+
% n := makeConstExp () %
-
+
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- ConstExpression :=
+ ConstExpression :=
% VAR n: node ; %
-
+
% n := push (makeConstExp ()) %
- SimpleConstExpr [ Relation SimpleConstExpr ]
+ SimpleConstExpr [ Relation SimpleConstExpr ]
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- Relation := '=' | '#' | '<>' | '<' | '<=' |
- '>' | '>=' | 'IN'
+ Relation := '=' | '#' | '<>' | '<' | '<=' |
+ '>' | '>=' | 'IN'
first symbols:intok, greaterequaltok, greatertok, lessequaltok, lesstok, lessgreatertok, hashtok, equaltok
-
+
cannot reachend
*/
/*
- SimpleConstExpr := UnaryOrConstTerm { AddOperator
- ConstTerm }
+ SimpleConstExpr := UnaryOrConstTerm { AddOperator
+ ConstTerm }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- UnaryOrConstTerm := '+' ConstTerm |
- '-' ConstTerm |
- ConstTerm
+ UnaryOrConstTerm := '+' ConstTerm |
+ '-' ConstTerm |
+ ConstTerm
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- AddOperator := '+' | '-' | 'OR'
+ AddOperator := '+' | '-' | 'OR'
first symbols:ortok, minustok, plustok
-
+
cannot reachend
*/
/*
- ConstTerm := ConstFactor { MulOperator ConstFactor }
+ ConstTerm := ConstFactor { MulOperator ConstFactor }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok
-
+
cannot reachend
*/
/*
- MulOperator := '*' | '/' | 'DIV' | 'MOD' |
- 'REM' | 'AND' | '&'
+ MulOperator := '*' | '/' | 'DIV' | 'MOD' |
+ 'REM' | 'AND' | '&'
first symbols:ambersandtok, andtok, remtok, modtok, divtok, dividetok, timestok
-
+
cannot reachend
*/
/*
- ConstFactor := Number | ConstString |
- ConstSetOrQualidentOrFunction |
- '(' ConstExpressionNop ')' |
- 'NOT' ConstFactor |
- ConstAttribute
+ ConstFactor := Number | ConstString |
+ ConstSetOrQualidentOrFunction |
+ '(' ConstExpressionNop ')' |
+ 'NOT' ConstFactor |
+ ConstAttribute
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok
-
+
cannot reachend
*/
/*
- ConstString := string
+ ConstString := string
first symbols:stringtok
-
+
cannot reachend
*/
/*
- ComponentElement := ConstExpressionNop [ '..' ConstExpressionNop ]
+ ComponentElement := ConstExpressionNop [ '..' ConstExpressionNop ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- ComponentValue := ComponentElement [ 'BY' ConstExpressionNop ]
+ ComponentValue := ComponentElement [ 'BY' ConstExpressionNop ]
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- ArraySetRecordValue := ComponentValue { ',' ComponentValue }
+ ArraySetRecordValue := ComponentValue { ',' ComponentValue }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- Constructor := '{' [ ArraySetRecordValue ] '}'
+ Constructor := '{' [ ArraySetRecordValue ] '}'
first symbols:lcbratok
-
+
cannot reachend
*/
/*
- ConstSetOrQualidentOrFunction := Qualident [ Constructor |
- ConstActualParameters ] |
- Constructor
+ ConstSetOrQualidentOrFunction := Qualident [ Constructor |
+ ConstActualParameters ] |
+ Constructor
first symbols:lcbratok, identtok
-
+
cannot reachend
*/
/*
- ConstActualParameters := '(' [ ConstExpList ] ')'
+ ConstActualParameters := '(' [ ConstExpList ] ')'
first symbols:lparatok
-
+
cannot reachend
*/
/*
- ConstExpList := ConstExpressionNop { ',' ConstExpressionNop }
+ ConstExpList := ConstExpressionNop { ',' ConstExpressionNop }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- ConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' ConstAttributeExpression
- ')' ')'
+ ConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' ConstAttributeExpression
+ ')' ')'
first symbols:attributetok
-
+
cannot reachend
*/
/*
- ConstAttributeExpression := Ident | '<' Qualident
- ',' Ident '>'
+ ConstAttributeExpression := Ident | '<' Qualident
+ ',' Ident '>'
first symbols:lesstok, identtok
-
+
cannot reachend
*/
/*
- ByteAlignment := ''
+ ByteAlignment := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
/*
- OptAlignmentExpression := [ AlignmentExpression ]
+ OptAlignmentExpression := [ AlignmentExpression ]
first symbols:lparatok
-
+
reachend
*/
/*
- AlignmentExpression := '(' ConstExpressionNop ')'
+ AlignmentExpression := '(' ConstExpressionNop ')'
first symbols:lparatok
-
+
cannot reachend
*/
/*
- Alignment := [ ByteAlignment ]
+ Alignment := [ ByteAlignment ]
first symbols:ldirectivetok
-
+
reachend
*/
/*
- IdentList := Ident { ',' Ident }
+ IdentList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
/*
- PushIdentList :=
+ PushIdentList :=
% VAR n: node ; %
-
+
% n := makeIdentList () %
- Ident
+ Ident
% checkDuplicate (putIdent (n, curident)) %
- { ',' Ident
+ { ',' Ident
% checkDuplicate (putIdent (n, curident)) %
- }
+ }
% n := push (n) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
/*
- SubrangeType :=
+ SubrangeType :=
% VAR low, high: node ; d: CARDINAL ; %
- '['
+ '['
% d := depth () %
- ConstExpression
+ ConstExpression
% low := pop () %
-
+
% assert (d = depth ()) %
- '..' ConstExpression
+ '..' ConstExpression
% high := pop () %
-
+
% assert (d = depth ()) %
-
+
% typeExp := push (makeSubrange (low, high)) %
-
+
% assert (d = depth () - 1) %
- ']'
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- ArrayType := 'ARRAY'
+ ArrayType := 'ARRAY'
% VAR c: CARDINAL ; t, n: node ; %
-
+
% c := 0 %
- SimpleType
+ SimpleType
% INC (c) %
- { ',' SimpleType
+ { ',' SimpleType
% INC (c) %
- } 'OF' Type
+ } 'OF' Type
% n := push (makeIndexedArray (c, pop ())) %
-
+
first symbols:arraytok
-
+
cannot reachend
*/
/*
- RecordType := 'RECORD'
+ RecordType := 'RECORD'
% VAR n: node ; %
-
+
% n := push (makeRecord ()) %
-
+
% n := push (NIL) no varient %
- [ DefaultRecordAttributes ] FieldListSequence
-
+ [ DefaultRecordAttributes ] FieldListSequence
+
% assert (pop ()=NIL) %
- 'END'
+ 'END'
first symbols:recordtok
-
+
cannot reachend
*/
/*
- DefaultRecordAttributes := ''
+ DefaultRecordAttributes := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
/*
- RecordFieldPragma := [ '' ]
+ RecordFieldPragma := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
/*
- FieldPragmaExpression := Ident PragmaConstExpression
+ FieldPragmaExpression := Ident PragmaConstExpression
first symbols:identtok
-
+
cannot reachend
*/
/*
- PragmaConstExpression := [ '(' ConstExpressionNop
- ')' ]
+ PragmaConstExpression := [ '(' ConstExpressionNop
+ ')' ]
first symbols:lparatok
-
+
reachend
*/
/*
- AttributeExpression := Ident '(' ConstExpressionNop
- ')'
+ AttributeExpression := Ident '(' ConstExpressionNop
+ ')'
first symbols:identtok
-
+
cannot reachend
*/
/*
- FieldListSequence := FieldListStatement { ';' FieldListStatement }
+ FieldListSequence := FieldListStatement { ';' FieldListStatement }
first symbols:casetok, identtok, semicolontok
-
+
reachend
*/
/*
- FieldListStatement := [ FieldList ]
+ FieldListStatement := [ FieldList ]
first symbols:identtok, casetok
-
+
reachend
*/
/*
- FieldList :=
+ FieldList :=
% VAR r, i, f, t, n, v, w: node ; d: CARDINAL ; %
-
+
% d := depth () %
-
+
% v := pop () ; assert ((v=NIL) OR isVarient (v)) %
-
+
% r := peep () ; assert (isRecord (r) OR isVarientField (r)) %
-
+
% v := push (v) %
-
+
% assert (d=depth ()) %
-
+
% assert (((v=NIL) AND isRecord (r)) OR ((v#NIL) AND isVarientField (r))) %
- PushIdentList ':'
+ PushIdentList ':'
% assert (d=depth () - 1) %
-
+
% i := pop () %
- Type
+ Type
% assert (d=depth () - 1) %
-
+
% t := pop () %
- RecordFieldPragma
+ RecordFieldPragma
% assert (d=depth ()) %
-
+
% r := addFieldsToRecord (r, v, i, t) %
-
+
% assert (d=depth ()) %
- |
- 'CASE'
+ |
+ 'CASE'
% addRecordToList %
-
+
% d := depth () %
-
+
% v := pop () ; assert ((v=NIL) OR isVarient (v)) %
-
+
% r := peep () ; assert (isRecord (r) OR isVarientField (r)) %
-
+
% v := push (v) %
-
+
% assert (((v=NIL) AND isRecord (r)) OR ((v#NIL) AND isRecordField (r))) %
-
+
% w := push (makeVarient (r)) %
-
+
% assert (d = depth () - 1) %
-
+
% addVarientToList %
- CaseTag 'OF'
+ CaseTag 'OF'
% assert (d = depth () - 1) %
- Varient
+ Varient
% assert (d = depth () - 1) %
- { '|' Varient
+ { '|' Varient
% assert (d = depth () - 1) %
- }
+ }
% w := peep () ; assert (isVarient (w)) %
-
+
% assert (d = depth () - 1) %
- [ 'ELSE' FieldListSequence ] 'END'
-
+ [ 'ELSE' FieldListSequence ] 'END'
+
% w := pop () ; assert (isVarient (w)) %
-
+
% assert (d=depth ()) %
-
+
first symbols:casetok, identtok
-
+
cannot reachend
*/
/*
- TagIdent := Ident |
+ TagIdent := Ident |
% curident := NulName %
-
+
first symbols:identtok
-
+
reachend
*/
/*
- CaseTag :=
+ CaseTag :=
% VAR tagident: Name ; q, v, w, r: node ; %
-
+
% w := pop () ; v := pop () ; r := peep () ; v := push (v) ; w := push (w) %
-
+
% assert (isVarient (w)) %
-
+
% assert ((v=NIL) OR isVarient (v)) %
-
+
% assert (isRecord (r) OR isVarientField (r)) %
-
+
% assert (isVarient (push (pop ()))) %
- TagIdent
+ TagIdent
% tagident := curident %
- ( ':' PushQualident
+ ( ':' PushQualident
% q := pop () %
-
+
% assert (isVarient (push (pop ()))) %
- |
+ |
% q := NIL %
- )
+ )
% buildVarientSelector (r, w, tagident, q) %
-
+
first symbols:colontok, identtok
-
+
reachend
*/
/*
- Varient :=
+ Varient :=
% VAR p, r, v, f: node ; d: CARDINAL ; %
-
+
% d := depth () %
-
+
% assert (isVarient (peep ())) %
- [
+ [
% v := pop () ; assert (isVarient (v)) %
-
+
% r := pop () %
-
+
% p := peep () %
-
+
% r := push (r) %
-
+
% f := push (buildVarientFieldRecord (v, p)) %
-
+
% v := push (v) %
- VarientCaseLabelList ':' FieldListSequence
-
+ VarientCaseLabelList ':' FieldListSequence
+
% v := pop () %
-
+
% f := pop () %
-
+
% assert (isVarientField (f)) %
-
+
% assert (isVarient (v)) %
-
+
% v := push (v) %
- ]
+ ]
% assert (isVarient (peep ())) %
-
+
% assert (d=depth ()) %
-
+
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
reachend
*/
/*
- VarientCaseLabelList := VarientCaseLabels { ','
- VarientCaseLabels }
+ VarientCaseLabelList := VarientCaseLabels { ','
+ VarientCaseLabels }
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- VarientCaseLabels :=
+ VarientCaseLabels :=
% VAR l, h: node ; %
-
+
% h := NIL %
- ConstExpression
+ ConstExpression
% l := pop () %
- [ '..' ConstExpression
+ [ '..' ConstExpression
% h := pop () %
- ]
+ ]
% l, h could be saved if necessary. %
-
+
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- SetType := ( 'SET' | 'PACKEDSET' ) 'OF' SimpleType
-
+ SetType := ( 'SET' | 'PACKEDSET' ) 'OF' SimpleType
+
% VAR n: node ; %
-
+
% n := push (makeSet (pop ())) %
-
+
first symbols:oftok, packedsettok, settok
-
+
cannot reachend
*/
/*
- PointerType := 'POINTER' 'TO' Type
+ PointerType := 'POINTER' 'TO' Type
% VAR n: node ; %
-
+
% n := push (makePointer (pop ())) %
-
+
first symbols:pointertok
-
+
cannot reachend
*/
/*
- ProcedureType := 'PROCEDURE'
+ ProcedureType := 'PROCEDURE'
% curproc := push (makeProcType ()) %
- [ FormalTypeList ]
+ [ FormalTypeList ]
first symbols:proceduretok
-
+
cannot reachend
*/
/*
- FormalTypeList := '(' ( ')' FormalReturn |
- ProcedureParameters ')'
- FormalReturn )
+ FormalTypeList := '(' ( ')' FormalReturn |
+ ProcedureParameters ')'
+ FormalReturn )
first symbols:lparatok
-
+
cannot reachend
*/
/*
- FormalReturn := [ ':' OptReturnType ]
+ FormalReturn := [ ':' OptReturnType ]
first symbols:colontok
-
+
reachend
*/
/*
- OptReturnType := '[' PushQualident
+ OptReturnType := '[' PushQualident
% putReturnType (curproc, pop ()) %
-
+
% putOptReturn (curproc) %
- ']' | PushQualident
+ ']' | PushQualident
% putReturnType (curproc, pop ()) %
-
+
first symbols:identtok, lsbratok
-
+
cannot reachend
*/
/*
- ProcedureParameters := ProcedureParameter
+ ProcedureParameters := ProcedureParameter
% addParameter (curproc, pop ()) %
- { ',' ProcedureParameter
-
+ { ',' ProcedureParameter
+
% addParameter (curproc, pop ()) %
- }
+ }
first symbols:identtok, arraytok, periodperiodperiodtok, vartok
-
+
cannot reachend
*/
/*
- ProcedureParameter := '...'
+ ProcedureParameter := '...'
% VAR n: node ; %
-
+
% n := push (makeVarargs ()) %
- | 'VAR' FormalType
+ | 'VAR' FormalType
% n := push (makeVarParameter (NIL, pop (), curproc, TRUE)) %
- | FormalType
+ | FormalType
% n := push (makeNonVarParameter (NIL, pop (), curproc, TRUE)) %
-
+
first symbols:identtok, arraytok, vartok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- VarIdent :=
+ VarIdent :=
% VAR n, a: node ; %
-
+
% n := pop () %
- Ident
+ Ident
% checkDuplicate (putIdent (n, curident)) %
-
+
% n := push (n) %
- [ '[' ConstExpression
+ [ '[' ConstExpression
% a := pop () could store, a, into, n. %
- ']' ]
+ ']' ]
first symbols:identtok
-
+
cannot reachend
*/
/*
- VarIdentList :=
+ VarIdentList :=
% VAR n: node ; %
-
+
% n := makeIdentList () %
-
+
% n := push (n) %
- VarIdent { ',' VarIdent }
+ VarIdent { ',' VarIdent }
first symbols:identtok
-
+
cannot reachend
*/
/*
- VariableDeclaration :=
+ VariableDeclaration :=
% VAR v, d: node ; %
- VarIdentList
+ VarIdentList
% v := pop () %
- ':' Type
+ ':' Type
% d := makeVarDecl (v, pop ()) %
- Alignment
+ Alignment
first symbols:identtok
-
+
cannot reachend
*/
/*
- Designator := Qualident { SubDesignator }
+ Designator := Qualident { SubDesignator }
first symbols:identtok
-
+
cannot reachend
*/
/*
- SubDesignator := '.' Ident | '[' ArrayExpList ']' |
- '^'
+ SubDesignator := '.' Ident | '[' ArrayExpList ']' |
+ '^'
first symbols:uparrowtok, lsbratok, periodtok
-
+
cannot reachend
*/
/*
- ArrayExpList := Expression { ',' Expression }
+ ArrayExpList := Expression { ',' Expression }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- ExpList := Expression { ',' Expression }
+ ExpList := Expression { ',' Expression }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- Expression := SimpleExpression [ Relation SimpleExpression ]
+ Expression := SimpleExpression [ Relation SimpleExpression ]
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- SimpleExpression := UnaryOrTerm { AddOperator Term }
+ SimpleExpression := UnaryOrTerm { AddOperator Term }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- UnaryOrTerm := '+' Term | '-' Term |
- Term
+ UnaryOrTerm := '+' Term | '-' Term |
+ Term
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- Term := Factor { MulOperator Factor }
+ Term := Factor { MulOperator Factor }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok
-
+
cannot reachend
*/
/*
- Factor := Number | string | SetOrDesignatorOrFunction |
- '(' Expression ')' |
- 'NOT' ( Factor | ConstAttribute )
+ Factor := Number | string | SetOrDesignatorOrFunction |
+ '(' Expression ')' |
+ 'NOT' ( Factor | ConstAttribute )
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok
-
+
cannot reachend
*/
/*
- SetOrDesignatorOrFunction := Qualident [ Constructor |
- SimpleDes
- [ ActualParameters ] ] |
- Constructor
+ SetOrDesignatorOrFunction := Qualident [ Constructor |
+ SimpleDes
+ [ ActualParameters ] ] |
+ Constructor
first symbols:lcbratok, identtok
-
+
cannot reachend
*/
/*
- SimpleDes := { SubDesignator }
+ SimpleDes := { SubDesignator }
first symbols:periodtok, lsbratok, uparrowtok
-
+
reachend
*/
/*
- ActualParameters := '(' [ ExpList ] ')'
+ ActualParameters := '(' [ ExpList ] ')'
first symbols:lparatok
-
+
cannot reachend
*/
/*
- ExitStatement := 'EXIT'
+ ExitStatement := 'EXIT'
first symbols:exittok
-
+
cannot reachend
*/
/*
- ReturnStatement := 'RETURN' [ Expression ]
+ ReturnStatement := 'RETURN' [ Expression ]
first symbols:returntok
-
+
cannot reachend
*/
/*
- Statement := [ AssignmentOrProcedureCall |
- IfStatement | CaseStatement |
- WhileStatement |
- RepeatStatement |
- LoopStatement | ForStatement |
- WithStatement | AsmStatement |
- ExitStatement | ReturnStatement |
- RetryStatement ]
+ Statement := [ AssignmentOrProcedureCall |
+ IfStatement | CaseStatement |
+ WhileStatement |
+ RepeatStatement |
+ LoopStatement | ForStatement |
+ WithStatement | AsmStatement |
+ ExitStatement | ReturnStatement |
+ RetryStatement ]
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok
-
+
reachend
*/
/*
- RetryStatement := 'RETRY'
+ RetryStatement := 'RETRY'
first symbols:retrytok
-
+
cannot reachend
*/
/*
- AssignmentOrProcedureCall := Designator ( ':=' Expression |
- ActualParameters |
-
+ AssignmentOrProcedureCall := Designator ( ':=' Expression |
+ ActualParameters |
+
% epsilon %
- )
+ )
first symbols:identtok
-
+
cannot reachend
*/
/*
- StatementSequence := Statement { ';' Statement }
+ StatementSequence := Statement { ';' Statement }
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok
-
+
reachend
*/
/*
- IfStatement := 'IF' Expression 'THEN' StatementSequence
- { 'ELSIF' Expression 'THEN' StatementSequence }
- [ 'ELSE' StatementSequence ] 'END'
+ IfStatement := 'IF' Expression 'THEN' StatementSequence
+ { 'ELSIF' Expression 'THEN' StatementSequence }
+ [ 'ELSE' StatementSequence ] 'END'
first symbols:iftok
-
+
cannot reachend
*/
/*
- CaseStatement := 'CASE' Expression 'OF' Case { '|'
- Case }
- CaseEndStatement
+ CaseStatement := 'CASE' Expression 'OF' Case { '|'
+ Case }
+ CaseEndStatement
first symbols:casetok
-
+
cannot reachend
*/
/*
- CaseEndStatement := 'END' | 'ELSE' StatementSequence
- 'END'
+ CaseEndStatement := 'END' | 'ELSE' StatementSequence
+ 'END'
first symbols:elsetok, endtok
-
+
cannot reachend
*/
/*
- Case := [ CaseLabelList ':' StatementSequence ]
+ Case := [ CaseLabelList ':' StatementSequence ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
reachend
*/
/*
- CaseLabelList := CaseLabels { ',' CaseLabels }
+ CaseLabelList := CaseLabels { ',' CaseLabels }
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- CaseLabels := ConstExpressionNop [ '..' ConstExpressionNop ]
+ CaseLabels := ConstExpressionNop [ '..' ConstExpressionNop ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- WhileStatement := 'WHILE' Expression 'DO' StatementSequence
- 'END'
+ WhileStatement := 'WHILE' Expression 'DO' StatementSequence
+ 'END'
first symbols:whiletok
-
+
cannot reachend
*/
/*
- RepeatStatement := 'REPEAT' StatementSequence 'UNTIL'
- Expression
+ RepeatStatement := 'REPEAT' StatementSequence 'UNTIL'
+ Expression
first symbols:repeattok
-
+
cannot reachend
*/
/*
- ForStatement := 'FOR' Ident ':=' Expression 'TO'
- Expression [ 'BY' ConstExpressionNop ]
- 'DO' StatementSequence 'END'
+ ForStatement := 'FOR' Ident ':=' Expression 'TO'
+ Expression [ 'BY' ConstExpressionNop ]
+ 'DO' StatementSequence 'END'
first symbols:fortok
-
+
cannot reachend
*/
/*
- LoopStatement := 'LOOP' StatementSequence 'END'
+ LoopStatement := 'LOOP' StatementSequence 'END'
first symbols:looptok
-
+
cannot reachend
*/
/*
- WithStatement := 'WITH' Designator 'DO' StatementSequence
- 'END'
+ WithStatement := 'WITH' Designator 'DO' StatementSequence
+ 'END'
first symbols:withtok
-
+
cannot reachend
*/
/*
- ProcedureDeclaration := ProcedureHeading ';' ProcedureBlock
- Ident
+ ProcedureDeclaration := ProcedureHeading ';' ProcedureBlock
+ Ident
% leaveScope %
-
+
first symbols:proceduretok
-
+
cannot reachend
*/
/*
- ProcedureIdent := Ident
+ ProcedureIdent := Ident
% curproc := lookupSym (curident) %
-
+
% enterScope (curproc) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
/*
- DefProcedureIdent := Ident
+ DefProcedureIdent := Ident
% curproc := lookupSym (curident) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
/*
- DefineBuiltinProcedure := [ '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' Ident ')' ')' |
- '__INLINE__' ]
+ DefineBuiltinProcedure := [ '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' Ident ')' ')' |
+ '__INLINE__' ]
first symbols:inlinetok, attributetok
-
+
reachend
*/
/*
- ProcedureHeading := 'PROCEDURE' DefineBuiltinProcedure
- ( ProcedureIdent [ FormalParameters ]
- AttributeNoReturn )
+ ProcedureHeading := 'PROCEDURE' DefineBuiltinProcedure
+ ( ProcedureIdent [ FormalParameters ]
+ AttributeNoReturn )
first symbols:proceduretok
-
+
cannot reachend
*/
/*
- Builtin := [ '__BUILTIN__' | '__INLINE__' ]
+ Builtin := [ '__BUILTIN__' | '__INLINE__' ]
first symbols:inlinetok, builtintok
-
+
reachend
*/
/*
- DefProcedureHeading := 'PROCEDURE' Builtin ( DefProcedureIdent
- [ DefFormalParameters ]
- AttributeNoReturn )
+ DefProcedureHeading := 'PROCEDURE' Builtin ( DefProcedureIdent
+ [ DefFormalParameters ]
+ AttributeNoReturn )
first symbols:proceduretok
-
+
cannot reachend
*/
/*
- ProcedureBlock := { Declaration } [ 'BEGIN' ProcedureBlockBody ]
- 'END'
+ ProcedureBlock := { Declaration } [ 'BEGIN' ProcedureBlockBody ]
+ 'END'
first symbols:proceduretok, moduletok, consttok, typetok, vartok, endtok, begintok
-
+
cannot reachend
*/
/*
- Block := { Declaration } InitialBlock FinalBlock
- 'END'
+ Block := { Declaration } InitialBlock FinalBlock
+ 'END'
first symbols:proceduretok, moduletok, finallytok, begintok, consttok, typetok, vartok, endtok
-
+
cannot reachend
*/
/*
- InitialBlock := [ 'BEGIN' InitialBlockBody ]
+ InitialBlock := [ 'BEGIN' InitialBlockBody ]
first symbols:begintok
-
+
reachend
*/
/*
- FinalBlock := [ 'FINALLY' FinalBlockBody ]
+ FinalBlock := [ 'FINALLY' FinalBlockBody ]
first symbols:finallytok
-
+
reachend
*/
/*
- InitialBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ InitialBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
/*
- FinalBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ FinalBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
/*
- ProcedureBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ ProcedureBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
/*
- NormalPart := StatementSequence
+ NormalPart := StatementSequence
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok, semicolontok
-
+
reachend
*/
/*
- ExceptionalPart := StatementSequence
+ ExceptionalPart := StatementSequence
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok, semicolontok
-
+
reachend
*/
/*
- Declaration := 'CONST' { ConstantDeclaration ';' } |
- 'TYPE' { TypeDeclaration } |
- 'VAR' { VariableDeclaration ';' } |
- ProcedureDeclaration ';' |
- ModuleDeclaration ';'
+ Declaration := 'CONST' { ConstantDeclaration ';' } |
+ 'TYPE' { TypeDeclaration } |
+ 'VAR' { VariableDeclaration ';' } |
+ ProcedureDeclaration ';' |
+ ModuleDeclaration ';'
first symbols:moduletok, proceduretok, vartok, typetok, consttok
-
+
cannot reachend
*/
/*
- DefFormalParameters := '('
+ DefFormalParameters := '('
% paramEnter (curproc) %
- [ DefMultiFPSection ] ')'
-
+ [ DefMultiFPSection ] ')'
+
% paramLeave (curproc) %
- FormalReturn
+ FormalReturn
first symbols:lparatok
-
+
cannot reachend
*/
/*
- DefMultiFPSection := DefExtendedFP |
- FPSection [ ';' DefMultiFPSection ]
+ DefMultiFPSection := DefExtendedFP |
+ FPSection [ ';' DefMultiFPSection ]
first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- FormalParameters := '('
+ FormalParameters := '('
% paramEnter (curproc) %
- [ MultiFPSection ] ')'
+ [ MultiFPSection ] ')'
% paramLeave (curproc) %
- FormalReturn
+ FormalReturn
first symbols:lparatok
-
+
cannot reachend
*/
/*
- AttributeNoReturn := [ NoReturn |
+ AttributeNoReturn := [ NoReturn |
% setNoReturn (curproc, FALSE) %
- ]
+ ]
first symbols:ldirectivetok
-
+
reachend
*/
/*
- NoReturn := ''
+ NoReturn := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
/*
- AttributeUnused := [ Unused ]
+ AttributeUnused := [ Unused ]
first symbols:ldirectivetok
-
+
reachend
*/
/*
- Unused := ''
+ Unused := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
/*
- MultiFPSection := ExtendedFP | FPSection [ ';'
- MultiFPSection ]
+ MultiFPSection := ExtendedFP | FPSection [ ';'
+ MultiFPSection ]
first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- FPSection := NonVarFPSection |
- VarFPSection
+ FPSection := NonVarFPSection |
+ VarFPSection
first symbols:vartok, identtok
-
+
cannot reachend
*/
/*
- DefExtendedFP := DefOptArg | '...'
+ DefExtendedFP := DefOptArg | '...'
% addParameter (curproc, makeVarargs ()) %
-
+
first symbols:lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- ExtendedFP := OptArg | '...'
+ ExtendedFP := OptArg | '...'
first symbols:lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- VarFPSection := 'VAR' PushIdentList
+ VarFPSection := 'VAR' PushIdentList
% VAR l, t: node ; %
- ':' FormalType
+ ':' FormalType
% t := pop () %
-
+
% l := pop () %
-
+
% curisused := TRUE %
- [ AttributeUnused ]
+ [ AttributeUnused ]
% addVarParameters (curproc, l, t, curisused) %
-
+
first symbols:vartok
-
+
cannot reachend
*/
/*
- NonVarFPSection := PushIdentList
+ NonVarFPSection := PushIdentList
% VAR l, t: node ; %
- ':' FormalType
+ ':' FormalType
% t := pop () %
-
+
% l := pop () %
-
+
% curisused := TRUE %
- [ AttributeUnused ]
+ [ AttributeUnused ]
% addNonVarParameters (curproc, l, t, curisused) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
/*
- OptArg :=
+ OptArg :=
% VAR p, init, type: node ; id: Name ; %
- '[' Ident
+ '[' Ident
% id := curident %
- ':' FormalType
+ ':' FormalType
% type := pop () %
-
+
% init := NIL %
- [ '=' ConstExpression
+ [ '=' ConstExpression
% init := pop () %
- ] ']'
+ ] ']'
% p := addOptParameter (curproc, id, type, init) %
-
+
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- DefOptArg :=
+ DefOptArg :=
% VAR p, init, type: node ; id: Name ; %
- '[' Ident
+ '[' Ident
% id := curident %
- ':' FormalType
+ ':' FormalType
% type := pop () %
- '=' ConstExpression
+ '=' ConstExpression
% init := pop () %
- ']'
+ ']'
% p := addOptParameter (curproc, id, type, init) %
-
+
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- FormalType :=
+ FormalType :=
% VAR c: CARDINAL ; %
-
+
% VAR n, a, s: node ; %
-
+
% c := 0 %
- { 'ARRAY' 'OF'
+ { 'ARRAY' 'OF'
% INC (c) %
- } PushQualident
+ } PushQualident
% pushNunbounded (c) %
-
+
first symbols:identtok, arraytok
-
+
cannot reachend
*/
/*
- ModuleDeclaration := 'MODULE' Ident [ Priority ]
- ';' { Import } [ Export ]
- Block Ident
+ ModuleDeclaration := 'MODULE' Ident [ Priority ]
+ ';' { Import } [ Export ]
+ Block Ident
first symbols:moduletok
-
+
cannot reachend
*/
/*
- Priority := '[' ConstExpressionNop ']'
+ Priority := '[' ConstExpressionNop ']'
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- Export := 'EXPORT' ( 'QUALIFIED' IdentList |
- 'UNQUALIFIED' IdentList |
- IdentList ) ';'
+ Export := 'EXPORT' ( 'QUALIFIED' IdentList |
+ 'UNQUALIFIED' IdentList |
+ IdentList ) ';'
first symbols:exporttok
-
+
cannot reachend
*/
/*
- FromIdentList := Ident
+ FromIdentList := Ident
% importInto (frommodule, curident, curmodule) %
- { ',' Ident
+ { ',' Ident
% importInto (frommodule, curident, curmodule) %
- }
+ }
first symbols:identtok
-
+
cannot reachend
*/
/*
- FromImport := 'FROM' Ident
+ FromImport := 'FROM' Ident
% frommodule := lookupDef (curident) %
- 'IMPORT' FromIdentList ';'
+ 'IMPORT' FromIdentList ';'
first symbols:fromtok
-
+
cannot reachend
*/
/*
- ImportModuleList := Ident { ',' Ident }
+ ImportModuleList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
/*
- WithoutFromImport := 'IMPORT' ImportModuleList ';'
+ WithoutFromImport := 'IMPORT' ImportModuleList ';'
first symbols:importtok
-
+
cannot reachend
*/
/*
- Import := FromImport | WithoutFromImport
+ Import := FromImport | WithoutFromImport
first symbols:importtok, fromtok
-
+
cannot reachend
*/
/*
- DefinitionModule := 'DEFINITION' 'MODULE' [ 'FOR'
- string ]
- Ident ';'
+ DefinitionModule := 'DEFINITION' 'MODULE' [ 'FOR'
+ string ]
+ Ident ';'
% curmodule := lookupDef (curident) %
-
+
% enterScope (curmodule) %
-
+
% resetEnumPos (curmodule) %
- { Import } [ Export ] { Definition }
- 'END' Ident '.'
+ { Import } [ Export ] { Definition }
+ 'END' Ident '.'
% checkEndName (curmodule, curident, 'definition module') %
-
+
% setConstExpComplete (curmodule) %
-
+
% leaveScope %
-
+
first symbols:definitiontok
-
+
cannot reachend
*/
/*
- PushQualident := Ident
+ PushQualident := Ident
% typeExp := push (lookupSym (curident)) %
-
+
% IF typeExp = NIL
THEN
metaError1 ('the symbol {%1k} is not visible in this scope (or any other nested scope)', curident)
END %
- [ '.'
+ [ '.'
% IF NOT isDef (typeExp)
THEN
ErrorArray ('the first component of this qualident must be a definition module')
END %
- Ident
+ Ident
% typeExp := replace (lookupInScope (typeExp, curident)) ;
IF typeExp=NIL
THEN
ErrorArray ('identifier not found in definition module')
END %
- ]
+ ]
first symbols:identtok
-
+
cannot reachend
*/
/*
- OptSubrange := [ SubrangeType
+ OptSubrange := [ SubrangeType
% VAR q, s: node ; %
-
+
% s := pop () %
-
+
% q := pop () %
-
+
% putSubrangeType (s, q) %
-
+
% typeExp := push (s) %
- ]
+ ]
first symbols:lsbratok
-
+
reachend
*/
/*
- TypeEquiv := PushQualident OptSubrange
+ TypeEquiv := PushQualident OptSubrange
first symbols:identtok
-
+
cannot reachend
*/
/*
- EnumIdentList :=
+ EnumIdentList :=
% VAR f: node ; %
-
+
% typeExp := push (makeEnum ()) %
- Ident
+ Ident
% f := makeEnumField (typeExp, curident) %
- { ',' Ident
+ { ',' Ident
% f := makeEnumField (typeExp, curident) %
- }
+ }
first symbols:identtok
-
+
cannot reachend
*/
/*
- Enumeration := '(' EnumIdentList ')'
+ Enumeration := '(' EnumIdentList ')'
first symbols:lparatok
-
+
cannot reachend
*/
/*
- SimpleType :=
+ SimpleType :=
% VAR d: CARDINAL ; %
-
+
% d := depth () %
- ( TypeEquiv | Enumeration |
- SubrangeType )
+ ( TypeEquiv | Enumeration |
+ SubrangeType )
% assert (d = depth () - 1) %
-
+
first symbols:lsbratok, lparatok, identtok
-
+
cannot reachend
*/
/*
- Type := SimpleType | ArrayType | RecordType |
- SetType | PointerType | ProcedureType
+ Type := SimpleType | ArrayType | RecordType |
+ SetType | PointerType | ProcedureType
first symbols:proceduretok, pointertok, settok, packedsettok, oftok, recordtok, arraytok, identtok, lparatok, lsbratok
-
+
cannot reachend
*/
/*
- TypeDeclaration := { Ident
+ TypeDeclaration := { Ident
% typeDes := lookupSym (curident) %
- ( ';' | '=' Type
+ ( ';' | '=' Type
% putType (typeDes, pop ()) %
- Alignment ';' ) }
+ Alignment ';' ) }
first symbols:identtok
-
+
reachend
*/
/*
- Definition := 'CONST' { ConstantDeclaration ';' } |
- 'TYPE' { TypeDeclaration } |
- 'VAR' { VariableDeclaration ';' } |
- DefProcedureHeading ';'
+ Definition := 'CONST' { ConstantDeclaration ';' } |
+ 'TYPE' { TypeDeclaration } |
+ 'VAR' { VariableDeclaration ';' } |
+ DefProcedureHeading ';'
first symbols:proceduretok, vartok, typetok, consttok
-
+
cannot reachend
*/
/*
- AsmStatement := 'ASM' [ 'VOLATILE' ] '(' AsmOperands
- ')'
+ AsmStatement := 'ASM' [ 'VOLATILE' ] '(' AsmOperands
+ ')'
first symbols:asmtok
-
+
cannot reachend
*/
/*
- AsmOperands := string [ AsmOperandSpec ]
+ AsmOperands := string [ AsmOperandSpec ]
first symbols:stringtok
-
+
cannot reachend
*/
/*
- AsmOperandSpec := [ ':' AsmList [ ':' AsmList [
- ':' TrashList ] ] ]
+ AsmOperandSpec := [ ':' AsmList [ ':' AsmList [
+ ':' TrashList ] ] ]
first symbols:colontok
-
+
reachend
*/
/*
- AsmList := [ AsmElement ] { ',' AsmElement }
+ AsmList := [ AsmElement ] { ',' AsmElement }
first symbols:lsbratok, stringtok, commatok
-
+
reachend
*/
/*
- NamedOperand := '[' Ident ']'
+ NamedOperand := '[' Ident ']'
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- AsmOperandName := [ NamedOperand ]
+ AsmOperandName := [ NamedOperand ]
first symbols:lsbratok
-
+
reachend
*/
/*
- AsmElement := AsmOperandName string '(' Expression
- ')'
+ AsmElement := AsmOperandName string '(' Expression
+ ')'
first symbols:stringtok, lsbratok
-
+
cannot reachend
*/
/*
- TrashList := [ string ] { ',' string }
+ TrashList := [ string ] { ',' string }
first symbols:commatok, stringtok
-
+
reachend
*/
static void Real (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- FileUnit := DefinitionModule |
- ImplementationOrProgramModule
+ FileUnit := DefinitionModule |
+ ImplementationOrProgramModule
first symbols:implementationtok, moduletok, definitiontok
-
+
cannot reachend
*/
static void FileUnit (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ProgramModule := 'MODULE' Ident
+ ProgramModule := 'MODULE' Ident
% curmodule := lookupModule (curident) %
-
+
% enterScope (curmodule) %
-
+
% resetConstExpPos (curmodule) %
- [ Priority ] ';' { Import } Block
- Ident
+ [ Priority ] ';' { Import } Block
+ Ident
% checkEndName (curmodule, curident, 'program module') %
-
+
% leaveScope %
- '.'
+ '.'
first symbols:moduletok
-
+
cannot reachend
*/
static void ProgramModule (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ImplementationModule := 'IMPLEMENTATION' 'MODULE'
- Ident
+ ImplementationModule := 'IMPLEMENTATION' 'MODULE'
+ Ident
% curmodule := lookupImp (curident) %
-
+
% enterScope (lookupDef (curident)) %
-
+
% enterScope (curmodule) %
-
+
% resetConstExpPos (curmodule) %
- [ Priority ] ';' { Import }
- Block Ident
+ [ Priority ] ';' { Import }
+ Block Ident
% checkEndName (curmodule, curident, 'implementation module') %
-
+
% leaveScope ; leaveScope %
- '.'
+ '.'
first symbols:implementationtok
-
+
cannot reachend
*/
static void ImplementationModule (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ImplementationOrProgramModule := ImplementationModule |
- ProgramModule
+ ImplementationOrProgramModule := ImplementationModule |
+ ProgramModule
first symbols:moduletok, implementationtok
-
+
cannot reachend
*/
static void ImplementationOrProgramModule (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- Number := Integer | Real
+ Number := Integer | Real
first symbols:realtok, integertok
-
+
cannot reachend
*/
static void Number (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- Qualident := Ident { '.' Ident }
+ Qualident := Ident { '.' Ident }
first symbols:identtok
-
+
cannot reachend
*/
static void Qualident (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ConstantDeclaration :=
+ ConstantDeclaration :=
% VAR d, e: node ; %
- Ident
+ Ident
% d := lookupSym (curident) %
- '=' ConstExpression
+ '=' ConstExpression
% e := pop () %
-
+
% assert (isConst (d)) %
-
+
% putConst (d, e) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
static void ConstantDeclaration (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ConstExpression :=
+ ConstExpression :=
% VAR c, l, r: node ; op: toktype ; d: CARDINAL ; %
-
+
% d := depth () %
-
+
% c := push (getNextConstExp ()) %
- SimpleConstExpr
+ SimpleConstExpr
% op := currenttoken %
- [ Relation SimpleConstExpr
+ [ Relation SimpleConstExpr
% r := pop () %
-
+
% l := pop () %
-
+
% l := push (makeBinaryTok (op, l, r)) %
- ]
+ ]
% c := replace (fixupConstExp (c, pop ())) %
-
+
% assert (d+1 = depth ()) %
-
+
first symbols:identtok, attributetok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void ConstExpression (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- Relation := '=' | '#' | '<>' | '<' | '<=' |
- '>' | '>=' | 'IN'
+ Relation := '=' | '#' | '<>' | '<' | '<=' |
+ '>' | '>=' | 'IN'
first symbols:intok, greaterequaltok, greatertok, lessequaltok, lesstok, lessgreatertok, hashtok, equaltok
-
+
cannot reachend
*/
static void Relation (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- SimpleConstExpr :=
+ SimpleConstExpr :=
% VAR op: toktype ; n: node ; %
- UnaryOrConstTerm
+ UnaryOrConstTerm
% n := pop () %
- {
+ {
% op := currenttoken %
- AddOperator ConstTerm
+ AddOperator ConstTerm
% n := makeBinaryTok (op, n, pop ()) %
- }
+ }
% n := push (n) %
-
+
first symbols:identtok, stringtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void SimpleConstExpr (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- UnaryOrConstTerm :=
+ UnaryOrConstTerm :=
% VAR n: node ; %
- '+' ConstTerm
+ '+' ConstTerm
% n := push (makeUnaryTok (plustok, pop ())) %
- | '-' ConstTerm
+ | '-' ConstTerm
% n := push (makeUnaryTok (minustok, pop ())) %
- | ConstTerm
+ | ConstTerm
first symbols:identtok, attributetok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void UnaryOrConstTerm (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- AddOperator := '+' | '-' | 'OR'
+ AddOperator := '+' | '-' | 'OR'
first symbols:ortok, minustok, plustok
-
+
cannot reachend
*/
static void AddOperator (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ConstTerm :=
+ ConstTerm :=
% VAR op: toktype ; n: node ; %
- ConstFactor
+ ConstFactor
% n := pop () %
- {
+ {
% op := currenttoken %
- MulOperator ConstFactor
+ MulOperator ConstFactor
% n := makeBinaryTok (op, n, pop ()) %
- }
+ }
% n := push (n) %
-
+
first symbols:identtok, stringtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok
-
+
cannot reachend
*/
static void ConstTerm (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- MulOperator := '*' | '/' | 'DIV' | 'MOD' |
- 'REM' | 'AND' | '&'
+ MulOperator := '*' | '/' | 'DIV' | 'MOD' |
+ 'REM' | 'AND' | '&'
first symbols:ambersandtok, andtok, remtok, modtok, divtok, dividetok, timestok
-
+
cannot reachend
*/
static void MulOperator (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- NotConstFactor := 'NOT' ConstFactor
+ NotConstFactor := 'NOT' ConstFactor
% VAR n: node ; %
-
+
% n := push (makeUnaryTok (nottok, pop ())) %
-
+
first symbols:nottok
-
+
cannot reachend
*/
static void NotConstFactor (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ConstFactor := Number | ConstString |
- ConstSetOrQualidentOrFunction |
- '(' ConstExpression ')' |
- NotConstFactor |
- ConstAttribute
+ ConstFactor := Number | ConstString |
+ ConstSetOrQualidentOrFunction |
+ '(' ConstExpression ')' |
+ NotConstFactor |
+ ConstAttribute
first symbols:identtok, attributetok, lcbratok, stringtok, nottok, lparatok, integertok, realtok
-
+
cannot reachend
*/
static void ConstFactor (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ConstString := string
+ ConstString := string
% VAR n: node ; %
-
+
% n := push (makeString (curstring)) %
-
+
first symbols:stringtok
-
+
cannot reachend
*/
static void ConstString (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ConstComponentElement := ConstExpression
+ ConstComponentElement := ConstExpression
% VAR l, h, n: node ; %
-
+
% l := pop () %
-
+
% h := NIL %
- [ '..' ConstExpression
-
+ [ '..' ConstExpression
+
% h := pop () %
-
+
% ErrorArray ('implementation restriction range is not allowed') %
- ]
+ ]
% n := push (includeSetValue (pop (), l, h)) %
-
+
first symbols:identtok, stringtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ConstComponentElement (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ConstComponentValue := ConstComponentElement [ 'BY'
-
+ ConstComponentValue := ConstComponentElement [ 'BY'
+
% ErrorArray ('implementation restriction BY not allowed') %
- ConstExpression ]
+ ConstExpression ]
first symbols:identtok, attributetok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void ConstComponentValue (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ConstArraySetRecordValue := ConstComponentValue
- { ',' ConstComponentValue }
+ ConstArraySetRecordValue := ConstComponentValue
+ { ',' ConstComponentValue }
first symbols:identtok, stringtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ConstArraySetRecordValue (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ConstConstructor := '{'
+ ConstConstructor := '{'
% VAR n: node ; %
-
+
% n := push (makeSetValue ()) %
- [ ConstArraySetRecordValue ]
- '}'
+ [ ConstArraySetRecordValue ]
+ '}'
first symbols:lcbratok
-
+
cannot reachend
*/
static void ConstConstructor (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ConstSetOrQualidentOrFunction :=
+ ConstSetOrQualidentOrFunction :=
% VAR q, p, n: node ; d: CARDINAL ; %
-
+
% d := depth () %
- PushQualident
+ PushQualident
% assert (d+1 = depth ()) %
- [ ConstConstructor
-
+ [ ConstConstructor
+
% p := pop () %
-
+
% q := pop () %
-
+
% n := push (putSetValue (p, q)) %
-
+
% assert (d+1 = depth ()) %
- |
- ConstActualParameters
-
+ |
+ ConstActualParameters
+
% p := pop () %
-
+
% q := pop () %
-
+
% n := push (makeFuncCall (q, p)) %
-
+
% assert (d+1 = depth ()) %
- ] |
-
+ ] |
+
% d := depth () %
- ConstConstructor
-
+ ConstConstructor
+
% assert (d+1 = depth ()) %
-
+
first symbols:identtok, lcbratok
-
+
cannot reachend
*/
static void ConstSetOrQualidentOrFunction (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ConstActualParameters := '('
+ ConstActualParameters := '('
% VAR n: node ; %
-
+
% n := push (makeExpList ()) %
- [ ConstExpList ] ')'
+ [ ConstExpList ] ')'
% assert (isExpList (peep ())) %
-
+
first symbols:lparatok
-
+
cannot reachend
*/
static void ConstActualParameters (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ConstExpList :=
+ ConstExpList :=
% VAR p, n: node ; %
-
+
% p := peep () %
-
+
% assert (isExpList (p)) %
- ConstExpression
+ ConstExpression
% putExpList (p, pop ()) %
-
+
% assert (p = peep ()) %
-
+
% assert (isExpList (peep ())) %
- { ',' ConstExpression
+ { ',' ConstExpression
% putExpList (p, pop ()) %
-
+
% assert (isExpList (peep ())) %
- }
+ }
first symbols:identtok, stringtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ConstExpList (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' ConstAttributeExpression
- ')' ')'
+ ConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' ConstAttributeExpression
+ ')' ')'
first symbols:attributetok
-
+
cannot reachend
*/
static void ConstAttribute (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ConstAttributeExpression := Ident
+ ConstAttributeExpression := Ident
% VAR n: node ; %
-
+
% n := push (getBuiltinConst (curident)) %
- | '<' Qualident ','
- Ident '>'
+ | '<' Qualident ','
+ Ident '>'
first symbols:lesstok, identtok
-
+
cannot reachend
*/
static void ConstAttributeExpression (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ByteAlignment := ''
+ ByteAlignment := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
static void ByteAlignment (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- OptAlignmentExpression := [ AlignmentExpression ]
+ OptAlignmentExpression := [ AlignmentExpression ]
first symbols:lparatok
-
+
reachend
*/
static void OptAlignmentExpression (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- AlignmentExpression := '(' ConstExpression ')'
+ AlignmentExpression := '(' ConstExpression ')'
first symbols:lparatok
-
+
cannot reachend
*/
static void AlignmentExpression (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- Alignment := [ ByteAlignment ]
+ Alignment := [ ByteAlignment ]
first symbols:ldirectivetok
-
+
reachend
*/
static void Alignment (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- IdentList := Ident { ',' Ident }
+ IdentList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
static void IdentList (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- PushIdentList :=
+ PushIdentList :=
% VAR n: node ; %
-
+
% n := makeIdentList () %
- Ident
+ Ident
% checkDuplicate (putIdent (n, curident)) %
- { ',' Ident
+ { ',' Ident
% checkDuplicate (putIdent (n, curident)) %
- }
+ }
% n := push (n) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
static void PushIdentList (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- SubrangeType := '[' ConstExpression '..' ConstExpression
- ']'
+ SubrangeType := '[' ConstExpression '..' ConstExpression
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
static void SubrangeType (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ArrayType := 'ARRAY' SimpleType { ',' SimpleType }
- 'OF' Type
+ ArrayType := 'ARRAY' SimpleType { ',' SimpleType }
+ 'OF' Type
first symbols:arraytok
-
+
cannot reachend
*/
static void ArrayType (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- RecordType := 'RECORD' [ DefaultRecordAttributes ]
- FieldListSequence 'END'
+ RecordType := 'RECORD' [ DefaultRecordAttributes ]
+ FieldListSequence 'END'
first symbols:recordtok
-
+
cannot reachend
*/
static void RecordType (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- DefaultRecordAttributes := ''
+ DefaultRecordAttributes := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
static void DefaultRecordAttributes (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- RecordFieldPragma := [ '' ]
+ RecordFieldPragma := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
static void RecordFieldPragma (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- FieldPragmaExpression := Ident PragmaConstExpression
+ FieldPragmaExpression := Ident PragmaConstExpression
first symbols:identtok
-
+
cannot reachend
*/
static void FieldPragmaExpression (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- PragmaConstExpression := [ '(' ConstExpression ')' ]
+ PragmaConstExpression := [ '(' ConstExpression ')' ]
first symbols:lparatok
-
+
reachend
*/
static void PragmaConstExpression (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- AttributeExpression := Ident '(' ConstExpression
- ')'
+ AttributeExpression := Ident '(' ConstExpression
+ ')'
first symbols:identtok
-
+
cannot reachend
*/
static void AttributeExpression (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- FieldListSequence := FieldListStatement { ';' FieldListStatement }
+ FieldListSequence := FieldListStatement { ';' FieldListStatement }
first symbols:casetok, identtok, semicolontok
-
+
reachend
*/
static void FieldListSequence (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- FieldListStatement := [ FieldList ]
+ FieldListStatement := [ FieldList ]
first symbols:identtok, casetok
-
+
reachend
*/
static void FieldListStatement (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- FieldList := IdentList ':' Type RecordFieldPragma |
- 'CASE' CaseTag 'OF' Varient { '|' Varient }
- [ 'ELSE' FieldListSequence ] 'END'
+ FieldList := IdentList ':' Type RecordFieldPragma |
+ 'CASE' CaseTag 'OF' Varient { '|' Varient }
+ [ 'ELSE' FieldListSequence ] 'END'
first symbols:casetok, identtok
-
+
cannot reachend
*/
static void FieldList (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- TagIdent := Ident |
+ TagIdent := Ident |
% curident := NulName %
-
+
first symbols:identtok
-
+
reachend
*/
static void TagIdent (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- CaseTag := TagIdent [ ':' Qualident ]
+ CaseTag := TagIdent [ ':' Qualident ]
first symbols:colontok, identtok
-
+
reachend
*/
static void CaseTag (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- Varient := [ VarientCaseLabelList ':' FieldListSequence ]
+ Varient := [ VarientCaseLabelList ':' FieldListSequence ]
first symbols:identtok, stringtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
reachend
*/
static void Varient (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- VarientCaseLabelList := VarientCaseLabels { ','
- VarientCaseLabels }
+ VarientCaseLabelList := VarientCaseLabels { ','
+ VarientCaseLabels }
first symbols:identtok, attributetok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void VarientCaseLabelList (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- VarientCaseLabels := ConstExpression [ '..' ConstExpression ]
+ VarientCaseLabels := ConstExpression [ '..' ConstExpression ]
first symbols:identtok, stringtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void VarientCaseLabels (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- SetType := ( 'SET' | 'PACKEDSET' ) 'OF' SimpleType
+ SetType := ( 'SET' | 'PACKEDSET' ) 'OF' SimpleType
first symbols:oftok, packedsettok, settok
-
+
cannot reachend
*/
static void SetType (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- PointerType := 'POINTER' 'TO' Type
+ PointerType := 'POINTER' 'TO' Type
first symbols:pointertok
-
+
cannot reachend
*/
static void PointerType (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ProcedureType := 'PROCEDURE' [ FormalTypeList ]
+ ProcedureType := 'PROCEDURE' [ FormalTypeList ]
first symbols:proceduretok
-
+
cannot reachend
*/
static void ProcedureType (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- FormalTypeList := '(' ( ')' FormalReturn |
- ProcedureParameters ')'
- FormalReturn )
+ FormalTypeList := '(' ( ')' FormalReturn |
+ ProcedureParameters ')'
+ FormalReturn )
first symbols:lparatok
-
+
cannot reachend
*/
static void FormalTypeList (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- FormalReturn := [ ':' OptReturnType ]
+ FormalReturn := [ ':' OptReturnType ]
first symbols:colontok
-
+
reachend
*/
static void FormalReturn (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- OptReturnType := '[' Qualident ']' |
- Qualident
+ OptReturnType := '[' Qualident ']' |
+ Qualident
first symbols:identtok, lsbratok
-
+
cannot reachend
*/
static void OptReturnType (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ProcedureParameters := ProcedureParameter { ','
- ProcedureParameter }
+ ProcedureParameters := ProcedureParameter { ','
+ ProcedureParameter }
first symbols:identtok, arraytok, periodperiodperiodtok, vartok
-
+
cannot reachend
*/
static void ProcedureParameters (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ProcedureParameter := '...' | 'VAR' FormalType |
- FormalType
+ ProcedureParameter := '...' | 'VAR' FormalType |
+ FormalType
first symbols:identtok, arraytok, vartok, periodperiodperiodtok
-
+
cannot reachend
*/
static void ProcedureParameter (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- VarIdent := Ident [ '[' ConstExpression
+ VarIdent := Ident [ '[' ConstExpression
% VAR n: node ; %
-
+
% n := pop () %
- ']' ]
+ ']' ]
first symbols:identtok
-
+
cannot reachend
*/
static void VarIdent (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- VarIdentList := VarIdent { ',' VarIdent }
+ VarIdentList := VarIdent { ',' VarIdent }
first symbols:identtok
-
+
cannot reachend
*/
static void VarIdentList (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- VariableDeclaration := VarIdentList ':' Type Alignment
+ VariableDeclaration := VarIdentList ':' Type Alignment
first symbols:identtok
-
+
cannot reachend
*/
static void VariableDeclaration (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- Designator := Qualident { SubDesignator }
+ Designator := Qualident { SubDesignator }
first symbols:identtok
-
+
cannot reachend
*/
static void Designator (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- SubDesignator := '.' Ident | '[' ArrayExpList ']' |
- '^'
+ SubDesignator := '.' Ident | '[' ArrayExpList ']' |
+ '^'
first symbols:uparrowtok, lsbratok, periodtok
-
+
cannot reachend
*/
static void SubDesignator (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ArrayExpList := Expression { ',' Expression }
+ ArrayExpList := Expression { ',' Expression }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ArrayExpList (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ExpList := Expression { ',' Expression }
+ ExpList := Expression { ',' Expression }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ExpList (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- Expression := SimpleExpression [ Relation SimpleExpression ]
+ Expression := SimpleExpression [ Relation SimpleExpression ]
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void Expression (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- SimpleExpression := UnaryOrTerm { AddOperator Term }
+ SimpleExpression := UnaryOrTerm { AddOperator Term }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void SimpleExpression (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- UnaryOrTerm := '+' Term | '-' Term |
- Term
+ UnaryOrTerm := '+' Term | '-' Term |
+ Term
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void UnaryOrTerm (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- Term := Factor { MulOperator Factor }
+ Term := Factor { MulOperator Factor }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok
-
+
cannot reachend
*/
static void Term (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- Factor := Number | string | SetOrDesignatorOrFunction |
- '(' Expression ')' |
- 'NOT' ( Factor | ConstAttribute )
+ Factor := Number | string | SetOrDesignatorOrFunction |
+ '(' Expression ')' |
+ 'NOT' ( Factor | ConstAttribute )
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok
-
+
cannot reachend
*/
static void Factor (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ComponentElement := Expression [ '..' Expression
-
+ ComponentElement := Expression [ '..' Expression
+
% ErrorArray ('implementation restriction range not allowed') %
- ]
+ ]
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ComponentElement (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ComponentValue := ComponentElement [ 'BY'
+ ComponentValue := ComponentElement [ 'BY'
% ErrorArray ('implementation restriction BY not allowed') %
- Expression ]
+ Expression ]
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void ComponentValue (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ArraySetRecordValue := ComponentValue { ',' ComponentValue }
+ ArraySetRecordValue := ComponentValue { ',' ComponentValue }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ArraySetRecordValue (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- Constructor := '{' [ ArraySetRecordValue ] '}'
+ Constructor := '{' [ ArraySetRecordValue ] '}'
first symbols:lcbratok
-
+
cannot reachend
*/
static void Constructor (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- SetOrDesignatorOrFunction := Qualident [ Constructor |
- SimpleDes
- [ ActualParameters ] ] |
- Constructor
+ SetOrDesignatorOrFunction := Qualident [ Constructor |
+ SimpleDes
+ [ ActualParameters ] ] |
+ Constructor
first symbols:lcbratok, identtok
-
+
cannot reachend
*/
static void SetOrDesignatorOrFunction (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- SimpleDes := { SubDesignator }
+ SimpleDes := { SubDesignator }
first symbols:periodtok, lsbratok, uparrowtok
-
+
reachend
*/
static void SimpleDes (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ActualParameters := '(' [ ExpList ] ')'
+ ActualParameters := '(' [ ExpList ] ')'
first symbols:lparatok
-
+
cannot reachend
*/
static void ActualParameters (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ExitStatement := 'EXIT'
+ ExitStatement := 'EXIT'
first symbols:exittok
-
+
cannot reachend
*/
static void ExitStatement (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ReturnStatement := 'RETURN' [ Expression ]
+ ReturnStatement := 'RETURN' [ Expression ]
first symbols:returntok
-
+
cannot reachend
*/
static void ReturnStatement (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- Statement := [ AssignmentOrProcedureCall |
- IfStatement | CaseStatement |
- WhileStatement |
- RepeatStatement |
- LoopStatement | ForStatement |
- WithStatement | AsmStatement |
- ExitStatement | ReturnStatement |
- RetryStatement ]
+ Statement := [ AssignmentOrProcedureCall |
+ IfStatement | CaseStatement |
+ WhileStatement |
+ RepeatStatement |
+ LoopStatement | ForStatement |
+ WithStatement | AsmStatement |
+ ExitStatement | ReturnStatement |
+ RetryStatement ]
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok
-
+
reachend
*/
static void Statement (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- RetryStatement := 'RETRY'
+ RetryStatement := 'RETRY'
first symbols:retrytok
-
+
cannot reachend
*/
static void RetryStatement (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- AssignmentOrProcedureCall := Designator ( ':=' Expression |
- ActualParameters |
-
+ AssignmentOrProcedureCall := Designator ( ':=' Expression |
+ ActualParameters |
+
% epsilon %
- )
+ )
first symbols:identtok
-
+
cannot reachend
*/
static void AssignmentOrProcedureCall (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- StatementSequence := Statement { ';' Statement }
+ StatementSequence := Statement { ';' Statement }
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok
-
+
reachend
*/
static void StatementSequence (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- IfStatement := 'IF' Expression 'THEN' StatementSequence
- { 'ELSIF' Expression 'THEN' StatementSequence }
- [ 'ELSE' StatementSequence ] 'END'
+ IfStatement := 'IF' Expression 'THEN' StatementSequence
+ { 'ELSIF' Expression 'THEN' StatementSequence }
+ [ 'ELSE' StatementSequence ] 'END'
first symbols:iftok
-
+
cannot reachend
*/
static void IfStatement (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- CaseStatement := 'CASE' Expression 'OF' Case { '|'
- Case }
- CaseEndStatement
+ CaseStatement := 'CASE' Expression 'OF' Case { '|'
+ Case }
+ CaseEndStatement
first symbols:casetok
-
+
cannot reachend
*/
static void CaseStatement (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- CaseEndStatement := 'END' | 'ELSE' StatementSequence
- 'END'
+ CaseEndStatement := 'END' | 'ELSE' StatementSequence
+ 'END'
first symbols:elsetok, endtok
-
+
cannot reachend
*/
static void CaseEndStatement (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- Case := [ CaseLabelList ':' StatementSequence ]
+ Case := [ CaseLabelList ':' StatementSequence ]
first symbols:identtok, stringtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
reachend
*/
static void Case (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- CaseLabelList := CaseLabels { ',' CaseLabels }
+ CaseLabelList := CaseLabels { ',' CaseLabels }
first symbols:identtok, attributetok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void CaseLabelList (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- CaseLabels := ConstExpression [ '..' ConstExpression ]
+ CaseLabels := ConstExpression [ '..' ConstExpression ]
first symbols:identtok, stringtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void CaseLabels (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- WhileStatement := 'WHILE' Expression 'DO' StatementSequence
- 'END'
+ WhileStatement := 'WHILE' Expression 'DO' StatementSequence
+ 'END'
first symbols:whiletok
-
+
cannot reachend
*/
static void WhileStatement (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- RepeatStatement := 'REPEAT' StatementSequence 'UNTIL'
- Expression
+ RepeatStatement := 'REPEAT' StatementSequence 'UNTIL'
+ Expression
first symbols:repeattok
-
+
cannot reachend
*/
static void RepeatStatement (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ForStatement := 'FOR' Ident ':=' Expression 'TO'
- Expression [ 'BY' ConstExpression ]
- 'DO' StatementSequence 'END'
+ ForStatement := 'FOR' Ident ':=' Expression 'TO'
+ Expression [ 'BY' ConstExpression ]
+ 'DO' StatementSequence 'END'
first symbols:fortok
-
+
cannot reachend
*/
static void ForStatement (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- LoopStatement := 'LOOP' StatementSequence 'END'
+ LoopStatement := 'LOOP' StatementSequence 'END'
first symbols:looptok
-
+
cannot reachend
*/
static void LoopStatement (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- WithStatement := 'WITH' Designator 'DO' StatementSequence
- 'END'
+ WithStatement := 'WITH' Designator 'DO' StatementSequence
+ 'END'
first symbols:withtok
-
+
cannot reachend
*/
static void WithStatement (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ProcedureDeclaration := ProcedureHeading ';' ProcedureBlock
- Ident
+ ProcedureDeclaration := ProcedureHeading ';' ProcedureBlock
+ Ident
% leaveScope %
-
+
first symbols:proceduretok
-
+
cannot reachend
*/
static void ProcedureDeclaration (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ProcedureIdent := Ident
+ ProcedureIdent := Ident
% curproc := lookupSym (curident) %
-
+
% enterScope (curproc) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
static void ProcedureIdent (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- DefProcedureIdent := Ident
+ DefProcedureIdent := Ident
% curproc := lookupSym (curident) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
static void DefProcedureIdent (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- DefineBuiltinProcedure := [ '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' Ident ')' ')' |
- '__INLINE__' ]
+ DefineBuiltinProcedure := [ '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' Ident ')' ')' |
+ '__INLINE__' ]
first symbols:inlinetok, attributetok
-
+
reachend
*/
static void DefineBuiltinProcedure (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ProcedureHeading := 'PROCEDURE' DefineBuiltinProcedure
- ( ProcedureIdent [ FormalParameters ]
- AttributeNoReturn )
+ ProcedureHeading := 'PROCEDURE' DefineBuiltinProcedure
+ ( ProcedureIdent [ FormalParameters ]
+ AttributeNoReturn )
first symbols:proceduretok
-
+
cannot reachend
*/
static void ProcedureHeading (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- Builtin := [ '__BUILTIN__' | '__INLINE__' ]
+ Builtin := [ '__BUILTIN__' | '__INLINE__' ]
first symbols:inlinetok, builtintok
-
+
reachend
*/
static void Builtin (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- DefProcedureHeading := 'PROCEDURE' Builtin ( DefProcedureIdent
- [ DefFormalParameters ]
- AttributeNoReturn )
+ DefProcedureHeading := 'PROCEDURE' Builtin ( DefProcedureIdent
+ [ DefFormalParameters ]
+ AttributeNoReturn )
first symbols:proceduretok
-
+
cannot reachend
*/
static void DefProcedureHeading (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ProcedureBlock := { Declaration } [ 'BEGIN' ProcedureBlockBody ]
- 'END'
+ ProcedureBlock := { Declaration } [ 'BEGIN' ProcedureBlockBody ]
+ 'END'
first symbols:proceduretok, moduletok, consttok, typetok, vartok, endtok, begintok
-
+
cannot reachend
*/
static void ProcedureBlock (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- Block := { Declaration } InitialBlock FinalBlock
- 'END'
+ Block := { Declaration } InitialBlock FinalBlock
+ 'END'
first symbols:proceduretok, moduletok, finallytok, begintok, consttok, typetok, vartok, endtok
-
+
cannot reachend
*/
static void Block (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- InitialBlock := [ 'BEGIN' InitialBlockBody ]
+ InitialBlock := [ 'BEGIN' InitialBlockBody ]
first symbols:begintok
-
+
reachend
*/
static void InitialBlock (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- FinalBlock := [ 'FINALLY' FinalBlockBody ]
+ FinalBlock := [ 'FINALLY' FinalBlockBody ]
first symbols:finallytok
-
+
reachend
*/
static void FinalBlock (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- InitialBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ InitialBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
static void InitialBlockBody (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- FinalBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ FinalBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
static void FinalBlockBody (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ProcedureBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ ProcedureBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
static void ProcedureBlockBody (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- NormalPart := StatementSequence
+ NormalPart := StatementSequence
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok, semicolontok
-
+
reachend
*/
static void NormalPart (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ExceptionalPart := StatementSequence
+ ExceptionalPart := StatementSequence
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok, semicolontok
-
+
reachend
*/
static void ExceptionalPart (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- Declaration := 'CONST' { ConstantDeclaration ';' } |
- 'TYPE' { TypeDeclaration } |
- 'VAR' { VariableDeclaration ';' } |
- ProcedureDeclaration ';' |
- ModuleDeclaration ';'
+ Declaration := 'CONST' { ConstantDeclaration ';' } |
+ 'TYPE' { TypeDeclaration } |
+ 'VAR' { VariableDeclaration ';' } |
+ ProcedureDeclaration ';' |
+ ModuleDeclaration ';'
first symbols:moduletok, proceduretok, vartok, typetok, consttok
-
+
cannot reachend
*/
static void Declaration (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- DefFormalParameters := '('
+ DefFormalParameters := '('
% paramEnter (curproc) %
- [ DefMultiFPSection ] ')'
-
+ [ DefMultiFPSection ] ')'
+
% paramLeave (curproc) %
- FormalReturn
+ FormalReturn
first symbols:lparatok
-
+
cannot reachend
*/
static void DefFormalParameters (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- DefMultiFPSection := DefExtendedFP |
- FPSection [ ';' DefMultiFPSection ]
+ DefMultiFPSection := DefExtendedFP |
+ FPSection [ ';' DefMultiFPSection ]
first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
static void DefMultiFPSection (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- FormalParameters := '('
+ FormalParameters := '('
% paramEnter (curproc) %
- [ MultiFPSection ] ')'
+ [ MultiFPSection ] ')'
% paramLeave (curproc) %
- FormalReturn
+ FormalReturn
first symbols:lparatok
-
+
cannot reachend
*/
static void FormalParameters (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- AttributeNoReturn := [ '' ]
+ AttributeNoReturn := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
static void AttributeNoReturn (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- AttributeUnused := [ '' ]
+ AttributeUnused := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
static void AttributeUnused (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- MultiFPSection := ExtendedFP | FPSection [ ';'
- MultiFPSection ]
+ MultiFPSection := ExtendedFP | FPSection [ ';'
+ MultiFPSection ]
first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
static void MultiFPSection (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- FPSection := NonVarFPSection |
- VarFPSection
+ FPSection := NonVarFPSection |
+ VarFPSection
first symbols:vartok, identtok
-
+
cannot reachend
*/
static void FPSection (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- DefExtendedFP := DefOptArg | '...'
+ DefExtendedFP := DefOptArg | '...'
first symbols:lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
static void DefExtendedFP (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ExtendedFP := OptArg | '...'
+ ExtendedFP := OptArg | '...'
first symbols:lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
static void ExtendedFP (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- VarFPSection := 'VAR' PushIdentList ':' FormalType
- [ AttributeUnused ]
+ VarFPSection := 'VAR' PushIdentList ':' FormalType
+ [ AttributeUnused ]
first symbols:vartok
-
+
cannot reachend
*/
static void VarFPSection (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- NonVarFPSection := PushIdentList ':' FormalType
- [ AttributeUnused ]
+ NonVarFPSection := PushIdentList ':' FormalType
+ [ AttributeUnused ]
first symbols:identtok
-
+
cannot reachend
*/
static void NonVarFPSection (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- OptArg := '[' Ident ':' FormalType [ '=' ConstExpression ]
- ']'
+ OptArg := '[' Ident ':' FormalType [ '=' ConstExpression ]
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
static void OptArg (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- DefOptArg := '[' Ident ':' FormalType '=' ConstExpression
- ']'
+ DefOptArg := '[' Ident ':' FormalType '=' ConstExpression
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
static void DefOptArg (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- FormalType := { 'ARRAY' 'OF' } PushQualident
+ FormalType := { 'ARRAY' 'OF' } PushQualident
first symbols:identtok, arraytok
-
+
cannot reachend
*/
static void FormalType (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ModuleDeclaration := 'MODULE' Ident [ Priority ]
- ';' { Import } [ Export ]
- Block Ident
+ ModuleDeclaration := 'MODULE' Ident [ Priority ]
+ ';' { Import } [ Export ]
+ Block Ident
first symbols:moduletok
-
+
cannot reachend
*/
static void ModuleDeclaration (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- Priority := '[' ConstExpression ']'
+ Priority := '[' ConstExpression ']'
first symbols:lsbratok
-
+
cannot reachend
*/
static void Priority (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- Export := 'EXPORT' ( 'QUALIFIED' IdentList |
- 'UNQUALIFIED' IdentList |
- IdentList ) ';'
+ Export := 'EXPORT' ( 'QUALIFIED' IdentList |
+ 'UNQUALIFIED' IdentList |
+ IdentList ) ';'
first symbols:exporttok
-
+
cannot reachend
*/
static void Export (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- FromIdentList := Ident { ',' Ident }
+ FromIdentList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
static void FromIdentList (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- FromImport := 'FROM' Ident 'IMPORT' FromIdentList
- ';'
+ FromImport := 'FROM' Ident 'IMPORT' FromIdentList
+ ';'
first symbols:fromtok
-
+
cannot reachend
*/
static void FromImport (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- ImportModuleList := Ident { ',' Ident }
+ ImportModuleList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
static void ImportModuleList (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- WithoutFromImport := 'IMPORT' ImportModuleList ';'
+ WithoutFromImport := 'IMPORT' ImportModuleList ';'
first symbols:importtok
-
+
cannot reachend
*/
static void WithoutFromImport (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- Import := FromImport | WithoutFromImport
+ Import := FromImport | WithoutFromImport
first symbols:importtok, fromtok
-
+
cannot reachend
*/
static void Import (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- DefinitionModule := 'DEFINITION' 'MODULE' [ 'FOR'
- string ]
- Ident
+ DefinitionModule := 'DEFINITION' 'MODULE' [ 'FOR'
+ string ]
+ Ident
% curmodule := lookupDef (curident) %
-
+
% addCommentBody (curmodule) %
- ';'
+ ';'
% enterScope (curmodule) %
-
+
% resetConstExpPos (curmodule) %
- { Import } [ Export ] { Definition }
- 'END' Ident '.'
+ { Import } [ Export ] { Definition }
+ 'END' Ident '.'
% checkEndName (curmodule, curident, 'definition module') %
-
+
% leaveScope %
-
+
first symbols:definitiontok
-
+
cannot reachend
*/
static void DefinitionModule (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- PushQualident := Ident
+ PushQualident := Ident
% typeExp := push (lookupSym (curident)) %
-
+
% IF typeExp = NIL
THEN
metaError1 ('the symbol {%1k} is not visible in this scope (or any other nested scope)', curident)
END %
- [ '.'
+ [ '.'
% IF NOT isDef (typeExp)
THEN
ErrorArray ('the first component of this qualident must be a definition module')
END %
- Ident
+ Ident
% typeExp := replace (lookupInScope (typeExp, curident)) ;
IF typeExp=NIL
THEN
ErrorArray ('identifier not found in definition module')
END %
- ]
+ ]
first symbols:identtok
-
+
cannot reachend
*/
static void PushQualident (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- OptSubrange := [ SubrangeType ]
+ OptSubrange := [ SubrangeType ]
first symbols:lsbratok
-
+
reachend
*/
static void OptSubrange (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- TypeEquiv := PushQualident OptSubrange
+ TypeEquiv := PushQualident OptSubrange
first symbols:identtok
-
+
cannot reachend
*/
static void TypeEquiv (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- EnumIdentList := Ident { ',' Ident }
+ EnumIdentList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
static void EnumIdentList (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- Enumeration := '(' EnumIdentList ')'
+ Enumeration := '(' EnumIdentList ')'
first symbols:lparatok
-
+
cannot reachend
*/
static void Enumeration (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- SimpleType := TypeEquiv | Enumeration |
- SubrangeType
+ SimpleType := TypeEquiv | Enumeration |
+ SubrangeType
first symbols:lsbratok, lparatok, identtok
-
+
cannot reachend
*/
static void SimpleType (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- Type := SimpleType | ArrayType | RecordType |
- SetType | PointerType | ProcedureType
+ Type := SimpleType | ArrayType | RecordType |
+ SetType | PointerType | ProcedureType
first symbols:proceduretok, pointertok, settok, packedsettok, oftok, recordtok, arraytok, identtok, lparatok, lsbratok
-
+
cannot reachend
*/
static void Type (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- TypeDeclaration := { Ident ( ';' | '=' Type Alignment
- ';' ) }
+ TypeDeclaration := { Ident ( ';' | '=' Type Alignment
+ ';' ) }
first symbols:identtok
-
+
reachend
*/
static void TypeDeclaration (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- DefQualident := Ident
+ DefQualident := Ident
% typeExp := lookupSym (curident) %
- [ '.'
+ [ '.'
% IF NOT isDef (typeExp)
THEN
ErrorArray ('the first component of this qualident must be a definition module')
END %
- Ident
+ Ident
% typeExp := lookupInScope (typeExp, curident) ;
IF typeExp=NIL
THEN
ErrorArray ('identifier not found in definition module')
END %
- ]
+ ]
first symbols:identtok
-
+
cannot reachend
*/
static void DefQualident (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- DefTypeEquiv := DefQualident OptSubrange
+ DefTypeEquiv := DefQualident OptSubrange
first symbols:identtok
-
+
cannot reachend
*/
static void DefTypeEquiv (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- DefEnumIdentList := Ident { ',' Ident }
+ DefEnumIdentList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
static void DefEnumIdentList (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- DefEnumeration := '(' DefEnumIdentList ')'
+ DefEnumeration := '(' DefEnumIdentList ')'
first symbols:lparatok
-
+
cannot reachend
*/
static void DefEnumeration (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- DefSimpleType := DefTypeEquiv | DefEnumeration |
- SubrangeType
+ DefSimpleType := DefTypeEquiv | DefEnumeration |
+ SubrangeType
first symbols:lsbratok, lparatok, identtok
-
+
cannot reachend
*/
static void DefSimpleType (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- DefType := DefSimpleType | ArrayType |
- RecordType | SetType | PointerType |
- ProcedureType
+ DefType := DefSimpleType | ArrayType |
+ RecordType | SetType | PointerType |
+ ProcedureType
first symbols:proceduretok, pointertok, settok, packedsettok, oftok, recordtok, arraytok, identtok, lparatok, lsbratok
-
+
cannot reachend
*/
static void DefType (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- DefTypeDeclaration := { Ident ( ';' | '=' DefType
- Alignment ';' ) }
+ DefTypeDeclaration := { Ident ( ';' | '=' DefType
+ Alignment ';' ) }
first symbols:identtok
-
+
reachend
*/
static void DefTypeDeclaration (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- DefConstantDeclaration := Ident '=' ConstExpression
+ DefConstantDeclaration := Ident '=' ConstExpression
first symbols:identtok
-
+
cannot reachend
*/
static void DefConstantDeclaration (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- Definition := 'CONST' { DefConstantDeclaration ';' } |
- 'TYPE' { DefTypeDeclaration } |
- 'VAR' { VariableDeclaration ';' } |
- DefProcedureHeading ';'
+ Definition := 'CONST' { DefConstantDeclaration ';' } |
+ 'TYPE' { DefTypeDeclaration } |
+ 'VAR' { VariableDeclaration ';' } |
+ DefProcedureHeading ';'
first symbols:proceduretok, vartok, typetok, consttok
-
+
cannot reachend
*/
static void Definition (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- AsmStatement := 'ASM' [ 'VOLATILE' ] '(' AsmOperands
- ')'
+ AsmStatement := 'ASM' [ 'VOLATILE' ] '(' AsmOperands
+ ')'
first symbols:asmtok
-
+
cannot reachend
*/
static void AsmStatement (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- AsmOperands := string [ AsmOperandSpec ]
+ AsmOperands := string [ AsmOperandSpec ]
first symbols:stringtok
-
+
cannot reachend
*/
static void AsmOperands (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- AsmOperandSpec := [ ':' AsmList [ ':' AsmList [
- ':' TrashList ] ] ]
+ AsmOperandSpec := [ ':' AsmList [ ':' AsmList [
+ ':' TrashList ] ] ]
first symbols:colontok
-
+
reachend
*/
static void AsmOperandSpec (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- AsmList := [ AsmElement ] { ',' AsmElement }
+ AsmList := [ AsmElement ] { ',' AsmElement }
first symbols:lsbratok, stringtok, commatok
-
+
reachend
*/
static void AsmList (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- NamedOperand := '[' Ident ']'
+ NamedOperand := '[' Ident ']'
first symbols:lsbratok
-
+
cannot reachend
*/
static void NamedOperand (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- AsmOperandName := [ NamedOperand ]
+ AsmOperandName := [ NamedOperand ]
first symbols:lsbratok
-
+
reachend
*/
static void AsmOperandName (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- AsmElement := AsmOperandName string '(' Expression
- ')'
+ AsmElement := AsmOperandName string '(' Expression
+ ')'
first symbols:stringtok, lsbratok
-
+
cannot reachend
*/
static void AsmElement (mcp4_SetOfStop0 stopset0, mcp4_SetOfStop1 stopset1, mcp4_SetOfStop2 stopset2);
/*
- TrashList := [ string ] { ',' string }
+ TrashList := [ string ] { ',' string }
first symbols:commatok, stringtok
-
+
reachend
*/
{
mcPrintf_printf0 ((const char *) "\\nskipping token *** ", 21);
}
- /*
+ /*
yes the ORD(currenttoken) looks ugly, but it is *much* safer than
using currenttoken<sometok as a change to the ordering of the
token declarations below would cause this to break. Using ORD() we are
/*
- FileUnit := DefinitionModule |
- ImplementationOrProgramModule
+ FileUnit := DefinitionModule |
+ ImplementationOrProgramModule
first symbols:implementationtok, moduletok, definitiontok
-
+
cannot reachend
*/
/*
- ProgramModule := 'MODULE' Ident
+ ProgramModule := 'MODULE' Ident
% curmodule := lookupModule (curident) %
-
+
% enterScope (curmodule) %
-
+
% resetConstExpPos (curmodule) %
- [ Priority ] ';' { Import } Block
- Ident
+ [ Priority ] ';' { Import } Block
+ Ident
% checkEndName (curmodule, curident, 'program module') %
-
+
% leaveScope %
- '.'
+ '.'
first symbols:moduletok
-
+
cannot reachend
*/
/*
- ImplementationModule := 'IMPLEMENTATION' 'MODULE'
- Ident
+ ImplementationModule := 'IMPLEMENTATION' 'MODULE'
+ Ident
% curmodule := lookupImp (curident) %
-
+
% enterScope (lookupDef (curident)) %
-
+
% enterScope (curmodule) %
-
+
% resetConstExpPos (curmodule) %
- [ Priority ] ';' { Import }
- Block Ident
+ [ Priority ] ';' { Import }
+ Block Ident
% checkEndName (curmodule, curident, 'implementation module') %
-
+
% leaveScope ; leaveScope %
- '.'
+ '.'
first symbols:implementationtok
-
+
cannot reachend
*/
/*
- ImplementationOrProgramModule := ImplementationModule |
- ProgramModule
+ ImplementationOrProgramModule := ImplementationModule |
+ ProgramModule
first symbols:moduletok, implementationtok
-
+
cannot reachend
*/
/*
- Number := Integer | Real
+ Number := Integer | Real
first symbols:realtok, integertok
-
+
cannot reachend
*/
/*
- Qualident := Ident { '.' Ident }
+ Qualident := Ident { '.' Ident }
first symbols:identtok
-
+
cannot reachend
*/
/*
- ConstantDeclaration :=
+ ConstantDeclaration :=
% VAR d, e: node ; %
- Ident
+ Ident
% d := lookupSym (curident) %
- '=' ConstExpression
+ '=' ConstExpression
% e := pop () %
-
+
% assert (isConst (d)) %
-
+
% putConst (d, e) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
/*
- ConstExpression :=
+ ConstExpression :=
% VAR c, l, r: node ; op: toktype ; d: CARDINAL ; %
-
+
% d := depth () %
-
+
% c := push (getNextConstExp ()) %
- SimpleConstExpr
+ SimpleConstExpr
% op := currenttoken %
- [ Relation SimpleConstExpr
+ [ Relation SimpleConstExpr
% r := pop () %
-
+
% l := pop () %
-
+
% l := push (makeBinaryTok (op, l, r)) %
- ]
+ ]
% c := replace (fixupConstExp (c, pop ())) %
-
+
% assert (d+1 = depth ()) %
-
+
first symbols:identtok, attributetok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- Relation := '=' | '#' | '<>' | '<' | '<=' |
- '>' | '>=' | 'IN'
+ Relation := '=' | '#' | '<>' | '<' | '<=' |
+ '>' | '>=' | 'IN'
first symbols:intok, greaterequaltok, greatertok, lessequaltok, lesstok, lessgreatertok, hashtok, equaltok
-
+
cannot reachend
*/
/*
- SimpleConstExpr :=
+ SimpleConstExpr :=
% VAR op: toktype ; n: node ; %
- UnaryOrConstTerm
+ UnaryOrConstTerm
% n := pop () %
- {
+ {
% op := currenttoken %
- AddOperator ConstTerm
+ AddOperator ConstTerm
% n := makeBinaryTok (op, n, pop ()) %
- }
+ }
% n := push (n) %
-
+
first symbols:identtok, stringtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- UnaryOrConstTerm :=
+ UnaryOrConstTerm :=
% VAR n: node ; %
- '+' ConstTerm
+ '+' ConstTerm
% n := push (makeUnaryTok (plustok, pop ())) %
- | '-' ConstTerm
+ | '-' ConstTerm
% n := push (makeUnaryTok (minustok, pop ())) %
- | ConstTerm
+ | ConstTerm
first symbols:identtok, attributetok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- AddOperator := '+' | '-' | 'OR'
+ AddOperator := '+' | '-' | 'OR'
first symbols:ortok, minustok, plustok
-
+
cannot reachend
*/
/*
- ConstTerm :=
+ ConstTerm :=
% VAR op: toktype ; n: node ; %
- ConstFactor
+ ConstFactor
% n := pop () %
- {
+ {
% op := currenttoken %
- MulOperator ConstFactor
+ MulOperator ConstFactor
% n := makeBinaryTok (op, n, pop ()) %
- }
+ }
% n := push (n) %
-
+
first symbols:identtok, stringtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok
-
+
cannot reachend
*/
/*
- MulOperator := '*' | '/' | 'DIV' | 'MOD' |
- 'REM' | 'AND' | '&'
+ MulOperator := '*' | '/' | 'DIV' | 'MOD' |
+ 'REM' | 'AND' | '&'
first symbols:ambersandtok, andtok, remtok, modtok, divtok, dividetok, timestok
-
+
cannot reachend
*/
/*
- NotConstFactor := 'NOT' ConstFactor
+ NotConstFactor := 'NOT' ConstFactor
% VAR n: node ; %
-
+
% n := push (makeUnaryTok (nottok, pop ())) %
-
+
first symbols:nottok
-
+
cannot reachend
*/
/*
- ConstFactor := Number | ConstString |
- ConstSetOrQualidentOrFunction |
- '(' ConstExpression ')' |
- NotConstFactor |
- ConstAttribute
+ ConstFactor := Number | ConstString |
+ ConstSetOrQualidentOrFunction |
+ '(' ConstExpression ')' |
+ NotConstFactor |
+ ConstAttribute
first symbols:identtok, attributetok, lcbratok, stringtok, nottok, lparatok, integertok, realtok
-
+
cannot reachend
*/
/*
- ConstString := string
+ ConstString := string
% VAR n: node ; %
-
+
% n := push (makeString (curstring)) %
-
+
first symbols:stringtok
-
+
cannot reachend
*/
/*
- ConstComponentElement := ConstExpression
+ ConstComponentElement := ConstExpression
% VAR l, h, n: node ; %
-
+
% l := pop () %
-
+
% h := NIL %
- [ '..' ConstExpression
-
+ [ '..' ConstExpression
+
% h := pop () %
-
+
% ErrorArray ('implementation restriction range is not allowed') %
- ]
+ ]
% n := push (includeSetValue (pop (), l, h)) %
-
+
first symbols:identtok, stringtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- ConstComponentValue := ConstComponentElement [ 'BY'
-
+ ConstComponentValue := ConstComponentElement [ 'BY'
+
% ErrorArray ('implementation restriction BY not allowed') %
- ConstExpression ]
+ ConstExpression ]
first symbols:identtok, attributetok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- ConstArraySetRecordValue := ConstComponentValue
- { ',' ConstComponentValue }
+ ConstArraySetRecordValue := ConstComponentValue
+ { ',' ConstComponentValue }
first symbols:identtok, stringtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- ConstConstructor := '{'
+ ConstConstructor := '{'
% VAR n: node ; %
-
+
% n := push (makeSetValue ()) %
- [ ConstArraySetRecordValue ]
- '}'
+ [ ConstArraySetRecordValue ]
+ '}'
first symbols:lcbratok
-
+
cannot reachend
*/
/*
- ConstSetOrQualidentOrFunction :=
+ ConstSetOrQualidentOrFunction :=
% VAR q, p, n: node ; d: CARDINAL ; %
-
+
% d := depth () %
- PushQualident
+ PushQualident
% assert (d+1 = depth ()) %
- [ ConstConstructor
-
+ [ ConstConstructor
+
% p := pop () %
-
+
% q := pop () %
-
+
% n := push (putSetValue (p, q)) %
-
+
% assert (d+1 = depth ()) %
- |
- ConstActualParameters
-
+ |
+ ConstActualParameters
+
% p := pop () %
-
+
% q := pop () %
-
+
% n := push (makeFuncCall (q, p)) %
-
+
% assert (d+1 = depth ()) %
- ] |
-
+ ] |
+
% d := depth () %
- ConstConstructor
-
+ ConstConstructor
+
% assert (d+1 = depth ()) %
-
+
first symbols:identtok, lcbratok
-
+
cannot reachend
*/
/*
- ConstActualParameters := '('
+ ConstActualParameters := '('
% VAR n: node ; %
-
+
% n := push (makeExpList ()) %
- [ ConstExpList ] ')'
+ [ ConstExpList ] ')'
% assert (isExpList (peep ())) %
-
+
first symbols:lparatok
-
+
cannot reachend
*/
/*
- ConstExpList :=
+ ConstExpList :=
% VAR p, n: node ; %
-
+
% p := peep () %
-
+
% assert (isExpList (p)) %
- ConstExpression
+ ConstExpression
% putExpList (p, pop ()) %
-
+
% assert (p = peep ()) %
-
+
% assert (isExpList (peep ())) %
- { ',' ConstExpression
+ { ',' ConstExpression
% putExpList (p, pop ()) %
-
+
% assert (isExpList (peep ())) %
- }
+ }
first symbols:identtok, stringtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- ConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' ConstAttributeExpression
- ')' ')'
+ ConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' ConstAttributeExpression
+ ')' ')'
first symbols:attributetok
-
+
cannot reachend
*/
/*
- ConstAttributeExpression := Ident
+ ConstAttributeExpression := Ident
% VAR n: node ; %
-
+
% n := push (getBuiltinConst (curident)) %
- | '<' Qualident ','
- Ident '>'
+ | '<' Qualident ','
+ Ident '>'
first symbols:lesstok, identtok
-
+
cannot reachend
*/
/*
- ByteAlignment := ''
+ ByteAlignment := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
/*
- OptAlignmentExpression := [ AlignmentExpression ]
+ OptAlignmentExpression := [ AlignmentExpression ]
first symbols:lparatok
-
+
reachend
*/
/*
- AlignmentExpression := '(' ConstExpression ')'
+ AlignmentExpression := '(' ConstExpression ')'
first symbols:lparatok
-
+
cannot reachend
*/
/*
- Alignment := [ ByteAlignment ]
+ Alignment := [ ByteAlignment ]
first symbols:ldirectivetok
-
+
reachend
*/
/*
- IdentList := Ident { ',' Ident }
+ IdentList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
/*
- PushIdentList :=
+ PushIdentList :=
% VAR n: node ; %
-
+
% n := makeIdentList () %
- Ident
+ Ident
% checkDuplicate (putIdent (n, curident)) %
- { ',' Ident
+ { ',' Ident
% checkDuplicate (putIdent (n, curident)) %
- }
+ }
% n := push (n) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
/*
- SubrangeType := '[' ConstExpression '..' ConstExpression
- ']'
+ SubrangeType := '[' ConstExpression '..' ConstExpression
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- ArrayType := 'ARRAY' SimpleType { ',' SimpleType }
- 'OF' Type
+ ArrayType := 'ARRAY' SimpleType { ',' SimpleType }
+ 'OF' Type
first symbols:arraytok
-
+
cannot reachend
*/
/*
- RecordType := 'RECORD' [ DefaultRecordAttributes ]
- FieldListSequence 'END'
+ RecordType := 'RECORD' [ DefaultRecordAttributes ]
+ FieldListSequence 'END'
first symbols:recordtok
-
+
cannot reachend
*/
/*
- DefaultRecordAttributes := ''
+ DefaultRecordAttributes := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
/*
- RecordFieldPragma := [ '' ]
+ RecordFieldPragma := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
/*
- FieldPragmaExpression := Ident PragmaConstExpression
+ FieldPragmaExpression := Ident PragmaConstExpression
first symbols:identtok
-
+
cannot reachend
*/
/*
- PragmaConstExpression := [ '(' ConstExpression ')' ]
+ PragmaConstExpression := [ '(' ConstExpression ')' ]
first symbols:lparatok
-
+
reachend
*/
/*
- AttributeExpression := Ident '(' ConstExpression
- ')'
+ AttributeExpression := Ident '(' ConstExpression
+ ')'
first symbols:identtok
-
+
cannot reachend
*/
/*
- FieldListSequence := FieldListStatement { ';' FieldListStatement }
+ FieldListSequence := FieldListStatement { ';' FieldListStatement }
first symbols:casetok, identtok, semicolontok
-
+
reachend
*/
/*
- FieldListStatement := [ FieldList ]
+ FieldListStatement := [ FieldList ]
first symbols:identtok, casetok
-
+
reachend
*/
/*
- FieldList := IdentList ':' Type RecordFieldPragma |
- 'CASE' CaseTag 'OF' Varient { '|' Varient }
- [ 'ELSE' FieldListSequence ] 'END'
+ FieldList := IdentList ':' Type RecordFieldPragma |
+ 'CASE' CaseTag 'OF' Varient { '|' Varient }
+ [ 'ELSE' FieldListSequence ] 'END'
first symbols:casetok, identtok
-
+
cannot reachend
*/
/*
- TagIdent := Ident |
+ TagIdent := Ident |
% curident := NulName %
-
+
first symbols:identtok
-
+
reachend
*/
/*
- CaseTag := TagIdent [ ':' Qualident ]
+ CaseTag := TagIdent [ ':' Qualident ]
first symbols:colontok, identtok
-
+
reachend
*/
/*
- Varient := [ VarientCaseLabelList ':' FieldListSequence ]
+ Varient := [ VarientCaseLabelList ':' FieldListSequence ]
first symbols:identtok, stringtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
reachend
*/
/*
- VarientCaseLabelList := VarientCaseLabels { ','
- VarientCaseLabels }
+ VarientCaseLabelList := VarientCaseLabels { ','
+ VarientCaseLabels }
first symbols:identtok, attributetok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- VarientCaseLabels := ConstExpression [ '..' ConstExpression ]
+ VarientCaseLabels := ConstExpression [ '..' ConstExpression ]
first symbols:identtok, stringtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- SetType := ( 'SET' | 'PACKEDSET' ) 'OF' SimpleType
+ SetType := ( 'SET' | 'PACKEDSET' ) 'OF' SimpleType
first symbols:oftok, packedsettok, settok
-
+
cannot reachend
*/
/*
- PointerType := 'POINTER' 'TO' Type
+ PointerType := 'POINTER' 'TO' Type
first symbols:pointertok
-
+
cannot reachend
*/
/*
- ProcedureType := 'PROCEDURE' [ FormalTypeList ]
+ ProcedureType := 'PROCEDURE' [ FormalTypeList ]
first symbols:proceduretok
-
+
cannot reachend
*/
/*
- FormalTypeList := '(' ( ')' FormalReturn |
- ProcedureParameters ')'
- FormalReturn )
+ FormalTypeList := '(' ( ')' FormalReturn |
+ ProcedureParameters ')'
+ FormalReturn )
first symbols:lparatok
-
+
cannot reachend
*/
/*
- FormalReturn := [ ':' OptReturnType ]
+ FormalReturn := [ ':' OptReturnType ]
first symbols:colontok
-
+
reachend
*/
/*
- OptReturnType := '[' Qualident ']' |
- Qualident
+ OptReturnType := '[' Qualident ']' |
+ Qualident
first symbols:identtok, lsbratok
-
+
cannot reachend
*/
/*
- ProcedureParameters := ProcedureParameter { ','
- ProcedureParameter }
+ ProcedureParameters := ProcedureParameter { ','
+ ProcedureParameter }
first symbols:identtok, arraytok, periodperiodperiodtok, vartok
-
+
cannot reachend
*/
/*
- ProcedureParameter := '...' | 'VAR' FormalType |
- FormalType
+ ProcedureParameter := '...' | 'VAR' FormalType |
+ FormalType
first symbols:identtok, arraytok, vartok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- VarIdent := Ident [ '[' ConstExpression
+ VarIdent := Ident [ '[' ConstExpression
% VAR n: node ; %
-
+
% n := pop () %
- ']' ]
+ ']' ]
first symbols:identtok
-
+
cannot reachend
*/
/*
- VarIdentList := VarIdent { ',' VarIdent }
+ VarIdentList := VarIdent { ',' VarIdent }
first symbols:identtok
-
+
cannot reachend
*/
/*
- VariableDeclaration := VarIdentList ':' Type Alignment
+ VariableDeclaration := VarIdentList ':' Type Alignment
first symbols:identtok
-
+
cannot reachend
*/
/*
- Designator := Qualident { SubDesignator }
+ Designator := Qualident { SubDesignator }
first symbols:identtok
-
+
cannot reachend
*/
/*
- SubDesignator := '.' Ident | '[' ArrayExpList ']' |
- '^'
+ SubDesignator := '.' Ident | '[' ArrayExpList ']' |
+ '^'
first symbols:uparrowtok, lsbratok, periodtok
-
+
cannot reachend
*/
/*
- ArrayExpList := Expression { ',' Expression }
+ ArrayExpList := Expression { ',' Expression }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- ExpList := Expression { ',' Expression }
+ ExpList := Expression { ',' Expression }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- Expression := SimpleExpression [ Relation SimpleExpression ]
+ Expression := SimpleExpression [ Relation SimpleExpression ]
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- SimpleExpression := UnaryOrTerm { AddOperator Term }
+ SimpleExpression := UnaryOrTerm { AddOperator Term }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- UnaryOrTerm := '+' Term | '-' Term |
- Term
+ UnaryOrTerm := '+' Term | '-' Term |
+ Term
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- Term := Factor { MulOperator Factor }
+ Term := Factor { MulOperator Factor }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok
-
+
cannot reachend
*/
/*
- Factor := Number | string | SetOrDesignatorOrFunction |
- '(' Expression ')' |
- 'NOT' ( Factor | ConstAttribute )
+ Factor := Number | string | SetOrDesignatorOrFunction |
+ '(' Expression ')' |
+ 'NOT' ( Factor | ConstAttribute )
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok
-
+
cannot reachend
*/
/*
- ComponentElement := Expression [ '..' Expression
-
+ ComponentElement := Expression [ '..' Expression
+
% ErrorArray ('implementation restriction range not allowed') %
- ]
+ ]
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- ComponentValue := ComponentElement [ 'BY'
+ ComponentValue := ComponentElement [ 'BY'
% ErrorArray ('implementation restriction BY not allowed') %
- Expression ]
+ Expression ]
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- ArraySetRecordValue := ComponentValue { ',' ComponentValue }
+ ArraySetRecordValue := ComponentValue { ',' ComponentValue }
first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- Constructor := '{' [ ArraySetRecordValue ] '}'
+ Constructor := '{' [ ArraySetRecordValue ] '}'
first symbols:lcbratok
-
+
cannot reachend
*/
/*
- SetOrDesignatorOrFunction := Qualident [ Constructor |
- SimpleDes
- [ ActualParameters ] ] |
- Constructor
+ SetOrDesignatorOrFunction := Qualident [ Constructor |
+ SimpleDes
+ [ ActualParameters ] ] |
+ Constructor
first symbols:lcbratok, identtok
-
+
cannot reachend
*/
/*
- SimpleDes := { SubDesignator }
+ SimpleDes := { SubDesignator }
first symbols:periodtok, lsbratok, uparrowtok
-
+
reachend
*/
/*
- ActualParameters := '(' [ ExpList ] ')'
+ ActualParameters := '(' [ ExpList ] ')'
first symbols:lparatok
-
+
cannot reachend
*/
/*
- ExitStatement := 'EXIT'
+ ExitStatement := 'EXIT'
first symbols:exittok
-
+
cannot reachend
*/
/*
- ReturnStatement := 'RETURN' [ Expression ]
+ ReturnStatement := 'RETURN' [ Expression ]
first symbols:returntok
-
+
cannot reachend
*/
/*
- Statement := [ AssignmentOrProcedureCall |
- IfStatement | CaseStatement |
- WhileStatement |
- RepeatStatement |
- LoopStatement | ForStatement |
- WithStatement | AsmStatement |
- ExitStatement | ReturnStatement |
- RetryStatement ]
+ Statement := [ AssignmentOrProcedureCall |
+ IfStatement | CaseStatement |
+ WhileStatement |
+ RepeatStatement |
+ LoopStatement | ForStatement |
+ WithStatement | AsmStatement |
+ ExitStatement | ReturnStatement |
+ RetryStatement ]
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok
-
+
reachend
*/
/*
- RetryStatement := 'RETRY'
+ RetryStatement := 'RETRY'
first symbols:retrytok
-
+
cannot reachend
*/
/*
- AssignmentOrProcedureCall := Designator ( ':=' Expression |
- ActualParameters |
-
+ AssignmentOrProcedureCall := Designator ( ':=' Expression |
+ ActualParameters |
+
% epsilon %
- )
+ )
first symbols:identtok
-
+
cannot reachend
*/
/*
- StatementSequence := Statement { ';' Statement }
+ StatementSequence := Statement { ';' Statement }
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok
-
+
reachend
*/
/*
- IfStatement := 'IF' Expression 'THEN' StatementSequence
- { 'ELSIF' Expression 'THEN' StatementSequence }
- [ 'ELSE' StatementSequence ] 'END'
+ IfStatement := 'IF' Expression 'THEN' StatementSequence
+ { 'ELSIF' Expression 'THEN' StatementSequence }
+ [ 'ELSE' StatementSequence ] 'END'
first symbols:iftok
-
+
cannot reachend
*/
/*
- CaseStatement := 'CASE' Expression 'OF' Case { '|'
- Case }
- CaseEndStatement
+ CaseStatement := 'CASE' Expression 'OF' Case { '|'
+ Case }
+ CaseEndStatement
first symbols:casetok
-
+
cannot reachend
*/
/*
- CaseEndStatement := 'END' | 'ELSE' StatementSequence
- 'END'
+ CaseEndStatement := 'END' | 'ELSE' StatementSequence
+ 'END'
first symbols:elsetok, endtok
-
+
cannot reachend
*/
/*
- Case := [ CaseLabelList ':' StatementSequence ]
+ Case := [ CaseLabelList ':' StatementSequence ]
first symbols:identtok, stringtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
reachend
*/
/*
- CaseLabelList := CaseLabels { ',' CaseLabels }
+ CaseLabelList := CaseLabels { ',' CaseLabels }
first symbols:identtok, attributetok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- CaseLabels := ConstExpression [ '..' ConstExpression ]
+ CaseLabels := ConstExpression [ '..' ConstExpression ]
first symbols:identtok, stringtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- WhileStatement := 'WHILE' Expression 'DO' StatementSequence
- 'END'
+ WhileStatement := 'WHILE' Expression 'DO' StatementSequence
+ 'END'
first symbols:whiletok
-
+
cannot reachend
*/
/*
- RepeatStatement := 'REPEAT' StatementSequence 'UNTIL'
- Expression
+ RepeatStatement := 'REPEAT' StatementSequence 'UNTIL'
+ Expression
first symbols:repeattok
-
+
cannot reachend
*/
/*
- ForStatement := 'FOR' Ident ':=' Expression 'TO'
- Expression [ 'BY' ConstExpression ]
- 'DO' StatementSequence 'END'
+ ForStatement := 'FOR' Ident ':=' Expression 'TO'
+ Expression [ 'BY' ConstExpression ]
+ 'DO' StatementSequence 'END'
first symbols:fortok
-
+
cannot reachend
*/
/*
- LoopStatement := 'LOOP' StatementSequence 'END'
+ LoopStatement := 'LOOP' StatementSequence 'END'
first symbols:looptok
-
+
cannot reachend
*/
/*
- WithStatement := 'WITH' Designator 'DO' StatementSequence
- 'END'
+ WithStatement := 'WITH' Designator 'DO' StatementSequence
+ 'END'
first symbols:withtok
-
+
cannot reachend
*/
/*
- ProcedureDeclaration := ProcedureHeading ';' ProcedureBlock
- Ident
+ ProcedureDeclaration := ProcedureHeading ';' ProcedureBlock
+ Ident
% leaveScope %
-
+
first symbols:proceduretok
-
+
cannot reachend
*/
/*
- ProcedureIdent := Ident
+ ProcedureIdent := Ident
% curproc := lookupSym (curident) %
-
+
% enterScope (curproc) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
/*
- DefProcedureIdent := Ident
+ DefProcedureIdent := Ident
% curproc := lookupSym (curident) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
/*
- DefineBuiltinProcedure := [ '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' Ident ')' ')' |
- '__INLINE__' ]
+ DefineBuiltinProcedure := [ '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' Ident ')' ')' |
+ '__INLINE__' ]
first symbols:inlinetok, attributetok
-
+
reachend
*/
/*
- ProcedureHeading := 'PROCEDURE' DefineBuiltinProcedure
- ( ProcedureIdent [ FormalParameters ]
- AttributeNoReturn )
+ ProcedureHeading := 'PROCEDURE' DefineBuiltinProcedure
+ ( ProcedureIdent [ FormalParameters ]
+ AttributeNoReturn )
first symbols:proceduretok
-
+
cannot reachend
*/
/*
- Builtin := [ '__BUILTIN__' | '__INLINE__' ]
+ Builtin := [ '__BUILTIN__' | '__INLINE__' ]
first symbols:inlinetok, builtintok
-
+
reachend
*/
/*
- DefProcedureHeading := 'PROCEDURE' Builtin ( DefProcedureIdent
- [ DefFormalParameters ]
- AttributeNoReturn )
+ DefProcedureHeading := 'PROCEDURE' Builtin ( DefProcedureIdent
+ [ DefFormalParameters ]
+ AttributeNoReturn )
first symbols:proceduretok
-
+
cannot reachend
*/
/*
- ProcedureBlock := { Declaration } [ 'BEGIN' ProcedureBlockBody ]
- 'END'
+ ProcedureBlock := { Declaration } [ 'BEGIN' ProcedureBlockBody ]
+ 'END'
first symbols:proceduretok, moduletok, consttok, typetok, vartok, endtok, begintok
-
+
cannot reachend
*/
/*
- Block := { Declaration } InitialBlock FinalBlock
- 'END'
+ Block := { Declaration } InitialBlock FinalBlock
+ 'END'
first symbols:proceduretok, moduletok, finallytok, begintok, consttok, typetok, vartok, endtok
-
+
cannot reachend
*/
/*
- InitialBlock := [ 'BEGIN' InitialBlockBody ]
+ InitialBlock := [ 'BEGIN' InitialBlockBody ]
first symbols:begintok
-
+
reachend
*/
/*
- FinalBlock := [ 'FINALLY' FinalBlockBody ]
+ FinalBlock := [ 'FINALLY' FinalBlockBody ]
first symbols:finallytok
-
+
reachend
*/
/*
- InitialBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ InitialBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
/*
- FinalBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ FinalBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
/*
- ProcedureBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
+ ProcedureBlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
/*
- NormalPart := StatementSequence
+ NormalPart := StatementSequence
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok, semicolontok
-
+
reachend
*/
/*
- ExceptionalPart := StatementSequence
+ ExceptionalPart := StatementSequence
first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok, semicolontok
-
+
reachend
*/
/*
- Declaration := 'CONST' { ConstantDeclaration ';' } |
- 'TYPE' { TypeDeclaration } |
- 'VAR' { VariableDeclaration ';' } |
- ProcedureDeclaration ';' |
- ModuleDeclaration ';'
+ Declaration := 'CONST' { ConstantDeclaration ';' } |
+ 'TYPE' { TypeDeclaration } |
+ 'VAR' { VariableDeclaration ';' } |
+ ProcedureDeclaration ';' |
+ ModuleDeclaration ';'
first symbols:moduletok, proceduretok, vartok, typetok, consttok
-
+
cannot reachend
*/
/*
- DefFormalParameters := '('
+ DefFormalParameters := '('
% paramEnter (curproc) %
- [ DefMultiFPSection ] ')'
-
+ [ DefMultiFPSection ] ')'
+
% paramLeave (curproc) %
- FormalReturn
+ FormalReturn
first symbols:lparatok
-
+
cannot reachend
*/
/*
- DefMultiFPSection := DefExtendedFP |
- FPSection [ ';' DefMultiFPSection ]
+ DefMultiFPSection := DefExtendedFP |
+ FPSection [ ';' DefMultiFPSection ]
first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- FormalParameters := '('
+ FormalParameters := '('
% paramEnter (curproc) %
- [ MultiFPSection ] ')'
+ [ MultiFPSection ] ')'
% paramLeave (curproc) %
- FormalReturn
+ FormalReturn
first symbols:lparatok
-
+
cannot reachend
*/
/*
- AttributeNoReturn := [ '' ]
+ AttributeNoReturn := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
/*
- AttributeUnused := [ '' ]
+ AttributeUnused := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
/*
- MultiFPSection := ExtendedFP | FPSection [ ';'
- MultiFPSection ]
+ MultiFPSection := ExtendedFP | FPSection [ ';'
+ MultiFPSection ]
first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- FPSection := NonVarFPSection |
- VarFPSection
+ FPSection := NonVarFPSection |
+ VarFPSection
first symbols:vartok, identtok
-
+
cannot reachend
*/
/*
- DefExtendedFP := DefOptArg | '...'
+ DefExtendedFP := DefOptArg | '...'
first symbols:lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- ExtendedFP := OptArg | '...'
+ ExtendedFP := OptArg | '...'
first symbols:lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- VarFPSection := 'VAR' PushIdentList ':' FormalType
- [ AttributeUnused ]
+ VarFPSection := 'VAR' PushIdentList ':' FormalType
+ [ AttributeUnused ]
first symbols:vartok
-
+
cannot reachend
*/
/*
- NonVarFPSection := PushIdentList ':' FormalType
- [ AttributeUnused ]
+ NonVarFPSection := PushIdentList ':' FormalType
+ [ AttributeUnused ]
first symbols:identtok
-
+
cannot reachend
*/
/*
- OptArg := '[' Ident ':' FormalType [ '=' ConstExpression ]
- ']'
+ OptArg := '[' Ident ':' FormalType [ '=' ConstExpression ]
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- DefOptArg := '[' Ident ':' FormalType '=' ConstExpression
- ']'
+ DefOptArg := '[' Ident ':' FormalType '=' ConstExpression
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- FormalType := { 'ARRAY' 'OF' } PushQualident
+ FormalType := { 'ARRAY' 'OF' } PushQualident
first symbols:identtok, arraytok
-
+
cannot reachend
*/
/*
- ModuleDeclaration := 'MODULE' Ident [ Priority ]
- ';' { Import } [ Export ]
- Block Ident
+ ModuleDeclaration := 'MODULE' Ident [ Priority ]
+ ';' { Import } [ Export ]
+ Block Ident
first symbols:moduletok
-
+
cannot reachend
*/
/*
- Priority := '[' ConstExpression ']'
+ Priority := '[' ConstExpression ']'
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- Export := 'EXPORT' ( 'QUALIFIED' IdentList |
- 'UNQUALIFIED' IdentList |
- IdentList ) ';'
+ Export := 'EXPORT' ( 'QUALIFIED' IdentList |
+ 'UNQUALIFIED' IdentList |
+ IdentList ) ';'
first symbols:exporttok
-
+
cannot reachend
*/
/*
- FromIdentList := Ident { ',' Ident }
+ FromIdentList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
/*
- FromImport := 'FROM' Ident 'IMPORT' FromIdentList
- ';'
+ FromImport := 'FROM' Ident 'IMPORT' FromIdentList
+ ';'
first symbols:fromtok
-
+
cannot reachend
*/
/*
- ImportModuleList := Ident { ',' Ident }
+ ImportModuleList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
/*
- WithoutFromImport := 'IMPORT' ImportModuleList ';'
+ WithoutFromImport := 'IMPORT' ImportModuleList ';'
first symbols:importtok
-
+
cannot reachend
*/
/*
- Import := FromImport | WithoutFromImport
+ Import := FromImport | WithoutFromImport
first symbols:importtok, fromtok
-
+
cannot reachend
*/
/*
- DefinitionModule := 'DEFINITION' 'MODULE' [ 'FOR'
- string ]
- Ident
+ DefinitionModule := 'DEFINITION' 'MODULE' [ 'FOR'
+ string ]
+ Ident
% curmodule := lookupDef (curident) %
-
+
% addCommentBody (curmodule) %
- ';'
+ ';'
% enterScope (curmodule) %
-
+
% resetConstExpPos (curmodule) %
- { Import } [ Export ] { Definition }
- 'END' Ident '.'
+ { Import } [ Export ] { Definition }
+ 'END' Ident '.'
% checkEndName (curmodule, curident, 'definition module') %
-
+
% leaveScope %
-
+
first symbols:definitiontok
-
+
cannot reachend
*/
/*
- PushQualident := Ident
+ PushQualident := Ident
% typeExp := push (lookupSym (curident)) %
-
+
% IF typeExp = NIL
THEN
metaError1 ('the symbol {%1k} is not visible in this scope (or any other nested scope)', curident)
END %
- [ '.'
+ [ '.'
% IF NOT isDef (typeExp)
THEN
ErrorArray ('the first component of this qualident must be a definition module')
END %
- Ident
+ Ident
% typeExp := replace (lookupInScope (typeExp, curident)) ;
IF typeExp=NIL
THEN
ErrorArray ('identifier not found in definition module')
END %
- ]
+ ]
first symbols:identtok
-
+
cannot reachend
*/
/*
- OptSubrange := [ SubrangeType ]
+ OptSubrange := [ SubrangeType ]
first symbols:lsbratok
-
+
reachend
*/
/*
- TypeEquiv := PushQualident OptSubrange
+ TypeEquiv := PushQualident OptSubrange
first symbols:identtok
-
+
cannot reachend
*/
/*
- EnumIdentList := Ident { ',' Ident }
+ EnumIdentList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
/*
- Enumeration := '(' EnumIdentList ')'
+ Enumeration := '(' EnumIdentList ')'
first symbols:lparatok
-
+
cannot reachend
*/
/*
- SimpleType := TypeEquiv | Enumeration |
- SubrangeType
+ SimpleType := TypeEquiv | Enumeration |
+ SubrangeType
first symbols:lsbratok, lparatok, identtok
-
+
cannot reachend
*/
/*
- Type := SimpleType | ArrayType | RecordType |
- SetType | PointerType | ProcedureType
+ Type := SimpleType | ArrayType | RecordType |
+ SetType | PointerType | ProcedureType
first symbols:proceduretok, pointertok, settok, packedsettok, oftok, recordtok, arraytok, identtok, lparatok, lsbratok
-
+
cannot reachend
*/
/*
- TypeDeclaration := { Ident ( ';' | '=' Type Alignment
- ';' ) }
+ TypeDeclaration := { Ident ( ';' | '=' Type Alignment
+ ';' ) }
first symbols:identtok
-
+
reachend
*/
/*
- DefQualident := Ident
+ DefQualident := Ident
% typeExp := lookupSym (curident) %
- [ '.'
+ [ '.'
% IF NOT isDef (typeExp)
THEN
ErrorArray ('the first component of this qualident must be a definition module')
END %
- Ident
+ Ident
% typeExp := lookupInScope (typeExp, curident) ;
IF typeExp=NIL
THEN
ErrorArray ('identifier not found in definition module')
END %
- ]
+ ]
first symbols:identtok
-
+
cannot reachend
*/
/*
- DefTypeEquiv := DefQualident OptSubrange
+ DefTypeEquiv := DefQualident OptSubrange
first symbols:identtok
-
+
cannot reachend
*/
/*
- DefEnumIdentList := Ident { ',' Ident }
+ DefEnumIdentList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
/*
- DefEnumeration := '(' DefEnumIdentList ')'
+ DefEnumeration := '(' DefEnumIdentList ')'
first symbols:lparatok
-
+
cannot reachend
*/
/*
- DefSimpleType := DefTypeEquiv | DefEnumeration |
- SubrangeType
+ DefSimpleType := DefTypeEquiv | DefEnumeration |
+ SubrangeType
first symbols:lsbratok, lparatok, identtok
-
+
cannot reachend
*/
/*
- DefType := DefSimpleType | ArrayType |
- RecordType | SetType | PointerType |
- ProcedureType
+ DefType := DefSimpleType | ArrayType |
+ RecordType | SetType | PointerType |
+ ProcedureType
first symbols:proceduretok, pointertok, settok, packedsettok, oftok, recordtok, arraytok, identtok, lparatok, lsbratok
-
+
cannot reachend
*/
/*
- DefTypeDeclaration := { Ident ( ';' | '=' DefType
- Alignment ';' ) }
+ DefTypeDeclaration := { Ident ( ';' | '=' DefType
+ Alignment ';' ) }
first symbols:identtok
-
+
reachend
*/
/*
- DefConstantDeclaration := Ident '=' ConstExpression
+ DefConstantDeclaration := Ident '=' ConstExpression
first symbols:identtok
-
+
cannot reachend
*/
/*
- Definition := 'CONST' { DefConstantDeclaration ';' } |
- 'TYPE' { DefTypeDeclaration } |
- 'VAR' { VariableDeclaration ';' } |
- DefProcedureHeading ';'
+ Definition := 'CONST' { DefConstantDeclaration ';' } |
+ 'TYPE' { DefTypeDeclaration } |
+ 'VAR' { VariableDeclaration ';' } |
+ DefProcedureHeading ';'
first symbols:proceduretok, vartok, typetok, consttok
-
+
cannot reachend
*/
/*
- AsmStatement := 'ASM' [ 'VOLATILE' ] '(' AsmOperands
- ')'
+ AsmStatement := 'ASM' [ 'VOLATILE' ] '(' AsmOperands
+ ')'
first symbols:asmtok
-
+
cannot reachend
*/
/*
- AsmOperands := string [ AsmOperandSpec ]
+ AsmOperands := string [ AsmOperandSpec ]
first symbols:stringtok
-
+
cannot reachend
*/
/*
- AsmOperandSpec := [ ':' AsmList [ ':' AsmList [
- ':' TrashList ] ] ]
+ AsmOperandSpec := [ ':' AsmList [ ':' AsmList [
+ ':' TrashList ] ] ]
first symbols:colontok
-
+
reachend
*/
/*
- AsmList := [ AsmElement ] { ',' AsmElement }
+ AsmList := [ AsmElement ] { ',' AsmElement }
first symbols:lsbratok, stringtok, commatok
-
+
reachend
*/
/*
- NamedOperand := '[' Ident ']'
+ NamedOperand := '[' Ident ']'
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- AsmOperandName := [ NamedOperand ]
+ AsmOperandName := [ NamedOperand ]
first symbols:lsbratok
-
+
reachend
*/
/*
- AsmElement := AsmOperandName string '(' Expression
- ')'
+ AsmElement := AsmOperandName string '(' Expression
+ ')'
first symbols:stringtok, lsbratok
-
+
cannot reachend
*/
/*
- TrashList := [ string ] { ',' string }
+ TrashList := [ string ] { ',' string }
first symbols:commatok, stringtok
-
+
reachend
*/
static void Real (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- FileUnit := DefinitionModule |
- ImplementationOrProgramModule
+ FileUnit := DefinitionModule |
+ ImplementationOrProgramModule
first symbols:implementationtok, moduletok, definitiontok
-
+
cannot reachend
*/
static void FileUnit (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ProgramModule := 'MODULE' Ident
+ ProgramModule := 'MODULE' Ident
% curmodule := lookupModule (curident) %
-
+
% addCommentBody (curmodule) %
-
+
% enterScope (curmodule) %
-
+
% resetConstExpPos (curmodule) %
- [ Priority ] ';' { Import } Block
- Ident
+ [ Priority ] ';' { Import } Block
+ Ident
% checkEndName (curmodule, curident, 'program module') %
-
+
% leaveScope %
- '.'
+ '.'
first symbols:moduletok
-
+
cannot reachend
*/
static void ProgramModule (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ImplementationModule := 'IMPLEMENTATION' 'MODULE'
- Ident
+ ImplementationModule := 'IMPLEMENTATION' 'MODULE'
+ Ident
% curmodule := lookupImp (curident) %
-
+
% addCommentBody (curmodule) %
-
+
% enterScope (lookupDef (curident)) %
-
+
% enterScope (curmodule) %
-
+
% resetConstExpPos (curmodule) %
- [ Priority ] ';' { Import }
- Block Ident
+ [ Priority ] ';' { Import }
+ Block Ident
% checkEndName (curmodule, curident, 'implementation module') %
-
+
% leaveScope ; leaveScope %
- '.'
+ '.'
first symbols:implementationtok
-
+
cannot reachend
*/
static void ImplementationModule (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ImplementationOrProgramModule := ImplementationModule |
- ProgramModule
+ ImplementationOrProgramModule := ImplementationModule |
+ ProgramModule
first symbols:moduletok, implementationtok
-
+
cannot reachend
*/
static void ImplementationOrProgramModule (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ConstInteger := Integer
+ ConstInteger := Integer
% VAR i: node ; %
-
+
% i := pop () %
-
+
first symbols:integertok
-
+
cannot reachend
*/
static void ConstInteger (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ConstReal := Real
+ ConstReal := Real
% VAR r: node ; %
-
+
% r := pop () %
-
+
first symbols:realtok
-
+
cannot reachend
*/
static void ConstReal (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ConstNumber := ConstInteger | ConstReal
+ ConstNumber := ConstInteger | ConstReal
first symbols:realtok, integertok
-
+
cannot reachend
*/
static void ConstNumber (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- Number := Integer | Real
+ Number := Integer | Real
first symbols:realtok, integertok
-
+
cannot reachend
*/
static void Number (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- Qualident := Ident { '.' Ident }
+ Qualident := Ident { '.' Ident }
first symbols:identtok
-
+
cannot reachend
*/
static void Qualident (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ConstantDeclaration := Ident '=' ConstExpressionNop
+ ConstantDeclaration := Ident '=' ConstExpressionNop
first symbols:identtok
-
+
cannot reachend
*/
static void ConstantDeclaration (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ConstExpressionNop :=
+ ConstExpressionNop :=
% VAR c: node ; %
-
+
% c := getNextConstExp () %
- SimpleConstExpr [ Relation
- SimpleConstExpr ]
+ SimpleConstExpr [ Relation
+ SimpleConstExpr ]
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void ConstExpressionNop (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ConstExpression :=
+ ConstExpression :=
% VAR c: node ; %
-
+
% c := push (getNextConstExp ()) %
- SimpleConstExpr [ Relation SimpleConstExpr ]
+ SimpleConstExpr [ Relation SimpleConstExpr ]
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void ConstExpression (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- Relation := '=' | '#' | '<>' | '<' | '<=' |
- '>' | '>=' | 'IN'
+ Relation := '=' | '#' | '<>' | '<' | '<=' |
+ '>' | '>=' | 'IN'
first symbols:intok, greaterequaltok, greatertok, lessequaltok, lesstok, lessgreatertok, hashtok, equaltok
-
+
cannot reachend
*/
static void Relation (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- SimpleConstExpr := UnaryOrConstTerm { AddOperator
- ConstTerm }
+ SimpleConstExpr := UnaryOrConstTerm { AddOperator
+ ConstTerm }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void SimpleConstExpr (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- UnaryOrConstTerm := '+' ConstTerm |
- '-' ConstTerm |
- ConstTerm
+ UnaryOrConstTerm := '+' ConstTerm |
+ '-' ConstTerm |
+ ConstTerm
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void UnaryOrConstTerm (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- AddOperator := '+' | '-' | 'OR'
+ AddOperator := '+' | '-' | 'OR'
first symbols:ortok, minustok, plustok
-
+
cannot reachend
*/
static void AddOperator (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ConstTerm := ConstFactor { MulOperator ConstFactor }
+ ConstTerm := ConstFactor { MulOperator ConstFactor }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok
-
+
cannot reachend
*/
static void ConstTerm (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- MulOperator := '*' | '/' | 'DIV' | 'MOD' |
- 'REM' | 'AND' | '&'
+ MulOperator := '*' | '/' | 'DIV' | 'MOD' |
+ 'REM' | 'AND' | '&'
first symbols:ambersandtok, andtok, remtok, modtok, divtok, dividetok, timestok
-
+
cannot reachend
*/
static void MulOperator (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- NotConstFactor := 'NOT' ConstFactor
+ NotConstFactor := 'NOT' ConstFactor
% VAR n: node ; %
-
+
% n := push (makeUnaryTok (nottok, pop ())) %
-
+
first symbols:nottok
-
+
cannot reachend
*/
static void NotConstFactor (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ConstFactor := ConstNumber | ConstString |
- ConstSetOrQualidentOrFunction |
- '(' ConstExpressionNop ')' |
- NotConstFactor |
- ConstAttribute
+ ConstFactor := ConstNumber | ConstString |
+ ConstSetOrQualidentOrFunction |
+ '(' ConstExpressionNop ')' |
+ NotConstFactor |
+ ConstAttribute
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok
-
+
cannot reachend
*/
static void ConstFactor (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ConstString := string
+ ConstString := string
first symbols:stringtok
-
+
cannot reachend
*/
static void ConstString (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ConstComponentElement := ConstExpressionNop [ '..'
- ConstExpressionNop ]
+ ConstComponentElement := ConstExpressionNop [ '..'
+ ConstExpressionNop ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ConstComponentElement (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ConstComponentValue := ConstComponentElement [ 'BY'
- ConstExpressionNop ]
+ ConstComponentValue := ConstComponentElement [ 'BY'
+ ConstExpressionNop ]
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void ConstComponentValue (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ConstArraySetRecordValue := ConstComponentValue
- { ',' ConstComponentValue }
+ ConstArraySetRecordValue := ConstComponentValue
+ { ',' ConstComponentValue }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ConstArraySetRecordValue (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ConstConstructor := '{' [ ConstArraySetRecordValue ]
- '}'
+ ConstConstructor := '{' [ ConstArraySetRecordValue ]
+ '}'
first symbols:lcbratok
-
+
cannot reachend
*/
static void ConstConstructor (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ConstSetOrQualidentOrFunction := Qualident [ ConstConstructor |
- ConstActualParameters ] |
- ConstConstructor
+ ConstSetOrQualidentOrFunction := Qualident [ ConstConstructor |
+ ConstActualParameters ] |
+ ConstConstructor
first symbols:lcbratok, identtok
-
+
cannot reachend
*/
static void ConstSetOrQualidentOrFunction (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ConstActualParameters := '(' [ ConstExpList ] ')'
+ ConstActualParameters := '(' [ ConstExpList ] ')'
first symbols:lparatok
-
+
cannot reachend
*/
static void ConstActualParameters (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ConstExpList := ConstExpressionNop { ',' ConstExpressionNop }
+ ConstExpList := ConstExpressionNop { ',' ConstExpressionNop }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ConstExpList (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' ConstAttributeExpression
- ')' ')'
+ ConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' ConstAttributeExpression
+ ')' ')'
first symbols:attributetok
-
+
cannot reachend
*/
static void ConstAttribute (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ConstAttributeExpression := Ident | '<' Qualident
- ',' Ident '>'
+ ConstAttributeExpression := Ident | '<' Qualident
+ ',' Ident '>'
first symbols:lesstok, identtok
-
+
cannot reachend
*/
static void ConstAttributeExpression (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ByteAlignment := ''
+ ByteAlignment := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
static void ByteAlignment (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- OptAlignmentExpression := [ AlignmentExpression ]
+ OptAlignmentExpression := [ AlignmentExpression ]
first symbols:lparatok
-
+
reachend
*/
static void OptAlignmentExpression (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- AlignmentExpression := '(' ConstExpressionNop ')'
+ AlignmentExpression := '(' ConstExpressionNop ')'
first symbols:lparatok
-
+
cannot reachend
*/
static void AlignmentExpression (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- Alignment := [ ByteAlignment ]
+ Alignment := [ ByteAlignment ]
first symbols:ldirectivetok
-
+
reachend
*/
static void Alignment (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- IdentList := Ident { ',' Ident }
+ IdentList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
static void IdentList (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- SubrangeType := '[' ConstExpressionNop '..' ConstExpressionNop
- ']'
+ SubrangeType := '[' ConstExpressionNop '..' ConstExpressionNop
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
static void SubrangeType (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ArrayType := 'ARRAY' SimpleType { ',' SimpleType }
- 'OF' Type
+ ArrayType := 'ARRAY' SimpleType { ',' SimpleType }
+ 'OF' Type
first symbols:arraytok
-
+
cannot reachend
*/
static void ArrayType (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- RecordType := 'RECORD' [ DefaultRecordAttributes ]
- FieldListSequence 'END'
+ RecordType := 'RECORD' [ DefaultRecordAttributes ]
+ FieldListSequence 'END'
first symbols:recordtok
-
+
cannot reachend
*/
static void RecordType (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- DefaultRecordAttributes := ''
+ DefaultRecordAttributes := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
static void DefaultRecordAttributes (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- RecordFieldPragma := [ '' ]
+ RecordFieldPragma := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
static void RecordFieldPragma (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- FieldPragmaExpression := Ident PragmaConstExpression
+ FieldPragmaExpression := Ident PragmaConstExpression
first symbols:identtok
-
+
cannot reachend
*/
static void FieldPragmaExpression (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- PragmaConstExpression := [ '(' ConstExpressionNop
- ')' ]
+ PragmaConstExpression := [ '(' ConstExpressionNop
+ ')' ]
first symbols:lparatok
-
+
reachend
*/
static void PragmaConstExpression (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- AttributeExpression := Ident '(' ConstExpressionNop
- ')'
+ AttributeExpression := Ident '(' ConstExpressionNop
+ ')'
first symbols:identtok
-
+
cannot reachend
*/
static void AttributeExpression (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- FieldListSequence := FieldListStatement { ';' FieldListStatement }
+ FieldListSequence := FieldListStatement { ';' FieldListStatement }
first symbols:casetok, identtok, semicolontok
-
+
reachend
*/
static void FieldListSequence (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- FieldListStatement := [ FieldList ]
+ FieldListStatement := [ FieldList ]
first symbols:identtok, casetok
-
+
reachend
*/
static void FieldListStatement (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- FieldList := IdentList ':' Type RecordFieldPragma |
- 'CASE' CaseTag 'OF' Varient { '|' Varient }
- [ 'ELSE' FieldListSequence ] 'END'
+ FieldList := IdentList ':' Type RecordFieldPragma |
+ 'CASE' CaseTag 'OF' Varient { '|' Varient }
+ [ 'ELSE' FieldListSequence ] 'END'
first symbols:casetok, identtok
-
+
cannot reachend
*/
static void FieldList (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- TagIdent := Ident |
+ TagIdent := Ident |
% curident := NulName %
-
+
first symbols:identtok
-
+
reachend
*/
static void TagIdent (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- CaseTag := TagIdent [ ':' Qualident ]
+ CaseTag := TagIdent [ ':' Qualident ]
first symbols:colontok, identtok
-
+
reachend
*/
static void CaseTag (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- Varient := [ VarientCaseLabelList ':' FieldListSequence ]
+ Varient := [ VarientCaseLabelList ':' FieldListSequence ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
reachend
*/
static void Varient (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- VarientCaseLabelList := VarientCaseLabels { ','
- VarientCaseLabels }
+ VarientCaseLabelList := VarientCaseLabels { ','
+ VarientCaseLabels }
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void VarientCaseLabelList (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- VarientCaseLabels := ConstExpressionNop [ '..' ConstExpressionNop ]
+ VarientCaseLabels := ConstExpressionNop [ '..' ConstExpressionNop ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void VarientCaseLabels (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- SetType := ( 'SET' | 'PACKEDSET' ) 'OF' SimpleType
+ SetType := ( 'SET' | 'PACKEDSET' ) 'OF' SimpleType
first symbols:oftok, packedsettok, settok
-
+
cannot reachend
*/
static void SetType (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- PointerType := 'POINTER' 'TO' Type
+ PointerType := 'POINTER' 'TO' Type
first symbols:pointertok
-
+
cannot reachend
*/
static void PointerType (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ProcedureType := 'PROCEDURE' [ FormalTypeList ]
+ ProcedureType := 'PROCEDURE' [ FormalTypeList ]
first symbols:proceduretok
-
+
cannot reachend
*/
static void ProcedureType (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- FormalTypeList := '(' ( ')' FormalReturn |
- ProcedureParameters ')'
- FormalReturn )
+ FormalTypeList := '(' ( ')' FormalReturn |
+ ProcedureParameters ')'
+ FormalReturn )
first symbols:lparatok
-
+
cannot reachend
*/
static void FormalTypeList (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- FormalReturn := [ ':' OptReturnType ]
+ FormalReturn := [ ':' OptReturnType ]
first symbols:colontok
-
+
reachend
*/
static void FormalReturn (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- OptReturnType := '[' Qualident ']' |
- Qualident
+ OptReturnType := '[' Qualident ']' |
+ Qualident
first symbols:identtok, lsbratok
-
+
cannot reachend
*/
static void OptReturnType (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ProcedureParameters := ProcedureParameter { ','
- ProcedureParameter }
+ ProcedureParameters := ProcedureParameter { ','
+ ProcedureParameter }
first symbols:identtok, arraytok, periodperiodperiodtok, vartok
-
+
cannot reachend
*/
static void ProcedureParameters (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ProcedureParameter := '...' | 'VAR' FormalType |
- FormalType
+ ProcedureParameter := '...' | 'VAR' FormalType |
+ FormalType
first symbols:arraytok, identtok, vartok, periodperiodperiodtok
-
+
cannot reachend
*/
static void ProcedureParameter (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- VarIdent := Ident [ '[' ConstExpressionNop ']' ]
+ VarIdent := Ident [ '[' ConstExpressionNop ']' ]
first symbols:identtok
-
+
cannot reachend
*/
static void VarIdent (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- VarIdentList := VarIdent { ',' VarIdent }
+ VarIdentList := VarIdent { ',' VarIdent }
first symbols:identtok
-
+
cannot reachend
*/
static void VarIdentList (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- VariableDeclaration := VarIdentList ':' Type Alignment
+ VariableDeclaration := VarIdentList ':' Type Alignment
first symbols:identtok
-
+
cannot reachend
*/
static void VariableDeclaration (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- Designator := PushQualident { SubDesignator }
+ Designator := PushQualident { SubDesignator }
first symbols:identtok
-
+
cannot reachend
*/
static void Designator (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- SubDesignator :=
+ SubDesignator :=
% VAR n, field, type: node ; %
-
+
% n := peep () %
-
+
% IF n = NIL
THEN
ErrorArray ('no expression found') ;
flushErrors ;
RETURN
END %
-
+
% type := skipType (getType (n)) %
- ( '.' Ident
+ ( '.' Ident
% IF isRecord (type)
THEN
field := lookupInScope (type, curident) ;
ELSE
metaError2 ('attempting to access a field {%1k} from {%2ad} which does not have a record type', curident, type)
END %
- | '[' ArrayExpList
+ | '[' ArrayExpList
% IF isArray (type)
THEN
n := replace (makeArrayRef (n, pop ()))
ELSE
metaError1 ('attempting to access an array but the expression is not an array but a {%1d}', type)
END %
- ']' | SubPointer )
+ ']' | SubPointer )
first symbols:uparrowtok, lsbratok, periodtok
-
+
cannot reachend
*/
static void SubDesignator (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- SubPointer :=
+ SubPointer :=
% VAR n, field, type: node ; %
-
+
% n := peep () %
-
+
% type := skipType (getType (n)) %
- '^' ( '.' Ident
+ '^' ( '.' Ident
% IF isPointer (type)
THEN
type := skipType (getType (type)) ;
ELSE
metaError2 ('trying to dereference {%1k} which was not declared as a pointer but a {%2tad}', n, n)
END %
- |
+ |
% IF isPointer (type)
THEN
n := replace (makeDeRef (n))
ELSE
metaError1 ('attempting to dereference a pointer but the expression is not a pointer but a {%1d}', type)
END %
- )
+ )
first symbols:uparrowtok
-
+
cannot reachend
*/
static void SubPointer (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ArrayExpList :=
+ ArrayExpList :=
% VAR l: node ; %
-
+
% l := push (makeExpList ()) %
- Expression
+ Expression
% putExpList (l, pop ()) %
-
+
% assert (isExpList (peep ())) %
- { ',' Expression
+ { ',' Expression
% putExpList (l, pop ()) %
-
+
% assert (isExpList (peep ())) %
- }
+ }
first symbols:identtok, lcbratok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ArrayExpList (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ExpList :=
+ ExpList :=
% VAR p, n: node ; %
-
+
% p := peep () %
-
+
% assert (isExpList (p)) %
- Expression
+ Expression
% putExpList (p, pop ()) %
-
+
% assert (isExpList (peep ())) %
- { ',' Expression
+ { ',' Expression
% putExpList (p, pop ()) %
-
+
% assert (isExpList (peep ())) %
- }
+ }
first symbols:identtok, lcbratok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ExpList (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- Expression :=
+ Expression :=
% VAR c, l, r: node ; op: toktype ; %
- SimpleExpression
+ SimpleExpression
% op := currenttoken %
- [ Relation
+ [ Relation
% l := pop () %
- SimpleExpression
+ SimpleExpression
% r := pop () %
-
+
% r := push (makeBinaryTok (op, l, r)) %
- ]
+ ]
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void Expression (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- SimpleExpression :=
+ SimpleExpression :=
% VAR op: toktype ; n: node ; %
- UnaryOrTerm {
+ UnaryOrTerm {
% op := currenttoken %
-
+
% n := pop () %
- AddOperator Term
-
+ AddOperator Term
+
% n := push (makeBinaryTok (op, n, pop ())) %
- }
+ }
first symbols:identtok, lcbratok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void SimpleExpression (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- UnaryOrTerm :=
+ UnaryOrTerm :=
% VAR n: node ; %
- '+' Term
+ '+' Term
% n := push (makeUnaryTok (plustok, pop ())) %
- | '-' Term
+ | '-' Term
% n := push (makeUnaryTok (minustok, pop ())) %
- | Term
+ | Term
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void UnaryOrTerm (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- Term :=
+ Term :=
% VAR op: toktype ; n: node ; %
- Factor {
+ Factor {
% op := currenttoken %
- MulOperator
+ MulOperator
% n := pop () %
- Factor
+ Factor
% n := push (makeBinaryTok (op, n, pop ())) %
- }
+ }
first symbols:identtok, lcbratok, realtok, integertok, stringtok, lparatok, nottok
-
+
cannot reachend
*/
static void Term (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- PushString := string
+ PushString := string
% VAR n: node ; %
-
+
% n := push (makeString (curstring)) %
-
+
first symbols:stringtok
-
+
cannot reachend
*/
static void PushString (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- Factor := Number | PushString | SetOrDesignatorOrFunction |
- '(' Expression ')' |
- 'NOT' ( Factor
+ Factor := Number | PushString | SetOrDesignatorOrFunction |
+ '(' Expression ')' |
+ 'NOT' ( Factor
% VAR n: node ; %
-
+
% n := push (makeUnaryTok (nottok, pop ())) %
- | ConstAttribute
+ | ConstAttribute
% n := push (makeUnaryTok (nottok, pop ())) %
- )
+ )
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok
-
+
cannot reachend
*/
static void Factor (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ComponentElement := Expression
+ ComponentElement := Expression
% VAR l, h, n: node ; %
-
+
% l := pop () %
-
+
% h := NIL %
- [ '..' Expression
+ [ '..' Expression
% h := pop () %
-
+
% ErrorArray ('implementation restriction range is not allowed') %
- ]
+ ]
% n := push (includeSetValue (pop (), l, h)) %
-
+
first symbols:identtok, lcbratok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ComponentElement (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ComponentValue := ComponentElement [ 'BY'
+ ComponentValue := ComponentElement [ 'BY'
% ErrorArray ('implementation restriction BY not allowed') %
- Expression ]
+ Expression ]
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void ComponentValue (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ArraySetRecordValue := ComponentValue { ',' ComponentValue }
+ ArraySetRecordValue := ComponentValue { ',' ComponentValue }
first symbols:identtok, lcbratok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void ArraySetRecordValue (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- Constructor := '{'
+ Constructor := '{'
% VAR n: node ; %
-
+
% n := push (makeSetValue ()) %
- [ ArraySetRecordValue ] '}'
+ [ ArraySetRecordValue ] '}'
first symbols:lcbratok
-
+
cannot reachend
*/
static void Constructor (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- SetOrDesignatorOrFunction := PushQualident
+ SetOrDesignatorOrFunction := PushQualident
% VAR q, p, n: node ; %
- [ Constructor
+ [ Constructor
% p := pop () %
-
+
% q := pop () %
-
+
% n := push (putSetValue (p, q)) %
- | SimpleDes [
+ | SimpleDes [
% q := pop () %
- ActualParameters
-
+ ActualParameters
+
% p := pop () %
-
+
% p := push (makeFuncCall (q, p)) %
- ] ] |
- Constructor
+ ] ] |
+ Constructor
first symbols:identtok, lcbratok
-
+
cannot reachend
*/
static void SetOrDesignatorOrFunction (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- SimpleDes := { SubDesignator }
+ SimpleDes := { SubDesignator }
first symbols:uparrowtok, periodtok, lsbratok
-
+
reachend
*/
static void SimpleDes (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ActualParameters := '('
+ ActualParameters := '('
% VAR n: node ; %
-
+
% n := push (makeExpList ()) %
- [ ExpList ] ')'
+ [ ExpList ] ')'
% assert (isExpList (peep ())) %
-
+
first symbols:lparatok
-
+
cannot reachend
*/
static void ActualParameters (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ExitStatement :=
+ ExitStatement :=
% VAR n: node ; %
- 'EXIT'
+ 'EXIT'
% IF loopNo = 0
THEN
ErrorArray ('EXIT can only be used inside a LOOP statement')
ELSE
n := pushStmt (makeExit (peepLoop (), loopNo))
END %
-
+
first symbols:exittok
-
+
cannot reachend
*/
static void ExitStatement (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ReturnStatement :=
+ ReturnStatement :=
% VAR n: node ; %
-
+
% n := pushStmt (makeReturn ()) %
- 'RETURN' [ Expression
+ 'RETURN' [ Expression
% putReturn (n, pop ()) %
- ]
+ ]
% addCommentBody (peepStmt ()) %
-
+
% addCommentAfter (peepStmt ()) %
-
+
% assert (isReturn (peepStmt ())) %
-
+
first symbols:returntok
-
+
cannot reachend
*/
static void ReturnStatement (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- Statement := ( AssignmentOrProcedureCall |
- IfStatement | CaseStatement |
- WhileStatement |
- RepeatStatement |
- LoopStatement | ForStatement |
- WithStatement | AsmStatement |
- ExitStatement | ReturnStatement |
- RetryStatement |
-
+ Statement := ( AssignmentOrProcedureCall |
+ IfStatement | CaseStatement |
+ WhileStatement |
+ RepeatStatement |
+ LoopStatement | ForStatement |
+ WithStatement | AsmStatement |
+ ExitStatement | ReturnStatement |
+ RetryStatement |
+
% VAR s: node ; %
-
+
% s := pushStmt (NIL) %
- )
+ )
first symbols:identtok, retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, returntok, exittok
-
+
reachend
*/
static void Statement (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- RetryStatement :=
+ RetryStatement :=
% VAR s: node ; %
-
+
% s := pushStmt (makeComment ("retry")) %
- 'RETRY'
+ 'RETRY'
first symbols:retrytok
-
+
cannot reachend
*/
static void RetryStatement (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- AssignmentOrProcedureCall :=
+ AssignmentOrProcedureCall :=
% VAR d, a, p: node ; %
- Designator
+ Designator
% d := pop () %
- ( ':=' Expression
+ ( ':=' Expression
% a := pushStmt (makeAssignment (d, pop ())) %
- |
- ActualParameters
-
+ |
+ ActualParameters
+
% a := pushStmt (makeFuncCall (d, pop ())) %
- |
-
+ |
+
% a := pushStmt (makeFuncCall (d, NIL)) %
- )
+ )
% addCommentBody (peepStmt ()) %
-
+
% addCommentAfter (peepStmt ()) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
static void AssignmentOrProcedureCall (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- StatementSequence :=
+ StatementSequence :=
% VAR s, t: node ; %
-
+
% s := pushStmt (makeStatementSequence ()) %
-
+
% assert (isStatementSequence (peepStmt ())) %
- Statement
+ Statement
% addStatement (s, popStmt ()) %
-
+
% assert (isStatementSequence (peepStmt ())) %
- { ';' Statement
+ { ';' Statement
% addStatement (s, popStmt ()) %
-
+
% assert (isStatementSequence (peepStmt ())) %
- }
+ }
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok
-
+
reachend
*/
static void StatementSequence (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- IfStatement :=
+ IfStatement :=
% VAR i, a, b: node ; %
- 'IF'
+ 'IF'
% b := makeCommentS (getBodyComment ()) %
- Expression
+ Expression
% a := makeCommentS (getAfterComment ()) %
- 'THEN' StatementSequence
+ 'THEN' StatementSequence
% i := pushStmt (makeIf (pop (), popStmt ())) %
-
+
% addIfComments (i, b, a) %
- { 'ELSIF'
+ { 'ELSIF'
% b := makeCommentS (getBodyComment ()) %
- Expression
+ Expression
% a := makeCommentS (getAfterComment ()) %
- 'THEN'
+ 'THEN'
% addElseComments (peepStmt (), b, a) %
- StatementSequence
+ StatementSequence
% i := makeElsif (i, pop (), popStmt ()) %
- } [ 'ELSE' StatementSequence
+ } [ 'ELSE' StatementSequence
% putElse (i, popStmt ()) %
- ] 'END'
+ ] 'END'
% b := makeCommentS (getBodyComment ()) %
-
+
% a := makeCommentS (getAfterComment ()) %
-
+
% assert (isIf (peepStmt ())) %
-
+
% addIfEndComments (peepStmt (), b, a) %
-
+
first symbols:iftok
-
+
cannot reachend
*/
static void IfStatement (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- CaseStatement :=
+ CaseStatement :=
% VAR s, e: node ; %
-
+
% s := pushStmt (makeCase ()) %
- 'CASE' Expression
+ 'CASE' Expression
% s := putCaseExpression (s, pop ()) %
- 'OF' Case { '|' Case } CaseEndStatement
+ 'OF' Case { '|' Case } CaseEndStatement
first symbols:casetok
-
+
cannot reachend
*/
static void CaseStatement (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- CaseEndStatement :=
+ CaseEndStatement :=
% VAR c: node ; %
- 'END' | 'ELSE'
+ 'END' | 'ELSE'
% c := peepStmt () %
- StatementSequence
+ StatementSequence
% c := putCaseElse (c, popStmt ()) %
- 'END'
+ 'END'
first symbols:elsetok, endtok
-
+
cannot reachend
*/
static void CaseEndStatement (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- Case := [ CaseLabelList ':'
+ Case := [ CaseLabelList ':'
% VAR l, c: node ; %
-
+
% l := pop () %
-
+
% c := peepStmt () %
- StatementSequence
+ StatementSequence
% c := putCaseStatement (c, l, popStmt ()) %
- ]
+ ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
reachend
*/
static void Case (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- CaseLabelList :=
+ CaseLabelList :=
% VAR l: node ; %
-
+
% l := push (makeCaseList ()) %
- CaseLabels { ',' CaseLabels }
+ CaseLabels { ',' CaseLabels }
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
static void CaseLabelList (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- CaseLabels :=
+ CaseLabels :=
% VAR lo, hi, l: node ; %
-
+
% lo := NIL ; hi := NIL %
-
+
% l := peep () %
- ConstExpression
+ ConstExpression
% lo := pop () %
- [ '..' ConstExpression
+ [ '..' ConstExpression
% hi := pop () %
- ]
+ ]
% l := putCaseRange (l, lo, hi) %
-
+
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
static void CaseLabels (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- WhileStatement :=
+ WhileStatement :=
% VAR s, w, e, a, b: node ; %
-
+
% w := pushStmt (makeWhile ()) %
- 'WHILE' Expression 'DO'
+ 'WHILE' Expression 'DO'
% b := makeCommentS (getBodyComment ()) %
-
+
% a := makeCommentS (getAfterComment ()) %
-
+
% addWhileDoComment (w, b, a) %
-
+
% e := pop () %
- StatementSequence
+ StatementSequence
% s := popStmt () %
- 'END'
+ 'END'
% assert (isStatementSequence (peepStmt ())) %
-
+
% putWhile (w, e, s) %
-
+
% b := makeCommentS (getBodyComment ()) %
-
+
% a := makeCommentS (getAfterComment ()) %
-
+
% addWhileEndComment (w, b, a) %
-
+
first symbols:whiletok
-
+
cannot reachend
*/
static void WhileStatement (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- RepeatStatement :=
+ RepeatStatement :=
% VAR r, s, a, b: node ; %
-
+
% r := pushStmt (makeRepeat ()) %
- 'REPEAT'
+ 'REPEAT'
% b := makeCommentS (getBodyComment ()) %
-
+
% a := makeCommentS (getAfterComment ()) %
-
+
% addRepeatComment (r, b, a) %
- StatementSequence
+ StatementSequence
% s := popStmt () %
- 'UNTIL' Expression
+ 'UNTIL' Expression
% putRepeat (r, s, pop ()) %
-
+
% b := makeCommentS (getBodyComment ()) %
-
+
% a := makeCommentS (getAfterComment ()) %
-
+
% addUntilComment (r, b, a) %
-
+
first symbols:repeattok
-
+
cannot reachend
*/
static void RepeatStatement (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ForStatement :=
+ ForStatement :=
% VAR f, i, s, e, b: node ; %
-
+
% b := NIL %
-
+
% f := pushStmt (makeFor ()) %
- 'FOR' Ident
+ 'FOR' Ident
% i := lookupWithSym (curident) %
- ':=' Expression
+ ':=' Expression
% s := pop () %
- 'TO' Expression
+ 'TO' Expression
% e := pop () %
- [ 'BY' ConstExpression
+ [ 'BY' ConstExpression
% b := pop () %
- ] 'DO' StatementSequence
+ ] 'DO' StatementSequence
% putFor (f, i, s, e, b, popStmt ()) %
- 'END'
+ 'END'
first symbols:fortok
-
+
cannot reachend
*/
static void ForStatement (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- LoopStatement :=
+ LoopStatement :=
% VAR l, s: node ; %
- 'LOOP'
+ 'LOOP'
% l := pushStmt (pushLoop (makeLoop ())) %
-
+
% INC (loopNo) %
- StatementSequence
+ StatementSequence
% s := popStmt () %
-
+
% putLoop (l, s) %
-
+
% DEC (loopNo) %
- 'END'
+ 'END'
% l := popLoop () %
-
+
% assert (isLoop (peepStmt ())) %
-
+
first symbols:looptok
-
+
cannot reachend
*/
static void LoopStatement (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- WithStatement := 'WITH' Designator 'DO'
+ WithStatement := 'WITH' Designator 'DO'
% startWith (pop ()) %
- StatementSequence 'END'
+ StatementSequence 'END'
% endWith %
-
+
first symbols:withtok
-
+
cannot reachend
*/
static void WithStatement (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ProcedureDeclaration := ProcedureHeading ';' ProcedureBlock
- Ident
+ ProcedureDeclaration := ProcedureHeading ';' ProcedureBlock
+ Ident
% leaveScope %
-
+
first symbols:proceduretok
-
+
cannot reachend
*/
static void ProcedureDeclaration (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ProcedureIdent := Ident
+ ProcedureIdent := Ident
% curproc := lookupSym (curident) %
-
+
% enterScope (curproc) %
-
+
% setProcedureComment (lastcomment, curident) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
static void ProcedureIdent (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- DefProcedureIdent := Ident
+ DefProcedureIdent := Ident
% curproc := lookupSym (curident) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
static void DefProcedureIdent (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- DefineBuiltinProcedure := [ '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' Ident ')' ')' |
- '__INLINE__' ]
+ DefineBuiltinProcedure := [ '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' Ident ')' ')' |
+ '__INLINE__' ]
first symbols:inlinetok, attributetok
-
+
reachend
*/
static void DefineBuiltinProcedure (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ProcedureHeading := 'PROCEDURE' DefineBuiltinProcedure
- ( ProcedureIdent [ FormalParameters ]
- AttributeNoReturn )
+ ProcedureHeading := 'PROCEDURE' DefineBuiltinProcedure
+ ( ProcedureIdent [ FormalParameters ]
+ AttributeNoReturn )
first symbols:proceduretok
-
+
cannot reachend
*/
static void ProcedureHeading (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- Builtin := [ '__BUILTIN__' | '__INLINE__' ]
+ Builtin := [ '__BUILTIN__' | '__INLINE__' ]
first symbols:inlinetok, builtintok
-
+
reachend
*/
static void Builtin (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- DefProcedureHeading := 'PROCEDURE' Builtin ( DefProcedureIdent
- [ DefFormalParameters ]
- AttributeNoReturn )
+ DefProcedureHeading := 'PROCEDURE' Builtin ( DefProcedureIdent
+ [ DefFormalParameters ]
+ AttributeNoReturn )
first symbols:proceduretok
-
+
cannot reachend
*/
static void DefProcedureHeading (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ProcedureBlock := { Declaration } [ 'BEGIN' ProcedureBlockBody ]
- 'END'
+ ProcedureBlock := { Declaration } [ 'BEGIN' ProcedureBlockBody ]
+ 'END'
first symbols:proceduretok, moduletok, consttok, typetok, vartok, endtok, begintok
-
+
cannot reachend
*/
static void ProcedureBlock (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- Block := { Declaration } InitialBlock FinalBlock
- 'END'
+ Block := { Declaration } InitialBlock FinalBlock
+ 'END'
first symbols:proceduretok, moduletok, finallytok, begintok, consttok, typetok, vartok, endtok
-
+
cannot reachend
*/
static void Block (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- InitialBlock := [ 'BEGIN' InitialBlockBody ]
+ InitialBlock := [ 'BEGIN' InitialBlockBody ]
first symbols:begintok
-
+
reachend
*/
static void InitialBlock (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- FinalBlock := [ 'FINALLY' FinalBlockBody ]
+ FinalBlock := [ 'FINALLY' FinalBlockBody ]
first symbols:finallytok
-
+
reachend
*/
static void FinalBlock (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- InitialBlockBody := NormalPart
+ InitialBlockBody := NormalPart
% putBegin (curmodule, popStmt ()) %
- [ 'EXCEPT' ExceptionalPart ]
+ [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
static void InitialBlockBody (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- FinalBlockBody := NormalPart
+ FinalBlockBody := NormalPart
% putFinally (curmodule, popStmt ()) %
- [ 'EXCEPT' ExceptionalPart ]
+ [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
static void FinalBlockBody (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ProcedureBlockBody := ProcedureNormalPart [ 'EXCEPT'
- ExceptionalPart ]
+ ProcedureBlockBody := ProcedureNormalPart [ 'EXCEPT'
+ ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
static void ProcedureBlockBody (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ProcedureNormalPart := StatementSequence
+ ProcedureNormalPart := StatementSequence
% putBegin (curproc, popStmt ()) %
-
+
first symbols:identtok, retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, returntok, exittok, semicolontok
-
+
reachend
*/
static void ProcedureNormalPart (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- NormalPart := StatementSequence
+ NormalPart := StatementSequence
first symbols:identtok, retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, returntok, exittok, semicolontok
-
+
reachend
*/
static void NormalPart (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ExceptionalPart := StatementSequence
+ ExceptionalPart := StatementSequence
first symbols:identtok, retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, returntok, exittok, semicolontok
-
+
reachend
*/
static void ExceptionalPart (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- Declaration := 'CONST' { ConstantDeclaration ';' } |
- 'TYPE' { TypeDeclaration } |
- 'VAR' { VariableDeclaration ';' } |
- ProcedureDeclaration ';' |
- ModuleDeclaration ';'
+ Declaration := 'CONST' { ConstantDeclaration ';' } |
+ 'TYPE' { TypeDeclaration } |
+ 'VAR' { VariableDeclaration ';' } |
+ ProcedureDeclaration ';' |
+ ModuleDeclaration ';'
first symbols:moduletok, proceduretok, vartok, typetok, consttok
-
+
cannot reachend
*/
static void Declaration (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- DefFormalParameters := '('
+ DefFormalParameters := '('
% paramEnter (curproc) %
- [ DefMultiFPSection ] ')'
-
+ [ DefMultiFPSection ] ')'
+
% paramLeave (curproc) %
- FormalReturn
+ FormalReturn
first symbols:lparatok
-
+
cannot reachend
*/
static void DefFormalParameters (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- AttributeNoReturn := [ '' ]
+ AttributeNoReturn := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
static void AttributeNoReturn (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- AttributeUnused := [ '' ]
+ AttributeUnused := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
static void AttributeUnused (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- DefMultiFPSection := DefExtendedFP |
- FPSection [ ';' DefMultiFPSection ]
+ DefMultiFPSection := DefExtendedFP |
+ FPSection [ ';' DefMultiFPSection ]
first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
static void DefMultiFPSection (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- FormalParameters := '('
+ FormalParameters := '('
% paramEnter (curproc) %
- [ MultiFPSection ] ')'
+ [ MultiFPSection ] ')'
% paramLeave (curproc) %
- FormalReturn
+ FormalReturn
first symbols:lparatok
-
+
cannot reachend
*/
static void FormalParameters (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- MultiFPSection := ExtendedFP | FPSection [ ';'
- MultiFPSection ]
+ MultiFPSection := ExtendedFP | FPSection [ ';'
+ MultiFPSection ]
first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
static void MultiFPSection (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- FPSection := NonVarFPSection |
- VarFPSection
+ FPSection := NonVarFPSection |
+ VarFPSection
first symbols:vartok, identtok
-
+
cannot reachend
*/
static void FPSection (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- DefExtendedFP := DefOptArg | '...'
+ DefExtendedFP := DefOptArg | '...'
first symbols:lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
static void DefExtendedFP (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ExtendedFP := OptArg | '...'
+ ExtendedFP := OptArg | '...'
first symbols:lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
static void ExtendedFP (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- VarFPSection := 'VAR' IdentList ':' FormalType [
- AttributeUnused ]
+ VarFPSection := 'VAR' IdentList ':' FormalType [
+ AttributeUnused ]
first symbols:vartok
-
+
cannot reachend
*/
static void VarFPSection (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- NonVarFPSection := IdentList ':' FormalType [ AttributeUnused ]
+ NonVarFPSection := IdentList ':' FormalType [ AttributeUnused ]
first symbols:identtok
-
+
cannot reachend
*/
static void NonVarFPSection (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- OptArg := '[' Ident ':' FormalType [ '=' ConstExpressionNop ]
- ']'
+ OptArg := '[' Ident ':' FormalType [ '=' ConstExpressionNop ]
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
static void OptArg (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- DefOptArg := '[' Ident ':' FormalType '=' ConstExpressionNop
- ']'
+ DefOptArg := '[' Ident ':' FormalType '=' ConstExpressionNop
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
static void DefOptArg (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- FormalType := { 'ARRAY' 'OF' } Qualident
+ FormalType := { 'ARRAY' 'OF' } Qualident
first symbols:identtok, arraytok
-
+
cannot reachend
*/
static void FormalType (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ModuleDeclaration := 'MODULE' Ident [ Priority ]
- ';' { Import } [ Export ]
- Block Ident
+ ModuleDeclaration := 'MODULE' Ident [ Priority ]
+ ';' { Import } [ Export ]
+ Block Ident
first symbols:moduletok
-
+
cannot reachend
*/
static void ModuleDeclaration (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- Priority := '[' ConstExpressionNop ']'
+ Priority := '[' ConstExpressionNop ']'
first symbols:lsbratok
-
+
cannot reachend
*/
static void Priority (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- Export := 'EXPORT' ( 'QUALIFIED' IdentList |
- 'UNQUALIFIED' IdentList |
- IdentList ) ';'
+ Export := 'EXPORT' ( 'QUALIFIED' IdentList |
+ 'UNQUALIFIED' IdentList |
+ IdentList ) ';'
first symbols:exporttok
-
+
cannot reachend
*/
static void Export (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- FromIdentList := Ident { ',' Ident }
+ FromIdentList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
static void FromIdentList (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- FromImport := 'FROM' Ident 'IMPORT' FromIdentList
- ';'
+ FromImport := 'FROM' Ident 'IMPORT' FromIdentList
+ ';'
first symbols:fromtok
-
+
cannot reachend
*/
static void FromImport (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- ImportModuleList := Ident { ',' Ident }
+ ImportModuleList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
static void ImportModuleList (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- WithoutFromImport := 'IMPORT' ImportModuleList ';'
+ WithoutFromImport := 'IMPORT' ImportModuleList ';'
first symbols:importtok
-
+
cannot reachend
*/
static void WithoutFromImport (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- Import := FromImport | WithoutFromImport
+ Import := FromImport | WithoutFromImport
first symbols:importtok, fromtok
-
+
cannot reachend
*/
static void Import (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- DefinitionModule := 'DEFINITION' 'MODULE' [ 'FOR'
- string ]
- Ident ';'
+ DefinitionModule := 'DEFINITION' 'MODULE' [ 'FOR'
+ string ]
+ Ident ';'
% curmodule := lookupDef (curident) %
-
+
% enterScope (curmodule) %
- { Import } [ Export ] { Definition }
- 'END' Ident '.'
+ { Import } [ Export ] { Definition }
+ 'END' Ident '.'
% checkEndName (curmodule, curident, 'definition module') %
-
+
% leaveScope %
-
+
first symbols:definitiontok
-
+
cannot reachend
*/
static void DefinitionModule (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- PushQualident :=
+ PushQualident :=
% VAR type, field: node ; %
- Ident
+ Ident
% qualid := push (lookupWithSym (curident)) %
-
+
% IF qualid = NIL
THEN
metaError1 ('the symbol {%1k} is not visible in this scope (or any other nested scope)', curident)
END %
- [ '.'
+ [ '.'
% IF NOT isQualident (qualid)
THEN
ErrorArray ('the first component of this qualident must be a definition module or a parameter/variable/constant which has record type')
END %
- Ident
+ Ident
% IF isDef (qualid)
THEN
qualid := replace (lookupInScope (qualid, curident))
THEN
metaError1 ('qualified component of the identifier {%1k} cannot be found', curident)
END %
- ]
+ ]
first symbols:identtok
-
+
cannot reachend
*/
static void PushQualident (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- OptSubrange := [ SubrangeType ]
+ OptSubrange := [ SubrangeType ]
first symbols:lsbratok
-
+
reachend
*/
static void OptSubrange (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- TypeEquiv := Qualident OptSubrange
+ TypeEquiv := Qualident OptSubrange
first symbols:identtok
-
+
cannot reachend
*/
static void TypeEquiv (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- EnumIdentList := Ident { ',' Ident }
+ EnumIdentList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
static void EnumIdentList (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- Enumeration := '(' EnumIdentList ')'
+ Enumeration := '(' EnumIdentList ')'
first symbols:lparatok
-
+
cannot reachend
*/
static void Enumeration (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- SimpleType := TypeEquiv | Enumeration |
- SubrangeType
+ SimpleType := TypeEquiv | Enumeration |
+ SubrangeType
first symbols:lsbratok, lparatok, identtok
-
+
cannot reachend
*/
static void SimpleType (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- Type := SimpleType | ArrayType | RecordType |
- SetType | PointerType | ProcedureType
+ Type := SimpleType | ArrayType | RecordType |
+ SetType | PointerType | ProcedureType
first symbols:proceduretok, pointertok, settok, packedsettok, oftok, recordtok, arraytok, identtok, lparatok, lsbratok
-
+
cannot reachend
*/
static void Type (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- TypeDeclaration := { Ident ( ';' | '=' Type Alignment
- ';' ) }
+ TypeDeclaration := { Ident ( ';' | '=' Type Alignment
+ ';' ) }
first symbols:identtok
-
+
reachend
*/
static void TypeDeclaration (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- Definition := 'CONST' { ConstantDeclaration ';' } |
- 'TYPE' { TypeDeclaration } |
- 'VAR' { VariableDeclaration ';' } |
- DefProcedureHeading ';'
+ Definition := 'CONST' { ConstantDeclaration ';' } |
+ 'TYPE' { TypeDeclaration } |
+ 'VAR' { VariableDeclaration ';' } |
+ DefProcedureHeading ';'
first symbols:proceduretok, vartok, typetok, consttok
-
+
cannot reachend
*/
static void Definition (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- AsmStatement :=
+ AsmStatement :=
% VAR s: node ; %
-
+
% s := pushStmt (makeComment ("asm")) %
- 'ASM' [ 'VOLATILE' ] '(' AsmOperands
- ')'
+ 'ASM' [ 'VOLATILE' ] '(' AsmOperands
+ ')'
first symbols:asmtok
-
+
cannot reachend
*/
static void AsmStatement (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- AsmOperands := string [ AsmOperandSpec ]
+ AsmOperands := string [ AsmOperandSpec ]
first symbols:stringtok
-
+
cannot reachend
*/
static void AsmOperands (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- AsmOperandSpec := [ ':' AsmList [ ':' AsmList [
- ':' TrashList ] ] ]
+ AsmOperandSpec := [ ':' AsmList [ ':' AsmList [
+ ':' TrashList ] ] ]
first symbols:colontok
-
+
reachend
*/
static void AsmOperandSpec (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- AsmList := [ AsmElement ] { ',' AsmElement }
+ AsmList := [ AsmElement ] { ',' AsmElement }
first symbols:lsbratok, stringtok, commatok
-
+
reachend
*/
static void AsmList (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- NamedOperand := '[' Ident ']'
+ NamedOperand := '[' Ident ']'
first symbols:lsbratok
-
+
cannot reachend
*/
static void NamedOperand (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- AsmOperandName := [ NamedOperand ]
+ AsmOperandName := [ NamedOperand ]
first symbols:lsbratok
-
+
reachend
*/
static void AsmOperandName (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- AsmElement := AsmOperandName string '(' Expression
- ')'
+ AsmElement := AsmOperandName string '(' Expression
+ ')'
first symbols:stringtok, lsbratok
-
+
cannot reachend
*/
static void AsmElement (mcp5_SetOfStop0 stopset0, mcp5_SetOfStop1 stopset1, mcp5_SetOfStop2 stopset2);
/*
- TrashList := [ string ] { ',' string }
+ TrashList := [ string ] { ',' string }
first symbols:commatok, stringtok
-
+
reachend
*/
{
mcPrintf_printf0 ((const char *) "\\nskipping token *** ", 21);
}
- /*
+ /*
yes the ORD(currenttoken) looks ugly, but it is *much* safer than
using currenttoken<sometok as a change to the ordering of the
token declarations below would cause this to break. Using ORD() we are
/*
- FileUnit := DefinitionModule |
- ImplementationOrProgramModule
+ FileUnit := DefinitionModule |
+ ImplementationOrProgramModule
first symbols:implementationtok, moduletok, definitiontok
-
+
cannot reachend
*/
/*
- ProgramModule := 'MODULE' Ident
+ ProgramModule := 'MODULE' Ident
% curmodule := lookupModule (curident) %
-
+
% addCommentBody (curmodule) %
-
+
% enterScope (curmodule) %
-
+
% resetConstExpPos (curmodule) %
- [ Priority ] ';' { Import } Block
- Ident
+ [ Priority ] ';' { Import } Block
+ Ident
% checkEndName (curmodule, curident, 'program module') %
-
+
% leaveScope %
- '.'
+ '.'
first symbols:moduletok
-
+
cannot reachend
*/
/*
- ImplementationModule := 'IMPLEMENTATION' 'MODULE'
- Ident
+ ImplementationModule := 'IMPLEMENTATION' 'MODULE'
+ Ident
% curmodule := lookupImp (curident) %
-
+
% addCommentBody (curmodule) %
-
+
% enterScope (lookupDef (curident)) %
-
+
% enterScope (curmodule) %
-
+
% resetConstExpPos (curmodule) %
- [ Priority ] ';' { Import }
- Block Ident
+ [ Priority ] ';' { Import }
+ Block Ident
% checkEndName (curmodule, curident, 'implementation module') %
-
+
% leaveScope ; leaveScope %
- '.'
+ '.'
first symbols:implementationtok
-
+
cannot reachend
*/
/*
- ImplementationOrProgramModule := ImplementationModule |
- ProgramModule
+ ImplementationOrProgramModule := ImplementationModule |
+ ProgramModule
first symbols:moduletok, implementationtok
-
+
cannot reachend
*/
/*
- ConstInteger := Integer
+ ConstInteger := Integer
% VAR i: node ; %
-
+
% i := pop () %
-
+
first symbols:integertok
-
+
cannot reachend
*/
/*
- ConstReal := Real
+ ConstReal := Real
% VAR r: node ; %
-
+
% r := pop () %
-
+
first symbols:realtok
-
+
cannot reachend
*/
/*
- ConstNumber := ConstInteger | ConstReal
+ ConstNumber := ConstInteger | ConstReal
first symbols:realtok, integertok
-
+
cannot reachend
*/
/*
- Number := Integer | Real
+ Number := Integer | Real
first symbols:realtok, integertok
-
+
cannot reachend
*/
/*
- Qualident := Ident { '.' Ident }
+ Qualident := Ident { '.' Ident }
first symbols:identtok
-
+
cannot reachend
*/
/*
- ConstantDeclaration := Ident '=' ConstExpressionNop
+ ConstantDeclaration := Ident '=' ConstExpressionNop
first symbols:identtok
-
+
cannot reachend
*/
/*
- ConstExpressionNop :=
+ ConstExpressionNop :=
% VAR c: node ; %
-
+
% c := getNextConstExp () %
- SimpleConstExpr [ Relation
- SimpleConstExpr ]
+ SimpleConstExpr [ Relation
+ SimpleConstExpr ]
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- ConstExpression :=
+ ConstExpression :=
% VAR c: node ; %
-
+
% c := push (getNextConstExp ()) %
- SimpleConstExpr [ Relation SimpleConstExpr ]
+ SimpleConstExpr [ Relation SimpleConstExpr ]
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- Relation := '=' | '#' | '<>' | '<' | '<=' |
- '>' | '>=' | 'IN'
+ Relation := '=' | '#' | '<>' | '<' | '<=' |
+ '>' | '>=' | 'IN'
first symbols:intok, greaterequaltok, greatertok, lessequaltok, lesstok, lessgreatertok, hashtok, equaltok
-
+
cannot reachend
*/
/*
- SimpleConstExpr := UnaryOrConstTerm { AddOperator
- ConstTerm }
+ SimpleConstExpr := UnaryOrConstTerm { AddOperator
+ ConstTerm }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- UnaryOrConstTerm := '+' ConstTerm |
- '-' ConstTerm |
- ConstTerm
+ UnaryOrConstTerm := '+' ConstTerm |
+ '-' ConstTerm |
+ ConstTerm
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- AddOperator := '+' | '-' | 'OR'
+ AddOperator := '+' | '-' | 'OR'
first symbols:ortok, minustok, plustok
-
+
cannot reachend
*/
/*
- ConstTerm := ConstFactor { MulOperator ConstFactor }
+ ConstTerm := ConstFactor { MulOperator ConstFactor }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok
-
+
cannot reachend
*/
/*
- MulOperator := '*' | '/' | 'DIV' | 'MOD' |
- 'REM' | 'AND' | '&'
+ MulOperator := '*' | '/' | 'DIV' | 'MOD' |
+ 'REM' | 'AND' | '&'
first symbols:ambersandtok, andtok, remtok, modtok, divtok, dividetok, timestok
-
+
cannot reachend
*/
/*
- NotConstFactor := 'NOT' ConstFactor
+ NotConstFactor := 'NOT' ConstFactor
% VAR n: node ; %
-
+
% n := push (makeUnaryTok (nottok, pop ())) %
-
+
first symbols:nottok
-
+
cannot reachend
*/
/*
- ConstFactor := ConstNumber | ConstString |
- ConstSetOrQualidentOrFunction |
- '(' ConstExpressionNop ')' |
- NotConstFactor |
- ConstAttribute
+ ConstFactor := ConstNumber | ConstString |
+ ConstSetOrQualidentOrFunction |
+ '(' ConstExpressionNop ')' |
+ NotConstFactor |
+ ConstAttribute
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok
-
+
cannot reachend
*/
/*
- ConstString := string
+ ConstString := string
first symbols:stringtok
-
+
cannot reachend
*/
/*
- ConstComponentElement := ConstExpressionNop [ '..'
- ConstExpressionNop ]
+ ConstComponentElement := ConstExpressionNop [ '..'
+ ConstExpressionNop ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- ConstComponentValue := ConstComponentElement [ 'BY'
- ConstExpressionNop ]
+ ConstComponentValue := ConstComponentElement [ 'BY'
+ ConstExpressionNop ]
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- ConstArraySetRecordValue := ConstComponentValue
- { ',' ConstComponentValue }
+ ConstArraySetRecordValue := ConstComponentValue
+ { ',' ConstComponentValue }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- ConstConstructor := '{' [ ConstArraySetRecordValue ]
- '}'
+ ConstConstructor := '{' [ ConstArraySetRecordValue ]
+ '}'
first symbols:lcbratok
-
+
cannot reachend
*/
/*
- ConstSetOrQualidentOrFunction := Qualident [ ConstConstructor |
- ConstActualParameters ] |
- ConstConstructor
+ ConstSetOrQualidentOrFunction := Qualident [ ConstConstructor |
+ ConstActualParameters ] |
+ ConstConstructor
first symbols:lcbratok, identtok
-
+
cannot reachend
*/
/*
- ConstActualParameters := '(' [ ConstExpList ] ')'
+ ConstActualParameters := '(' [ ConstExpList ] ')'
first symbols:lparatok
-
+
cannot reachend
*/
/*
- ConstExpList := ConstExpressionNop { ',' ConstExpressionNop }
+ ConstExpList := ConstExpressionNop { ',' ConstExpressionNop }
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- ConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' ConstAttributeExpression
- ')' ')'
+ ConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' ConstAttributeExpression
+ ')' ')'
first symbols:attributetok
-
+
cannot reachend
*/
/*
- ConstAttributeExpression := Ident | '<' Qualident
- ',' Ident '>'
+ ConstAttributeExpression := Ident | '<' Qualident
+ ',' Ident '>'
first symbols:lesstok, identtok
-
+
cannot reachend
*/
/*
- ByteAlignment := ''
+ ByteAlignment := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
/*
- OptAlignmentExpression := [ AlignmentExpression ]
+ OptAlignmentExpression := [ AlignmentExpression ]
first symbols:lparatok
-
+
reachend
*/
/*
- AlignmentExpression := '(' ConstExpressionNop ')'
+ AlignmentExpression := '(' ConstExpressionNop ')'
first symbols:lparatok
-
+
cannot reachend
*/
/*
- Alignment := [ ByteAlignment ]
+ Alignment := [ ByteAlignment ]
first symbols:ldirectivetok
-
+
reachend
*/
/*
- IdentList := Ident { ',' Ident }
+ IdentList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
/*
- SubrangeType := '[' ConstExpressionNop '..' ConstExpressionNop
- ']'
+ SubrangeType := '[' ConstExpressionNop '..' ConstExpressionNop
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- ArrayType := 'ARRAY' SimpleType { ',' SimpleType }
- 'OF' Type
+ ArrayType := 'ARRAY' SimpleType { ',' SimpleType }
+ 'OF' Type
first symbols:arraytok
-
+
cannot reachend
*/
/*
- RecordType := 'RECORD' [ DefaultRecordAttributes ]
- FieldListSequence 'END'
+ RecordType := 'RECORD' [ DefaultRecordAttributes ]
+ FieldListSequence 'END'
first symbols:recordtok
-
+
cannot reachend
*/
/*
- DefaultRecordAttributes := ''
+ DefaultRecordAttributes := ''
first symbols:ldirectivetok
-
+
cannot reachend
*/
/*
- RecordFieldPragma := [ '' ]
+ RecordFieldPragma := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
/*
- FieldPragmaExpression := Ident PragmaConstExpression
+ FieldPragmaExpression := Ident PragmaConstExpression
first symbols:identtok
-
+
cannot reachend
*/
/*
- PragmaConstExpression := [ '(' ConstExpressionNop
- ')' ]
+ PragmaConstExpression := [ '(' ConstExpressionNop
+ ')' ]
first symbols:lparatok
-
+
reachend
*/
/*
- AttributeExpression := Ident '(' ConstExpressionNop
- ')'
+ AttributeExpression := Ident '(' ConstExpressionNop
+ ')'
first symbols:identtok
-
+
cannot reachend
*/
/*
- FieldListSequence := FieldListStatement { ';' FieldListStatement }
+ FieldListSequence := FieldListStatement { ';' FieldListStatement }
first symbols:casetok, identtok, semicolontok
-
+
reachend
*/
/*
- FieldListStatement := [ FieldList ]
+ FieldListStatement := [ FieldList ]
first symbols:identtok, casetok
-
+
reachend
*/
/*
- FieldList := IdentList ':' Type RecordFieldPragma |
- 'CASE' CaseTag 'OF' Varient { '|' Varient }
- [ 'ELSE' FieldListSequence ] 'END'
+ FieldList := IdentList ':' Type RecordFieldPragma |
+ 'CASE' CaseTag 'OF' Varient { '|' Varient }
+ [ 'ELSE' FieldListSequence ] 'END'
first symbols:casetok, identtok
-
+
cannot reachend
*/
/*
- TagIdent := Ident |
+ TagIdent := Ident |
% curident := NulName %
-
+
first symbols:identtok
-
+
reachend
*/
/*
- CaseTag := TagIdent [ ':' Qualident ]
+ CaseTag := TagIdent [ ':' Qualident ]
first symbols:colontok, identtok
-
+
reachend
*/
/*
- Varient := [ VarientCaseLabelList ':' FieldListSequence ]
+ Varient := [ VarientCaseLabelList ':' FieldListSequence ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
reachend
*/
/*
- VarientCaseLabelList := VarientCaseLabels { ','
- VarientCaseLabels }
+ VarientCaseLabelList := VarientCaseLabels { ','
+ VarientCaseLabels }
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- VarientCaseLabels := ConstExpressionNop [ '..' ConstExpressionNop ]
+ VarientCaseLabels := ConstExpressionNop [ '..' ConstExpressionNop ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- SetType := ( 'SET' | 'PACKEDSET' ) 'OF' SimpleType
+ SetType := ( 'SET' | 'PACKEDSET' ) 'OF' SimpleType
first symbols:oftok, packedsettok, settok
-
+
cannot reachend
*/
/*
- PointerType := 'POINTER' 'TO' Type
+ PointerType := 'POINTER' 'TO' Type
first symbols:pointertok
-
+
cannot reachend
*/
/*
- ProcedureType := 'PROCEDURE' [ FormalTypeList ]
+ ProcedureType := 'PROCEDURE' [ FormalTypeList ]
first symbols:proceduretok
-
+
cannot reachend
*/
/*
- FormalTypeList := '(' ( ')' FormalReturn |
- ProcedureParameters ')'
- FormalReturn )
+ FormalTypeList := '(' ( ')' FormalReturn |
+ ProcedureParameters ')'
+ FormalReturn )
first symbols:lparatok
-
+
cannot reachend
*/
/*
- FormalReturn := [ ':' OptReturnType ]
+ FormalReturn := [ ':' OptReturnType ]
first symbols:colontok
-
+
reachend
*/
/*
- OptReturnType := '[' Qualident ']' |
- Qualident
+ OptReturnType := '[' Qualident ']' |
+ Qualident
first symbols:identtok, lsbratok
-
+
cannot reachend
*/
/*
- ProcedureParameters := ProcedureParameter { ','
- ProcedureParameter }
+ ProcedureParameters := ProcedureParameter { ','
+ ProcedureParameter }
first symbols:identtok, arraytok, periodperiodperiodtok, vartok
-
+
cannot reachend
*/
/*
- ProcedureParameter := '...' | 'VAR' FormalType |
- FormalType
+ ProcedureParameter := '...' | 'VAR' FormalType |
+ FormalType
first symbols:arraytok, identtok, vartok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- VarIdent := Ident [ '[' ConstExpressionNop ']' ]
+ VarIdent := Ident [ '[' ConstExpressionNop ']' ]
first symbols:identtok
-
+
cannot reachend
*/
/*
- VarIdentList := VarIdent { ',' VarIdent }
+ VarIdentList := VarIdent { ',' VarIdent }
first symbols:identtok
-
+
cannot reachend
*/
/*
- VariableDeclaration := VarIdentList ':' Type Alignment
+ VariableDeclaration := VarIdentList ':' Type Alignment
first symbols:identtok
-
+
cannot reachend
*/
/*
- Designator := PushQualident { SubDesignator }
+ Designator := PushQualident { SubDesignator }
first symbols:identtok
-
+
cannot reachend
*/
/*
- SubDesignator :=
+ SubDesignator :=
% VAR n, field, type: node ; %
-
+
% n := peep () %
-
+
% IF n = NIL
THEN
ErrorArray ('no expression found') ;
flushErrors ;
RETURN
END %
-
+
% type := skipType (getType (n)) %
- ( '.' Ident
+ ( '.' Ident
% IF isRecord (type)
THEN
field := lookupInScope (type, curident) ;
ELSE
metaError2 ('attempting to access a field {%1k} from {%2ad} which does not have a record type', curident, type)
END %
- | '[' ArrayExpList
+ | '[' ArrayExpList
% IF isArray (type)
THEN
n := replace (makeArrayRef (n, pop ()))
ELSE
metaError1 ('attempting to access an array but the expression is not an array but a {%1d}', type)
END %
- ']' | SubPointer )
+ ']' | SubPointer )
first symbols:uparrowtok, lsbratok, periodtok
-
+
cannot reachend
*/
/*
- SubPointer :=
+ SubPointer :=
% VAR n, field, type: node ; %
-
+
% n := peep () %
-
+
% type := skipType (getType (n)) %
- '^' ( '.' Ident
+ '^' ( '.' Ident
% IF isPointer (type)
THEN
type := skipType (getType (type)) ;
ELSE
metaError2 ('trying to dereference {%1k} which was not declared as a pointer but a {%2tad}', n, n)
END %
- |
+ |
% IF isPointer (type)
THEN
n := replace (makeDeRef (n))
ELSE
metaError1 ('attempting to dereference a pointer but the expression is not a pointer but a {%1d}', type)
END %
- )
+ )
first symbols:uparrowtok
-
+
cannot reachend
*/
/*
- ArrayExpList :=
+ ArrayExpList :=
% VAR l: node ; %
-
+
% l := push (makeExpList ()) %
- Expression
+ Expression
% putExpList (l, pop ()) %
-
+
% assert (isExpList (peep ())) %
- { ',' Expression
+ { ',' Expression
% putExpList (l, pop ()) %
-
+
% assert (isExpList (peep ())) %
- }
+ }
first symbols:identtok, lcbratok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- ExpList :=
+ ExpList :=
% VAR p, n: node ; %
-
+
% p := peep () %
-
+
% assert (isExpList (p)) %
- Expression
+ Expression
% putExpList (p, pop ()) %
-
+
% assert (isExpList (peep ())) %
- { ',' Expression
+ { ',' Expression
% putExpList (p, pop ()) %
-
+
% assert (isExpList (peep ())) %
- }
+ }
first symbols:identtok, lcbratok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- Expression :=
+ Expression :=
% VAR c, l, r: node ; op: toktype ; %
- SimpleExpression
+ SimpleExpression
% op := currenttoken %
- [ Relation
+ [ Relation
% l := pop () %
- SimpleExpression
+ SimpleExpression
% r := pop () %
-
+
% r := push (makeBinaryTok (op, l, r)) %
- ]
+ ]
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- SimpleExpression :=
+ SimpleExpression :=
% VAR op: toktype ; n: node ; %
- UnaryOrTerm {
+ UnaryOrTerm {
% op := currenttoken %
-
+
% n := pop () %
- AddOperator Term
-
+ AddOperator Term
+
% n := push (makeBinaryTok (op, n, pop ())) %
- }
+ }
first symbols:identtok, lcbratok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- UnaryOrTerm :=
+ UnaryOrTerm :=
% VAR n: node ; %
- '+' Term
+ '+' Term
% n := push (makeUnaryTok (plustok, pop ())) %
- | '-' Term
+ | '-' Term
% n := push (makeUnaryTok (minustok, pop ())) %
- | Term
+ | Term
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- Term :=
+ Term :=
% VAR op: toktype ; n: node ; %
- Factor {
+ Factor {
% op := currenttoken %
- MulOperator
+ MulOperator
% n := pop () %
- Factor
+ Factor
% n := push (makeBinaryTok (op, n, pop ())) %
- }
+ }
first symbols:identtok, lcbratok, realtok, integertok, stringtok, lparatok, nottok
-
+
cannot reachend
*/
/*
- PushString := string
+ PushString := string
% VAR n: node ; %
-
+
% n := push (makeString (curstring)) %
-
+
first symbols:stringtok
-
+
cannot reachend
*/
/*
- Factor := Number | PushString | SetOrDesignatorOrFunction |
- '(' Expression ')' |
- 'NOT' ( Factor
+ Factor := Number | PushString | SetOrDesignatorOrFunction |
+ '(' Expression ')' |
+ 'NOT' ( Factor
% VAR n: node ; %
-
+
% n := push (makeUnaryTok (nottok, pop ())) %
- | ConstAttribute
+ | ConstAttribute
% n := push (makeUnaryTok (nottok, pop ())) %
- )
+ )
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok
-
+
cannot reachend
*/
/*
- ComponentElement := Expression
+ ComponentElement := Expression
% VAR l, h, n: node ; %
-
+
% l := pop () %
-
+
% h := NIL %
- [ '..' Expression
+ [ '..' Expression
% h := pop () %
-
+
% ErrorArray ('implementation restriction range is not allowed') %
- ]
+ ]
% n := push (includeSetValue (pop (), l, h)) %
-
+
first symbols:identtok, lcbratok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- ComponentValue := ComponentElement [ 'BY'
+ ComponentValue := ComponentElement [ 'BY'
% ErrorArray ('implementation restriction BY not allowed') %
- Expression ]
+ Expression ]
first symbols:identtok, lcbratok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- ArraySetRecordValue := ComponentValue { ',' ComponentValue }
+ ArraySetRecordValue := ComponentValue { ',' ComponentValue }
first symbols:identtok, lcbratok, realtok, integertok, stringtok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- Constructor := '{'
+ Constructor := '{'
% VAR n: node ; %
-
+
% n := push (makeSetValue ()) %
- [ ArraySetRecordValue ] '}'
+ [ ArraySetRecordValue ] '}'
first symbols:lcbratok
-
+
cannot reachend
*/
/*
- SetOrDesignatorOrFunction := PushQualident
+ SetOrDesignatorOrFunction := PushQualident
% VAR q, p, n: node ; %
- [ Constructor
+ [ Constructor
% p := pop () %
-
+
% q := pop () %
-
+
% n := push (putSetValue (p, q)) %
- | SimpleDes [
+ | SimpleDes [
% q := pop () %
- ActualParameters
-
+ ActualParameters
+
% p := pop () %
-
+
% p := push (makeFuncCall (q, p)) %
- ] ] |
- Constructor
+ ] ] |
+ Constructor
first symbols:identtok, lcbratok
-
+
cannot reachend
*/
/*
- SimpleDes := { SubDesignator }
+ SimpleDes := { SubDesignator }
first symbols:uparrowtok, periodtok, lsbratok
-
+
reachend
*/
/*
- ActualParameters := '('
+ ActualParameters := '('
% VAR n: node ; %
-
+
% n := push (makeExpList ()) %
- [ ExpList ] ')'
+ [ ExpList ] ')'
% assert (isExpList (peep ())) %
-
+
first symbols:lparatok
-
+
cannot reachend
*/
/*
- ExitStatement :=
+ ExitStatement :=
% VAR n: node ; %
- 'EXIT'
+ 'EXIT'
% IF loopNo = 0
THEN
ErrorArray ('EXIT can only be used inside a LOOP statement')
ELSE
n := pushStmt (makeExit (peepLoop (), loopNo))
END %
-
+
first symbols:exittok
-
+
cannot reachend
*/
/*
- ReturnStatement :=
+ ReturnStatement :=
% VAR n: node ; %
-
+
% n := pushStmt (makeReturn ()) %
- 'RETURN' [ Expression
+ 'RETURN' [ Expression
% putReturn (n, pop ()) %
- ]
+ ]
% addCommentBody (peepStmt ()) %
-
+
% addCommentAfter (peepStmt ()) %
-
+
% assert (isReturn (peepStmt ())) %
-
+
first symbols:returntok
-
+
cannot reachend
*/
/*
- Statement := ( AssignmentOrProcedureCall |
- IfStatement | CaseStatement |
- WhileStatement |
- RepeatStatement |
- LoopStatement | ForStatement |
- WithStatement | AsmStatement |
- ExitStatement | ReturnStatement |
- RetryStatement |
-
+ Statement := ( AssignmentOrProcedureCall |
+ IfStatement | CaseStatement |
+ WhileStatement |
+ RepeatStatement |
+ LoopStatement | ForStatement |
+ WithStatement | AsmStatement |
+ ExitStatement | ReturnStatement |
+ RetryStatement |
+
% VAR s: node ; %
-
+
% s := pushStmt (NIL) %
- )
+ )
first symbols:identtok, retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, returntok, exittok
-
+
reachend
*/
/*
- RetryStatement :=
+ RetryStatement :=
% VAR s: node ; %
-
+
% s := pushStmt (makeComment ("retry")) %
- 'RETRY'
+ 'RETRY'
first symbols:retrytok
-
+
cannot reachend
*/
/*
- AssignmentOrProcedureCall :=
+ AssignmentOrProcedureCall :=
% VAR d, a, p: node ; %
- Designator
+ Designator
% d := pop () %
- ( ':=' Expression
+ ( ':=' Expression
% a := pushStmt (makeAssignment (d, pop ())) %
- |
- ActualParameters
-
+ |
+ ActualParameters
+
% a := pushStmt (makeFuncCall (d, pop ())) %
- |
-
+ |
+
% a := pushStmt (makeFuncCall (d, NIL)) %
- )
+ )
% addCommentBody (peepStmt ()) %
-
+
% addCommentAfter (peepStmt ()) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
/*
- StatementSequence :=
+ StatementSequence :=
% VAR s, t: node ; %
-
+
% s := pushStmt (makeStatementSequence ()) %
-
+
% assert (isStatementSequence (peepStmt ())) %
- Statement
+ Statement
% addStatement (s, popStmt ()) %
-
+
% assert (isStatementSequence (peepStmt ())) %
- { ';' Statement
+ { ';' Statement
% addStatement (s, popStmt ()) %
-
+
% assert (isStatementSequence (peepStmt ())) %
- }
+ }
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok
-
+
reachend
*/
/*
- IfStatement :=
+ IfStatement :=
% VAR i, a, b: node ; %
- 'IF'
+ 'IF'
% b := makeCommentS (getBodyComment ()) %
- Expression
+ Expression
% a := makeCommentS (getAfterComment ()) %
- 'THEN' StatementSequence
+ 'THEN' StatementSequence
% i := pushStmt (makeIf (pop (), popStmt ())) %
-
+
% addIfComments (i, b, a) %
- { 'ELSIF'
+ { 'ELSIF'
% b := makeCommentS (getBodyComment ()) %
- Expression
+ Expression
% a := makeCommentS (getAfterComment ()) %
- 'THEN'
+ 'THEN'
% addElseComments (peepStmt (), b, a) %
- StatementSequence
+ StatementSequence
% i := makeElsif (i, pop (), popStmt ()) %
- } [ 'ELSE' StatementSequence
+ } [ 'ELSE' StatementSequence
% putElse (i, popStmt ()) %
- ] 'END'
+ ] 'END'
% b := makeCommentS (getBodyComment ()) %
-
+
% a := makeCommentS (getAfterComment ()) %
-
+
% assert (isIf (peepStmt ())) %
-
+
% addIfEndComments (peepStmt (), b, a) %
-
+
first symbols:iftok
-
+
cannot reachend
*/
/*
- CaseStatement :=
+ CaseStatement :=
% VAR s, e: node ; %
-
+
% s := pushStmt (makeCase ()) %
- 'CASE' Expression
+ 'CASE' Expression
% s := putCaseExpression (s, pop ()) %
- 'OF' Case { '|' Case } CaseEndStatement
+ 'OF' Case { '|' Case } CaseEndStatement
first symbols:casetok
-
+
cannot reachend
*/
/*
- CaseEndStatement :=
+ CaseEndStatement :=
% VAR c: node ; %
- 'END' | 'ELSE'
+ 'END' | 'ELSE'
% c := peepStmt () %
- StatementSequence
+ StatementSequence
% c := putCaseElse (c, popStmt ()) %
- 'END'
+ 'END'
first symbols:elsetok, endtok
-
+
cannot reachend
*/
/*
- Case := [ CaseLabelList ':'
+ Case := [ CaseLabelList ':'
% VAR l, c: node ; %
-
+
% l := pop () %
-
+
% c := peepStmt () %
- StatementSequence
+ StatementSequence
% c := putCaseStatement (c, l, popStmt ()) %
- ]
+ ]
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
reachend
*/
/*
- CaseLabelList :=
+ CaseLabelList :=
% VAR l: node ; %
-
+
% l := push (makeCaseList ()) %
- CaseLabels { ',' CaseLabels }
+ CaseLabels { ',' CaseLabels }
first symbols:attributetok, identtok, lcbratok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
-
+
cannot reachend
*/
/*
- CaseLabels :=
+ CaseLabels :=
% VAR lo, hi, l: node ; %
-
+
% lo := NIL ; hi := NIL %
-
+
% l := peep () %
- ConstExpression
+ ConstExpression
% lo := pop () %
- [ '..' ConstExpression
+ [ '..' ConstExpression
% hi := pop () %
- ]
+ ]
% l := putCaseRange (l, lo, hi) %
-
+
first symbols:stringtok, lcbratok, identtok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
-
+
cannot reachend
*/
/*
- WhileStatement :=
+ WhileStatement :=
% VAR s, w, e, a, b: node ; %
-
+
% w := pushStmt (makeWhile ()) %
- 'WHILE' Expression 'DO'
+ 'WHILE' Expression 'DO'
% b := makeCommentS (getBodyComment ()) %
-
+
% a := makeCommentS (getAfterComment ()) %
-
+
% addWhileDoComment (w, b, a) %
-
+
% e := pop () %
- StatementSequence
+ StatementSequence
% s := popStmt () %
- 'END'
+ 'END'
% assert (isStatementSequence (peepStmt ())) %
-
+
% putWhile (w, e, s) %
-
+
% b := makeCommentS (getBodyComment ()) %
-
+
% a := makeCommentS (getAfterComment ()) %
-
+
% addWhileEndComment (w, b, a) %
-
+
first symbols:whiletok
-
+
cannot reachend
*/
/*
- RepeatStatement :=
+ RepeatStatement :=
% VAR r, s, a, b: node ; %
-
+
% r := pushStmt (makeRepeat ()) %
- 'REPEAT'
+ 'REPEAT'
% b := makeCommentS (getBodyComment ()) %
-
+
% a := makeCommentS (getAfterComment ()) %
-
+
% addRepeatComment (r, b, a) %
- StatementSequence
+ StatementSequence
% s := popStmt () %
- 'UNTIL' Expression
+ 'UNTIL' Expression
% putRepeat (r, s, pop ()) %
-
+
% b := makeCommentS (getBodyComment ()) %
-
+
% a := makeCommentS (getAfterComment ()) %
-
+
% addUntilComment (r, b, a) %
-
+
first symbols:repeattok
-
+
cannot reachend
*/
/*
- ForStatement :=
+ ForStatement :=
% VAR f, i, s, e, b: node ; %
-
+
% b := NIL %
-
+
% f := pushStmt (makeFor ()) %
- 'FOR' Ident
+ 'FOR' Ident
% i := lookupWithSym (curident) %
- ':=' Expression
+ ':=' Expression
% s := pop () %
- 'TO' Expression
+ 'TO' Expression
% e := pop () %
- [ 'BY' ConstExpression
+ [ 'BY' ConstExpression
% b := pop () %
- ] 'DO' StatementSequence
+ ] 'DO' StatementSequence
% putFor (f, i, s, e, b, popStmt ()) %
- 'END'
+ 'END'
first symbols:fortok
-
+
cannot reachend
*/
/*
- LoopStatement :=
+ LoopStatement :=
% VAR l, s: node ; %
- 'LOOP'
+ 'LOOP'
% l := pushStmt (pushLoop (makeLoop ())) %
-
+
% INC (loopNo) %
- StatementSequence
+ StatementSequence
% s := popStmt () %
-
+
% putLoop (l, s) %
-
+
% DEC (loopNo) %
- 'END'
+ 'END'
% l := popLoop () %
-
+
% assert (isLoop (peepStmt ())) %
-
+
first symbols:looptok
-
+
cannot reachend
*/
/*
- WithStatement := 'WITH' Designator 'DO'
+ WithStatement := 'WITH' Designator 'DO'
% startWith (pop ()) %
- StatementSequence 'END'
+ StatementSequence 'END'
% endWith %
-
+
first symbols:withtok
-
+
cannot reachend
*/
/*
- ProcedureDeclaration := ProcedureHeading ';' ProcedureBlock
- Ident
+ ProcedureDeclaration := ProcedureHeading ';' ProcedureBlock
+ Ident
% leaveScope %
-
+
first symbols:proceduretok
-
+
cannot reachend
*/
/*
- ProcedureIdent := Ident
+ ProcedureIdent := Ident
% curproc := lookupSym (curident) %
-
+
% enterScope (curproc) %
-
+
% setProcedureComment (lastcomment, curident) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
/*
- DefProcedureIdent := Ident
+ DefProcedureIdent := Ident
% curproc := lookupSym (curident) %
-
+
first symbols:identtok
-
+
cannot reachend
*/
/*
- DefineBuiltinProcedure := [ '__ATTRIBUTE__' '__BUILTIN__'
- '(' '(' Ident ')' ')' |
- '__INLINE__' ]
+ DefineBuiltinProcedure := [ '__ATTRIBUTE__' '__BUILTIN__'
+ '(' '(' Ident ')' ')' |
+ '__INLINE__' ]
first symbols:inlinetok, attributetok
-
+
reachend
*/
/*
- ProcedureHeading := 'PROCEDURE' DefineBuiltinProcedure
- ( ProcedureIdent [ FormalParameters ]
- AttributeNoReturn )
+ ProcedureHeading := 'PROCEDURE' DefineBuiltinProcedure
+ ( ProcedureIdent [ FormalParameters ]
+ AttributeNoReturn )
first symbols:proceduretok
-
+
cannot reachend
*/
/*
- Builtin := [ '__BUILTIN__' | '__INLINE__' ]
+ Builtin := [ '__BUILTIN__' | '__INLINE__' ]
first symbols:inlinetok, builtintok
-
+
reachend
*/
/*
- DefProcedureHeading := 'PROCEDURE' Builtin ( DefProcedureIdent
- [ DefFormalParameters ]
- AttributeNoReturn )
+ DefProcedureHeading := 'PROCEDURE' Builtin ( DefProcedureIdent
+ [ DefFormalParameters ]
+ AttributeNoReturn )
first symbols:proceduretok
-
+
cannot reachend
*/
/*
- ProcedureBlock := { Declaration } [ 'BEGIN' ProcedureBlockBody ]
- 'END'
+ ProcedureBlock := { Declaration } [ 'BEGIN' ProcedureBlockBody ]
+ 'END'
first symbols:proceduretok, moduletok, consttok, typetok, vartok, endtok, begintok
-
+
cannot reachend
*/
/*
- Block := { Declaration } InitialBlock FinalBlock
- 'END'
+ Block := { Declaration } InitialBlock FinalBlock
+ 'END'
first symbols:proceduretok, moduletok, finallytok, begintok, consttok, typetok, vartok, endtok
-
+
cannot reachend
*/
/*
- InitialBlock := [ 'BEGIN' InitialBlockBody ]
+ InitialBlock := [ 'BEGIN' InitialBlockBody ]
first symbols:begintok
-
+
reachend
*/
/*
- FinalBlock := [ 'FINALLY' FinalBlockBody ]
+ FinalBlock := [ 'FINALLY' FinalBlockBody ]
first symbols:finallytok
-
+
reachend
*/
/*
- InitialBlockBody := NormalPart
+ InitialBlockBody := NormalPart
% putBegin (curmodule, popStmt ()) %
- [ 'EXCEPT' ExceptionalPart ]
+ [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
/*
- FinalBlockBody := NormalPart
+ FinalBlockBody := NormalPart
% putFinally (curmodule, popStmt ()) %
- [ 'EXCEPT' ExceptionalPart ]
+ [ 'EXCEPT' ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
/*
- ProcedureBlockBody := ProcedureNormalPart [ 'EXCEPT'
- ExceptionalPart ]
+ ProcedureBlockBody := ProcedureNormalPart [ 'EXCEPT'
+ ExceptionalPart ]
first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
-
+
reachend
*/
/*
- ProcedureNormalPart := StatementSequence
+ ProcedureNormalPart := StatementSequence
% putBegin (curproc, popStmt ()) %
-
+
first symbols:identtok, retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, returntok, exittok, semicolontok
-
+
reachend
*/
/*
- NormalPart := StatementSequence
+ NormalPart := StatementSequence
first symbols:identtok, retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, returntok, exittok, semicolontok
-
+
reachend
*/
/*
- ExceptionalPart := StatementSequence
+ ExceptionalPart := StatementSequence
first symbols:identtok, retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, returntok, exittok, semicolontok
-
+
reachend
*/
/*
- Declaration := 'CONST' { ConstantDeclaration ';' } |
- 'TYPE' { TypeDeclaration } |
- 'VAR' { VariableDeclaration ';' } |
- ProcedureDeclaration ';' |
- ModuleDeclaration ';'
+ Declaration := 'CONST' { ConstantDeclaration ';' } |
+ 'TYPE' { TypeDeclaration } |
+ 'VAR' { VariableDeclaration ';' } |
+ ProcedureDeclaration ';' |
+ ModuleDeclaration ';'
first symbols:moduletok, proceduretok, vartok, typetok, consttok
-
+
cannot reachend
*/
/*
- DefFormalParameters := '('
+ DefFormalParameters := '('
% paramEnter (curproc) %
- [ DefMultiFPSection ] ')'
-
+ [ DefMultiFPSection ] ')'
+
% paramLeave (curproc) %
- FormalReturn
+ FormalReturn
first symbols:lparatok
-
+
cannot reachend
*/
/*
- AttributeNoReturn := [ '' ]
+ AttributeNoReturn := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
/*
- AttributeUnused := [ '' ]
+ AttributeUnused := [ '' ]
first symbols:ldirectivetok
-
+
reachend
*/
/*
- DefMultiFPSection := DefExtendedFP |
- FPSection [ ';' DefMultiFPSection ]
+ DefMultiFPSection := DefExtendedFP |
+ FPSection [ ';' DefMultiFPSection ]
first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- FormalParameters := '('
+ FormalParameters := '('
% paramEnter (curproc) %
- [ MultiFPSection ] ')'
+ [ MultiFPSection ] ')'
% paramLeave (curproc) %
- FormalReturn
+ FormalReturn
first symbols:lparatok
-
+
cannot reachend
*/
/*
- MultiFPSection := ExtendedFP | FPSection [ ';'
- MultiFPSection ]
+ MultiFPSection := ExtendedFP | FPSection [ ';'
+ MultiFPSection ]
first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- FPSection := NonVarFPSection |
- VarFPSection
+ FPSection := NonVarFPSection |
+ VarFPSection
first symbols:vartok, identtok
-
+
cannot reachend
*/
/*
- DefExtendedFP := DefOptArg | '...'
+ DefExtendedFP := DefOptArg | '...'
first symbols:lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- ExtendedFP := OptArg | '...'
+ ExtendedFP := OptArg | '...'
first symbols:lsbratok, periodperiodperiodtok
-
+
cannot reachend
*/
/*
- VarFPSection := 'VAR' IdentList ':' FormalType [
- AttributeUnused ]
+ VarFPSection := 'VAR' IdentList ':' FormalType [
+ AttributeUnused ]
first symbols:vartok
-
+
cannot reachend
*/
/*
- NonVarFPSection := IdentList ':' FormalType [ AttributeUnused ]
+ NonVarFPSection := IdentList ':' FormalType [ AttributeUnused ]
first symbols:identtok
-
+
cannot reachend
*/
/*
- OptArg := '[' Ident ':' FormalType [ '=' ConstExpressionNop ]
- ']'
+ OptArg := '[' Ident ':' FormalType [ '=' ConstExpressionNop ]
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- DefOptArg := '[' Ident ':' FormalType '=' ConstExpressionNop
- ']'
+ DefOptArg := '[' Ident ':' FormalType '=' ConstExpressionNop
+ ']'
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- FormalType := { 'ARRAY' 'OF' } Qualident
+ FormalType := { 'ARRAY' 'OF' } Qualident
first symbols:identtok, arraytok
-
+
cannot reachend
*/
/*
- ModuleDeclaration := 'MODULE' Ident [ Priority ]
- ';' { Import } [ Export ]
- Block Ident
+ ModuleDeclaration := 'MODULE' Ident [ Priority ]
+ ';' { Import } [ Export ]
+ Block Ident
first symbols:moduletok
-
+
cannot reachend
*/
/*
- Priority := '[' ConstExpressionNop ']'
+ Priority := '[' ConstExpressionNop ']'
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- Export := 'EXPORT' ( 'QUALIFIED' IdentList |
- 'UNQUALIFIED' IdentList |
- IdentList ) ';'
+ Export := 'EXPORT' ( 'QUALIFIED' IdentList |
+ 'UNQUALIFIED' IdentList |
+ IdentList ) ';'
first symbols:exporttok
-
+
cannot reachend
*/
/*
- FromIdentList := Ident { ',' Ident }
+ FromIdentList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
/*
- FromImport := 'FROM' Ident 'IMPORT' FromIdentList
- ';'
+ FromImport := 'FROM' Ident 'IMPORT' FromIdentList
+ ';'
first symbols:fromtok
-
+
cannot reachend
*/
/*
- ImportModuleList := Ident { ',' Ident }
+ ImportModuleList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
/*
- WithoutFromImport := 'IMPORT' ImportModuleList ';'
+ WithoutFromImport := 'IMPORT' ImportModuleList ';'
first symbols:importtok
-
+
cannot reachend
*/
/*
- Import := FromImport | WithoutFromImport
+ Import := FromImport | WithoutFromImport
first symbols:importtok, fromtok
-
+
cannot reachend
*/
/*
- DefinitionModule := 'DEFINITION' 'MODULE' [ 'FOR'
- string ]
- Ident ';'
+ DefinitionModule := 'DEFINITION' 'MODULE' [ 'FOR'
+ string ]
+ Ident ';'
% curmodule := lookupDef (curident) %
-
+
% enterScope (curmodule) %
- { Import } [ Export ] { Definition }
- 'END' Ident '.'
+ { Import } [ Export ] { Definition }
+ 'END' Ident '.'
% checkEndName (curmodule, curident, 'definition module') %
-
+
% leaveScope %
-
+
first symbols:definitiontok
-
+
cannot reachend
*/
/*
- PushQualident :=
+ PushQualident :=
% VAR type, field: node ; %
- Ident
+ Ident
% qualid := push (lookupWithSym (curident)) %
-
+
% IF qualid = NIL
THEN
metaError1 ('the symbol {%1k} is not visible in this scope (or any other nested scope)', curident)
END %
- [ '.'
+ [ '.'
% IF NOT isQualident (qualid)
THEN
ErrorArray ('the first component of this qualident must be a definition module or a parameter/variable/constant which has record type')
END %
- Ident
+ Ident
% IF isDef (qualid)
THEN
qualid := replace (lookupInScope (qualid, curident))
THEN
metaError1 ('qualified component of the identifier {%1k} cannot be found', curident)
END %
- ]
+ ]
first symbols:identtok
-
+
cannot reachend
*/
/*
- OptSubrange := [ SubrangeType ]
+ OptSubrange := [ SubrangeType ]
first symbols:lsbratok
-
+
reachend
*/
/*
- TypeEquiv := Qualident OptSubrange
+ TypeEquiv := Qualident OptSubrange
first symbols:identtok
-
+
cannot reachend
*/
/*
- EnumIdentList := Ident { ',' Ident }
+ EnumIdentList := Ident { ',' Ident }
first symbols:identtok
-
+
cannot reachend
*/
/*
- Enumeration := '(' EnumIdentList ')'
+ Enumeration := '(' EnumIdentList ')'
first symbols:lparatok
-
+
cannot reachend
*/
/*
- SimpleType := TypeEquiv | Enumeration |
- SubrangeType
+ SimpleType := TypeEquiv | Enumeration |
+ SubrangeType
first symbols:lsbratok, lparatok, identtok
-
+
cannot reachend
*/
/*
- Type := SimpleType | ArrayType | RecordType |
- SetType | PointerType | ProcedureType
+ Type := SimpleType | ArrayType | RecordType |
+ SetType | PointerType | ProcedureType
first symbols:proceduretok, pointertok, settok, packedsettok, oftok, recordtok, arraytok, identtok, lparatok, lsbratok
-
+
cannot reachend
*/
/*
- TypeDeclaration := { Ident ( ';' | '=' Type Alignment
- ';' ) }
+ TypeDeclaration := { Ident ( ';' | '=' Type Alignment
+ ';' ) }
first symbols:identtok
-
+
reachend
*/
/*
- Definition := 'CONST' { ConstantDeclaration ';' } |
- 'TYPE' { TypeDeclaration } |
- 'VAR' { VariableDeclaration ';' } |
- DefProcedureHeading ';'
+ Definition := 'CONST' { ConstantDeclaration ';' } |
+ 'TYPE' { TypeDeclaration } |
+ 'VAR' { VariableDeclaration ';' } |
+ DefProcedureHeading ';'
first symbols:proceduretok, vartok, typetok, consttok
-
+
cannot reachend
*/
/*
- AsmStatement :=
+ AsmStatement :=
% VAR s: node ; %
-
+
% s := pushStmt (makeComment ("asm")) %
- 'ASM' [ 'VOLATILE' ] '(' AsmOperands
- ')'
+ 'ASM' [ 'VOLATILE' ] '(' AsmOperands
+ ')'
first symbols:asmtok
-
+
cannot reachend
*/
/*
- AsmOperands := string [ AsmOperandSpec ]
+ AsmOperands := string [ AsmOperandSpec ]
first symbols:stringtok
-
+
cannot reachend
*/
/*
- AsmOperandSpec := [ ':' AsmList [ ':' AsmList [
- ':' TrashList ] ] ]
+ AsmOperandSpec := [ ':' AsmList [ ':' AsmList [
+ ':' TrashList ] ] ]
first symbols:colontok
-
+
reachend
*/
/*
- AsmList := [ AsmElement ] { ',' AsmElement }
+ AsmList := [ AsmElement ] { ',' AsmElement }
first symbols:lsbratok, stringtok, commatok
-
+
reachend
*/
/*
- NamedOperand := '[' Ident ']'
+ NamedOperand := '[' Ident ']'
first symbols:lsbratok
-
+
cannot reachend
*/
/*
- AsmOperandName := [ NamedOperand ]
+ AsmOperandName := [ NamedOperand ]
first symbols:lsbratok
-
+
reachend
*/
/*
- AsmElement := AsmOperandName string '(' Expression
- ')'
+ AsmElement := AsmOperandName string '(' Expression
+ ')'
first symbols:stringtok, lsbratok
-
+
cannot reachend
*/
/*
- TrashList := [ string ] { ',' string }
+ TrashList := [ string ] { ',' string }
first symbols:commatok, stringtok
-
+
reachend
*/
/*
DebugString - writes a string to the debugging device (Scn.Write).
- It interprets
+ It interprets
as carriage return, linefeed.
*/
/*
DebugString - writes a string to the debugging device (Scn.Write).
- It interprets
+ It interprets
as carriage return, linefeed.
*/
/*
DebugString - writes a string to the debugging device (Scn.Write).
- It interprets
+ It interprets
as carriage return, linefeed.
*/
static unsigned int Capture (DynamicStrings_String__opaque s)
{
- /*
+ /*
* #undef GM2_DEBUG_DYNAMICSTINGS
* #if defined(GM2_DEBUG_DYNAMICSTINGS)
* # define DSdbEnter doDSdbEnter
a = CheckPoisoned (a);
b = CheckPoisoned (b);
}
- /*
+ /*
IF (a#NIL) AND (a#b) AND (a^.head^.state=marked)
THEN
writeString('warning trying to add to a marked string') ; writeLn
static int BufferedRead (FIO_File f, unsigned int nBytes, void * dest);
/*
- HandleEscape - translates
+ HandleEscape - translates
and \t into their respective ascii codes.
*/
/*
- HandleEscape - translates
+ HandleEscape - translates
and \t into their respective ascii codes.
*/
/* make a local copy of each unbounded array. */
memcpy (fname, fname_, _fname_high+1);
- /*
+ /*
The following functions are wrappers for the above.
*/
return FIO_exists (const_cast<void*> (static_cast<const void*>(fname)), StrLib_StrLen ((const char *) fname, _fname_high));
if (f != Error)
{
fd = static_cast<FIO_FileDescriptor> (Indexing_GetIndice (FileInfo, f));
- /*
+ /*
we allow users to close files which have an error status
*/
if (fd != NULL)
FIO_FileDescriptor fd;
CheckAccess (f, FIO_openedforread, false);
- /*
+ /*
we will read a character and then push it back onto the input stream,
having noted the file status, we also reset the status.
*/
EXTERN DynamicStrings_String FormatStrings_Sprintf4 (DynamicStrings_String fmt, const unsigned char *w1_, unsigned int _w1_high, const unsigned char *w2_, unsigned int _w2_high, const unsigned char *w3_, unsigned int _w3_high, const unsigned char *w4_, unsigned int _w4_high);
/*
- HandleEscape - translates \a, \b, \e, \f,
+ HandleEscape - translates \a, \b, \e, \f,
, \r, \x[hex] \[octal]
into their respective ascii codes. It also converts
\[any] into a single [any] character.
static void doraw (termios_TERMIOS term)
{
- /*
+ /*
* from man 3 termios
* termios_p->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
* | INLCR | IGNCR | ICRNL | IXON);
static void dononraw (termios_TERMIOS term)
{
- /*
+ /*
* we undo these settings, (although we leave the character size alone)
*
* from man 3 termios
}
if (oldSize != static_cast<Indexing_Index__opaque> (i)->ArraySize)
{
- /*
+ /*
IF Debug
THEN
printf2('increasing memory hunk from %d to %d
static M2Dependent_ModuleChain LookupModule (M2Dependent_DependencyState state, void * name, void * libname);
/*
- toCString - replace any character sequence
+ toCString - replace any character sequence
into a newline.
*/
/*
- toCString - replace any character sequence
+ toCString - replace any character sequence
into a newline.
*/
extern "C" void M2RTS_AssignmentException (void * filename, unsigned int line, unsigned int column, void * scope, void * message)
{
- /*
+ /*
The following are the runtime exception handler routines.
*/
RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException)), filename, line, column, scope, message);
extern "C" void SymbolKey_KillTree (SymbolKey_SymbolTree *t)
{
- /*
+ /*
we used to get problems compiling KillTree below - so it was split
into the two procedures below.
BEGIN
IF t#NIL
THEN
- Kill(t) ; Would like to place Kill in here but the compiler
- gives a type incompatible error... so i've split
- the procedure into two. - Problem i think with
- VAR t at the top?
+ Kill(t) ; Would like to place Kill in here but the compiler
+ gives a type incompatible error... so i've split
+ the procedure into two. - Problem i think with
+ VAR t at the top?
t := NIL
END
END KillTree ;
trying to schedule a node in a full row; that is, to avoid running
through futile DFA state transitions. */
int *rows_length;
-
+
/* The earliest absolute cycle of an insn in the partial schedule. */
int min_cycle;
static int calculate_stage_count (partial_schedule_ptr, int);
static void calculate_must_precede_follow (ddg_node_ptr, int, int,
int, int, sbitmap, sbitmap, sbitmap);
-static int get_sched_window (partial_schedule_ptr, ddg_node_ptr,
+static int get_sched_window (partial_schedule_ptr, ddg_node_ptr,
sbitmap, int, int *, int *, int *);
static bool try_scheduling_node_in_cycle (partial_schedule_ptr, int, int,
sbitmap, int *, sbitmap, sbitmap);
int distances[2];
sbitmap distance1_uses;
rtx set = single_set (u->insn);
-
+
/* Skip instructions that do not set a register. */
if (set && !REG_P (SET_DEST (set)))
continue;
target regsiter rather then the inc'ed register. */
gcc_assert (!autoinc_var_is_used_p (u->insn, e->dest->insn));
}
-
+
if (nreg_moves4e)
{
gcc_assert (e->distance < 2);
fprintf (dump_file, " (branch)");
fprintf (dump_file, "\n");
}
-
+
gcc_assert (SCHED_TIME (u) >= ps->min_cycle);
gcc_assert (SCHED_TIME (u) <= ps->max_cycle);
update_node_sched_params (u, ii, normalized_time, new_min_cycle);
}
}
-
+
/* Permute the insns according to their order in PS, from row 0 to
row ii-1, and position them right before LAST. This schedules
the insns of the loop kernel. */
{
/* Rotate the partial schedule to have the branch in row ii-1. */
int amount = SCHED_TIME (g->closing_branch->cuid) - (ps->ii - 1);
-
+
reset_sched_times (ps, amount);
rotate_partial_schedule (ps, amount);
}
-
+
set_columns_for_ps (ps);
min_cycle = PS_MIN_CYCLE (ps) - SMODULO (PS_MIN_CYCLE (ps), ps->ii);
ps->ii, stage_count);
print_partial_schedule (ps, dump_file);
}
-
+
if (count_init)
{
if (adjust_inplace)
scheduling passes don't touch it. */
if (! flag_resched_modulo_sched)
mark_loop_unsched (loop);
-
+
/* The life-info is not valid any more. */
df_set_bb_dirty (g->bb);
{
sbitmap tmp_precede, tmp_follow;
- set_must_precede_follow (&tmp_follow, must_follow,
- &tmp_precede, must_precede,
+ set_must_precede_follow (&tmp_follow, must_follow,
+ &tmp_precede, must_precede,
c, start, end, step);
success =
try_scheduling_node_in_cycle (ps, u, c,
for (row = 0; row < ps->ii; row++)
{
int length = 0;
-
+
for (crr_insn = ps->rows[row]; crr_insn; crr_insn = crr_insn->next_in_row)
{
int u = crr_insn->id;
-
+
length++;
gcc_assert (bitmap_bit_p (sched_nodes, u));
/* ??? Test also that all nodes of sched_nodes are in ps, perhaps by
gcc_assert (SCHED_TIME (u) >= ps->min_cycle);
gcc_assert (SCHED_TIME (u) <= ps->max_cycle);
}
-
+
gcc_assert (ps->rows_length[row] == length);
}
}
fprintf (dump, "%d (branch), ", INSN_UID (insn));
else
fprintf (dump, "%d, ", INSN_UID (insn));
-
+
ps_i = ps_i->next_in_row;
}
}
}
-/* Removes the given PS_INSN from the partial schedule. */
-static void
+/* Removes the given PS_INSN from the partial schedule. */
+static void
remove_node_from_ps (partial_schedule_ptr ps, ps_insn_ptr ps_i)
{
int row;
gcc_assert (ps && ps_i);
-
+
row = SMODULO (ps_i->cycle, ps->ii);
if (! ps_i->prev_in_row)
{
if (ps_i->next_in_row)
ps_i->next_in_row->prev_in_row = ps_i->prev_in_row;
}
-
- ps->rows_length[row] -= 1;
+
+ ps->rows_length[row] -= 1;
free (ps_i);
return;
}
/* The closing branch must be the last in the row. */
if (JUMP_P (ps_rtl_insn (ps, next_ps_i->id)))
return false;
-
+
last_in_row = next_ps_i;
}
ps->rows[row] = ps_i;
return true;
}
-
+
/* Now insert the node after INSERT_AFTER_PSI. */
if (! last_must_precede)
int stage_count = CALC_STAGE_COUNT (-1, new_min_cycle, ps->ii);
/* The calculation of stage count is done adding the number of stages
- before cycle zero and after cycle zero. */
+ before cycle zero and after cycle zero. */
stage_count += CALC_STAGE_COUNT (new_max_cycle, 0, ps->ii);
return stage_count;
for (row = 0; row < last_row; row++)
{
ps->rows[row] = ps->rows[row + 1];
- ps->rows_length[row] = ps->rows_length[row + 1];
+ ps->rows_length[row] = ps->rows_length[row + 1];
}
ps->rows[last_row] = first_row;
default:
objc_default_ivar_visibility = OBJC_IVAR_VIS_PROTECTED;
}
-
+
/* Generate general types and push runtime-specific decls to file scope. */
synth_module_prologue ();
static void
interface_hash_init (void)
{
- interface_map = objc_map_alloc_ggc (200);
+ interface_map = objc_map_alloc_ggc (200);
}
static tree
/* We have two or more methods with the same name but different
types. */
first_method = TREE_VEC_ELT (method, 0);
-
+
/* But just how different are those types? If
-Wno-strict-selector-match is specified, we shall not complain if
the differences are solely among types with identical size and
for (i = 0; i < (size_t) TREE_VEC_LENGTH (method); i++)
if (!comp_proto_with_proto (first_method, TREE_VEC_ELT (method, i), 0))
goto issue_warning;
-
+
return first_method;
}
-
+
issue_warning:
if (methods)
{
bool type = TREE_CODE (first_method) == INSTANCE_METHOD_DECL;
-
+
warning_at (input_location, 0,
"multiple methods named %<%c%E%> found",
(is_class ? '+' : '-'),
else
{
bool type = TREE_CODE (first_method) == INSTANCE_METHOD_DECL;
-
+
warning_at (input_location, 0,
"multiple selectors named %<%c%E%> found",
(is_class ? '+' : '-'),
(type ? '-' : '+'),
identifier_to_locale (gen_method_decl (first_method)));
}
-
+
for (i = 0; i < (size_t) TREE_VEC_LENGTH (method); i++)
{
bool type = TREE_CODE (TREE_VEC_ELT (method, i)) == INSTANCE_METHOD_DECL;
-
+
inform (DECL_SOURCE_LOCATION (TREE_VEC_ELT (method, i)), "also found %<%c%s%>",
(type ? '-' : '+'),
identifier_to_locale (gen_method_decl (TREE_VEC_ELT (method, i))));
if (!is_class)
method_prototype = objc_map_get (instance_method_map, sel_name);
-
+
if (method_prototype == OBJC_MAP_NOT_FOUND)
{
method_prototype = objc_map_get (class_method_map, sel_name);
/* We set class_tree to the identifier for 'Class' if this is a
class method, and to NULL_TREE if not. */
class_tree = (IS_CLASS (rtype) ? objc_class_name : NULL_TREE);
-
+
/* 'rprotos' is the list of protocols that the receiver
supports. */
rprotos = (TYPE_HAS_OBJC_INFO (TREE_TYPE (rtype))
there are protocols attached to the type, we can
still look up the method in the protocols. Ie, we
are in the following case:
-
+
@class MyClass;
MyClass<MyProtocol> *x;
[x method];
-
+
If 'MyProtocol' has the method 'method', we can check
and retrieve the method prototype. */
method_prototype
else
{
tree new_entry;
-
+
/* If an entry already exists, it's more complicated. We'll
have to check whether the method prototype is the same or
not. */
/* If not, create a vector to store both the method already
in the map, and the new one that we are adding. */
new_entry = make_tree_vec (2);
-
+
TREE_VEC_ELT (new_entry, 0) = existing_entry;
TREE_VEC_ELT (new_entry, 1) = method;
}
prototype, and very few, if any, will have more than
2! */
new_entry = make_tree_vec (TREE_VEC_LENGTH (existing_entry) + 1);
-
+
/* Copy the methods from the existing vector. */
for (i = 0; i < (size_t) TREE_VEC_LENGTH (existing_entry); i++)
TREE_VEC_ELT (new_entry, i) = TREE_VEC_ELT (existing_entry, i);
-
+
/* Add the new method at the end. */
TREE_VEC_ELT (new_entry, i) = method;
}
warning (warn_shadow_ivar ? OPT_Wshadow_ivar : OPT_Wshadow,
"local declaration of %qE hides instance variable", id);
}
-
+
return other;
}
encode_field (field_decl,
obstack_object_size (&util_obstack),
OBJC_ENCODE_DONT_INLINE_DEFS);
-
+
/* Null terminate string. */
obstack_1grow (&util_obstack, 0);
objc_map_t map = ggc_cleared_alloc<objc_map_private> ();
if (map == NULL)
OUT_OF_MEMORY;
-
+
initial_capacity = next_power_of_two (initial_capacity);
-
+
map->number_of_slots = initial_capacity;
map->mask = initial_capacity - 1;
map->maximum_load_factor = 70;
if (map->slots == NULL)
OUT_OF_MEMORY;
-
+
if (map->values == NULL)
OUT_OF_MEMORY;
tree *old_slots = map->slots;
tree *old_values = map->values;
size_t i, old_number_of_slots = map->number_of_slots;
-
+
if (new_number_of_slots < (map->number_of_non_empty_slots))
new_number_of_slots = 2 * map->number_of_non_empty_slots;
new_number_of_slots = next_power_of_two (new_number_of_slots);
-
+
map->number_of_slots = new_number_of_slots;
map->mask = map->number_of_slots - 1;
map->max_number_of_non_empty_slots = (map->number_of_slots * map->maximum_load_factor) / 100;
if (old_slots[i] != OBJC_MAP_PRIVATE_EMPTY_SLOT)
{
size_t k = IDENTIFIER_HASH_VALUE (old_slots[i]) & map->mask;
-
+
if (map->slots[k] == OBJC_MAP_PRIVATE_EMPTY_SLOT)
{
map->slots[k] = old_slots[i];
if (map->slots[i] == key)
return map->values[i];
-
+
while (1)
{
i = (i + j) & map->mask;
-
+
if (map->slots[i] == OBJC_MAP_PRIVATE_EMPTY_SLOT)
return OBJC_MAP_NOT_FOUND;
-
+
if (map->slots[i] == key)
return map->values[i];
objc_map_private_grow (map);
i = hash & map->mask;
-
+
while (1)
{
if (map->slots[i] == OBJC_MAP_PRIVATE_EMPTY_SLOT)
void *slot;
if (*i == map->number_of_slots)
return OBJC_MAP_FAILURE;
-
+
slot = map->slots[*i];
*i = *i + 1;
if (slot != OBJC_MAP_PRIVATE_EMPTY_SLOT)
return eh_id;
}
-/* For NeXT ABI 0 and 1, the personality routines are just those of the
+/* For NeXT ABI 0 and 1, the personality routines are just those of the
underlying language. */
static tree
-/* Process the ObjC-specific declarations and variables for
+/* Process the ObjC-specific declarations and variables for
the Objective-C++ compiler.
Copyright (C) 2005-2024 Free Software Foundation, Inc.
Contributed by Ziemowit Laski <zlaski@apple.com>
/* Hacks to simulate start_struct() and finish_struct(). */
-tree
+tree
objcp_start_struct (location_t loc ATTRIBUTE_UNUSED,
enum tree_code code ATTRIBUTE_UNUSED, tree name)
{
return begin_class_definition (s);
}
-tree
+tree
objcp_finish_struct (location_t loc ATTRIBUTE_UNUSED,
tree t, tree fieldlist, tree attributes)
{
int
objcp_comptypes (tree type1, tree type2)
-{
+{
return comptypes (type1, type2, COMPARE_STRICT);
}
-/* Process the ObjC-specific declarations and variables for
+/* Process the ObjC-specific declarations and variables for
the Objective-C++ compiler.
Copyright (C) 2005-2024 Free Software Foundation, Inc.
Contributed by Ziemowit Laski <zlaski@apple.com>
extern tree objcp_begin_compound_stmt (int);
extern tree objcp_end_compound_stmt (tree, int);
-/* Now "cover up" the corresponding C++ functions if required (NB: the
+/* Now "cover up" the corresponding C++ functions if required (NB: the
OBJCP_ORIGINAL_FUNCTION macro, shown below, can still be used to
invoke the original C++ functions if needed). */
#ifdef OBJCP_REMAP_FUNCTIONS
#define LANG_HOOKS_NAME "GNU Objective-C++"
#undef LANG_HOOKS_INIT
#define LANG_HOOKS_INIT objc_init
-#undef LANG_HOOKS_GIMPLIFY_EXPR
+#undef LANG_HOOKS_GIMPLIFY_EXPR
#define LANG_HOOKS_GIMPLIFY_EXPR objc_gimplify_expr
#undef LANG_HOOKS_INIT_TS
#define LANG_HOOKS_INIT_TS objcxx_init_ts
Add CHILD_FNDECL to decl chain of the supercontext of the block
ENTRY_BLOCK - this is the block which originally contained the
code from which CHILD_FNDECL was created.
-
+
Together, these actions ensure that the debug info for the outlined
function will be emitted with the correct lexical scope. */
OLF_GANG_STATIC = 1u << 3, /* Gang partitioning is static (has op). */
OLF_TILE = 1u << 4, /* Tiled loop. */
OLF_REDUCTION = 1u << 5, /* Reduction loop. */
-
+
/* Explicitly specified loop axes. */
OLF_DIM_BASE = 6,
OLF_DIM_GANG = 1u << (OLF_DIM_BASE + GOMP_DIM_GANG),
}
if (tag & OLF_TILE)
- /* Tiling could use all 3 levels. */
+ /* Tiling could use all 3 levels. */
levels = 3;
else
{
}
/* Emit an OpenACC lopp head or tail marker to SEQ. LEVEL is the
- partitioning level of the enclosed region. */
+ partitioning level of the enclosed region. */
static void
lower_oacc_loop_marker (location_t loc, tree ddvar, bool head,
/* Transform a GOACC_TILE call. Determines the element loop span for
the specified loop of the nest. This is 1 if we're not tiling.
-
+
GOACC_TILE (collapse_count, loop_no, tile_arg, gwv_tile, gwv_element); */
static void
tree e_mask_arg = build_int_cst (unsigned_type_node, loop->e_mask);
tree chunk_arg = loop->chunk_size;
gcall *call;
-
+
for (ix = 0; loop->ifns.iterate (ix, &call); ix++)
{
switch (gimple_call_internal_fn (call))
bool auto_par = (loop->flags & OLF_AUTO) != 0;
bool seq_par = (loop->flags & OLF_SEQ) != 0;
bool tiling = (loop->flags & OLF_TILE) != 0;
-
+
this_mask = ((loop->flags >> OLF_DIM_BASE)
& (GOMP_DIM_MASK (GOMP_DIM_MAX) - 1));
/* Find the first outermost available partition. */
while (this_mask <= outer_mask)
this_mask <<= 1;
-
+
/* Grab two axes if tiling, and we've not assigned anything */
if (tiling && !(loop->mask | loop->e_mask))
this_mask |= this_mask << 1;
oacc_xform_tile (call);
rescan = true;
break;
-
+
case IFN_GOACC_LOOP:
oacc_xform_loop (call);
rescan = true;
}
if (fmt->signbit_ro >= 0
- && (CONST_DOUBLE_AS_FLOAT_P (op0)
+ && (CONST_DOUBLE_AS_FLOAT_P (op0)
|| (optab_handler (neg_optab, mode) != CODE_FOR_nothing
&& optab_handler (abs_optab, mode) != CODE_FOR_nothing)))
{
COMPARISON is the rtl operator to compare with (EQ, NE, GT, etc.).
It will be potentially converted into an unsigned variant based on
UNSIGNEDP to select a proper jump instruction.
-
+
PROB is the probability of jumping to LABEL. If the comparison is against
zero then VAL contains the expression from which the non-zero RTL is
derived. */
/* This function tries to emit an atomic_exchange intruction. VAL is written
to *MEM using memory model MODEL. The previous contents of *MEM are returned,
using TARGET if possible. */
-
+
static rtx
maybe_emit_atomic_exchange (rtx target, rtx mem, rtx val, enum memmodel model)
{
icode = optab_handler (sync_lock_test_and_set_optab, mode);
/* Legacy sync_lock_test_and_set is an acquire barrier. If the pattern
- exists, and the memory model is stronger than acquire, add a release
+ exists, and the memory model is stronger than acquire, add a release
barrier before the instruction. */
if (is_mm_seq_cst (model) || is_mm_release (model) || is_mm_acq_rel (model))
return NULL_RTX;
}
-/* This function tries to implement an atomic exchange operation using a
+/* This function tries to implement an atomic exchange operation using a
compare_and_swap loop. VAL is written to *MEM. The previous contents of
*MEM are returned, using TARGET if possible. No memory model is required
since a compare_and_swap loop is seq-cst. */
-static rtx
+static rtx
maybe_emit_compare_and_swap_exchange_loop (rtx target, rtx mem, rtx val)
{
machine_mode mode = GET_MODE (mem);
/* This function expands the legacy _sync_lock test_and_set operation which is
generally an atomic exchange. Some limited targets only allow the
- constant 1 to be stored. This is an ACQUIRE operation.
+ constant 1 to be stored. This is an ACQUIRE operation.
- TARGET is an optional place to stick the return value.
+ TARGET is an optional place to stick the return value.
MEM is where VAL is stored. */
rtx
emit_insn (gen_rtx_PARALLEL (VOIDmode, v));
}
-/* This routine will either emit the mem_thread_fence pattern or issue a
+/* This routine will either emit the mem_thread_fence pattern or issue a
sync_synchronize to generate a fence for memory model MEMMODEL. */
void
};
-/* Fill in structure pointed to by OP with the various optab entries for an
+/* Fill in structure pointed to by OP with the various optab entries for an
operation of type CODE. */
static void
/* See if there is a more optimal way to implement the operation "*MEM CODE VAL"
using memory order MODEL. If AFTER is true the operation needs to return
- the value of *MEM after the operation, otherwise the previous value.
+ the value of *MEM after the operation, otherwise the previous value.
TARGET is an optional place to place the result. The result is unused if
it is const0_rtx.
Return the result if there is a better sequence, otherwise NULL_RTX. */
return NULL_RTX;
}
-/* Try to emit an instruction for a specific operation varaition.
+/* Try to emit an instruction for a specific operation varaition.
OPTAB contains the OP functions.
TARGET is an optional place to return the result. const0_rtx means unused.
MEM is the memory location to operate on.
MODEL is the memory model, if used.
AFTER is true if the returned result is the value after the operation. */
-static rtx
+static rtx
maybe_emit_op (const struct atomic_op_functions *optab, rtx target, rtx mem,
rtx val, bool use_memmodel, enum memmodel model, bool after)
{
return (target == const0_rtx ? const0_rtx : ops[0].value);
return NULL_RTX;
-}
+}
/* This function expands an atomic fetch_OP or OP_fetch operation:
TARGET is an option place to stick the return value. const0_rtx indicates
- the result is unused.
+ the result is unused.
atomically fetch MEM, perform the operation with VAL and return it to MEM.
CODE is the operation being performed (OP)
MEMMODEL is the memory model variant to use.
AFTER is true to return the result of the operation (OP_fetch).
- AFTER is false to return the value before the operation (fetch_OP).
+ AFTER is false to return the value before the operation (fetch_OP).
This function will *only* generate instructions if there is a direct
optab. No compare and swap loops or libcalls will be generated. */
/* This function expands an atomic fetch_OP or OP_fetch operation:
TARGET is an option place to stick the return value. const0_rtx indicates
- the result is unused.
+ the result is unused.
atomically fetch MEM, perform the operation with VAL and return it to MEM.
CODE is the operation being performed (OP)
MEMMODEL is the memory model variant to use.
result = expand_atomic_fetch_op_no_fallback (target, mem, val, code, model,
after);
-
+
if (result)
return result;
start_sequence ();
/* If the result is used, get a register for it. */
- if (!unused_result)
+ if (!unused_result)
{
if (!target || !register_operand (target, mode))
target = gen_reg_rtx (mode);
t1 = expand_simple_unop (mode, code, t1, NULL_RTX, true);
}
else
- t1 = expand_simple_binop (mode, code, t1, val, NULL_RTX, true,
+ t1 = expand_simple_binop (mode, code, t1, val, NULL_RTX, true,
OPTAB_LIB_WIDEN);
/* For after, copy the value now. */
OPTAB_NL(udiv_optab, "udiv$I$a3", UDIV, "udiv", '3', gen_int_unsigned_fixed_libfunc)
OPTAB_NX(udiv_optab, "udiv$Q$a3")
OPTAB_NL(usdiv_optab, "usdiv$Q$a3", US_DIV, "usdiv", '3', gen_unsigned_fixed_libfunc)
-OPTAB_NC(sdivmod_optab, "divmod$a4", UNKNOWN)
+OPTAB_NC(sdivmod_optab, "divmod$a4", UNKNOWN)
OPTAB_NC(udivmod_optab, "udivmod$a4", UNKNOWN)
OPTAB_NL(smod_optab, "mod$a3", MOD, "mod", '3', gen_int_libfunc)
OPTAB_NL(umod_optab, "umod$a3", UMOD, "umod", '3', gen_int_libfunc)
rtx expand_atomic_load (rtx, rtx, enum memmodel);
rtx expand_atomic_store (rtx, rtx, enum memmodel, bool);
-rtx expand_atomic_fetch_op (rtx, rtx, rtx, enum rtx_code, enum memmodel,
+rtx expand_atomic_fetch_op (rtx, rtx, rtx, enum rtx_code, enum memmodel,
bool);
extern void expand_asm_reg_clobber_mem_blockage (HARD_REG_SET);
diagnostics or set state outside of these variables. */
void
-decode_cmdline_options_to_array (unsigned int argc, const char **argv,
+decode_cmdline_options_to_array (unsigned int argc, const char **argv,
unsigned int lang_mask,
struct cl_decoded_option **decoded_options,
unsigned int *decoded_options_count)
handlers->target_option_override_hook))
return false;
}
-
+
return true;
}
case CLVC_BIT_SET:
if ((value != 0) == (option->var_type == CLVC_BIT_SET))
{
- if (option->cl_host_wide_int)
+ if (option->cl_host_wide_int)
*(HOST_WIDE_INT *) flag_var |= option->var_value;
- else
+ else
*(int *) flag_var |= option->var_value;
}
else
{
- if (option->cl_host_wide_int)
+ if (option->cl_host_wide_int)
*(HOST_WIDE_INT *) flag_var &= ~option->var_value;
- else
+ else
*(int *) flag_var &= ~option->var_value;
}
if (set_flag_var)
{
- if (option->cl_host_wide_int)
+ if (option->cl_host_wide_int)
*(HOST_WIDE_INT *) set_flag_var |= option->var_value;
else
*(int *) set_flag_var |= option->var_value;
}
case CLVC_EQUAL:
- if (option->cl_host_wide_int)
+ if (option->cl_host_wide_int)
return *(HOST_WIDE_INT *) flag_var == option->var_value;
else
return *(int *) flag_var == option->var_value;
case CLVC_BIT_CLEAR:
- if (option->cl_host_wide_int)
+ if (option->cl_host_wide_int)
return (*(HOST_WIDE_INT *) flag_var & option->var_value) == 0;
else
return (*(int *) flag_var & option->var_value) == 0;
case CLVC_BIT_SET:
- if (option->cl_host_wide_int)
+ if (option->cl_host_wide_int)
return (*(HOST_WIDE_INT *) flag_var & option->var_value) != 0;
- else
+ else
return (*(int *) flag_var & option->var_value) != 0;
case CLVC_SIZE:
void
decode_cmdline_options_to_array_default_mask (unsigned int argc,
- const char **argv,
+ const char **argv,
struct cl_decoded_option **decoded_options,
unsigned int *decoded_options_count)
{
char *w;
char *token_start;
vec<char_p> *v = (vec<char_p> *) *pvec;
-
+
vec_check_alloc (v, 1);
/* We never free this string. */
case OPT_fdiagnostics_show_location_:
diagnostic_prefixing_rule (dc) = (diagnostic_prefixing_rule_t) value;
break;
-
+
case OPT_fdiagnostics_show_caret:
dc->m_source_printing.enabled = value;
break;
}
else
value = opts->x_dwarf_version;
-
+
/* FALLTHRU */
case OPT_gdwarf_:
if (value < 2 || value > 5)
const char **argp, int value,
unsigned int lang_mask);
extern void decode_cmdline_options_to_array (unsigned int argc,
- const char **argv,
+ const char **argv,
unsigned int lang_mask,
struct cl_decoded_option **decoded_options,
unsigned int *decoded_options_count);
struct gcc_options *opts_set);
extern void init_opts_obstack (void);
extern void decode_cmdline_options_to_array_default_mask (unsigned int argc,
- const char **argv,
+ const char **argv,
struct cl_decoded_option **decoded_options,
unsigned int *decoded_options_count);
extern void set_default_handlers (struct cl_option_handlers *handlers,
}
else if (*ptr == '=')
{
- if (!key_parsed)
+ if (!key_parsed)
{
key_len = len;
len = 0;
offrng[1] = aref.sizrng[1] - 1;
else
offrng[1] = HOST_WIDE_INT_M1U;
-
+
offrng[0] = 0;
return gimple_call_arg (stmt, 0);
}
if (range_type == VR_VARYING)
{
if (integral)
- {
+ {
/* Use the full range of the type of the expression when
no value range information is available. */
range[0] = TYPE_MIN_VALUE (exptype);
retval = NULL;
for (i = use_idx; i < RELOAD_COMBINE_MAX_USES; i++)
{
- struct reg_use *use = reg_state[regno].reg_use + i;
+ struct reg_use *use = reg_state[regno].reg_use + i;
int this_ruid = use->ruid;
if (this_ruid >= ruid_limit)
continue;
if (!DEBUG_BIND_INSN_P (insn))
continue;
-
+
t = INSN_VAR_LOCATION_LOC (insn);
t = simplify_replace_rtx (t, reg, replacement);
validate_change (insn, &INSN_VAR_LOCATION_LOC (insn), t, 0);
/* Return true if COUNT is considered to be never executed in function FUN
or if function FUN is considered so in the static profile. */
-
+
static bool
probably_never_executed (struct function *fun, profile_count count)
{
op0 = gimple_cond_lhs (stmt);
op1 = gimple_cond_rhs (stmt);
- if ((TREE_CODE (op0) != SSA_NAME && TREE_CODE (op0) != INTEGER_CST)
+ if ((TREE_CODE (op0) != SSA_NAME && TREE_CODE (op0) != INTEGER_CST)
|| (TREE_CODE (op1) != SSA_NAME && TREE_CODE (op1) != INTEGER_CST))
return false;
if (!simple_iv (loop, loop_containing_stmt (stmt), op0, &iv0, true))
bb->index, cyclic_probability.to_double (),
max_cyclic_prob.to_double (),
frequency.to_double ());
-
+
cyclic_probability = max_cyclic_prob;
}
else if (dump_file)
for (e = node->indirect_calls; e; e = e->next_callee)
e->count = gimple_bb (e->call_stmt)->count;
node->count = ENTRY_BLOCK_PTR_FOR_FN (fn)->count;
-
+
profile_status_for_fn (fn)
= (flag_guess_branch_prob ? PROFILE_GUESSED : PROFILE_ABSENT);
node->frequency
call counts going to 0-count functions, and drop the profile to guessed
so that we can use the estimated probabilities and avoid optimizing only
for size.
-
+
The other case where the profile may be missing is when the routine
is not going to be emitted to the object file, e.g. for "extern template"
class methods. Those will be marked DECL_EXTERNAL. Emit a warning in
count_sum += e2->count ();
if (e2->probability.initialized_p ())
prob_sum += e2->probability;
- else
+ else
uninitialized_exit = true;
}
}
}
/* FIXME: Implement RTL path. */
- else
+ else
found = true;
if (!found)
{
DEF_PREDICTOR (PRED_FORTRAN_CONTIGUOUS, "Fortran contiguous", \
HITRATE (75), 0)
-
+
Flush the formatted text of pretty-printer PP onto the attached stream.
Replace characters in PPF that have special meaning in a GraphViz .dot
file.
-
+
This routine is not very fast, but it doesn't have to be as this is only
be used by routines dumping intermediate representations in graph form. */
}
/* Verify %Z. */
- int v[] = { 1, 2, 3 };
+ int v[] = { 1, 2, 3 };
ASSERT_PP_FORMAT_3 ("1, 2, 3 12345678", "%Z %x", v, 3, 0x12345678);
- int v2[] = { 0 };
+ int v2[] = { 0 };
ASSERT_PP_FORMAT_3 ("0 12345678", "%Z %x", v2, 1, 0x12345678);
/* Verify %e. */
if (other.ipa ().nonzero_p ()
&& !(ipa () == *this))
return false;
-
+
return ipa_p () == other.ipa_p ();
}
return *this;
}
- /* Return true when value is not zero and can be used for scaling.
+ /* Return true when value is not zero and can be used for scaling.
This is different from *this > 0 because that requires counter to
be IPA. */
bool nonzero_p () const
}
\f
-/* Computes hybrid profile for all matching entries in da_file.
-
+/* Computes hybrid profile for all matching entries in da_file.
+
CFG_CHECKSUM is the precomputed checksum for the CFG. */
static gcov_type *
/* Compute the branch probabilities for the various branches.
- Annotate them accordingly.
+ Annotate them accordingly.
CFG_CHECKSUM is the precomputed checksum for the CFG. */
}
}
/* Load value histograms values whose description is stored in VALUES array
- from .gcda file.
+ from .gcda file.
CFG_CHECKSUM is the precomputed checksum for the CFG. */
/* Compute two different checksums. Note that we want to compute
the checksum in only once place, since it depends on the shape
- of the control flow which can change during
+ of the control flow which can change during
various transformations. */
if (thunk)
{
update_known_bitmask (r, MINUS_EXPR, lh, rh);
}
-void
+void
operator_minus::wi_fold (irange &r, tree type,
const wide_int &lh_lb, const wide_int &lh_ub,
const wide_int &rh_lb, const wide_int &rh_ub) const
return overflow;
}
-void
+void
operator_mult::wi_fold (irange &r, tree type,
const wide_int &lh_lb, const wide_int &lh_ub,
const wide_int &rh_lb, const wide_int &rh_ub) const
return (r->cl == rvc_nan);
}
-/* Determine whether a floating-point value X is a signaling NaN. */
+/* Determine whether a floating-point value X is a signaling NaN. */
bool real_issignaling_nan (const REAL_VALUE_TYPE *r)
{
return real_isnan (r) && r->signalling;
mpfr_sqrt (mpfr_c, mpfr_c, MPFR_RNDZ);
real_from_mpfr (r, mpfr_c, fmt, MPFR_RNDZ);
-
+
mpfr_clears (mpfr_const1, mpfr_c, mpfr_maxval, NULL);
}
/* Determine whether a floating-point value X is a NaN. */
#define REAL_VALUE_ISNAN(x) real_isnan (&(x))
-/* Determine whether a floating-point value X is a signaling NaN. */
+/* Determine whether a floating-point value X is a signaling NaN. */
#define REAL_VALUE_ISSIGNALING_NAN(x) real_issignaling_nan (&(x))
/* Determine whether a floating-point value X is negative. */
/* Fills r with the largest value such that 1 + r*r won't overflow.
This is used in both sin (atan (x)) and cos (atan(x)) optimizations. */
-extern void build_sinatan_real (REAL_VALUE_TYPE *, tree);
+extern void build_sinatan_real (REAL_VALUE_TYPE *, tree);
#endif /* ! GCC_REAL_H */
clobbers. */
int icode = recog (pat, insn,
(GET_CODE (pat) == SET
- && ! reload_completed
+ && ! reload_completed
&& ! reload_in_progress)
? &num_clobbers : 0);
bool is_asm = icode < 0 && asm_noperands (PATTERN (insn)) >= 0;
integer modes need the same number of hard registers, the
size of floating point mode can be less than the integer
mode. */
- && ! lra_in_progress
+ && ! lra_in_progress
&& paradoxical_subreg_p (op))
return false;
/* Regno must not be a pseudo register. Offset may be negative. */
return (HARD_REGISTER_NUM_P (regno)
&& HARD_REGISTER_NUM_P (regno + offset)
- && in_hard_reg_set_p (reg_class_contents[(int) cl], mode,
+ && in_hard_reg_set_p (reg_class_contents[(int) cl], mode,
regno + offset));
}
\f
generated more than one insn.
This generates garbage since we throw away the insn when we're
- done, only to recreate it later if this test was successful.
+ done, only to recreate it later if this test was successful.
Make sure to get the mode from the extension (cand->insn). This
is different than in the code to emit the copy as we have not
struct value_data *vd;
rtx ignore_set_reg;
};
-
+
/* Called through note_stores. If X is set, not clobbered, kill its
current value and install it as the root of its own value list. */
break;
continue;
}
-
+
extract_constrain_insn (insn);
preprocess_constraints (insn);
for (i = 0; i < N_REG_CLASSES; i++)
{
bool any_nonfixed = false;
- for (j = 0; j < FIRST_PSEUDO_REGISTER; j++)
+ for (j = 0; j < FIRST_PSEUDO_REGISTER; j++)
if (TEST_HARD_REG_BIT (reg_class_contents[i], j))
{
reg_class_size[i]++;
if (global_regs[i])
{
auto_diagnostic_group d;
- warning_at (loc, 0,
+ warning_at (loc, 0,
"register of %qD used for multiple global register variables",
decl);
inform (DECL_SOURCE_LOCATION (global_regs_decl[i]),
- "conflicts with %qD", global_regs_decl[i]);
+ "conflicts with %qD", global_regs_decl[i]);
return;
}
if (!range_overlaps_hard_reg_set_p (live, chain->regno,
chain->nregs))
continue;
-
+
n_succs_used++;
dest_ri = (class bb_rename_info *)e->dest->aux;
printed = true;
fprintf (dump_file,
" merging chains %d (->%d) and %d (->%d) [%s]\n",
- k, incoming_chain->id, j, chain->id,
+ k, incoming_chain->id, j, chain->id,
reg_names[incoming_chain->regno]);
}
unsigned int end_regno;
gcc_assert (HARD_REGISTER_NUM_P (regno));
-
+
if (!TEST_HARD_REG_BIT (regs, regno))
return false;
small_register_class_p (reg_class_t rclass)
{
return (reg_class_size [(int) rclass] == 1
- || (reg_class_size [(int) rclass] >= 1
+ || (reg_class_size [(int) rclass] >= 1
&& targetm.class_likely_spilled_p (rclass)));
}
However, we only ignore IN in its role as this reload.
If the insn uses IN elsewhere and it contains OUT,
that counts. We can't be sure it's the "same" operand
- so it might not go through this reload.
+ so it might not go through this reload.
We also need to avoid using OUT if it, or part of it, is a
fixed register. Modifying such registers, even transiently,
vec<reg_equivs_t, va_gc> *reg_equivs;
-/* Stack of addresses where an rtx has been changed. We can undo the
+/* Stack of addresses where an rtx has been changed. We can undo the
changes by popping items off the stack and restoring the original
- value at each location.
+ value at each location.
We use this simplistic undo capability rather than copy_rtx as copy_rtx
will not make a deep copy of a normally sharable rtx, such as
if (regno >= REGNO (reg) && regno < END_REGNO (reg))
return 0;
}
-
+
switch (type)
{
case RELOAD_OTHER:
remove its related reloads. */
else if (rld[r].in
&& rld[r].out != rld[r].in
- && (tem = replaced_subreg (rld[r].in), REG_P (tem))
+ && (tem = replaced_subreg (rld[r].in), REG_P (tem))
&& REGNO (tem) < FIRST_PSEUDO_REGISTER
&& (targetm.secondary_memory_needed
(rld[r].inmode, REGNO_REG_CLASS (REGNO (tem)),
/* Store into the reload register instead of the pseudo. */
SET_DEST (PATTERN (temp)) = reloadreg;
- /* Verify that resulting insn is valid.
+ /* Verify that resulting insn is valid.
Note that we have replaced the destination of TEMP with
RELOADREG. If TEMP references RELOADREG within an
TRIAL's delay list. */
for (int j = 1; j < i; j++)
mark_set_resources (XVECEXP (pat, 0, j),
- &modified, 0, MARK_SRC_DEST_CALL);
+ &modified, 0, MARK_SRC_DEST_CALL);
if (! insn_references_resource_p (dtrial, &set, true)
&& ! insn_sets_resource_p (dtrial, &set, true)
&& ! insn_sets_resource_p (dtrial, &needed, true)
&& rtx_equal_p (PATTERN (next_to_match), PATTERN (dtrial))
- /* Check that DTRIAL and NEXT_TO_MATCH does not reference a
+ /* Check that DTRIAL and NEXT_TO_MATCH does not reference a
resource modified between them (only dtrial is checked because
next_to_match and dtrial shall to be equal in order to hit
this line) */
We know "trial" is an insn here as it is the output of
next_real_nondebug_insn () above. */
update_block (as_a <rtx_insn *> (trial), tmp);
-
+
/* Now emit a label before the special USE insn, and
redirect our jump to the new label. */
target_label = get_label_before (PREV_INSN (tmp), target_label);
rtx temp_label = JUMP_LABEL (trial_seq->insn (0));
if (ANY_RETURN_P (temp_label))
temp_label = find_end_label (temp_label);
-
+
if (temp_label
&& redirect_with_delay_slots_safe_p (delay_jump_insn,
temp_label, insn))
unmodified version of the pattern).
3: String to substitute for the subst-attribute name in the pattern
name, for the case that the DEFINE_SUBST is applied to the patten.
-
+
The use of DEFINE_SUBST and DEFINE_SUBST_ATTR is explained in the
GCC internals manual, under "RTL Templates Transformations". */
DEF_RTL_EXPR(DEFINE_SUBST_ATTR, "define_subst_attr", "ssss", RTX_EXTRA)
case SIGN_EXTRACT:
case ZERO_EXTRACT:
return false;
-
+
default:
return true;
}
#if (__cplusplus > 201103L) && !defined(TL_EXPECTED_GCC49)
#include <cassert>
#define TL_ASSERT(x) assert(x)
-#else
+#else
#define TL_ASSERT(x)
#endif
#endif
//no constexpr for GCC 4/5 bug
#else
TL_EXPECTED_MSVC2015_CONSTEXPR
- #endif
+ #endif
expected_storage_base() : m_has_val(true) {}
-
+
constexpr expected_storage_base(no_init_t) : m_val(), m_has_val(false) {}
constexpr expected_storage_base(in_place_t) : m_has_val(true) {}
template<class T, class A>
struct is_trivially_copy_constructible<std::vector<T,A>>
: std::is_trivially_copy_constructible<T>{};
-#endif
+#endif
}
}
#endif
template <class T, class Ret, class... Args>
struct is_pointer_to_non_const_member_func<Ret (T::*) (Args...)&> : std::true_type{};
template <class T, class Ret, class... Args>
-struct is_pointer_to_non_const_member_func<Ret (T::*) (Args...)&&> : std::true_type{};
+struct is_pointer_to_non_const_member_func<Ret (T::*) (Args...)&&> : std::true_type{};
template <class T, class Ret, class... Args>
struct is_pointer_to_non_const_member_func<Ret (T::*) (Args...) volatile> : std::true_type{};
template <class T, class Ret, class... Args>
struct is_pointer_to_non_const_member_func<Ret (T::*) (Args...) volatile&> : std::true_type{};
template <class T, class Ret, class... Args>
-struct is_pointer_to_non_const_member_func<Ret (T::*) (Args...) volatile&&> : std::true_type{};
+struct is_pointer_to_non_const_member_func<Ret (T::*) (Args...) volatile&&> : std::true_type{};
template <class T> struct is_const_or_const_ref : std::false_type{};
template <class T> struct is_const_or_const_ref<T const&> : std::true_type{};
-template <class T> struct is_const_or_const_ref<T const> : std::true_type{};
+template <class T> struct is_const_or_const_ref<T const> : std::true_type{};
#endif
// std::invoke from C++17
// https://stackoverflow.com/questions/38288042/c11-14-invoke-workaround
template <typename Fn, typename... Args,
#ifdef TL_TRAITS_LIBCXX_MEM_FN_WORKAROUND
- typename = enable_if_t<!(is_pointer_to_non_const_member_func<Fn>::value
- && is_const_or_const_ref<Args...>::value)>,
+ typename = enable_if_t<!(is_pointer_to_non_const_member_func<Fn>::value
+ && is_const_or_const_ref<Args...>::value)>,
#endif
typename = enable_if_t<std::is_member_pointer<decay_t<Fn>>::value>,
int = 0>
emplace(std::initializer_list<U> il, Args &&... args) {
*this = nullopt;
this->construct(il, std::forward<Args>(args)...);
- return value();
+ return value();
}
/// Swaps this optional with the other.
const std::array<uint32_t, NUM_NUMERIC_CODEPOINTS> NUMERIC_CODEPOINTS = {{
// clang-format off
- 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x00b2, 0x00b3, 0x00b9, 0x00bc, 0x00bd, 0x00be,
- 0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, 0x0668, 0x0669, 0x06f0, 0x06f1, 0x06f2, 0x06f3, 0x06f4, 0x06f5,
- 0x06f6, 0x06f7, 0x06f8, 0x06f9, 0x07c0, 0x07c1, 0x07c2, 0x07c3, 0x07c4, 0x07c5, 0x07c6, 0x07c7, 0x07c8, 0x07c9, 0x0966, 0x0967,
- 0x0968, 0x0969, 0x096a, 0x096b, 0x096c, 0x096d, 0x096e, 0x096f, 0x09e6, 0x09e7, 0x09e8, 0x09e9, 0x09ea, 0x09eb, 0x09ec, 0x09ed,
- 0x09ee, 0x09ef, 0x09f4, 0x09f5, 0x09f6, 0x09f7, 0x09f8, 0x09f9, 0x0a66, 0x0a67, 0x0a68, 0x0a69, 0x0a6a, 0x0a6b, 0x0a6c, 0x0a6d,
- 0x0a6e, 0x0a6f, 0x0ae6, 0x0ae7, 0x0ae8, 0x0ae9, 0x0aea, 0x0aeb, 0x0aec, 0x0aed, 0x0aee, 0x0aef, 0x0b66, 0x0b67, 0x0b68, 0x0b69,
- 0x0b6a, 0x0b6b, 0x0b6c, 0x0b6d, 0x0b6e, 0x0b6f, 0x0b72, 0x0b73, 0x0b74, 0x0b75, 0x0b76, 0x0b77, 0x0be6, 0x0be7, 0x0be8, 0x0be9,
- 0x0bea, 0x0beb, 0x0bec, 0x0bed, 0x0bee, 0x0bef, 0x0bf0, 0x0bf1, 0x0bf2, 0x0c66, 0x0c67, 0x0c68, 0x0c69, 0x0c6a, 0x0c6b, 0x0c6c,
- 0x0c6d, 0x0c6e, 0x0c6f, 0x0c78, 0x0c79, 0x0c7a, 0x0c7b, 0x0c7c, 0x0c7d, 0x0c7e, 0x0ce6, 0x0ce7, 0x0ce8, 0x0ce9, 0x0cea, 0x0ceb,
- 0x0cec, 0x0ced, 0x0cee, 0x0cef, 0x0d58, 0x0d59, 0x0d5a, 0x0d5b, 0x0d5c, 0x0d5d, 0x0d5e, 0x0d66, 0x0d67, 0x0d68, 0x0d69, 0x0d6a,
- 0x0d6b, 0x0d6c, 0x0d6d, 0x0d6e, 0x0d6f, 0x0d70, 0x0d71, 0x0d72, 0x0d73, 0x0d74, 0x0d75, 0x0d76, 0x0d77, 0x0d78, 0x0de6, 0x0de7,
- 0x0de8, 0x0de9, 0x0dea, 0x0deb, 0x0dec, 0x0ded, 0x0dee, 0x0def, 0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57,
- 0x0e58, 0x0e59, 0x0ed0, 0x0ed1, 0x0ed2, 0x0ed3, 0x0ed4, 0x0ed5, 0x0ed6, 0x0ed7, 0x0ed8, 0x0ed9, 0x0f20, 0x0f21, 0x0f22, 0x0f23,
- 0x0f24, 0x0f25, 0x0f26, 0x0f27, 0x0f28, 0x0f29, 0x0f2a, 0x0f2b, 0x0f2c, 0x0f2d, 0x0f2e, 0x0f2f, 0x0f30, 0x0f31, 0x0f32, 0x0f33,
- 0x1040, 0x1041, 0x1042, 0x1043, 0x1044, 0x1045, 0x1046, 0x1047, 0x1048, 0x1049, 0x1090, 0x1091, 0x1092, 0x1093, 0x1094, 0x1095,
- 0x1096, 0x1097, 0x1098, 0x1099, 0x1369, 0x136a, 0x136b, 0x136c, 0x136d, 0x136e, 0x136f, 0x1370, 0x1371, 0x1372, 0x1373, 0x1374,
- 0x1375, 0x1376, 0x1377, 0x1378, 0x1379, 0x137a, 0x137b, 0x137c, 0x16ee, 0x16ef, 0x16f0, 0x17e0, 0x17e1, 0x17e2, 0x17e3, 0x17e4,
- 0x17e5, 0x17e6, 0x17e7, 0x17e8, 0x17e9, 0x17f0, 0x17f1, 0x17f2, 0x17f3, 0x17f4, 0x17f5, 0x17f6, 0x17f7, 0x17f8, 0x17f9, 0x1810,
- 0x1811, 0x1812, 0x1813, 0x1814, 0x1815, 0x1816, 0x1817, 0x1818, 0x1819, 0x1946, 0x1947, 0x1948, 0x1949, 0x194a, 0x194b, 0x194c,
- 0x194d, 0x194e, 0x194f, 0x19d0, 0x19d1, 0x19d2, 0x19d3, 0x19d4, 0x19d5, 0x19d6, 0x19d7, 0x19d8, 0x19d9, 0x19da, 0x1a80, 0x1a81,
- 0x1a82, 0x1a83, 0x1a84, 0x1a85, 0x1a86, 0x1a87, 0x1a88, 0x1a89, 0x1a90, 0x1a91, 0x1a92, 0x1a93, 0x1a94, 0x1a95, 0x1a96, 0x1a97,
- 0x1a98, 0x1a99, 0x1b50, 0x1b51, 0x1b52, 0x1b53, 0x1b54, 0x1b55, 0x1b56, 0x1b57, 0x1b58, 0x1b59, 0x1bb0, 0x1bb1, 0x1bb2, 0x1bb3,
- 0x1bb4, 0x1bb5, 0x1bb6, 0x1bb7, 0x1bb8, 0x1bb9, 0x1c40, 0x1c41, 0x1c42, 0x1c43, 0x1c44, 0x1c45, 0x1c46, 0x1c47, 0x1c48, 0x1c49,
- 0x1c50, 0x1c51, 0x1c52, 0x1c53, 0x1c54, 0x1c55, 0x1c56, 0x1c57, 0x1c58, 0x1c59, 0x2070, 0x2074, 0x2075, 0x2076, 0x2077, 0x2078,
- 0x2079, 0x2080, 0x2081, 0x2082, 0x2083, 0x2084, 0x2085, 0x2086, 0x2087, 0x2088, 0x2089, 0x2150, 0x2151, 0x2152, 0x2153, 0x2154,
- 0x2155, 0x2156, 0x2157, 0x2158, 0x2159, 0x215a, 0x215b, 0x215c, 0x215d, 0x215e, 0x215f, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164,
- 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x216a, 0x216b, 0x216c, 0x216d, 0x216e, 0x216f, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174,
- 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x217a, 0x217b, 0x217c, 0x217d, 0x217e, 0x217f, 0x2180, 0x2181, 0x2182, 0x2185, 0x2186,
- 0x2187, 0x2188, 0x2189, 0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, 0x2468, 0x2469, 0x246a, 0x246b, 0x246c,
- 0x246d, 0x246e, 0x246f, 0x2470, 0x2471, 0x2472, 0x2473, 0x2474, 0x2475, 0x2476, 0x2477, 0x2478, 0x2479, 0x247a, 0x247b, 0x247c,
- 0x247d, 0x247e, 0x247f, 0x2480, 0x2481, 0x2482, 0x2483, 0x2484, 0x2485, 0x2486, 0x2487, 0x2488, 0x2489, 0x248a, 0x248b, 0x248c,
- 0x248d, 0x248e, 0x248f, 0x2490, 0x2491, 0x2492, 0x2493, 0x2494, 0x2495, 0x2496, 0x2497, 0x2498, 0x2499, 0x249a, 0x249b, 0x24ea,
- 0x24eb, 0x24ec, 0x24ed, 0x24ee, 0x24ef, 0x24f0, 0x24f1, 0x24f2, 0x24f3, 0x24f4, 0x24f5, 0x24f6, 0x24f7, 0x24f8, 0x24f9, 0x24fa,
- 0x24fb, 0x24fc, 0x24fd, 0x24fe, 0x24ff, 0x2776, 0x2777, 0x2778, 0x2779, 0x277a, 0x277b, 0x277c, 0x277d, 0x277e, 0x277f, 0x2780,
- 0x2781, 0x2782, 0x2783, 0x2784, 0x2785, 0x2786, 0x2787, 0x2788, 0x2789, 0x278a, 0x278b, 0x278c, 0x278d, 0x278e, 0x278f, 0x2790,
- 0x2791, 0x2792, 0x2793, 0x2cfd, 0x3007, 0x3021, 0x3022, 0x3023, 0x3024, 0x3025, 0x3026, 0x3027, 0x3028, 0x3029, 0x3038, 0x3039,
- 0x303a, 0x3192, 0x3193, 0x3194, 0x3195, 0x3220, 0x3221, 0x3222, 0x3223, 0x3224, 0x3225, 0x3226, 0x3227, 0x3228, 0x3229, 0x3248,
- 0x3249, 0x324a, 0x324b, 0x324c, 0x324d, 0x324e, 0x324f, 0x3251, 0x3252, 0x3253, 0x3254, 0x3255, 0x3256, 0x3257, 0x3258, 0x3259,
- 0x325a, 0x325b, 0x325c, 0x325d, 0x325e, 0x325f, 0x3280, 0x3281, 0x3282, 0x3283, 0x3284, 0x3285, 0x3286, 0x3287, 0x3288, 0x3289,
- 0x32b1, 0x32b2, 0x32b3, 0x32b4, 0x32b5, 0x32b6, 0x32b7, 0x32b8, 0x32b9, 0x32ba, 0x32bb, 0x32bc, 0x32bd, 0x32be, 0x32bf, 0xa620,
- 0xa621, 0xa622, 0xa623, 0xa624, 0xa625, 0xa626, 0xa627, 0xa628, 0xa629, 0xa6e6, 0xa6e7, 0xa6e8, 0xa6e9, 0xa6ea, 0xa6eb, 0xa6ec,
- 0xa6ed, 0xa6ee, 0xa6ef, 0xa830, 0xa831, 0xa832, 0xa833, 0xa834, 0xa835, 0xa8d0, 0xa8d1, 0xa8d2, 0xa8d3, 0xa8d4, 0xa8d5, 0xa8d6,
- 0xa8d7, 0xa8d8, 0xa8d9, 0xa900, 0xa901, 0xa902, 0xa903, 0xa904, 0xa905, 0xa906, 0xa907, 0xa908, 0xa909, 0xa9d0, 0xa9d1, 0xa9d2,
- 0xa9d3, 0xa9d4, 0xa9d5, 0xa9d6, 0xa9d7, 0xa9d8, 0xa9d9, 0xa9f0, 0xa9f1, 0xa9f2, 0xa9f3, 0xa9f4, 0xa9f5, 0xa9f6, 0xa9f7, 0xa9f8,
- 0xa9f9, 0xaa50, 0xaa51, 0xaa52, 0xaa53, 0xaa54, 0xaa55, 0xaa56, 0xaa57, 0xaa58, 0xaa59, 0xabf0, 0xabf1, 0xabf2, 0xabf3, 0xabf4,
- 0xabf5, 0xabf6, 0xabf7, 0xabf8, 0xabf9, 0xff10, 0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, 0xff18, 0xff19, 0x10107,
- 0x10108, 0x10109, 0x1010a, 0x1010b, 0x1010c, 0x1010d, 0x1010e, 0x1010f, 0x10110, 0x10111, 0x10112, 0x10113, 0x10114, 0x10115, 0x10116, 0x10117,
- 0x10118, 0x10119, 0x1011a, 0x1011b, 0x1011c, 0x1011d, 0x1011e, 0x1011f, 0x10120, 0x10121, 0x10122, 0x10123, 0x10124, 0x10125, 0x10126, 0x10127,
- 0x10128, 0x10129, 0x1012a, 0x1012b, 0x1012c, 0x1012d, 0x1012e, 0x1012f, 0x10130, 0x10131, 0x10132, 0x10133, 0x10140, 0x10141, 0x10142, 0x10143,
- 0x10144, 0x10145, 0x10146, 0x10147, 0x10148, 0x10149, 0x1014a, 0x1014b, 0x1014c, 0x1014d, 0x1014e, 0x1014f, 0x10150, 0x10151, 0x10152, 0x10153,
- 0x10154, 0x10155, 0x10156, 0x10157, 0x10158, 0x10159, 0x1015a, 0x1015b, 0x1015c, 0x1015d, 0x1015e, 0x1015f, 0x10160, 0x10161, 0x10162, 0x10163,
- 0x10164, 0x10165, 0x10166, 0x10167, 0x10168, 0x10169, 0x1016a, 0x1016b, 0x1016c, 0x1016d, 0x1016e, 0x1016f, 0x10170, 0x10171, 0x10172, 0x10173,
- 0x10174, 0x10175, 0x10176, 0x10177, 0x10178, 0x1018a, 0x1018b, 0x102e1, 0x102e2, 0x102e3, 0x102e4, 0x102e5, 0x102e6, 0x102e7, 0x102e8, 0x102e9,
- 0x102ea, 0x102eb, 0x102ec, 0x102ed, 0x102ee, 0x102ef, 0x102f0, 0x102f1, 0x102f2, 0x102f3, 0x102f4, 0x102f5, 0x102f6, 0x102f7, 0x102f8, 0x102f9,
- 0x102fa, 0x102fb, 0x10320, 0x10321, 0x10322, 0x10323, 0x10341, 0x1034a, 0x103d1, 0x103d2, 0x103d3, 0x103d4, 0x103d5, 0x104a0, 0x104a1, 0x104a2,
- 0x104a3, 0x104a4, 0x104a5, 0x104a6, 0x104a7, 0x104a8, 0x104a9, 0x10858, 0x10859, 0x1085a, 0x1085b, 0x1085c, 0x1085d, 0x1085e, 0x1085f, 0x10879,
- 0x1087a, 0x1087b, 0x1087c, 0x1087d, 0x1087e, 0x1087f, 0x108a7, 0x108a8, 0x108a9, 0x108aa, 0x108ab, 0x108ac, 0x108ad, 0x108ae, 0x108af, 0x108fb,
- 0x108fc, 0x108fd, 0x108fe, 0x108ff, 0x10916, 0x10917, 0x10918, 0x10919, 0x1091a, 0x1091b, 0x109bc, 0x109bd, 0x109c0, 0x109c1, 0x109c2, 0x109c3,
- 0x109c4, 0x109c5, 0x109c6, 0x109c7, 0x109c8, 0x109c9, 0x109ca, 0x109cb, 0x109cc, 0x109cd, 0x109ce, 0x109cf, 0x109d2, 0x109d3, 0x109d4, 0x109d5,
- 0x109d6, 0x109d7, 0x109d8, 0x109d9, 0x109da, 0x109db, 0x109dc, 0x109dd, 0x109de, 0x109df, 0x109e0, 0x109e1, 0x109e2, 0x109e3, 0x109e4, 0x109e5,
- 0x109e6, 0x109e7, 0x109e8, 0x109e9, 0x109ea, 0x109eb, 0x109ec, 0x109ed, 0x109ee, 0x109ef, 0x109f0, 0x109f1, 0x109f2, 0x109f3, 0x109f4, 0x109f5,
- 0x109f6, 0x109f7, 0x109f8, 0x109f9, 0x109fa, 0x109fb, 0x109fc, 0x109fd, 0x109fe, 0x109ff, 0x10a40, 0x10a41, 0x10a42, 0x10a43, 0x10a44, 0x10a45,
- 0x10a46, 0x10a47, 0x10a48, 0x10a7d, 0x10a7e, 0x10a9d, 0x10a9e, 0x10a9f, 0x10aeb, 0x10aec, 0x10aed, 0x10aee, 0x10aef, 0x10b58, 0x10b59, 0x10b5a,
- 0x10b5b, 0x10b5c, 0x10b5d, 0x10b5e, 0x10b5f, 0x10b78, 0x10b79, 0x10b7a, 0x10b7b, 0x10b7c, 0x10b7d, 0x10b7e, 0x10b7f, 0x10ba9, 0x10baa, 0x10bab,
- 0x10bac, 0x10bad, 0x10bae, 0x10baf, 0x10cfa, 0x10cfb, 0x10cfc, 0x10cfd, 0x10cfe, 0x10cff, 0x10d30, 0x10d31, 0x10d32, 0x10d33, 0x10d34, 0x10d35,
- 0x10d36, 0x10d37, 0x10d38, 0x10d39, 0x10e60, 0x10e61, 0x10e62, 0x10e63, 0x10e64, 0x10e65, 0x10e66, 0x10e67, 0x10e68, 0x10e69, 0x10e6a, 0x10e6b,
- 0x10e6c, 0x10e6d, 0x10e6e, 0x10e6f, 0x10e70, 0x10e71, 0x10e72, 0x10e73, 0x10e74, 0x10e75, 0x10e76, 0x10e77, 0x10e78, 0x10e79, 0x10e7a, 0x10e7b,
- 0x10e7c, 0x10e7d, 0x10e7e, 0x10f1d, 0x10f1e, 0x10f1f, 0x10f20, 0x10f21, 0x10f22, 0x10f23, 0x10f24, 0x10f25, 0x10f26, 0x10f51, 0x10f52, 0x10f53,
- 0x10f54, 0x10fc5, 0x10fc6, 0x10fc7, 0x10fc8, 0x10fc9, 0x10fca, 0x10fcb, 0x11052, 0x11053, 0x11054, 0x11055, 0x11056, 0x11057, 0x11058, 0x11059,
- 0x1105a, 0x1105b, 0x1105c, 0x1105d, 0x1105e, 0x1105f, 0x11060, 0x11061, 0x11062, 0x11063, 0x11064, 0x11065, 0x11066, 0x11067, 0x11068, 0x11069,
- 0x1106a, 0x1106b, 0x1106c, 0x1106d, 0x1106e, 0x1106f, 0x110f0, 0x110f1, 0x110f2, 0x110f3, 0x110f4, 0x110f5, 0x110f6, 0x110f7, 0x110f8, 0x110f9,
- 0x11136, 0x11137, 0x11138, 0x11139, 0x1113a, 0x1113b, 0x1113c, 0x1113d, 0x1113e, 0x1113f, 0x111d0, 0x111d1, 0x111d2, 0x111d3, 0x111d4, 0x111d5,
- 0x111d6, 0x111d7, 0x111d8, 0x111d9, 0x111e1, 0x111e2, 0x111e3, 0x111e4, 0x111e5, 0x111e6, 0x111e7, 0x111e8, 0x111e9, 0x111ea, 0x111eb, 0x111ec,
- 0x111ed, 0x111ee, 0x111ef, 0x111f0, 0x111f1, 0x111f2, 0x111f3, 0x111f4, 0x112f0, 0x112f1, 0x112f2, 0x112f3, 0x112f4, 0x112f5, 0x112f6, 0x112f7,
- 0x112f8, 0x112f9, 0x11450, 0x11451, 0x11452, 0x11453, 0x11454, 0x11455, 0x11456, 0x11457, 0x11458, 0x11459, 0x114d0, 0x114d1, 0x114d2, 0x114d3,
- 0x114d4, 0x114d5, 0x114d6, 0x114d7, 0x114d8, 0x114d9, 0x11650, 0x11651, 0x11652, 0x11653, 0x11654, 0x11655, 0x11656, 0x11657, 0x11658, 0x11659,
- 0x116c0, 0x116c1, 0x116c2, 0x116c3, 0x116c4, 0x116c5, 0x116c6, 0x116c7, 0x116c8, 0x116c9, 0x11730, 0x11731, 0x11732, 0x11733, 0x11734, 0x11735,
- 0x11736, 0x11737, 0x11738, 0x11739, 0x1173a, 0x1173b, 0x118e0, 0x118e1, 0x118e2, 0x118e3, 0x118e4, 0x118e5, 0x118e6, 0x118e7, 0x118e8, 0x118e9,
- 0x118ea, 0x118eb, 0x118ec, 0x118ed, 0x118ee, 0x118ef, 0x118f0, 0x118f1, 0x118f2, 0x11950, 0x11951, 0x11952, 0x11953, 0x11954, 0x11955, 0x11956,
- 0x11957, 0x11958, 0x11959, 0x11c50, 0x11c51, 0x11c52, 0x11c53, 0x11c54, 0x11c55, 0x11c56, 0x11c57, 0x11c58, 0x11c59, 0x11c5a, 0x11c5b, 0x11c5c,
- 0x11c5d, 0x11c5e, 0x11c5f, 0x11c60, 0x11c61, 0x11c62, 0x11c63, 0x11c64, 0x11c65, 0x11c66, 0x11c67, 0x11c68, 0x11c69, 0x11c6a, 0x11c6b, 0x11c6c,
- 0x11d50, 0x11d51, 0x11d52, 0x11d53, 0x11d54, 0x11d55, 0x11d56, 0x11d57, 0x11d58, 0x11d59, 0x11da0, 0x11da1, 0x11da2, 0x11da3, 0x11da4, 0x11da5,
- 0x11da6, 0x11da7, 0x11da8, 0x11da9, 0x11f50, 0x11f51, 0x11f52, 0x11f53, 0x11f54, 0x11f55, 0x11f56, 0x11f57, 0x11f58, 0x11f59, 0x11fc0, 0x11fc1,
- 0x11fc2, 0x11fc3, 0x11fc4, 0x11fc5, 0x11fc6, 0x11fc7, 0x11fc8, 0x11fc9, 0x11fca, 0x11fcb, 0x11fcc, 0x11fcd, 0x11fce, 0x11fcf, 0x11fd0, 0x11fd1,
- 0x11fd2, 0x11fd3, 0x11fd4, 0x12400, 0x12401, 0x12402, 0x12403, 0x12404, 0x12405, 0x12406, 0x12407, 0x12408, 0x12409, 0x1240a, 0x1240b, 0x1240c,
- 0x1240d, 0x1240e, 0x1240f, 0x12410, 0x12411, 0x12412, 0x12413, 0x12414, 0x12415, 0x12416, 0x12417, 0x12418, 0x12419, 0x1241a, 0x1241b, 0x1241c,
- 0x1241d, 0x1241e, 0x1241f, 0x12420, 0x12421, 0x12422, 0x12423, 0x12424, 0x12425, 0x12426, 0x12427, 0x12428, 0x12429, 0x1242a, 0x1242b, 0x1242c,
- 0x1242d, 0x1242e, 0x1242f, 0x12430, 0x12431, 0x12432, 0x12433, 0x12434, 0x12435, 0x12436, 0x12437, 0x12438, 0x12439, 0x1243a, 0x1243b, 0x1243c,
- 0x1243d, 0x1243e, 0x1243f, 0x12440, 0x12441, 0x12442, 0x12443, 0x12444, 0x12445, 0x12446, 0x12447, 0x12448, 0x12449, 0x1244a, 0x1244b, 0x1244c,
- 0x1244d, 0x1244e, 0x1244f, 0x12450, 0x12451, 0x12452, 0x12453, 0x12454, 0x12455, 0x12456, 0x12457, 0x12458, 0x12459, 0x1245a, 0x1245b, 0x1245c,
- 0x1245d, 0x1245e, 0x1245f, 0x12460, 0x12461, 0x12462, 0x12463, 0x12464, 0x12465, 0x12466, 0x12467, 0x12468, 0x12469, 0x1246a, 0x1246b, 0x1246c,
- 0x1246d, 0x1246e, 0x16a60, 0x16a61, 0x16a62, 0x16a63, 0x16a64, 0x16a65, 0x16a66, 0x16a67, 0x16a68, 0x16a69, 0x16ac0, 0x16ac1, 0x16ac2, 0x16ac3,
- 0x16ac4, 0x16ac5, 0x16ac6, 0x16ac7, 0x16ac8, 0x16ac9, 0x16b50, 0x16b51, 0x16b52, 0x16b53, 0x16b54, 0x16b55, 0x16b56, 0x16b57, 0x16b58, 0x16b59,
- 0x16b5b, 0x16b5c, 0x16b5d, 0x16b5e, 0x16b5f, 0x16b60, 0x16b61, 0x16e80, 0x16e81, 0x16e82, 0x16e83, 0x16e84, 0x16e85, 0x16e86, 0x16e87, 0x16e88,
- 0x16e89, 0x16e8a, 0x16e8b, 0x16e8c, 0x16e8d, 0x16e8e, 0x16e8f, 0x16e90, 0x16e91, 0x16e92, 0x16e93, 0x16e94, 0x16e95, 0x16e96, 0x1d2c0, 0x1d2c1,
- 0x1d2c2, 0x1d2c3, 0x1d2c4, 0x1d2c5, 0x1d2c6, 0x1d2c7, 0x1d2c8, 0x1d2c9, 0x1d2ca, 0x1d2cb, 0x1d2cc, 0x1d2cd, 0x1d2ce, 0x1d2cf, 0x1d2d0, 0x1d2d1,
- 0x1d2d2, 0x1d2d3, 0x1d2e0, 0x1d2e1, 0x1d2e2, 0x1d2e3, 0x1d2e4, 0x1d2e5, 0x1d2e6, 0x1d2e7, 0x1d2e8, 0x1d2e9, 0x1d2ea, 0x1d2eb, 0x1d2ec, 0x1d2ed,
- 0x1d2ee, 0x1d2ef, 0x1d2f0, 0x1d2f1, 0x1d2f2, 0x1d2f3, 0x1d360, 0x1d361, 0x1d362, 0x1d363, 0x1d364, 0x1d365, 0x1d366, 0x1d367, 0x1d368, 0x1d369,
- 0x1d36a, 0x1d36b, 0x1d36c, 0x1d36d, 0x1d36e, 0x1d36f, 0x1d370, 0x1d371, 0x1d372, 0x1d373, 0x1d374, 0x1d375, 0x1d376, 0x1d377, 0x1d378, 0x1d7ce,
- 0x1d7cf, 0x1d7d0, 0x1d7d1, 0x1d7d2, 0x1d7d3, 0x1d7d4, 0x1d7d5, 0x1d7d6, 0x1d7d7, 0x1d7d8, 0x1d7d9, 0x1d7da, 0x1d7db, 0x1d7dc, 0x1d7dd, 0x1d7de,
- 0x1d7df, 0x1d7e0, 0x1d7e1, 0x1d7e2, 0x1d7e3, 0x1d7e4, 0x1d7e5, 0x1d7e6, 0x1d7e7, 0x1d7e8, 0x1d7e9, 0x1d7ea, 0x1d7eb, 0x1d7ec, 0x1d7ed, 0x1d7ee,
- 0x1d7ef, 0x1d7f0, 0x1d7f1, 0x1d7f2, 0x1d7f3, 0x1d7f4, 0x1d7f5, 0x1d7f6, 0x1d7f7, 0x1d7f8, 0x1d7f9, 0x1d7fa, 0x1d7fb, 0x1d7fc, 0x1d7fd, 0x1d7fe,
- 0x1d7ff, 0x1e140, 0x1e141, 0x1e142, 0x1e143, 0x1e144, 0x1e145, 0x1e146, 0x1e147, 0x1e148, 0x1e149, 0x1e2f0, 0x1e2f1, 0x1e2f2, 0x1e2f3, 0x1e2f4,
- 0x1e2f5, 0x1e2f6, 0x1e2f7, 0x1e2f8, 0x1e2f9, 0x1e4f0, 0x1e4f1, 0x1e4f2, 0x1e4f3, 0x1e4f4, 0x1e4f5, 0x1e4f6, 0x1e4f7, 0x1e4f8, 0x1e4f9, 0x1e8c7,
- 0x1e8c8, 0x1e8c9, 0x1e8ca, 0x1e8cb, 0x1e8cc, 0x1e8cd, 0x1e8ce, 0x1e8cf, 0x1e950, 0x1e951, 0x1e952, 0x1e953, 0x1e954, 0x1e955, 0x1e956, 0x1e957,
- 0x1e958, 0x1e959, 0x1ec71, 0x1ec72, 0x1ec73, 0x1ec74, 0x1ec75, 0x1ec76, 0x1ec77, 0x1ec78, 0x1ec79, 0x1ec7a, 0x1ec7b, 0x1ec7c, 0x1ec7d, 0x1ec7e,
- 0x1ec7f, 0x1ec80, 0x1ec81, 0x1ec82, 0x1ec83, 0x1ec84, 0x1ec85, 0x1ec86, 0x1ec87, 0x1ec88, 0x1ec89, 0x1ec8a, 0x1ec8b, 0x1ec8c, 0x1ec8d, 0x1ec8e,
- 0x1ec8f, 0x1ec90, 0x1ec91, 0x1ec92, 0x1ec93, 0x1ec94, 0x1ec95, 0x1ec96, 0x1ec97, 0x1ec98, 0x1ec99, 0x1ec9a, 0x1ec9b, 0x1ec9c, 0x1ec9d, 0x1ec9e,
- 0x1ec9f, 0x1eca0, 0x1eca1, 0x1eca2, 0x1eca3, 0x1eca4, 0x1eca5, 0x1eca6, 0x1eca7, 0x1eca8, 0x1eca9, 0x1ecaa, 0x1ecab, 0x1ecad, 0x1ecae, 0x1ecaf,
- 0x1ecb1, 0x1ecb2, 0x1ecb3, 0x1ecb4, 0x1ed01, 0x1ed02, 0x1ed03, 0x1ed04, 0x1ed05, 0x1ed06, 0x1ed07, 0x1ed08, 0x1ed09, 0x1ed0a, 0x1ed0b, 0x1ed0c,
- 0x1ed0d, 0x1ed0e, 0x1ed0f, 0x1ed10, 0x1ed11, 0x1ed12, 0x1ed13, 0x1ed14, 0x1ed15, 0x1ed16, 0x1ed17, 0x1ed18, 0x1ed19, 0x1ed1a, 0x1ed1b, 0x1ed1c,
- 0x1ed1d, 0x1ed1e, 0x1ed1f, 0x1ed20, 0x1ed21, 0x1ed22, 0x1ed23, 0x1ed24, 0x1ed25, 0x1ed26, 0x1ed27, 0x1ed28, 0x1ed29, 0x1ed2a, 0x1ed2b, 0x1ed2c,
- 0x1ed2d, 0x1ed2f, 0x1ed30, 0x1ed31, 0x1ed32, 0x1ed33, 0x1ed34, 0x1ed35, 0x1ed36, 0x1ed37, 0x1ed38, 0x1ed39, 0x1ed3a, 0x1ed3b, 0x1ed3c, 0x1ed3d,
- 0x1f100, 0x1f101, 0x1f102, 0x1f103, 0x1f104, 0x1f105, 0x1f106, 0x1f107, 0x1f108, 0x1f109, 0x1f10a, 0x1f10b, 0x1f10c, 0x1fbf0, 0x1fbf1, 0x1fbf2,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x00b2, 0x00b3, 0x00b9, 0x00bc, 0x00bd, 0x00be,
+ 0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, 0x0668, 0x0669, 0x06f0, 0x06f1, 0x06f2, 0x06f3, 0x06f4, 0x06f5,
+ 0x06f6, 0x06f7, 0x06f8, 0x06f9, 0x07c0, 0x07c1, 0x07c2, 0x07c3, 0x07c4, 0x07c5, 0x07c6, 0x07c7, 0x07c8, 0x07c9, 0x0966, 0x0967,
+ 0x0968, 0x0969, 0x096a, 0x096b, 0x096c, 0x096d, 0x096e, 0x096f, 0x09e6, 0x09e7, 0x09e8, 0x09e9, 0x09ea, 0x09eb, 0x09ec, 0x09ed,
+ 0x09ee, 0x09ef, 0x09f4, 0x09f5, 0x09f6, 0x09f7, 0x09f8, 0x09f9, 0x0a66, 0x0a67, 0x0a68, 0x0a69, 0x0a6a, 0x0a6b, 0x0a6c, 0x0a6d,
+ 0x0a6e, 0x0a6f, 0x0ae6, 0x0ae7, 0x0ae8, 0x0ae9, 0x0aea, 0x0aeb, 0x0aec, 0x0aed, 0x0aee, 0x0aef, 0x0b66, 0x0b67, 0x0b68, 0x0b69,
+ 0x0b6a, 0x0b6b, 0x0b6c, 0x0b6d, 0x0b6e, 0x0b6f, 0x0b72, 0x0b73, 0x0b74, 0x0b75, 0x0b76, 0x0b77, 0x0be6, 0x0be7, 0x0be8, 0x0be9,
+ 0x0bea, 0x0beb, 0x0bec, 0x0bed, 0x0bee, 0x0bef, 0x0bf0, 0x0bf1, 0x0bf2, 0x0c66, 0x0c67, 0x0c68, 0x0c69, 0x0c6a, 0x0c6b, 0x0c6c,
+ 0x0c6d, 0x0c6e, 0x0c6f, 0x0c78, 0x0c79, 0x0c7a, 0x0c7b, 0x0c7c, 0x0c7d, 0x0c7e, 0x0ce6, 0x0ce7, 0x0ce8, 0x0ce9, 0x0cea, 0x0ceb,
+ 0x0cec, 0x0ced, 0x0cee, 0x0cef, 0x0d58, 0x0d59, 0x0d5a, 0x0d5b, 0x0d5c, 0x0d5d, 0x0d5e, 0x0d66, 0x0d67, 0x0d68, 0x0d69, 0x0d6a,
+ 0x0d6b, 0x0d6c, 0x0d6d, 0x0d6e, 0x0d6f, 0x0d70, 0x0d71, 0x0d72, 0x0d73, 0x0d74, 0x0d75, 0x0d76, 0x0d77, 0x0d78, 0x0de6, 0x0de7,
+ 0x0de8, 0x0de9, 0x0dea, 0x0deb, 0x0dec, 0x0ded, 0x0dee, 0x0def, 0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57,
+ 0x0e58, 0x0e59, 0x0ed0, 0x0ed1, 0x0ed2, 0x0ed3, 0x0ed4, 0x0ed5, 0x0ed6, 0x0ed7, 0x0ed8, 0x0ed9, 0x0f20, 0x0f21, 0x0f22, 0x0f23,
+ 0x0f24, 0x0f25, 0x0f26, 0x0f27, 0x0f28, 0x0f29, 0x0f2a, 0x0f2b, 0x0f2c, 0x0f2d, 0x0f2e, 0x0f2f, 0x0f30, 0x0f31, 0x0f32, 0x0f33,
+ 0x1040, 0x1041, 0x1042, 0x1043, 0x1044, 0x1045, 0x1046, 0x1047, 0x1048, 0x1049, 0x1090, 0x1091, 0x1092, 0x1093, 0x1094, 0x1095,
+ 0x1096, 0x1097, 0x1098, 0x1099, 0x1369, 0x136a, 0x136b, 0x136c, 0x136d, 0x136e, 0x136f, 0x1370, 0x1371, 0x1372, 0x1373, 0x1374,
+ 0x1375, 0x1376, 0x1377, 0x1378, 0x1379, 0x137a, 0x137b, 0x137c, 0x16ee, 0x16ef, 0x16f0, 0x17e0, 0x17e1, 0x17e2, 0x17e3, 0x17e4,
+ 0x17e5, 0x17e6, 0x17e7, 0x17e8, 0x17e9, 0x17f0, 0x17f1, 0x17f2, 0x17f3, 0x17f4, 0x17f5, 0x17f6, 0x17f7, 0x17f8, 0x17f9, 0x1810,
+ 0x1811, 0x1812, 0x1813, 0x1814, 0x1815, 0x1816, 0x1817, 0x1818, 0x1819, 0x1946, 0x1947, 0x1948, 0x1949, 0x194a, 0x194b, 0x194c,
+ 0x194d, 0x194e, 0x194f, 0x19d0, 0x19d1, 0x19d2, 0x19d3, 0x19d4, 0x19d5, 0x19d6, 0x19d7, 0x19d8, 0x19d9, 0x19da, 0x1a80, 0x1a81,
+ 0x1a82, 0x1a83, 0x1a84, 0x1a85, 0x1a86, 0x1a87, 0x1a88, 0x1a89, 0x1a90, 0x1a91, 0x1a92, 0x1a93, 0x1a94, 0x1a95, 0x1a96, 0x1a97,
+ 0x1a98, 0x1a99, 0x1b50, 0x1b51, 0x1b52, 0x1b53, 0x1b54, 0x1b55, 0x1b56, 0x1b57, 0x1b58, 0x1b59, 0x1bb0, 0x1bb1, 0x1bb2, 0x1bb3,
+ 0x1bb4, 0x1bb5, 0x1bb6, 0x1bb7, 0x1bb8, 0x1bb9, 0x1c40, 0x1c41, 0x1c42, 0x1c43, 0x1c44, 0x1c45, 0x1c46, 0x1c47, 0x1c48, 0x1c49,
+ 0x1c50, 0x1c51, 0x1c52, 0x1c53, 0x1c54, 0x1c55, 0x1c56, 0x1c57, 0x1c58, 0x1c59, 0x2070, 0x2074, 0x2075, 0x2076, 0x2077, 0x2078,
+ 0x2079, 0x2080, 0x2081, 0x2082, 0x2083, 0x2084, 0x2085, 0x2086, 0x2087, 0x2088, 0x2089, 0x2150, 0x2151, 0x2152, 0x2153, 0x2154,
+ 0x2155, 0x2156, 0x2157, 0x2158, 0x2159, 0x215a, 0x215b, 0x215c, 0x215d, 0x215e, 0x215f, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164,
+ 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x216a, 0x216b, 0x216c, 0x216d, 0x216e, 0x216f, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174,
+ 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x217a, 0x217b, 0x217c, 0x217d, 0x217e, 0x217f, 0x2180, 0x2181, 0x2182, 0x2185, 0x2186,
+ 0x2187, 0x2188, 0x2189, 0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, 0x2468, 0x2469, 0x246a, 0x246b, 0x246c,
+ 0x246d, 0x246e, 0x246f, 0x2470, 0x2471, 0x2472, 0x2473, 0x2474, 0x2475, 0x2476, 0x2477, 0x2478, 0x2479, 0x247a, 0x247b, 0x247c,
+ 0x247d, 0x247e, 0x247f, 0x2480, 0x2481, 0x2482, 0x2483, 0x2484, 0x2485, 0x2486, 0x2487, 0x2488, 0x2489, 0x248a, 0x248b, 0x248c,
+ 0x248d, 0x248e, 0x248f, 0x2490, 0x2491, 0x2492, 0x2493, 0x2494, 0x2495, 0x2496, 0x2497, 0x2498, 0x2499, 0x249a, 0x249b, 0x24ea,
+ 0x24eb, 0x24ec, 0x24ed, 0x24ee, 0x24ef, 0x24f0, 0x24f1, 0x24f2, 0x24f3, 0x24f4, 0x24f5, 0x24f6, 0x24f7, 0x24f8, 0x24f9, 0x24fa,
+ 0x24fb, 0x24fc, 0x24fd, 0x24fe, 0x24ff, 0x2776, 0x2777, 0x2778, 0x2779, 0x277a, 0x277b, 0x277c, 0x277d, 0x277e, 0x277f, 0x2780,
+ 0x2781, 0x2782, 0x2783, 0x2784, 0x2785, 0x2786, 0x2787, 0x2788, 0x2789, 0x278a, 0x278b, 0x278c, 0x278d, 0x278e, 0x278f, 0x2790,
+ 0x2791, 0x2792, 0x2793, 0x2cfd, 0x3007, 0x3021, 0x3022, 0x3023, 0x3024, 0x3025, 0x3026, 0x3027, 0x3028, 0x3029, 0x3038, 0x3039,
+ 0x303a, 0x3192, 0x3193, 0x3194, 0x3195, 0x3220, 0x3221, 0x3222, 0x3223, 0x3224, 0x3225, 0x3226, 0x3227, 0x3228, 0x3229, 0x3248,
+ 0x3249, 0x324a, 0x324b, 0x324c, 0x324d, 0x324e, 0x324f, 0x3251, 0x3252, 0x3253, 0x3254, 0x3255, 0x3256, 0x3257, 0x3258, 0x3259,
+ 0x325a, 0x325b, 0x325c, 0x325d, 0x325e, 0x325f, 0x3280, 0x3281, 0x3282, 0x3283, 0x3284, 0x3285, 0x3286, 0x3287, 0x3288, 0x3289,
+ 0x32b1, 0x32b2, 0x32b3, 0x32b4, 0x32b5, 0x32b6, 0x32b7, 0x32b8, 0x32b9, 0x32ba, 0x32bb, 0x32bc, 0x32bd, 0x32be, 0x32bf, 0xa620,
+ 0xa621, 0xa622, 0xa623, 0xa624, 0xa625, 0xa626, 0xa627, 0xa628, 0xa629, 0xa6e6, 0xa6e7, 0xa6e8, 0xa6e9, 0xa6ea, 0xa6eb, 0xa6ec,
+ 0xa6ed, 0xa6ee, 0xa6ef, 0xa830, 0xa831, 0xa832, 0xa833, 0xa834, 0xa835, 0xa8d0, 0xa8d1, 0xa8d2, 0xa8d3, 0xa8d4, 0xa8d5, 0xa8d6,
+ 0xa8d7, 0xa8d8, 0xa8d9, 0xa900, 0xa901, 0xa902, 0xa903, 0xa904, 0xa905, 0xa906, 0xa907, 0xa908, 0xa909, 0xa9d0, 0xa9d1, 0xa9d2,
+ 0xa9d3, 0xa9d4, 0xa9d5, 0xa9d6, 0xa9d7, 0xa9d8, 0xa9d9, 0xa9f0, 0xa9f1, 0xa9f2, 0xa9f3, 0xa9f4, 0xa9f5, 0xa9f6, 0xa9f7, 0xa9f8,
+ 0xa9f9, 0xaa50, 0xaa51, 0xaa52, 0xaa53, 0xaa54, 0xaa55, 0xaa56, 0xaa57, 0xaa58, 0xaa59, 0xabf0, 0xabf1, 0xabf2, 0xabf3, 0xabf4,
+ 0xabf5, 0xabf6, 0xabf7, 0xabf8, 0xabf9, 0xff10, 0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, 0xff18, 0xff19, 0x10107,
+ 0x10108, 0x10109, 0x1010a, 0x1010b, 0x1010c, 0x1010d, 0x1010e, 0x1010f, 0x10110, 0x10111, 0x10112, 0x10113, 0x10114, 0x10115, 0x10116, 0x10117,
+ 0x10118, 0x10119, 0x1011a, 0x1011b, 0x1011c, 0x1011d, 0x1011e, 0x1011f, 0x10120, 0x10121, 0x10122, 0x10123, 0x10124, 0x10125, 0x10126, 0x10127,
+ 0x10128, 0x10129, 0x1012a, 0x1012b, 0x1012c, 0x1012d, 0x1012e, 0x1012f, 0x10130, 0x10131, 0x10132, 0x10133, 0x10140, 0x10141, 0x10142, 0x10143,
+ 0x10144, 0x10145, 0x10146, 0x10147, 0x10148, 0x10149, 0x1014a, 0x1014b, 0x1014c, 0x1014d, 0x1014e, 0x1014f, 0x10150, 0x10151, 0x10152, 0x10153,
+ 0x10154, 0x10155, 0x10156, 0x10157, 0x10158, 0x10159, 0x1015a, 0x1015b, 0x1015c, 0x1015d, 0x1015e, 0x1015f, 0x10160, 0x10161, 0x10162, 0x10163,
+ 0x10164, 0x10165, 0x10166, 0x10167, 0x10168, 0x10169, 0x1016a, 0x1016b, 0x1016c, 0x1016d, 0x1016e, 0x1016f, 0x10170, 0x10171, 0x10172, 0x10173,
+ 0x10174, 0x10175, 0x10176, 0x10177, 0x10178, 0x1018a, 0x1018b, 0x102e1, 0x102e2, 0x102e3, 0x102e4, 0x102e5, 0x102e6, 0x102e7, 0x102e8, 0x102e9,
+ 0x102ea, 0x102eb, 0x102ec, 0x102ed, 0x102ee, 0x102ef, 0x102f0, 0x102f1, 0x102f2, 0x102f3, 0x102f4, 0x102f5, 0x102f6, 0x102f7, 0x102f8, 0x102f9,
+ 0x102fa, 0x102fb, 0x10320, 0x10321, 0x10322, 0x10323, 0x10341, 0x1034a, 0x103d1, 0x103d2, 0x103d3, 0x103d4, 0x103d5, 0x104a0, 0x104a1, 0x104a2,
+ 0x104a3, 0x104a4, 0x104a5, 0x104a6, 0x104a7, 0x104a8, 0x104a9, 0x10858, 0x10859, 0x1085a, 0x1085b, 0x1085c, 0x1085d, 0x1085e, 0x1085f, 0x10879,
+ 0x1087a, 0x1087b, 0x1087c, 0x1087d, 0x1087e, 0x1087f, 0x108a7, 0x108a8, 0x108a9, 0x108aa, 0x108ab, 0x108ac, 0x108ad, 0x108ae, 0x108af, 0x108fb,
+ 0x108fc, 0x108fd, 0x108fe, 0x108ff, 0x10916, 0x10917, 0x10918, 0x10919, 0x1091a, 0x1091b, 0x109bc, 0x109bd, 0x109c0, 0x109c1, 0x109c2, 0x109c3,
+ 0x109c4, 0x109c5, 0x109c6, 0x109c7, 0x109c8, 0x109c9, 0x109ca, 0x109cb, 0x109cc, 0x109cd, 0x109ce, 0x109cf, 0x109d2, 0x109d3, 0x109d4, 0x109d5,
+ 0x109d6, 0x109d7, 0x109d8, 0x109d9, 0x109da, 0x109db, 0x109dc, 0x109dd, 0x109de, 0x109df, 0x109e0, 0x109e1, 0x109e2, 0x109e3, 0x109e4, 0x109e5,
+ 0x109e6, 0x109e7, 0x109e8, 0x109e9, 0x109ea, 0x109eb, 0x109ec, 0x109ed, 0x109ee, 0x109ef, 0x109f0, 0x109f1, 0x109f2, 0x109f3, 0x109f4, 0x109f5,
+ 0x109f6, 0x109f7, 0x109f8, 0x109f9, 0x109fa, 0x109fb, 0x109fc, 0x109fd, 0x109fe, 0x109ff, 0x10a40, 0x10a41, 0x10a42, 0x10a43, 0x10a44, 0x10a45,
+ 0x10a46, 0x10a47, 0x10a48, 0x10a7d, 0x10a7e, 0x10a9d, 0x10a9e, 0x10a9f, 0x10aeb, 0x10aec, 0x10aed, 0x10aee, 0x10aef, 0x10b58, 0x10b59, 0x10b5a,
+ 0x10b5b, 0x10b5c, 0x10b5d, 0x10b5e, 0x10b5f, 0x10b78, 0x10b79, 0x10b7a, 0x10b7b, 0x10b7c, 0x10b7d, 0x10b7e, 0x10b7f, 0x10ba9, 0x10baa, 0x10bab,
+ 0x10bac, 0x10bad, 0x10bae, 0x10baf, 0x10cfa, 0x10cfb, 0x10cfc, 0x10cfd, 0x10cfe, 0x10cff, 0x10d30, 0x10d31, 0x10d32, 0x10d33, 0x10d34, 0x10d35,
+ 0x10d36, 0x10d37, 0x10d38, 0x10d39, 0x10e60, 0x10e61, 0x10e62, 0x10e63, 0x10e64, 0x10e65, 0x10e66, 0x10e67, 0x10e68, 0x10e69, 0x10e6a, 0x10e6b,
+ 0x10e6c, 0x10e6d, 0x10e6e, 0x10e6f, 0x10e70, 0x10e71, 0x10e72, 0x10e73, 0x10e74, 0x10e75, 0x10e76, 0x10e77, 0x10e78, 0x10e79, 0x10e7a, 0x10e7b,
+ 0x10e7c, 0x10e7d, 0x10e7e, 0x10f1d, 0x10f1e, 0x10f1f, 0x10f20, 0x10f21, 0x10f22, 0x10f23, 0x10f24, 0x10f25, 0x10f26, 0x10f51, 0x10f52, 0x10f53,
+ 0x10f54, 0x10fc5, 0x10fc6, 0x10fc7, 0x10fc8, 0x10fc9, 0x10fca, 0x10fcb, 0x11052, 0x11053, 0x11054, 0x11055, 0x11056, 0x11057, 0x11058, 0x11059,
+ 0x1105a, 0x1105b, 0x1105c, 0x1105d, 0x1105e, 0x1105f, 0x11060, 0x11061, 0x11062, 0x11063, 0x11064, 0x11065, 0x11066, 0x11067, 0x11068, 0x11069,
+ 0x1106a, 0x1106b, 0x1106c, 0x1106d, 0x1106e, 0x1106f, 0x110f0, 0x110f1, 0x110f2, 0x110f3, 0x110f4, 0x110f5, 0x110f6, 0x110f7, 0x110f8, 0x110f9,
+ 0x11136, 0x11137, 0x11138, 0x11139, 0x1113a, 0x1113b, 0x1113c, 0x1113d, 0x1113e, 0x1113f, 0x111d0, 0x111d1, 0x111d2, 0x111d3, 0x111d4, 0x111d5,
+ 0x111d6, 0x111d7, 0x111d8, 0x111d9, 0x111e1, 0x111e2, 0x111e3, 0x111e4, 0x111e5, 0x111e6, 0x111e7, 0x111e8, 0x111e9, 0x111ea, 0x111eb, 0x111ec,
+ 0x111ed, 0x111ee, 0x111ef, 0x111f0, 0x111f1, 0x111f2, 0x111f3, 0x111f4, 0x112f0, 0x112f1, 0x112f2, 0x112f3, 0x112f4, 0x112f5, 0x112f6, 0x112f7,
+ 0x112f8, 0x112f9, 0x11450, 0x11451, 0x11452, 0x11453, 0x11454, 0x11455, 0x11456, 0x11457, 0x11458, 0x11459, 0x114d0, 0x114d1, 0x114d2, 0x114d3,
+ 0x114d4, 0x114d5, 0x114d6, 0x114d7, 0x114d8, 0x114d9, 0x11650, 0x11651, 0x11652, 0x11653, 0x11654, 0x11655, 0x11656, 0x11657, 0x11658, 0x11659,
+ 0x116c0, 0x116c1, 0x116c2, 0x116c3, 0x116c4, 0x116c5, 0x116c6, 0x116c7, 0x116c8, 0x116c9, 0x11730, 0x11731, 0x11732, 0x11733, 0x11734, 0x11735,
+ 0x11736, 0x11737, 0x11738, 0x11739, 0x1173a, 0x1173b, 0x118e0, 0x118e1, 0x118e2, 0x118e3, 0x118e4, 0x118e5, 0x118e6, 0x118e7, 0x118e8, 0x118e9,
+ 0x118ea, 0x118eb, 0x118ec, 0x118ed, 0x118ee, 0x118ef, 0x118f0, 0x118f1, 0x118f2, 0x11950, 0x11951, 0x11952, 0x11953, 0x11954, 0x11955, 0x11956,
+ 0x11957, 0x11958, 0x11959, 0x11c50, 0x11c51, 0x11c52, 0x11c53, 0x11c54, 0x11c55, 0x11c56, 0x11c57, 0x11c58, 0x11c59, 0x11c5a, 0x11c5b, 0x11c5c,
+ 0x11c5d, 0x11c5e, 0x11c5f, 0x11c60, 0x11c61, 0x11c62, 0x11c63, 0x11c64, 0x11c65, 0x11c66, 0x11c67, 0x11c68, 0x11c69, 0x11c6a, 0x11c6b, 0x11c6c,
+ 0x11d50, 0x11d51, 0x11d52, 0x11d53, 0x11d54, 0x11d55, 0x11d56, 0x11d57, 0x11d58, 0x11d59, 0x11da0, 0x11da1, 0x11da2, 0x11da3, 0x11da4, 0x11da5,
+ 0x11da6, 0x11da7, 0x11da8, 0x11da9, 0x11f50, 0x11f51, 0x11f52, 0x11f53, 0x11f54, 0x11f55, 0x11f56, 0x11f57, 0x11f58, 0x11f59, 0x11fc0, 0x11fc1,
+ 0x11fc2, 0x11fc3, 0x11fc4, 0x11fc5, 0x11fc6, 0x11fc7, 0x11fc8, 0x11fc9, 0x11fca, 0x11fcb, 0x11fcc, 0x11fcd, 0x11fce, 0x11fcf, 0x11fd0, 0x11fd1,
+ 0x11fd2, 0x11fd3, 0x11fd4, 0x12400, 0x12401, 0x12402, 0x12403, 0x12404, 0x12405, 0x12406, 0x12407, 0x12408, 0x12409, 0x1240a, 0x1240b, 0x1240c,
+ 0x1240d, 0x1240e, 0x1240f, 0x12410, 0x12411, 0x12412, 0x12413, 0x12414, 0x12415, 0x12416, 0x12417, 0x12418, 0x12419, 0x1241a, 0x1241b, 0x1241c,
+ 0x1241d, 0x1241e, 0x1241f, 0x12420, 0x12421, 0x12422, 0x12423, 0x12424, 0x12425, 0x12426, 0x12427, 0x12428, 0x12429, 0x1242a, 0x1242b, 0x1242c,
+ 0x1242d, 0x1242e, 0x1242f, 0x12430, 0x12431, 0x12432, 0x12433, 0x12434, 0x12435, 0x12436, 0x12437, 0x12438, 0x12439, 0x1243a, 0x1243b, 0x1243c,
+ 0x1243d, 0x1243e, 0x1243f, 0x12440, 0x12441, 0x12442, 0x12443, 0x12444, 0x12445, 0x12446, 0x12447, 0x12448, 0x12449, 0x1244a, 0x1244b, 0x1244c,
+ 0x1244d, 0x1244e, 0x1244f, 0x12450, 0x12451, 0x12452, 0x12453, 0x12454, 0x12455, 0x12456, 0x12457, 0x12458, 0x12459, 0x1245a, 0x1245b, 0x1245c,
+ 0x1245d, 0x1245e, 0x1245f, 0x12460, 0x12461, 0x12462, 0x12463, 0x12464, 0x12465, 0x12466, 0x12467, 0x12468, 0x12469, 0x1246a, 0x1246b, 0x1246c,
+ 0x1246d, 0x1246e, 0x16a60, 0x16a61, 0x16a62, 0x16a63, 0x16a64, 0x16a65, 0x16a66, 0x16a67, 0x16a68, 0x16a69, 0x16ac0, 0x16ac1, 0x16ac2, 0x16ac3,
+ 0x16ac4, 0x16ac5, 0x16ac6, 0x16ac7, 0x16ac8, 0x16ac9, 0x16b50, 0x16b51, 0x16b52, 0x16b53, 0x16b54, 0x16b55, 0x16b56, 0x16b57, 0x16b58, 0x16b59,
+ 0x16b5b, 0x16b5c, 0x16b5d, 0x16b5e, 0x16b5f, 0x16b60, 0x16b61, 0x16e80, 0x16e81, 0x16e82, 0x16e83, 0x16e84, 0x16e85, 0x16e86, 0x16e87, 0x16e88,
+ 0x16e89, 0x16e8a, 0x16e8b, 0x16e8c, 0x16e8d, 0x16e8e, 0x16e8f, 0x16e90, 0x16e91, 0x16e92, 0x16e93, 0x16e94, 0x16e95, 0x16e96, 0x1d2c0, 0x1d2c1,
+ 0x1d2c2, 0x1d2c3, 0x1d2c4, 0x1d2c5, 0x1d2c6, 0x1d2c7, 0x1d2c8, 0x1d2c9, 0x1d2ca, 0x1d2cb, 0x1d2cc, 0x1d2cd, 0x1d2ce, 0x1d2cf, 0x1d2d0, 0x1d2d1,
+ 0x1d2d2, 0x1d2d3, 0x1d2e0, 0x1d2e1, 0x1d2e2, 0x1d2e3, 0x1d2e4, 0x1d2e5, 0x1d2e6, 0x1d2e7, 0x1d2e8, 0x1d2e9, 0x1d2ea, 0x1d2eb, 0x1d2ec, 0x1d2ed,
+ 0x1d2ee, 0x1d2ef, 0x1d2f0, 0x1d2f1, 0x1d2f2, 0x1d2f3, 0x1d360, 0x1d361, 0x1d362, 0x1d363, 0x1d364, 0x1d365, 0x1d366, 0x1d367, 0x1d368, 0x1d369,
+ 0x1d36a, 0x1d36b, 0x1d36c, 0x1d36d, 0x1d36e, 0x1d36f, 0x1d370, 0x1d371, 0x1d372, 0x1d373, 0x1d374, 0x1d375, 0x1d376, 0x1d377, 0x1d378, 0x1d7ce,
+ 0x1d7cf, 0x1d7d0, 0x1d7d1, 0x1d7d2, 0x1d7d3, 0x1d7d4, 0x1d7d5, 0x1d7d6, 0x1d7d7, 0x1d7d8, 0x1d7d9, 0x1d7da, 0x1d7db, 0x1d7dc, 0x1d7dd, 0x1d7de,
+ 0x1d7df, 0x1d7e0, 0x1d7e1, 0x1d7e2, 0x1d7e3, 0x1d7e4, 0x1d7e5, 0x1d7e6, 0x1d7e7, 0x1d7e8, 0x1d7e9, 0x1d7ea, 0x1d7eb, 0x1d7ec, 0x1d7ed, 0x1d7ee,
+ 0x1d7ef, 0x1d7f0, 0x1d7f1, 0x1d7f2, 0x1d7f3, 0x1d7f4, 0x1d7f5, 0x1d7f6, 0x1d7f7, 0x1d7f8, 0x1d7f9, 0x1d7fa, 0x1d7fb, 0x1d7fc, 0x1d7fd, 0x1d7fe,
+ 0x1d7ff, 0x1e140, 0x1e141, 0x1e142, 0x1e143, 0x1e144, 0x1e145, 0x1e146, 0x1e147, 0x1e148, 0x1e149, 0x1e2f0, 0x1e2f1, 0x1e2f2, 0x1e2f3, 0x1e2f4,
+ 0x1e2f5, 0x1e2f6, 0x1e2f7, 0x1e2f8, 0x1e2f9, 0x1e4f0, 0x1e4f1, 0x1e4f2, 0x1e4f3, 0x1e4f4, 0x1e4f5, 0x1e4f6, 0x1e4f7, 0x1e4f8, 0x1e4f9, 0x1e8c7,
+ 0x1e8c8, 0x1e8c9, 0x1e8ca, 0x1e8cb, 0x1e8cc, 0x1e8cd, 0x1e8ce, 0x1e8cf, 0x1e950, 0x1e951, 0x1e952, 0x1e953, 0x1e954, 0x1e955, 0x1e956, 0x1e957,
+ 0x1e958, 0x1e959, 0x1ec71, 0x1ec72, 0x1ec73, 0x1ec74, 0x1ec75, 0x1ec76, 0x1ec77, 0x1ec78, 0x1ec79, 0x1ec7a, 0x1ec7b, 0x1ec7c, 0x1ec7d, 0x1ec7e,
+ 0x1ec7f, 0x1ec80, 0x1ec81, 0x1ec82, 0x1ec83, 0x1ec84, 0x1ec85, 0x1ec86, 0x1ec87, 0x1ec88, 0x1ec89, 0x1ec8a, 0x1ec8b, 0x1ec8c, 0x1ec8d, 0x1ec8e,
+ 0x1ec8f, 0x1ec90, 0x1ec91, 0x1ec92, 0x1ec93, 0x1ec94, 0x1ec95, 0x1ec96, 0x1ec97, 0x1ec98, 0x1ec99, 0x1ec9a, 0x1ec9b, 0x1ec9c, 0x1ec9d, 0x1ec9e,
+ 0x1ec9f, 0x1eca0, 0x1eca1, 0x1eca2, 0x1eca3, 0x1eca4, 0x1eca5, 0x1eca6, 0x1eca7, 0x1eca8, 0x1eca9, 0x1ecaa, 0x1ecab, 0x1ecad, 0x1ecae, 0x1ecaf,
+ 0x1ecb1, 0x1ecb2, 0x1ecb3, 0x1ecb4, 0x1ed01, 0x1ed02, 0x1ed03, 0x1ed04, 0x1ed05, 0x1ed06, 0x1ed07, 0x1ed08, 0x1ed09, 0x1ed0a, 0x1ed0b, 0x1ed0c,
+ 0x1ed0d, 0x1ed0e, 0x1ed0f, 0x1ed10, 0x1ed11, 0x1ed12, 0x1ed13, 0x1ed14, 0x1ed15, 0x1ed16, 0x1ed17, 0x1ed18, 0x1ed19, 0x1ed1a, 0x1ed1b, 0x1ed1c,
+ 0x1ed1d, 0x1ed1e, 0x1ed1f, 0x1ed20, 0x1ed21, 0x1ed22, 0x1ed23, 0x1ed24, 0x1ed25, 0x1ed26, 0x1ed27, 0x1ed28, 0x1ed29, 0x1ed2a, 0x1ed2b, 0x1ed2c,
+ 0x1ed2d, 0x1ed2f, 0x1ed30, 0x1ed31, 0x1ed32, 0x1ed33, 0x1ed34, 0x1ed35, 0x1ed36, 0x1ed37, 0x1ed38, 0x1ed39, 0x1ed3a, 0x1ed3b, 0x1ed3c, 0x1ed3d,
+ 0x1f100, 0x1f101, 0x1f102, 0x1f103, 0x1f104, 0x1f105, 0x1f106, 0x1f107, 0x1f108, 0x1f109, 0x1f10a, 0x1f10b, 0x1f10c, 0x1fbf0, 0x1fbf1, 0x1fbf2,
0x1fbf3, 0x1fbf4, 0x1fbf5, 0x1fbf6, 0x1fbf7, 0x1fbf8, 0x1fbf9,
// clang-format on
}};
BT_FN_VOID_PTR_UINT8_PTRMODE, ATTR_NOTHROW_LIST)
/* Thread Sanitizer */
-DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_INIT, "__tsan_init",
+DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_INIT, "__tsan_init",
BT_FN_VOID, ATTR_NOTHROW_LEAF_LIST)
DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_FUNC_ENTRY, "__tsan_func_entry",
BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
/* Return the number of bits in BITMAP. */
#define SBITMAP_SIZE(BITMAP) ((BITMAP)->n_bits)
-/* Verify that access at INDEX in bitmap MAP is valid. */
+/* Verify that access at INDEX in bitmap MAP is valid. */
inline void
bitmap_check_index (const_sbitmap map, int index)
gcc_checking_assert ((unsigned int)index < map->n_bits);
}
-/* Verify that bitmaps A and B have same size. */
+/* Verify that bitmaps A and B have same size. */
inline void
bitmap_check_sizes (const_sbitmap a, const_sbitmap b)
case DEP_PRESENT:
dep_t present_dep;
sd_iterator_def sd_it;
-
+
present_dep = sd_find_dep_between_no_cache (DEP_PRO (new_dep),
DEP_CON (new_dep),
resolved_p, &sd_it);
REG_DEP_TRUE, false);
}
}
-
+
add_dependence_1 (con, pro, dep_type);
}
{
ds_t ds = set_dep_weak (DEP_ANTI, BEGIN_CONTROL,
MAX_DEP_WEAK);
-
+
note_dep (u->insn (), ds);
}
else
if (e)
{
gcc_assert (e->dest == next_bb);
-
+
return false;
}
}
/* Return exit edges of LOOP, filtering out edges with the same dest bb. */
-inline vec<edge>
+inline vec<edge>
get_loop_exit_edges_unique_dests (const class loop *loop)
{
vec<edge> edges = vNULL;
traverse all of them and if any of them turns out to be another loop header
(after skipping empty BBs), add its loop exits to the resulting vector
as well. */
-inline vec<edge>
+inline vec<edge>
get_all_loop_exits (basic_block bb)
{
vec<edge> exits = vNULL;
Pmode, FRAME_POINTER_REGNUM);
if (!HARD_FRAME_POINTER_IS_FRAME_POINTER)
- add_to_hard_reg_set (®_rename_p->unavailable_hard_regs,
+ add_to_hard_reg_set (®_rename_p->unavailable_hard_regs,
Pmode, HARD_FRAME_POINTER_REGNUM);
}
bool
sese_trivially_empty_bb_p (basic_block bb)
-{
+{
gimple_stmt_iterator gsi;
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
if (frame_pointer_needed)
add_to_hard_reg_set (&set_up_by_prologue.set, Pmode,
HARD_FRAME_POINTER_REGNUM);
- if (pic_offset_table_rtx
+ if (pic_offset_table_rtx
&& (unsigned) PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM)
add_to_hard_reg_set (&set_up_by_prologue.set, Pmode,
PIC_OFFSET_TABLE_REGNUM);
if (dump_file)
fprintf (dump_file, "Duplicated %d to %d\n", bb->index, dup->index);
-
+
if (num == profile_count::zero () || den.nonzero_p ())
bb->count = bb->count.apply_scale (num, den);
dup->count -= bb->count;
return immed_wide_int_const (result, result_mode);
}
- else if (CONST_DOUBLE_AS_FLOAT_P (op)
+ else if (CONST_DOUBLE_AS_FLOAT_P (op)
&& SCALAR_FLOAT_MODE_P (mode)
&& SCALAR_FLOAT_MODE_P (GET_MODE (op)))
{
return res;
}
-
+
/* Simplify a logical operation CODE with result mode MODE, operating on OP0
and OP1, which should be both relational operations. Return 0 if no such
simplification is possible. */
unsigned int n_elts, in_n_elts;
if ((GET_CODE (trueop0) == CONST_VECTOR
- || CONST_SCALAR_INT_P (trueop0)
+ || CONST_SCALAR_INT_P (trueop0)
|| CONST_DOUBLE_AS_FLOAT_P (trueop0))
&& (GET_CODE (trueop1) == CONST_VECTOR
- || CONST_SCALAR_INT_P (trueop1)
+ || CONST_SCALAR_INT_P (trueop1)
|| CONST_DOUBLE_AS_FLOAT_P (trueop1))
&& GET_MODE_NUNITS (mode).is_constant (&n_elts)
&& GET_MODE_NUNITS (op0_mode).is_constant (&in_n_elts))
}
if (SCALAR_FLOAT_MODE_P (mode)
- && CONST_DOUBLE_AS_FLOAT_P (op0)
+ && CONST_DOUBLE_AS_FLOAT_P (op0)
&& CONST_DOUBLE_AS_FLOAT_P (op1)
&& mode == GET_MODE (op0) && mode == GET_MODE (op1))
{
case US_PLUS:
result = wi::add (pop0, pop1, UNSIGNED, &overflow);
- clamp_unsigned_saturation:
+ clamp_unsigned_saturation:
if (overflow != wi::OVF_NONE)
result = wi::max_value (GET_MODE_PRECISION (int_mode), UNSIGNED);
break;
lowpart_subreg (bmode, mreg, mmode),
bmode),
simplify_gen_unary (TRUNCATE, smode, mreg, mmode));
-}
+}
/* Verify some simplifications involving scalar expressions. */
/* Intermediate binary op. */
rtx binop = gen_rtx_PLUS (mode, vm1, vm2);
- ASSERT_RTX_EQ (gen_rtx_PLUS (mode, op0, op2),
+ ASSERT_RTX_EQ (gen_rtx_PLUS (mode, op0, op2),
simplify_merge_mask (binop, mask1, 0));
ASSERT_RTX_EQ (gen_rtx_PLUS (mode, op1, op3),
simplify_merge_mask (binop, mask1, 1));
const ssa_use_operand_t *const head = &(SSA_NAME_IMM_USE_NODE (var));
const ssa_use_operand_t *ptr;
bool single = false;
-
+
for (ptr = head->next; ptr != head; ptr = ptr->next)
if (USE_STMT(ptr) && !is_gimple_debug (USE_STMT (ptr)))
{
if (single)
return false;
- else
+ else
single = true;
}
return single;
}
-
+
/* If VAR has only a single immediate nondebug use, return true, and
set USE_P and STMT to the use pointer and stmt of occurrence. */
inline bool
#include "range.h"
#include "tree-ssanames.h"
#include "tree-phinodes.h"
-#include "ssa-iterators.h"
+#include "ssa-iterators.h"
#endif /* GCC_SSA_H */
Then, a table with the target labels is emitted.
The process is unaware of the CFG. The caller has to fix up
- the CFG itself. This is done in cfgexpand.cc. */
+ the CFG itself. This is done in cfgexpand.cc. */
static void
emit_case_dispatch_table (tree index_expr, tree index_type,
DISPATCH_INDEX is the index expression to switch on. It should be a
memory or register operand.
-
+
DISPATCH_TABLE is a set of case labels. The set should be sorted in
ascending order, be contiguous, starting with value 0, and contain only
single-valued case labels. */
&& IDENTIFIER_TRANSPARENT_ALIAS
(DECL_ASSEMBLER_NAME (alias->decl)));
- TREE_CHAIN (DECL_ASSEMBLER_NAME (alias->decl)) =
+ TREE_CHAIN (DECL_ASSEMBLER_NAME (alias->decl)) =
ultimate_transparent_alias_target
(DECL_ASSEMBLER_NAME (node->decl));
}
error ("node has invalid order %i", order);
error_found = true;
}
-
+
if (symtab->state != LTO_STREAMING)
{
hashed_node = symtab_node::get (decl);
target is used only via the alias.
We may walk references and look for strong use, but we do not know
if this strong use will survive to final binary, so be
- conservative here.
+ conservative here.
??? Maybe we could do the lookup during late optimization that
could be useful to eliminate the NULL pointer checks in LTO
programs. */
/* Return 0 if symbol is known to have different address than S2,
Return 1 if symbol is known to have same address as S2,
- return -1 otherwise.
+ return -1 otherwise.
If MEMORY_ACCESSED is true, assume that both memory pointer to THIS
and S2 is going to be accessed. This eliminates the situations when
/* If we have a non-interposable definition of at least one of the symbols
and the other symbol is different, we know other unit cannot interpose
- it to the first symbol; all aliases of the definition needs to be
+ it to the first symbol; all aliases of the definition needs to be
present in the current unit. */
if (((really_binds_local1 || really_binds_local2)
/* If we have both definitions and they are different, we know they
/* Return symbol used to separate symbol name from suffix. */
-char
+char
symbol_table::symbol_suffix_separator ()
{
#ifndef NO_DOT_IN_LABEL
the names to 64bit capable functions for LARGE_FILES support. These
redefs are pointless here so we can override them. */
-#undef fopen
-#undef freopen
+#undef fopen
+#undef freopen
#define fopen(PATH, MODE) fopen_unlocked (PATH, MODE)
#define fdopen(FILDES, MODE) fdopen_unlocked (FILDES, MODE)
/* This macro rounds x down to the y boundary. */
#define ROUND_DOWN(x,y) ((x) & ~((y) - 1))
-
+
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#ifndef DEFHOOKPODX
#define DEFHOOKPODX(NAME, TYPE, INIT) DEFHOOKPOD (NAME, 0, TYPE, INIT)
#endif
-
+
/* HOOKSTRUCT(FRAGMENT): Declarator fragments to encapsulate all the
members into a struct gcc_target, which in turn contains several
sub-structs. */
the paragraph with @end deftypefn / deftypevr as appropriate, and marking
the next autogenerated hook with @hook <hookname>.
In both these cases, leave the DOC string empty, i.e. "".
- Sometimes, for some historic reason the function declaration
+ Sometimes, for some historic reason the function declaration
has to be documented differently
than what it is. In that case, use DEFHOOK_UNDOC to suppress auto-generation
of documentation. DEFHOOK_UNDOC takes a DOC string which it ignores, so
/* Return preferred text (sub)section for function DECL.
Main purpose of this function is to separate cold, normal and hot
- functions. STARTUP is true when function is known to be used only
+ functions. STARTUP is true when function is known to be used only
at startup (from static constructors or it is main()).
EXIT is true when function is known to be used only at exit
(from static destructors).
function version at run-time for a given set of function versions.\n\
@var{arg} points to the callgraph node of the dispatcher function whose\n\
body must be generated.",
- tree, (void *arg), NULL)
+ tree, (void *arg), NULL)
/* Target hook is used to get the dispatcher function for a set of function
versions. The dispatcher function is called to invoke the right function
HOST_WIDE_INT, (poly_int64 val, poly_value_estimate_kind kind),
default_estimated_poly_value)
-/* Permit speculative instructions in delay slots during delayed-branch
+/* Permit speculative instructions in delay slots during delayed-branch
scheduling. */
DEFHOOK
(no_speculation_in_delay_slots_p,
emits a @code{speculation_barrier} instruction if that is defined.",
rtx, (machine_mode mode, rtx result, rtx val, rtx failval),
default_speculation_safe_value)
-
+
DEFHOOK
(predict_doloop_p,
"Return true if we can predict it is possible to use a low-overhead loop\n\
in the call pattern, or included as clobbers in CALL_INSN_FUNCTION_USAGE.\n\
The default version of this hook is set to false. The purpose of this hook\n\
is to enable the fipa-ra optimization.",
- bool,
+ bool,
false)
/* Fill in additional registers set up by prologue into a regset. */
default_addr_space_diagnose_usage (addr_space_t, location_t)
{
}
-
+
/* The default hook for TARGET_ADDR_SPACE_CONVERT. This hook should never be
called for targets with only a generic address space. */
default_preferred_reload_class (rtx x ATTRIBUTE_UNUSED,
reg_class_t rclass)
{
-#ifdef PREFERRED_RELOAD_CLASS
+#ifdef PREFERRED_RELOAD_CLASS
return (reg_class_t) PREFERRED_RELOAD_CLASS (x, (enum reg_class) rclass);
#else
return rclass;
if (flag_syntax_only || flag_wpa)
return;
-
+
/* Reset maximum_field_alignment, it can be adjusted by #pragma pack
and this shouldn't influence any types built by the middle-end
from now on (like gcov_info_type). */
global_dc->create_edit_context ();
/* Avoid any informative notes in the second run of -fcompare-debug. */
- if (flag_compare_debug)
+ if (flag_compare_debug)
diagnostic_inhibit_notes (global_dc);
if (flag_section_anchors && !target_supports_section_anchors_p ())
to allow target_reinit being called even after prepare_function_start. */
saved_regno_reg_rtx = regno_reg_rtx;
if (saved_regno_reg_rtx)
- {
+ {
saved_x_rtl = *crtl;
memset (crtl, '\0', sizeof (*crtl));
regno_reg_rtx = NULL;
uninstrumented code path blocks in the list of basic blocks
returned, false otherwise. */
-static vec<basic_block>
+static vec<basic_block>
get_tm_region_blocks (basic_block entry_block,
bitmap exit_blocks,
bitmap irr_blocks,
/* Verify properties of the address expression T whose base should be
TREE_ADDRESSABLE if VERIFY_ADDRESSABLE is true. */
-static bool
+static bool
verify_address (tree t, bool verify_addressable)
{
bool old_constant;
gsi = gsi_for_stmt ((gimple *) stmt);
gsi_next (&gsi);
}
-
+
/* Move everything from GSI to the new basic block. */
if (gsi_end_p (gsi))
return new_bb;
&& (!VAR_P (base) || !DECL_HAS_VALUE_EXPR_P (base)))
DECL_NONSHAREABLE (base) = 1;
}
-
+
/* If requested remap dependence info of cliques brought in
via inlining. */
if (id)
}
/* Checks if BB is part of the region defined by N_REGION BBS. */
-static bool
+static bool
bb_part_of_region_p (basic_block bb, basic_block* bbs, unsigned n_region)
{
unsigned int n;
sorig->probability = exits[1]->probability;
snew = make_edge (switch_bb, nentry_bb, exits[0]->flags);
snew->probability = exits[0]->probability;
-
+
/* Register the new edge from SWITCH_BB in loop exit lists. */
rescan_loop_exit (snew, true, false);
e = redirect_edge_and_branch (exits[0], exits[1]->dest);
PENDING_STMT (e) = NULL;
- /* The latch of ORIG_LOOP was copied, and so was the backedge
+ /* The latch of ORIG_LOOP was copied, and so was the backedge
to the original header. We redirect this backedge to EXIT_BB. */
for (i = 0; i < n_region; i++)
if (get_bb_original (region_copy[i]) == orig_loop->latch)
}
e = redirect_edge_and_branch (nexits[1], nexits[0]->dest);
PENDING_STMT (e) = NULL;
-
+
/* Anything that is outside of the region, but was dominated by something
inside needs to update dominance info. */
iterate_fix_dominators (CDI_DOMINATORS, doms, false);
gimple_lv_add_condition_to_bb, /* lv_add_condition_to_bb */
gimple_lv_adjust_loop_header_phi, /* lv_adjust_loop_header_phi*/
extract_true_false_edges_from_block, /* extract_cond_bb_edges */
- flush_pending_stmts, /* flush_pending_stmts */
+ flush_pending_stmts, /* flush_pending_stmts */
gimple_empty_block_p, /* block_empty_p */
gimple_split_block_before_cond_jump, /* split_block_before_cond_jump */
gimple_account_profile_record,
bitmap dce_ssa_names)
{
/* Keep access when store has side effect, i.e. in case when source
- is volatile. */
+ is volatile. */
if (!gimple_store_p (stmt)
|| gimple_has_side_effects (stmt)
|| optimize_debug)
return todo;
}
-/* At the end of inlining, we can lower EH_DISPATCH. Return true when
+/* At the end of inlining, we can lower EH_DISPATCH. Return true when
we have found some duplicate labels and removed some edges. */
static bool
}
do
{
- /* Filter out duplicate labels that arise when this handler
- is shadowed by an earlier one. When no labels are
- attached to the handler anymore, we remove
- the corresponding edge and then we delete unreachable
+ /* Filter out duplicate labels that arise when this handler
+ is shadowed by an earlier one. When no labels are
+ attached to the handler anymore, we remove
+ the corresponding edge and then we delete unreachable
blocks at the end of this pass. */
if (! seen_values.contains (TREE_VALUE (flt_node)))
{
\f
/* Walk statements, see what regions and, optionally, landing pads
are really referenced.
-
+
Returns in R_REACHABLEP an sbitmap with bits set for reachable regions,
and in LP_REACHABLE an sbitmap with bits set for reachable landing pads.
varpool_node::get_create (to);
else if (!alias_of)
varpool_node::add (to);
- else
+ else
{
varpool_node *n;
varpool_node *t = varpool_node::get_for_asmname
This only needs to happen for TLS COMMON variables; non-COMMON
variables can be initialized statically. Insert the generated
call statement at the end of PSTMTS. */
-
+
static void
emutls_common_1 (tree tls_decl, tree control_decl, tree *pstmts)
{
{
unsigned int i, nedge;
- /* Lower each of the PHI nodes of the block, as we may have
+ /* Lower each of the PHI nodes of the block, as we may have
propagated &tlsvar into a PHI argument. These loops are
arranged so that we process each edge at once, and each
PHI argument for that edge. */
/* Add condition NC to the predicate list of basic block BB. LOOP is
the loop to be if-converted. Use predicate of cd-equivalent block
- for join bb if it exists: we call basic blocks bb1 and bb2
+ for join bb if it exists: we call basic blocks bb1 and bb2
cd-equivalent if they are executed under the same condition. */
static inline void
}
if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (gimple_phi_result (vphi)))
SSA_NAME_OCCURS_IN_ABNORMAL_PHI (last_vdef) = 1;
- gsi = gsi_for_stmt (vphi);
+ gsi = gsi_for_stmt (vphi);
remove_phi_node (&gsi, true);
}
}
if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (gimple_phi_result (vphi)))
SSA_NAME_OCCURS_IN_ABNORMAL_PHI (last_vdef) = 1;
- gimple_stmt_iterator gsi = gsi_for_stmt (vphi);
+ gimple_stmt_iterator gsi = gsi_for_stmt (vphi);
remove_phi_node (&gsi, true);
}
}
will be if-converted, the new copy of the loop will not,
and the LOOP_VECTORIZED internal call will be guarding which
loop to execute. The vectorizer pass will fold this
- internal call into either true or false.
+ internal call into either true or false.
Note that this function intentionally invalidates profile. Both edges
out of LOOP_VECTORIZED must have 100% probability so the profile remains
gcc_assert (DECL_P (new_var));
DECL_CHAIN (new_var) = new_decls;
new_decls = new_var;
-
+
/* Also copy value-expressions. */
if (VAR_P (new_var) && DECL_HAS_VALUE_EXPR_P (new_var))
{
return NULL;
}
}
-
+
/* We do not allow CLOBBERs of handled components. In case
returned value is stored via such handled component, remove
the clobber so stmt verifier is happy. */
(basic_block) old_edge->dest->aux))
&& (e->flags & EDGE_EH))
e->probability = old_edge->probability;
-
+
FOR_EACH_EDGE (e, ei, copy_stmt_bb->succs)
if (e->flags & EDGE_EH)
{
done:
/* Register the VAR_DECL as the equivalent for the RESULT_DECL; that
way, when the RESULT_DECL is encountered, it will be
- automatically replaced by the VAR_DECL.
+ automatically replaced by the VAR_DECL.
When returning by reference, ensure that RESULT_DECL remaps to
gimple_val. */
}
-/* Each entry in VAR_INFOS contains an element of type STRUCT
+/* Each entry in VAR_INFOS contains an element of type STRUCT
VAR_INFO_D. */
static hash_table<var_info_hasher> *var_infos;
/* Do not insert debug stmts if the stmt ends the BB. */
if (stmt_ends_bb_p (stmt))
continue;
-
+
tracked_var = target_for_debug_bind (var);
if (tracked_var)
{
|| _loop->get_bb_top_order_index(bb1->index)
!= _loop->get_bb_top_order_index(bb2->index));
- return (_loop->get_bb_top_order_index(bb1->index) -
+ return (_loop->get_bb_top_order_index(bb1->index) -
_loop->get_bb_top_order_index(bb2->index));
}
/* Generates code for PARTITION. Return whether LOOP needs to be destroyed. */
-static bool
+static bool
generate_code_for_partition (class loop *loop,
partition *partition, bool copy_p,
bool keep_lc_phis_p)
queue_phi_copy_p (var_map map, tree t)
{
if (TREE_CODE (t) == SSA_NAME)
- {
+ {
if (var_to_partition (map, t) == NO_PARTITION)
return true;
return false;
/* Loop autoparallelization.
Copyright (C) 2006-2024 Free Software Foundation, Inc.
- Contributed by Sebastian Pop <pop@cri.ensmp.fr>
+ Contributed by Sebastian Pop <pop@cri.ensmp.fr>
Zdenek Dvorak <dvorakz@suse.cz> and Razya Ladelsky <razya@il.ibm.com>.
This file is part of GCC.
-- if there are several parallelizable loops in a function, it may be
possible to generate the threads just once (using synchronization to
ensure that cross-loop dependences are obeyed).
- -- handling of common reduction patterns for outer loops.
-
+ -- handling of common reduction patterns for outer loops.
+
More info can also be found at http://gcc.gnu.org/wiki/AutoParInGCC */
/*
Reduction handling:
/* We should compute a better number-of-iterations value for outer loops.
That is, if we have
-
+
for (i = 0; i < n; ++i)
for (j = 0; j < m; ++j)
...
- we should compute nit = n * m, not nit = n.
+ we should compute nit = n * m, not nit = n.
Also may_be_zero handling would need to be adjusted. */
type = TREE_TYPE (niter->niter);
continue;
gcc_assert (laref->distance > 0);
- chain->inits[n - laref->distance]
+ chain->inits[n - laref->distance]
= PHI_ARG_DEF_FROM_EDGE (laref->stmt, entry);
}
dump_generic_node (pp, TREE_OPERAND (node, 2), spc, flags, false);
pp_string (pp, " > ");
break;
-
+
case VEC_PERM_EXPR:
pp_string (pp, " VEC_PERM_EXPR < ");
dump_generic_node (pp, TREE_OPERAND (node, 0), spc, flags, false);
const char *msg;
tree_node **slot;
- if (!AGGREGATE_TYPE_P (type))
+ if (!AGGREGATE_TYPE_P (type))
{
reject (var, "not aggregate");
return false;
/* Determine if the two component references REF1 and REF2 which are
based on access types TYPE1 and TYPE2 and of which at least one is based
- on an indirect reference may alias.
+ on an indirect reference may alias.
REF1_ALIAS_SET, BASE1_ALIAS_SET, REF2_ALIAS_SET and BASE2_ALIAS_SET
are the respective alias sets. */
}
/* If we didn't find a common base, try the other way around. */
- if (cmp_outer <= 0
+ if (cmp_outer <= 0
|| (end_struct_ref1
&& compare_type_sizes (TREE_TYPE (end_struct_ref1), type2) <= 0))
{
We do not assume that the containers of FIELD1 and FIELD2 are of the
same type or size.
- Return 0 in case the base address of component_refs are same then
+ Return 0 in case the base address of component_refs are same then
FIELD1 and FIELD2 have same address. Note that FIELD1 and FIELD2
may not be of same type or size.
/* ??? Bitfields can overlap at RTL level so punt on them.
FIXME: RTL expansion should be fixed by adjusting the access path
- when producing MEM_ATTRs for MEMs which are wider than
+ when producing MEM_ATTRs for MEMs which are wider than
the bitfields similarly as done in set_mem_attrs_minus_bitpos. */
if (DECL_BIT_FIELD (field1) && DECL_BIT_FIELD (field2))
return -1;
as the Fortran compiler smuggles type punning into COMPONENT_REFs
for common blocks instead of using unions like everyone else. */
tree type = DECL_FIELD_CONTEXT (field);
- /* With LTO types considered same_type_for_tbaa_p
+ /* With LTO types considered same_type_for_tbaa_p
from different translation unit may not have same
main variant. They however have same TYPE_CANONICAL. */
if (TYPE_CANONICAL (type))
&& nonoverlapping_refs_since_match_p (NULL, ref1, NULL, ref2, false) == 1)
return false;
- return true;
+ return true;
}
/* Return true if access with BASE is view converted.
use the usual conflict check rather than a subset test.
??? We could introduce -fvery-strict-aliasing when the language
does not allow decls to have a dynamic type that differs from their
- static type. Then we can check
+ static type. Then we can check
!alias_set_subset_of (base1_alias_set, base2_alias_set) instead. */
if (base1_alias_set != base2_alias_set
&& !alias_sets_conflict_p (base1_alias_set, base2_alias_set))
if (res)
break;
/* Remember if we drop an array-ref that we need to
- double-check not being at struct end. */
+ double-check not being at struct end. */
if (TREE_CODE (base) == ARRAY_REF
|| TREE_CODE (base) == ARRAY_RANGE_REF)
innermost_dropped_array_ref = base;
fprintf (stderr, "\n");
}
-/* Extend NONZERO_BITS to a full mask, based on sgn. */
+/* Extend NONZERO_BITS to a full mask, based on sgn. */
static widest_int
extend_mask (const wide_int &nonzero_bits, signop sgn)
{
- return widest_int::from (nonzero_bits, sgn);
+ return widest_int::from (nonzero_bits, sgn);
}
/* Compute a default value for variable VAR and store it in the
Return TRUE when something was optimized. */
static bool
-ccp_finalize (bool nonzero_p)
+ccp_finalize (bool nonzero_p)
{
bool something_changed;
unsigned i;
the value, mask pair *VAL and *MASK to the result. */
void
-bit_value_unop (enum tree_code code, signop type_sgn, int type_precision,
+bit_value_unop (enum tree_code code, signop type_sgn, int type_precision,
widest_int *val, widest_int *mask,
signop rtype_sgn, int rtype_precision,
const widest_int &rval, const widest_int &rmask)
and R2TYPE and set the value, mask pair *VAL and *MASK to the result. */
void
-bit_value_binop (enum tree_code code, signop sgn, int width,
+bit_value_binop (enum tree_code code, signop sgn, int width,
widest_int *val, widest_int *mask,
signop r1type_sgn, int r1type_precision,
const widest_int &r1val, const widest_int &r1mask,
/* Given SSA_NAMEs NAME1 and NAME2, return true if they are candidates for
coalescing together, false otherwise.
- This must stay consistent with compute_samebase_partition_bases and
+ This must stay consistent with compute_samebase_partition_bases and
compute_optimized_partition_bases. */
bool
/* Special case comparing booleans against a constant as we
know the value of OP0 on both arms of the branch. i.e., we
- can record an equivalence for OP0 rather than COND.
+ can record an equivalence for OP0 rather than COND.
However, don't do this if the constant isn't zero or one.
Such conditionals will get optimized more thoroughly during
/* STMT, a GIMPLE_ASSIGN, may create certain equivalences, in either
the available expressions table or the const_and_copies table.
- Detect and record those equivalences into AVAIL_EXPRS_STACK.
+ Detect and record those equivalences into AVAIL_EXPRS_STACK.
We handle only very simple copy equivalences here. The heavy
lifing is done by eliminate_redundant_computations. */
-/* Support routines for dead store elimination.
+/* Support routines for dead store elimination.
Copyright (C) 2019-2024 Free Software Foundation, Inc.
This file is part of GCC.
Returns 1 if the stmt was modified and 2 if the CFG needs cleanup,
otherwise returns 0. */
-static int
+static int
forward_propagate_into_comparison (gimple_stmt_iterator *gsi)
{
gimple *stmt = gsi_stmt (*gsi);
e->dest->index));
else
ei_next (&ei);
- }
+ }
BITMAP_FREE (target_blocks);
}
}
if (code1 == SSA_NAME)
{
def = SSA_NAME_DEF_STMT (name);
-
+
if (def && is_gimple_assign (def)
&& can_propagate_from (def))
{
/* Combine an element access with a shuffle. Returns true if there were
any changes made, else it returns false. */
-
+
static bool
simplify_bitfield_ref (gimple_stmt_iterator *gsi)
{
/* Combine a shuffle with its arguments. Returns 1 if there were any
changes made, 2 if cfg-cleanup needs to run. Else it returns 0. */
-
+
static int
simplify_permutation (gimple_stmt_iterator *gsi)
{
: EDGE_SUCC (outer_cond_bb, 0));
edge inner_taken = EDGE_SUCC (inner_cond_bb, 0);
edge inner_not_taken = EDGE_SUCC (inner_cond_bb, 1);
-
+
if (inner_taken->dest != outer2->dest)
std::swap (inner_taken, inner_not_taken);
gcc_assert (inner_taken->dest == outer2->dest);
boolean_type_node,
gimple_cond_lhs (outer_cond),
gimple_cond_rhs (outer_cond));
- t = fold_build2_loc (gimple_location (inner_cond),
+ t = fold_build2_loc (gimple_location (inner_cond),
TRUTH_AND_EXPR, boolean_type_node, t1, t2);
if (result_inv)
{
/* Duplicating loop header with combned conditional will
remove this statement in each copy. But we account for
that later when seeing that condition.
-
+
Note that this may be overly optimistic for bit operations
where the static parameter may still result in non-trivial
bit operation. */
aor.max_size = saved_maxsize;
if (*slot)
{
- if (!(*slot)->ref_canonical
+ if (!(*slot)->ref_canonical
&& !operand_equal_p (*mem, (*slot)->mem.ref, 0))
{
/* If we didn't yet canonicalize the hashtable ref (which
MEM = lsm; <-- (X)
In case MEM and TMP_VAR are NULL the function will return the then
- block so the caller can insert (X) and other related stmts.
+ block so the caller can insert (X) and other related stmts.
*/
static basic_block
instructions after exit are not executed. */
int last_iteration;
int last_iteration_eliminated_by_peeling;
-
+
/* If some IV computation will become constant. */
bool constant_iv;
iteration of the loop.
EDGE_TO_CANCEL (if non-NULL) is an non-exit edge eliminated in the last iteration
of loop.
- Return results in SIZE, estimate benefits for complete unrolling exiting by EXIT.
+ Return results in SIZE, estimate benefits for complete unrolling exiting by EXIT.
Stop estimating after UPPER_BOUND is met. Return true in this case. */
static bool
/* Loop LOOP is known to not loop. See if there is an edge in the loop
body that can be remove to make the loop to always exit and at
- the same time it does not make any code potentially executed
- during the last iteration dead.
+ the same time it does not make any code potentially executed
+ during the last iteration dead.
After complete unrolling we still may get rid of the conditional
on the exit in the last copy even if we have no idea what it does.
static bitmap peeled_loops;
/* Cancel all fully unrolled loops by putting __builtin_unreachable
- on the latch edge.
+ on the latch edge.
We do it after all unrolling since unlooping moves basic blocks
across loop boundaries trashing loop closed SSA form as well
- as SCEV info needed to be intact during unrolling.
+ as SCEV info needed to be intact during unrolling.
IRRED_INVALIDATED is used to bookkeep if information about
irreducible regions may become invalid as a result
- of the transformation.
+ of the transformation.
LOOP_CLOSED_SSA_INVALIDATED is used to bookkepp the case
when we need to go into loop closed SSA form. */
/* See if we proved number of iterations to be low constant.
- EXIT is an edge that will be removed in all but last iteration of
+ EXIT is an edge that will be removed in all but last iteration of
the loop.
EDGE_TO_CACNEL is an edge that will be removed from the last iteration
of the unrolled sequence and is expected to make the final loop not
- rolling.
+ rolling.
If the number of execution of loop is determined by standard induction
variable test, then EXIT and EDGE_TO_CANCEL are the two edges leaving
/* If the loop is expected to iterate N times and is
small enough, duplicate the loop body N+1 times before
the loop itself. This way the hot path will never
- enter the loop.
+ enter the loop.
Parameters are the same as for try_unroll_loops_completely */
static bool
condition S * i <> C. If NO_OVERFLOW is true, then the control variable of
the loop does not overflow. EXIT_MUST_BE_TAKEN is true if we are guaranteed
that the loop ends through this exit, i.e., the induction variable ever
- reaches the value of C.
-
+ reaches the value of C.
+
The value C is equal to final - base, where final and base are the final and
initial value of the actual induction variable in the analysed loop. BNDS
bounds the value of this difference when computed in signed type with
bounds bnds;
/* If the test is not executed every iteration, wrapping may make the test
- to pass again.
+ to pass again.
TODO: the overflow case can be still used as unreliable estimate of upper
bound. But we have no API to pass it down to number of iterations code
and, at present, it will not use it anyway. */
return true;
/* For arrays that might have flexible sizes, it is not guaranteed that they
- do not really extend over their declared size. */
+ do not really extend over their declared size. */
if (array_ref_flexible_size_p (base))
{
has_flexible_size = true;
/* If BB is not executed in each iteration of the loop, we cannot
use the operations in it to infer reliable upper bound on the
- # of iterations of the loop. However, we can use it as a guess.
+ # of iterations of the loop. However, we can use it as a guess.
Reliable guesses come only from array bounds. */
reliable = dominated_by_p (CDI_DOMINATORS, loop->latch, bb);
insert = true;
*entry = bound_index;
}
-
+
if (insert)
queues[bound_index].safe_push (e->dest);
}
bitmap visited;
/* Collect all statements with interesting (i.e. lower than
- nb_iterations_upper_bound) bound on them.
+ nb_iterations_upper_bound) bound on them.
TODO: Due to the way record_estimate choose estimates to store, the bounds
will be always nb_iterations_upper_bound-1. We can change this to record
/* If every path through the loop reach bounding statement before exit,
then we know the last iteration of the loop will have undefined effect
and we can decrease number of iterations. */
-
+
if (!found_exit)
{
if (dump_file && (dump_flags & TDF_DETAILS))
-- If NITER_BOUND->is_exit is false, then if we can prove that when STMT
is executed, then NITER_BOUND->stmt is executed as well in the same
- iteration then STMT is executed at most NITER_BOUND->bound + 1 times.
+ iteration then STMT is executed at most NITER_BOUND->bound + 1 times.
If we can determine that NITER_BOUND->stmt is always executed
after STMT, then STMT is executed at most NITER_BOUND->bound + 2 times.
/* Dumps information about memory reference */
static void
dump_mem_details (FILE *file, tree base, tree step,
- HOST_WIDE_INT delta, bool write_p)
+ HOST_WIDE_INT delta, bool write_p)
{
fprintf (file, "(base ");
print_generic_expr (file, base, TDF_SLIM);
if (may_be_nonaddressable_p (base))
return false;
- /* Limit non-constant step prefetching only to the innermost loops and
+ /* Limit non-constant step prefetching only to the innermost loops and
only when the step is loop invariant in the entire loop nest. */
if (!cst_and_fits_in_hwi (step))
{
{
if (dump_file && (dump_flags & TDF_DETAILS))
{
- fprintf (dump_file, "Memory expression %p\n",(void *) ref );
+ fprintf (dump_file, "Memory expression %p\n",(void *) ref );
print_generic_expr (dump_file, ref, TDF_SLIM);
fprintf (dump_file,":");
dump_mem_details (dump_file, base, step, delta, write_p);
- fprintf (dump_file,
+ fprintf (dump_file,
"Ignoring %p, non-constant step prefetching is "
- "limited to inner most loops \n",
+ "limited to inner most loops \n",
(void *) ref);
}
- return false;
+ return false;
}
else
{
print_generic_expr (dump_file, ref, TDF_SLIM);
fprintf (dump_file,":");
dump_mem_details (dump_file, base, step, delta, write_p);
- fprintf (dump_file,
+ fprintf (dump_file,
"Not prefetching, ignoring %p due to "
"loop variant step\n",
(void *) ref);
}
- return false;
+ return false;
}
}
}
/* Depending on the direction of the IVs the new bound for the first
loop is the minimum or maximum of old bound and border.
Also, if the guard condition isn't strictly less or greater,
- we need to adjust the bound. */
+ we need to adjust the bound. */
int addbound = 0;
enum tree_code minmax;
if (niter->cmp == LT_EXPR)
result. */
static tree
-gimple_expand_builtin_powi (gimple_stmt_iterator *gsi, location_t loc,
+gimple_expand_builtin_powi (gimple_stmt_iterator *gsi, location_t loc,
tree arg0, HOST_WIDE_INT n)
{
if ((n >= -1 && n <= 2)
expession holding the result. */
static tree
-gimple_expand_builtin_pow (gimple_stmt_iterator *gsi, location_t loc,
+gimple_expand_builtin_pow (gimple_stmt_iterator *gsi, location_t loc,
tree arg0, tree arg1)
{
REAL_VALUE_TYPE c, cint, dconst1_3, dconst1_4, dconst1_6;
&& (!HONOR_NANS (mode) || tree_expr_nonnegative_p (arg0))
&& real_equal (&c, &dconst1_3))
return build_and_insert_call (gsi, loc, cbrtfn, arg0);
-
+
/* Optimize pow(x,1./6.) = cbrt(sqrt(x)). Don't do this optimization
if we don't have a hardware sqrt insn. */
dconst1_6 = dconst1_3;
}
ovf_use_seen = true;
}
- else
+ else
{
use_seen = true;
if (code == MULT_EXPR
/* Return true if target has support for divmod. */
static bool
-target_supports_divmod_p (optab divmod_optab, optab div_optab, machine_mode mode)
+target_supports_divmod_p (optab divmod_optab, optab div_optab, machine_mode mode)
{
/* If target supports hardware divmod insn, use it for divmod. */
if (optab_handler (divmod_optab, mode) != CODE_FOR_nothing)
if (libfunc != NULL_RTX)
{
/* If optab_handler exists for div_optab, perhaps in a wider mode,
- we don't want to use the libfunc even if it exists for given mode. */
+ we don't want to use the libfunc even if it exists for given mode. */
machine_mode div_mode;
FOR_EACH_MODE_FROM (div_mode, mode)
if (optab_handler (div_optab, div_mode) != CODE_FOR_nothing)
return targetm.expand_divmod_libfunc != NULL;
}
-
- return false;
+
+ return false;
}
/* Check if stmt is candidate for divmod transform. */
expand using the [su]divv optabs. */
if (TYPE_OVERFLOW_TRAPS (type))
return false;
-
- if (!target_supports_divmod_p (divmod_optab, div_optab, mode))
+
+ if (!target_supports_divmod_p (divmod_optab, div_optab, mode))
return false;
return true;
tree op1 = gimple_assign_rhs1 (stmt);
tree op2 = gimple_assign_rhs2 (stmt);
-
+
imm_use_iterator use_iter;
gimple *use_stmt;
- auto_vec<gimple *> stmts;
+ auto_vec<gimple *> stmts;
- gimple *top_stmt = stmt;
+ gimple *top_stmt = stmt;
basic_block top_bb = gimple_bb (stmt);
/* Part 1: Try to set top_stmt to "topmost" stmt that dominates
/* Part 2: Add all trunc_div/trunc_mod statements domianted by top_bb
to stmts vector. The 2nd loop will always add stmt to stmts vector, since
gimple_bb (top_stmt) dominates gimple_bb (stmt), so the
- 2nd loop ends up adding at-least single trunc_mod_expr stmt. */
+ 2nd loop ends up adding at-least single trunc_mod_expr stmt. */
FOR_EACH_IMM_USE_STMT (use_stmt, use_iter, top_op1)
{
gimple_stmt_iterator top_stmt_gsi = gsi_for_stmt (top_stmt);
gsi_insert_before (&top_stmt_gsi, call_stmt, GSI_SAME_STMT);
- widen_mul_stats.divmod_calls_inserted++;
+ widen_mul_stats.divmod_calls_inserted++;
/* Update all statements in stmts vector:
lhs = op1 TRUNC_DIV_EXPR op2 -> lhs = REALPART_EXPR<divmod_tmp>
update_stmt (use_stmt);
}
- return true;
-}
+ return true;
+}
/* Process a single gimple assignment STMT, which has a RSHIFT_EXPR as
its rhs, and try to convert it into a MULT_HIGHPART_EXPR. The return
}
if (bits > prec)
highpart2 = build_and_insert_binop (gsi, loc, "highparttmp",
- RSHIFT_EXPR, highpart2,
+ RSHIFT_EXPR, highpart2,
build_int_cst (ntype, bits - prec));
gassign *new_stmt = gimple_build_assign (lhs, NOP_EXPR, highpart2);
return false;
}
-/* Return TRUE if arg0/arg1 are equal to the rhs/lhs or lhs/rhs of COND.
+/* Return TRUE if arg0/arg1 are equal to the rhs/lhs or lhs/rhs of COND.
Also return TRUE if arg0/arg1 are equal to the source arguments of a
- an EQ comparison feeding a BIT_AND_EXPR which feeds COND.
+ an EQ comparison feeding a BIT_AND_EXPR which feeds COND.
Return FALSE otherwise. */
if (!is_gimple_assign (def) || gimple_assign_rhs_code (def) != BIT_AND_EXPR)
return false;
- /* Now verify arg0/arg1 correspond to the source arguments of an
+ /* Now verify arg0/arg1 correspond to the source arguments of an
EQ comparison feeding the BIT_AND_EXPR. */
-
+
tree tmp = gimple_assign_rhs1 (def);
if (rhs_is_fed_for_value_replacement (arg0, arg1, code, tmp))
return true;
/* Generate an topological-ordered array of bitmap set SET. */
-static vec<pre_expr>
+static vec<pre_expr>
sorted_array_from_bitmap_set (bitmap_set_t set)
{
unsigned int i;
/* We have to return either a new representative or one
that can be used for expression simplification and thus
is available in B. */
- if (! b
+ if (! b
|| gimple_nop_p (def)
|| dominated_by_p (CDI_DOMINATORS, b, gimple_bb (def)))
return name;
return folded;
break;
case CONSTANT:
- {
+ {
folded = PRE_EXPR_CONSTANT (expr);
tree tem = fold_convert (exprtype, folded);
if (is_gimple_min_invariant (tem))
get_expression_id (expr),
avail))
new_stuff = true;
- }
- }
+ }
+ }
}
}
Blocks are added to this list if their incoming edges are
found executable.
- SSA_EDGE_WORKLIST contains the list of statements that we
+ SSA_EDGE_WORKLIST contains the list of statements that we
need to revisit.
5- Simulation terminates when all three work lists are drained.
To obtain this result during reassociation, we bias the rank
of the phi definition x_1 upward, when it is recognized as an
- accumulator pattern. The artificial rank causes it to be
+ accumulator pattern. The artificial rank causes it to be
added last, providing the desired independence. */
if (TREE_CODE (e) == SSA_NAME)
}
}
- /* If CURR->OP is a negate expr without nop conversion in a plus expr:
+ /* If CURR->OP is a negate expr without nop conversion in a plus expr:
save it for later inspection in repropagate_negates(). */
if (negateop != NULL_TREE
&& gimple_assign_rhs_code (SSA_NAME_DEF_STMT (curr->op)) == NEGATE_EXPR)
CASE_CFN_POW:
CASE_CFN_POWI:
return (operand_equal_p (gimple_call_arg (stmt, 0), op, 0));
-
+
default:
return false;
}
result = t5 * y */
vec_len = repeat_factor_vec.length ();
-
+
/* Repeatedly look for opportunities to create a builtin_powi call. */
while (true)
{
/* First look for the largest cached product of factors from
preceding iterations. If found, create a builtin_powi for
it if the minimum occurrence count for its factors is at
- least 2, or just use this cached product as our next
+ least 2, or just use this cached product as our next
multiplicand if the minimum occurrence count is 1. */
FOR_EACH_VEC_ELT (repeat_factor_vec, j, rf1)
{
rf1 = &repeat_factor_vec[i];
rf1->count -= power;
-
+
FOR_EACH_VEC_ELT_REVERSE (*ops, n, oe)
{
if (oe->op == rf1->factor)
}
tree new_lhs = lhs;
- /* If the operand vector is now empty, all operands were
+ /* If the operand vector is now empty, all operands were
consumed by the __builtin_powi optimization. */
if (ops.length () == 0)
transform_stmt_to_copy (&gsi, stmt, powi_result);
len != orig_len);
}
- /* If we combined some repeated factors into a
+ /* If we combined some repeated factors into a
__builtin_powi call, multiply that result by the
reassociated operands. */
if (powi_result)
vn_phi_eq (const_vn_phi_t const vp1, const_vn_phi_t const vp2);
struct vn_phi_hasher : nofree_ptr_hash <vn_phi_s>
-{
+{
static inline hashval_t hash (const vn_phi_s *);
static inline bool equal (const vn_phi_s *, const vn_phi_s *);
};
/* vn_constant hashtable helpers. */
struct vn_constant_hasher : free_ptr_hash <vn_constant_s>
-{
+{
static inline hashval_t hash (const vn_constant_s *);
static inline bool equal (const vn_constant_s *, const vn_constant_s *);
};
this function. *VALUEIZED_ANYTHING will specify whether any
operands were valueized. */
-static vec<vn_reference_op_s>
+static vec<vn_reference_op_s>
valueize_shared_reference_ops_from_ref (tree ref, bool *valueized_anything)
{
if (!ref)
call statement. The vector is shared among all callers of
this function. */
-static vec<vn_reference_op_s>
+static vec<vn_reference_op_s>
valueize_shared_reference_ops_from_call (gcall *call)
{
if (!call)
/* Insert OP into the current hash table with a value number of RESULT. */
-static void
+static void
vn_reference_insert (tree op, tree result, tree vuse, tree vdef)
{
vn_reference_s **slot;
enum tree_code code = MEM_REF;
hstate.add_object (code);
inchash::add_expr (base, hstate,
- TREE_CODE (base) == MEM_REF
+ TREE_CODE (base) == MEM_REF
? OEP_ADDRESS_OF : 0);
hstate.add_object (offset);
hstate.add_object (size);
}
}
-/* Record that X has the value Y and that X's previous value is PREV_X.
+/* Record that X has the value Y and that X's previous value is PREV_X.
This variant does not follow the value chain for Y. */
record_const_or_copy (x, y, SSA_NAME_VALUE (x));
}
-/* Record that X has the value Y and that X's previous value is PREV_X.
+/* Record that X has the value Y and that X's previous value is PREV_X.
This variant follow's Y value chain. */
void record_const_or_copy (tree, tree);
/* Special entry point when we want to provide an explicit previous
- value for the first argument. Try to get rid of this in the future.
+ value for the first argument. Try to get rid of this in the future.
This version may also follow the value chain for the RHS. */
void record_const_or_copy (tree, tree, tree);
commondom = select_best_block (frombb, commondom, stmt);
if (commondom == frombb)
- return false;
+ return false;
*togsi = gsi_after_labels (commondom);
/* This can happen if there are multiple uses in a PHI. */
if (!sinkbb)
return false;
-
+
basic_block bestbb = select_best_block (frombb, sinkbb, stmt);
if (bestbb == frombb
/* When we sink a store make sure there's not a path to any of
else
pdata->maxbound = pdata->maxlen;
}
- else
+ else
pdata->maxlen = build_all_ones_cst (size_type_node);
}
else
return found;
}
-/* Union two constraint vectors, TO and FROM. Put the result in TO.
+/* Union two constraint vectors, TO and FROM. Put the result in TO.
Returns true of TO set is changed. */
static bool
/* Condense two variable nodes into a single variable node, by moving
- all associated info from FROM to TO. Returns true if TO node's
+ all associated info from FROM to TO. Returns true if TO node's
constraint set changes after the merge. */
static bool
}
case tcc_constant:
{
- /* We cannot refer to automatic variables through constants. */
+ /* We cannot refer to automatic variables through constants. */
temp.type = ADDRESSOF;
temp.var = nonlocal_id;
temp.offset = 0;
{
varinfo_t vi;
tree heapvar;
-
+
heapvar = build_fake_var_decl (ptr_type_node);
DECL_EXTERNAL (heapvar) = 1;
(except through the escape solution).
For all flags we get these implications right except for
not_returned because we miss return functions in ipa-prop. */
-
+
if (flags & EAF_NO_DIRECT_READ)
flags |= EAF_NOT_RETURNED_INDIRECTLY;
}
/* For non-IPA mode, generate constraints necessary for a call on the
RHS and collect return value constraint to RESULTS to be used later in
handle_lhs_call.
-
+
IMPLICIT_EAF_FLAGS are added to each function argument. If
WRITES_GLOBAL_MEMORY is true function is assumed to possibly write to global
memory. Similar for READS_GLOBAL_MEMORY. */
pointer passed by address. */
else if (is_gimple_call (t))
find_func_aliases_for_call (fn, as_a <gcall *> (t));
-
+
/* Otherwise, just a regular assignment statement. Only care about
operations with pointer result, others are dealt with as escape
points if they have pointer operands. */
&& multiple_p (mem_ref_offset (*tp),
wi::to_poly_offset (TYPE_SIZE_UNIT (TREE_TYPE (*tp)))))
{
- *tp = build3 (BIT_FIELD_REF, TREE_TYPE (*tp), sym,
+ *tp = build3 (BIT_FIELD_REF, TREE_TYPE (*tp), sym,
TYPE_SIZE (TREE_TYPE (*tp)),
int_const_binop (MULT_EXPR,
bitsize_int (BITS_PER_UNIT),
(mem_ref_offset (*tp),
wi::to_offset (TYPE_SIZE_UNIT (TREE_TYPE (*tp))),
0, wi::to_offset (DECL_SIZE_UNIT (sym))))
- && (! INTEGRAL_TYPE_P (TREE_TYPE (*tp))
+ && (! INTEGRAL_TYPE_P (TREE_TYPE (*tp))
|| (wi::to_offset (TYPE_SIZE (TREE_TYPE (*tp)))
== TYPE_PRECISION (TREE_TYPE (*tp))))
&& (! INTEGRAL_TYPE_P (TREE_TYPE (sym))
/* For an lvalue tree LHS return true if it cannot be rewritten into SSA form.
Otherwise return true. */
-static bool
+static bool
non_rewritable_lvalue_p (tree lhs)
{
/* A plain decl is always rewritable. */
continue;
}
- if (rhs_code == ADDR_EXPR
+ if (rhs_code == ADDR_EXPR
&& TREE_CODE (TREE_OPERAND (rhs1, 0)) == MEM_REF
&& TREE_CODE (TREE_OPERAND (TREE_OPERAND (rhs1, 0), 0)) == SSA_NAME
&& tree_fits_uhwi_p (TREE_OPERAND (TREE_OPERAND (rhs1, 0), 1)))
continue;
}
- if (rhs_code == ADDR_EXPR
+ if (rhs_code == ADDR_EXPR
&& TREE_CODE (TREE_OPERAND (rhs1, 0)) == MEM_REF
&& TREE_CODE (TREE_OPERAND (TREE_OPERAND (rhs1, 0), 0)) == SSA_NAME
&& tree_fits_uhwi_p (TREE_OPERAND (TREE_OPERAND (rhs1, 0), 1)))
if (!VECTOR_TYPE_P (type)
|| !VECTOR_TYPE_P (TREE_TYPE (rhs1)))
return;
-
+
/* A scalar operation pretending to be a vector one. */
if (VECTOR_BOOLEAN_TYPE_P (type)
&& !VECTOR_MODE_P (TYPE_MODE (type))
non-perfect nests but allow if-conversion versioned loops inside. */
class loop *loop_to_version = loop;
if (flow_loop_nested_p (outermost, loop))
- {
+ {
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location,
"trying to apply versioning to outer loop %d\n",
/* Cost model check occurs at prologue generation. */
if (LOOP_VINFO_PEELING_FOR_ALIGNMENT (loop_vinfo) < 0)
scalar_outside_cost += 2 * vect_get_stmt_cost (cond_branch_taken)
- + vect_get_stmt_cost (cond_branch_not_taken);
+ + vect_get_stmt_cost (cond_branch_not_taken);
/* Cost model check occurs at epilogue generation. */
else
- scalar_outside_cost += 2 * vect_get_stmt_cost (cond_branch_taken);
+ scalar_outside_cost += 2 * vect_get_stmt_cost (cond_branch_taken);
}
}
epilogue_cost += record_stmt_cost (cost_vec, 1,
vec_to_scalar, stmt_info, 0,
vect_epilogue);
- }
+ }
else
/* Use extracts and reduction op for final reduction. For N
elements, we have N extracts and N-1 reduction ops. */
- epilogue_cost += record_stmt_cost (cost_vec,
+ epilogue_cost += record_stmt_cost (cost_vec,
nelements + nelements - 1,
vector_stmt, stmt_info, 0,
vect_epilogue);
}
if (dump_enabled_p ())
- dump_printf (MSG_NOTE,
+ dump_printf (MSG_NOTE,
"vect_model_reduction_cost: inside_cost = %d, "
"prologue_cost = %d, epilogue_cost = %d .\n", inside_cost,
prologue_cost, epilogue_cost);
/* Function vect_create_epilog_for_reduction
Create code at the loop-epilog to finalize the result of a reduction
- computation.
-
+ computation.
+
STMT_INFO is the scalar reduction stmt that is being vectorized.
- SLP_NODE is an SLP node containing a group of reduction statements. The
+ SLP_NODE is an SLP node containing a group of reduction statements. The
first one in this group is STMT_INFO.
SLP_NODE_INSTANCE is the SLP node instance containing SLP_NODE
REDUC_INDEX says which rhs operand of the STMT_INFO is the reduction phi
The first match will be a 1 to allow 0 to be used for non-matching
indexes. If there are no matches at all then the vector will be all
zeroes.
-
+
PR92772: This algorithm is broken for architectures that support
masked vectors, but do not provide fold_extract_last. */
if (STMT_VINFO_REDUC_TYPE (reduc_info) == COND_REDUCTION)
/* 2.1 Create new loop-exit-phis to preserve loop-closed form:
- v_out1 = phi <VECT_DEF>
+ v_out1 = phi <VECT_DEF>
Store them in NEW_PHIS. */
if (double_reduc)
loop = outer_loop;
}
/* 2.3 Create the reduction code, using one of the three schemes described
- above. In SLP we simply need to extract all the elements from the
+ above. In SLP we simply need to extract all the elements from the
vector (without reducing them), so we use scalar shifts. */
else if (reduc_fn != IFN_LAST && (!slp_reduc || group_size == 1))
{
bitsize, bitpos);
if (slp_reduc)
{
- /* In SLP we don't need to apply reduction operation, so
+ /* In SLP we don't need to apply reduction operation, so
we just collect s' values in SCALAR_RESULTS. */
new_temp = new_name;
scalar_results.safe_push (new_name);
/* The only case where we need to reduce scalar results in SLP, is
unrolling. If the size of SCALAR_RESULTS is greater than
- REDUC_GROUP_SIZE, we reduce them combining elements modulo
+ REDUC_GROUP_SIZE, we reduce them combining elements modulo
REDUC_GROUP_SIZE. */
if (slp_reduc)
{
tree res, first_res, new_res;
-
+
/* Reduce multiple scalar results in case of SLP unrolling. */
for (j = group_size; scalar_results.iterate (j, &res);
j++)
scalar_results[0] = tmp;
}
}
-
+
/* 2.5 Adjust the final result by the initial value of the reduction
variable. (When such adjustment is not needed, then
'adjustment_def' is zero). For example, if code is PLUS we create:
/* 2.6 Handle the loop-exit phis. Replace the uses of scalar loop-exit
phis with new adjusted scalar results, i.e., replace use <s_out0>
- with use <s_out4>.
+ with use <s_out4>.
Transform:
loop_exit:
v_out2 = reduce <v_out1>
s_out3 = extract_field <v_out2, 0>
s_out4 = adjust_result <s_out3>
- use <s_out4>
+ use <s_out4>
use <s_out4> */
gcc_assert (live_out_stmts.size () == scalar_results.length ());
if (!vect_is_simple_use (op.ops[0], loop_vinfo, &dt, &vectype_op))
return false;
-
+
tree type_op = TREE_TYPE (op.ops[0]);
if (!vectype_op)
- {
+ {
vectype_op = get_vectype_for_scalar_type (loop_vinfo,
type_op);
if (!vectype_op)
vec_def = gimple_build (&stmts,
PLUS_EXPR, step_vectype, vec_def, vec_step);
vec_def = gimple_convert (&stmts, vectype, vec_def);
-
+
gsi_insert_seq_before (&si, stmts, GSI_SAME_STMT);
if (i < ncopies)
{
check_profitability = true;
}
- /* Make sure there exists a single-predecessor exit bb. Do this before
+ /* Make sure there exists a single-predecessor exit bb. Do this before
versioning. */
edge e = LOOP_VINFO_IV_EXIT (loop_vinfo);
if (! single_pred_p (e->dest) && !LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
unmasked_carry = new_ops[0] and/or new_ops[1];
carry = unmasked_carry & 1;
new_var = sum_of_shifted + carry;
- */
+ */
tree one_cst = build_one_cst (new_type);
gassign *g;
g = gimple_build_assign (sum_of_shifted, PLUS_EXPR,
shifted_op0, shifted_op1);
append_pattern_def_seq (vinfo, last_stmt_info, g, new_vectype);
-
+
tree unmasked_carry = vect_recog_temp_ssa_var (new_type, NULL);
tree_code c = (ifn == IFN_AVG_CEIL) ? BIT_IOR_EXPR : BIT_AND_EXPR;
g = gimple_build_assign (unmasked_carry, c, new_ops[0], new_ops[1]);
append_pattern_def_seq (vinfo, last_stmt_info, g, new_vectype);
-
+
tree carry = vect_recog_temp_ssa_var (new_type, NULL);
g = gimple_build_assign (carry, BIT_AND_EXPR, unmasked_carry, one_cst);
append_pattern_def_seq (vinfo, last_stmt_info, g, new_vectype);
TREE_TYPE (var));
lhs = vect_recog_temp_ssa_var (TREE_TYPE (lhs), NULL);
- pattern_stmt
+ pattern_stmt
= gimple_build_assign (lhs, COND_EXPR, lhs_var,
gimple_assign_rhs2 (last_stmt),
gimple_assign_rhs3 (last_stmt));
return (bb->loop_father == loop->inner);
}
-/* Record the cost of a statement, either by directly informing the
+/* Record the cost of a statement, either by directly informing the
target model or by saving it in a vector for later processing.
Return a preliminary estimate of the statement's cost. */
if (slp)
{
grouped_store = false;
- /* VEC_NUM is the number of vect stmts to be created for this
+ /* VEC_NUM is the number of vect stmts to be created for this
group. */
vec_num = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node);
first_stmt_info = SLP_TREE_SCALAR_STMTS (slp_node)[0];
== first_stmt_info));
first_dr_info = STMT_VINFO_DR_INFO (first_stmt_info);
op = vect_get_store_rhs (first_stmt_info);
- }
+ }
else
- /* VEC_NUM is the number of vect stmts to be created for this
+ /* VEC_NUM is the number of vect stmts to be created for this
group. */
vec_num = group_size;
/* We can't build a vector type of elements with alignment bigger than
their size. */
else if (nbytes < TYPE_ALIGN_UNIT (scalar_type))
- scalar_type = lang_hooks.types.type_for_mode (inner_mode,
+ scalar_type = lang_hooks.types.type_for_mode (inner_mode,
TYPE_UNSIGNED (scalar_type));
/* If we felt back to using the mode fail if there was
vectorization. */
/* TODO: Another case in which order doesn't *really* matter is when we
widen and then contract again, e.g. (short)((int)x * y >> 8).
- Normally, pack_trunc performs an even/odd permute, whereas the
+ Normally, pack_trunc performs an even/odd permute, whereas the
repack from an even/odd expansion would be an interleave, which
would be significantly simpler for e.g. AVX2. */
/* In any case, in order to avoid duplicating the code below, recurse
/* Return alignment of array's vector type corresponding to scalar type.
0 if no vector type exists. */
static unsigned
-get_vec_alignment_for_array_type (tree type)
+get_vec_alignment_for_array_type (tree type)
{
gcc_assert (TREE_CODE (type) == ARRAY_TYPE);
poly_uint64 array_size, vector_size;
offset is a multiple of it's vector alignment.
0 if no suitable field is found. */
static unsigned
-get_vec_alignment_for_record_type (tree type)
+get_vec_alignment_for_record_type (tree type)
{
gcc_assert (TREE_CODE (type) == RECORD_TYPE);
field != NULL_TREE;
field = DECL_CHAIN (field))
{
- /* Skip if not FIELD_DECL or if alignment is set by user. */
+ /* Skip if not FIELD_DECL or if alignment is set by user. */
if (TREE_CODE (field) != FIELD_DECL
|| DECL_USER_ALIGN (field)
|| DECL_ARTIFICIAL (field))
if (!tree_fits_uhwi_p (offset_tree))
break;
- offset = tree_to_uhwi (offset_tree);
+ offset = tree_to_uhwi (offset_tree);
alignment = get_vec_alignment_for_type (TREE_TYPE (field));
/* Get maximum alignment of vectorized field/array among those members
- whose offset is multiple of the vector alignment. */
+ whose offset is multiple of the vector alignment. */
if (alignment
&& (offset % alignment == 0)
&& (alignment > max_align))
purpose and value fields are PURPOSE and VALUE
and whose TREE_CHAIN is CHAIN. */
-tree
+tree
tree_cons (tree purpose, tree value, tree chain MEM_STAT_DECL)
{
tree node;
return lang_hooks.types.type_hash_eq (cand, base);
}
-/* This function checks to see if TYPE matches the size one of the built-in
+/* This function checks to see if TYPE matches the size one of the built-in
atomic types, and returns that core atomic type. */
static tree
if (unsignedp)
unsignedp = MAX_INT_CACHED_PREC + 1;
-
+
if (precision <= MAX_INT_CACHED_PREC)
{
itype = nonstandard_integer_type_cache[precision + unsignedp];
tree
make_anon_name ()
{
- const char *fmt =
+ const char *fmt =
#if !defined (NO_DOT_IN_LABEL)
"."
#elif !defined (NO_DOLLAR_IN_LABEL)
p = q = ASTRDUP (first_global_object_name);
/* If the target is handling the constructors/destructors, they
will be local to this file and the name is only necessary for
- debugging purposes.
+ debugging purposes.
We also assign sub_I and sub_D sufixes to constructors called from
the global static constructors. These are always local.
OpenMP "declare target" offloaded constructors/destructors use "off_I" and
/* Make sure its not already registered. */
if ((t = get_qualified_type (type, TYPE_QUAL_ATOMIC)))
return t;
-
+
t = build_variant_type_copy (type);
set_type_quals (t, TYPE_QUAL_ATOMIC);
/* Don't call build_qualified type for atomics. That routine does
special processing for atomics, and until they are initialized
it's better not to make that call.
-
+
Check to see if there is a target override for atomic types. */
atomicQI_type_node = build_atomic_base (unsigned_intQI_type_node,
targetm.atomic_align_for_mode (DImode));
atomicTI_type_node = build_atomic_base (unsigned_intTI_type_node,
targetm.atomic_align_for_mode (TImode));
-
+
access_public_node = get_identifier ("public");
access_protected_node = get_identifier ("protected");
access_private_node = get_identifier ("private");
{
tree fntype = TREE_TYPE (fndecl);
tree fn = build1 (ADDR_EXPR, build_pointer_type (fntype), fndecl);
-
+
return fold_build_call_array_loc (loc, TREE_TYPE (fntype), fn, n, argarray);
}
/* Type variant can differ by:
- TYPE_QUALS: TYPE_READONLY, TYPE_VOLATILE, TYPE_ATOMIC, TYPE_RESTRICT,
- ENCODE_QUAL_ADDR_SPACE.
+ ENCODE_QUAL_ADDR_SPACE.
- main variant may be TYPE_COMPLETE_P and variant types !TYPE_COMPLETE_P
in this case some values may not be set in the variant types
(see TYPE_COMPLETE_P checks).
else if (TREE_CODE (t) == ARRAY_TYPE)
verify_variant_match (TYPE_NONALIASED_COMPONENT);
/* During LTO we merge variant lists from diferent translation units
- that may differ BY TYPE_CONTEXT that in turn may point
+ that may differ BY TYPE_CONTEXT that in turn may point
to TRANSLATION_UNIT_DECL.
Ada also builds variants of types with different TYPE_CONTEXT. */
#if 0
}
/* Return true iff T1 and T2 are structurally identical for what
- TBAA is concerned.
+ TBAA is concerned.
This function is used both by lto.cc canonical type merging and by the
verifier. If TRUST_TYPE_CANONICAL we do not look into structure of types
that have TYPE_CANONICAL defined and assume them equivalent. This is useful
error ("%<TYPE_ARRAY_MAX_SIZE%> not %<INTEGER_CST%>");
debug_tree (TYPE_ARRAY_MAX_SIZE (t));
error_found = true;
- }
+ }
}
else if (TYPE_MAX_VALUE_RAW (t))
{
error ("%<TYPE_CACHED_VALUES_P%> is set while it should not be");
error_found = true;
}
-
+
/* ipa-devirt makes an assumption that TYPE_METHOD_BASETYPE is always
TYPE_MAIN_VARIANT and it would be odd to add methods only to variatns
of a type. */
real declaration.
Keep the size up to date in tree.h ! */
-const builtin_structptr_type builtin_structptr_types[6] =
+const builtin_structptr_type builtin_structptr_types[6] =
{
{ fileptr_type_node, ptr_type_node, "FILE" },
{ const_tm_ptr_type_node, const_ptr_type_node, "tm" },
&& TREE_CODE (TREE_TYPE (TYPE)) == REAL_TYPE)
/* Nonzero if TYPE represents a vector integer type. */
-
+
#define VECTOR_INTEGER_TYPE_P(TYPE) \
(VECTOR_TYPE_P (TYPE) \
&& TREE_CODE (TREE_TYPE (TYPE)) == INTEGER_TYPE)
| (TYPE_ATOMIC (NODE) * TYPE_QUAL_ATOMIC) \
| (TYPE_RESTRICT (NODE) * TYPE_QUAL_RESTRICT)))
-/* The same as TYPE_QUALS without the address space and atomic
+/* The same as TYPE_QUALS without the address space and atomic
qualifications. */
#define TYPE_QUALS_NO_ADDR_SPACE_NO_ATOMIC(NODE) \
((int) ((TYPE_READONLY (NODE) * TYPE_QUAL_CONST) \
{
location_t loc = LOCATION_LOCUS (ploc[j]);
CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, ubsan_source_location (loc));
- }
+ }
size_t nelts = vec_safe_length (saved_args);
for (i = 0; i < nelts; i++)
gimple_add_histogram_value(). Histograms are stored in a hash table
that is attached to every intrumented function, see VALUE_HISTOGRAMS
in function.h.
-
+
The value-profile transformations driver is the function
gimple_value_profile_transformations(). It traverses all statements in
the to-be-transformed function, and looks for statements with one or
/* Output the data.
Pass actual alignment value while emitting string constant to asm code
as function 'output_constant_pool_1' explicitly passes the alignment as 1
- assuming that the data is already aligned which prevents the generation
+ assuming that the data is already aligned which prevents the generation
of fix-up table entries. */
output_constant_pool_2 (desc->mode, x, desc->align);
if (priority != DEFAULT_INIT_PRIORITY)
{
char buf[18];
- sprintf (buf, "%s.%.5u",
+ sprintf (buf, "%s.%.5u",
constructor_p ? ".init_array" : ".fini_array",
priority);
sec = get_section (buf, SECTION_WRITE | SECTION_NOTYPE, NULL_TREE);
}
/* Switch to a COMDAT section with COMDAT name of decl.
-
+
FIXME: resolve_unique_section needs to deal better with
decls with both DECL_SECTION_NAME and DECL_ONE_ONLY. Once
that is fixed, this if-else statement can be replaced with
varpool_node::create_empty (void)
{
return new (ggc_alloc<varpool_node> ()) varpool_node ();
-}
+}
/* Return varpool node assigned to DECL. Create new one when needed. */
varpool_node *
consistently. As a GNU extension, do not enforce this rule for user defined
weak variables, so we support interposition on:
static const int dummy = 0;
- extern const int foo __attribute__((__weak__, __alias__("dummy")));
+ extern const int foo __attribute__((__weak__, __alias__("dummy")));
*/
if ((!DECL_INITIAL (real_node->decl)
|| (DECL_WEAK (decl) && !DECL_COMDAT (decl)))
return false;
/* Variables declared `const' with an initializer are considered
- to not be overwritable with different initializer by default.
+ to not be overwritable with different initializer by default.
??? Previously we behaved so for scalar variables but not for array
accesses. */
return false;
}
-/* Add NODE to queue starting at FIRST.
+/* Add NODE to queue starting at FIRST.
The queue is linked via AUX pointers and terminated by pointer to 1. */
static void
Notes on the different layout strategies
* Embeddable vectors (vec<T, A, vl_embed>)
-
+
These vectors are suitable to be embedded in other data
structures so that they can be pre-allocated in a contiguous
memory block.
gcc_assert (vtbl_mangled_name_types->length() ==
vtbl_mangled_name_ids->length());
-
+
if (vtbl_find_mangled_name (class_type) == NULL_TREE)
{
if (TREE_CODE (rhs) == ADDR_EXPR
|| TREE_CODE (rhs) == MEM_REF)
*mem_ref_depth = *mem_ref_depth + 1;
-
+
if (TREE_CODE (rhs) == COMPONENT_REF)
{
while (TREE_CODE (TREE_OPERAND (rhs, 0)) == COMPONENT_REF)
}
/* Multiply Op1 by Op2. If HIGH is set, only the upper half of the
- result is returned.
+ result is returned.
If HIGH is not set, throw away the upper half after the check is
made to see if it overflows. Unfortunately there is no better way
unsigned int, unsigned int);
unsigned int bitreverse_large (HOST_WIDE_INT *, const HOST_WIDE_INT *,
unsigned int, unsigned int);
-
+
unsigned int lshift_large (HOST_WIDE_INT *, const HOST_WIDE_INT *,
unsigned int, unsigned int, unsigned int);
unsigned int lrshift_large (HOST_WIDE_INT *, const HOST_WIDE_INT *,