Re: [PATCH] rs6000: Disable generation of lwa in 32-bit mode
On Sat, Oct 27, 2012 at 06:33:34AM +0200, Segher Boessenkool wrote: some (20040709-2.c, etc.) fail with a linker error now, instead of Hmm, packed structs. If gcc is generating mis-aligned accesses using lwa or ld, that would be another TARGET_64BIT vs TARGET_POWERPC64 bug, wouldn't it? -- Alan Modra Australia Development Lab, IBM
Re: [PATCH] rs6000: Disable generation of lwa in 32-bit mode
some (20040709-2.c, etc.) fail with a linker error now, instead of Hmm, packed structs. If gcc is generating mis-aligned accesses using lwa or ld, that would be another TARGET_64BIT vs TARGET_POWERPC64 bug, wouldn't it? I have analysed it, patch on the way. The problem is LO_SUMs of misaligned symbols; we never get those in practice on 64-bit because things go via the TOC, but the problem is there in theory for 64-bit as well. Segher
Re: [PATCH] rs6000: Disable generation of lwa in 32-bit mode
On Fri, 2012-10-26 at 15:00 +1030, Alan Modra wrote: On Thu, Oct 25, 2012 at 03:57:38PM -0700, Segher Boessenkool wrote: for most others. This patch disables all lwa insns in 32-bit mode. We can later re-enable it if the assembler used handles it properly, Well, you can now do that. Mainline gas and ld are now fixed. Now that gas and ld are fixed, can we use a configure time check to see whether we're using a fixed gas/ld or not before we disable them? Peter
Re: [PATCH] rs6000: Disable generation of lwa in 32-bit mode
for most others. This patch disables all lwa insns in 32-bit mode. We can later re-enable it if the assembler used handles it properly, Well, you can now do that. Mainline gas and ld are now fixed. Yes, you are much too quick for me to keep up. Thank you! Now that gas and ld are fixed, can we use a configure time check to see whether we're using a fixed gas/ld or not before we disable them? When I wrote this patch, I thought the Darwin assembler had the same problem. No idea how I got that in my mind; it doesn't. And AIX does not support -m32 -mpowerpc64 at all (the compiler disallows it), so that is out of the picture as well. I now bootstrapped and tested with the new binutils. Most of the testcases that were fixed with my patch are fixed there as well; and some (20040709-2.c, etc.) fail with a linker error now, instead of the runtime error. Some fail that passed without either patch, but failing is correct -- wrong code sometimes runs fine :-) So I'm not applying this patch. I don't think we need a configure check: we have had many releases with these bugs already, one more won't hurt. People generally use a recent version of binutils as well. Segher
Re: [PATCH] rs6000: Disable generation of lwa in 32-bit mode
On Thu, Oct 25, 2012 at 6:57 PM, Segher Boessenkool seg...@kernel.crashing.org wrote: 2012-10-25 Segher Boessenkool seg...@kernel.crashing.org gcc/ * config/rs6000/rs6000.md (sign_extend:SI patterns): Split the memory case off. Merge the two register cases. Change the condition for the memory case to require 64-bit mode. This is okay. Thanks, David
Re: [PATCH] rs6000: Disable generation of lwa in 32-bit mode
On Thu, Oct 25, 2012 at 03:57:38PM -0700, Segher Boessenkool wrote: for most others. This patch disables all lwa insns in 32-bit mode. We can later re-enable it if the assembler used handles it properly, Well, you can now do that. Mainline gas and ld are now fixed. -- Alan Modra Australia Development Lab, IBM