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
8bca10f4
Commit
8bca10f4
authored
28 years ago
by
Jim Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(sne): Modified to use negc instead of xor.
(sne+1): New define_split for new sne pattern. From-SVN: r13848
parent
f3cd5375
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
3 deletions
+32
-3
gcc/config/sh/sh.md
+32
-3
No files found.
gcc/config/sh/sh.md
View file @
8bca10f4
...
...
@@ -2287,12 +2287,41 @@
""
"operands[1] = prepare_scc_operands (GEU);")
;; sne moves the complement of the T reg to DEST like this:
;; cmp/eq ...
;; mov #-1,temp
;; negc temp,dest
;; This is better than xoring compare result with 1 because it does
;; not require r0 and further, the -1 may be CSE-ed or lifted out of a
;; loop.
(define_expand "sne"
[(set (match_dup 2) (const_int -1))
(parallel [(set (match_operand:SI 0 "arith_reg_operand" "")
(neg:SI (plus:SI (match_dup 1)
(match_dup 2))))
(set (reg:SI 18)
(ne:SI (ior:SI (match_dup 1) (match_dup 2))
(const_int 0)))])]
""
"
{
operands[1] = prepare_scc_operands (EQ);
operands[2] = gen_reg_rtx (SImode);
}")
;; Recognize mov #-1/negc/neg sequence, and change it to movt/add #-1.
;; This prevents a regression that occured when we switched from xor to
;; mov/neg for sne.
(define_split
[(set (match_operand:SI 0 "arith_reg_operand" "")
(
match_dup 1)
)
(set (match_dup 0) (xor:SI (match_dup 0) (const_int
1)))]
(
plus:SI (reg:SI 18
)
(const_int -
1)))]
""
"operands[1] = prepare_scc_operands (EQ);")
[(set (match_dup 0) (eq:SI (reg:SI 18) (const_int 1)))
(set (match_dup 0) (plus:SI (match_dup 0) (const_int -1)))]
"")
;; -------------------------------------------------------------------------
;; Instructions to cope with inline literal tables
...
...
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