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] Fix PR target/13785


The problem here looks like a simple copy and paste error when David fixed some code
generation problem.


This problem only exists when compiling 64bit in 32bit userland aka -mpowerpc64.

The testcase is:
long long (*y)(int t);
long long get_alias_set (int t)
{
  return y(t);
}

OK for mainline and 3.4? Bootstrapped on powerpc-apple-darwin7.2.0 with no regressions.

This is just one step further on bootstrapping with -mcpu=G5 on darwin.

Thanks,
Andrew Pinski


ChangeLog:


	* rs6000.md (call_value): Force operand 1 not operand 0
	into a register.


Patch:


Index: rs6000.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.md,v
retrieving revision 1.284
diff -u -p -r1.284 rs6000.md
--- rs6000.md	12 Jan 2004 18:37:40 -0000	1.284
+++ rs6000.md	21 Jan 2004 20:31:44 -0000
@@ -10181,7 +10181,7 @@

       if (DEFAULT_ABI == ABI_V4
 	  || DEFAULT_ABI == ABI_DARWIN)
-	operands[0] = force_reg (Pmode, operands[0]);
+	operands[1] = force_reg (Pmode, operands[1]);

       else if (DEFAULT_ABI == ABI_AIX)
 	{


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