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
af13f02d
Commit
af13f02d
authored
Dec 31, 1992
by
Jim Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(strict_low_part_peephole_ok): New function.
From-SVN: r3016
parent
ed359ebc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
0 deletions
+59
-0
gcc/config/m68k/m68k.c
+59
-0
No files found.
gcc/config/m68k/m68k.c
View file @
af13f02d
...
...
@@ -1971,3 +1971,62 @@ print_operand_address (file, addr)
break
;
}
}
/* Check for cases where a clr insns can be omitted from code using
strict_low_part sets. For example, the second clrl here is not needed:
clrl d0; movw a0@+,d0; use d0; clrl d0; movw a0@+; use d0; ...
MODE is the mode of this STRICT_LOW_PART set. FIRST_INSN is the clear
insn we are checking for redundancy. TARGET is the register set by the
clear insn. */
int
strict_low_part_peephole_ok
(
mode
,
first_insn
,
target
)
enum
machine_mode
mode
;
rtx
first_insn
;
rtx
target
;
{
rtx
p
;
p
=
prev_nonnote_insn
(
first_insn
);
while
(
p
)
{
/* If it isn't an insn, then give up. */
if
(
GET_CODE
(
p
)
!=
INSN
)
return
0
;
if
(
reg_set_p
(
target
,
p
))
{
rtx
set
=
single_set
(
p
);
rtx
dest
;
/* If it isn't an easy to recognize insn, then give up. */
if
(
!
set
)
return
0
;
dest
=
SET_DEST
(
set
);
/* If this sets the entire target register to zero, then our
first_insn is redundant. */
if
(
rtx_equal_p
(
dest
,
target
)
&&
SET_SRC
(
set
)
==
const0_rtx
)
return
1
;
else
if
(
GET_CODE
(
dest
)
==
STRICT_LOW_PART
&&
GET_CODE
(
XEXP
(
dest
,
0
))
==
REG
&&
REGNO
(
XEXP
(
dest
,
0
))
==
REGNO
(
target
)
&&
(
GET_MODE_SIZE
(
GET_MODE
(
XEXP
(
dest
,
0
)))
<=
GET_MODE_SIZE
(
mode
)))
/* This is a strict low part set which modifies less than
we are using, so it is safe. */
;
else
return
0
;
}
p
=
prev_nonnote_insn
(
p
);
}
return
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