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]

[arm-embedded][committed][PATCH 4/6] ARM ACLE Coprocessor LDC and STC intrinsics


On 09/11/16 10:12, Andre Vieira (lists) wrote:
> Hi,
> 
> This patch implements support for the ARM ACLE Coprocessor LDC and STC
> intrinsics. See below a table mapping the intrinsics to their respective
> instructions:
> 
> +----------------------------------------------------+--------------------------------------+
> | Intrinsic signature                                | Instruction
> pattern                  |
> +----------------------------------------------------+--------------------------------------+
> |void __arm_ldc(coproc, CRd, const void* p)          |LDC coproc, CRd,
> [...]                |
> +----------------------------------------------------+--------------------------------------+
> |void __arm_ldcl(coproc, CRd, const void* p)         |LDCL coproc, CRd,
> [...]               |
> +----------------------------------------------------+--------------------------------------+
> |void __arm_ldc2(coproc, CRd, const void* p)         |LDC2 coproc, CRd,
> [...]               |
> +----------------------------------------------------+--------------------------------------+
> |void __arm_ldc2l(coproc, CRd, const void* p)        |LDC2L coproc, CRd,
> [...]              |
> +----------------------------------------------------+--------------------------------------+
> |void __arm_stc(coproc, CRd, void* p)                |STC coproc, CRd,
> [...]                |
> +----------------------------------------------------+--------------------------------------+
> |void __arm_stcl(coproc, CRd, void* p)               |STCL coproc, CRd,
> [...]               |
> +----------------------------------------------------+--------------------------------------+
> |void __arm_stc2(coproc, CRd, void* p)               |STC2 coproc, CRd,
> [...]               |
> +----------------------------------------------------+--------------------------------------+
> |void __arm_stc2l(coproc, CRd, void* p)              |STC2L coproc, CRd,
> [...]              |
> +----------------------------------------------------+--------------------------------------+
> Note that any untyped variable in the intrinsic signature is required to
> be a compiler-time constant and has the type 'unsigned int'.  We do some
> boundary checks for coproc:[0-15], CR*:[0-31]. If either of these
> requirements are not met a diagnostic is issued.
> 
> 
> Is this ok for trunk?
> 
> Regards,
> Andre
> 
> gcc/ChangeLog:
> 2016-11-09  Andre Vieira  <andre.simoesdiasvieira@arm.com>
> 
>   * config/arm/arm.md (*ldcstc): New.
>   (<ldcstc>): New.
>   * config/arm/arm.c (arm_coproc_builtin_available): Add
>   support for ldc,ldcl,stc,stcl,ldc2,ldc2l,stc2 and stc2l.
>   (arm_coproc_ldc_stc_legitimate_address): New.
>   * config/arm/arm-builtins.c (arm_type_qualifiers): Add
>   'qualifier_const_pointer'.
>   (LDC_QUALIFIERS): Define to...
>   (arm_ldc_qualifiers): ... this. New.
>   (STC_QUALIFIERS): Define to...
>   (arm_stc_qualifiers): ... this. New.
>   * config/arm/arm-protos.h
>   (arm_coproc_ldc_stc_legitimate_address): New.
>   * config/arm/arm_acle.h (__arm_ldc, __arm_ldcl, __arm_stc,
>   __arm_stcl, __arm_ldc2, __arm_ldc2l, __arm_stc2, __arm_stc2l): New.
>   * config/arm/arm_acle_builtins.def (ldc, ldc2, ldcl, ldc2l, stc,
>   stc2, stcl, stc2l): New.
>   * config/arm/constraints.md (Uz): New.
>   * config/arm/iterators.md (LDCSTCI, ldcstc, LDCSTC): New.
>   * config/arm/unspecs.md (VUNSPEC_LDC, VUNSPEC_LDC2, VUNSPEC_LDCL,
>   VUNSPEC_LDC2L, VUNSPEC_STC, VUNSPEC_STC2, VUNSPEC_STCL,
>   VUNSPEC_STC2L): New.
> 
> gcc/testsuite/ChangeLog:
> 
> 2016-11-09  Andre Vieira  <andre.simoesdiasvieira@arm.com>
> 
>   * gcc.target/arm/acle/ldc: New.
>   * gcc.target/arm/acle/ldc2: New.
>   * gcc.target/arm/acle/ldcl: New.
>   * gcc.target/arm/acle/ldc2l: New.
>   * gcc.target/arm/acle/stc: New.
>   * gcc.target/arm/acle/stc2: New.
>   * gcc.target/arm/acle/stcl: New.
>   * gcc.target/arm/acle/stc2l: New.
> 
> 
Hi,

I committed this patch to the embedded-6-branch in revision r243262.

Cheers,
Andre

gcc/ChangeLog.arm:
2016-12-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>

	* config/arm/arm.md (*ldcstc): New.
	(<ldcstc>): New.
	* config/arm/arm.c (arm_coproc_builtin_available): Add
	support for ldc,ldcl,stc,stcl,ldc2,ldc2l,stc2 and stc2l.
	(arm_coproc_ldc_stc_legitimate_address): New.
	* config/arm/arm-builtins.c (arm_type_qualifiers): Add
	'qualifier_const_pointer'.
	(LDC_QUALIFIERS): Define to...
	(arm_ldc_qualifiers): ... this. New.
	(STC_QUALIFIERS): Define to...
	(arm_stc_qualifiers): ... this. New.
	* config/arm/arm-protos.h
	(arm_coproc_ldc_stc_legitimate_address): New.
	* config/arm/arm_acle.h (__arm_ldc, __arm_ldcl, __arm_stc,
	__arm_stcl, __arm_ldc2, __arm_ldc2l, __arm_stc2, __arm_stc2l): New.
	* config/arm/arm_acle_builtins.def (ldc, ldc2, ldcl, ldc2l, stc,
	stc2, stcl, stc2l): New.
	* config/arm/constraints.md (Uz): New.
	* config/arm/iterators.md (LDCSTCI, ldcstc, LDCSTC): New.
	* config/arm/unspecs.md (VUNSPEC_LDC, VUNSPEC_LDC2, VUNSPEC_LDCL,
	VUNSPEC_LDC2L, VUNSPEC_STC, VUNSPEC_STC2, VUNSPEC_STCL,
	VUNSPEC_STC2L): New.

gcc/testsuite/ChangeLog.arm:
2016-12-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>

	* gcc.target/arm/acle/ldc: New.
	* gcc.target/arm/acle/ldc2: New.
	* gcc.target/arm/acle/ldcl: New.
	* gcc.target/arm/acle/ldc2l: New.
	* gcc.target/arm/acle/stc: New.
	* gcc.target/arm/acle/stc2: New.
	* gcc.target/arm/acle/stcl: New.
	* gcc.target/arm/acle/stc2l: New.

Attachment: diff4
Description: Text document


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