Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
dc478a5d
Commit
dc478a5d
authored
Aug 29, 2000
by
Kazu Hirata
Committed by
Jeff Law
Aug 29, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* tree.c: Fix formatting.
From-SVN: r36036
parent
abf9af02
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
30 deletions
+35
-30
gcc/ChangeLog
+2
-0
gcc/tree.c
+33
-30
No files found.
gcc/ChangeLog
View file @
dc478a5d
2000-08-28 Kazu Hirata <kazu@hxi.com>
2000-08-28 Kazu Hirata <kazu@hxi.com>
* tree.c: Fix formatting.
* xcoffout.c: Fix formatting.
* xcoffout.c: Fix formatting.
2000-08-28 Jason Merrill <jason@redhat.com>
2000-08-28 Jason Merrill <jason@redhat.com>
...
...
gcc/tree.c
View file @
dc478a5d
...
@@ -19,7 +19,6 @@ along with GNU CC; see the file COPYING. If not, write to
...
@@ -19,7 +19,6 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
Boston, MA 02111-1307, USA. */
/* This file contains the low level primitives for operating on tree nodes,
/* This file contains the low level primitives for operating on tree nodes,
including allocation, list operations, interning of identifiers,
including allocation, list operations, interning of identifiers,
construction of data type nodes and statement nodes,
construction of data type nodes and statement nodes,
...
@@ -211,8 +210,8 @@ typedef enum
...
@@ -211,8 +210,8 @@ typedef enum
all_kinds
all_kinds
}
tree_node_kind
;
}
tree_node_kind
;
int
tree_node_counts
[(
int
)
all_kinds
];
int
tree_node_counts
[(
int
)
all_kinds
];
int
tree_node_sizes
[(
int
)
all_kinds
];
int
tree_node_sizes
[(
int
)
all_kinds
];
int
id_string_size
=
0
;
int
id_string_size
=
0
;
static
const
char
*
const
tree_node_kind_names
[]
=
{
static
const
char
*
const
tree_node_kind_names
[]
=
{
...
@@ -1047,8 +1046,8 @@ make_node (code)
...
@@ -1047,8 +1046,8 @@ make_node (code)
memset
((
PTR
)
t
,
0
,
length
);
memset
((
PTR
)
t
,
0
,
length
);
#ifdef GATHER_STATISTICS
#ifdef GATHER_STATISTICS
tree_node_counts
[(
int
)
kind
]
++
;
tree_node_counts
[(
int
)
kind
]
++
;
tree_node_sizes
[(
int
)
kind
]
+=
length
;
tree_node_sizes
[(
int
)
kind
]
+=
length
;
#endif
#endif
TREE_SET_CODE
(
t
,
code
);
TREE_SET_CODE
(
t
,
code
);
...
@@ -1279,14 +1278,15 @@ get_identifier (text)
...
@@ -1279,14 +1278,15 @@ get_identifier (text)
hi
&=
(
1
<<
HASHBITS
)
-
1
;
hi
&=
(
1
<<
HASHBITS
)
-
1
;
hi
%=
MAX_HASH_TABLE
;
hi
%=
MAX_HASH_TABLE
;
/* Search table for identifier */
/* Search table for identifier
.
*/
for
(
idp
=
hash_table
[
hi
];
idp
;
idp
=
TREE_CHAIN
(
idp
))
for
(
idp
=
hash_table
[
hi
];
idp
;
idp
=
TREE_CHAIN
(
idp
))
if
(
IDENTIFIER_LENGTH
(
idp
)
==
len
if
(
IDENTIFIER_LENGTH
(
idp
)
==
len
&&
IDENTIFIER_POINTER
(
idp
)[
0
]
==
text
[
0
]
&&
IDENTIFIER_POINTER
(
idp
)[
0
]
==
text
[
0
]
&&
!
bcmp
(
IDENTIFIER_POINTER
(
idp
),
text
,
len
))
&&
!
bcmp
(
IDENTIFIER_POINTER
(
idp
),
text
,
len
))
return
idp
;
/* <-- return if found */
/* Return if found. */
return
idp
;
/* Not found; optionally warn about a similar identifier */
/* Not found; optionally warn about a similar identifier
.
*/
if
(
warn_id_clash
&&
do_identifier_warnings
&&
len
>=
id_clash_len
)
if
(
warn_id_clash
&&
do_identifier_warnings
&&
len
>=
id_clash_len
)
for
(
idp
=
hash_table
[
hi
];
idp
;
idp
=
TREE_CHAIN
(
idp
))
for
(
idp
=
hash_table
[
hi
];
idp
;
idp
=
TREE_CHAIN
(
idp
))
if
(
!
strncmp
(
IDENTIFIER_POINTER
(
idp
),
text
,
id_clash_len
))
if
(
!
strncmp
(
IDENTIFIER_POINTER
(
idp
),
text
,
id_clash_len
))
...
@@ -1345,7 +1345,7 @@ maybe_get_identifier (text)
...
@@ -1345,7 +1345,7 @@ maybe_get_identifier (text)
hi
&=
(
1
<<
HASHBITS
)
-
1
;
hi
&=
(
1
<<
HASHBITS
)
-
1
;
hi
%=
MAX_HASH_TABLE
;
hi
%=
MAX_HASH_TABLE
;
/* Search table for identifier */
/* Search table for identifier
.
*/
for
(
idp
=
hash_table
[
hi
];
idp
;
idp
=
TREE_CHAIN
(
idp
))
for
(
idp
=
hash_table
[
hi
];
idp
;
idp
=
TREE_CHAIN
(
idp
))
if
(
IDENTIFIER_LENGTH
(
idp
)
==
len
if
(
IDENTIFIER_LENGTH
(
idp
)
==
len
&&
IDENTIFIER_POINTER
(
idp
)[
0
]
==
text
[
0
]
&&
IDENTIFIER_POINTER
(
idp
)[
0
]
==
text
[
0
]
...
@@ -1448,11 +1448,11 @@ real_value_from_int_cst (type, i)
...
@@ -1448,11 +1448,11 @@ real_value_from_int_cst (type, i)
{
{
REAL_VALUE_TYPE
e
;
REAL_VALUE_TYPE
e
;
d
=
(
double
)
(
~
TREE_INT_CST_HIGH
(
i
));
d
=
(
double
)
(
~
TREE_INT_CST_HIGH
(
i
));
e
=
((
double
)
((
HOST_WIDE_INT
)
1
<<
(
HOST_BITS_PER_WIDE_INT
/
2
))
e
=
((
double
)
((
HOST_WIDE_INT
)
1
<<
(
HOST_BITS_PER_WIDE_INT
/
2
))
*
(
double
)
((
HOST_WIDE_INT
)
1
<<
(
HOST_BITS_PER_WIDE_INT
/
2
)));
*
(
double
)
((
HOST_WIDE_INT
)
1
<<
(
HOST_BITS_PER_WIDE_INT
/
2
)));
d
*=
e
;
d
*=
e
;
e
=
(
double
)
(
~
TREE_INT_CST_LOW
(
i
));
e
=
(
double
)
(
~
TREE_INT_CST_LOW
(
i
));
d
+=
e
;
d
+=
e
;
d
=
(
-
d
-
1
.
0
);
d
=
(
-
d
-
1
.
0
);
}
}
...
@@ -1476,7 +1476,7 @@ real_value_from_int_cst (type, i)
...
@@ -1476,7 +1476,7 @@ real_value_from_int_cst (type, i)
struct
brfic_args
struct
brfic_args
{
{
tree
type
;
/* Input: type to conver to. */
tree
type
;
/* Input: type to conver to. */
tree
i
;
/* Input: operand to convert */
tree
i
;
/* Input: operand to convert
.
*/
REAL_VALUE_TYPE
d
;
/* Output: floating point value. */
REAL_VALUE_TYPE
d
;
/* Output: floating point value. */
};
};
...
@@ -1675,7 +1675,7 @@ integer_all_onesp (expr)
...
@@ -1675,7 +1675,7 @@ integer_all_onesp (expr)
uns
=
TREE_UNSIGNED
(
TREE_TYPE
(
expr
));
uns
=
TREE_UNSIGNED
(
TREE_TYPE
(
expr
));
if
(
!
uns
)
if
(
!
uns
)
return
(
TREE_INT_CST_LOW
(
expr
)
==
~
(
unsigned
HOST_WIDE_INT
)
0
return
(
TREE_INT_CST_LOW
(
expr
)
==
~
(
unsigned
HOST_WIDE_INT
)
0
&&
TREE_INT_CST_HIGH
(
expr
)
==
-
1
);
&&
TREE_INT_CST_HIGH
(
expr
)
==
-
1
);
/* Note that using TYPE_PRECISION here is wrong. We care about the
/* Note that using TYPE_PRECISION here is wrong. We care about the
...
@@ -1698,7 +1698,7 @@ integer_all_onesp (expr)
...
@@ -1698,7 +1698,7 @@ integer_all_onesp (expr)
else
else
high_value
=
((
HOST_WIDE_INT
)
1
<<
shift_amount
)
-
1
;
high_value
=
((
HOST_WIDE_INT
)
1
<<
shift_amount
)
-
1
;
return
(
TREE_INT_CST_LOW
(
expr
)
==
~
(
unsigned
HOST_WIDE_INT
)
0
return
(
TREE_INT_CST_LOW
(
expr
)
==
~
(
unsigned
HOST_WIDE_INT
)
0
&&
TREE_INT_CST_HIGH
(
expr
)
==
high_value
);
&&
TREE_INT_CST_HIGH
(
expr
)
==
high_value
);
}
}
else
else
...
@@ -2050,7 +2050,8 @@ chainon (op1, op2)
...
@@ -2050,7 +2050,8 @@ chainon (op1, op2)
#endif
#endif
return
op1
;
return
op1
;
}
}
else
return
op2
;
else
return
op2
;
}
}
/* Return the last node in a chain of nodes (chained through TREE_CHAIN). */
/* Return the last node in a chain of nodes (chained through TREE_CHAIN). */
...
@@ -3168,7 +3169,6 @@ stabilize_reference (ref)
...
@@ -3168,7 +3169,6 @@ stabilize_reference (ref)
ref
)));
ref
)));
break
;
break
;
/* If arg isn't a kind of lvalue we recognize, make no change.
/* If arg isn't a kind of lvalue we recognize, make no change.
Caller should recognize the error for an invalid lvalue. */
Caller should recognize the error for an invalid lvalue. */
default
:
default
:
...
@@ -3388,8 +3388,8 @@ build1 (code, type, node)
...
@@ -3388,8 +3388,8 @@ build1 (code, type, node)
memset
((
PTR
)
t
,
0
,
sizeof
(
struct
tree_common
));
memset
((
PTR
)
t
,
0
,
sizeof
(
struct
tree_common
));
#ifdef GATHER_STATISTICS
#ifdef GATHER_STATISTICS
tree_node_counts
[(
int
)
kind
]
++
;
tree_node_counts
[(
int
)
kind
]
++
;
tree_node_sizes
[(
int
)
kind
]
+=
length
;
tree_node_sizes
[(
int
)
kind
]
+=
length
;
#endif
#endif
TREE_SET_CODE
(
t
,
code
);
TREE_SET_CODE
(
t
,
code
);
...
@@ -3700,7 +3700,8 @@ valid_machine_attribute (attr_name, attr_args, decl, type)
...
@@ -3700,7 +3700,8 @@ valid_machine_attribute (attr_name, attr_args, decl, type)
#ifdef VALID_MACHINE_TYPE_ATTRIBUTE
#ifdef VALID_MACHINE_TYPE_ATTRIBUTE
if
(
validated
)
if
(
validated
)
/* Don't apply the attribute to both the decl and the type. */
;
/* Don't apply the attribute to both the decl and the type. */
;
else
if
(
VALID_MACHINE_TYPE_ATTRIBUTE
(
type
,
type_attr_list
,
attr_name
,
else
if
(
VALID_MACHINE_TYPE_ATTRIBUTE
(
type
,
type_attr_list
,
attr_name
,
attr_args
))
attr_args
))
{
{
...
@@ -4037,7 +4038,7 @@ static unsigned int
...
@@ -4037,7 +4038,7 @@ static unsigned int
type_hash_hash
(
item
)
type_hash_hash
(
item
)
const
void
*
item
;
const
void
*
item
;
{
{
return
((
const
struct
type_hash
*
)
item
)
->
hash
;
return
((
const
struct
type_hash
*
)
item
)
->
hash
;
}
}
/* Look in the type hash table for a type isomorphic to TYPE.
/* Look in the type hash table for a type isomorphic to TYPE.
...
@@ -4078,7 +4079,7 @@ type_hash_add (hashcode, type)
...
@@ -4078,7 +4079,7 @@ type_hash_add (hashcode, type)
h
->
hash
=
hashcode
;
h
->
hash
=
hashcode
;
h
->
type
=
type
;
h
->
type
=
type
;
loc
=
htab_find_slot_with_hash
(
type_hash_table
,
h
,
hashcode
,
INSERT
);
loc
=
htab_find_slot_with_hash
(
type_hash_table
,
h
,
hashcode
,
INSERT
);
*
(
struct
type_hash
**
)
loc
=
h
;
*
(
struct
type_hash
**
)
loc
=
h
;
}
}
/* Given TYPE, and HASHCODE its hash code, return the canonical
/* Given TYPE, and HASHCODE its hash code, return the canonical
...
@@ -4132,7 +4133,7 @@ mark_hash_entry (entry, param)
...
@@ -4132,7 +4133,7 @@ mark_hash_entry (entry, param)
void
**
entry
;
void
**
entry
;
void
*
param
ATTRIBUTE_UNUSED
;
void
*
param
ATTRIBUTE_UNUSED
;
{
{
struct
type_hash
*
p
=
*
(
struct
type_hash
**
)
entry
;
struct
type_hash
*
p
=
*
(
struct
type_hash
**
)
entry
;
ggc_mark_tree
(
p
->
type
);
ggc_mark_tree
(
p
->
type
);
...
@@ -4341,7 +4342,7 @@ tree_int_cst_msb (t)
...
@@ -4341,7 +4342,7 @@ tree_int_cst_msb (t)
rshift_double
(
TREE_INT_CST_LOW
(
t
),
TREE_INT_CST_HIGH
(
t
),
prec
,
rshift_double
(
TREE_INT_CST_LOW
(
t
),
TREE_INT_CST_HIGH
(
t
),
prec
,
2
*
HOST_BITS_PER_WIDE_INT
,
&
l
,
&
h
,
0
);
2
*
HOST_BITS_PER_WIDE_INT
,
&
l
,
&
h
,
0
);
return
(
l
&
1
)
==
1
;
return
(
l
&
1
)
==
1
;
}
}
/* Return an indication of the sign of the integer constant T.
/* Return an indication of the sign of the integer constant T.
The return value is -1 if T < 0, 0 if T == 0, and 1 if T > 0.
The return value is -1 if T < 0, 0 if T == 0, and 1 if T > 0.
...
@@ -5394,15 +5395,15 @@ clean_symbol_name (p)
...
@@ -5394,15 +5395,15 @@ clean_symbol_name (p)
char
*
p
;
char
*
p
;
{
{
for
(;
*
p
;
p
++
)
for
(;
*
p
;
p
++
)
if
(
!
(
ISDIGIT
(
*
p
)
if
(
!
(
ISDIGIT
(
*
p
)
#ifndef NO_DOLLAR_IN_LABEL
/* this for `$'; unlikely, but... -- kr */
#ifndef NO_DOLLAR_IN_LABEL
/* this for `$'; unlikely, but... -- kr */
||
*
p
==
'$'
||
*
p
==
'$'
#endif
#endif
#ifndef NO_DOT_IN_LABEL
/* this for `.'; unlikely, but... */
#ifndef NO_DOT_IN_LABEL
/* this for `.'; unlikely, but... */
||
*
p
==
'.'
||
*
p
==
'.'
#endif
#endif
||
ISUPPER
(
*
p
)
||
ISUPPER
(
*
p
)
||
ISLOWER
(
*
p
)))
||
ISLOWER
(
*
p
)))
*
p
=
'_'
;
*
p
=
'_'
;
}
}
...
@@ -5511,7 +5512,7 @@ get_set_constructor_bits (init, buffer, bit_size)
...
@@ -5511,7 +5512,7 @@ get_set_constructor_bits (init, buffer, bit_size)
if
(
lo_index
<
0
||
lo_index
>=
bit_size
if
(
lo_index
<
0
||
lo_index
>=
bit_size
||
hi_index
<
0
||
hi_index
>=
bit_size
)
||
hi_index
<
0
||
hi_index
>=
bit_size
)
abort
();
abort
();
for
(
;
lo_index
<=
hi_index
;
lo_index
++
)
for
(;
lo_index
<=
hi_index
;
lo_index
++
)
buffer
[
lo_index
]
=
1
;
buffer
[
lo_index
]
=
1
;
}
}
else
else
...
@@ -5546,7 +5547,7 @@ get_set_constructor_bytes (init, buffer, wd_size)
...
@@ -5546,7 +5547,7 @@ get_set_constructor_bytes (init, buffer, wd_size)
int
bit_size
=
wd_size
*
set_word_size
;
int
bit_size
=
wd_size
*
set_word_size
;
int
bit_pos
=
0
;
int
bit_pos
=
0
;
unsigned
char
*
bytep
=
buffer
;
unsigned
char
*
bytep
=
buffer
;
char
*
bit_buffer
=
(
char
*
)
alloca
(
bit_size
);
char
*
bit_buffer
=
(
char
*
)
alloca
(
bit_size
);
tree
non_const_bits
=
get_set_constructor_bits
(
init
,
bit_buffer
,
bit_size
);
tree
non_const_bits
=
get_set_constructor_bits
(
init
,
bit_buffer
,
bit_size
);
for
(
i
=
0
;
i
<
wd_size
;
i
++
)
for
(
i
=
0
;
i
<
wd_size
;
i
++
)
...
@@ -5571,6 +5572,7 @@ get_set_constructor_bytes (init, buffer, wd_size)
...
@@ -5571,6 +5572,7 @@ get_set_constructor_bytes (init, buffer, wd_size)
#if defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 2007)
#if defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 2007)
/* Complain that the tree code of NODE does not match the expected CODE.
/* Complain that the tree code of NODE does not match the expected CODE.
FILE, LINE, and FUNCTION are of the caller. */
FILE, LINE, and FUNCTION are of the caller. */
void
void
tree_check_failed
(
node
,
code
,
file
,
line
,
function
)
tree_check_failed
(
node
,
code
,
file
,
line
,
function
)
const
tree
node
;
const
tree
node
;
...
@@ -5586,6 +5588,7 @@ tree_check_failed (node, code, file, line, function)
...
@@ -5586,6 +5588,7 @@ tree_check_failed (node, code, file, line, function)
/* Similar to above, except that we check for a class of tree
/* Similar to above, except that we check for a class of tree
code, given in CL. */
code, given in CL. */
void
void
tree_class_check_failed
(
node
,
cl
,
file
,
line
,
function
)
tree_class_check_failed
(
node
,
cl
,
file
,
line
,
function
)
const
tree
node
;
const
tree
node
;
...
@@ -5602,9 +5605,9 @@ tree_class_check_failed (node, cl, file, line, function)
...
@@ -5602,9 +5605,9 @@ tree_class_check_failed (node, cl, file, line, function)
#endif
/* ENABLE_TREE_CHECKING */
#endif
/* ENABLE_TREE_CHECKING */
/* For a new vector type node T, build the information necessary for
/* For a new vector type node T, build the information necessary for
debuggint output. */
debuggint output. */
static
void
static
void
finish_vector_type
(
t
)
finish_vector_type
(
t
)
tree
t
;
tree
t
;
...
@@ -5776,7 +5779,7 @@ build_common_tree_nodes_2 (short_double)
...
@@ -5776,7 +5779,7 @@ build_common_tree_nodes_2 (short_double)
layout_type
(
complex_long_double_type_node
);
layout_type
(
complex_long_double_type_node
);
#ifdef BUILD_VA_LIST_TYPE
#ifdef BUILD_VA_LIST_TYPE
BUILD_VA_LIST_TYPE
(
va_list_type_node
);
BUILD_VA_LIST_TYPE
(
va_list_type_node
);
#else
#else
va_list_type_node
=
ptr_type_node
;
va_list_type_node
=
ptr_type_node
;
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment