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 &

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 wra

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

2016-03-31 Thread Jake Hamby
range, and I don't understand exactly what GCC is expecting the backend to define. I'll keep working on things and as soon as I have something that I think is in a contributable state and doesn't generate bad code, I'll email it. Best regards, Jake > On Mar 31, 2016, at 07

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 in

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
, 0); + if (indirectable_address_p (xfoo0, strict, true)) + return true; +} + if (GET_CODE (x) == PRE_DEC || GET_CODE (x) == POST_INC) +{ + xfoo0 = XEXP (x, 0); + if (BASE_REGISTER_P (xfoo0, strict)) + return true; +} return false; } > On Mar 27, 2016,

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

2016-03-27 Thread Jake Hamby
be able to run the NetBSD testsuite on VAX now. It gives me a lot of confidence as to what works and what doesn't. Most of the stuff I expected to fail (like libm tests, since it's not IEEE FP) failed, and most of the rest succeeded. -Jake > On Mar 27, 2016, at 15:34, Jake Ha

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

2016-03-27 Thread Jake Hamby
can be saved later by referring to the previous value. ;; The cc attributes are intended so that this optimization may be performed. (define_attr "cc" "none,cmp_czn,cmp_zn,cmp_zn_use_c, cmp_z,cmp_z_use_czn,plus,clobber" (const_string "clobber&qu

Re: Patches to fix GCC's C++ exception_handling on NetBSD/VAX

2016-03-27 Thread Jake Hamby
ing, I believe, libm or libc or the kernel or something like that. I do have a test case for C++ exceptions on VAX, which I will send separately. Thanks, Jake > On Mar 27, 2016, at 10:08, Mikael Pettersson wrote: > > Jake Hamby writes: >> As an added bonus, I see that my patch se

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 c

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’