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
7930523d
Commit
7930523d
authored
Dec 12, 2002
by
Kazu Hirata
Committed by
Kazu Hirata
Dec 12, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* config/h8300/h8300.md: Add a new peephole2.
From-SVN: r60082
parent
61c85ff1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
gcc/ChangeLog
+4
-0
gcc/config/h8300/h8300.md
+33
-0
No files found.
gcc/ChangeLog
View file @
7930523d
2002
-
12
-
12
Kazu
Hirata
<
kazu
@cs
.
umass
.
edu
>
2002
-
12
-
12
Kazu
Hirata
<
kazu
@cs
.
umass
.
edu
>
*
config
/
h8300
/
h8300
.
md
:
Add
a
new
peephole2
.
2002
-
12
-
12
Kazu
Hirata
<
kazu
@cs
.
umass
.
edu
>
*
config
/
h8300
/
h8300
.
md
(
a
peephole2
)
:
Accept
a
constant
*
config
/
h8300
/
h8300
.
md
(
a
peephole2
)
:
Accept
a
constant
that
'
s
accepted
by
CONST_OK_FOR_J
.
that
'
s
accepted
by
CONST_OK_FOR_J
.
...
...
gcc/config/h8300/h8300.md
View file @
7930523d
...
@@ -2748,3 +2748,36 @@
...
@@ -2748,3 +2748,36 @@
(plus:SI (match_dup 0)
(plus:SI (match_dup 0)
(match_dup 1)))]
(match_dup 1)))]
"")
"")
;; Turn
;;
;; mov.l er7,er0
;; add.l #10,er0 (takes 8 bytes)
;;
;; into
;;
;; sub.l er0,er0
;; add.b #10,r0l
;; add.l er7,er0 (takes 6 bytes)
(define_peephole2
[
(set (match_operand:SI 0 "register_operand" "")
(match_operand:SI 1 "register_operand" ""))
(set (match_dup 0)
(plus:SI (match_dup 0)
(match_operand:SI 2 "const_int_operand" "")))]
"(TARGET_H8300H || TARGET_H8300S)
&& REG_P (operands
[
0
]
) && REG_P (operands
[
1
]
)
&& REGNO (operands
[
0
]
) != REGNO (operands
[
1
]
)
&& !CONST_OK_FOR_L (INTVAL (operands
[
2
]
))
&& !CONST_OK_FOR_N (INTVAL (operands
[
2
]
))
&& ((INTVAL (operands
[
2
]
) & 0xff) == INTVAL (operands
[
2
]
)
|| (INTVAL (operands
[
2
]
) & 0xff00) == INTVAL (operands
[
2
]
)
|| INTVAL (operands
[
2
]
) == 0xffff
|| INTVAL (operands
[
2
]
) == 0xfffe)"
[
(set (match_dup 0)
(match_dup 2))
(set (match_dup 0)
(plus:SI (match_dup 0)
(match_dup 1)))]
"")
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