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
6aa489b4
Commit
6aa489b4
authored
Mar 24, 1999
by
Nick Clifton
Committed by
Nick Clifton
Mar 24, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Accept both 'model' and '__model__' as attribute names.
Ref: CR 100400-990301-CR-1 From-SVN: r25948
parent
d676f55c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
28 deletions
+54
-28
gcc/ChangeLog
+7
-0
gcc/config/m32r/m32r.c
+47
-28
No files found.
gcc/ChangeLog
View file @
6aa489b4
Wed
Mar
24
15
:
44
:
12
1999
Nick
Clifton
<
nickc
@cygnus
.
com
>
*
config
/
m32r
/
m32r
.
c
(
init_idents
)
:
Accept
both
NAME
and
__NAME__
versions
of
attribute
names
and
values
.
(
m32r_valid_machine_decl_attribute
)
:
Ditto
.
(
m32r_encode_section_info
)
:
Ditto
.
Wed
Mar
24
21
:
42
:
15
1999
J
"orn Rennecke <amylaar@cygnus.co.uk>
Wed
Mar
24
21
:
42
:
15
1999
J
"orn Rennecke <amylaar@cygnus.co.uk>
* reload1.c (choose_reload_regs): If output-reloading for a
* reload1.c (choose_reload_regs): If output-reloading for a
...
...
gcc/config/m32r/m32r.c
View file @
6aa489b4
...
@@ -190,25 +190,6 @@ init_reg_tables ()
...
@@ -190,25 +190,6 @@ init_reg_tables ()
}
}
}
}
static
tree
interrupt_ident
;
static
tree
model_ident
;
static
tree
small_ident
;
static
tree
medium_ident
;
static
tree
large_ident
;
static
void
init_idents
()
{
if
(
interrupt_ident
==
0
)
{
interrupt_ident
=
get_identifier
(
"interrupt"
);
model_ident
=
get_identifier
(
"model"
);
small_ident
=
get_identifier
(
"small"
);
medium_ident
=
get_identifier
(
"medium"
);
large_ident
=
get_identifier
(
"large"
);
}
}
/* M32R specific attribute support.
/* M32R specific attribute support.
interrupt - for interrupt functions
interrupt - for interrupt functions
...
@@ -222,6 +203,35 @@ init_idents ()
...
@@ -222,6 +203,35 @@ init_idents ()
Grep for MODEL in m32r.h for more info.
Grep for MODEL in m32r.h for more info.
*/
*/
static
tree
interrupt_ident1
;
static
tree
interrupt_ident2
;
static
tree
model_ident1
;
static
tree
model_ident2
;
static
tree
small_ident1
;
static
tree
small_ident2
;
static
tree
medium_ident1
;
static
tree
medium_ident2
;
static
tree
large_ident1
;
static
tree
large_ident2
;
static
void
init_idents
PROTO
((
void
))
{
if
(
interrupt_ident1
==
0
)
{
interrupt_ident1
=
get_identifier
(
"interrupt"
);
interrupt_ident2
=
get_identifier
(
"__interrupt__"
);
model_ident1
=
get_identifier
(
"model"
);
model_ident2
=
get_identifier
(
"__model__"
);
small_ident1
=
get_identifier
(
"small"
);
small_ident2
=
get_identifier
(
"__small__"
);
medium_ident1
=
get_identifier
(
"medium"
);
medium_ident2
=
get_identifier
(
"__medium__"
);
large_ident1
=
get_identifier
(
"large"
);
large_ident2
=
get_identifier
(
"__large__"
);
}
}
/* Return nonzero if IDENTIFIER is a valid decl attribute. */
/* Return nonzero if IDENTIFIER is a valid decl attribute. */
int
int
...
@@ -233,15 +243,20 @@ m32r_valid_machine_decl_attribute (type, attributes, identifier, args)
...
@@ -233,15 +243,20 @@ m32r_valid_machine_decl_attribute (type, attributes, identifier, args)
{
{
init_idents
();
init_idents
();
if
(
identifier
==
interrupt_ident
if
((
identifier
==
interrupt_ident1
||
identifier
==
interrupt_ident2
)
&&
list_length
(
args
)
==
0
)
&&
list_length
(
args
)
==
0
)
return
1
;
return
1
;
if
(
identifier
==
model_ident
if
((
identifier
==
model_ident1
||
identifier
==
model_ident2
)
&&
list_length
(
args
)
==
1
&&
list_length
(
args
)
==
1
&&
(
TREE_VALUE
(
args
)
==
small_ident
&&
(
TREE_VALUE
(
args
)
==
small_ident1
||
TREE_VALUE
(
args
)
==
medium_ident
||
TREE_VALUE
(
args
)
==
small_ident2
||
TREE_VALUE
(
args
)
==
large_ident
))
||
TREE_VALUE
(
args
)
==
medium_ident1
||
TREE_VALUE
(
args
)
==
medium_ident2
||
TREE_VALUE
(
args
)
==
large_ident1
||
TREE_VALUE
(
args
)
==
large_ident2
))
return
1
;
return
1
;
return
0
;
return
0
;
...
@@ -380,13 +395,17 @@ m32r_encode_section_info (decl)
...
@@ -380,13 +395,17 @@ m32r_encode_section_info (decl)
{
{
if
(
model
)
if
(
model
)
{
{
init_idents
()
;
tree
id
;
if
(
TREE_VALUE
(
TREE_VALUE
(
model
))
==
small_ident
)
init_idents
();
id
=
TREE_VALUE
(
TREE_VALUE
(
model
));
if
(
id
==
small_ident1
||
id
==
small_ident2
)
;
/* don't mark the symbol specially */
;
/* don't mark the symbol specially */
else
if
(
TREE_VALUE
(
TREE_VALUE
(
model
))
==
medium_ident
)
else
if
(
id
==
medium_ident1
||
id
==
medium_ident2
)
prefix
=
MEDIUM_FLAG_CHAR
;
prefix
=
MEDIUM_FLAG_CHAR
;
else
if
(
TREE_VALUE
(
TREE_VALUE
(
model
))
==
large_ident
)
else
if
(
id
==
large_ident1
||
id
==
large_ident2
)
prefix
=
LARGE_FLAG_CHAR
;
prefix
=
LARGE_FLAG_CHAR
;
else
else
abort
();
/* shouldn't happen */
abort
();
/* shouldn't happen */
...
...
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