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
040d8a1c
Commit
040d8a1c
authored
Jul 26, 2013
by
Ian Bolton
Committed by
Ian Bolton
Jul 26, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AArch64 support for NEG in vector registers for DI and SI mode
From-SVN: r201261
parent
85bd4ac6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
85 additions
and
4 deletions
+85
-4
gcc/ChangeLog
+5
-0
gcc/config/aarch64/aarch64.md
+9
-4
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/gcc.target/aarch64/neg_1.c
+67
-0
No files found.
gcc/ChangeLog
View file @
040d8a1c
2013-07-26 Ian Bolton <ian.bolton@arm.com>
* config/aarch64/aarch64.md (neg<mode>2): Offer alternative that
uses vector registers.
2013-07-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Richard Earnshaw <richard.earnshaw@arm.com>
...
...
gcc/config/aarch64/aarch64.md
View file @
040d8a1c
...
...
@@ -2041,12 +2041,17 @@
)
(define_insn "neg
<mode>
2"
[
(set (match_operand:GPI 0 "register_operand" "=r")
(neg:GPI (match_operand:GPI 1 "register_operand" "r")))]
[
(set (match_operand:GPI 0 "register_operand" "=r
,w
")
(neg:GPI (match_operand:GPI 1 "register_operand" "r
,w
")))]
""
"neg
\\
t%
<w>
0, %
<w>
1"
"@
neg
\\
t%
<w>
0, %
<w>
1
neg
\\
t%
<rtn>
0
<vas>
, %
<rtn>
1
<vas>
"
[
(set_attr "v8type" "alu")
(set_attr "mode" "
<MODE>
")]
(set_attr "simd_type" "
*
,simd_negabs")
(set_attr "simd" "
*
,yes")
(set_attr "mode" "
<MODE>
")
(set_attr "simd_mode" "
<MODE>
")]
)
;; zero_extend version of above
...
...
gcc/testsuite/ChangeLog
View file @
040d8a1c
2013-07-26 Ian Bolton <ian.bolton@arm.com>
* gcc.target/aarch64/neg_1.c: New test.
2013-07-25 Janus Weil <janus@gcc.gnu.org>
PR fortran/57966
...
...
gcc/testsuite/gcc.target/aarch64/neg_1.c
0 → 100644
View file @
040d8a1c
/* { dg-do run } */
/* { dg-options "-O2 -fno-inline --save-temps" } */
extern
void
abort
(
void
);
long
long
neg64
(
long
long
a
)
{
/* { dg-final { scan-assembler "neg\tx\[0-9\]+" } } */
return
0
-
a
;
}
long
long
neg64_in_dreg
(
long
long
a
)
{
/* { dg-final { scan-assembler "neg\td\[0-9\]+, d\[0-9\]+" } } */
register
long
long
x
asm
(
"d8"
)
=
a
;
register
long
long
y
asm
(
"d9"
);
asm
volatile
(
""
:
:
"w"
(
x
));
y
=
0
-
x
;
asm
volatile
(
""
:
:
"w"
(
y
));
return
y
;
}
int
neg32
(
int
a
)
{
/* { dg-final { scan-assembler "neg\tw\[0-9\]+" } } */
return
0
-
a
;
}
int
neg32_in_sreg
(
int
a
)
{
/* { dg-final { scan-assembler "neg\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
register
int
x
asm
(
"s8"
)
=
a
;
register
int
y
asm
(
"s9"
);
asm
volatile
(
""
:
:
"w"
(
x
));
y
=
0
-
x
;
asm
volatile
(
""
:
:
"w"
(
y
));
return
y
;
}
int
main
(
void
)
{
long
long
a
;
int
b
;
a
=
61
;
b
=
313
;
if
(
neg64
(
a
)
!=
-
61
)
abort
();
if
(
neg64_in_dreg
(
a
)
!=
-
61
)
abort
();
if
(
neg32
(
b
)
!=
-
313
)
abort
();
if
(
neg32_in_sreg
(
b
)
!=
-
313
)
abort
();
return
0
;
}
/* { dg-final { cleanup-saved-temps } } */
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