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
12266a61
Commit
12266a61
authored
Dec 31, 1995
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
({bc_,}make_decl_rtl): Don't look at DECL_REGISTER for functions.
From-SVN: r10912
parent
f843649d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
18 deletions
+20
-18
gcc/varasm.c
+20
-18
No files found.
gcc/varasm.c
View file @
12266a61
...
...
@@ -348,9 +348,7 @@ bc_make_decl_rtl (decl, asmspec, top_level)
if
(
DECL_RTL
(
decl
)
==
0
)
{
/* Print an error message for register variables. */
if
(
DECL_REGISTER
(
decl
)
&&
TREE_CODE
(
decl
)
==
FUNCTION_DECL
)
error
(
"function declared `register'"
);
else
if
(
DECL_REGISTER
(
decl
))
if
(
DECL_REGISTER
(
decl
))
error
(
"global register variables not supported in the interpreter"
);
/* Handle ordinary static variables and functions. */
...
...
@@ -492,30 +490,34 @@ make_decl_rtl (decl, asmspec, top_level)
DECL_RTL
(
decl
)
=
0
;
/* First detect errors in declaring global registers. */
if
(
DECL_REGISTER
(
decl
)
&&
reg_number
==
-
1
)
if
(
TREE_CODE
(
decl
)
!=
FUNCTION_DECL
&&
DECL_REGISTER
(
decl
)
&&
reg_number
==
-
1
)
error_with_decl
(
decl
,
"register name not specified for `%s'"
);
else
if
(
DECL_REGISTER
(
decl
)
&&
reg_number
<
0
)
else
if
(
TREE_CODE
(
decl
)
!=
FUNCTION_DECL
&&
DECL_REGISTER
(
decl
)
&&
reg_number
<
0
)
error_with_decl
(
decl
,
"invalid register name for `%s'"
);
else
if
((
reg_number
>=
0
||
reg_number
==
-
3
)
&&
!
DECL_REGISTER
(
decl
))
else
if
((
reg_number
>=
0
||
reg_number
==
-
3
)
&&
(
TREE_CODE
(
decl
)
==
FUNCTION_DECL
&&
!
DECL_REGISTER
(
decl
)))
error_with_decl
(
decl
,
"register name given for non-register variable `%s'"
);
else
if
(
DECL_REGISTER
(
decl
)
&&
TREE_CODE
(
decl
)
==
FUNCTION_DECL
)
error
(
"function declared `register'"
);
else
if
(
DECL_REGISTER
(
decl
)
&&
TYPE_MODE
(
TREE_TYPE
(
decl
))
==
BLKmode
)
error_with_decl
(
decl
,
"data type of `%s' isn't suitable for a register"
);
else
if
(
DECL_REGISTER
(
decl
)
&&
!
HARD_REGNO_MODE_OK
(
reg_number
,
TYPE_MODE
(
TREE_TYPE
(
decl
))))
error_with_decl
(
decl
,
"register number for `%s' isn't suitable for the data type"
);
else
if
(
TREE_CODE
(
decl
)
!=
FUNCTION_DECL
&&
DECL_REGISTER
(
decl
)
&&
TYPE_MODE
(
TREE_TYPE
(
decl
))
==
BLKmode
)
error_with_decl
(
decl
,
"data type of `%s' isn't suitable for a register"
);
else
if
(
TREE_CODE
(
decl
)
!=
FUNCTION_DECL
&&
DECL_REGISTER
(
decl
)
&&
!
HARD_REGNO_MODE_OK
(
reg_number
,
TYPE_MODE
(
TREE_TYPE
(
decl
))))
error_with_decl
(
decl
,
"register number for `%s' isn't suitable for data type"
);
/* Now handle properly declared static register variables. */
else
if
(
DECL_REGISTER
(
decl
))
else
if
(
TREE_CODE
(
decl
)
!=
FUNCTION_DECL
&&
DECL_REGISTER
(
decl
))
{
int
nregs
;
#if 0 /* yylex should print the warning for this */
if (pedantic)
pedwarn ("ANSI C forbids global register variables");
#endif
if
(
DECL_INITIAL
(
decl
)
!=
0
&&
top_level
)
{
DECL_INITIAL
(
decl
)
=
0
;
...
...
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