[PATCH, GCC/ARM, gcc-6-branch] Fix PR80082: LDRD erronously used for 64bit load on ARMv7-R

Thomas Preudhomme thomas.preudhomme@foss.arm.com
Mon Mar 27 11:15:00 GMT 2017


Hi,

Currently GCC is happy to use LDRD to perform a 64bit load on ARMv7-R,
as shown by the testcase on this patch. However, LDRD is only atomic
when LPAE extensions is available, which they are not for ARMv7-R. This
commit solve the issue by introducing a new feature bit to distinguish
LPAE extensions instead of deducing it from div instruction
availability.

ChangeLog entries are as follow:

*** gcc/ChangeLog ***

2017-03-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	PR target/80082
	* config/arm/arm-protos.h (FL_LPAE): Define macro.
	(FL_FOR_ARCH7VE): Add FL_LPAE.
	(arm_arch_lpae): Declare extern.
	* config/arm/arm.c (arm_arch_lpae): Declare.
	(arm_option_override): Define arm_arch_lpae.
	* config/arm/arm.h (TARGET_HAVE_LPAE): Redefine in term of
	arm_arch_lpae.

*** gcc/testsuite/ChangeLog ***

2017-03-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	PR target/80082
	* gcc.target/arm/atomic_loaddi_10.c: New testcase.
	* gcc.target/arm/atomic_loaddi_11.c: Likewise.


Testing: bootstrapped for -march=armv7ve and testsuite shows no regression.

Is this ok for gcc-6-branch?

Best regards,

Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: atomic_loaddi_11_cortexr5_gcc6.patch
Type: text/x-patch
Size: 4599 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170327/0c27aafd/attachment.bin>


More information about the Gcc-patches mailing list