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
dfac187e
Commit
dfac187e
authored
Oct 22, 1999
by
Bernd Schmidt
Committed by
Bernd Schmidt
Oct 22, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix register elimination problem
From-SVN: r30134
parent
b8c3c4f0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
1 deletions
+37
-1
gcc/ChangeLog
+21
-0
gcc/genoutput.c
+14
-1
gcc/recog.h
+2
-0
gcc/reload1.c
+0
-0
No files found.
gcc/ChangeLog
View file @
dfac187e
Fri
Oct
22
23
:
46
:
50
1999
Bernd
Schmidt
<
bernds
@cygnus
.
co
.
uk
>
*
genoutput
.
c
(
struct
operand_data
)
:
New
elt
eliminable
.
(
output_operand_data
)
:
Write
it
.
(
scan_operands
)
:
Set
it
for
MATCH_OPERAND
,
clear
for
other
matchers
.
(
compare_operands
)
:
Take
it
into
account
.
*
recog
.
h
(
struct
insn_operand_data
)
:
New
elt
eliminable
.
*
reload1
.
c
(
check_eliminable_occurrences
,
elimination_effects
)
:
New
functions
.
(
old_asm_operands_vec
,
new_asm_operands_vec
)
:
Delete
.
(
eliminate_regs
)
:
Move
code
that
detects
changes
to
elimination
target
regs
into
new
function
elimination_effects
.
Delete
one
#
if
0
block
.
Abort
for
USE
,
CLOBBER
,
ASM_OPERANDS
and
SET
.
(
eliminate_regs_in_insn
)
:
Return
immediately
for
USEs
,
CLOBBERs
,
ADDR_VECs
,
ADDR_DIFF_VECs
and
ASM_INPUTs
.
Only
call
eliminate_regs
for
real
operands
of
the
insn
,
not
for
parts
of
its
structure
or
parts
matched
by
things
like
match_operator
.
Use
elimination_effects
and
check_eliminable_occurrences
.
Use
copy_insn
to
duplicate
the
pattern
when
not
in
the
final
pass
.
Fri
Oct
22
09
:
03
:
44
1999
Mark
Mitchell
<
mark
@codesourcery
.
com
>
*
i386
.
md
:
Add
missing
`
y
'
modifiers
to
uses
of
fst
,
fstp
,
fld
,
...
...
gcc/genoutput.c
View file @
dfac187e
...
...
@@ -65,6 +65,10 @@ Boston, MA 02111-1307, USA. */
e. `strict_low', is nonzero for operands contained in a STRICT_LOW_PART.
f. `eliminable', is nonzero for operands that are matched normally by
MATCH_OPERAND; it is zero for operands that should not be changed during
register elimination such as MATCH_OPERATORs.
The code number of an insn is simply its position in the machine
description; code numbers are assigned sequentially to entries in
the description, starting with code number 0.
...
...
@@ -128,6 +132,7 @@ struct operand_data
unsigned
char
n_alternatives
;
char
address_p
;
char
strict_low
;
char
eliminable
;
char
seen
;
};
...
...
@@ -287,7 +292,9 @@ output_operand_data ()
printf
(
" %smode,
\n
"
,
GET_MODE_NAME
(
d
->
mode
));
printf
(
" %d
\n
"
,
d
->
strict_low
);
printf
(
" %d,
\n
"
,
d
->
strict_low
);
printf
(
" %d
\n
"
,
d
->
eliminable
);
printf
(
" },
\n
"
);
}
...
...
@@ -436,6 +443,7 @@ scan_operands (d, part, this_address_p, this_strict_low)
d
->
operand
[
opno
].
n_alternatives
=
n_occurrences
(
','
,
XSTR
(
part
,
2
))
+
1
;
d
->
operand
[
opno
].
address_p
=
this_address_p
;
d
->
operand
[
opno
].
eliminable
=
1
;
return
;
case
MATCH_SCRATCH
:
...
...
@@ -460,6 +468,7 @@ scan_operands (d, part, this_address_p, this_strict_low)
d
->
operand
[
opno
].
n_alternatives
=
n_occurrences
(
','
,
XSTR
(
part
,
1
))
+
1
;
d
->
operand
[
opno
].
address_p
=
0
;
d
->
operand
[
opno
].
eliminable
=
0
;
return
;
case
MATCH_OPERATOR
:
...
...
@@ -482,6 +491,7 @@ scan_operands (d, part, this_address_p, this_strict_low)
d
->
operand
[
opno
].
predicate
=
XSTR
(
part
,
1
);
d
->
operand
[
opno
].
constraint
=
0
;
d
->
operand
[
opno
].
address_p
=
0
;
d
->
operand
[
opno
].
eliminable
=
0
;
for
(
i
=
0
;
i
<
XVECLEN
(
part
,
2
);
i
++
)
scan_operands
(
d
,
XVECEXP
(
part
,
2
,
i
),
0
,
0
);
return
;
...
...
@@ -553,6 +563,9 @@ compare_operands (d0, d1)
if
(
d0
->
strict_low
!=
d1
->
strict_low
)
return
0
;
if
(
d0
->
eliminable
!=
d1
->
eliminable
)
return
0
;
return
1
;
}
...
...
gcc/recog.h
View file @
dfac187e
...
...
@@ -209,6 +209,8 @@ struct insn_operand_data
enum
machine_mode
mode
;
char
strict_low
;
char
eliminable
;
};
/* Legal values for insn_data.output_format. Indicate what type of data
...
...
gcc/reload1.c
View file @
dfac187e
This diff is collapsed.
Click to expand it.
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