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
b31a5831
Commit
b31a5831
authored
May 07, 1992
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r933
parent
5ace4ac4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
5 deletions
+32
-5
gcc/genattrtab.c
+32
-5
No files found.
gcc/genattrtab.c
View file @
b31a5831
...
...
@@ -690,7 +690,7 @@ attr_string (str, len)
return
h
->
u
.
str
;
/* <-- return if found. */
/* Not found; create a permanent copy and add it to the hash table. */
new_str
=
(
char
*
)
xmalloc
(
len
+
1
);
new_str
=
(
char
*
)
obstack_alloc
(
hash_obstack
,
len
+
1
);
bcopy
(
str
,
new_str
,
len
);
new_str
[
len
]
=
'\0'
;
attr_hash_add_string
(
hashcode
,
new_str
);
...
...
@@ -838,6 +838,12 @@ check_attr_test (exp, is_const)
so expressions using it can be permanent too. */
exp
=
attr_eq
(
XSTR
(
exp
,
0
),
XSTR
(
exp
,
1
));
/* It shouldn't be possible to simplfy the value given to a
constant attribute, so don't expand this until it's time to
write the test expression. */
if
(
attr
->
is_const
)
RTX_UNCHANGING_P
(
exp
)
=
1
;
if
(
attr
->
is_numeric
)
{
for
(
p
=
XSTR
(
exp
,
1
);
*
p
;
p
++
)
...
...
@@ -1698,6 +1704,11 @@ fill_attr (attr)
int
i
;
rtx
value
;
/* Don't fill constant attributes. The value is independent of
any particular insn. */
if
(
attr
->
is_const
)
return
;
for
(
id
=
defs
;
id
;
id
=
id
->
next
)
{
/* If no value is specified for this insn for this attribute, use the
...
...
@@ -2123,6 +2134,7 @@ compute_alternative_mask (exp, code)
rtx
exp
;
RTX_CODE
code
;
{
char
*
string
;
if
(
GET_CODE
(
exp
)
==
code
)
return
compute_alternative_mask
(
XEXP
(
exp
,
0
),
code
)
|
compute_alternative_mask
(
XEXP
(
exp
,
1
),
code
);
...
...
@@ -2130,14 +2142,18 @@ compute_alternative_mask (exp, code)
else
if
(
code
==
AND
&&
GET_CODE
(
exp
)
==
NOT
&&
GET_CODE
(
XEXP
(
exp
,
0
))
==
EQ_ATTR
&&
XSTR
(
XEXP
(
exp
,
0
),
0
)
==
alternative_name
)
return
1
<<
atoi
(
XSTR
(
XEXP
(
exp
,
0
),
1
)
);
string
=
XSTR
(
XEXP
(
exp
,
0
),
1
);
else
if
(
code
==
IOR
&&
GET_CODE
(
exp
)
==
EQ_ATTR
&&
XSTR
(
exp
,
0
)
==
alternative_name
)
return
1
<<
atoi
(
XSTR
(
exp
,
1
)
);
string
=
XSTR
(
exp
,
1
);
else
return
0
;
if
(
string
[
1
]
==
0
)
return
1
<<
(
string
[
0
]
-
'0'
);
return
1
<<
atoi
(
string
);
}
/* Given I, a single-bit mask, return RTX to compare the `alternative'
...
...
@@ -3448,8 +3464,19 @@ write_test_expr (exp, in_comparison)
attr
=
find_attr
(
XSTR
(
exp
,
0
),
0
);
if
(
!
attr
)
abort
();
printf
(
"get_attr_%s (insn) == "
,
attr
->
name
);
write_attr_valueq
(
attr
,
XSTR
(
exp
,
1
));
/* Now is the time to expand the value of a constant attribute. */
if
(
attr
->
is_const
)
{
write_test_expr
(
evaluate_eq_attr
(
exp
,
attr
->
default_val
->
value
,
0
,
0
),
in_comparison
);
}
else
{
printf
(
"get_attr_%s (insn) == "
,
attr
->
name
);
write_attr_valueq
(
attr
,
XSTR
(
exp
,
1
));
}
break
;
/* See if an operand matches a predicate. */
...
...
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