Commit 146c2e3a by Richard Sandiford Committed by Richard Sandiford

[75/77] Use scalar_mode in the AArch64 port

Similar to the previous scalar_int_mode patch.

2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

gcc/
	* config/aarch64/aarch64-protos.h (aarch64_gen_adjusted_ldpstp):
	Take a scalar_mode rather than a machine_mode.
	(aarch64_operands_adjust_ok_for_ldpstp): Likewise.
	* config/aarch64/aarch64.c (aarch64_simd_container_mode): Likewise.
	(aarch64_operands_adjust_ok_for_ldpstp): Likewise.
	(aarch64_gen_adjusted_ldpstp): Likewise.
	(aarch64_expand_vector_init): Use scalar_mode instead of machine_mode.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>

From-SVN: r251736
parent 77e994c9
...@@ -2,6 +2,18 @@ ...@@ -2,6 +2,18 @@
Alan Hayward <alan.hayward@arm.com> Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com> David Sherwood <david.sherwood@arm.com>
* config/aarch64/aarch64-protos.h (aarch64_gen_adjusted_ldpstp):
Take a scalar_mode rather than a machine_mode.
(aarch64_operands_adjust_ok_for_ldpstp): Likewise.
* config/aarch64/aarch64.c (aarch64_simd_container_mode): Likewise.
(aarch64_operands_adjust_ok_for_ldpstp): Likewise.
(aarch64_gen_adjusted_ldpstp): Likewise.
(aarch64_expand_vector_init): Use scalar_mode instead of machine_mode.
2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* config/aarch64/aarch64-protos.h (aarch64_is_extend_from_extract): * config/aarch64/aarch64-protos.h (aarch64_is_extend_from_extract):
Take a scalar_int_mode instead of a machine_mode. Take a scalar_int_mode instead of a machine_mode.
(aarch64_mask_and_shift_for_ubfiz_p): Likewise. (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
......
...@@ -441,7 +441,7 @@ bool aarch64_atomic_ldop_supported_p (enum rtx_code); ...@@ -441,7 +441,7 @@ bool aarch64_atomic_ldop_supported_p (enum rtx_code);
void aarch64_gen_atomic_ldop (enum rtx_code, rtx, rtx, rtx, rtx, rtx); void aarch64_gen_atomic_ldop (enum rtx_code, rtx, rtx, rtx, rtx, rtx);
void aarch64_split_atomic_op (enum rtx_code, rtx, rtx, rtx, rtx, rtx, rtx); void aarch64_split_atomic_op (enum rtx_code, rtx, rtx, rtx, rtx, rtx, rtx);
bool aarch64_gen_adjusted_ldpstp (rtx *, bool, machine_mode, RTX_CODE); bool aarch64_gen_adjusted_ldpstp (rtx *, bool, scalar_mode, RTX_CODE);
#endif /* RTX_CODE */ #endif /* RTX_CODE */
void aarch64_init_builtins (void); void aarch64_init_builtins (void);
...@@ -469,7 +469,7 @@ int aarch64_ccmp_mode_to_code (machine_mode mode); ...@@ -469,7 +469,7 @@ int aarch64_ccmp_mode_to_code (machine_mode mode);
bool extract_base_offset_in_addr (rtx mem, rtx *base, rtx *offset); bool extract_base_offset_in_addr (rtx mem, rtx *base, rtx *offset);
bool aarch64_operands_ok_for_ldpstp (rtx *, bool, machine_mode); bool aarch64_operands_ok_for_ldpstp (rtx *, bool, machine_mode);
bool aarch64_operands_adjust_ok_for_ldpstp (rtx *, bool, machine_mode); bool aarch64_operands_adjust_ok_for_ldpstp (rtx *, bool, scalar_mode);
extern void aarch64_asm_output_pool_epilogue (FILE *, const char *, extern void aarch64_asm_output_pool_epilogue (FILE *, const char *,
tree, HOST_WIDE_INT); tree, HOST_WIDE_INT);
......
...@@ -149,7 +149,7 @@ static bool aarch64_builtin_support_vector_misalignment (machine_mode mode, ...@@ -149,7 +149,7 @@ static bool aarch64_builtin_support_vector_misalignment (machine_mode mode,
int misalignment, int misalignment,
bool is_packed); bool is_packed);
static machine_mode static machine_mode
aarch64_simd_container_mode (machine_mode mode, unsigned width); aarch64_simd_container_mode (scalar_mode mode, unsigned width);
/* Major revision number of the ARM Architecture implemented by the target. */ /* Major revision number of the ARM Architecture implemented by the target. */
unsigned aarch64_architecture_version; unsigned aarch64_architecture_version;
...@@ -11248,7 +11248,7 @@ aarch64_vector_mode_supported_p (machine_mode mode) ...@@ -11248,7 +11248,7 @@ aarch64_vector_mode_supported_p (machine_mode mode)
/* Return appropriate SIMD container /* Return appropriate SIMD container
for MODE within a vector of WIDTH bits. */ for MODE within a vector of WIDTH bits. */
static machine_mode static machine_mode
aarch64_simd_container_mode (machine_mode mode, unsigned width) aarch64_simd_container_mode (scalar_mode mode, unsigned width)
{ {
gcc_assert (width == 64 || width == 128); gcc_assert (width == 64 || width == 128);
if (TARGET_SIMD) if (TARGET_SIMD)
...@@ -11997,7 +11997,7 @@ void ...@@ -11997,7 +11997,7 @@ void
aarch64_expand_vector_init (rtx target, rtx vals) aarch64_expand_vector_init (rtx target, rtx vals)
{ {
machine_mode mode = GET_MODE (target); machine_mode mode = GET_MODE (target);
machine_mode inner_mode = GET_MODE_INNER (mode); scalar_mode inner_mode = GET_MODE_INNER (mode);
/* The number of vector elements. */ /* The number of vector elements. */
int n_elts = GET_MODE_NUNITS (mode); int n_elts = GET_MODE_NUNITS (mode);
/* The number of vector elements which are not constant. */ /* The number of vector elements which are not constant. */
...@@ -14810,7 +14810,7 @@ aarch64_operands_ok_for_ldpstp (rtx *operands, bool load, ...@@ -14810,7 +14810,7 @@ aarch64_operands_ok_for_ldpstp (rtx *operands, bool load,
bool bool
aarch64_operands_adjust_ok_for_ldpstp (rtx *operands, bool load, aarch64_operands_adjust_ok_for_ldpstp (rtx *operands, bool load,
machine_mode mode) scalar_mode mode)
{ {
enum reg_class rclass_1, rclass_2, rclass_3, rclass_4; enum reg_class rclass_1, rclass_2, rclass_3, rclass_4;
HOST_WIDE_INT offval_1, offval_2, offval_3, offval_4, msize; HOST_WIDE_INT offval_1, offval_2, offval_3, offval_4, msize;
...@@ -14944,7 +14944,7 @@ aarch64_operands_adjust_ok_for_ldpstp (rtx *operands, bool load, ...@@ -14944,7 +14944,7 @@ aarch64_operands_adjust_ok_for_ldpstp (rtx *operands, bool load,
bool bool
aarch64_gen_adjusted_ldpstp (rtx *operands, bool load, aarch64_gen_adjusted_ldpstp (rtx *operands, bool load,
machine_mode mode, RTX_CODE code) scalar_mode mode, RTX_CODE code)
{ {
rtx base, offset, t1, t2; rtx base, offset, t1, t2;
rtx mem_1, mem_2, mem_3, mem_4; rtx mem_1, mem_2, mem_3, mem_4;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment