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]

[PATCH], rs6000, PR 64505 -- Fix issue with -m32 -mpowerpc64


This patch fixes PR 64505, which is an issue that one of the users of the
Advance Toolchain found where -m32 -mpowerpc64 generated an insn not found
message in some cases.  I traced this down to rs6000_secondary_reload
generating a reload helper that uses a DImode scratch register, when in this
case, it should use a SImode scratch register.

The attached patch fixes the problem, and causes no regressions under a PowerPC
64-bit big endian Linux system (which also tests the 32-bit code).  Is it ok
to install in the trunk?  Since the change occurs within code that I recently
modified for the upper register support, a companion patch will need to be
developed for the 4.8/4.9 branches.

I think the patch is safe, but -m32 -mpowerpc64 is not legitimate for the Linux
environment.  As I recall, Darwin running on PowerPC's is the only system that
allowed that combination.  I have added several people to the To: list of this
mail whom David says may have done something with Darwin and PowerPC.  If so,
and if you still have a system, it would be appreciated to see if these patches
are ok.

[gcc]
2015-01-05  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/64505
	* config/rs6000/rs6000.c (rs6000_secondary_reload): Return the
	correct reload handler if -m32 -mpowerpc64 is used.

[gcc/testsuite]
2015-01-05  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/64505
	* gcc.target/powerpc/pr64505.c: New file to test -m32 -mpowerpc64
	fix is correct.


-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797

Attachment: pr64505.patch01b
Description: Text document


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