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
83b853c9
Commit
83b853c9
authored
Apr 17, 1997
by
Jason Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
From-SVN: r13909
parent
fc990856
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
10 deletions
+36
-10
gcc/expr.c
+7
-4
gcc/tree.c
+29
-6
No files found.
gcc/expr.c
View file @
83b853c9
...
@@ -5208,10 +5208,13 @@ expand_expr (exp, target, tmode, modifier)
...
@@ -5208,10 +5208,13 @@ expand_expr (exp, target, tmode, modifier)
}
}
case
RTL_EXPR
:
case
RTL_EXPR
:
if
(
RTL_EXPR_SEQUENCE
(
exp
)
==
const0_rtx
)
if
(
RTL_EXPR_SEQUENCE
(
exp
))
abort
();
{
emit_insns
(
RTL_EXPR_SEQUENCE
(
exp
));
if
(
RTL_EXPR_SEQUENCE
(
exp
)
==
const0_rtx
)
RTL_EXPR_SEQUENCE
(
exp
)
=
const0_rtx
;
abort
();
emit_insns
(
RTL_EXPR_SEQUENCE
(
exp
));
RTL_EXPR_SEQUENCE
(
exp
)
=
const0_rtx
;
}
preserve_rtl_expr_result
(
RTL_EXPR_RTL
(
exp
));
preserve_rtl_expr_result
(
RTL_EXPR_RTL
(
exp
));
free_temps_for_rtl_expr
(
exp
);
free_temps_for_rtl_expr
(
exp
);
return
RTL_EXPR_RTL
(
exp
);
return
RTL_EXPR_RTL
(
exp
);
...
...
gcc/tree.c
View file @
83b853c9
...
@@ -2138,19 +2138,42 @@ int_size_in_bytes (type)
...
@@ -2138,19 +2138,42 @@ int_size_in_bytes (type)
}
}
/* Return, as a tree node, the number of elements for TYPE (which is an
/* Return, as a tree node, the number of elements for TYPE (which is an
ARRAY_TYPE) minus one. This counts only elements of the top array. */
ARRAY_TYPE) minus one. This counts only elements of the top array.
Don't let any SAVE_EXPRs escape; if we are called as part of a cleanup
action, they would get unsaved. */
tree
tree
array_type_nelts
(
type
)
array_type_nelts
(
type
)
tree
type
;
tree
type
;
{
{
tree
index_type
=
TYPE_DOMAIN
(
type
);
tree
index_type
=
TYPE_DOMAIN
(
type
);
tree
min
=
TYPE_MIN_VALUE
(
index_type
);
tree
max
=
TYPE_MAX_VALUE
(
index_type
);
if
(
!
TREE_CONSTANT
(
min
))
{
STRIP_NOPS
(
min
);
if
(
TREE_CODE
(
min
)
==
SAVE_EXPR
)
min
=
build
(
RTL_EXPR
,
TREE_TYPE
(
TYPE_MIN_VALUE
(
index_type
)),
0
,
SAVE_EXPR_RTL
(
min
));
else
min
=
TYPE_MIN_VALUE
(
index_type
);
}
if
(
!
TREE_CONSTANT
(
max
))
{
STRIP_NOPS
(
max
);
if
(
TREE_CODE
(
max
)
==
SAVE_EXPR
)
max
=
build
(
RTL_EXPR
,
TREE_TYPE
(
TYPE_MAX_VALUE
(
index_type
)),
0
,
SAVE_EXPR_RTL
(
max
));
else
max
=
TYPE_MAX_VALUE
(
index_type
);
}
return
(
integer_zerop
(
TYPE_MIN_VALUE
(
index_type
))
return
(
integer_zerop
(
min
)
?
TYPE_MAX_VALUE
(
index_type
)
?
max
:
fold
(
build
(
MINUS_EXPR
,
TREE_TYPE
(
TYPE_MAX_VALUE
(
index_type
)),
:
fold
(
build
(
MINUS_EXPR
,
TREE_TYPE
(
max
),
max
,
min
)));
TYPE_MAX_VALUE
(
index_type
),
TYPE_MIN_VALUE
(
index_type
))));
}
}
/* Return nonzero if arg is static -- a reference to an object in
/* Return nonzero if arg is static -- a reference to an object in
...
...
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