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
a05c0ddf
Commit
a05c0ddf
authored
Mar 22, 2013
by
Ian Bolton
Committed by
Ian Bolton
Mar 22, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AArch64 MOVK fix to operand 2
From-SVN: r196958
parent
b315f094
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
2 deletions
+54
-2
gcc/ChangeLog
+7
-0
gcc/config/aarch64/aarch64.c
+10
-0
gcc/config/aarch64/aarch64.md
+2
-2
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/gcc.target/aarch64/movk.c
+31
-0
No files found.
gcc/ChangeLog
View file @
a05c0ddf
2013-03-22 Ian Bolton <ian.bolton@arm.com>
* config/aarch64/aarch64.c (aarch64_print_operand): New
format specifier for printing a constant in hex.
* config/aarch64/aarch64.md (insv_imm<mode>): Use the X
format specifier for printing second operand.
2013-03-22 Richard Biener <rguenther@suse.de>
* tree-ssa-loop-im.c (memory_references): Add refs_stored_in_loop
...
...
gcc/config/aarch64/aarch64.c
View file @
a05c0ddf
...
...
@@ -3364,6 +3364,16 @@ aarch64_print_operand (FILE *f, rtx x, char code)
asm_fprintf
(
f
,
"v%d"
,
REGNO
(
x
)
-
V0_REGNUM
+
(
code
-
'S'
));
break
;
case
'X'
:
/* Print integer constant in hex. */
if
(
GET_CODE
(
x
)
!=
CONST_INT
)
{
output_operand_lossage
(
"invalid operand for '%%%c'"
,
code
);
return
;
}
asm_fprintf
(
f
,
"0x%x"
,
UINTVAL
(
x
));
break
;
case
'w'
:
case
'x'
:
/* Print a general register name or the zero register (32-bit or
...
...
gcc/config/aarch64/aarch64.md
View file @
a05c0ddf
...
...
@@ -844,8 +844,8 @@
(match_operand:GPI 2 "const_int_operand" "n"))]
"INTVAL (operands
[
1
]
)
<
GET
_MODE_BITSIZE
(<
MODE
>
mode)
&& INTVAL (operands
[
1
]
) % 16 == 0
&& INTVAL (operands
[
2
]
) <= 0xffff"
"movk
\\
t%
<w>
0, %2, lsl %1"
&&
U
INTVAL (operands
[
2
]
) <= 0xffff"
"movk
\\
t%
<w>
0, %
X
2, lsl %1"
[
(set_attr "v8type" "movk")
(set_attr "mode" "
<MODE>
")]
)
...
...
gcc/testsuite/ChangeLog
View file @
a05c0ddf
2013-03-22 Ian Bolton <ian.bolton@arm.com>
* gcc.target/aarch64/movk.c: New test.
2013-03-21 Marc Glisse <marc.glisse@inria.fr>
* g++.dg/ext/vector21.C: New testcase.
...
...
gcc/testsuite/gcc.target/aarch64/movk.c
0 → 100644
View file @
a05c0ddf
/* { dg-do run } */
/* { dg-options "-O2 --save-temps -fno-inline" } */
extern
void
abort
(
void
);
long
long
int
dummy_number_generator
()
{
/* { dg-final { scan-assembler "movk\tx\[0-9\]+, 0xefff, lsl 16" } } */
/* { dg-final { scan-assembler "movk\tx\[0-9\]+, 0xc4cc, lsl 32" } } */
/* { dg-final { scan-assembler "movk\tx\[0-9\]+, 0xfffe, lsl 48" } } */
return
-
346565474575675
;
}
int
main
(
void
)
{
long
long
int
num
=
dummy_number_generator
();
if
(
num
>
0
)
abort
();
/* { dg-final { scan-assembler "movk\tx\[0-9\]+, 0x4667, lsl 16" } } */
/* { dg-final { scan-assembler "movk\tx\[0-9\]+, 0x7a3d, lsl 32" } } */
if
(
num
/
69313094915135
!=
-
5
)
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