Re: Patches to fix GCC’s C++ exception handling on NetBSD/VAX

2016-04-26 Thread Jeff Law
On 03/26/2016 08:38 AM, Jake Hamby wrote: Unfortunately, my previous patch that included a change to gcc/config/vax/vax.h that increased FIRST_PSEUDO_REGISTER from 16 to 17 breaks the C++ exception handling that I’d worked so hard to get right with the rest of the patch. I believe I need to de

Re: Patches to fix GCC’s C++ exception handling on NetBSD/VAX

2016-04-26 Thread Jeff Law
On 03/26/2016 05:56 AM, Jake Hamby wrote: On Mar 23, 2016, at 05:56, Christos Zoulas wrote: In article , Jake Hamby wrote: Hi, Thanks a lot for your patch. I applied it to our gcc-5 in the tree. Unfortunately gcc-5 seems that it was never tested to even compile. I fixed the simple compilati

Re: Bad CC0 optimizer in VAX backend (was Re: Patches to fix GCC’s C++ exception handling on NetBSD/VAX)

2016-04-26 Thread Jeff Law
On 03/28/2016 04:29 PM, Jake Hamby wrote: I have some bad news and some good news. The bad news is that there has been a nasty optimizer bug lurking in the VAX backend for GCC for many years, which has to do with over-optimistic removal of necessary tst/cmp instructions under certain circumstance

Re: Patches to fix GCC’s C++ exception handling on NetBSD/VAX

2016-04-26 Thread Jeff Law
On 03/26/2016 06:02 AM, Jake Hamby wrote: As an added bonus, I see that my patch set also included an old m68k patch that had been sitting in my tree, which fixes a crash when -m68040 is defined. I may have submitted it to port-m68k before. It hasn’t been tested with the new compiler either. Here

Bad CC0 optimizer in VAX backend (was Re: Patches to fix GCC’s C++ exception handling on NetBSD/VAX)

2016-03-28 Thread Jake Hamby
I have some bad news and some good news. The bad news is that there has been a nasty optimizer bug lurking in the VAX backend for GCC for many years, which has to do with over-optimistic removal of necessary tst/cmp instructions under certain circumstances. This manifests at -O or higher and the

Re: Patches to fix GCC’s C++ exception handling on NetBSD/VAX

2016-03-27 Thread Jake Hamby
The results you want to see for the test program are the following: throwtest(0) returned 0 throwtest(1) returned 1 Caught int exception: 123 Caught double exception: 123.45 Caught float exception: 678.900024 enter recursive_throw(6) calling recursive_throw(5) enter recursive_throw(5) calling

Re: Patches to fix GCC’s C++ exception handling on NetBSD/VAX

2016-03-27 Thread Jake Hamby
I'm very pleased to report that I was able to successfully build a NetBSD/vax system using the checked-in GCC 5.3, with the patches I've submitted, setting FIRST_PSEUDO_REGISTER to 17 and DWARF_FRAME_REGISTERS to 16. The kernel produced with GCC 5.3 crashes (on a real VS4000/90 and also SimH) in

Re: Patches to fix GCC’s C++ exception handling on NetBSD/VAX

2016-03-26 Thread Jake Hamby
Unfortunately, my previous patch that included a change to gcc/config/vax/vax.h that increased FIRST_PSEUDO_REGISTER from 16 to 17 breaks the C++ exception handling that I’d worked so hard to get right with the rest of the patch. I believe I need to define DWARF_FRAME_REGISTERS to 16 in the same

Re: Patches to fix GCC’s C++ exception handling on NetBSD/VAX

2016-03-26 Thread Jake Hamby
As an added bonus, I see that my patch set also included an old m68k patch that had been sitting in my tree, which fixes a crash when -m68040 is defined. I may have submitted it to port-m68k before. It hasn’t been tested with the new compiler either. Here’s that patch separately. It only matter

Re: Patches to fix GCC’s C++ exception handling on NetBSD/VAX

2016-03-26 Thread Jake Hamby
> On Mar 23, 2016, at 05:56, Christos Zoulas wrote: > > In article , > Jake Hamby wrote: > > Hi, > > Thanks a lot for your patch. I applied it to our gcc-5 in the tree. > Unfortunately gcc-5 seems that it was never tested to even compile. > I fixed the simple compilation issue, but it fails t

Re: Patches to fix GCC’s C++ exception handling on NetBSD/VAX

2016-03-23 Thread Christos Zoulas
In article , Jake Hamby wrote: Hi, Thanks a lot for your patch. I applied it to our gcc-5 in the tree. Unfortunately gcc-5 seems that it was never tested to even compile. I fixed the simple compilation issue, but it fails to compile some files with an internal error trying to construct a dwarf

Patches to fix GCC’s C++ exception handling on NetBSD/VAX

2016-03-21 Thread Jake Hamby
Hi all, For several years I’ve been eager to find the time to fix the bugs in C++ exceptions on VAX to get them working on NetBSD, because they’ve been broken for many years and it looked like only a few changes were needed to get them working. Without C++ exceptions, the NetBSD test suite can’