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
742e43a2
Commit
742e43a2
authored
Mar 03, 1993
by
Per Bothner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Define and use new function build_range_type.
From-SVN: r3624
parent
c8d6697c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
10 deletions
+25
-10
gcc/tree.c
+25
-10
No files found.
gcc/tree.c
View file @
742e43a2
...
...
@@ -2688,20 +2688,25 @@ build_index_type (maxval)
return
itype
;
}
/* Just like build_index_type, but takes lowval and highval instead
of just highval (maxval). */
/* Create a range of some discrete type TYPE (an INTEGER_TYPE,
ENUMERAL_TYPE, BOOLEAN_TYPE, or VHAR_TYPE), with
low bound LOWVAL and high bound HIGHVAL.
if TYPE==NULL_TREE, sizetype is used. */
tree
build_
index_2_type
(
lowval
,
highval
)
tree
lowval
,
highval
;
build_
range_type
(
type
,
lowval
,
highval
)
tree
type
,
lowval
,
highval
;
{
register
tree
itype
=
make_node
(
INTEGER_TYPE
);
TYPE_PRECISION
(
itype
)
=
TYPE_PRECISION
(
sizetype
);
TYPE_MIN_VALUE
(
itype
)
=
convert
(
sizetype
,
lowval
);
TYPE_MAX_VALUE
(
itype
)
=
convert
(
sizetype
,
highval
);
TYPE_MODE
(
itype
)
=
TYPE_MODE
(
sizetype
);
TYPE_SIZE
(
itype
)
=
TYPE_SIZE
(
sizetype
);
TYPE_ALIGN
(
itype
)
=
TYPE_ALIGN
(
sizetype
);
TREE_TYPE
(
itype
)
=
type
;
if
(
type
==
NULL_TREE
)
type
=
sizetype
;
TYPE_PRECISION
(
itype
)
=
TYPE_PRECISION
(
type
);
TYPE_MIN_VALUE
(
itype
)
=
convert
(
type
,
lowval
);
TYPE_MAX_VALUE
(
itype
)
=
convert
(
type
,
highval
);
TYPE_MODE
(
itype
)
=
TYPE_MODE
(
type
);
TYPE_SIZE
(
itype
)
=
TYPE_SIZE
(
type
);
TYPE_ALIGN
(
itype
)
=
TYPE_ALIGN
(
type
);
if
((
TREE_CODE
(
lowval
)
==
INTEGER_CST
)
&&
(
TREE_CODE
(
highval
)
==
INTEGER_CST
))
{
...
...
@@ -2714,6 +2719,16 @@ build_index_2_type (lowval,highval)
return
itype
;
}
/* Just like build_index_type, but takes lowval and highval instead
of just highval (maxval). */
tree
build_index_2_type
(
lowval
,
highval
)
tree
lowval
,
highval
;
{
return
build_range_type
(
NULL_TREE
,
lowval
,
highval
);
}
/* Return nonzero iff ITYPE1 and ITYPE2 are equal (in the LISP sense).
Needed because when index types are not hashed, equal index types
built at different times appear distinct, even though structurally,
...
...
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