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
28569ac3
Commit
28569ac3
authored
Apr 12, 2011
by
Richard Sandiford
Committed by
Richard Sandiford
Apr 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* recog.h, genoutput.c, optabs.c: Revert last patch.
From-SVN: r172321
parent
ae59e00d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
56 deletions
+18
-56
gcc/ChangeLog
+4
-0
gcc/genoutput.c
+1
-10
gcc/optabs.c
+13
-44
gcc/recog.h
+0
-2
No files found.
gcc/ChangeLog
View file @
28569ac3
2011-04-12 Richard Sandiford <richard.sandiford@linaro.org>
* recog.h, genoutput.c, optabs.c: Revert last patch.
2011-04-12 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
2011-04-12 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
PR target/48090
PR target/48090
...
...
gcc/genoutput.c
View file @
28569ac3
...
@@ -66,8 +66,6 @@ along with GCC; see the file COPYING3. If not see
...
@@ -66,8 +66,6 @@ along with GCC; see the file COPYING3. If not see
MATCH_OPERAND; it is zero for operands that should not be changed during
MATCH_OPERAND; it is zero for operands that should not be changed during
register elimination such as MATCH_OPERATORs.
register elimination such as MATCH_OPERATORs.
g. `allows_mem', is true for operands that accept MEM rtxes.
The code number of an insn is simply its position in the machine
The code number of an insn is simply its position in the machine
description; code numbers are assigned sequentially to entries in
description; code numbers are assigned sequentially to entries in
the description, starting with code number 0.
the description, starting with code number 0.
...
@@ -258,8 +256,6 @@ output_operand_data (void)
...
@@ -258,8 +256,6 @@ output_operand_data (void)
for
(
d
=
odata
;
d
;
d
=
d
->
next
)
for
(
d
=
odata
;
d
;
d
=
d
->
next
)
{
{
struct
pred_data
*
pred
;
printf
(
" {
\n
"
);
printf
(
" {
\n
"
);
printf
(
" %s,
\n
"
,
printf
(
" %s,
\n
"
,
...
@@ -273,12 +269,7 @@ output_operand_data (void)
...
@@ -273,12 +269,7 @@ output_operand_data (void)
printf
(
" %d,
\n
"
,
d
->
constraint
==
NULL
?
1
:
0
);
printf
(
" %d,
\n
"
,
d
->
constraint
==
NULL
?
1
:
0
);
printf
(
" %d,
\n
"
,
d
->
eliminable
);
printf
(
" %d
\n
"
,
d
->
eliminable
);
pred
=
NULL
;
if
(
d
->
predicate
)
pred
=
lookup_predicate
(
d
->
predicate
);
printf
(
" %d
\n
"
,
pred
&&
pred
->
codes
[
MEM
]);
printf
(
" },
\n
"
);
printf
(
" },
\n
"
);
}
}
...
...
gcc/optabs.c
View file @
28569ac3
...
@@ -7001,36 +7001,6 @@ insn_operand_matches (enum insn_code icode, unsigned int opno, rtx operand)
...
@@ -7001,36 +7001,6 @@ insn_operand_matches (enum insn_code icode, unsigned int opno, rtx operand)
(
operand
,
insn_data
[(
int
)
icode
].
operand
[
opno
].
mode
)));
(
operand
,
insn_data
[(
int
)
icode
].
operand
[
opno
].
mode
)));
}
}
/* Like maybe_legitimize_operand, but do not change the code of the
current rtx value. */
static
bool
maybe_legitimize_operand_same_code
(
enum
insn_code
icode
,
unsigned
int
opno
,
struct
expand_operand
*
op
)
{
/* See if the operand matches in its current form. */
if
(
insn_operand_matches
(
icode
,
opno
,
op
->
value
))
return
true
;
/* If the operand is a memory, try forcing the address into a register. */
if
(
MEM_P
(
op
->
value
)
&&
insn_data
[(
int
)
icode
].
operand
[
opno
].
allows_mem
)
{
rtx
addr
,
mem
,
last
;
last
=
get_last_insn
();
addr
=
force_reg
(
Pmode
,
XEXP
(
op
->
value
,
0
));
mem
=
replace_equiv_address
(
op
->
value
,
addr
);
if
(
insn_operand_matches
(
icode
,
opno
,
mem
))
{
op
->
value
=
mem
;
return
true
;
}
delete_insns_since
(
last
);
}
return
false
;
}
/* Try to make OP match operand OPNO of instruction ICODE. Return true
/* Try to make OP match operand OPNO of instruction ICODE. Return true
on success, storing the new operand value back in OP. */
on success, storing the new operand value back in OP. */
...
@@ -7041,24 +7011,21 @@ maybe_legitimize_operand (enum insn_code icode, unsigned int opno,
...
@@ -7041,24 +7011,21 @@ maybe_legitimize_operand (enum insn_code icode, unsigned int opno,
enum
machine_mode
mode
,
imode
;
enum
machine_mode
mode
,
imode
;
bool
old_volatile_ok
,
result
;
bool
old_volatile_ok
,
result
;
old_volatile_ok
=
volatile_ok
;
mode
=
op
->
mode
;
mode
=
op
->
mode
;
result
=
false
;
switch
(
op
->
type
)
switch
(
op
->
type
)
{
{
case
EXPAND_FIXED
:
case
EXPAND_FIXED
:
old_volatile_ok
=
volatile_ok
;
volatile_ok
=
true
;
volatile_ok
=
true
;
result
=
maybe_legitimize_operand_same_code
(
icode
,
opno
,
op
);
break
;
volatile_ok
=
old_volatile_ok
;
return
result
;
case
EXPAND_OUTPUT
:
case
EXPAND_OUTPUT
:
gcc_assert
(
mode
!=
VOIDmode
);
gcc_assert
(
mode
!=
VOIDmode
);
if
(
op
->
value
if
(
!
op
->
value
&&
op
->
value
!=
const0_rtx
||
op
->
value
==
const0_rtx
&&
GET_MODE
(
op
->
value
)
==
mode
||
GET_MODE
(
op
->
value
)
!=
mode
&&
maybe_legitimize_operand_same_code
(
icode
,
opno
,
op
))
||
!
insn_operand_matches
(
icode
,
opno
,
op
->
value
))
return
true
;
op
->
value
=
gen_reg_rtx
(
mode
);
op
->
value
=
gen_reg_rtx
(
mode
);
break
;
break
;
...
@@ -7067,9 +7034,8 @@ maybe_legitimize_operand (enum insn_code icode, unsigned int opno,
...
@@ -7067,9 +7034,8 @@ maybe_legitimize_operand (enum insn_code icode, unsigned int opno,
gcc_assert
(
mode
!=
VOIDmode
);
gcc_assert
(
mode
!=
VOIDmode
);
gcc_assert
(
GET_MODE
(
op
->
value
)
==
VOIDmode
gcc_assert
(
GET_MODE
(
op
->
value
)
==
VOIDmode
||
GET_MODE
(
op
->
value
)
==
mode
);
||
GET_MODE
(
op
->
value
)
==
mode
);
if
(
maybe_legitimize_operand_same_code
(
icode
,
opno
,
op
))
result
=
insn_operand_matches
(
icode
,
opno
,
op
->
value
);
return
true
;
if
(
!
result
)
op
->
value
=
copy_to_mode_reg
(
mode
,
op
->
value
);
op
->
value
=
copy_to_mode_reg
(
mode
,
op
->
value
);
break
;
break
;
...
@@ -7104,7 +7070,10 @@ maybe_legitimize_operand (enum insn_code icode, unsigned int opno,
...
@@ -7104,7 +7070,10 @@ maybe_legitimize_operand (enum insn_code icode, unsigned int opno,
goto
input
;
goto
input
;
break
;
break
;
}
}
return
insn_operand_matches
(
icode
,
opno
,
op
->
value
);
if
(
!
result
)
result
=
insn_operand_matches
(
icode
,
opno
,
op
->
value
);
volatile_ok
=
old_volatile_ok
;
return
result
;
}
}
/* Make OP describe an input operand that should have the same value
/* Make OP describe an input operand that should have the same value
...
...
gcc/recog.h
View file @
28569ac3
...
@@ -272,8 +272,6 @@ struct insn_operand_data
...
@@ -272,8 +272,6 @@ struct insn_operand_data
const
char
is_operator
;
const
char
is_operator
;
const
char
eliminable
;
const
char
eliminable
;
const
char
allows_mem
;
};
};
/* Legal values for insn_data.output_format. Indicate what type of data
/* Legal values for insn_data.output_format. Indicate what type of data
...
...
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