Re: Patches to fix optimizer bug & C++ exceptions for GCC VAX backend

2016-05-02 Thread Maciej W. Rozycki
On Tue, 26 Apr 2016, Jeff Law wrote: > > So offhand I think you need an RTL instruction splitter to express this, > > and then avoid fetching 64 bits worth of data from memory -- for the sake > > of matching the indexed addressing mode -- where you only need 32 bits. > > At the hardware

Re: Patches to fix optimizer bug & C++ exceptions for GCC VAX backend

2016-04-26 Thread Jeff Law
On 04/01/2016 01:06 PM, Jake Hamby wrote: My theory is that it has to do with liveness detection and a write into the stack frame being incorrectly seen as updating a local variable, but that could be completely wrong. I was hoping that by cc'ing gcc-patches that somebody more familiar with why

Re: Patches to fix optimizer bug & C++ exceptions for GCC VAX backend

2016-04-26 Thread Jeff Law
On 03/31/2016 02:29 PM, Jake Hamby wrote: The failures all seem to be related to trying to read a value from an array of 64-bit values and loading it into a 32-bit register. It seems like there should be a special insn defined for this sort of array access, since VAX has mova* and pusha*

Re: Patches to fix optimizer bug & C++ exceptions for GCC VAX backend

2016-04-26 Thread Jeff Law
On 04/01/2016 05:37 AM, Bernd Schmidt wrote: Cc'ing Matt Thomas who is listed as the vax maintainer; most of the patch should be reviewed by him IMO. If he is no longer active I'd frankly rather deprecate the port rather than invest effort in keeping it running. Index: gcc/except.c

Re: Patches to fix optimizer bug & C++ exceptions for GCC VAX backend

2016-04-26 Thread Jeff Law
On 04/04/2016 08:51 AM, Maciej W. Rozycki wrote: On Thu, 31 Mar 2016, Jake Hamby wrote: There's one more thing that's broken in the VAX backend which I'd *really* like to fix: GCC can't compile many of its own files at -O2, as well as a few other .c files in the NetBSD tree, because it can't

Re: Patches to fix optimizer bug & C++ exceptions for GCC VAX backend

2016-04-09 Thread Maciej W. Rozycki
On Fri, 8 Apr 2016, Jake Hamby wrote: > Thanks for the info! I've discovered a few additional clues which should > help, namely the optimizer pass that's introducing the problem. Through > process of elimination, I discovered that adding "-fno-tree-ter" will > prevent the unrecognizable insn

Re: Patches to fix optimizer bug & C++ exceptions for GCC VAX backend

2016-04-08 Thread Jake Hamby
> On Apr 4, 2016, at 07:51, Maciej W. Rozycki wrote: > > On Thu, 31 Mar 2016, Jake Hamby wrote: > >> There's one more thing that's broken in the VAX backend which I'd >> *really* like to fix: GCC can't compile many of its own files at -O2, as >> well as a few other .c

Re: Patches to fix optimizer bug & C++ exceptions for GCC VAX backend

2016-04-04 Thread Maciej W. Rozycki
On Thu, 31 Mar 2016, Jake Hamby wrote: > There's one more thing that's broken in the VAX backend which I'd > *really* like to fix: GCC can't compile many of its own files at -O2, as > well as a few other .c files in the NetBSD tree, because it can't expand > an insn pattern. The Makefiles have

Re: Patches to fix optimizer bug & C++ exceptions for GCC VAX backend

2016-04-04 Thread Jan-Benedict Glaw
On Fri, 2016-04-01 12:06:20 -0700, Jake Hamby wrote: > I apologize for the poor quality of the initial version of the patch > that I submitted. I think I may have also mangled it by not Don't apologize! Posting work early enables others to comment on it. GCC is a highly

Re: Patches to fix optimizer bug & C++ exceptions for GCC VAX backend

2016-04-01 Thread Jake Hamby
Hi, I apologize for the poor quality of the initial version of the patch that I submitted. I think I may have also mangled it by not disabling the "smart quotes" feature on my Mac before I pasted in the diff from the terminal window. I intentionally did not use gmail for fear of adding word

Re: Patches to fix optimizer bug & C++ exceptions for GCC VAX backend

2016-04-01 Thread Bernd Schmidt
Cc'ing Matt Thomas who is listed as the vax maintainer; most of the patch should be reviewed by him IMO. If he is no longer active I'd frankly rather deprecate the port rather than invest effort in keeping it running. Index: gcc/except.c

Re: Patches to fix optimizer bug & C++ exceptions for GCC VAX backend

2016-03-31 Thread Jake Hamby
Hi JBG, Thanks for the interest! Unfortunately, I need a few more days to work on this patch to clean it up and fix a few more bugs, then I'll send out a new version to NetBSD port-vax for testing, with ChangeLog entry. Please consider what I sent out earlier to be a work-in-progress at this

Re: Patches to fix optimizer bug & C++ exceptions for GCC VAX backend

2016-03-31 Thread Jeff Law
On 03/31/2016 08:30 AM, Jan-Benedict Glaw wrote: Hi Jake! On Mon, 2016-03-28 16:34:56 -0700, Jake Hamby wrote: Amazingly enough, my patch worked well enough that my NetBSD VAX kernel built with GCC 5.3 is no longer crashing. I feel pretty good about what I have so far so

Re: Patches to fix optimizer bug & C++ exceptions for GCC VAX backend

2016-03-31 Thread Jan-Benedict Glaw
Hi Jake! On Mon, 2016-03-28 16:34:56 -0700, Jake Hamby wrote: > Amazingly enough, my patch worked well enough that my NetBSD VAX > kernel built with GCC 5.3 is no longer crashing. I feel pretty good > about what I have so far so here's the complete diff for both the > C++

Patches to fix optimizer bug & C++ exceptions for GCC VAX backend

2016-03-28 Thread Jake Hamby
Amazingly enough, my patch worked well enough that my NetBSD VAX kernel built with GCC 5.3 is no longer crashing. I feel pretty good about what I have so far so here's the complete diff for both the C++ exception fix and the bad condition codes optimizer bug. It should be good enough to check