Re: I've submitted 207175 for a clang 3.8.0 va_list handling problem for powerpc [fpr use also tested]

2016-02-21 Thread Mark Millard
On 2016-Feb-21, at 1:02 AM, Roman Divacky wrote: > > On Sat, Feb 20, 2016 at 03:26:58PM +0100, Dimitry Andric wrote: >> On 20 Feb 2016, at 09:34, Roman Divacky wrote: >>> Fwiw, I've just committed the patch to clang in r261422. You might want >>> to keep using a local modification or ask dim@

Re: I've submitted 207175 for a clang 3.8.0 va_list handling problem for powerpc [fpr use also tested]

2016-02-20 Thread Dimitry Andric
On 20 Feb 2016, at 09:34, Roman Divacky wrote: > Fwiw, I've just committed the patch to clang in r261422. You might want > to keep using a local modification or ask dim@ to import that patch > to our copy of 3.8. I've asked the LLVM release manager to consider merging this

Re: I've submitted 207175 for a clang 3.8.0 va_list handling problem for powerpc [fpr use also tested]

2016-02-20 Thread Mark Millard
Thanks! llvm bugzilla's 26605 did not having anything yet for this so I've copied over your note. But I've left the status alone. The next thing that I ran into looks nastier: c++'s exception handling is broken. #include int main(void) { try { throw std::exception(); } catch

Re: I've submitted 207175 for a clang 3.8.0 va_list handling problem for powerpc [fpr use also tested]

2016-02-18 Thread Mark Millard
On 2016-Feb-17, at 9:23 PM, Mark Millard wrote: > > My fpr related notes/worries about the fix were wrong. > > I finally got some time to look at this again and I see that I somehow missed > the following code when I looked before: > > // The calling convention either

Re: I've submitted 207175 for a clang 3.8.0 va_list handling problem for powerpc

2016-02-17 Thread Mark Millard
My fpr related notes/worries about the fix were wrong. I finally got some time to look at this again and I see that I somehow missed the following code when I looked before: // The calling convention either uses 1-2 GPRs or 1 FPR. Address NumRegsAddr = Address::invalid(); if (isInt ||

Re: I've submitted 207175 for a clang 3.8.0 va_list handling problem for powerpc

2016-02-16 Thread Mark Millard
By the way: Nothing tested or seen so far checks DOUBLE_OR_FLOAT handling. That involves fr (fpr in va_list in clang terms) instead of gr/gpr. fr/fpr has its own independent count and bound for using floating point registers vs. using the overflow area. There is also condition register bit 6

Re: I've submitted 207175 for a clang 3.8.0 va_list handling problem for powerpc

2016-02-16 Thread Mark Millard
I used: > Index: /usr/src/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp > === > --- /usr/src/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp > (revision 295601) > +++

Re: I've submitted 207175 for a clang 3.8.0 va_list handling problem for powerpc

2016-02-15 Thread Mark Millard
On 2016-Feb-15, at 1:20 PM, Mark Millard wrote: > > On 2016-Feb-15, at 12:18 PM, Roman Divacky wrote: >> >> On Mon, Feb 15, 2016 at 12:17:50PM -0800, Mark Millard wrote: >>> On 2016-Feb-15, at 11:11 AM, Roman Divacky wrote: Mark, I believe you're right. What do you think about this

Re: I've submitted 207175 for a clang 3.8.0 va_list handling problem for powerpc

2016-02-15 Thread Roman Divacky
On Mon, Feb 15, 2016 at 12:17:50PM -0800, Mark Millard wrote: > On 2016-Feb-15, at 11:11 AM, Roman Divacky wrote: > > > > Mark, I believe you're right. What do you think about this patch? > > > > Index: tools/clang/lib/CodeGen/TargetInfo.cpp > >

Re: I've submitted 207175 for a clang 3.8.0 va_list handling problem for powerpc

2016-02-15 Thread Mark Millard
On 2016-Feb-15, at 11:11 AM, Roman Divacky wrote: > > Mark, I believe you're right. What do you think about this patch? > > Index: tools/clang/lib/CodeGen/TargetInfo.cpp > === > --- tools/clang/lib/CodeGen/TargetInfo.cpp

Re: I've submitted 207175 for a clang 3.8.0 va_list handling problem for powerpc

2016-02-15 Thread Roman Divacky
Mark, I believe you're right. What do you think about this patch? Index: tools/clang/lib/CodeGen/TargetInfo.cpp === --- tools/clang/lib/CodeGen/TargetInfo.cpp (revision 260852) +++ tools/clang/lib/CodeGen/TargetInfo.cpp

Re: I've submitted 207175 for a clang 3.8.0 va_list handling problem for powerpc

2016-02-15 Thread Mark Millard
I'm top posting as the following can stand on its own fairly well. On Sun Feb 14 23:46:14 UTC 2016 Nathan Whitehorn wrote: > On 02/14/16 14:34, Mark Millard wrote: > > clang's code base is not familiar material for me nor do I have solid > > reference material for the FreeBSD

Re: I've submitted 207175 for a clang 3.8.0 va_list handling problem for powerpc

2016-02-14 Thread Nathan Whitehorn
On 02/14/16 14:34, Mark Millard wrote: clang's code base is not familiar material for me nor do I have solid reference material for the FreeBSD TARGET_ARCH=powerpc ABI rules so the below has my guess work involved. The following code appears to have hard wired a global, unvarying constant

Re: I've submitted 207175 for a clang 3.8.0 va_list handling problem for powerpc

2016-02-14 Thread Mark Millard
On 2016-Feb-14, at 11:29 AM, Roman Divacky wrote: > > Fwiw, the code to handle the vaarg is in > tools/clang/lib/CodeGen/TargetInfo.cpp:PPC32_SVR4_ABIInfo::EmitVAArg() > > You can take a look to see whats wrong. > > On Sat, Feb 13, 2016 at 07:03:29PM -0800, Mark Millard

Re: I've submitted 207175 for a clang 3.8.0 va_list handling problem for powerpc

2016-02-14 Thread Roman Divacky
Fwiw, the code to handle the vaarg is in tools/clang/lib/CodeGen/TargetInfo.cpp:PPC32_SVR4_ABIInfo::EmitVAArg() You can take a look to see whats wrong. On Sat, Feb 13, 2016 at 07:03:29PM -0800, Mark Millard wrote: > I've isolated another clang 3.8.0 TARGET_ARCH=powerpc SEGV problem that shows