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
68d0a3d2
Commit
68d0a3d2
authored
Dec 11, 2002
by
Kazu Hirata
Committed by
Kazu Hirata
Dec 11, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* config/h8300/h8300.md (two define_peephole2): New.
From-SVN: r60036
parent
722d59a3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
0 deletions
+60
-0
gcc/ChangeLog
+4
-0
gcc/config/h8300/h8300.md
+56
-0
No files found.
gcc/ChangeLog
View file @
68d0a3d2
2002
-
12
-
11
Kazu
Hirata
<
kazu
@cs
.
umass
.
edu
>
*
config
/
h8300
/
h8300
.
md
(
two
define_peephole2
)
:
New
.
2002
-
12
-
11
Kazu
Hirata
<
kazu
@cs
.
umass
.
edu
>
*
config
/
h8300
/
h8300
.
h
(
CONST_OK_FOR_J
)
:
Remove
.
(
CONST_OK_FOR_K
)
:
Likewise
.
(
CONST_OK_FOR_M
)
:
Likewise
.
...
...
gcc/config/h8300/h8300.md
View file @
68d0a3d2
...
...
@@ -2689,3 +2689,59 @@
(set (mem:SI (plus:SI (reg:SI SP_REG) (const_int -8)))
(match_dup 1))])]
"")
;; Turn
;;
;; mov.w #2,r0
;; add.w r7,r0 (6 bytes)
;;
;; into
;;
;; mov.w r7,r0
;; adds #2,r0 (4 bytes)
(define_peephole2
[
(set (match_operand:HI 0 "register_operand" "")
(match_operand:HI 1 "const_int_operand" ""))
(set (match_dup 0)
(plus:HI (match_dup 0)
(match_operand:HI 2 "register_operand" "")))]
"REG_P (operands
[
0
]
) && REG_P (operands
[
2
]
)
&& REGNO (operands
[
0
]
) != REGNO (operands
[
2
]
)
&& (CONST_OK_FOR_L (INTVAL (operands
[
1
]
))
|| CONST_OK_FOR_N (INTVAL (operands
[
1
]
)))"
[
(set (match_dup 0)
(match_dup 2))
(set (match_dup 0)
(plus:HI (match_dup 0)
(match_dup 1)))]
"")
;; Turn
;;
;; sub.l er0,er0
;; add.b #4,r0l
;; add.l er7,er0 (6 bytes)
;;
;; into
;;
;; mov.l er7,er0
;; adds #4,er0 (4 bytes)
(define_peephole2
[
(set (match_operand:SI 0 "register_operand" "")
(match_operand:SI 1 "const_int_operand" ""))
(set (match_dup 0)
(plus:SI (match_dup 0)
(match_operand:SI 2 "register_operand" "")))]
"(TARGET_H8300H || TARGET_H8300S)
&& REG_P (operands
[
0
]
) && REG_P (operands
[
2
]
)
&& REGNO (operands
[
0
]
) != REGNO (operands
[
2
]
)
&& (CONST_OK_FOR_L (INTVAL (operands
[
1
]
))
|| CONST_OK_FOR_N (INTVAL (operands
[
1
]
)))"
[
(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