This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [61/77] Use scalar_int_mode in the AArch64 port


On 07/13/2017 03:00 AM, Richard Sandiford wrote:
> This patch makes the AArch64 port use scalar_int_mode in various places.
> Other ports won't need this kind of change; we only need it for AArch64
> because of the variable-sized SVE modes.
> 
> The only change in functionality is in the rtx_costs handling
> of CONST_INT.  If the caller doesn't supply a mode, we now pass
> word_mode rather than VOIDmode to aarch64_internal_mov_immediate.
> aarch64_movw_imm will therefore not now truncate large constants
> in this situation.
> 
> 2017-07-13  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_is_extend_from_extract):
> 	Take a scalar_int_mode instead of a machine_mode.
> 	(aarch64_mask_and_shift_for_ubfiz_p): Likewise.
> 	(aarch64_move_imm): Likewise.
> 	(aarch64_output_scalar_simd_mov_immediate): Likewise.
> 	(aarch64_simd_scalar_immediate_valid_for_move): Likewise.
> 	(aarch64_simd_attr_length_rglist): Delete.
> 	* config/aarch64/aarch64.c (aarch64_is_extend_from_extract): Take
> 	a scalar_int_mode instead of a machine_mode.
> 	(aarch64_add_offset): Likewise.
> 	(aarch64_internal_mov_immediate): Likewise
> 	(aarch64_add_constant_internal): Likewise.
> 	(aarch64_add_constant): Likewise.
> 	(aarch64_movw_imm): Likewise.
> 	(aarch64_move_imm): Likewise.
> 	(aarch64_rtx_arith_op_extract_p): Likewise.
> 	(aarch64_mask_and_shift_for_ubfiz_p): Likewise.
> 	(aarch64_simd_scalar_immediate_valid_for_move): Likewise.
> 	Remove assert that the mode isn't a vector.
> 	(aarch64_output_scalar_simd_mov_immediate): Likewise.
> 	(aarch64_expand_mov_immediate): Update calls after above changes.
> 	(aarch64_output_casesi): Use as_a <scalar_int_mode>.
> 	(aarch64_and_bitmask_imm): Check for scalar integer modes.
> 	(aarch64_strip_extend): Likewise.
> 	(aarch64_extr_rtx_p): Likewise.
> 	(aarch64_rtx_costs): Likewise, using wode_mode as the mode of
> 	a CONST_INT when the mode parameter is VOIDmode.
I'll let the aarch64 owners ack this one...  You might know one or two
of 'em :-)

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]