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
1b1edcfa
Commit
1b1edcfa
authored
Feb 10, 2003
by
David Edelsohn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Really commit ctz patch.
From-SVN: r62649
parent
848f2ce8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
19 deletions
+51
-19
gcc/config/rs6000/rs6000.md
+51
-19
No files found.
gcc/config/rs6000/rs6000.md
View file @
1b1edcfa
...
...
@@ -2364,15 +2364,21 @@
(const_int 0)))]
"")
(define_expand "ffssi2"
(define_insn "clzsi2"
[
(set (match_operand:SI 0 "gpc_reg_operand" "=r")
(clz:SI (match_operand:SI 1 "gpc_reg_operand" "r")))]
""
"{cntlz|cntlzw} %0,%1")
(define_expand "ctzsi2"
[
(set (match_dup 2)
(neg:SI (match_operand:SI 1 "gpc_reg_operand" "r")))
(neg:SI (match_operand:SI 1 "gpc_reg_operand" "r")))
(parallel
[
(set (match_dup 3) (and:SI (match_dup 1)
(match_dup 2)))
(clobber (scratch:CC))])
(match_dup 2)))
(clobber (scratch:CC))])
(set (match_dup 4) (clz:SI (match_dup 3)))
(set (match_operand:SI 0 "gpc_reg_operand" "=r")
(minus:SI (const_int 32
) (match_dup 4)))]
(minus:SI (const_int 31
) (match_dup 4)))]
""
{
operands
[
2
]
= gen_reg_rtx (SImode);
...
...
@@ -2380,12 +2386,22 @@
operands
[
4
]
= gen_reg_rtx (SImode);
})
(define_insn "clzsi2"
[
(set (match_operand:SI 0 "gpc_reg_operand" "=r")
(clz:SI (match_operand:SI 1 "gpc_reg_operand" "r")))]
(define_expand "ffssi2"
[
(set (match_dup 2)
(neg:SI (match_operand:SI 1 "gpc_reg_operand" "r")))
(parallel
[
(set (match_dup 3) (and:SI (match_dup 1)
(match_dup 2)))
(clobber (scratch:CC))])
(set (match_dup 4) (clz:SI (match_dup 3)))
(set (match_operand:SI 0 "gpc_reg_operand" "=r")
(minus:SI (const_int 32) (match_dup 4)))]
""
"{cntlz|cntlzw} %0,%1")
{
operands
[
2
]
= gen_reg_rtx (SImode);
operands
[
3
]
= gen_reg_rtx (SImode);
operands
[
4
]
= gen_reg_rtx (SImode);
})
(define_expand "mulsi3"
[
(use (match_operand:SI 0 "gpc_reg_operand" ""))
(use (match_operand:SI 1 "gpc_reg_operand" ""))
...
...
@@ -6739,15 +6755,21 @@
(const_int 0)))]
"")
(define_expand "ffsdi2"
(define_insn "clzdi2"
[
(set (match_operand:DI 0 "gpc_reg_operand" "=r")
(clz:DI (match_operand:DI 1 "gpc_reg_operand" "r")))]
"TARGET_POWERPC64"
"cntlzd %0,%1")
(define_expand "ctzdi2"
[
(set (match_dup 2)
(neg:DI (match_operand:DI 1 "gpc_reg_operand" "r")))
(neg:DI (match_operand:DI 1 "gpc_reg_operand" "r")))
(parallel
[
(set (match_dup 3) (and:DI (match_dup 1)
(match_dup 2)))
(clobber (scratch:CC))])
(match_dup 2)))
(clobber (scratch:CC))])
(set (match_dup 4) (clz:DI (match_dup 3)))
(set (match_operand:DI 0 "gpc_reg_operand" "=r")
(minus:DI (const_int 64
) (match_dup 4)))]
(minus:DI (const_int 63
) (match_dup 4)))]
"TARGET_POWERPC64"
{
operands
[
2
]
= gen_reg_rtx (DImode);
...
...
@@ -6755,11 +6777,21 @@
operands
[
4
]
= gen_reg_rtx (DImode);
})
(define_insn "clzdi2"
[
(set (match_operand:DI 0 "gpc_reg_operand" "=r")
(clz:DI (match_operand:DI 1 "gpc_reg_operand" "r")))]
(define_expand "ffsdi2"
[
(set (match_dup 2)
(neg:DI (match_operand:DI 1 "gpc_reg_operand" "r")))
(parallel
[
(set (match_dup 3) (and:DI (match_dup 1)
(match_dup 2)))
(clobber (scratch:CC))])
(set (match_dup 4) (clz:DI (match_dup 3)))
(set (match_operand:DI 0 "gpc_reg_operand" "=r")
(minus:DI (const_int 64) (match_dup 4)))]
"TARGET_POWERPC64"
"cntlzd %0,%1")
{
operands
[
2
]
= gen_reg_rtx (DImode);
operands
[
3
]
= gen_reg_rtx (DImode);
operands
[
4
]
= gen_reg_rtx (DImode);
})
(define_insn "muldi3"
[
(set (match_operand:DI 0 "gpc_reg_operand" "=r")
...
...
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