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
d8edd899
Commit
d8edd899
authored
Jun 04, 2013
by
Ian Bolton
Committed by
Ian Bolton
Jun 04, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AArch64 - Improve MOVI handling (1/5)
From-SVN: r199652
parent
5cc19c62
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
24 deletions
+26
-24
gcc/ChangeLog
+8
-0
gcc/config/aarch64/aarch64.c
+18
-24
No files found.
gcc/ChangeLog
View file @
d8edd899
2013-06-04 Ian Bolton <ian.bolton@arm.com>
* config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Change
return type to bool for prototype.
(aarch64_legitimate_constant_p): Check for true instead of not -1.
(aarch64_simd_valid_immediate): Fix up each return to return a bool.
(aarch64_simd_immediate_valid_for_move): Update retval for bool.
2013-06-04 Catherine Moore <clm@codesourcery.com>
2013-06-04 Catherine Moore <clm@codesourcery.com>
* config/mips/mips.opt (meva): New.
* config/mips/mips.opt (meva): New.
...
...
gcc/config/aarch64/aarch64.c
View file @
d8edd899
...
@@ -103,7 +103,7 @@ static bool aarch64_vfp_is_call_or_return_candidate (enum machine_mode,
...
@@ -103,7 +103,7 @@ static bool aarch64_vfp_is_call_or_return_candidate (enum machine_mode,
static
void
aarch64_elf_asm_constructor
(
rtx
,
int
)
ATTRIBUTE_UNUSED
;
static
void
aarch64_elf_asm_constructor
(
rtx
,
int
)
ATTRIBUTE_UNUSED
;
static
void
aarch64_elf_asm_destructor
(
rtx
,
int
)
ATTRIBUTE_UNUSED
;
static
void
aarch64_elf_asm_destructor
(
rtx
,
int
)
ATTRIBUTE_UNUSED
;
static
void
aarch64_override_options_after_change
(
void
);
static
void
aarch64_override_options_after_change
(
void
);
static
int
aarch64_simd_valid_immediate
(
rtx
,
enum
machine_mode
,
int
,
rtx
*
,
static
bool
aarch64_simd_valid_immediate
(
rtx
,
enum
machine_mode
,
int
,
rtx
*
,
int
*
,
unsigned
char
*
,
int
*
,
int
*
);
int
*
,
unsigned
char
*
,
int
*
,
int
*
);
static
bool
aarch64_vector_mode_supported_p
(
enum
machine_mode
);
static
bool
aarch64_vector_mode_supported_p
(
enum
machine_mode
);
static
unsigned
bit_count
(
unsigned
HOST_WIDE_INT
);
static
unsigned
bit_count
(
unsigned
HOST_WIDE_INT
);
...
@@ -5153,7 +5153,7 @@ aarch64_legitimate_constant_p (enum machine_mode mode, rtx x)
...
@@ -5153,7 +5153,7 @@ aarch64_legitimate_constant_p (enum machine_mode mode, rtx x)
we now decompose CONST_INTs according to expand_mov_immediate. */
we now decompose CONST_INTs according to expand_mov_immediate. */
if
((
GET_CODE
(
x
)
==
CONST_VECTOR
if
((
GET_CODE
(
x
)
==
CONST_VECTOR
&&
aarch64_simd_valid_immediate
(
x
,
mode
,
false
,
&&
aarch64_simd_valid_immediate
(
x
,
mode
,
false
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
)
!=
-
1
)
NULL
,
NULL
,
NULL
,
NULL
,
NULL
))
||
CONST_INT_P
(
x
)
||
aarch64_valid_floating_const
(
mode
,
x
))
||
CONST_INT_P
(
x
)
||
aarch64_valid_floating_const
(
mode
,
x
))
return
!
targetm
.
cannot_force_const_mem
(
mode
,
x
);
return
!
targetm
.
cannot_force_const_mem
(
mode
,
x
);
...
@@ -6144,11 +6144,8 @@ aarch64_vect_float_const_representable_p (rtx x)
...
@@ -6144,11 +6144,8 @@ aarch64_vect_float_const_representable_p (rtx x)
return
aarch64_float_const_representable_p
(
x0
);
return
aarch64_float_const_representable_p
(
x0
);
}
}
/* TODO: This function returns values similar to those
/* Return true for valid and false for invalid. */
returned by neon_valid_immediate in gcc/config/arm/arm.c
static
bool
but the API here is different enough that these magic numbers
are not used. It should be sufficient to return true or false. */
static
int
aarch64_simd_valid_immediate
(
rtx
op
,
enum
machine_mode
mode
,
int
inverse
,
aarch64_simd_valid_immediate
(
rtx
op
,
enum
machine_mode
mode
,
int
inverse
,
rtx
*
modconst
,
int
*
elementwidth
,
rtx
*
modconst
,
int
*
elementwidth
,
unsigned
char
*
elementchar
,
unsigned
char
*
elementchar
,
...
@@ -6184,24 +6181,21 @@ aarch64_simd_valid_immediate (rtx op, enum machine_mode mode, int inverse,
...
@@ -6184,24 +6181,21 @@ aarch64_simd_valid_immediate (rtx op, enum machine_mode mode, int inverse,
if
(
!
(
simd_imm_zero
if
(
!
(
simd_imm_zero
||
aarch64_vect_float_const_representable_p
(
op
)))
||
aarch64_vect_float_const_representable_p
(
op
)))
return
-
1
;
return
false
;
if
(
modconst
)
if
(
modconst
)
*
modconst
=
CONST_VECTOR_ELT
(
op
,
0
);
*
modconst
=
CONST_VECTOR_ELT
(
op
,
0
);
if
(
elementwidth
)
if
(
elementwidth
)
*
elementwidth
=
elem_width
;
*
elementwidth
=
elem_width
;
if
(
elementchar
)
if
(
elementchar
)
*
elementchar
=
sizetochar
(
elem_width
);
*
elementchar
=
sizetochar
(
elem_width
);
if
(
shift
)
if
(
shift
)
*
shift
=
0
;
*
shift
=
0
;
if
(
simd_imm_zero
)
return
true
;
return
19
;
else
return
18
;
}
}
/* Splat vector constant out into a byte vector. */
/* Splat vector constant out into a byte vector. */
...
@@ -6299,7 +6293,7 @@ aarch64_simd_valid_immediate (rtx op, enum machine_mode mode, int inverse,
...
@@ -6299,7 +6293,7 @@ aarch64_simd_valid_immediate (rtx op, enum machine_mode mode, int inverse,
if
(
immtype
==
-
1
if
(
immtype
==
-
1
||
(
immtype
>=
12
&&
immtype
<=
15
)
||
(
immtype
>=
12
&&
immtype
<=
15
)
||
immtype
==
18
)
||
immtype
==
18
)
return
-
1
;
return
false
;
if
(
elementwidth
)
if
(
elementwidth
)
...
@@ -6351,7 +6345,7 @@ aarch64_simd_valid_immediate (rtx op, enum machine_mode mode, int inverse,
...
@@ -6351,7 +6345,7 @@ aarch64_simd_valid_immediate (rtx op, enum machine_mode mode, int inverse,
}
}
}
}
return
immtype
;
return
(
immtype
>=
0
)
;
#undef CHECK
#undef CHECK
}
}
...
@@ -6369,11 +6363,11 @@ aarch64_simd_immediate_valid_for_move (rtx op, enum machine_mode mode,
...
@@ -6369,11 +6363,11 @@ aarch64_simd_immediate_valid_for_move (rtx op, enum machine_mode mode,
int
tmpwidth
;
int
tmpwidth
;
unsigned
char
tmpwidthc
;
unsigned
char
tmpwidthc
;
int
tmpmvn
=
0
,
tmpshift
=
0
;
int
tmpmvn
=
0
,
tmpshift
=
0
;
int
retval
=
aarch64_simd_valid_immediate
(
op
,
mode
,
0
,
&
tmpconst
,
bool
retval
=
aarch64_simd_valid_immediate
(
op
,
mode
,
0
,
&
tmpconst
,
&
tmpwidth
,
&
tmpwidthc
,
&
tmpwidth
,
&
tmpwidthc
,
&
tmpmvn
,
&
tmpshift
);
&
tmpmvn
,
&
tmpshift
);
if
(
retval
==
-
1
)
if
(
!
retval
)
return
0
;
return
0
;
if
(
modconst
)
if
(
modconst
)
...
...
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