* Patch to linux.h
@ 1999-08-02 19:21 Jason Merrill
1999-08-04 1:55 ` Jeffrey A Law
1999-08-31 22:41 ` Jason Merrill
0 siblings, 2 replies; 223+ messages in thread
From: Jason Merrill @ 1999-08-02 19:21 UTC (permalink / raw)
To: gcc-patches
We need to support this form to build MFC, for instance, and there's really
no reason not to.
Mon Aug 2 19:18:44 1999 Jason Merrill <jason@yorick.cygnus.com>
* linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define.
Index: config/linux.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/linux.h,v
retrieving revision 1.8
diff -c -p -r1.8 linux.h
*** config/linux.h 1998/12/16 20:59:55 1.8
--- config/linux.h 1999/08/03 02:19:33
***************
*** 1,5 ****
/* Definitions for Linux-based GNU systems with ELF format
! Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by Eric Youngdale.
Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org).
--- 1,5 ----
/* Definitions for Linux-based GNU systems with ELF format
! Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Contributed by Eric Youngdale.
Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org).
*************** Boston, MA 02111-1307, USA. */
*** 113,115 ****
--- 110,115 ----
%{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \
%{!p:%{!pg:%{!g*:-lc} %{g*:-lg}}}}"
#endif
+
+ /* Define this so we can compile MS code for use with WINE. */
+ #define HANDLE_PRAGMA_PACK_PUSH_POP
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-02 19:21 Patch to linux.h Jason Merrill
@ 1999-08-04 1:55 ` Jeffrey A Law
1999-08-12 4:55 ` Gerald Pfeifer
1999-08-31 22:41 ` Jeffrey A Law
1999-08-31 22:41 ` Jason Merrill
1 sibling, 2 replies; 223+ messages in thread
From: Jeffrey A Law @ 1999-08-04 1:55 UTC (permalink / raw)
To: Jason Merrill; +Cc: gcc-patches
In message < 199908030221.TAA01018@yorick.cygnus.com >you write:
> We need to support this form to build MFC, for instance, and there's really
> no reason not to.
>
> Mon Aug 2 19:18:44 1999 Jason Merrill <jason@yorick.cygnus.com>
>
> * linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define.
Seems reasonable to me. Please install it.
Thanks,
jeff
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-04 1:55 ` Jeffrey A Law
@ 1999-08-12 4:55 ` Gerald Pfeifer
1999-08-12 9:36 ` Jason Merrill
1999-08-31 22:41 ` Gerald Pfeifer
1999-08-31 22:41 ` Jeffrey A Law
1 sibling, 2 replies; 223+ messages in thread
From: Gerald Pfeifer @ 1999-08-12 4:55 UTC (permalink / raw)
To: Jeffrey A Law; +Cc: Jason Merrill, gcc-patches
On Wed, 4 Aug 1999, Jeffrey A Law wrote:
>> We need to support this form to build MFC, for instance, and there's really
>> no reason not to.
>>
>> Mon Aug 2 19:18:44 1999 Jason Merrill <jason@yorick.cygnus.com>
>>
>> * linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define.
> Seems reasonable to me. Please install it.
Why is this going into linux.h but not into the FreeBSD config files as
well?
+
+ /* Define this so we can compile MS code for use with WINE. */
+ #define HANDLE_PRAGMA_PACK_PUSH_POP
FreeBSD runs Wine as well, but I am afraid that your patch will sooner
or later cause the Wine sources to break on FreeBSD.
Gerald
--
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-12 4:55 ` Gerald Pfeifer
@ 1999-08-12 9:36 ` Jason Merrill
1999-08-12 9:54 ` Franz Sirl
` (2 more replies)
1999-08-31 22:41 ` Gerald Pfeifer
1 sibling, 3 replies; 223+ messages in thread
From: Jason Merrill @ 1999-08-12 9:36 UTC (permalink / raw)
To: Gerald Pfeifer; +Cc: Jeffrey A Law, gcc-patches
>>>>> Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> writes:
> On Wed, 4 Aug 1999, Jeffrey A Law wrote:
>>> We need to support this form to build MFC, for instance, and there's really
>>> no reason not to.
>>>
>>> Mon Aug 2 19:18:44 1999 Jason Merrill <jason@yorick.cygnus.com>
>>>
>>> * linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define.
>> Seems reasonable to me. Please install it.
> Why is this going into linux.h but not into the FreeBSD config files as
> well?
Feel free to apply it there as well.
Jason
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-12 9:36 ` Jason Merrill
@ 1999-08-12 9:54 ` Franz Sirl
1999-08-12 12:14 ` Jeffrey A Law
1999-08-31 22:41 ` Franz Sirl
1999-08-16 8:57 ` Gerald Pfeifer
1999-08-31 22:41 ` Jason Merrill
2 siblings, 2 replies; 223+ messages in thread
From: Franz Sirl @ 1999-08-12 9:54 UTC (permalink / raw)
To: Jason Merrill; +Cc: Gerald Pfeifer, Jeffrey A Law, gcc-patches
At 18:36 12.08.99 , Jason Merrill wrote:
> >>>>> Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> writes:
>
> > On Wed, 4 Aug 1999, Jeffrey A Law wrote:
> >>> We need to support this form to build MFC, for instance, and there's
> really
> >>> no reason not to.
> >>>
> >>> Mon Aug 2 19:18:44 1999 Jason Merrill <jason@yorick.cygnus.com>
> >>>
> >>> * linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define.
> >> Seems reasonable to me. Please install it.
>
> > Why is this going into linux.h but not into the FreeBSD config files as
> > well?
>
>Feel free to apply it there as well.
Does this patch make sense for non-x86 linux platforms too? A lot of them
don't include the global linux.h (it has much x86 specific stuff and
includes svr4.h :-(, I believe this will go away with the new configure
driven include scheme), but have their own local free-standing linux.h.
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-12 9:54 ` Franz Sirl
@ 1999-08-12 12:14 ` Jeffrey A Law
1999-08-12 16:09 ` Franz Sirl
` (2 more replies)
1999-08-31 22:41 ` Franz Sirl
1 sibling, 3 replies; 223+ messages in thread
From: Jeffrey A Law @ 1999-08-12 12:14 UTC (permalink / raw)
To: Franz Sirl; +Cc: Jason Merrill, Gerald Pfeifer, gcc-patches
In message < 4.2.0.58.19990812184531.046bb670@mail.lauterbach.com >you write:
> Does this patch make sense for non-x86 linux platforms too? A lot of them
> don't include the global linux.h (it has much x86 specific stuff and
> includes svr4.h :-(, I believe this will go away with the new configure
> driven include scheme), but have their own local free-standing linux.h.
I do not believe it's that generally useful, except for maybe alpha-linux.
Those features are for porting Windows applications if I remember correctly.
jeff
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-12 12:14 ` Jeffrey A Law
@ 1999-08-12 16:09 ` Franz Sirl
1999-08-13 2:06 ` Philip Blundell
1999-08-31 22:41 ` Franz Sirl
1999-08-12 18:08 ` Jason Merrill
1999-08-31 22:41 ` Jeffrey A Law
2 siblings, 2 replies; 223+ messages in thread
From: Franz Sirl @ 1999-08-12 16:09 UTC (permalink / raw)
To: law; +Cc: Jason Merrill, Gerald Pfeifer, gcc-patches
Am Don, 12 Aug 1999 schrieb Jeffrey A Law:
>In message < 4.2.0.58.19990812184531.046bb670@mail.lauterbach.com >you write:
> > Does this patch make sense for non-x86 linux platforms too? A lot of them
> > don't include the global linux.h (it has much x86 specific stuff and
> > includes svr4.h :-(, I believe this will go away with the new configure
> > driven include scheme), but have their own local free-standing linux.h.
>I do not believe it's that generally useful, except for maybe alpha-linux.
>
>Those features are for porting Windows applications if I remember correctly.
Well, then I would believe this macro doesn't belong in linux.h, but in
i386/linux*.h and alpha/linux*.h? I don't want to be picky here, I just keep an
eye on the changes in linux.h since Linux/PPC was bitten by not defining
NO_IMPLICIT_EXTERN_C :-(, and due to the other x86-specific clutter (eg.
*_SPEC) in linux.h it's hard to see what's really important in there.
Hmm, maybe I should convert all linux platforms to the configure based
include scheme now? Or is anybody already working on that? As I understand this
scheme all include file chaining is done via a list setup by configure then?
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-12 12:14 ` Jeffrey A Law
1999-08-12 16:09 ` Franz Sirl
@ 1999-08-12 18:08 ` Jason Merrill
1999-08-13 2:57 ` Gerald Pfeifer
1999-08-31 22:41 ` Jason Merrill
1999-08-31 22:41 ` Jeffrey A Law
2 siblings, 2 replies; 223+ messages in thread
From: Jason Merrill @ 1999-08-12 18:08 UTC (permalink / raw)
To: law; +Cc: Franz Sirl, Gerald Pfeifer, gcc-patches
>>>>> Jeffrey A Law <law@cygnus.com> writes:
> In message < 4.2.0.58.19990812184531.046bb670@mail.lauterbach.com >you write:
>> Does this patch make sense for non-x86 linux platforms too? A lot of them
>> don't include the global linux.h (it has much x86 specific stuff and
>> includes svr4.h :-(, I believe this will go away with the new configure
>> driven include scheme), but have their own local free-standing linux.h.
> I do not believe it's that generally useful, except for maybe alpha-linux.
> Those features are for porting Windows applications if I remember correctly.
I thought WINE supported non-x86 targets, but I may be wrong.
Jason
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-12 16:09 ` Franz Sirl
@ 1999-08-13 2:06 ` Philip Blundell
1999-08-13 2:19 ` Franz Sirl
1999-08-31 22:41 ` Philip Blundell
1999-08-31 22:41 ` Franz Sirl
1 sibling, 2 replies; 223+ messages in thread
From: Philip Blundell @ 1999-08-13 2:06 UTC (permalink / raw)
To: Franz Sirl; +Cc: scottb, gcc-patches
Franz Sirl wrote:
>I don't want to be picky here, I just keep an
>eye on the changes in linux.h since Linux/PPC was bitten by not defining
>NO_IMPLICIT_EXTERN_C :-(,
Ho, hum. Linux/ARM doesn't define that either from what I can see.
p.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-13 2:06 ` Philip Blundell
@ 1999-08-13 2:19 ` Franz Sirl
1999-08-13 2:29 ` Philip Blundell
1999-08-31 22:41 ` Franz Sirl
1999-08-31 22:41 ` Philip Blundell
1 sibling, 2 replies; 223+ messages in thread
From: Franz Sirl @ 1999-08-13 2:19 UTC (permalink / raw)
To: Philip Blundell; +Cc: scottb, gcc-patches
At 11:01 13.08.99 , Philip Blundell wrote:
>Franz Sirl wrote:
>
> >I don't want to be picky here, I just keep an
> >eye on the changes in linux.h since Linux/PPC was bitten by not defining
> >NO_IMPLICIT_EXTERN_C :-(,
>
>Ho, hum. Linux/ARM doesn't define that either from what I can see.
Given you would work on a RH60 based system, you will have a hard time
compiling KDE with prefix=/usr then. Without this macro g++ considers all
system include dirs as C++ unaware and implicitly wraps them with extern
"C", which is certainly not what you want if you have a C++ header in there
:-).
That's why it would be a good thing to clean up linux.h and convert all
linux platforms to the configure driven include scheme. Then we all can
finally use linux.h as it is meant to be.
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-13 2:19 ` Franz Sirl
@ 1999-08-13 2:29 ` Philip Blundell
1999-08-31 22:41 ` Philip Blundell
1999-08-31 22:41 ` Franz Sirl
1 sibling, 1 reply; 223+ messages in thread
From: Philip Blundell @ 1999-08-13 2:29 UTC (permalink / raw)
To: Franz Sirl; +Cc: scottb, gcc-patches
Franz.Sirl-kernel@lauterbach.com said:
>That's why it would be a good thing to clean up linux.h and convert all
>linux platforms to the configure driven include scheme. Then we all can
>finally use linux.h as it is meant to be.
I agree. I have been meaning to do this for ages but never managed to find
the time. Please do go ahead with this work.
p.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-12 18:08 ` Jason Merrill
@ 1999-08-13 2:57 ` Gerald Pfeifer
1999-08-31 22:41 ` Gerald Pfeifer
1999-08-31 22:41 ` Jason Merrill
1 sibling, 1 reply; 223+ messages in thread
From: Gerald Pfeifer @ 1999-08-13 2:57 UTC (permalink / raw)
To: Jason Merrill; +Cc: law, Franz Sirl, gcc-patches
On 12 Aug 1999, Jason Merrill wrote:
>> I do not believe it's that generally useful, except for maybe alpha-linux.
>> Those features are for porting Windows applications if I remember correctly.
> I thought WINE supported non-x86 targets, but I may be wrong.
WINE itself does not, but WINELIB (which is part of Wine) can be used to
provide source code compatibility, as far as I understand, so having these
features on non-x86 targets might make sense.
Gerald
--
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-12 9:36 ` Jason Merrill
1999-08-12 9:54 ` Franz Sirl
@ 1999-08-16 8:57 ` Gerald Pfeifer
1999-08-31 22:41 ` Gerald Pfeifer
1999-08-31 22:41 ` Jason Merrill
2 siblings, 1 reply; 223+ messages in thread
From: Gerald Pfeifer @ 1999-08-16 8:57 UTC (permalink / raw)
To: gcc-patches
Cc: Jason Merrill, Jeffrey A Law, David O'Brien, Loren James Rittle
[ Cc: to GCC/FreeBSD folks added. ]
On 12 Aug 1999, Jason Merrill wrote:
>>>> * linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define.
>>> Seems reasonable to me. Please install it.
>> Why is this going into linux.h but not into the FreeBSD config files as
>> well?
> Feel free to apply it there as well.
This is what I put in:
Fri Aug 13 15:20:43 1999 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
* config/i386/freebsd.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define.
Index: gcc/config/i386/freebsd.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/freebsd.h,v
retrieving revision 1.14
diff -r1.14 freebsd.h
3c3,4
< Copyright (C) 1988, 1992, 1994, 1996, 1997 Free Software Foundation, Inc.
---
> Copyright (C) 1988, 1992, 1994, 1996, 1997, 1999 Free Software
> Foundation, Inc.
247a249,251
>
> /* Define this so we can compile MS code for use with WINE. */
> #define HANDLE_PRAGMA_PACK_PUSH_POP
^ permalink raw reply [flat|nested] 223+ messages in thread
* Patch to linux.h
1999-08-02 19:21 Patch to linux.h Jason Merrill
1999-08-04 1:55 ` Jeffrey A Law
@ 1999-08-31 22:41 ` Jason Merrill
1 sibling, 0 replies; 223+ messages in thread
From: Jason Merrill @ 1999-08-31 22:41 UTC (permalink / raw)
To: gcc-patches
We need to support this form to build MFC, for instance, and there's really
no reason not to.
Mon Aug 2 19:18:44 1999 Jason Merrill <jason@yorick.cygnus.com>
* linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define.
Index: config/linux.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/linux.h,v
retrieving revision 1.8
diff -c -p -r1.8 linux.h
*** config/linux.h 1998/12/16 20:59:55 1.8
--- config/linux.h 1999/08/03 02:19:33
***************
*** 1,5 ****
/* Definitions for Linux-based GNU systems with ELF format
! Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by Eric Youngdale.
Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org).
--- 1,5 ----
/* Definitions for Linux-based GNU systems with ELF format
! Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Contributed by Eric Youngdale.
Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org).
*************** Boston, MA 02111-1307, USA. */
*** 113,115 ****
--- 110,115 ----
%{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \
%{!p:%{!pg:%{!g*:-lc} %{g*:-lg}}}}"
#endif
+
+ /* Define this so we can compile MS code for use with WINE. */
+ #define HANDLE_PRAGMA_PACK_PUSH_POP
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-16 8:57 ` Gerald Pfeifer
@ 1999-08-31 22:41 ` Gerald Pfeifer
0 siblings, 0 replies; 223+ messages in thread
From: Gerald Pfeifer @ 1999-08-31 22:41 UTC (permalink / raw)
To: gcc-patches
Cc: Jason Merrill, Jeffrey A Law, David O'Brien, Loren James Rittle
[ Cc: to GCC/FreeBSD folks added. ]
On 12 Aug 1999, Jason Merrill wrote:
>>>> * linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define.
>>> Seems reasonable to me. Please install it.
>> Why is this going into linux.h but not into the FreeBSD config files as
>> well?
> Feel free to apply it there as well.
This is what I put in:
Fri Aug 13 15:20:43 1999 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
* config/i386/freebsd.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define.
Index: gcc/config/i386/freebsd.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/freebsd.h,v
retrieving revision 1.14
diff -r1.14 freebsd.h
3c3,4
< Copyright (C) 1988, 1992, 1994, 1996, 1997 Free Software Foundation, Inc.
---
> Copyright (C) 1988, 1992, 1994, 1996, 1997, 1999 Free Software
> Foundation, Inc.
247a249,251
>
> /* Define this so we can compile MS code for use with WINE. */
> #define HANDLE_PRAGMA_PACK_PUSH_POP
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-12 9:36 ` Jason Merrill
1999-08-12 9:54 ` Franz Sirl
1999-08-16 8:57 ` Gerald Pfeifer
@ 1999-08-31 22:41 ` Jason Merrill
2 siblings, 0 replies; 223+ messages in thread
From: Jason Merrill @ 1999-08-31 22:41 UTC (permalink / raw)
To: Gerald Pfeifer; +Cc: Jeffrey A Law, gcc-patches
>>>>> Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> writes:
> On Wed, 4 Aug 1999, Jeffrey A Law wrote:
>>> We need to support this form to build MFC, for instance, and there's really
>>> no reason not to.
>>>
>>> Mon Aug 2 19:18:44 1999 Jason Merrill <jason@yorick.cygnus.com>
>>>
>>> * linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define.
>> Seems reasonable to me. Please install it.
> Why is this going into linux.h but not into the FreeBSD config files as
> well?
Feel free to apply it there as well.
Jason
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-13 2:57 ` Gerald Pfeifer
@ 1999-08-31 22:41 ` Gerald Pfeifer
0 siblings, 0 replies; 223+ messages in thread
From: Gerald Pfeifer @ 1999-08-31 22:41 UTC (permalink / raw)
To: Jason Merrill; +Cc: law, Franz Sirl, gcc-patches
On 12 Aug 1999, Jason Merrill wrote:
>> I do not believe it's that generally useful, except for maybe alpha-linux.
>> Those features are for porting Windows applications if I remember correctly.
> I thought WINE supported non-x86 targets, but I may be wrong.
WINE itself does not, but WINELIB (which is part of Wine) can be used to
provide source code compatibility, as far as I understand, so having these
features on non-x86 targets might make sense.
Gerald
--
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-12 18:08 ` Jason Merrill
1999-08-13 2:57 ` Gerald Pfeifer
@ 1999-08-31 22:41 ` Jason Merrill
1 sibling, 0 replies; 223+ messages in thread
From: Jason Merrill @ 1999-08-31 22:41 UTC (permalink / raw)
To: law; +Cc: Franz Sirl, Gerald Pfeifer, gcc-patches
>>>>> Jeffrey A Law <law@cygnus.com> writes:
> In message < 4.2.0.58.19990812184531.046bb670@mail.lauterbach.com >you write:
>> Does this patch make sense for non-x86 linux platforms too? A lot of them
>> don't include the global linux.h (it has much x86 specific stuff and
>> includes svr4.h :-(, I believe this will go away with the new configure
>> driven include scheme), but have their own local free-standing linux.h.
> I do not believe it's that generally useful, except for maybe alpha-linux.
> Those features are for porting Windows applications if I remember correctly.
I thought WINE supported non-x86 targets, but I may be wrong.
Jason
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-12 16:09 ` Franz Sirl
1999-08-13 2:06 ` Philip Blundell
@ 1999-08-31 22:41 ` Franz Sirl
1 sibling, 0 replies; 223+ messages in thread
From: Franz Sirl @ 1999-08-31 22:41 UTC (permalink / raw)
To: law; +Cc: Jason Merrill, Gerald Pfeifer, gcc-patches
Am Don, 12 Aug 1999 schrieb Jeffrey A Law:
>In message < 4.2.0.58.19990812184531.046bb670@mail.lauterbach.com >you write:
> > Does this patch make sense for non-x86 linux platforms too? A lot of them
> > don't include the global linux.h (it has much x86 specific stuff and
> > includes svr4.h :-(, I believe this will go away with the new configure
> > driven include scheme), but have their own local free-standing linux.h.
>I do not believe it's that generally useful, except for maybe alpha-linux.
>
>Those features are for porting Windows applications if I remember correctly.
Well, then I would believe this macro doesn't belong in linux.h, but in
i386/linux*.h and alpha/linux*.h? I don't want to be picky here, I just keep an
eye on the changes in linux.h since Linux/PPC was bitten by not defining
NO_IMPLICIT_EXTERN_C :-(, and due to the other x86-specific clutter (eg.
*_SPEC) in linux.h it's hard to see what's really important in there.
Hmm, maybe I should convert all linux platforms to the configure based
include scheme now? Or is anybody already working on that? As I understand this
scheme all include file chaining is done via a list setup by configure then?
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-13 2:19 ` Franz Sirl
1999-08-13 2:29 ` Philip Blundell
@ 1999-08-31 22:41 ` Franz Sirl
1 sibling, 0 replies; 223+ messages in thread
From: Franz Sirl @ 1999-08-31 22:41 UTC (permalink / raw)
To: Philip Blundell; +Cc: scottb, gcc-patches
At 11:01 13.08.99 , Philip Blundell wrote:
>Franz Sirl wrote:
>
> >I don't want to be picky here, I just keep an
> >eye on the changes in linux.h since Linux/PPC was bitten by not defining
> >NO_IMPLICIT_EXTERN_C :-(,
>
>Ho, hum. Linux/ARM doesn't define that either from what I can see.
Given you would work on a RH60 based system, you will have a hard time
compiling KDE with prefix=/usr then. Without this macro g++ considers all
system include dirs as C++ unaware and implicitly wraps them with extern
"C", which is certainly not what you want if you have a C++ header in there
:-).
That's why it would be a good thing to clean up linux.h and convert all
linux platforms to the configure driven include scheme. Then we all can
finally use linux.h as it is meant to be.
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-12 4:55 ` Gerald Pfeifer
1999-08-12 9:36 ` Jason Merrill
@ 1999-08-31 22:41 ` Gerald Pfeifer
1 sibling, 0 replies; 223+ messages in thread
From: Gerald Pfeifer @ 1999-08-31 22:41 UTC (permalink / raw)
To: Jeffrey A Law; +Cc: Jason Merrill, gcc-patches
On Wed, 4 Aug 1999, Jeffrey A Law wrote:
>> We need to support this form to build MFC, for instance, and there's really
>> no reason not to.
>>
>> Mon Aug 2 19:18:44 1999 Jason Merrill <jason@yorick.cygnus.com>
>>
>> * linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define.
> Seems reasonable to me. Please install it.
Why is this going into linux.h but not into the FreeBSD config files as
well?
+
+ /* Define this so we can compile MS code for use with WINE. */
+ #define HANDLE_PRAGMA_PACK_PUSH_POP
FreeBSD runs Wine as well, but I am afraid that your patch will sooner
or later cause the Wine sources to break on FreeBSD.
Gerald
--
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-04 1:55 ` Jeffrey A Law
1999-08-12 4:55 ` Gerald Pfeifer
@ 1999-08-31 22:41 ` Jeffrey A Law
1 sibling, 0 replies; 223+ messages in thread
From: Jeffrey A Law @ 1999-08-31 22:41 UTC (permalink / raw)
To: Jason Merrill; +Cc: gcc-patches
In message < 199908030221.TAA01018@yorick.cygnus.com >you write:
> We need to support this form to build MFC, for instance, and there's really
> no reason not to.
>
> Mon Aug 2 19:18:44 1999 Jason Merrill <jason@yorick.cygnus.com>
>
> * linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define.
Seems reasonable to me. Please install it.
Thanks,
jeff
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-12 12:14 ` Jeffrey A Law
1999-08-12 16:09 ` Franz Sirl
1999-08-12 18:08 ` Jason Merrill
@ 1999-08-31 22:41 ` Jeffrey A Law
2 siblings, 0 replies; 223+ messages in thread
From: Jeffrey A Law @ 1999-08-31 22:41 UTC (permalink / raw)
To: Franz Sirl; +Cc: Jason Merrill, Gerald Pfeifer, gcc-patches
In message < 4.2.0.58.19990812184531.046bb670@mail.lauterbach.com >you write:
> Does this patch make sense for non-x86 linux platforms too? A lot of them
> don't include the global linux.h (it has much x86 specific stuff and
> includes svr4.h :-(, I believe this will go away with the new configure
> driven include scheme), but have their own local free-standing linux.h.
I do not believe it's that generally useful, except for maybe alpha-linux.
Those features are for porting Windows applications if I remember correctly.
jeff
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-13 2:06 ` Philip Blundell
1999-08-13 2:19 ` Franz Sirl
@ 1999-08-31 22:41 ` Philip Blundell
1 sibling, 0 replies; 223+ messages in thread
From: Philip Blundell @ 1999-08-31 22:41 UTC (permalink / raw)
To: Franz Sirl; +Cc: scottb, gcc-patches
Franz Sirl wrote:
>I don't want to be picky here, I just keep an
>eye on the changes in linux.h since Linux/PPC was bitten by not defining
>NO_IMPLICIT_EXTERN_C :-(,
Ho, hum. Linux/ARM doesn't define that either from what I can see.
p.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-12 9:54 ` Franz Sirl
1999-08-12 12:14 ` Jeffrey A Law
@ 1999-08-31 22:41 ` Franz Sirl
1 sibling, 0 replies; 223+ messages in thread
From: Franz Sirl @ 1999-08-31 22:41 UTC (permalink / raw)
To: Jason Merrill; +Cc: Gerald Pfeifer, Jeffrey A Law, gcc-patches
At 18:36 12.08.99 , Jason Merrill wrote:
> >>>>> Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> writes:
>
> > On Wed, 4 Aug 1999, Jeffrey A Law wrote:
> >>> We need to support this form to build MFC, for instance, and there's
> really
> >>> no reason not to.
> >>>
> >>> Mon Aug 2 19:18:44 1999 Jason Merrill <jason@yorick.cygnus.com>
> >>>
> >>> * linux.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define.
> >> Seems reasonable to me. Please install it.
>
> > Why is this going into linux.h but not into the FreeBSD config files as
> > well?
>
>Feel free to apply it there as well.
Does this patch make sense for non-x86 linux platforms too? A lot of them
don't include the global linux.h (it has much x86 specific stuff and
includes svr4.h :-(, I believe this will go away with the new configure
driven include scheme), but have their own local free-standing linux.h.
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch to linux.h
1999-08-13 2:29 ` Philip Blundell
@ 1999-08-31 22:41 ` Philip Blundell
0 siblings, 0 replies; 223+ messages in thread
From: Philip Blundell @ 1999-08-31 22:41 UTC (permalink / raw)
To: Franz Sirl; +Cc: scottb, gcc-patches
Franz.Sirl-kernel@lauterbach.com said:
>That's why it would be a good thing to clean up linux.h and convert all
>linux platforms to the configure driven include scheme. Then we all can
>finally use linux.h as it is meant to be.
I agree. I have been meaning to do this for ages but never managed to find
the time. Please do go ahead with this work.
p.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Bootstrap failure with enable-checking in current CVS (varasm.c: 3423)
[not found] <u8so2qxmij.fsf@gromit.rhein-neckar.de>
@ 1999-11-03 4:09 ` Franz Sirl
1999-11-03 5:02 ` Franz Sirl
` (2 more replies)
0 siblings, 3 replies; 223+ messages in thread
From: Franz Sirl @ 1999-11-03 4:09 UTC (permalink / raw)
To: Andreas Jaeger; +Cc: gcc-bugs, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 1042 bytes --]
At 16:24 01.11.99 , Andreas Jaeger wrote:
>With the current CVS version (updated at 19991101 13:00 UTC) I get a
>bootstrap failure with --enable-checking:
Welcome to the club :-). I think the appended patch is the correct
solution, as, according to the documentation and the comment, a SYMBOL_REF
contains a string, whereas a LABEL_REF contains an expression.
>(gdb) p *x
>$4 = {code = SYMBOL_REF, mode = SImode, jump = 0, call = 0, unchanging =
>1, volatil = 0, in_struct = 0, used = 0, integrated = 0,
> frame_related = 0, fld = {{rtwint = 1075316040, rtint = 1075316040,
> rtstr = 0x40180548 "*.LC1", rtx = 0x40180548, rtvec = 0x40180548,
> rttype = 1075316040, rt_addr_diff_vec_flags = {min_align = 72,
> base_after_vec = 1, min_after_vec = 0, max_after_vec = 1,
> min_after_base = 0, max_after_base = 0, offset_unsigned = 0, 0,
> scale = 24}, rtbit = 0x40180548, rttree = 0x40180548,
> bb = 0x40180548}}}
You might try "p debug_rtx(x)" here, in case you don't know this handy
little routine :-).
Franz.
[-- Attachment #2: varasm.patch --]
[-- Type: text/x-diff, Size: 825 bytes --]
Index: gcc/varasm.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/varasm.c,v
retrieving revision 1.86
diff -u -p -r1.86 varasm.c
--- varasm.c 1999/11/01 19:38:06 1.86
+++ varasm.c 1999/11/03 11:56:07
@@ -3416,10 +3416,13 @@ decode_rtx_const (mode, x, value)
switch (GET_CODE (value->un.addr.base))
{
case SYMBOL_REF:
- case LABEL_REF:
/* Use the string's address, not the SYMBOL_REF's address,
- for the sake of addresses of library routines.
- For a LABEL_REF, compare labels. */
+ for the sake of addresses of library routines. */
+ value->un.addr.base = XSTR (value->un.addr.base, 0);
+ break;
+
+ case LABEL_REF:
+ /* For a LABEL_REF, compare labels. */
value->un.addr.base = XEXP (value->un.addr.base, 0);
default:
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Bootstrap failure with enable-checking in current CVS (varasm.c: 3423)
1999-11-03 4:09 ` Bootstrap failure with enable-checking in current CVS (varasm.c: 3423) Franz Sirl
@ 1999-11-03 5:02 ` Franz Sirl
1999-11-03 10:42 ` Richard Henderson
1999-11-30 23:59 ` Franz Sirl
1999-11-03 23:16 ` Andreas Jaeger
1999-11-30 23:59 ` Franz Sirl
2 siblings, 2 replies; 223+ messages in thread
From: Franz Sirl @ 1999-11-03 5:02 UTC (permalink / raw)
To: Andreas Jaeger; +Cc: gcc-bugs, gcc-patches
At 13:09 03.11.99 , Franz Sirl wrote:
>At 16:24 01.11.99 , Andreas Jaeger wrote:
>
>>With the current CVS version (updated at 19991101 13:00 UTC) I get a
>>bootstrap failure with --enable-checking:
>
>Welcome to the club :-). I think the appended patch is the correct
>solution, as, according to the documentation and the comment, a SYMBOL_REF
>contains a string, whereas a LABEL_REF contains an expression.
Oops, forgot the changelog entry:
* varasm.c (decode_rtx_const): use XSTR to access the string
of a SYMBOL_REF
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Bootstrap failure with enable-checking in current CVS (varasm.c: 3423)
1999-11-03 5:02 ` Franz Sirl
@ 1999-11-03 10:42 ` Richard Henderson
1999-11-30 23:59 ` Richard Henderson
1999-11-30 23:59 ` Franz Sirl
1 sibling, 1 reply; 223+ messages in thread
From: Richard Henderson @ 1999-11-03 10:42 UTC (permalink / raw)
To: Franz Sirl; +Cc: Andreas Jaeger, gcc-bugs, gcc-patches
On Wed, Nov 03, 1999 at 02:01:53PM +0100, Franz Sirl wrote:
> * varasm.c (decode_rtx_const): use XSTR to access the string
> of a SYMBOL_REF
Applied.
r~
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Bootstrap failure with enable-checking in current CVS (varasm.c: 3423)
1999-11-03 4:09 ` Bootstrap failure with enable-checking in current CVS (varasm.c: 3423) Franz Sirl
1999-11-03 5:02 ` Franz Sirl
@ 1999-11-03 23:16 ` Andreas Jaeger
1999-11-04 6:03 ` Franz Sirl
1999-11-30 23:59 ` Andreas Jaeger
1999-11-30 23:59 ` Franz Sirl
2 siblings, 2 replies; 223+ messages in thread
From: Andreas Jaeger @ 1999-11-03 23:16 UTC (permalink / raw)
To: Franz Sirl; +Cc: gcc-bugs, gcc-patches
>>>>> Franz Sirl writes:
> At 16:24 01.11.99 , Andreas Jaeger wrote:
>> With the current CVS version (updated at 19991101 13:00 UTC) I get a
>> bootstrap failure with --enable-checking:
> Welcome to the club :-). I think the appended patch is the correct
> solution, as, according to the documentation and the comment, a SYMBOL_REF
> contains a string, whereas a LABEL_REF contains an expression.
Thanks. The patch fixed the problem - and bootstraping ends in the
java frontend (see my message "ICE in Java frontend with
--enable-checking (lastfile in gcc/dbxout.c invalid)" - I should have
written while compiling Java frontend).
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.rhein-neckar.de
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Bootstrap failure with enable-checking in current CVS (varasm.c: 3423)
1999-11-03 23:16 ` Andreas Jaeger
@ 1999-11-04 6:03 ` Franz Sirl
1999-11-30 23:59 ` Franz Sirl
1999-11-30 23:59 ` Andreas Jaeger
1 sibling, 1 reply; 223+ messages in thread
From: Franz Sirl @ 1999-11-04 6:03 UTC (permalink / raw)
To: Andreas Jaeger; +Cc: gcc-bugs, gcc-patches
At 08:16 04.11.99 , Andreas Jaeger wrote:
> >>>>> Franz Sirl writes:
>
> > At 16:24 01.11.99 , Andreas Jaeger wrote:
> >> With the current CVS version (updated at 19991101 13:00 UTC) I get a
> >> bootstrap failure with --enable-checking:
>
> > Welcome to the club :-). I think the appended patch is the correct
> > solution, as, according to the documentation and the comment, a
> SYMBOL_REF
> > contains a string, whereas a LABEL_REF contains an expression.
>
>Thanks. The patch fixed the problem - and bootstraping ends in the
>java frontend (see my message "ICE in Java frontend with
>--enable-checking (lastfile in gcc/dbxout.c invalid)" - I should have
>written while compiling Java frontend).
Good to know this happens on other platforms too. I see this 'lastfile'
corruption already during stage2 of a --enable-checking build on
powerpc-linux-gnu:
stage1/xgcc -Bstage1/ -B/home/fsirl/gnubin/ppc-redhat-linux/bin/
-c -DIN_GCC -W -Wall -O2 -g -O2 -DHAVE_CONFIG_H -I. -I../../../cvsx/gcc
m/gcc -I../../../cvsx/gccm/gcc/config -I../../../cvsx/gccm/gcc/../include
../../../cvsx/gccm/gcc/varasm.c
../../../cvsx/gccm/gcc/varasm.c: In function `assemble_variable':
../../../cvsx/gccm/gcc/varasm.c:1480: warning: comparison between signed
and unsigned
../../../cvsx/gccm/gcc/varasm.c:1484: warning: comparison between signed
and unsigned
xgcc: Internal compiler error: program cc1 got fatal signal 11
make[2]: *** [varasm.o] Error 1
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Bootstrap failure with enable-checking in current CVS (varasm.c: 3423)
1999-11-03 4:09 ` Bootstrap failure with enable-checking in current CVS (varasm.c: 3423) Franz Sirl
1999-11-03 5:02 ` Franz Sirl
1999-11-03 23:16 ` Andreas Jaeger
@ 1999-11-30 23:59 ` Franz Sirl
2 siblings, 0 replies; 223+ messages in thread
From: Franz Sirl @ 1999-11-30 23:59 UTC (permalink / raw)
To: Andreas Jaeger; +Cc: gcc-bugs, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 1042 bytes --]
At 16:24 01.11.99 , Andreas Jaeger wrote:
>With the current CVS version (updated at 19991101 13:00 UTC) I get a
>bootstrap failure with --enable-checking:
Welcome to the club :-). I think the appended patch is the correct
solution, as, according to the documentation and the comment, a SYMBOL_REF
contains a string, whereas a LABEL_REF contains an expression.
>(gdb) p *x
>$4 = {code = SYMBOL_REF, mode = SImode, jump = 0, call = 0, unchanging =
>1, volatil = 0, in_struct = 0, used = 0, integrated = 0,
> frame_related = 0, fld = {{rtwint = 1075316040, rtint = 1075316040,
> rtstr = 0x40180548 "*.LC1", rtx = 0x40180548, rtvec = 0x40180548,
> rttype = 1075316040, rt_addr_diff_vec_flags = {min_align = 72,
> base_after_vec = 1, min_after_vec = 0, max_after_vec = 1,
> min_after_base = 0, max_after_base = 0, offset_unsigned = 0, 0,
> scale = 24}, rtbit = 0x40180548, rttree = 0x40180548,
> bb = 0x40180548}}}
You might try "p debug_rtx(x)" here, in case you don't know this handy
little routine :-).
Franz.
[-- Attachment #2: varasm.patch --]
[-- Type: text/x-diff, Size: 825 bytes --]
Index: gcc/varasm.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/varasm.c,v
retrieving revision 1.86
diff -u -p -r1.86 varasm.c
--- varasm.c 1999/11/01 19:38:06 1.86
+++ varasm.c 1999/11/03 11:56:07
@@ -3416,10 +3416,13 @@ decode_rtx_const (mode, x, value)
switch (GET_CODE (value->un.addr.base))
{
case SYMBOL_REF:
- case LABEL_REF:
/* Use the string's address, not the SYMBOL_REF's address,
- for the sake of addresses of library routines.
- For a LABEL_REF, compare labels. */
+ for the sake of addresses of library routines. */
+ value->un.addr.base = XSTR (value->un.addr.base, 0);
+ break;
+
+ case LABEL_REF:
+ /* For a LABEL_REF, compare labels. */
value->un.addr.base = XEXP (value->un.addr.base, 0);
default:
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Bootstrap failure with enable-checking in current CVS (varasm.c: 3423)
1999-11-03 5:02 ` Franz Sirl
1999-11-03 10:42 ` Richard Henderson
@ 1999-11-30 23:59 ` Franz Sirl
1 sibling, 0 replies; 223+ messages in thread
From: Franz Sirl @ 1999-11-30 23:59 UTC (permalink / raw)
To: Andreas Jaeger; +Cc: gcc-bugs, gcc-patches
At 13:09 03.11.99 , Franz Sirl wrote:
>At 16:24 01.11.99 , Andreas Jaeger wrote:
>
>>With the current CVS version (updated at 19991101 13:00 UTC) I get a
>>bootstrap failure with --enable-checking:
>
>Welcome to the club :-). I think the appended patch is the correct
>solution, as, according to the documentation and the comment, a SYMBOL_REF
>contains a string, whereas a LABEL_REF contains an expression.
Oops, forgot the changelog entry:
* varasm.c (decode_rtx_const): use XSTR to access the string
of a SYMBOL_REF
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Bootstrap failure with enable-checking in current CVS (varasm.c: 3423)
1999-11-04 6:03 ` Franz Sirl
@ 1999-11-30 23:59 ` Franz Sirl
0 siblings, 0 replies; 223+ messages in thread
From: Franz Sirl @ 1999-11-30 23:59 UTC (permalink / raw)
To: Andreas Jaeger; +Cc: gcc-bugs, gcc-patches
At 08:16 04.11.99 , Andreas Jaeger wrote:
> >>>>> Franz Sirl writes:
>
> > At 16:24 01.11.99 , Andreas Jaeger wrote:
> >> With the current CVS version (updated at 19991101 13:00 UTC) I get a
> >> bootstrap failure with --enable-checking:
>
> > Welcome to the club :-). I think the appended patch is the correct
> > solution, as, according to the documentation and the comment, a
> SYMBOL_REF
> > contains a string, whereas a LABEL_REF contains an expression.
>
>Thanks. The patch fixed the problem - and bootstraping ends in the
>java frontend (see my message "ICE in Java frontend with
>--enable-checking (lastfile in gcc/dbxout.c invalid)" - I should have
>written while compiling Java frontend).
Good to know this happens on other platforms too. I see this 'lastfile'
corruption already during stage2 of a --enable-checking build on
powerpc-linux-gnu:
stage1/xgcc -Bstage1/ -B/home/fsirl/gnubin/ppc-redhat-linux/bin/
-c -DIN_GCC -W -Wall -O2 -g -O2 -DHAVE_CONFIG_H -I. -I../../../cvsx/gcc
m/gcc -I../../../cvsx/gccm/gcc/config -I../../../cvsx/gccm/gcc/../include
../../../cvsx/gccm/gcc/varasm.c
../../../cvsx/gccm/gcc/varasm.c: In function `assemble_variable':
../../../cvsx/gccm/gcc/varasm.c:1480: warning: comparison between signed
and unsigned
../../../cvsx/gccm/gcc/varasm.c:1484: warning: comparison between signed
and unsigned
xgcc: Internal compiler error: program cc1 got fatal signal 11
make[2]: *** [varasm.o] Error 1
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Bootstrap failure with enable-checking in current CVS (varasm.c: 3423)
1999-11-03 10:42 ` Richard Henderson
@ 1999-11-30 23:59 ` Richard Henderson
0 siblings, 0 replies; 223+ messages in thread
From: Richard Henderson @ 1999-11-30 23:59 UTC (permalink / raw)
To: Franz Sirl; +Cc: Andreas Jaeger, gcc-bugs, gcc-patches
On Wed, Nov 03, 1999 at 02:01:53PM +0100, Franz Sirl wrote:
> * varasm.c (decode_rtx_const): use XSTR to access the string
> of a SYMBOL_REF
Applied.
r~
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Bootstrap failure with enable-checking in current CVS (varasm.c: 3423)
1999-11-03 23:16 ` Andreas Jaeger
1999-11-04 6:03 ` Franz Sirl
@ 1999-11-30 23:59 ` Andreas Jaeger
1 sibling, 0 replies; 223+ messages in thread
From: Andreas Jaeger @ 1999-11-30 23:59 UTC (permalink / raw)
To: Franz Sirl; +Cc: gcc-bugs, gcc-patches
>>>>> Franz Sirl writes:
> At 16:24 01.11.99 , Andreas Jaeger wrote:
>> With the current CVS version (updated at 19991101 13:00 UTC) I get a
>> bootstrap failure with --enable-checking:
> Welcome to the club :-). I think the appended patch is the correct
> solution, as, according to the documentation and the comment, a SYMBOL_REF
> contains a string, whereas a LABEL_REF contains an expression.
Thanks. The patch fixed the problem - and bootstraping ends in the
java frontend (see my message "ICE in Java frontend with
--enable-checking (lastfile in gcc/dbxout.c invalid)" - I should have
written while compiling Java frontend).
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.rhein-neckar.de
^ permalink raw reply [flat|nested] 223+ messages in thread
* Loop clean up
@ 1999-12-01 22:12 Michael Hayes
1999-12-31 16:38 ` Michael Hayes
` (2 more replies)
0 siblings, 3 replies; 223+ messages in thread
From: Michael Hayes @ 1999-12-01 22:12 UTC (permalink / raw)
To: gcc-patches; +Cc: m.hayes
[I seem to be having mail delivery problems, so apologies if you've
already received this patch...]
Here are the patches for stage 1 of my clean up of the loop optimiser.
This just replaces many of the global arrays with entries in a
structure for each loop and tidies up some of the function parameters.
If these patches are OK, I'll submit stage 2 which removes many of the
remaining side effects and paves the way for utilising the CFG derived
natural loop information.
Michael.
1999-12-01 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
* loop.c (this_loop_info): Delete.
(uid_loop): Add in place of uid_loop_num. All uses updated.
(loop_number_exit_count): Delete and replace with entry in loop
structure. All uses updated.
(loop_number_loop_starts, loop_number_loop_ends): Likewise.
(loop_number_loop_cont, loop_number_cont_dominator): Likewise.
(loop_outer_loop): Likewise.
(loop_invalid, loop_number_exit_labels): Likewise.
(loop_used_count_register): Delete and replace with entry in
loop_info structure.
(find_and_verify_loops): Add loops argument.
(verify_dominator, mark_loop_jump, prescan_loop): Replace loop_start,
loop_end, etc. arguments with loop structure pointer. All callers
changed.
(loop_reg_used_before_p, scan_loop, strength_reduce): Likewise.
(check_dbra_loop, next_insn_in_loop, try_copy_prop): Likewise.
(load_mems_and_recount_loop_regs_set, load_mems): Likewise.
(insert_bct): Likewise.
(basic_induction_var): New argument level.
* loop.h (struct loop_info): Delete fields num, loops_enclosed,
vtop, and cont. Add used_count_register.
(uid_loop): Delete declaration.
(loop_number_exit_count): Likewise.
(loop_number_loop_starts, loop_number_loop_ends): Likewise.
(loop_number_loop_cont, loop_number_cont_dominator): Likewise.
(loop_outer_loop, loop_used_count_register): Likewise.
(loop_invalid, loop_number_exit_labels): Likewise.
(unroll_loop): Replace loop_start and loop_end arguments
with loop structure pointer.
(loop_precondition_p, loop_iterations): Likewise.
* unroll.c: Include basic-block.h.
(unroll_loop): Replace loop_start and loop_end arguments
with loop structure pointer.
(loop_precondition_p, loop_iterations): Likewise.
* basic-block.h (struct loop): New entries vtop, cont,
cont_dominator, start, end, top, scan_start, exit_labels,
exit_count.
* Makefile.in (unroll.o): Add BASIC_BLOCK_H to dependencies.
begin 644 loop-clean1.patch.gz
M'XL("$Y_1#@``VQO;W`M8VQE86XQ+G!A=&-H`.P]:U/;2+:?H>Z/Z&1K$D-D
MQR]L$S:9"X3)L$L@!61FM^[<4LE2V];&EKR2#'AFY[_?\^B66@\[)"03DCNN
M%#%2]^G3I\^SS^FFM;N[6V^UZ\V6$*]]=^+(J?C16<I8B+_.&A/\]M]R*MV&
MZP2)C(:+:-EPW$;PZXO-S8UM,0W#><,5M63BQS;^8OO!*-QZ)EY"IT0V-C=J
M"]^C-_!PW_.$'XCYU'&E"$="O[*#Q:PAQ/YT*A8Q#+V8>TXBO<:FV*CI]T,9
MV?+&3VPW7`1).H)P`D]$DD%>^\E$R"")EC@,]MS<B)-HX2:+2%8.D(=/W^/$
MB9+8$J47,O!B&/?$?R>O_5A6=G;#(,EWQ2>V%\[\P$G"J*I_N$A4]ZJW?G#E
M3'TO#Y0(,76&<EJ)$<S18SK9D1S[,<"_#<$V-](5%!G9`.C(#SP;^ME7,O)'
M2\(U5NM)WX43C1<S`(2M5:-TSI:8.=$[IL^_%K.Y)>:1C(&?])S/%389^2V%
M"I#<$C)Q&^D`,>.,;S,<Q3STD3O5$KO.="JC>',#V#D8&\L,Q&#:#.4HC*0-
MJ*1X6`A.!N-D`LV\A2L+A'4GTGUG>\/(4<T#>9,`K>(`?JA'0$<@^WQISZ.*
MQ70\>R9G,1$RDKP\&JW8CB4QCFI4Z`S#R"BQAVY2>#%T8M\%!`#AQ`\#^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@3/0CK\GQ-$FFH8[34QD*B`(+5Q055`TYZN`XF4Z3\Y(FGDXF8.T>
M(Z^4#V=*?AN;H<"'GW57ZZ%X:[BOI&F[@"RE*R`E'D_JD4`4<;0]O<&`M(3Q
MQDW@F09B(DQ8BG2D6O<44"9CN?7TE/OIO=H1"J]613'JW$N,*Z'7T'@ILM!<
M%KHC/[S,2#8V$L@PI/XO(4@-DDB7I&>\*?N28#"+&.*=/""R1-]3IX\8LTOZ
M(6Y#'.8Q)D/@`"@K`G<U![6G,II$Q6:9;1Z%&FT]5"^D^$N599I&HY1"N_27
M=MSAR4G4G^I^,)I3N?:D(*@HR@<%CAB.*U3"B&ET@71[Z%#(IR1*#@D"#&6E
MX-(X]7:<$T7H[AR+[2IX!GH2CQ@G+"\%A4D.AY)C4AWR"N-!AHK%^S$8P44@
MU?BN^KI\&_X:X>7V-![=^V4IWE5X5=;JS9R[$CYU1HJWE_B[X*+$OO!:R[:4
M]V0G5UI^FJCRNW##_'D#CO#7NS_T?MP,TBN@]?G3,_CP@(91:30:I4JC67'0
MSM+1ULDP/$VY8?>'0WP6G=);(,EMI=%4??'R'?7ZYPW000_PMTD4#N&[OW-'
M?]Y@0-SOW[Q[^3_XM<8)?(JW`^/#*<#4IQB&VX_&T/.C0`/=X20TYEWA-([>
MX"<T9CCX3N)3^%B\Y^^J$`*<A:=X/SE3$G.P\]5S^?,&70CP6V:L,,03$`=H
M@/3+3</[\\;10;<KW^,.N(A@A=2'PW4\FTHZBKG\/6<=!4D,H1GHCQG`":_Z
8@P$*&$!U9H;L3_`WPAC_#\9]/$9I$P(`
`
end
^ permalink raw reply [flat|nested] 223+ messages in thread
* Loop clean up
1999-12-01 22:12 Loop clean up Michael Hayes
@ 1999-12-31 16:38 ` Michael Hayes
2000-01-04 22:17 ` Jeffrey A Law
2000-01-18 3:15 ` Franz Sirl
2 siblings, 0 replies; 223+ messages in thread
From: Michael Hayes @ 1999-12-31 16:38 UTC (permalink / raw)
To: gcc-patches; +Cc: m.hayes
[I seem to be having mail delivery problems, so apologies if you've
already received this patch...]
Here are the patches for stage 1 of my clean up of the loop optimiser.
This just replaces many of the global arrays with entries in a
structure for each loop and tidies up some of the function parameters.
If these patches are OK, I'll submit stage 2 which removes many of the
remaining side effects and paves the way for utilising the CFG derived
natural loop information.
Michael.
1999-12-01 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
* loop.c (this_loop_info): Delete.
(uid_loop): Add in place of uid_loop_num. All uses updated.
(loop_number_exit_count): Delete and replace with entry in loop
structure. All uses updated.
(loop_number_loop_starts, loop_number_loop_ends): Likewise.
(loop_number_loop_cont, loop_number_cont_dominator): Likewise.
(loop_outer_loop): Likewise.
(loop_invalid, loop_number_exit_labels): Likewise.
(loop_used_count_register): Delete and replace with entry in
loop_info structure.
(find_and_verify_loops): Add loops argument.
(verify_dominator, mark_loop_jump, prescan_loop): Replace loop_start,
loop_end, etc. arguments with loop structure pointer. All callers
changed.
(loop_reg_used_before_p, scan_loop, strength_reduce): Likewise.
(check_dbra_loop, next_insn_in_loop, try_copy_prop): Likewise.
(load_mems_and_recount_loop_regs_set, load_mems): Likewise.
(insert_bct): Likewise.
(basic_induction_var): New argument level.
* loop.h (struct loop_info): Delete fields num, loops_enclosed,
vtop, and cont. Add used_count_register.
(uid_loop): Delete declaration.
(loop_number_exit_count): Likewise.
(loop_number_loop_starts, loop_number_loop_ends): Likewise.
(loop_number_loop_cont, loop_number_cont_dominator): Likewise.
(loop_outer_loop, loop_used_count_register): Likewise.
(loop_invalid, loop_number_exit_labels): Likewise.
(unroll_loop): Replace loop_start and loop_end arguments
with loop structure pointer.
(loop_precondition_p, loop_iterations): Likewise.
* unroll.c: Include basic-block.h.
(unroll_loop): Replace loop_start and loop_end arguments
with loop structure pointer.
(loop_precondition_p, loop_iterations): Likewise.
* basic-block.h (struct loop): New entries vtop, cont,
cont_dominator, start, end, top, scan_start, exit_labels,
exit_count.
* Makefile.in (unroll.o): Add BASIC_BLOCK_H to dependencies.
begin 644 loop-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z%&FT]5"^D^$N599I&HY1"N_27
M=MSAR4G4G^I^,)I3N?:D(*@HR@<%CAB.*U3"B&ET@71[Z%#(IR1*#@D"#&6E
MX-(X]7:<$T7H[AR+[2IX!GH2CQ@G+"\%A4D.AY)C4AWR"N-!AHK%^S$8P44@
MU?BN^KI\&_X:X>7V-![=^V4IWE5X5=;JS9R[$CYU1HJWE_B[X*+$OO!:R[:4
M]V0G5UI^FJCRNW##_'D#CO#7NS_T?MP,TBN@]?G3,_CP@(91:30:I4JC67'0
MSM+1ULDP/$VY8?>'0WP6G=);(,EMI=%4??'R'?7ZYPW000_PMTD4#N&[OW-'
M?]Y@0-SOW[Q[^3_XM<8)?(JW`^/#*<#4IQB&VX_&T/.C0`/=X20TYEWA-([>
MX"<T9CCX3N)3^%B\Y^^J$`*<A:=X/SE3$G.P\]5S^?,&70CP6V:L,,03$`=H
M@/3+3</[\\;10;<KW^,.N(A@A=2'PW4\FTHZBKG\/6<=!4D,H1GHCQG`":_Z
8@P$*&$!U9H;L3_`WPAC_#\9]/$9I$P(`
`
end
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Loop clean up
1999-12-01 22:12 Loop clean up Michael Hayes
1999-12-31 16:38 ` Michael Hayes
@ 2000-01-04 22:17 ` Jeffrey A Law
2000-01-18 3:15 ` Franz Sirl
2 siblings, 0 replies; 223+ messages in thread
From: Jeffrey A Law @ 2000-01-04 22:17 UTC (permalink / raw)
To: Michael Hayes; +Cc: gcc-patches
In message <14406.3096.719263.523747@ongaonga.elec.canterbury.ac.nz>you write
:
>
> [I seem to be having mail delivery problems, so apologies if you've
> already received this patch...]
>
> Here are the patches for stage 1 of my clean up of the loop optimiser.
> This just replaces many of the global arrays with entries in a
> structure for each loop and tidies up some of the function parameters.
>
> If these patches are OK, I'll submit stage 2 which removes many of the
> remaining side effects and paves the way for utilising the CFG derived
> natural loop information.
>
> Michael.
>
> 1999-12-01 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
>
> * loop.c (this_loop_info): Delete.
> (uid_loop): Add in place of uid_loop_num. All uses updated.
> (loop_number_exit_count): Delete and replace with entry in loop
> structure. All uses updated.
> (loop_number_loop_starts, loop_number_loop_ends): Likewise.
> (loop_number_loop_cont, loop_number_cont_dominator): Likewise.
> (loop_outer_loop): Likewise.
> (loop_invalid, loop_number_exit_labels): Likewise.
> (loop_used_count_register): Delete and replace with entry in
> loop_info structure.
> (find_and_verify_loops): Add loops argument.
> (verify_dominator, mark_loop_jump, prescan_loop): Replace loop_start,
> loop_end, etc. arguments with loop structure pointer. All callers
> changed.
> (loop_reg_used_before_p, scan_loop, strength_reduce): Likewise.
> (check_dbra_loop, next_insn_in_loop, try_copy_prop): Likewise.
> (load_mems_and_recount_loop_regs_set, load_mems): Likewise.
> (insert_bct): Likewise.
> (basic_induction_var): New argument level.
> * loop.h (struct loop_info): Delete fields num, loops_enclosed,
> vtop, and cont. Add used_count_register.
> (uid_loop): Delete declaration.
> (loop_number_exit_count): Likewise.
> (loop_number_loop_starts, loop_number_loop_ends): Likewise.
> (loop_number_loop_cont, loop_number_cont_dominator): Likewise.
> (loop_outer_loop, loop_used_count_register): Likewise.
> (loop_invalid, loop_number_exit_labels): Likewise.
> (unroll_loop): Replace loop_start and loop_end arguments
> with loop structure pointer.
> (loop_precondition_p, loop_iterations): Likewise.
> * unroll.c: Include basic-block.h.
> (unroll_loop): Replace loop_start and loop_end arguments
> with loop structure pointer.
> (loop_precondition_p, loop_iterations): Likewise.
> * basic-block.h (struct loop): New entries vtop, cont,
> cont_dominator, start, end, top, scan_start, exit_labels,
> exit_count.
> * Makefile.in (unroll.o): Add BASIC_BLOCK_H to dependencies.
This is fine. Though it will need some minor updating due to random changes
(mostly in loop.c) since you originally submitted the patch.
Cnosider it pre-approved once you update it to work with the current
sources.
jeff
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Loop clean up
1999-12-01 22:12 Loop clean up Michael Hayes
1999-12-31 16:38 ` Michael Hayes
2000-01-04 22:17 ` Jeffrey A Law
@ 2000-01-18 3:15 ` Franz Sirl
2000-01-18 3:35 ` Alexandre Oliva
2000-01-18 8:11 ` Alexandre Oliva
2 siblings, 2 replies; 223+ messages in thread
From: Franz Sirl @ 2000-01-18 3:15 UTC (permalink / raw)
To: Michael Hayes; +Cc: gcc-patches
At 07:12 02.12.99 , Michael Hayes wrote:
>[I seem to be having mail delivery problems, so apologies if you've
>already received this patch...]
>
>Here are the patches for stage 1 of my clean up of the loop optimiser.
>This just replaces many of the global arrays with entries in a
>structure for each loop and tidies up some of the function parameters.
>
>If these patches are OK, I'll submit stage 2 which removes many of the
>remaining side effects and paves the way for utilising the CFG derived
>natural loop information.
>
>Michael.
>
>1999-12-01 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
>
> * loop.c (this_loop_info): Delete.
> (uid_loop): Add in place of uid_loop_num. All uses updated.
> (loop_number_exit_count): Delete and replace with entry in loop
> structure. All uses updated.
> (loop_number_loop_starts, loop_number_loop_ends): Likewise.
> (loop_number_loop_cont, loop_number_cont_dominator): Likewise.
> (loop_outer_loop): Likewise.
> (loop_invalid, loop_number_exit_labels): Likewise.
> (loop_used_count_register): Delete and replace with entry in
> loop_info structure.
> (find_and_verify_loops): Add loops argument.
> (verify_dominator, mark_loop_jump, prescan_loop): Replace loop_start,
> loop_end, etc. arguments with loop structure pointer. All callers
> changed.
> (loop_reg_used_before_p, scan_loop, strength_reduce): Likewise.
> (check_dbra_loop, next_insn_in_loop, try_copy_prop): Likewise.
> (load_mems_and_recount_loop_regs_set, load_mems): Likewise.
> (insert_bct): Likewise.
> (basic_induction_var): New argument level.
> * loop.h (struct loop_info): Delete fields num, loops_enclosed,
> vtop, and cont. Add used_count_register.
> (uid_loop): Delete declaration.
> (loop_number_exit_count): Likewise.
> (loop_number_loop_starts, loop_number_loop_ends): Likewise.
> (loop_number_loop_cont, loop_number_cont_dominator): Likewise.
> (loop_outer_loop, loop_used_count_register): Likewise.
> (loop_invalid, loop_number_exit_labels): Likewise.
> (unroll_loop): Replace loop_start and loop_end arguments
> with loop structure pointer.
> (loop_precondition_p, loop_iterations): Likewise.
> * unroll.c: Include basic-block.h.
> (unroll_loop): Replace loop_start and loop_end arguments
> with loop structure pointer.
> (loop_precondition_p, loop_iterations): Likewise.
> * basic-block.h (struct loop): New entries vtop, cont,
> cont_dominator, start, end, top, scan_start, exit_labels,
> exit_count.
> * Makefile.in (unroll.o): Add BASIC_BLOCK_H to dependencies.
This patch breaks bootstrap in stage2 on powerpc-linux-gnu compiling
fold-const.c:
(gdb) r fold-const.i -quiet -dumpbase fold-const.c -g -O2 -W -Wall
-Wtraditional -version -o fold-const.s
Starting program: /home/fsirl/obj/gccm/gcc/stage1/cc1 fold-const.i -quiet
-dumpbase fold-const.c -g -O2 -W -Wall -Wtraditional -version -o fold-const.s
During symbol reading...inner block (0xfee9000-0xfee900c) not inside outer
block (0xff0b300-0xff0b3f4)...
inner block (0xfee9000-0xfee918c) not inside outer block
(0xff0b3f4-0xff0b580)...
inner block (0xfee9000-0xfee9138) not inside outer block
(0xff0b748-0xff0b8f0)...block at 0xfee903c out of order...
inner block (0xfee9000-0xfee9118) not inside outer block
(0xff1561c-0xff15734)...block at 0xfee9050 out of order...
Breakpoint 1 at 0xff15648: file exit.c, line 81.
During symbol reading...inner block (0x30000000-0x30000558) not inside
outer block (0x30005248-0x30007e64)...
inner block (0x30000000-0x3000029c) not inside outer block
(0x30005248-0x30007e64)...
inner block (0x30000000-0x300001d0) not inside outer block
(0x30005248-0x30007e64)...block at 0x3000004c out of order...
inner block (0x30000000-0x3000000c) not inside outer block
(0x3000c460-0x3000c4cc)...
inner block (0x30000000-0x30000060) not inside outer block
(0x3000c460-0x3000c4cc)...
GNU C version 2.96 20000114 (experimental) (ppc-redhat-linux) compiled by
GNU C version 2.95.2 19991024 (release/franzo).
../../../cvsx/gccm/gcc/fold-const.c: In function `add_double':
../../../cvsx/gccm/gcc/fold-const.c:254: warning: comparison between signed
and unsigned
Program received signal SIGSEGV, Segmentation fault.
0x1014a11c in insert_bct (loop=0x103b4b4c) at
../../../cvsx/gccm/gcc/loop.c:9365
9365 outer_loop_info->used_count_register = 1;
(gdb) p outer_loop_info
$1 = (struct loop_info *) 0x0
(gdb) bt
#0 0x1014a11c in insert_bct (loop=0x103b4b4c) at
../../../cvsx/gccm/gcc/loop.c:9365
#1 0x1013fd04 in strength_reduce (loop=0x103b4b4c, insn_count=14,
unroll_p=0, bct_p=1) at ../../../cvsx/gccm/gcc/loop.c:5263
#2 0x10135c00 in scan_loop (loop=0x103b4b4c, unroll_p=0, bct_p=1) at
../../../cvsx/gccm/gcc/loop.c:1125
#3 0x101341d4 in loop_optimize (f=0x30321420, dumpfile=0x0, unroll_p=0,
bct_p=1) at ../../../cvsx/gccm/gcc/loop.c:520
#4 0x100075d0 in rest_of_compilation (decl=0x301fe800) at
../../../cvsx/gccm/gcc/toplev.c:3117
#5 0x102ca8cc in finish_function (nested=0) at
../../../cvsx/gccm/gcc/c-decl.c:6718
#6 0x102b3bb8 in yyparse () at c-parse.y:314
#7 0x10005c28 in compile_file (name=0x30030130 "fold-const.i") at
../../../cvsx/gccm/gcc/toplev.c:2380
#8 0x1000b0ec in main (argc=13, argv=0x7ffff824) at
../../../cvsx/gccm/gcc/toplev.c:4795
#9 0xff0b57c in Letext () at ../sysdeps/powerpc/elf/libc-start.c:106
The culprit is outer_loop_info being 0. I haven't looked further into that,
but will do so later today.
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Loop clean up
2000-01-18 3:15 ` Franz Sirl
@ 2000-01-18 3:35 ` Alexandre Oliva
2000-01-18 8:11 ` Alexandre Oliva
1 sibling, 0 replies; 223+ messages in thread
From: Alexandre Oliva @ 2000-01-18 3:35 UTC (permalink / raw)
To: Franz Sirl; +Cc: Michael Hayes, gcc-patches
On Jan 18, 2000, Franz Sirl <Franz.Sirl-kernel@lauterbach.com> wrote:
> This patch breaks bootstrap in stage2 on powerpc-linux-gnu compiling
> fold-const.c:
Yup, same here, on powerpc-ibm-aix4.1.5.0
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,computer}.org
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Loop clean up
2000-01-18 3:15 ` Franz Sirl
2000-01-18 3:35 ` Alexandre Oliva
@ 2000-01-18 8:11 ` Alexandre Oliva
2000-01-18 8:49 ` Alexandre Oliva
` (2 more replies)
1 sibling, 3 replies; 223+ messages in thread
From: Alexandre Oliva @ 2000-01-18 8:11 UTC (permalink / raw)
To: Franz Sirl; +Cc: Michael Hayes, gcc-patches
On Jan 18, 2000, Franz Sirl <Franz.Sirl-kernel@lauterbach.com> wrote:
> At 07:12 02.12.99 , Michael Hayes wrote:
>> (loop_used_count_register): Delete and replace with entry in
>> loop_info structure.
This is wrong. There's a single loop_info structure, that's assigned
to each loop as we process it. But insert_bct wants to set
used_count_register of enclosing loops, but loop_info is not
available for them at that point.
How about moving used_count_register to struct loop? I haven't
completed a bootstrap of this patch yet (the AIX host is still dog
slow, despite the use of ggc-page); it bootstrapped on GNU/Linux/x86,
but this doesn't mean much more than ``the patch is syntactically
correct.'' Assuming it bootstraps on AIX, is this ok to install?
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Loop clean up
2000-01-18 8:11 ` Alexandre Oliva
@ 2000-01-18 8:49 ` Alexandre Oliva
2000-02-01 20:31 ` Jeffrey A Law
2000-01-18 9:54 ` Franz Sirl
2000-01-18 15:13 ` Michael Hayes
2 siblings, 1 reply; 223+ messages in thread
From: Alexandre Oliva @ 2000-01-18 8:49 UTC (permalink / raw)
To: Franz Sirl; +Cc: Michael Hayes, gcc-patches
On Jan 18, 2000, Alexandre Oliva <oliva@lsd.ic.unicamp.br> wrote:
> But insert_bct wants to set used_count_register of enclosing loops,
> but loop_info is not available for them at that point.
BTW, here's the test case derived from fold-const.c. I don't think
it's worth installing in the testsuite, being it so simple and part of
the bootstrap cycle anyway. Does anyone disagree?
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Loop clean up
2000-01-18 8:11 ` Alexandre Oliva
2000-01-18 8:49 ` Alexandre Oliva
@ 2000-01-18 9:54 ` Franz Sirl
2000-01-18 10:03 ` Clinton Popetz
2000-01-18 15:13 ` Michael Hayes
2 siblings, 1 reply; 223+ messages in thread
From: Franz Sirl @ 2000-01-18 9:54 UTC (permalink / raw)
To: Alexandre Oliva; +Cc: Michael Hayes, gcc-patches
At 17:11 18.01.00 , Alexandre Oliva wrote:
>On Jan 18, 2000, Franz Sirl <Franz.Sirl-kernel@lauterbach.com> wrote:
>
> > At 07:12 02.12.99 , Michael Hayes wrote:
>
> >> (loop_used_count_register): Delete and replace with entry in
> >> loop_info structure.
>
>This is wrong. There's a single loop_info structure, that's assigned
>to each loop as we process it. But insert_bct wants to set
>used_count_register of enclosing loops, but loop_info is not
>available for them at that point.
>
>How about moving used_count_register to struct loop? I haven't
>completed a bootstrap of this patch yet (the AIX host is still dog
>slow, despite the use of ggc-page); it bootstrapped on GNU/Linux/x86,
>but this doesn't mean much more than ``the patch is syntactically
>correct.'' Assuming it bootstraps on AIX, is this ok to install?
>
>Index: gcc/ChangeLog
>from Alexandre Oliva <oliva@lsd.ic.unicamp.br>
>
> * loop.h (struct loop_info): Move used_count_register to...
> * basic-block.h (struct loop): ... here.
> * loop.c (insert_bct): Adjust.
With your patch applied I get the following testsuite regressions:
FAIL: gcc.c-torture/compile/991127-1.c, -O2
FAIL: gcc.c-torture/compile/991127-1.c, -Os
FAIL: gcc.c-torture/compile/991213-2.c, -O2
FAIL: gcc.c-torture/compile/991213-2.c, -O3 -fomit-frame-pointer
FAIL: gcc.c-torture/compile/991213-2.c, -O3 -fomit-frame-pointer
-funroll-loops
FAIL: gcc.c-torture/compile/991213-2.c, -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions
FAIL: gcc.c-torture/compile/991213-2.c, -O3 -g
FAIL: gcc.c-torture/compile/991213-2.c, -Os
they all seem to fail with this message:
/home/fsirl/cvsx/gccm/gcc/testsuite/gcc.c-torture/compile/991213-2.c: In
function `time2':
/home/fsirl/cvsx/gccm/gcc/testsuite/gcc.c-torture/compile/991213-2.c:15:
Internal compiler error in `loop_iterations', at unroll.c:3709
Please submit a full bug report.
See <URL: http://www.gnu.org/software/gcc/faq.html#bugreport > for instructions.
which corresponds to this code in unroll.c in my sources:
/* The only new registers that care created before loop iterations are
givs made from biv increments, so this should never occur. */
if ((unsigned) REGNO (iteration_var) >= reg_iv_type->num_elements)
abort ();
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Loop clean up
2000-01-18 9:54 ` Franz Sirl
@ 2000-01-18 10:03 ` Clinton Popetz
2000-01-18 14:47 ` Franz Sirl
2000-01-18 21:32 ` Michael Hayes
0 siblings, 2 replies; 223+ messages in thread
From: Clinton Popetz @ 2000-01-18 10:03 UTC (permalink / raw)
To: Franz Sirl; +Cc: Alexandre Oliva, Michael Hayes, gcc-patches
Franz Sirl <Franz.Sirl-kernel@lauterbach.com> writes:
> At 17:11 18.01.00 , Alexandre Oliva wrote:
> >On Jan 18, 2000, Franz Sirl <Franz.Sirl-kernel@lauterbach.com> wrote:
> >
> > > At 07:12 02.12.99 , Michael Hayes wrote:
> >
> > >> (loop_used_count_register): Delete and replace with entry in
> > >> loop_info structure.
> >
> >This is wrong. There's a single loop_info structure, that's assigned
> >to each loop as we process it. But insert_bct wants to set
> >used_count_register of enclosing loops, but loop_info is not
> >available for them at that point.
> >
> >How about moving used_count_register to struct loop? I haven't
> >completed a bootstrap of this patch yet (the AIX host is still dog
> >slow, despite the use of ggc-page); it bootstrapped on GNU/Linux/x86,
> >but this doesn't mean much more than ``the patch is syntactically
> >correct.'' Assuming it bootstraps on AIX, is this ok to install?
> >
> >Index: gcc/ChangeLog
> >from Alexandre Oliva <oliva@lsd.ic.unicamp.br>
> >
> > * loop.h (struct loop_info): Move used_count_register to...
> > * basic-block.h (struct loop): ... here.
> > * loop.c (insert_bct): Adjust.
>
> With your patch applied I get the following testsuite regressions:
> FAIL: gcc.c-torture/compile/991127-1.c, -O2
> FAIL: gcc.c-torture/compile/991127-1.c, -Os
> FAIL: gcc.c-torture/compile/991213-2.c, -O2
> FAIL: gcc.c-torture/compile/991213-2.c, -O3 -fomit-frame-pointer
> FAIL: gcc.c-torture/compile/991213-2.c, -O3 -fomit-frame-pointer
> -funroll-loops
> FAIL: gcc.c-torture/compile/991213-2.c, -O3 -fomit-frame-pointer
> -funroll-all-loops -finline-functions
> FAIL: gcc.c-torture/compile/991213-2.c, -O3 -g
> FAIL: gcc.c-torture/compile/991213-2.c, -Os
>
> they all seem to fail with this message:
> /home/fsirl/cvsx/gccm/gcc/testsuite/gcc.c-torture/compile/991213-2.c: In
> function `time2':
> /home/fsirl/cvsx/gccm/gcc/testsuite/gcc.c-torture/compile/991213-2.c:15:
> Internal compiler error in `loop_iterations', at unroll.c:3709
> Please submit a full bug report.
> See <URL: http://www.gnu.org/software/gcc/faq.html#bugreport > for instructions.
>
> which corresponds to this code in unroll.c in my sources:
> /* The only new registers that care created before loop iterations are
> givs made from biv increments, so this should never occur. */
>
> if ((unsigned) REGNO (iteration_var) >= reg_iv_type->num_elements)
> abort ();
This is a problem with Michael's original loop patch. See my recent
mesg under "[Re: [EGCS 2.96, 2000/01/17 snapshot] Internal compiler
error in loop_iterations" or at:
http://gcc.gnu.org/ml/gcc-bugs/2000-01/msg00475.html
-Clint
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Loop clean up
2000-01-18 10:03 ` Clinton Popetz
@ 2000-01-18 14:47 ` Franz Sirl
2000-01-18 21:32 ` Michael Hayes
1 sibling, 0 replies; 223+ messages in thread
From: Franz Sirl @ 2000-01-18 14:47 UTC (permalink / raw)
To: Clinton Popetz; +Cc: Alexandre Oliva, Michael Hayes, gcc-patches
Am Die, 18 Jan 2000 schrieb Clinton Popetz:
>Franz Sirl <Franz.Sirl-kernel@lauterbach.com> writes:
>> At 17:11 18.01.00 , Alexandre Oliva wrote:
>> >On Jan 18, 2000, Franz Sirl <Franz.Sirl-kernel@lauterbach.com> wrote:
>> >
>> > > At 07:12 02.12.99 , Michael Hayes wrote:
>> >
>> > >> (loop_used_count_register): Delete and replace with entry in
>> > >> loop_info structure.
>> >
>> >This is wrong. There's a single loop_info structure, that's assigned
>> >to each loop as we process it. But insert_bct wants to set
>> >used_count_register of enclosing loops, but loop_info is not
>> >available for them at that point.
>> >
>> >How about moving used_count_register to struct loop? I haven't
>> >completed a bootstrap of this patch yet (the AIX host is still dog
>> >slow, despite the use of ggc-page); it bootstrapped on GNU/Linux/x86,
>> >but this doesn't mean much more than ``the patch is syntactically
>> >correct.'' Assuming it bootstraps on AIX, is this ok to install?
>> >
>> >Index: gcc/ChangeLog
>> >from Alexandre Oliva <oliva@lsd.ic.unicamp.br>
>> >
>> > * loop.h (struct loop_info): Move used_count_register to...
>> > * basic-block.h (struct loop): ... here.
>> > * loop.c (insert_bct): Adjust.
>>
>> With your patch applied I get the following testsuite regressions:
>> FAIL: gcc.c-torture/compile/991127-1.c, -O2
>> FAIL: gcc.c-torture/compile/991127-1.c, -Os
>> FAIL: gcc.c-torture/compile/991213-2.c, -O2
>> FAIL: gcc.c-torture/compile/991213-2.c, -O3 -fomit-frame-pointer
>> FAIL: gcc.c-torture/compile/991213-2.c, -O3 -fomit-frame-pointer
>> -funroll-loops
>> FAIL: gcc.c-torture/compile/991213-2.c, -O3 -fomit-frame-pointer
>> -funroll-all-loops -finline-functions
>> FAIL: gcc.c-torture/compile/991213-2.c, -O3 -g
>> FAIL: gcc.c-torture/compile/991213-2.c, -Os
>>
>> they all seem to fail with this message:
>> /home/fsirl/cvsx/gccm/gcc/testsuite/gcc.c-torture/compile/991213-2.c: In
>> function `time2':
>> /home/fsirl/cvsx/gccm/gcc/testsuite/gcc.c-torture/compile/991213-2.c:15:
>> Internal compiler error in `loop_iterations', at unroll.c:3709
>> Please submit a full bug report.
>> See <URL: http://www.gnu.org/software/gcc/faq.html#bugreport > for instructions.
>>
>> which corresponds to this code in unroll.c in my sources:
>> /* The only new registers that care created before loop iterations are
>> givs made from biv increments, so this should never occur. */
>>
>> if ((unsigned) REGNO (iteration_var) >= reg_iv_type->num_elements)
>> abort ();
>
>
>This is a problem with Michael's original loop patch. See my recent
>mesg under "[Re: [EGCS 2.96, 2000/01/17 snapshot] Internal compiler
>error in loop_iterations" or at:
>
> http://gcc.gnu.org/ml/gcc-bugs/2000-01/msg00475.html
Yes, with Alexandre's and your patch everything is back to normal on
powerpc-linux-gnu.
Thanks,
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Loop clean up
2000-01-18 8:11 ` Alexandre Oliva
2000-01-18 8:49 ` Alexandre Oliva
2000-01-18 9:54 ` Franz Sirl
@ 2000-01-18 15:13 ` Michael Hayes
2 siblings, 0 replies; 223+ messages in thread
From: Michael Hayes @ 2000-01-18 15:13 UTC (permalink / raw)
To: Alexandre Oliva; +Cc: Franz Sirl, Michael Hayes, gcc-patches
Alexandre Oliva writes:
> [1 <text/plain>]
> On Jan 18, 2000, Franz Sirl <Franz.Sirl-kernel@lauterbach.com> wrote:
>
> > At 07:12 02.12.99 , Michael Hayes wrote:
>
> >> (loop_used_count_register): Delete and replace with entry in
> >> loop_info structure.
>
> This is wrong. There's a single loop_info structure, that's assigned
> to each loop as we process it. But insert_bct wants to set
> used_count_register of enclosing loops, but loop_info is not
> available for them at that point.
Bugger. I had overlooked this and the machines I bootstrapped my
patches on did not use this field.
> How about moving used_count_register to struct loop? I haven't
> completed a bootstrap of this patch yet (the AIX host is still dog
> slow, despite the use of ggc-page); it bootstrapped on GNU/Linux/x86,
> but this doesn't mean much more than ``the patch is syntactically
> correct.'' Assuming it bootstraps on AIX, is this ok to install?
This should do in the interim but it is not the proper fix. I've been
considering retaining the loop_info stuff for each loop which would
solve this problem. However, a better solution is to remove this
used_count_register field altogether which is what I did with my
rewrite of the low-overhead loop stuff that I submitted a couple of
months ago.
Michael.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Loop clean up
2000-01-18 10:03 ` Clinton Popetz
2000-01-18 14:47 ` Franz Sirl
@ 2000-01-18 21:32 ` Michael Hayes
1 sibling, 0 replies; 223+ messages in thread
From: Michael Hayes @ 2000-01-18 21:32 UTC (permalink / raw)
To: Clinton Popetz; +Cc: Franz Sirl, Alexandre Oliva, Michael Hayes, gcc-patches
Clinton Popetz writes:
> This is a problem with Michael's original loop patch. See my recent
> mesg under "[Re: [EGCS 2.96, 2000/01/17 snapshot] Internal compiler
> error in loop_iterations" or at:
>
> http://gcc.gnu.org/ml/gcc-bugs/2000-01/msg00475.html
Yes, I somehow didn't slurp up Bernd's patch and never noticed the
regression since my vanilla source tree had the same bug. My
apologies.
After working through the problem, I think the following should be a
better solution to what was proposed by Bernd. I do not notice any
new regressions with this. Shall I commit it to right the ship?
Michael.
Index: unroll.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/unroll.c,v
retrieving revision 1.87
diff -c -3 -p -r1.87 unroll.c
*** unroll.c 2000/01/17 15:55:18 1.87
--- unroll.c 2000/01/19 05:21:56
*************** loop_iterations (loop)
*** 3702,3711 ****
return 0;
}
! /* The only new registers that care created before loop iterations are
! givs made from biv increments, so this should never occur. */
! if ((unsigned) REGNO (iteration_var) >= reg_iv_type->num_elements)
abort ();
iteration_info (iteration_var, &initial_value, &increment,
--- 3702,3715 ----
return 0;
}
! /* The only new registers that are created before loop iterations
! are givs made from biv increments or registers created by
! load_mems. In the latter case, it is possible that try_copy_prop
! will propagate a new pseudo into the old iteration register but
! this will be marked by having the REG_USERVAR_P bit set. */
! if ((unsigned) REGNO (iteration_var) >= reg_iv_type->num_elements
! && ! REG_USERVAR_P (iteration_var))
abort ();
iteration_info (iteration_var, &initial_value, &increment,
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Loop clean up
2000-01-18 8:49 ` Alexandre Oliva
@ 2000-02-01 20:31 ` Jeffrey A Law
2000-02-01 21:01 ` Alexandre Oliva
0 siblings, 1 reply; 223+ messages in thread
From: Jeffrey A Law @ 2000-02-01 20:31 UTC (permalink / raw)
To: Alexandre Oliva; +Cc: Franz Sirl, Michael Hayes, gcc-patches
In message <orvh4ruy0r.fsf@garnize.lsd.ic.unicamp.br>you write:
> --=-=-=
>
> On Jan 18, 2000, Alexandre Oliva <oliva@lsd.ic.unicamp.br> wrote:
>
> > But insert_bct wants to set used_count_register of enclosing loops,
> > but loop_info is not available for them at that point.
>
> BTW, here's the test case derived from fold-const.c. I don't think
> it's worth installing in the testsuite, being it so simple and part of
> the bootstrap cycle anyway. Does anyone disagree?
I'd say go ahead and add it -- it's a lot easier to debug that simple testcase
than figure out why we botched the much larger fold-const.c file :-)
jeff
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Loop clean up
2000-02-01 20:31 ` Jeffrey A Law
@ 2000-02-01 21:01 ` Alexandre Oliva
2000-02-01 21:12 ` Jeffrey A Law
0 siblings, 1 reply; 223+ messages in thread
From: Alexandre Oliva @ 2000-02-01 21:01 UTC (permalink / raw)
To: law; +Cc: Franz Sirl, Michael Hayes, gcc-patches
On Feb 2, 2000, Jeffrey A Law <law@cygnus.com> wrote:
> I'd say go ahead and add it -- it's a lot easier to debug that
> simple testcase than figure out why we botched the much larger
> fold-const.c file :-)
Ok, it is now in gcc.dg:
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Loop clean up
2000-02-01 21:01 ` Alexandre Oliva
@ 2000-02-01 21:12 ` Jeffrey A Law
2000-02-01 21:17 ` Alexandre Oliva
0 siblings, 1 reply; 223+ messages in thread
From: Jeffrey A Law @ 2000-02-01 21:12 UTC (permalink / raw)
To: Alexandre Oliva; +Cc: Franz Sirl, Michael Hayes, gcc-patches
In message < oraelktcy7.fsf@garnize.lsd.ic.unicamp.br >you write:
> --=-=-=
>
> On Feb 2, 2000, Jeffrey A Law <law@cygnus.com> wrote:
>
> > I'd say go ahead and add it -- it's a lot easier to debug that
> > simple testcase than figure out why we botched the much larger
> > fold-const.c file :-)
>
> Ok, it is now in gcc.dg:
I don't see why it should be in gcc.dg. It doesn't need special options or
anything like that. Thus, I believe it belongs in c-torture/compile.
jeff
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Loop clean up
2000-02-01 21:12 ` Jeffrey A Law
@ 2000-02-01 21:17 ` Alexandre Oliva
2000-02-02 14:19 ` Jeffrey A Law
0 siblings, 1 reply; 223+ messages in thread
From: Alexandre Oliva @ 2000-02-01 21:17 UTC (permalink / raw)
To: law; +Cc: Franz Sirl, Michael Hayes, gcc-patches
On Feb 2, 2000, Jeffrey A Law <law@cygnus.com> wrote:
> In message < oraelktcy7.fsf@garnize.lsd.ic.unicamp.br >you write:
>> Ok, it is now in gcc.dg:
> I don't see why it should be in gcc.dg. It doesn't need special options or
> anything like that. Thus, I believe it belongs in c-torture/compile.
Well, I've been adding testcases to gcc.dg lately. I had thought it
was supposed to contain the `new' tests, whereas c-torture was an
`old' testing framework, with tests that were deemed to be removed
because of copyright problems (that are now solved, I think).
Should I move the few tests I've installed recently into c-torture, or
just bear in mind that gcc.dg is only for tests that need special
options?
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,computer}.org
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Loop clean up
2000-02-01 21:17 ` Alexandre Oliva
@ 2000-02-02 14:19 ` Jeffrey A Law
0 siblings, 0 replies; 223+ messages in thread
From: Jeffrey A Law @ 2000-02-02 14:19 UTC (permalink / raw)
To: Alexandre Oliva; +Cc: Franz Sirl, Michael Hayes, gcc-patches
In message < or1z6wtc8a.fsf@garnize.lsd.ic.unicamp.br >you write:
> Well, I've been adding testcases to gcc.dg lately. I had thought it
> was supposed to contain the `new' tests, whereas c-torture was an
> `old' testing framework, with tests that were deemed to be removed
> because of copyright problems (that are now solved, I think).
>
> Should I move the few tests I've installed recently into c-torture, or
> just bear in mind that gcc.dg is only for tests that need special
> options?
I wouldn't worry much about moving tests you already put into gcc.dg. But
new tests which do not require special options should be put into the
c-torture framework.
jeff
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Bad PIC on Solaris
[not found] ` <orwvox46na.fsf@garnize.lsd.ic.unicamp.br>
@ 2000-04-10 13:40 ` Alexandre Oliva
2000-04-11 16:25 ` Richard Henderson
2000-04-12 3:40 ` Franz Sirl
0 siblings, 2 replies; 223+ messages in thread
From: Alexandre Oliva @ 2000-04-10 13:40 UTC (permalink / raw)
To: gcc-patches, gcc-bugs
On Jan 26, 2000, Alexandre Oliva <oliva@lsd.ic.unicamp.br> wrote:
> GCC won't emit PIC typeinfo nodes on Solaris, both /sparc and /x86.
> GNU ld doesn't complain when a shared library is created with an
> object file containing such typeinfo nodes, but Sun ld does, when run
> with `-z text'. For example, given the following file:
> class foo {};
> class bar : foo {};
> #include <typeinfo>
> int main() {
> typeid(bar);
> }
> % g++ -shared -fPIC test.cc -o /dev/null
> ld: Software Generation Utilities - Solaris/ELF (3.0)
> Text relocation remains referenced
> against symbol offset in file
> foo type_info node 0x0 test.o
> ld: fatal: relocations remain against allocatable but non-writable sections
> collect2: ld returned 1 exit status
Here's a patch that fixes this problem. Tested on Solaris2.6/sparc
and 7/x86, as well as RedHat Linux 6.2 /x86 and /alpha. Ok to
install?
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Bad PIC on Solaris
2000-04-10 13:40 ` Bad PIC on Solaris Alexandre Oliva
@ 2000-04-11 16:25 ` Richard Henderson
2000-04-11 18:07 ` Alexandre Oliva
2000-04-12 3:40 ` Franz Sirl
1 sibling, 1 reply; 223+ messages in thread
From: Richard Henderson @ 2000-04-11 16:25 UTC (permalink / raw)
To: Alexandre Oliva; +Cc: gcc-patches, gcc-bugs
On Mon, Apr 10, 2000 at 05:40:30PM -0300, Alexandre Oliva wrote:
> * config/elfos.h (SELECT_SECTION): Decide whether to use a data or
> const section to output a CONSTRUCTOR based on the same conditions
> used for VAR_DECLs.
Ok.
r~
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Bad PIC on Solaris
2000-04-11 16:25 ` Richard Henderson
@ 2000-04-11 18:07 ` Alexandre Oliva
2000-04-11 18:16 ` Richard Henderson
0 siblings, 1 reply; 223+ messages in thread
From: Alexandre Oliva @ 2000-04-11 18:07 UTC (permalink / raw)
To: Richard Henderson; +Cc: gcc-patches, gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 619 bytes --]
On Apr 11, 2000, Richard Henderson <rth@cygnus.com> wrote:
> On Mon, Apr 10, 2000 at 05:40:30PM -0300, Alexandre Oliva wrote:
>> * config/elfos.h (SELECT_SECTION): Decide whether to use a data or
>> const section to output a CONSTRUCTOR based on the same conditions
>> used for VAR_DECLs.
> Ok.
For the GCC 2.95 branch too?
--
Alexandre Oliva Enjoy Guaraná, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Bad PIC on Solaris
2000-04-11 18:07 ` Alexandre Oliva
@ 2000-04-11 18:16 ` Richard Henderson
0 siblings, 0 replies; 223+ messages in thread
From: Richard Henderson @ 2000-04-11 18:16 UTC (permalink / raw)
To: Alexandre Oliva; +Cc: gcc-patches, gcc-bugs
On Tue, Apr 11, 2000 at 10:07:33PM -0300, Alexandre Oliva wrote:
> For the GCC 2.95 branch too?
Sure.
r~
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Bad PIC on Solaris
2000-04-10 13:40 ` Bad PIC on Solaris Alexandre Oliva
2000-04-11 16:25 ` Richard Henderson
@ 2000-04-12 3:40 ` Franz Sirl
2000-04-12 7:19 ` Alexandre Oliva
2000-04-12 7:56 ` Jeffrey A Law
1 sibling, 2 replies; 223+ messages in thread
From: Franz Sirl @ 2000-04-12 3:40 UTC (permalink / raw)
To: Alexandre Oliva; +Cc: gcc-patches, gcc-bugs
At 22:40 10.04.00, Alexandre Oliva wrote:
>On Jan 26, 2000, Alexandre Oliva <oliva@lsd.ic.unicamp.br> wrote:
>
> > GCC won't emit PIC typeinfo nodes on Solaris, both /sparc and /x86.
> > GNU ld doesn't complain when a shared library is created with an
> > object file containing such typeinfo nodes, but Sun ld does, when run
> > with `-z text'. For example, given the following file:
>
> > class foo {};
> > class bar : foo {};
>
> > #include <typeinfo>
>
> > int main() {
> > typeid(bar);
> > }
>
> > % g++ -shared -fPIC test.cc -o /dev/null
> > ld: Software Generation Utilities - Solaris/ELF (3.0)
> > Text relocation remains referenced
> > against symbol offset in file
> > foo type_info node 0x0 test.o
> > ld: fatal: relocations remain against allocatable but non-writable sections
> > collect2: ld returned 1 exit status
>
>Here's a patch that fixes this problem. Tested on Solaris2.6/sparc
>and 7/x86, as well as RedHat Linux 6.2 /x86 and /alpha. Ok to
>install?
>
>Index: gcc/ChangeLog
>2000-04-10 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
>
> * config/elfos.h (SELECT_SECTION): Decide whether to use a data or
> const section to output a CONSTRUCTOR based on the same conditions
> used for VAR_DECLs.
What about all the other target-specific SELECT_SECTION macros? Do they
need changing as well? Eg. rs6000_select_section() in rs6000/rs6000.c?
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Bad PIC on Solaris
2000-04-12 3:40 ` Franz Sirl
@ 2000-04-12 7:19 ` Alexandre Oliva
2000-04-12 7:56 ` Jeffrey A Law
1 sibling, 0 replies; 223+ messages in thread
From: Alexandre Oliva @ 2000-04-12 7:19 UTC (permalink / raw)
To: Franz Sirl; +Cc: gcc-patches, gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 665 bytes --]
On Apr 12, 2000, Franz Sirl <Franz.Sirl-kernel@lauterbach.com> wrote:
> What about all the other target-specific SELECT_SECTION macros? Do they
> need changing as well? Eg. rs6000_select_section() in rs6000/rs6000.c?
Dunno. Other links may not be as picky as Solaris', but nevertheless
it would be advantageous to avoid emitting relocatable data in the
rodata section.
--
Alexandre Oliva Enjoy Guaraná, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Bad PIC on Solaris
2000-04-12 3:40 ` Franz Sirl
2000-04-12 7:19 ` Alexandre Oliva
@ 2000-04-12 7:56 ` Jeffrey A Law
1 sibling, 0 replies; 223+ messages in thread
From: Jeffrey A Law @ 2000-04-12 7:56 UTC (permalink / raw)
To: Franz Sirl; +Cc: Alexandre Oliva, gcc-patches, gcc-bugs
In message < 4.3.2.20000412123520.04a6cf00@mail.lauterbach.com >you write:
> What about all the other target-specific SELECT_SECTION macros? Do they
> need changing as well? Eg. rs6000_select_section() in rs6000/rs6000.c?
Each would have to be checked individually.
jeff
^ permalink raw reply [flat|nested] 223+ messages in thread
* Patch Re: warning flags
[not found] ` <200001121900.OAA05918@caip.rutgers.edu>
@ 2000-05-01 16:32 ` Jason Merrill
2000-05-04 5:56 ` Franz Sirl
2000-05-04 7:53 ` Laurynas Biveinis
0 siblings, 2 replies; 223+ messages in thread
From: Jason Merrill @ 2000-05-01 16:32 UTC (permalink / raw)
To: Kaveh R. Ghazi; +Cc: gcc-patches
>>>>> Kaveh R Ghazi <ghazi@caip.rutgers.edu> writes:
> I wouldn't mind adding -pedantic if it doesn't add a lot of noise.
> I'm generally the one who cleans these up and its enough work as it
> is. :-) I haven't tried -pedantic myself so I don't know, but IIRC, it
> can be noisy about things like unsigned vs signed char pointer assignments,
> etc, which are more annoying than helpful.
Sure they're annoying, but if our goal is to have the main gcc directory
contain code that can be built with any conformant C compiler, they need to
be fixed. That's the point of -pedantic, after all.
How about this? I'd prefer to use sed rather than -Wno-traditional, since
the latter evokes warnings from the C++ frontend.
2000-05-01 Jason Merrill <jason@casey.cygnus.com>
* Makefile.in (WARN_CFLAGS): Add -pedantic -Wno-long-long.
(LOOSE_CFLAGS): New: CFLAGS without -pedantic and -Wtraditional.
(GCC_CFLAGS): Use it.
(LANG_FLAGS_TO_PASS): New: SUBDIR_FLAGS_TO_PASS with LOOSE_CFLAGS.
* cp/Make-lang.in, java/Make-lang.in, f/Make-lang.in, ch/Make-lang.in,
objc/Make-lang.in: Use it.
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/Makefile.in,v
retrieving revision 1.432
diff -c -p -r1.432 Makefile.in
*** Makefile.in 2000/05/01 18:20:09 1.432
--- Makefile.in 2000/05/01 23:15:38
*************** ALLOCA_FINISH = true
*** 68,80 ****
# separate from BOOT_CFLAGS because people tend to override optimization
# flags and we'd like them to still have warnings turned on. They are free
# to explicitly turn warnings off if they wish.
# XCFLAGS is used for most compilations but not when using the GCC just built.
# TCFLAGS is used for compilations with the GCC just built.
XCFLAGS =
TCFLAGS =
CFLAGS = -g @stage1_warn_cflags@
BOOT_CFLAGS = -O2 $(CFLAGS)
! WARN_CFLAGS = -W -Wall -Wtraditional
# These exists to be overridden by the x-* and t-* files, respectively.
X_CFLAGS =
T_CFLAGS =
--- 68,83 ----
# separate from BOOT_CFLAGS because people tend to override optimization
# flags and we'd like them to still have warnings turned on. They are free
# to explicitly turn warnings off if they wish.
+ # LOOSE_CFLAGS are the CFLAGS to use when compiling something which is only
+ # compiled with gcc, such as libgcc and the frontends other than C.
# XCFLAGS is used for most compilations but not when using the GCC just built.
# TCFLAGS is used for compilations with the GCC just built.
XCFLAGS =
TCFLAGS =
CFLAGS = -g @stage1_warn_cflags@
BOOT_CFLAGS = -O2 $(CFLAGS)
! WARN_CFLAGS = -pipe -W -Wall -Wtraditional -pedantic -Wno-long-long
! LOOSE_CFLAGS = `echo $(CFLAGS) | sed -e 's/-pedantic//' -e 's/-Wtraditional//'`
# These exists to be overridden by the x-* and t-* files, respectively.
X_CFLAGS =
T_CFLAGS =
*************** GCC_FOR_TARGET = ./xgcc -B$(build_tooldi
*** 166,172 ****
# This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
# It omits XCFLAGS, and specifies -B./.
# It also specifies -isystem ./include to find, e.g., stddef.h.
! GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -isystem ./include $(TCFLAGS)
# Specify the abi to use when building the c++ runtime
GXX_ABI_FLAG=@GXX_ABI_FLAG@
--- 169,175 ----
# This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
# It omits XCFLAGS, and specifies -B./.
# It also specifies -isystem ./include to find, e.g., stddef.h.
! GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(LOOSE_CFLAGS) -isystem ./include $(TCFLAGS)
# Specify the abi to use when building the c++ runtime
GXX_ABI_FLAG=@GXX_ABI_FLAG@
*************** PREPEND_DOTDOT_TO_RELATIVE_PATHS = sed \
*** 660,666 ****
-e 's|%% *|../|g' \
-e 's|%||g'
SUBDIR_FLAGS_TO_PASS = $(ORDINARY_FLAGS_TO_PASS) \
! "CC=`echo @quoted_cc_set_by_configure@ | $(PREPEND_DOTDOT_TO_RELATIVE_PATHS)`"
#\f
# Lists of files for various purposes.
--- 663,672 ----
-e 's|%% *|../|g' \
-e 's|%||g'
SUBDIR_FLAGS_TO_PASS = $(ORDINARY_FLAGS_TO_PASS) \
! "CC=`echo @quoted_cc_set_by_configure@ | $(PREPEND_DOTDOT_TO_RELATIVE_PATHS)`"
! # Flags to pass when recursing into a frontend subdirectory.
! LANG_FLAGS_TO_PASS = $(SUBDIR_FLAGS_TO_PASS) \
! "CFLAGS=$(LOOSE_CFLAGS)"
#\f
# Lists of files for various purposes.
Index: ch/Make-lang.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ch/Make-lang.in,v
retrieving revision 1.12
diff -c -p -r1.12 Make-lang.in
*** ch/Make-lang.in 1999/09/04 22:24:17 1.12
--- ch/Make-lang.in 2000/05/01 23:15:39
*************** cc1chill$(exeext): $(P) $(CHILL_SRCS) $(
*** 97,103 ****
insn-config.h insn-flags.h insn-attr.h insn-codes.h \
c-typeck.o c-aux-info.o c-common.o c-iterate.o \
ggc-callbacks.o
! cd ch; $(MAKE) $(FLAGS_TO_PASS) $(CHILL_FLAGS_TO_PASS) ../cc1chill$(exeext)
#\f
# Build hooks:
--- 97,103 ----
insn-config.h insn-flags.h insn-attr.h insn-codes.h \
c-typeck.o c-aux-info.o c-common.o c-iterate.o \
ggc-callbacks.o
! cd ch; $(MAKE) $(LANG_FLAGS_TO_PASS) $(CHILL_FLAGS_TO_PASS) ../cc1chill$(exeext)
#\f
# Build hooks:
*************** CHILL.stage4: stage4-start
*** 191,197 ****
# distribution anyway. It then copies the files to the distdir directory.
CHILL.distdir:
mkdir tmp/ch
! cd ch ; $(MAKE) $(FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) hash.h
cd ch; \
for file in *[0-9a-zA-Z+]; do \
ln $$file ../tmp/ch >/dev/null 2>&1 || cp $$file ../tmp/ch; \
--- 191,197 ----
# distribution anyway. It then copies the files to the distdir directory.
CHILL.distdir:
mkdir tmp/ch
! cd ch ; $(MAKE) $(LANG_FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) hash.h
cd ch; \
for file in *[0-9a-zA-Z+]; do \
ln $$file ../tmp/ch >/dev/null 2>&1 || cp $$file ../tmp/ch; \
Index: cp/Make-lang.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/Make-lang.in,v
retrieving revision 1.48
diff -c -p -r1.48 Make-lang.in
*** cp/Make-lang.in 2000/04/06 11:53:29 1.48
--- cp/Make-lang.in 2000/05/01 23:15:39
*************** $(srcdir)/cp/parse.c: $(srcdir)/cp/parse
*** 84,90 ****
@cp_srcdir=`sed -n 's/^srcdir[ ]*=[ ]*//p' cp/Makefile` && \
echo "cd cp && $(MAKE) $$cp_srcdir/parse.c" && \
cd cp && \
! $(MAKE) $(SUBDIR_FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) \
$$cp_srcdir/parse.c
# Create the compiler driver for g++.
--- 84,90 ----
@cp_srcdir=`sed -n 's/^srcdir[ ]*=[ ]*//p' cp/Makefile` && \
echo "cd cp && $(MAKE) $$cp_srcdir/parse.c" && \
cd cp && \
! $(MAKE) $(LANG_FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) \
$$cp_srcdir/parse.c
# Create the compiler driver for g++.
*************** CXX_SRCS = $(srcdir)/cp/call.c $(srcdir)
*** 124,130 ****
cc1plus$(exeext): $(P) $(CXX_SRCS) $(LIBDEPS) stamp-objlist c-common.o \
c-pragma.o $(srcdir)/cp/cp-tree.h $(srcdir)/cp/cp-tree.def \
$(srcdir)/cp/gxx.gperf $(srcdir)/cp/cfns.gperf hash.o
! cd cp; $(MAKE) $(FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) ../cc1plus$(exeext)
#\f
# Build hooks:
--- 124,130 ----
cc1plus$(exeext): $(P) $(CXX_SRCS) $(LIBDEPS) stamp-objlist c-common.o \
c-pragma.o $(srcdir)/cp/cp-tree.h $(srcdir)/cp/cp-tree.def \
$(srcdir)/cp/gxx.gperf $(srcdir)/cp/cfns.gperf hash.o
! cd cp; $(MAKE) $(LANG_FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) ../cc1plus$(exeext)
#\f
# Build hooks:
*************** c++.stage4: stage4-start
*** 304,310 ****
c++.distdir:
mkdir tmp/cp
mkdir tmp/cp/inc
! cd cp ; $(MAKE) $(FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) parse.c hash.h
cd cp; \
for file in *[0-9a-zA-Z+]; do \
$(LN) $$file ../tmp/cp; \
--- 304,310 ----
c++.distdir:
mkdir tmp/cp
mkdir tmp/cp/inc
! cd cp ; $(MAKE) $(LANG_FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) parse.c hash.h
cd cp; \
for file in *[0-9a-zA-Z+]; do \
$(LN) $$file ../tmp/cp; \
Index: f/Make-lang.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/f/Make-lang.in,v
retrieving revision 1.62
diff -c -p -r1.62 Make-lang.in
*** f/Make-lang.in 2000/02/26 20:02:00 1.62
--- f/Make-lang.in 2000/05/01 23:15:39
***************
*** 1,5 ****
# Top level makefile fragment for GNU Fortran. -*-makefile-*-
! # Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
#This file is part of GNU Fortran.
--- 1,5 ----
# Top level makefile fragment for GNU Fortran. -*-makefile-*-
! # Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
#This file is part of GNU Fortran.
*************** F77_SRCS = \
*** 202,208 ****
f771$(exeext): $(P) $(F77_SRCS) $(LIBDEPS) stamp-objlist
touch lang-f77
! cd f; $(MAKE) $(FLAGS_TO_PASS) \
HOST_CC="`case '$(HOST_CC)' in stage*) echo '$(HOST_CC)' | sed -e 's|stage|../stage|g';; *) echo '$(HOST_CC)';; esac`" \
HOST_CFLAGS="$(HOST_CFLAGS)" HOST_CPPFLAGS="$(HOST_CPPFLAGS)" \
../f771$(exeext)
--- 202,208 ----
f771$(exeext): $(P) $(F77_SRCS) $(LIBDEPS) stamp-objlist
touch lang-f77
! cd f; $(MAKE) $(LANG_FLAGS_TO_PASS) \
HOST_CC="`case '$(HOST_CC)' in stage*) echo '$(HOST_CC)' | sed -e 's|stage|../stage|g';; *) echo '$(HOST_CC)';; esac`" \
HOST_CFLAGS="$(HOST_CFLAGS)" HOST_CPPFLAGS="$(HOST_CPPFLAGS)" \
../f771$(exeext)
Index: java/Make-lang.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/Make-lang.in,v
retrieving revision 1.29
diff -c -p -r1.29 Make-lang.in
*** java/Make-lang.in 2000/03/06 19:37:34 1.29
--- java/Make-lang.in 2000/05/01 23:15:39
*************** JAVA_SRCS = $(srcdir)/java/parse.y $(src
*** 78,84 ****
$(srcdir)/java/jcf-depend.c $(srcdir)/java/jcf-path.c
jc1$(exeext): $(P) $(JAVA_SRCS) $(LIBDEPS) stamp-objlist ggc-callbacks.o
! cd java; $(MAKE) $(FLAGS_TO_PASS) $(JAVA_FLAGS_TO_PASS) ../jc1$(exeext)
jvspec.o: $(srcdir)/java/jvspec.c system.h $(GCC_H)
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
--- 78,84 ----
$(srcdir)/java/jcf-depend.c $(srcdir)/java/jcf-path.c
jc1$(exeext): $(P) $(JAVA_SRCS) $(LIBDEPS) stamp-objlist ggc-callbacks.o
! cd java; $(MAKE) $(LANG_FLAGS_TO_PASS) $(JAVA_FLAGS_TO_PASS) ../jc1$(exeext)
jvspec.o: $(srcdir)/java/jvspec.c system.h $(GCC_H)
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
*************** $(GCJ)-cross$(exeext): $(GCJ)$(exeext)
*** 98,104 ****
# Dependencies here must be kept in sync with dependencies in Makefile.in.
jvgenmain$(exeext): $(srcdir)/java/jvgenmain.c $(srcdir)/java/mangle.c \
$(LIBDEPS) $(TREE_H)
! cd java && $(MAKE) $(FLAGS_TO_PASS) $(JAVA_FLAGS_TO_PASS) ../jvgenmain$(exeext)
# This must be kept in sync with dependencies in Makefile.in.
GCJH_SOURCES = $(srcdir)/java/gjavah.c $(srcdir)/java/jcf-io.c \
--- 98,104 ----
# Dependencies here must be kept in sync with dependencies in Makefile.in.
jvgenmain$(exeext): $(srcdir)/java/jvgenmain.c $(srcdir)/java/mangle.c \
$(LIBDEPS) $(TREE_H)
! cd java && $(MAKE) $(LANG_FLAGS_TO_PASS) $(JAVA_FLAGS_TO_PASS) ../jvgenmain$(exeext)
# This must be kept in sync with dependencies in Makefile.in.
GCJH_SOURCES = $(srcdir)/java/gjavah.c $(srcdir)/java/jcf-io.c \
*************** GCJH_SOURCES = $(srcdir)/java/gjavah.c $
*** 108,128 ****
$(srcdir)/java/jcf-path.c
gcjh$(exeext): $(GCJH_SOURCES) $(LIBDEPS) $(TREE_H)
! cd java && $(MAKE) $(FLAGS_TO_PASS) $(JAVA_FLAGS_TO_PASS) ../gcjh$(exeext)
# This must be kept in sync with dependencies in Makefile.in.
JV_SCAN_SOURCES = $(srcdir)/java/parse-scan.y $(srcdir)/java/lex.c \
$(srcdir)/java/parse.h $(srcdir)/java/lex.h $(srcdir)/java/jv-scan.c
jv-scan$(exeext): $(JV_SCAN_SOURCES) stamp-objlist $(LIBDEPS)
! cd java && $(MAKE) $(FLAGS_TO_PASS) $(JAVA_FLAGS_TO_PASS) ../jv-scan$(exeext)
# This must be kept in sync with dependencies in Makefile.in.
JCF_DUMP_SOURCES = $(srcdir)/java/jcf-dump.c $(srcdir)/java/jcf-io.c \
$(srcdir)/java/zextract.c $(TREE_H)
jcf-dump$(exeext): $(JCF_DUMP_SOURCES)
! cd java && $(MAKE) $(FLAGS_TO_PASS) $(JAVA_FLAGS_TO_PASS) ../jcf-dump$(exeext)
#\f
# Build hooks:
--- 108,128 ----
$(srcdir)/java/jcf-path.c
gcjh$(exeext): $(GCJH_SOURCES) $(LIBDEPS) $(TREE_H)
! cd java && $(MAKE) $(LANG_FLAGS_TO_PASS) $(JAVA_FLAGS_TO_PASS) ../gcjh$(exeext)
# This must be kept in sync with dependencies in Makefile.in.
JV_SCAN_SOURCES = $(srcdir)/java/parse-scan.y $(srcdir)/java/lex.c \
$(srcdir)/java/parse.h $(srcdir)/java/lex.h $(srcdir)/java/jv-scan.c
jv-scan$(exeext): $(JV_SCAN_SOURCES) stamp-objlist $(LIBDEPS)
! cd java && $(MAKE) $(LANG_FLAGS_TO_PASS) $(JAVA_FLAGS_TO_PASS) ../jv-scan$(exeext)
# This must be kept in sync with dependencies in Makefile.in.
JCF_DUMP_SOURCES = $(srcdir)/java/jcf-dump.c $(srcdir)/java/jcf-io.c \
$(srcdir)/java/zextract.c $(TREE_H)
jcf-dump$(exeext): $(JCF_DUMP_SOURCES)
! cd java && $(MAKE) $(LANG_FLAGS_TO_PASS) $(JAVA_FLAGS_TO_PASS) ../jcf-dump$(exeext)
#\f
# Build hooks:
*************** java.stage4: stage4-start
*** 203,209 ****
# distribution anyway. It then copies the files to the distdir directory.
java.distdir:
mkdir tmp/java
! cd java ; $(MAKE) $(FLAGS_TO_PASS) $(JAVA_FLAGS_TO_PASS) parse.c hash.h
cd java; \
for file in *[0-9a-zA-Z+]; do \
ln $$file ../tmp/java >/dev/null 2>&1 || cp $$file ../tmp/java; \
--- 203,209 ----
# distribution anyway. It then copies the files to the distdir directory.
java.distdir:
mkdir tmp/java
! cd java ; $(MAKE) $(LANG_FLAGS_TO_PASS) $(JAVA_FLAGS_TO_PASS) parse.c hash.h
cd java; \
for file in *[0-9a-zA-Z+]; do \
ln $$file ../tmp/java >/dev/null 2>&1 || cp $$file ../tmp/java; \
Index: objc/Make-lang.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/objc/Make-lang.in,v
retrieving revision 1.24
diff -c -p -r1.24 Make-lang.in
*** objc/Make-lang.in 1999/09/14 07:46:09 1.24
--- objc/Make-lang.in 2000/05/01 23:15:39
*************** objc.stage4: stage4-start
*** 160,166 ****
# the build in the inner directory.
objc.distdir: $(srcdir)/objc/objc-parse.c
mkdir tmp/objc
! # cd objc ; $(MAKE) $(FLAGS_TO_PASS) objc-parse.c
cd objc; \
for file in *[0-9a-zA-Z+]; do \
ln $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \
--- 160,166 ----
# the build in the inner directory.
objc.distdir: $(srcdir)/objc/objc-parse.c
mkdir tmp/objc
! # cd objc ; $(MAKE) $(LANG_FLAGS_TO_PASS) objc-parse.c
cd objc; \
for file in *[0-9a-zA-Z+]; do \
ln $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch Re: warning flags
2000-05-01 16:32 ` Patch Re: warning flags Jason Merrill
@ 2000-05-04 5:56 ` Franz Sirl
2000-05-04 7:53 ` Laurynas Biveinis
1 sibling, 0 replies; 223+ messages in thread
From: Franz Sirl @ 2000-05-04 5:56 UTC (permalink / raw)
To: Jason Merrill; +Cc: Kaveh R. Ghazi, gcc-patches
At 01:32 02.05.00, Jason Merrill wrote:
> >>>>> Kaveh R Ghazi <ghazi@caip.rutgers.edu> writes:
>
> > I wouldn't mind adding -pedantic if it doesn't add a lot of noise.
> > I'm generally the one who cleans these up and its enough work as it
> > is. :-) I haven't tried -pedantic myself so I don't know, but IIRC, it
> > can be noisy about things like unsigned vs signed char pointer
> assignments,
> > etc, which are more annoying than helpful.
>
>Sure they're annoying, but if our goal is to have the main gcc directory
>contain code that can be built with any conformant C compiler, they need to
>be fixed. That's the point of -pedantic, after all.
>
>How about this? I'd prefer to use sed rather than -Wno-traditional, since
>the latter evokes warnings from the C++ frontend.
>
>2000-05-01 Jason Merrill <jason@casey.cygnus.com>
>
> * Makefile.in (WARN_CFLAGS): Add -pedantic -Wno-long-long.
> (LOOSE_CFLAGS): New: CFLAGS without -pedantic and -Wtraditional.
> (GCC_CFLAGS): Use it.
> (LANG_FLAGS_TO_PASS): New: SUBDIR_FLAGS_TO_PASS with LOOSE_CFLAGS.
> * cp/Make-lang.in, java/Make-lang.in, f/Make-lang.in,
> ch/Make-lang.in,
> objc/Make-lang.in: Use it.
Can you PLEASE disable -pedantic for --enable-checking? I'm flooded now with
/home/fsirl/cvsx/gccm/gcc/reload1.c:6983: warning: ANSI C forbids
braced-groups within expressions
/home/fsirl/cvsx/gccm/gcc/reload1.c:7034: warning: ANSI C forbids
braced-groups within expressions
/home/fsirl/cvsx/gccm/gcc/reload1.c:7051: warning: ANSI C forbids
braced-groups within expressions
/home/fsirl/cvsx/gccm/gcc/reload1.c:7055: warning: ANSI C forbids
braced-groups within expressions
/home/fsirl/cvsx/gccm/gcc/reload1.c:7068: warning: ANSI C forbids
braced-groups within expressions
/home/fsirl/cvsx/gccm/gcc/reload1.c:7070: warning: ANSI C forbids
braced-groups within expressions
/home/fsirl/cvsx/gccm/gcc/reload1.c:7072: warning: ANSI C forbids
braced-groups within expressions
etcetc.
And was the addition of -pipe to WARN_CFLAGS intentional? It's not
mentioned in the ChangeLog.
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Patch Re: warning flags
2000-05-01 16:32 ` Patch Re: warning flags Jason Merrill
2000-05-04 5:56 ` Franz Sirl
@ 2000-05-04 7:53 ` Laurynas Biveinis
1 sibling, 0 replies; 223+ messages in thread
From: Laurynas Biveinis @ 2000-05-04 7:53 UTC (permalink / raw)
To: Jason Merrill; +Cc: gcc-patches
Jason Merrill wrote:
> 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
>
> * Makefile.in (WARN_CFLAGS): Add -pedantic -Wno-long-long.
> ! WARN_CFLAGS = -pipe -W -Wall -Wtraditional -pedantic -Wno-long-long
This '-pipe' (BTW, not mentioned in ChangeLog) breaks building under DJGPP.
What about autoconf test?
Laurynas Biveinis
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: `$' in identifiers -vs- PPC Linux
[not found] ` <5.0.0.13.2.20000831143109.01f33ec0@mail.lauterbach.com>
@ 2000-08-31 13:12 ` Franz Sirl
2000-10-15 5:03 ` Franz Sirl
0 siblings, 1 reply; 223+ messages in thread
From: Franz Sirl @ 2000-08-31 13:12 UTC (permalink / raw)
To: Geoff Keating; +Cc: tromey, gcc-bugs, gcc-patches
On Thu, 31 Aug 2000, Franz Sirl wrote:
> At 02:58 31.08.00, Geoff Keating wrote:
> >Tom Tromey <tromey@cygnus.com> writes:
> > > Alexandre> I'm bitten by this problem on AIX 4.1, when compiling
> > > Alexandre> libgcj. It would be nice if g++ could somehow mangle `$'
> > > Alexandre> so as to accept it in source-code (even if with
> > > Alexandre> -fdollars-in-identifiers) even if the assembler can't
> > > Alexandre> accept them directly.
> > >
> > > Yes. For instance it could mangle them the way that gcj already
> > > mangles non-ASCII characters that are valid in Java identifiers.
> >
> >It'd be good to move this code into the language-independent parts of
> >the compiler, because it'll be needed even for C mangling of \u escapes
> >in identifiers.
> >
> >I also have no objection to moving DOLLARS_IN_IDENTIFIERS into aix.h
> >if someone wants to generate a patch. The native assembler on all the
> >ppc sysv stuff is GNU as, which should be OK with $, and it's probably
> >better to be consistent between linuxes.
>
> I can do this patch later today, reminds me that I wanted to move some
> other macros to aix.h stiil.
OK, here is the patch. Bootstrap still running, but I expect no problems
since problems should already show up during compile :-).
This closes the "move colliding macros from rs6000.h to platform headers" for
me.
The remaining collisions
STRICT_ALIGNMENT
STACK_BOUNDARY
BIGGEST_ALIGNMENT
ASM_OUTPUT_INT
SIZE_TYPE
make no real sense to move into aix.h IMHO.
The patch also syncs the ASM_APP_* macros for Linux on PPC and fixes the
CONSTRUCTOR handling in rs6000.c. Geoff, related to the CONSTRUCTOR handling
I also want to revive execute/20000516-1.c from CVS, this test is meant to
pass and is _different_ from execute/20000722-1.c. The test verifies that
CONSTRUCTOR data is put into a writeable section. I didn't notice yet that
you did remove it, but the removal was wrong.
OK to commit?
BTW, it seems gcc/stmt.c is seriously corrupted in CVS, but I don't know cvs
well enough to tell if this can be fixed from remote.
Franz.
2000-08-31 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* rs6000/rs6000.h (NO_DOLLAR_IN_LABEL, DOLLARS_IN_IDENTIFIERS,
ENCODE_SECTION_INFO, ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Move from
here...
* rs6000/aix.h: ...to here.
* rs6000/linux.h (ASM_APP_ON, ASM_APP_OFF): Define to Linux-style.
* rs6000/rs6000.c (rs6000_select_section): Handle CONSTRUCTOR.
(rs6000_unique_section): Likewise.
^ permalink raw reply [flat|nested] 223+ messages in thread
* [PATCH] doloop_optimize miscompiles openssl
@ 2000-09-24 10:54 ` Franz Sirl
2000-09-24 15:07 ` Franz Sirl
0 siblings, 1 reply; 223+ messages in thread
From: Franz Sirl @ 2000-09-24 10:54 UTC (permalink / raw)
To: gcc-bugs, gcc-patches
Hi,
the appended testcase produces the following insn sequence with -O2
-fno-branch-count-reg on powerpc-linux-gnu:
[...snip...]
(note 35 33 2918 NOTE_INSN_LOOP_BEG -1347440721)
(jump_insn 2918 35 2919 (set (pc)
(label_ref 36)) -1 (nil)
(nil))
(barrier 2919 2918 2895)
(code_label 2895 2919 2929 6 "" "" [1 uses])
(note 2929 2895 2898 [bb 1] NOTE_INSN_BASIC_BLOCK -1347440721)
(insn 2898 2929 2901 (set (reg/v:SI 86)
(reg:SI 1058)) -1 (nil)
(nil))
(insn 2901 2898 2904 (set (reg/v:SI 87)
(reg:SI 1060)) -1 (nil)
(nil))
(insn 2904 2901 2907 (set (reg/v:SI 88)
(reg:SI 1062)) -1 (nil)
(nil))
(insn 2907 2904 2910 (set (reg/v:SI 89)
(reg:SI 1064)) -1 (nil)
(nil))
(insn 2910 2907 2913 (set (reg/v:SI 90)
(reg:SI 1066)) -1 (nil)
(nil))
(insn 2913 2910 2939 (set (reg/v:SI 85)
(plus:SI (reg/v:SI 85)
(const_int 64 [0x40]))) -1 (nil)
(nil))
(insn 2939 2913 2915 (set (reg:SI 1068)
(mem/s:SI (reg/v:SI 82) 7)) -1 (nil)
(nil))
(note 2915 2939 36 NOTE_INSN_LOOP_CONT -1347440721)
(code_label 36 2915 2930 3 "" "" [1 uses])
(note 2930 36 41 [bb 2] NOTE_INSN_BASIC_BLOCK -1347440721)
(insn 41 2930 43 (set (reg:SI 108)
(mem:SI (reg/v:SI 85) 7)) -1 (nil)
(nil))
[...snip...]
[...snip...]
(insn 2890 2887 2891 (set (reg/v:SI 84)
(plus:SI (reg/v:SI 84)
(const_int -1 [0xffffffff]))) -1 (nil)
(nil))
(insn 2891 2890 2892 (set (reg:CC 1067)
(compare:CC (reg/v:SI 84)
(const_int 0 [0x0]))) -1 (nil)
(nil))
(jump_insn 2892 2891 2922 (set (pc)
(if_then_else (gt (reg:CC 1067)
(const_int 0 [0x0]))
(label_ref 2895)
(pc))) -1 (nil)
(nil))
(note 2922 2892 2924 NOTE_INSN_LOOP_END -1347440721)
(note 2924 2922 0 0x300a6d80 NOTE_INSN_BLOCK_END -1347440721)
With -fbranch-count-reg (btw, why is the flag named differently to the
option?), the code in doloop_modify calls delete_insn(jump_insn) on insn
2892, which in turn deletes the whole BB 1, because the uses of code_label
2895 drop to 0.
Incrementing the use count before the delete_insn call prevents the immediate
deletion, it happens any lateron, because the jump insn is wrongly converted:
[...snip...]
(note 35 2956 2953 NOTE_INSN_LOOP_BEG -1347440721)
(code_label 2953 35 2918 8 "" "" [1 uses])
(jump_insn 2918 2953 2919 (set (pc)
(label_ref 36)) -1 (nil)
(nil))
(barrier 2919 2918 2929)
(note 2929 2919 2915 [bb 1] NOTE_INSN_BASIC_BLOCK -1347440721)
(note 2915 2929 36 NOTE_INSN_LOOP_CONT -1347440721)
(code_label 36 2915 2930 3 "" "" [1 uses])
(note 2930 36 41 [bb 2] NOTE_INSN_BASIC_BLOCK -1347440721)
[...snip...]
[...snip...]
(insn 2891 2890 2945 (set (reg:CC 1067)
(compare:CC (reg/v:SI 84)
(const_int 0 [0x0]))) -1 (nil)
(nil))
(jump_insn 2945 2891 2922 (parallel[
(set (pc)
(if_then_else (ne (reg:SI 1071)
(const_int 1 [0x1]))
(label_ref 2953)
(pc)))
(set (reg:SI 1071)
(plus:SI (reg:SI 1071)
(const_int -1 [0xffffffff])))
(clobber (scratch:CC))
(clobber (scratch:SI))
] ) -1 (nil)
(nil))
So what happens is that the target label of the JUMP insn 2945 incorrectly
points to the loop start, not to the loop top. This is caused by this code in
doloop_modify:
/* Discard original jump to continue loop. The original compare
result may still be live, so it cannot be discarded explicitly. */
delete_insn (jump_insn);
/* Emit the label that will delimit the start of the loop. */
emit_label_after (start_label, loop->start);
LABEL_NUSES (start_label)++;
The attached patch fixes the testcase, but I may very well have missed some
important stuff, so please look closely :-). I haven't boostrapped yet either.
Franz.
* doloop.c (doloop_modify): Prevent delete_insn() from deleting too much.
Use loop->top as target for the new JUMP insn.
Index: gcc/doloop.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/doloop.c,v
retrieving revision 1.2
diff -u -p -r1.2 doloop.c
--- gcc/doloop.c 2000/08/14 20:55:11 1.2
+++ gcc/doloop.c 2000/09/24 17:38:16
@@ -416,11 +416,14 @@ doloop_modify (loop, iterations, iterati
}
/* Discard original jump to continue loop. The original compare
- result may still be live, so it cannot be discarded explicitly. */
+ result may still be live, so it cannot be discarded explicitly.
+ Don't delete too much, increment the use count of the target label. */
+ LABEL_NUSES (JUMP_LABEL (jump_insn))++;
delete_insn (jump_insn);
+ LABEL_NUSES (JUMP_LABEL (jump_insn))--;
- /* Emit the label that will delimit the start of the loop. */
- emit_label_after (start_label, loop->start);
+ /* Emit the label that will delimit the top of the loop. */
+ emit_label_after (start_label, loop->top);
LABEL_NUSES (start_label)++;
counter_reg = XEXP (condition, 0);
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH] doloop_optimize miscompiles openssl
2000-09-24 10:54 ` [PATCH] doloop_optimize miscompiles openssl Franz Sirl
@ 2000-09-24 15:07 ` Franz Sirl
2000-09-24 22:25 ` Geoff Keating
0 siblings, 1 reply; 223+ messages in thread
From: Franz Sirl @ 2000-09-24 15:07 UTC (permalink / raw)
To: gcc-bugs, gcc-patches
On Sun, 24 Sep 2000, Franz Sirl wrote:
> * doloop.c (doloop_modify): Prevent delete_insn() from deleting too much.
> Use loop->top as target for the new JUMP insn.
>
> Index: gcc/doloop.c
> ===================================================================
> RCS file: /cvs/gcc/egcs/gcc/doloop.c,v
> retrieving revision 1.2
> diff -u -p -r1.2 doloop.c
> --- gcc/doloop.c 2000/08/14 20:55:11 1.2
> +++ gcc/doloop.c 2000/09/24 17:38:16
> @@ -416,11 +416,14 @@ doloop_modify (loop, iterations, iterati
> }
>
> /* Discard original jump to continue loop. The original compare
> - result may still be live, so it cannot be discarded explicitly. */
> + result may still be live, so it cannot be discarded explicitly.
> + Don't delete too much, increment the use count of the target label.
> */ + LABEL_NUSES (JUMP_LABEL (jump_insn))++;
> delete_insn (jump_insn);
> + LABEL_NUSES (JUMP_LABEL (jump_insn))--;
>
> - /* Emit the label that will delimit the start of the loop. */
> - emit_label_after (start_label, loop->start);
> + /* Emit the label that will delimit the top of the loop. */
> + emit_label_after (start_label, loop->top);
> LABEL_NUSES (start_label)++;
>
> counter_reg = XEXP (condition, 0);
The patch needs a small refinement, but then passes the bootstrap&testsuite
and fixes the openssl miscompilation. On to fixing the next openssl
miscompilation :-(.
Franz.
* doloop.c (doloop_modify): Prevent delete_insn() from deleting too much.
Prefer loop->top over loop->start as target for the new JUMP insn.
Index: gcc/doloop.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/doloop.c,v
retrieving revision 1.2
diff -u -p -r1.2 doloop.c
--- doloop.c 2000/08/14 20:55:11 1.2
+++ doloop.c 2000/09/24 22:00:04
@@ -416,11 +416,14 @@ doloop_modify (loop, iterations, iterati
}
/* Discard original jump to continue loop. The original compare
- result may still be live, so it cannot be discarded explicitly. */
+ result may still be live, so it cannot be discarded explicitly.
+ Don't delete too much, increment the use count of the target label. */
+ LABEL_NUSES (JUMP_LABEL (jump_insn))++;
delete_insn (jump_insn);
+ LABEL_NUSES (JUMP_LABEL (jump_insn))--;
- /* Emit the label that will delimit the start of the loop. */
- emit_label_after (start_label, loop->start);
+ /* Emit the label that will delimit the top of the loop. */
+ emit_label_after (start_label, loop->top ? loop->top : loop->start);
LABEL_NUSES (start_label)++;
counter_reg = XEXP (condition, 0);
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH] doloop_optimize miscompiles openssl
2000-09-24 15:07 ` Franz Sirl
@ 2000-09-24 22:25 ` Geoff Keating
2000-09-25 1:58 ` Franz Sirl
2000-09-25 14:59 ` Franz Sirl
0 siblings, 2 replies; 223+ messages in thread
From: Geoff Keating @ 2000-09-24 22:25 UTC (permalink / raw)
To: Franz Sirl; +Cc: gcc-bugs, gcc-patches
Franz Sirl <Franz.Sirl-kernel@lauterbach.com> writes:
> * doloop.c (doloop_modify): Prevent delete_insn() from
> deleting too much. Prefer loop->top over loop->start as
> target for the new JUMP insn.
> Index: gcc/doloop.c
> ===================================================================
> RCS file: /cvs/gcc/egcs/gcc/doloop.c,v
> retrieving revision 1.2
> diff -u -p -r1.2 doloop.c
> --- doloop.c 2000/08/14 20:55:11 1.2
> +++ doloop.c 2000/09/24 22:00:04
> @@ -416,11 +416,14 @@ doloop_modify (loop, iterations, iterati
> }
>
> /* Discard original jump to continue loop. The original compare
> - result may still be live, so it cannot be discarded explicitly. */
> + result may still be live, so it cannot be discarded explicitly.
> + Don't delete too much, increment the use count of the target label. */
> + LABEL_NUSES (JUMP_LABEL (jump_insn))++;
> delete_insn (jump_insn);
> + LABEL_NUSES (JUMP_LABEL (jump_insn))--;
>
> - /* Emit the label that will delimit the start of the loop. */
> - emit_label_after (start_label, loop->start);
> + /* Emit the label that will delimit the top of the loop. */
> + emit_label_after (start_label, loop->top ? loop->top : loop->start);
> LABEL_NUSES (start_label)++;
Franz,
would it work to simply emit the start_label before calling
delete_insn? After all, the label that jump_insn branches to is
really not used after this transformation, right?
--
- Geoffrey Keating <geoffk@cygnus.com>
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH] doloop_optimize miscompiles openssl
2000-09-24 22:25 ` Geoff Keating
@ 2000-09-25 1:58 ` Franz Sirl
2000-09-25 14:59 ` Franz Sirl
1 sibling, 0 replies; 223+ messages in thread
From: Franz Sirl @ 2000-09-25 1:58 UTC (permalink / raw)
To: Geoff Keating; +Cc: gcc-bugs, gcc-patches
At 07:24 25.09.00, Geoff Keating wrote:
>Franz Sirl <Franz.Sirl-kernel@lauterbach.com> writes:
>
> > * doloop.c (doloop_modify): Prevent delete_insn() from
> > deleting too much. Prefer loop->top over loop->start as
> > target for the new JUMP insn.
>
> > Index: gcc/doloop.c
> > ===================================================================
> > RCS file: /cvs/gcc/egcs/gcc/doloop.c,v
> > retrieving revision 1.2
> > diff -u -p -r1.2 doloop.c
> > --- doloop.c 2000/08/14 20:55:11 1.2
> > +++ doloop.c 2000/09/24 22:00:04
> > @@ -416,11 +416,14 @@ doloop_modify (loop, iterations, iterati
> > }
> >
> > /* Discard original jump to continue loop. The original compare
> > - result may still be live, so it cannot be discarded explicitly. */
> > + result may still be live, so it cannot be discarded explicitly.
> > + Don't delete too much, increment the use count of the target
> label. */
> > + LABEL_NUSES (JUMP_LABEL (jump_insn))++;
> > delete_insn (jump_insn);
> > + LABEL_NUSES (JUMP_LABEL (jump_insn))--;
> >
> > - /* Emit the label that will delimit the start of the loop. */
> > - emit_label_after (start_label, loop->start);
> > + /* Emit the label that will delimit the top of the loop. */
> > + emit_label_after (start_label, loop->top ? loop->top : loop->start);
> > LABEL_NUSES (start_label)++;
>
>Franz,
>
>would it work to simply emit the start_label before calling
>delete_insn? After all, the label that jump_insn branches to is
>really not used after this transformation, right?
Hmm, I think so... If delete_insn notices that the code is reachable from
elsewhere, it should refrain from deleting it. I'll try it when I'm home.
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH] doloop_optimize miscompiles openssl
2000-09-24 22:25 ` Geoff Keating
2000-09-25 1:58 ` Franz Sirl
@ 2000-09-25 14:59 ` Franz Sirl
2000-09-25 15:35 ` Geoff Keating
1 sibling, 1 reply; 223+ messages in thread
From: Franz Sirl @ 2000-09-25 14:59 UTC (permalink / raw)
To: Geoff Keating; +Cc: gcc-bugs, gcc-patches
On Mon, 25 Sep 2000, Geoff Keating wrote:
> Franz Sirl <Franz.Sirl-kernel@lauterbach.com> writes:
> > * doloop.c (doloop_modify): Prevent delete_insn() from
> > deleting too much. Prefer loop->top over loop->start as
> > target for the new JUMP insn.
> >
> > Index: gcc/doloop.c
> > ===================================================================
> > RCS file: /cvs/gcc/egcs/gcc/doloop.c,v
> > retrieving revision 1.2
> > diff -u -p -r1.2 doloop.c
> > --- doloop.c 2000/08/14 20:55:11 1.2
> > +++ doloop.c 2000/09/24 22:00:04
> > @@ -416,11 +416,14 @@ doloop_modify (loop, iterations, iterati
> > }
> >
> > /* Discard original jump to continue loop. The original compare
> > - result may still be live, so it cannot be discarded explicitly. */
> > + result may still be live, so it cannot be discarded explicitly.
> > + Don't delete too much, increment the use count of the target label.
> > */ + LABEL_NUSES (JUMP_LABEL (jump_insn))++;
> > delete_insn (jump_insn);
> > + LABEL_NUSES (JUMP_LABEL (jump_insn))--;
> >
> > - /* Emit the label that will delimit the start of the loop. */
> > - emit_label_after (start_label, loop->start);
> > + /* Emit the label that will delimit the top of the loop. */
> > + emit_label_after (start_label, loop->top ? loop->top : loop->start);
> > LABEL_NUSES (start_label)++;
>
> Franz,
>
> would it work to simply emit the start_label before calling
> delete_insn? After all, the label that jump_insn branches to is
> really not used after this transformation, right?
Yes, it works. In the meantime I found another bug with the appended
testcase, it seems testing for loop_info->has_multiple_exit_targets is not
enough for ruling out unsuitable loops. For the testcase
loop_info->has_multiple_exit_targets is 0, but loop->exit_counmt is 3.
Franz.
* doloop.c (doloop_modify): Prevent delete_insn() from
deleting too much. Prefer loop->top over loop->start as
target for the new JUMP insn.
(doloop_valid_p): Ignore loop with exit_count > 1.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH] doloop_optimize miscompiles openssl
2000-09-25 14:59 ` Franz Sirl
@ 2000-09-25 15:35 ` Geoff Keating
2000-09-26 5:24 ` Franz Sirl
0 siblings, 1 reply; 223+ messages in thread
From: Geoff Keating @ 2000-09-25 15:35 UTC (permalink / raw)
To: Franz Sirl; +Cc: gcc-patches
Franz Sirl <Franz.Sirl-kernel@lauterbach.com> writes:
> * doloop.c (doloop_modify): Prevent delete_insn() from
> deleting too much. Prefer loop->top over loop->start as
> target for the new JUMP insn.
> (doloop_valid_p): Ignore loop with exit_count > 1.
This is OK.
(You should say how you tested your patch; I'm assuming you did a
bootstrap on powerpc-linux.)
--
- Geoffrey Keating <geoffk@cygnus.com>
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH] doloop_optimize miscompiles openssl
2000-09-25 15:35 ` Geoff Keating
@ 2000-09-26 5:24 ` Franz Sirl
[not found] ` <Franz>
2000-09-27 4:57 ` Michael Hayes
0 siblings, 2 replies; 223+ messages in thread
From: Franz Sirl @ 2000-09-26 5:24 UTC (permalink / raw)
To: Geoff Keating; +Cc: gcc-patches, Michael Hayes
At 00:34 26.09.00, Geoff Keating wrote:
>Franz Sirl <Franz.Sirl-kernel@lauterbach.com> writes:
>
> > * doloop.c (doloop_modify): Prevent delete_insn() from
> > deleting too much. Prefer loop->top over loop->start as
> > target for the new JUMP insn.
> > (doloop_valid_p): Ignore loop with exit_count > 1.
>
>This is OK.
Hmm, already lying in bed, it occurred to me that I'm not sure about the
exact definition for loop->exit_count. I seem to remember (I can't test
right now) that it was set to 3 for the testcase, this would mean the main
loop exit isn't counted here and I have to compare for >0, not >1. But I
don't know enough about the loop detection algorithm to be 100% sure, maybe
I have to test other loop structure members too for a correct test?
In the meantime, while browsing the code, I found another suspicious code
fragment:
/* Some targets (eg, C4x) need to initialize special looping
registers. */
#ifdef HAVE_doloop_begin
{
rtx init;
init = gen_doloop_begin (counter_reg,
GET_CODE (iterations) == CONST_INT
? iterations : const0_rtx, iterations_max,
GEN_INT (loop->level));
if (init)
{
start_sequence ();
emit_insn (init);
sequence = gen_sequence ();
end_sequence ();
emit_insn_after (sequence, loop->start);
}
}
#endif
Do we need to prefer loop->top here too? The comment doesn't specify if the
initialization is needed on every loop run...
Maybe the originator of the code should comment on the patches? Michael?
>(You should say how you tested your patch; I'm assuming you did a
>bootstrap on powerpc-linux.)
Well, since I've caught a cold my mind is a bit dizzy, so I didn't want to
ask for commit before sleeping over it :-), but I passed my status to the
list to get some comments.
BTW, I will try to turn both testcases in this thread into executable
testcases.
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH] doloop_optimize miscompiles openssl
2000-09-26 5:24 ` Franz Sirl
[not found] ` <Franz>
@ 2000-09-27 4:57 ` Michael Hayes
2000-09-27 5:32 ` Franz Sirl
1 sibling, 1 reply; 223+ messages in thread
From: Michael Hayes @ 2000-09-27 4:57 UTC (permalink / raw)
To: Franz Sirl; +Cc: Geoff Keating, gcc-patches, Michael Hayes
Franz Sirl writes:
> Hmm, already lying in bed, it occurred to me that I'm not sure about the
> exact definition for loop->exit_count. I seem to remember (I can't test
> right now) that it was set to 3 for the testcase, this would mean the main
> loop exit isn't counted here and I have to compare for >0, not >1.
Unfortunately, some of this is rather ad-hoc and is one of the reasons
I'm rewriting the loop optimizer to use the CFG. Reading between the
lines, I assume that loop->exit_count is 3 but
loop_info->has_multiple-exit_targets is 0 for your testcase?
> In the meantime, while browsing the code, I found another suspicious code
> fragment:
<code snipped>
> Do we need to prefer loop->top here too? The comment doesn't specify if the
> initialization is needed on every loop run...
> Maybe the originator of the code should comment on the patches?
It's only needed once before the loop starts.
> BTW, I will try to turn both testcases in this thread into executable
> testcases.
This would be useful. I haven't had a chance to look at this thread
yet; could you post me a simple testcase?
Michael.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH] doloop_optimize miscompiles openssl
2000-09-27 4:57 ` Michael Hayes
@ 2000-09-27 5:32 ` Franz Sirl
2000-09-28 10:43 ` Franz Sirl
0 siblings, 1 reply; 223+ messages in thread
From: Franz Sirl @ 2000-09-27 5:32 UTC (permalink / raw)
To: Michael Hayes; +Cc: Geoff Keating, gcc-patches, Michael Hayes
At 13:57 27.09.00, Michael Hayes wrote:
>Franz Sirl writes:
>
> > Hmm, already lying in bed, it occurred to me that I'm not sure about the
> > exact definition for loop->exit_count. I seem to remember (I can't test
> > right now) that it was set to 3 for the testcase, this would mean the
> main
> > loop exit isn't counted here and I have to compare for >0, not >1.
>
>Unfortunately, some of this is rather ad-hoc and is one of the reasons
>I'm rewriting the loop optimizer to use the CFG. Reading between the
>lines, I assume that loop->exit_count is 3 but
>loop_info->has_multiple-exit_targets is 0 for your testcase?
Yeah, exactly. In the meantime I convinced myself by looking at the usage
of exit_code elsewhere in the compiler and reading the comments in
basic-block.h that I have to compare exit_count against 0. With this patch
I bootstrapped and tested fine. The raw testcase is at
< http://gcc.gnu.org/ml/gccpatches/200009/msg01033.html > (no access to my
home machine right now, sorry), I have converted it to an executable
testcase in the meantime.
> > In the meantime, while browsing the code, I found another suspicious code
> > fragment:
>
><code snipped>
>
> > Do we need to prefer loop->top here too? The comment doesn't specify
> if the
> > initialization is needed on every loop run...
>
> > Maybe the originator of the code should comment on the patches?
>
>It's only needed once before the loop starts.
OK, but shouldn't we use a emit_insn_before in that case? Won't it be
executed multiple times with the current emit_insn_after in cases where
loop->top is 0 na donly loop->start is set?
> > BTW, I will try to turn both testcases in this thread into executable
> > testcases.
>
>This would be useful. I haven't had a chance to look at this thread
>yet; could you post me a simple testcase?
The other testcase is at
< http://gcc.gnu.org/ml/gcc-patches/2000-09/msg00999.html >. I converted this
one into an non-PPC specific executable testcase too. I'll post my current
patch and the executable testcases later today.
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH] doloop_optimize miscompiles openssl
2000-09-27 5:32 ` Franz Sirl
@ 2000-09-28 10:43 ` Franz Sirl
2000-09-28 15:21 ` Geoff Keating
0 siblings, 1 reply; 223+ messages in thread
From: Franz Sirl @ 2000-09-28 10:43 UTC (permalink / raw)
To: Michael Hayes; +Cc: Geoff Keating, gcc-patches, Michael Hayes
On Wed, 27 Sep 2000, Franz Sirl wrote:
> At 13:57 27.09.00, Michael Hayes wrote:
> >Franz Sirl writes:
> > > BTW, I will try to turn both testcases in this thread into executable
> > > testcases.
> >
> >This would be useful. I haven't had a chance to look at this thread
> >yet; could you post me a simple testcase?
>
> The other testcase is at
> < http://gcc.gnu.org/ml/gcc-patches/2000-09/msg00999.html >. I converted this
> one into an non-PPC specific executable testcase too. I'll post my current
> patch and the executable testcases later today.
Here is my final patch (sorry for the delay, but I couldn't reach gcc.gnu.org
yesterday anymore) and the executable testcases extracted from openssl.
GCC with the patch bootstraps fine and causes no regressions in the testsuite.
OK to commit the patch and the testcases?
Franz.
* doloop.c (doloop_modify): Prevent delete_insn() from
deleting too much. Prefer loop->top over loop->start as
target for the new JUMP insn.
(doloop_valid_p): Ignore loop with exit_count != 0.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH] doloop_optimize miscompiles openssl
2000-09-28 10:43 ` Franz Sirl
@ 2000-09-28 15:21 ` Geoff Keating
2000-09-28 15:41 ` Franz Sirl
0 siblings, 1 reply; 223+ messages in thread
From: Geoff Keating @ 2000-09-28 15:21 UTC (permalink / raw)
To: Franz.Sirl-kernel; +Cc: mhayes, gcc-patches, mhayes
> From: Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
> Date: Thu, 28 Sep 2000 19:37:21 +0200
> Cc: Geoff Keating <geoffk@cygnus.com>, gcc-patches@gcc.gnu.org,
> Michael Hayes <mhayes@cygnus.com>
>
>
> --------------Boundary-00=_9AYLYQAQWCV0RI0MRPT1
> Content-Type: text/plain
> Content-Transfer-Encoding: 8bit
>
> On Wed, 27 Sep 2000, Franz Sirl wrote:
> > At 13:57 27.09.00, Michael Hayes wrote:
> > >Franz Sirl writes:
> > > > BTW, I will try to turn both testcases in this thread into executable
> > > > testcases.
> > >
> > >This would be useful. I haven't had a chance to look at this thread
> > >yet; could you post me a simple testcase?
> >
> > The other testcase is at
> > < http://gcc.gnu.org/ml/gcc-patches/2000-09/msg00999.html >. I converted this
> > one into an non-PPC specific executable testcase too. I'll post my current
> > patch and the executable testcases later today.
>
> Here is my final patch (sorry for the delay, but I couldn't reach gcc.gnu.org
> yesterday anymore) and the executable testcases extracted from openssl.
>
> GCC with the patch bootstraps fine and causes no regressions in the testsuite.
>
> OK to commit the patch and the testcases?
The patch is OK.
The testcases are not. I believe they are under this license:
* Copyright remains Eric Young's, and as such any Copyright notices in
* the code are not to be removed.
* If this package is used in a product, Eric Young should be given attribution
* as the author of the parts of the library used.
* This can be in the form of a textual message at program startup or
* in documentation (online or textual) provided with the package.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* "This product includes cryptographic software written by
* Eric Young (eay@cryptsoft.com)"
* The word 'cryptographic' can be left out if the rouines from the library
* being used are not cryptographic related :-).
* 4. If you include any Windows specific code (or a derivative thereof) from
* the apps directory (application code) you must include an acknowledgement:
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
*
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* The licence and distribution terms for any publically available version or
* derivative of this code cannot be changed. i.e. this code cannot simply be
* copied and put under another distribution licence
* [including the GNU Public Licence.]
Clause (3) above is not acceptable for code contributed to the GCC
project, even as testcases. Also, you've removed the copyright
notices, which is generally not allowed.
> Franz.
>
> * doloop.c (doloop_modify): Prevent delete_insn() from
> deleting too much. Prefer loop->top over loop->start as
> target for the new JUMP insn.
> (doloop_valid_p): Ignore loop with exit_count != 0.
--
- Geoffrey Keating <geoffk@cygnus.com>
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH] doloop_optimize miscompiles openssl
2000-09-28 15:21 ` Geoff Keating
@ 2000-09-28 15:41 ` Franz Sirl
2000-09-28 15:52 ` Geoff Keating
2000-09-28 15:56 ` Jeffrey A Law
0 siblings, 2 replies; 223+ messages in thread
From: Franz Sirl @ 2000-09-28 15:41 UTC (permalink / raw)
To: Geoff Keating; +Cc: mhayes, gcc-patches
On Fri, 29 Sep 2000, Geoff Keating wrote:
> > From: Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
> > OK to commit the patch and the testcases?
>
> The patch is OK.
>
> The testcases are not. I believe they are under this license:
>
> * Copyright remains Eric Young's, and as such any Copyright notices in
> * the code are not to be removed.
> * If this package is used in a product, Eric Young should be given
> attribution * as the author of the parts of the library used.
> * This can be in the form of a textual message at program startup or
> * in documentation (online or textual) provided with the package.
> *
> * Redistribution and use in source and binary forms, with or without
> * modification, are permitted provided that the following conditions
> * are met:
> * 1. Redistributions of source code must retain the copyright
> * notice, this list of conditions and the following disclaimer.
> * 2. Redistributions in binary form must reproduce the above copyright
> * notice, this list of conditions and the following disclaimer in the
> * documentation and/or other materials provided with the distribution.
> * 3. All advertising materials mentioning features or use of this software
> * must display the following acknowledgement:
> * "This product includes cryptographic software written by
> * Eric Young (eay@cryptsoft.com)"
> * The word 'cryptographic' can be left out if the rouines from the
> library * being used are not cryptographic related :-).
> * 4. If you include any Windows specific code (or a derivative thereof)
> from * the apps directory (application code) you must include an
> acknowledgement: * "This product includes software written by Tim Hudson
> (tjh@cryptsoft.com)" *
> * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
> * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
> PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
> LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
> INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
> CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
> THE POSSIBILITY OF * SUCH DAMAGE.
> *
> * The licence and distribution terms for any publically available version
> or * derivative of this code cannot be changed. i.e. this code cannot
> simply be * copied and put under another distribution licence
> * [including the GNU Public Licence.]
>
> Clause (3) above is not acceptable for code contributed to the GCC
> project, even as testcases. Also, you've removed the copyright
> notices, which is generally not allowed.
Hmm, I'm no license expert, but I think the license has been relaxed, since
the current LICENSE talks about "BSD-style", which is acceptable for GCC
AFAIK, or?
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH] doloop_optimize miscompiles openssl
2000-09-28 15:41 ` Franz Sirl
@ 2000-09-28 15:52 ` Geoff Keating
2000-09-28 15:56 ` Jeffrey A Law
1 sibling, 0 replies; 223+ messages in thread
From: Geoff Keating @ 2000-09-28 15:52 UTC (permalink / raw)
To: Franz.Sirl-kernel; +Cc: mhayes, gcc-patches
> From: Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
> Date: Fri, 29 Sep 2000 00:36:00 +0200
> Hmm, I'm no license expert, but I think the license has been relaxed, since
> the current LICENSE talks about "BSD-style", which is acceptable for GCC
> AFAIK, or?
It's the wrong style of BSD.
It's like the old BSD license. Berkely since relaxed that license,
but apparently Tim hasn't.
--
- Geoffrey Keating <geoffk@cygnus.com>
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH] doloop_optimize miscompiles openssl
2000-09-28 15:41 ` Franz Sirl
2000-09-28 15:52 ` Geoff Keating
@ 2000-09-28 15:56 ` Jeffrey A Law
1 sibling, 0 replies; 223+ messages in thread
From: Jeffrey A Law @ 2000-09-28 15:56 UTC (permalink / raw)
To: Franz Sirl; +Cc: Geoff Keating, mhayes, gcc-patches
In message < 00092900360000.16176@enzo.bigblue.local >you write:
>
> --------------Boundary-00=_04CMDWNHEVC46X5YP6TY
> Content-Type: text/plain
> Content-Transfer-Encoding: 8bit
>
> On Fri, 29 Sep 2000, Geoff Keating wrote:
> > > From: Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
> > > OK to commit the patch and the testcases?
> >
> > The patch is OK.
> >
> > The testcases are not. I believe they are under this license:
> >
> > * Copyright remains Eric Young's, and as such any Copyright notices in
> > * the code are not to be removed.
> > * If this package is used in a product, Eric Young should be given
> > attribution * as the author of the parts of the library used.
> > * This can be in the form of a textual message at program startup or
> > * in documentation (online or textual) provided with the package.
> > *
> > * Redistribution and use in source and binary forms, with or without
> > * modification, are permitted provided that the following conditions
> > * are met:
> > * 1. Redistributions of source code must retain the copyright
> > * notice, this list of conditions and the following disclaimer.
> > * 2. Redistributions in binary form must reproduce the above copyright
> > * notice, this list of conditions and the following disclaimer in the
> > * documentation and/or other materials provided with the distribution
> .
> > * 3. All advertising materials mentioning features or use of this softwa
> re
> > * must display the following acknowledgement:
> > * "This product includes cryptographic software written by
> > * Eric Young (eay@cryptsoft.com)"
> > * The word 'cryptographic' can be left out if the rouines from the
> > library * being used are not cryptographic related :-).
> > * 4. If you include any Windows specific code (or a derivative thereof)
> > from * the apps directory (application code) you must include an
> > acknowledgement: * "This product includes software written by Tim Huds
> on
> > (tjh@cryptsoft.com)" *
> > * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
> > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> > * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
> > PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS B
> E
> > LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> > CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> > SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINES
> S
> > INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
> > CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> > ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
> > THE POSSIBILITY OF * SUCH DAMAGE.
> > *
> > * The licence and distribution terms for any publically available versio
> n
> > or * derivative of this code cannot be changed. i.e. this code cannot
> > simply be * copied and put under another distribution licence
> > * [including the GNU Public Licence.]
> >
> > Clause (3) above is not acceptable for code contributed to the GCC
> > project, even as testcases. Also, you've removed the copyright
> > notices, which is generally not allowed.
>
> Hmm, I'm no license expert, but I think the license has been relaxed, since
>
> the current LICENSE talks about "BSD-style", which is acceptable for GCC
> AFAIK, or?
No, it's not acceptable. The author would have to relax the license. Just
because Berkeley relaxed their license doesn't mean the relaxation applies
to other folks that used their license.
jeff
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: `$' in identifiers -vs- PPC Linux
2000-08-31 13:12 ` `$' in identifiers -vs- PPC Linux Franz Sirl
@ 2000-10-15 5:03 ` Franz Sirl
2000-10-16 17:25 ` Geoff Keating
0 siblings, 1 reply; 223+ messages in thread
From: Franz Sirl @ 2000-10-15 5:03 UTC (permalink / raw)
To: Geoff Keating; +Cc: gcc-patches
On Thu, 31 Aug 2000, Franz Sirl wrote:
> > On Thu, 31 Aug 2000, Franz Sirl wrote:
> > At 02:58 31.08.00, Geoff Keating wrote:
> > >Tom Tromey <tromey@cygnus.com> writes:
> > > > Alexandre> I'm bitten by this problem on AIX 4.1, when compiling
> > > > Alexandre> libgcj. It would be nice if g++ could somehow mangle `$'
> > > > Alexandre> so as to accept it in source-code (even if with
> > > > Alexandre> -fdollars-in-identifiers) even if the assembler can't
> > > > Alexandre> accept them directly.
> > > >
> > > > Yes. For instance it could mangle them the way that gcj already
> > > > mangles non-ASCII characters that are valid in Java identifiers.
> > >
> > >It'd be good to move this code into the language-independent parts of
> > >the compiler, because it'll be needed even for C mangling of \u escapes
> > >in identifiers.
> > >
> > >I also have no objection to moving DOLLARS_IN_IDENTIFIERS into aix.h
> > >if someone wants to generate a patch. The native assembler on all the
> > >ppc sysv stuff is GNU as, which should be OK with $, and it's probably
> > >better to be consistent between linuxes.
> >
> > I can do this patch later today, reminds me that I wanted to move some
> > other macros to aix.h stiil.
>
> OK, here is the patch. Bootstrap still running, but I expect no problems
> since problems should already show up during compile :-).
>
> This closes the "move colliding macros from rs6000.h to platform headers"
> for me.
> The remaining collisions
>
> STRICT_ALIGNMENT
> STACK_BOUNDARY
> BIGGEST_ALIGNMENT
> ASM_OUTPUT_INT
> SIZE_TYPE
>
> make no real sense to move into aix.h IMHO.
>
> The patch also syncs the ASM_APP_* macros for Linux on PPC and fixes the
> CONSTRUCTOR handling in rs6000.c. Geoff, related to the CONSTRUCTOR
> handling I also want to revive execute/20000516-1.c from CVS, this test is
> meant to pass and is _different_ from execute/20000722-1.c. The test
> verifies that CONSTRUCTOR data is put into a writeable section. I didn't
> notice yet that you did remove it, but the removal was wrong.
>
> OK to commit?
>
> BTW, it seems gcc/stmt.c is seriously corrupted in CVS, but I don't know
> cvs well enough to tell if this can be fixed from remote.
>
> Franz.
>
>
> 2000-08-31 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
>
> * rs6000/rs6000.h (NO_DOLLAR_IN_LABEL, DOLLARS_IN_IDENTIFIERS,
> ENCODE_SECTION_INFO, ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Move from
> here...
> * rs6000/aix.h: ...to here.
> * rs6000/linux.h (ASM_APP_ON, ASM_APP_OFF): Define to Linux-style.
> * rs6000/rs6000.c (rs6000_select_section): Handle CONSTRUCTOR.
> (rs6000_unique_section): Likewise.
Geoff, is this patch OK for commit? OK to revive the testcase?
The patch works fine so far here, any problems with it?
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: `$' in identifiers -vs- PPC Linux
2000-10-15 5:03 ` Franz Sirl
@ 2000-10-16 17:25 ` Geoff Keating
2000-10-17 12:44 ` Franz Sirl
2001-01-23 14:38 ` Franz Sirl
0 siblings, 2 replies; 223+ messages in thread
From: Geoff Keating @ 2000-10-16 17:25 UTC (permalink / raw)
To: Franz Sirl; +Cc: gcc-patches
Franz Sirl <Franz.Sirl-kernel@lauterbach.com> writes:
> On Thu, 31 Aug 2000, Franz Sirl wrote:
>
> > > On Thu, 31 Aug 2000, Franz Sirl wrote:
> > > At 02:58 31.08.00, Geoff Keating wrote:
> > > >Tom Tromey <tromey@cygnus.com> writes:
> > > > > Alexandre> I'm bitten by this problem on AIX 4.1, when compiling
> > > > > Alexandre> libgcj. It would be nice if g++ could somehow mangle `$'
> > > > > Alexandre> so as to accept it in source-code (even if with
> > > > > Alexandre> -fdollars-in-identifiers) even if the assembler can't
> > > > > Alexandre> accept them directly.
> > > > >
> > > > > Yes. For instance it could mangle them the way that gcj already
> > > > > mangles non-ASCII characters that are valid in Java identifiers.
> > > >
> > > >It'd be good to move this code into the language-independent parts of
> > > >the compiler, because it'll be needed even for C mangling of \u escapes
> > > >in identifiers.
> > > >
> > > >I also have no objection to moving DOLLARS_IN_IDENTIFIERS into aix.h
> > > >if someone wants to generate a patch. The native assembler on all the
> > > >ppc sysv stuff is GNU as, which should be OK with $, and it's probably
> > > >better to be consistent between linuxes.
> > >
> > > I can do this patch later today, reminds me that I wanted to move some
> > > other macros to aix.h stiil.
> >
> > OK, here is the patch. Bootstrap still running, but I expect no problems
> > since problems should already show up during compile :-).
> >
> > This closes the "move colliding macros from rs6000.h to platform headers"
> > for me.
> > The remaining collisions
> >
> > STRICT_ALIGNMENT
> > STACK_BOUNDARY
> > BIGGEST_ALIGNMENT
> > ASM_OUTPUT_INT
> > SIZE_TYPE
Actually, some of these really should be in aix.h. There's no need to
do them now, though.
> > make no real sense to move into aix.h IMHO.
> >
> > The patch also syncs the ASM_APP_* macros for Linux on PPC and fixes the
> > CONSTRUCTOR handling in rs6000.c. Geoff, related to the CONSTRUCTOR
> > handling I also want to revive execute/20000516-1.c from CVS, this test is
> > meant to pass and is _different_ from execute/20000722-1.c. The test
> > verifies that CONSTRUCTOR data is put into a writeable section. I didn't
> > notice yet that you did remove it, but the removal was wrong.
The testcase was failing sometimes, and passing sometimes, based I
believe on segment sizes or something, which was annoying.
The data does not need to be put in a writable section. It has to be
copied from wherever it is into a local temporary.
For instance,
struct s
{
int value;
char *string;
};
int i;
for (i = 0; i < 4; i++)
{
struct s *t = & (struct s) { 3, "hey there" };
if (t->value != 3)
abort();
t->value = 4;
if (t->value != 4)
abort();
}
> > OK to commit?
> >
> > BTW, it seems gcc/stmt.c is seriously corrupted in CVS, but I don't know
> > cvs well enough to tell if this can be fixed from remote.
> >
> > Franz.
> >
> >
> > 2000-08-31 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
> >
> > * rs6000/rs6000.h (NO_DOLLAR_IN_LABEL, DOLLARS_IN_IDENTIFIERS,
> > ENCODE_SECTION_INFO, ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Move from
> > here...
> > * rs6000/aix.h: ...to here.
> > * rs6000/linux.h (ASM_APP_ON, ASM_APP_OFF): Define to Linux-style.
> > * rs6000/rs6000.c (rs6000_select_section): Handle CONSTRUCTOR.
> > (rs6000_unique_section): Likewise.
>
> Geoff, is this patch OK for commit? OK to revive the testcase?
I don't think so. Can you re-submit without the rs6000_select_section
changes?
--
- Geoffrey Keating <geoffk@cygnus.com>
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: `$' in identifiers -vs- PPC Linux
2000-10-16 17:25 ` Geoff Keating
@ 2000-10-17 12:44 ` Franz Sirl
2000-10-17 13:19 ` Geoff Keating
2001-01-23 14:38 ` Franz Sirl
1 sibling, 1 reply; 223+ messages in thread
From: Franz Sirl @ 2000-10-17 12:44 UTC (permalink / raw)
To: Geoff Keating; +Cc: gcc-patches
On Tue, 17 Oct 2000, Geoff Keating wrote:
> Franz Sirl <Franz.Sirl-kernel@lauterbach.com> writes:
> > On Thu, 31 Aug 2000, Franz Sirl wrote:
> > > OK, here is the patch. Bootstrap still running, but I expect no
> > > problems since problems should already show up during compile :-).
> > >
> > > This closes the "move colliding macros from rs6000.h to platform
> > > headers" for me.
> > > The remaining collisions
> > >
> > > STRICT_ALIGNMENT
> > > STACK_BOUNDARY
> > > BIGGEST_ALIGNMENT
> > > ASM_OUTPUT_INT
> > > SIZE_TYPE
>
> Actually, some of these really should be in aix.h. There's no need to
> do them now, though.
Well, tell me what do you want to have out of rs6000.h and I'll do the boring
work :-). I just couldn't draw a sensible line for all the alignment, type
and ASM macros myself.
> > > make no real sense to move into aix.h IMHO.
> > >
> > > The patch also syncs the ASM_APP_* macros for Linux on PPC and fixes
> > > the CONSTRUCTOR handling in rs6000.c. Geoff, related to the CONSTRUCTOR
> > > handling I also want to revive execute/20000516-1.c from CVS, this test
> > > is meant to pass and is _different_ from execute/20000722-1.c. The test
> > > verifies that CONSTRUCTOR data is put into a writeable section. I
> > > didn't notice yet that you did remove it, but the removal was wrong.
>
> The testcase was failing sometimes, and passing sometimes, based I
> believe on segment sizes or something, which was annoying.
>
> The data does not need to be put in a writable section. It has to be
> copied from wherever it is into a local temporary.
>
> For instance,
>
> struct s
> {
> int value;
> char *string;
> };
>
> int i;
> for (i = 0; i < 4; i++)
> {
> struct s *t = & (struct s) { 3, "hey there" };
> if (t->value != 3)
> abort();
> t->value = 4;
> if (t->value != 4)
> abort();
> }
I don't quite understand? This code fails without my patch and passes with
it? Note that my patch (or something similar) fixes Linux kernel compilation,
without it you can't put a kernel image into ROM, cause it tries to write to
it. This is a showstopper for the embedded people. Additionally the same
functionality is available on x86, which passed the testcase too.
On what platforms did the test FAIL? I would rather think these need fixes
too, that's why the testcase was added in the first place, it tests if the
functionality (I think this is a GCC extension) is correctly implemented.
> > > OK to commit?
> > >
> > > BTW, it seems gcc/stmt.c is seriously corrupted in CVS, but I don't
> > > know cvs well enough to tell if this can be fixed from remote.
> > >
> > > Franz.
> > >
> > >
> > > 2000-08-31 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
> > >
> > > * rs6000/rs6000.h (NO_DOLLAR_IN_LABEL, DOLLARS_IN_IDENTIFIERS,
> > > ENCODE_SECTION_INFO, ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Move
> > > from here...
> > > * rs6000/aix.h: ...to here.
> > > * rs6000/linux.h (ASM_APP_ON, ASM_APP_OFF): Define to
> > > Linux-style. * rs6000/rs6000.c (rs6000_select_section): Handle
> > > CONSTRUCTOR. (rs6000_unique_section): Likewise.
> >
> > Geoff, is this patch OK for commit? OK to revive the testcase?
>
> I don't think so. Can you re-submit without the rs6000_select_section
> changes?
Sure.
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: `$' in identifiers -vs- PPC Linux
2000-10-17 12:44 ` Franz Sirl
@ 2000-10-17 13:19 ` Geoff Keating
2000-10-17 13:35 ` Joseph S. Myers
2000-10-17 14:08 ` Franz Sirl
0 siblings, 2 replies; 223+ messages in thread
From: Geoff Keating @ 2000-10-17 13:19 UTC (permalink / raw)
To: Franz.Sirl-kernel; +Cc: gcc-patches
> From: Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
> Date: Tue, 17 Oct 2000 21:37:53 +0200
> Cc: gcc-patches@gcc.gnu.org
> Well, tell me what do you want to have out of rs6000.h and I'll do
> the boring work :-). I just couldn't draw a sensible line for all
> the alignment, type and ASM macros myself.
I think that when the ppc-elf64 stuff comes in all this will need to
be rearranged anyway, because suddenly we'll have aix-xcoff and
aix-elf64 and powerpc-elf64. So there's no need to tinker with it now.
> > > > make no real sense to move into aix.h IMHO.
> > > >
> > > > The patch also syncs the ASM_APP_* macros for Linux on PPC and fixes
> > > > the CONSTRUCTOR handling in rs6000.c. Geoff, related to the CONSTRUCTOR
> > > > handling I also want to revive execute/20000516-1.c from CVS, this test
> > > > is meant to pass and is _different_ from execute/20000722-1.c. The test
> > > > verifies that CONSTRUCTOR data is put into a writeable section. I
> > > > didn't notice yet that you did remove it, but the removal was wrong.
> >
> > The testcase was failing sometimes, and passing sometimes, based I
> > believe on segment sizes or something, which was annoying.
> >
> > The data does not need to be put in a writable section. It has to be
> > copied from wherever it is into a local temporary.
> >
> > For instance,
> >
> > struct s
> > {
> > int value;
> > char *string;
> > };
> >
> > int i;
> > for (i = 0; i < 4; i++)
> > {
> > struct s *t = & (struct s) { 3, "hey there" };
> > if (t->value != 3)
> > abort();
> > t->value = 4;
> > if (t->value != 4)
> > abort();
> > }
>
> I don't quite understand? This code fails without my patch and passes with
> it?
No, this code fails on every gcc release to date I believe. Certainly
it fails on x86 and ppc with current gcc versions. But C99 says it
should pass.
> Note that my patch (or something similar) fixes Linux kernel compilation,
> without it you can't put a kernel image into ROM, cause it tries to write to
> it. This is a showstopper for the embedded people. Additionally the same
> functionality is available on x86, which passed the testcase too.
Your patch fixes this specific problem, but the underlying bug is
still there, and if the underlying bug was fixed your patch would
probably be unnecessary. Your patch is OK for a branch, but not for
the mainline.
> On what platforms did the test FAIL?
I had to take your test out because it would fail or pass depending on
the size of crt0, which was confusing the automated tester. The new
testcase shows the same underlying problem (that we aren't using
temporaries) and fails every time.
> I would rather think these need fixes too, that's why the testcase
> was added in the first place, it tests if the functionality (I think
> this is a GCC extension) is correctly implemented.
It's now in the ISO C standard, as section 6.5.2.5, with
better-defined semantics. The bit that would need changing is
cast_expr in c-parse.in.
--
- Geoffrey Keating <geoffk@cygnus.com>
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: `$' in identifiers -vs- PPC Linux
2000-10-17 13:19 ` Geoff Keating
@ 2000-10-17 13:35 ` Joseph S. Myers
2000-10-17 14:08 ` Franz Sirl
1 sibling, 0 replies; 223+ messages in thread
From: Joseph S. Myers @ 2000-10-17 13:35 UTC (permalink / raw)
To: Geoff Keating; +Cc: Franz.Sirl-kernel, gcc-patches
On Tue, 17 Oct 2000, Geoff Keating wrote:
> > I would rather think these need fixes too, that's why the testcase
> > was added in the first place, it tests if the functionality (I think
> > this is a GCC extension) is correctly implemented.
>
> It's now in the ISO C standard, as section 6.5.2.5, with
> better-defined semantics. The bit that would need changing is
> cast_expr in c-parse.in.
If this doesn't get fixed soon, perhaps you could add something about the
problem to the notes at the bottom of c99status.html by way of explanation
of the "broken" entry for compound literals there?
--
Joseph S. Myers
jsm28@cam.ac.uk
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: `$' in identifiers -vs- PPC Linux
2000-10-17 13:19 ` Geoff Keating
2000-10-17 13:35 ` Joseph S. Myers
@ 2000-10-17 14:08 ` Franz Sirl
2000-10-17 14:20 ` Geoff Keating
1 sibling, 1 reply; 223+ messages in thread
From: Franz Sirl @ 2000-10-17 14:08 UTC (permalink / raw)
To: Geoff Keating, Franz.Sirl-kernel; +Cc: gcc-patches
On Tue, 17 Oct 2000, Geoff Keating wrote:
> > From: Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
> > Date: Tue, 17 Oct 2000 21:37:53 +0200
> > Cc: gcc-patches@gcc.gnu.org
> >
> > Well, tell me what do you want to have out of rs6000.h and I'll do
> > the boring work :-). I just couldn't draw a sensible line for all
> > the alignment, type and ASM macros myself.
>
> I think that when the ppc-elf64 stuff comes in all this will need to
> be rearranged anyway, because suddenly we'll have aix-xcoff and
> aix-elf64 and powerpc-elf64. So there's no need to tinker with it now.
OK :)
> > > > > make no real sense to move into aix.h IMHO.
> > > > >
> > > > > The patch also syncs the ASM_APP_* macros for Linux on PPC and
> > > > > fixes the CONSTRUCTOR handling in rs6000.c. Geoff, related to the
> > > > > CONSTRUCTOR handling I also want to revive execute/20000516-1.c
> > > > > from CVS, this test is meant to pass and is _different_ from
> > > > > execute/20000722-1.c. The test verifies that CONSTRUCTOR data is
> > > > > put into a writeable section. I didn't notice yet that you did
> > > > > remove it, but the removal was wrong.
> > >
> > > The testcase was failing sometimes, and passing sometimes, based I
> > > believe on segment sizes or something, which was annoying.
> > >
> > > The data does not need to be put in a writable section. It has to be
> > > copied from wherever it is into a local temporary.
> > >
> > > For instance,
> > >
> > > struct s
> > > {
> > > int value;
> > > char *string;
> > > };
> > >
> > > int i;
> > > for (i = 0; i < 4; i++)
> > > {
> > > struct s *t = & (struct s) { 3, "hey there" };
> > > if (t->value != 3)
> > > abort();
> > > t->value = 4;
> > > if (t->value != 4)
> > > abort();
> > > }
> >
> > I don't quite understand? This code fails without my patch and passes
> > with it?
>
> No, this code fails on every gcc release to date I believe. Certainly
> it fails on x86 and ppc with current gcc versions. But C99 says it
> should pass.
>
> > Note that my patch (or something similar) fixes Linux kernel compilation,
> > without it you can't put a kernel image into ROM, cause it tries to write
> > to it. This is a showstopper for the embedded people. Additionally the
> > same functionality is available on x86, which passed the testcase too.
>
> Your patch fixes this specific problem, but the underlying bug is
> still there, and if the underlying bug was fixed your patch would
> probably be unnecessary. Your patch is OK for a branch, but not for
> the mainline.
>
> > On what platforms did the test FAIL?
>
> I had to take your test out because it would fail or pass depending on
> the size of crt0, which was confusing the automated tester. The new
> testcase shows the same underlying problem (that we aren't using
> temporaries) and fails every time.
>
> > I would rather think these need fixes too, that's why the testcase
> > was added in the first place, it tests if the functionality (I think
> > this is a GCC extension) is correctly implemented.
>
> It's now in the ISO C standard, as section 6.5.2.5, with
> better-defined semantics. The bit that would need changing is
> cast_expr in c-parse.in.
Aaahhh! So you meant to say there _is_ a bug, but it has to be fixed in a
different way. Fine with me.
Here is the updated patch, OK to commit?
BTW, can you approve this PPC related fix too? It's in my sources for nearly
a year now and awaits approval :-):
http://gcc.gnu.org/ml/gcc-patches/1999-11n/msg00616.html
Some related discussion can be found here:
http://gcc.gnu.org/ml/gcc-patches/1999-11n/msg00268.html
Franz.
* rs6000/rs6000.h (NO_DOLLAR_IN_LABEL, DOLLARS_IN_IDENTIFIERS,
ENCODE_SECTION_INFO, ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Move from
here...
* rs6000/aix.h: ...to here.
* rs6000/linux.h (ASM_APP_ON, ASM_APP_OFF): Define to Linux-style.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: `$' in identifiers -vs- PPC Linux
2000-10-17 14:08 ` Franz Sirl
@ 2000-10-17 14:20 ` Geoff Keating
2000-10-17 15:54 ` Franz Sirl
0 siblings, 1 reply; 223+ messages in thread
From: Geoff Keating @ 2000-10-17 14:20 UTC (permalink / raw)
To: Franz.Sirl-kernel; +Cc: Franz.Sirl-kernel, gcc-patches
> From: Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
> Date: Tue, 17 Oct 2000 23:01:50 +0200
> Here is the updated patch, OK to commit?
This is OK.
> BTW, can you approve this PPC related fix too? It's in my sources for nearly
> a year now and awaits approval :-):
> http://gcc.gnu.org/ml/gcc-patches/1999-11n/msg00616.html
This is also OK (although changes to that code scare me). Please also
add the testcase with an appropriate ChangeLog entry, and reference
the testcase from the patch's ChangeLog; at least that way if the
patch has to be taken out it'll be clear what it was fixing.
(You probably want to re-test the patch in case the compiler has
changed in the meantime.)
--
- Geoffrey Keating <geoffk@cygnus.com>
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: `$' in identifiers -vs- PPC Linux
2000-10-17 14:20 ` Geoff Keating
@ 2000-10-17 15:54 ` Franz Sirl
0 siblings, 0 replies; 223+ messages in thread
From: Franz Sirl @ 2000-10-17 15:54 UTC (permalink / raw)
To: Geoff Keating; +Cc: gcc-patches
On Tue, 17 Oct 2000, Geoff Keating wrote:
> > From: Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
> > Date: Tue, 17 Oct 2000 23:01:50 +0200
> >
> > Here is the updated patch, OK to commit?
>
> This is OK.
Commited.
> > BTW, can you approve this PPC related fix too? It's in my sources for
> > nearly a year now and awaits approval :-):
> > http://gcc.gnu.org/ml/gcc-patches/1999-11n/msg00616.html
>
> This is also OK (although changes to that code scare me). Please also
> add the testcase with an appropriate ChangeLog entry, and reference
> the testcase from the patch's ChangeLog; at least that way if the
> patch has to be taken out it'll be clear what it was fixing.
Behaviour will only change for targets with REG_PARM_STACK_SPACE == 0, and
there aren't that many out there. It simply makes no sense to align the stack
for register args which don't get stack space allocated.
> (You probably want to re-test the patch in case the compiler has
> changed in the meantime.)
The bug was still there and is now fixed.
Well, this nearly clears my patch queue, only the somewhat strange
http://gcc.gnu.org/ml/gcc-bugs/2000-03/msg00471.html remains, which I can no
longer trigger, and my unfinished fix for builtin_return_address (well, it
works, but is sub-optimal).
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* [g++] find build_headers, toplevel
@ 2000-12-18 0:13 Benjamin Kosnik
2000-12-18 0:24 ` Alexandre Oliva
0 siblings, 1 reply; 223+ messages in thread
From: Benjamin Kosnik @ 2000-12-18 0:13 UTC (permalink / raw)
To: gcc-patches, aoliva
Top level changes to support target-dependent c++ includes.
See:
http://gcc.gnu.org/ml/gcc-patches/2000-12/msg00824.html
All these patches need to be checked in together: as long as there are
no huge objections, I'll check them in all at once.
tested x86/linux
2000-12-17 Benjamin Kosnik <bkoz@redhat.com>
* Makefile.in (BASE_FLAGS_TO_PASS): Alphabetize.
(libstdcxx_incdir): Pass down.
* config.if: Remove expired bits for cxx_interface.
(libstdcxx_incdir): Add variable for g++ include directory.
* configure.in (gxx_include_dir): Use it.
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/Makefile.in,v
retrieving revision 1.66
diff -c -p -r1.66 Makefile.in
*** Makefile.in 2000/12/13 22:01:46 1.66
--- Makefile.in 2000/12/18 08:12:15
*************** BASE_FLAGS_TO_PASS = \
*** 370,375 ****
--- 370,377 ----
"libdir=$(libdir)" \
"libexecdir=$(libexecdir)" \
"lispdir=$(lispdir)" \
+ "libstdcxx_incdir=$(libstdcxx_incdir)" \
+ "libsubdir=$(libsubdir)" \
"localstatedir=$(localstatedir)" \
"mandir=$(mandir)" \
"oldincludedir=$(oldincludedir)" \
*************** BASE_FLAGS_TO_PASS = \
*** 382,389 ****
"gxx_include_dir=$(gxx_include_dir)" \
"gcc_version=$(gcc_version)" \
"gcc_version_trigger=$(gcc_version_trigger)" \
! "target_alias=$(target_alias)" \
! "libsubdir=$(libsubdir)"
# Flags to pass down to most sub-makes, in which we're building with
# the host environment.
--- 384,390 ----
"gxx_include_dir=$(gxx_include_dir)" \
"gcc_version=$(gcc_version)" \
"gcc_version_trigger=$(gcc_version_trigger)" \
! "target_alias=$(target_alias)"
# Flags to pass down to most sub-makes, in which we're building with
# the host environment.
Index: config.if
===================================================================
RCS file: /cvs/gcc/egcs/config.if,v
retrieving revision 1.5
diff -c -p -r1.5 config.if
*** config.if 2000/10/16 16:00:43 1.5
--- config.if 2000/12/18 08:12:15
*************** else
*** 30,42 ****
# We check libstdc++/Makefile.in for libstdcxx_interface.
libstdcxx_interface=`grep "^INTERFACE" ${libstdcxx_srcdir}/Makefile.in | sed 's/INTERFACE[ ]*=[ ]*\(.*\)/\1/'`
fi
- if [ -f ${if_topsrcdir}/gcc/cp/Makefile.in ]; then
- # We check gcc/cp for cxx_interface.
- cxx_interface=`grep "^INTERFACE" ${if_topsrcdir}/gcc/cp/Makefile.in | sed 's/INTERFACE[ ]*=[ ]*\(.*\)/\1/'`
- else
- cxx_interface=
- fi
# The trickiest part is libc_interface.
if [ -z "${libc_interface}" ]
--- 30,37 ----
# We check libstdc++/Makefile.in for libstdcxx_interface.
libstdcxx_interface=`grep "^INTERFACE" ${libstdcxx_srcdir}/Makefile.in | sed 's/INTERFACE[ ]*=[ ]*\(.*\)/\1/'`
fi
+ libstdcxx_incdir=g++-${libstdcxx_interface}
# The trickiest part is libc_interface.
if [ -z "${libc_interface}" ]
Index: configure.in
===================================================================
RCS file: /cvs/gcc/egcs/configure.in,v
retrieving revision 1.82
diff -c -p -r1.82 configure.in
*** configure.in 2000/12/15 09:52:41 1.82
--- configure.in 2000/12/18 08:12:19
*************** if test x${gxx_include_dir} = x; then
*** 1314,1320 ****
gxx_include_dir='${libsubdir}/include/g++'
else
. ${topsrcdir}/config.if
! gxx_include_dir='${prefix}/include/g++'-${libstdcxx_interface}
fi
else
gxx_include_dir=${gxx_include_dir}
--- 1314,1320 ----
gxx_include_dir='${libsubdir}/include/g++'
else
. ${topsrcdir}/config.if
! gxx_include_dir='${prefix}/include/${libstdcxx_incdir}'
fi
else
gxx_include_dir=${gxx_include_dir}
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [g++] find build_headers, toplevel
2000-12-18 0:13 [g++] find build_headers, toplevel Benjamin Kosnik
@ 2000-12-18 0:24 ` Alexandre Oliva
2000-12-18 0:28 ` Benjamin Kosnik
0 siblings, 1 reply; 223+ messages in thread
From: Alexandre Oliva @ 2000-12-18 0:24 UTC (permalink / raw)
To: Benjamin Kosnik; +Cc: gcc-patches
On Dec 18, 2000, Benjamin Kosnik <bkoz@redhat.com> wrote:
> * Makefile.in (BASE_FLAGS_TO_PASS): Alphabetize.
> (libstdcxx_incdir): Pass down.
Ok
> * config.if: Remove expired bits for cxx_interface.
IIRC, cxx_interface was supposed to be used as something that would
change whenever the C++ ABI changed, even if the libstdc++ API
remained constant.
It would probably be a good idea to use libc_interface and
cxx_interface when building libstdc++-v3's. Libtool's -release flag
would be the most appropriate to encode this information in the
library SONAMEs.
> (libstdcxx_incdir): Add variable for g++ include directory.
> * configure.in (gxx_include_dir): Use it.
Ok
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [g++] find build_headers, toplevel
2000-12-18 0:24 ` Alexandre Oliva
@ 2000-12-18 0:28 ` Benjamin Kosnik
2000-12-18 0:38 ` Alexandre Oliva
0 siblings, 1 reply; 223+ messages in thread
From: Benjamin Kosnik @ 2000-12-18 0:28 UTC (permalink / raw)
To: Alexandre Oliva; +Cc: gcc-patches
>
> IIRC, cxx_interface was supposed to be used as something that would
> change whenever the C++ ABI changed, even if the libstdc++ API
> remained constant.
Really? I couldn't figure out what it was used for. It currently isn't
being used, so I thought I'd kill the dead weight... reduce complexity...
> It would probably be a good idea to use libc_interface and
> cxx_interface when building libstdc++-v3's. Libtool's -release flag
> would be the most appropriate to encode this information in the
> library SONAMEs.
.... Interesting. This could be useful. Kind of out of the scope for this
work, but perhaps something that should be done.
I can take this part of the patch out, pending this work.
best,
benjamin
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [g++] find build_headers, toplevel
2000-12-18 0:28 ` Benjamin Kosnik
@ 2000-12-18 0:38 ` Alexandre Oliva
2000-12-18 2:40 ` Franz Sirl
0 siblings, 1 reply; 223+ messages in thread
From: Alexandre Oliva @ 2000-12-18 0:38 UTC (permalink / raw)
To: Benjamin Kosnik; +Cc: gcc-patches
On Dec 18, 2000, Benjamin Kosnik <bkoz@redhat.com> wrote:
>>
>> IIRC, cxx_interface was supposed to be used as something that would
>> change whenever the C++ ABI changed, even if the libstdc++ API
>> remained constant.
> Really? I couldn't figure out what it was used for.
It doesn't appear to be used right now. In fact, cp/Makefile.in
no longer exists.
> It currently isn't being used, so I thought I'd kill the dead
> weight... reduce complexity...
Ok, go ahead. Whoever re-introduces this will certainly have to
figure out where to introduce the variable anyway...
Besides, as soon as the v3 ABI stabilizes, we'll hopefully not have
another C++ ABI change in the next few years, and we're already
bumping the API number anyway, so it would be kind of pointless to
worry about it at this time.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [g++] find build_headers, toplevel
2000-12-18 0:38 ` Alexandre Oliva
@ 2000-12-18 2:40 ` Franz Sirl
2000-12-22 1:17 ` Alexandre Oliva
0 siblings, 1 reply; 223+ messages in thread
From: Franz Sirl @ 2000-12-18 2:40 UTC (permalink / raw)
To: Alexandre Oliva; +Cc: Benjamin Kosnik, gcc-patches
At 09:37 2000-12-18, Alexandre Oliva wrote:
>On Dec 18, 2000, Benjamin Kosnik <bkoz@redhat.com> wrote:
>
> >>
> >> IIRC, cxx_interface was supposed to be used as something that would
> >> change whenever the C++ ABI changed, even if the libstdc++ API
> >> remained constant.
>
> > Really? I couldn't figure out what it was used for.
>
>It doesn't appear to be used right now. In fact, cp/Makefile.in
>no longer exists.
Yeah, this got lost a few weeks ago during the Makefile overhaul and in
fact breaks ---disable-libstdc++-v3 builds on Linux. Instead of removing, I
would recommend to set it to a fixed 2 for now, until the v3 soname has
been decided on. That way Linux people still using libstdc++-v2 can
continue to work.
> > It currently isn't being used, so I thought I'd kill the dead
> > weight... reduce complexity...
>
>Ok, go ahead. Whoever re-introduces this will certainly have to
>figure out where to introduce the variable anyway...
>
>Besides, as soon as the v3 ABI stabilizes, we'll hopefully not have
>another C++ ABI change in the next few years, and we're already
>bumping the API number anyway, so it would be kind of pointless to
>worry about it at this time.
Well, I would be happier if we would worry _now_, instead of trying to
cleanup later. I don't know though what parts are still needed, but at
least on Linux the change to libio during gcc-3.1 seems foreseeable...
Right now the library naming on Linux/glibc-2.1/gcc-2.95.3 looks like:
[fsirl@entropy:~/cvsx/gccm]$ dir /usr/lib/libstdc*
-rw-r--r-- 1 root root 2315942 Mon Dec 04 15:23:31 2000
/usr/lib/libstdc++-3-libc6.1-2-2.10.0.a
-r-xr-xr-x 1 root root 1361171 Mon Dec 04 15:23:31 2000
/usr/lib/libstdc++-3-libc6.1-2-2.10.0.so
lrwxrwxrwx 1 root root 32 Tue Sep 19 08:30:48 2000
/usr/lib/libstdc++-libc6.1-2.a.3 -> libstdc++-3-libc6.1-2-2.10.0.a
lrwxrwxrwx 1 root root 31 Tue Sep 19 08:30:48 2000
/usr/lib/libstdc++-libc6.1-2.so.3 -> libstdc++-3-libc6.1-2-2.10.0.so
lrwxrwxrwx 1 root root 18 Tue Sep 19 08:30:48 2000
[fsirl@entropy:~/cvsx/gccm]$ dir
/usr/lib/gcc-lib/ppc-redhat-linux/2.95.3/libstdc*
lrwxrwxrwx 1 root root 32 Tue Sep 19 08:29:27 2000
/usr/lib/gcc-lib/ppc-redhat-linux/2.95.3/libstdc++.a ->
../../../libstdc++-libc6.1-2.a.3
lrwxrwxrwx 1 root root 33 Tue Sep 19 08:29:27 2000
/usr/lib/gcc-lib/ppc-redhat-linux/2.95.3/libstdc++.so ->
../../../libstdc++-libc6.1-2.so.3
This has proven as a very robust setup and I would like to have it back
better sooner than later.
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [g++] find build_headers, toplevel
2000-12-18 2:40 ` Franz Sirl
@ 2000-12-22 1:17 ` Alexandre Oliva
0 siblings, 0 replies; 223+ messages in thread
From: Alexandre Oliva @ 2000-12-22 1:17 UTC (permalink / raw)
To: Franz Sirl; +Cc: Benjamin Kosnik, gcc-patches
On Dec 18, 2000, Franz Sirl <Franz.Sirl-kernel@lauterbach.com> wrote:
>> Besides, as soon as the v3 ABI stabilizes, we'll hopefully not have
>> another C++ ABI change in the next few years, and we're already
>> bumping the API number anyway, so it would be kind of pointless to
>> worry about it at this time.
> Well, I would be happier if we would worry _now_, instead of trying
> to cleanup later.
It makes no difference. The only thing we have to guarantee is that,
whenever a binary incompatibility arises, the SONAME of the library
will change. So, we can keep the SONAME simple for now and, if the
need for an additional SONAME tag ever arises, we can easily add it
back.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: `$' in identifiers -vs- PPC Linux
2000-10-16 17:25 ` Geoff Keating
2000-10-17 12:44 ` Franz Sirl
@ 2001-01-23 14:38 ` Franz Sirl
2001-01-23 16:34 ` Jeffrey A Law
1 sibling, 1 reply; 223+ messages in thread
From: Franz Sirl @ 2001-01-23 14:38 UTC (permalink / raw)
To: Geoff Keating; +Cc: gcc-patches
On Tuesday 17 October 2000 02:25, Geoff Keating wrote:
> Franz Sirl <Franz.Sirl-kernel@lauterbach.com> writes:
> > On Thu, 31 Aug 2000, Franz Sirl wrote:
> > > > On Thu, 31 Aug 2000, Franz Sirl wrote:
> > > The patch also syncs the ASM_APP_* macros for Linux on PPC and fixes
> > > the CONSTRUCTOR handling in rs6000.c. Geoff, related to the CONSTRUCTOR
> > > handling I also want to revive execute/20000516-1.c from CVS, this test
> > > is meant to pass and is _different_ from execute/20000722-1.c. The test
> > > verifies that CONSTRUCTOR data is put into a writeable section. I
> > > didn't notice yet that you did remove it, but the removal was wrong.
>
> The testcase was failing sometimes, and passing sometimes, based I
> believe on segment sizes or something, which was annoying.
>
> The data does not need to be put in a writable section. It has to be
> copied from wherever it is into a local temporary.
>
> For instance,
>
> struct s
> {
> int value;
> char *string;
> };
>
> int i;
> for (i = 0; i < 4; i++)
> {
> struct s *t = & (struct s) { 3, "hey there" };
> if (t->value != 3)
> abort();
> t->value = 4;
> if (t->value != 4)
> abort();
> }
Geoff, I nearly forgot about that. OK to commit the appended testcase?
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: `$' in identifiers -vs- PPC Linux
2001-01-23 14:38 ` Franz Sirl
@ 2001-01-23 16:34 ` Jeffrey A Law
0 siblings, 0 replies; 223+ messages in thread
From: Jeffrey A Law @ 2001-01-23 16:34 UTC (permalink / raw)
To: Franz Sirl; +Cc: Geoff Keating, gcc-patches
In message < 01012323393604.09957@enzo.bigblue.local >you write:
>
> Geoff, I nearly forgot about that. OK to commit the appended testcase?
Yes. The test is fine.
jeff
^ permalink raw reply [flat|nested] 223+ messages in thread
* libstdc++ execute tests
[not found] ` <Pine.SOL.3.91.1010410115340.11658A@cse.cygnus.com>
@ 2001-04-10 15:15 ` Richard Henderson
2001-04-10 16:45 ` Benjamin Kosnik
` (2 more replies)
0 siblings, 3 replies; 223+ messages in thread
From: Richard Henderson @ 2001-04-10 15:15 UTC (permalink / raw)
To: gcc-patches; +Cc: Benjamin Kosnik
On my boxen, every single libstdc++ execute test fails. After much
trial and error, I discovered that the testsuite requires "." to be
in your path. This appears to fix things.
r~
Index: libstdc++.exp
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/lib/libstdc++.exp,v
retrieving revision 1.6
diff -c -p -d -u -r1.6 libstdc++.exp
--- libstdc++.exp 2001/04/02 23:40:01 1.6
+++ libstdc++.exp 2001/04/10 22:10:22
@@ -545,7 +545,7 @@ proc dg-test { args } {
warning "$name compilation failed to produce executable"
} else {
set status -1
- set result [${tool}_load $output_file]
+ set result [${tool}_load ./$output_file]
set status [lindex $result 0];
set output [lindex $result 1];
#send_user "After exec, status: $status\n"
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: libstdc++ execute tests
2001-04-10 15:15 ` libstdc++ execute tests Richard Henderson
@ 2001-04-10 16:45 ` Benjamin Kosnik
2001-04-10 18:55 ` Gabriel Dos Reis
2001-04-10 17:53 ` Gabriel Dos Reis
2001-04-10 18:00 ` Gabriel Dos Reis
2 siblings, 1 reply; 223+ messages in thread
From: Benjamin Kosnik @ 2001-04-10 16:45 UTC (permalink / raw)
To: Richard Henderson; +Cc: gcc-patches
I am not noticing the same problem that you are. However, with your patch
everything still works for me, so you might as well check it in.
-benjamin
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: libstdc++ execute tests
2001-04-10 15:15 ` libstdc++ execute tests Richard Henderson
2001-04-10 16:45 ` Benjamin Kosnik
@ 2001-04-10 17:53 ` Gabriel Dos Reis
2001-04-10 18:00 ` Gabriel Dos Reis
2 siblings, 0 replies; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-04-10 17:53 UTC (permalink / raw)
To: Richard Henderson; +Cc: gcc-patches, Benjamin Kosnik
Richard Henderson <rth@redhat.com> writes:
| On my boxen, every single libstdc++ execute test fails. After much
| trial and error, I discovered that the testsuite requires "." to be
| in your path. This appears to fix things.
My fault. I guess you already applied it :-)
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: libstdc++ execute tests
2001-04-10 15:15 ` libstdc++ execute tests Richard Henderson
2001-04-10 16:45 ` Benjamin Kosnik
2001-04-10 17:53 ` Gabriel Dos Reis
@ 2001-04-10 18:00 ` Gabriel Dos Reis
2001-04-10 18:35 ` Richard Henderson
2 siblings, 1 reply; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-04-10 18:00 UTC (permalink / raw)
To: Richard Henderson; +Cc: gcc-patches, Benjamin Kosnik
Richard Henderson <rth@redhat.com> writes:
| Index: libstdc++.exp
| ===================================================================
| RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/lib/libstdc++.exp,v
| retrieving revision 1.6
| diff -c -p -d -u -r1.6 libstdc++.exp
| --- libstdc++.exp 2001/04/02 23:40:01 1.6
| +++ libstdc++.exp 2001/04/10 22:10:22
| @@ -545,7 +545,7 @@ proc dg-test { args } {
| warning "$name compilation failed to produce executable"
| } else {
| set status -1
| - set result [${tool}_load $output_file]
| + set result [${tool}_load ./$output_file]
| set status [lindex $result 0];
| set output [lindex $result 1];
| #send_user "After exec, status: $status\n"
Sorry for the confusion. Since dg-test will eventually disappear --
it shouldn't have been in libstdc++.exp in the first place -- the
right fix is to convince libstdc++_load to do the right thing:
- set results [remote_load target $lib_env(LIBTOOL) "--mode=execute $prog"]
+ set results [remote_load target $lib_env(LIBTOOL) "--mode=execute ./$prog"]
Again, sorry for the confusion.
Thanks,
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: libstdc++ execute tests
2001-04-10 18:00 ` Gabriel Dos Reis
@ 2001-04-10 18:35 ` Richard Henderson
2001-04-10 18:51 ` Gabriel Dos Reis
0 siblings, 1 reply; 223+ messages in thread
From: Richard Henderson @ 2001-04-10 18:35 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: gcc-patches, Benjamin Kosnik
On Wed, Apr 11, 2001 at 03:00:23AM +0200, Gabriel Dos Reis wrote:
> ... the right fix is to convince libstdc++_load to do the right thing:
>
> - set results [remote_load target $lib_env(LIBTOOL) "--mode=execute $prog"]
> + set results [remote_load target $lib_env(LIBTOOL) "--mode=execute ./$prog"]
Except for the fact that this doesn't actually work.
I don't know why. I did try it though.
r~
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: libstdc++ execute tests
2001-04-10 18:35 ` Richard Henderson
@ 2001-04-10 18:51 ` Gabriel Dos Reis
0 siblings, 0 replies; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-04-10 18:51 UTC (permalink / raw)
To: Richard Henderson; +Cc: Gabriel Dos Reis, gcc-patches, Benjamin Kosnik
Richard Henderson <rth@redhat.com> writes:
| On Wed, Apr 11, 2001 at 03:00:23AM +0200, Gabriel Dos Reis wrote:
| > ... the right fix is to convince libstdc++_load to do the right thing:
| >
| > - set results [remote_load target $lib_env(LIBTOOL) "--mode=execute $prog"]
| > + set results [remote_load target $lib_env(LIBTOOL) "--mode=execute ./$prog"]
|
| Except for the fact that this doesn't actually work.
That is odd.
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: libstdc++ execute tests
2001-04-10 16:45 ` Benjamin Kosnik
@ 2001-04-10 18:55 ` Gabriel Dos Reis
2001-04-10 22:02 ` Benjamin Kosnik
0 siblings, 1 reply; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-04-10 18:55 UTC (permalink / raw)
To: Benjamin Kosnik; +Cc: Richard Henderson, gcc-patches
Benjamin Kosnik <bkoz@redhat.com> writes:
| I am not noticing the same problem that you are. However, with your patch
| everything still works for me, so you might as well check it in.
As a short-term solution, yes.
Because dg-test will disappear in the near future, I still need to
understand why this isn't
set results [remote_load target $lib_env(LIBTOOL) "--mode=execute ./$prog"]
working for him.
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: libstdc++ execute tests
2001-04-10 18:55 ` Gabriel Dos Reis
@ 2001-04-10 22:02 ` Benjamin Kosnik
2001-04-11 2:55 ` Gabriel Dos Reis
2001-04-12 19:50 ` libstdc++ execute tests Gabriel Dos Reis
0 siblings, 2 replies; 223+ messages in thread
From: Benjamin Kosnik @ 2001-04-10 22:02 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: Richard Henderson, gcc-patches
I don't suppose you could also figure out why XFAIL is failing before I do,
could you?
;)
-benjamin
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: libstdc++ execute tests
2001-04-10 22:02 ` Benjamin Kosnik
@ 2001-04-11 2:55 ` Gabriel Dos Reis
2001-04-11 10:39 ` Richard Henderson
2001-04-12 19:50 ` libstdc++ execute tests Gabriel Dos Reis
1 sibling, 1 reply; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-04-11 2:55 UTC (permalink / raw)
To: Benjamin Kosnik; +Cc: Gabriel Dos Reis, Richard Henderson, gcc-patches
Benjamin Kosnik <bkoz@redhat.com> writes:
| I don't suppose you could also figure out why XFAIL is failing before I do,
| could you?
Working with a non-bootstrappable tree is really difficult.
-- Gaby
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: libstdc++ execute tests
2001-04-11 2:55 ` Gabriel Dos Reis
@ 2001-04-11 10:39 ` Richard Henderson
2001-04-11 11:04 ` Mainline bootstrap failure (Re: libstdc++ execute tests) Gabriel Dos Reis
0 siblings, 1 reply; 223+ messages in thread
From: Richard Henderson @ 2001-04-11 10:39 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: Benjamin Kosnik, Gabriel Dos Reis, gcc-patches
On Wed, Apr 11, 2001 at 11:55:30AM +0200, Gabriel Dos Reis wrote:
> Working with a non-bootstrappable tree is really difficult.
Geezam. Ok, so what's your problem?
The tree bootstraps for me on i686 and alpha, and
has every single day this week. No exceptions.
r~
^ permalink raw reply [flat|nested] 223+ messages in thread
* Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-11 10:39 ` Richard Henderson
@ 2001-04-11 11:04 ` Gabriel Dos Reis
2001-04-11 11:25 ` Neil Booth
2001-04-11 12:15 ` Richard Henderson
0 siblings, 2 replies; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-04-11 11:04 UTC (permalink / raw)
To: Richard Henderson; +Cc: Benjamin Kosnik, Gabriel Dos Reis, gcc-patches
Richard Henderson <rth@redhat.com> writes:
| On Wed, Apr 11, 2001 at 11:55:30AM +0200, Gabriel Dos Reis wrote:
| > Working with a non-bootstrappable tree is really difficult.
|
| Geezam. Ok, so what's your problem?
|
| The tree bootstraps for me on i686 and alpha, and
| has every single day this week. No exceptions.
A freshly updated tree (mainline) dies with exactly this:
Bootstrap comparison failure!
cxxmain.o differs
fold-const.o differs
real.o differs
tree.o differs
This happens on a i686 running a SuSE-7.1. Binutils is 2.10.91 (I'm
not sure that is relevant though)
I start seeing that problem on 2001-03-28.
I made reports but nobody seems to care; then I thought I must be
being crazy until I saw confirmations from several GCC developpers.
I think this problem is i686-specific; I was able to bootstrap the
same source on a solaris-2.7 box last week.
Thanks for your help,
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-11 11:04 ` Mainline bootstrap failure (Re: libstdc++ execute tests) Gabriel Dos Reis
@ 2001-04-11 11:25 ` Neil Booth
2001-04-11 12:15 ` Richard Henderson
1 sibling, 0 replies; 223+ messages in thread
From: Neil Booth @ 2001-04-11 11:25 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: Richard Henderson, Benjamin Kosnik, gcc-patches
Gabriel Dos Reis wrote:-
> A freshly updated tree (mainline) dies with exactly this:
>
> Bootstrap comparison failure!
> cxxmain.o differs
> fold-const.o differs
> real.o differs
> tree.o differs
>
> This happens on a i686 running a SuSE-7.1. Binutils is 2.10.91 (I'm
> not sure that is relevant though)
>
> I start seeing that problem on 2001-03-28.
> I made reports but nobody seems to care; then I thought I must be
> being crazy until I saw confirmations from several GCC developpers.
>
> I think this problem is i686-specific; I was able to bootstrap the
> same source on a solaris-2.7 box last week.
No, I've got i586; so it's probably x86 specific. I still get it;
I tried again this morning.
I'll start to narrow down the dates; if you failed on 28th I'll start
with the range 0:00am on 27th and 29th and bisect until I find it.
Could take a while, though...
Neil.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-11 11:04 ` Mainline bootstrap failure (Re: libstdc++ execute tests) Gabriel Dos Reis
2001-04-11 11:25 ` Neil Booth
@ 2001-04-11 12:15 ` Richard Henderson
2001-04-11 13:19 ` Gabriel Dos Reis
1 sibling, 1 reply; 223+ messages in thread
From: Richard Henderson @ 2001-04-11 12:15 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: Benjamin Kosnik, gcc-patches
On Wed, Apr 11, 2001 at 08:04:04PM +0200, Gabriel Dos Reis wrote:
> This happens on a i686 running a SuSE-7.1. Binutils is 2.10.91 (I'm
> not sure that is relevant though)
Ok, I've just bootstrapped again without a problem.
For reference, I've got
binutils-2.10.0.18-1
gcc-2.96-69
installed on a RH7 system. I agree that the binutils
is almost certainly not relevant, since I normally use
binutils cvs, but removed it for this test.
I configured with no arguments whatsoever. I don't
suppose you're using a different configuration that
you havn't mentioned?
r~
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-11 12:15 ` Richard Henderson
@ 2001-04-11 13:19 ` Gabriel Dos Reis
2001-04-11 13:23 ` Richard Henderson
` (2 more replies)
0 siblings, 3 replies; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-04-11 13:19 UTC (permalink / raw)
To: Richard Henderson; +Cc: Gabriel Dos Reis, Benjamin Kosnik, gcc-patches
Richard Henderson <rth@redhat.com> writes:
| On Wed, Apr 11, 2001 at 08:04:04PM +0200, Gabriel Dos Reis wrote:
| > This happens on a i686 running a SuSE-7.1. Binutils is 2.10.91 (I'm
| > not sure that is relevant though)
|
| Ok, I've just bootstrapped again without a problem.
| For reference, I've got
|
| binutils-2.10.0.18-1
| gcc-2.96-69
I'm using gcc-3.0 from 20010408.
| installed on a RH7 system. I agree that the binutils
| is almost certainly not relevant, since I normally use
| binutils cvs, but removed it for this test.
|
| I configured with no arguments whatsoever. I don't
| suppose you're using a different configuration that
| you havn't mentioned?
Nothing really particular. My configure command line is:
/codesourcery/egcs/configure --prefix=/codesourcery --enable-languages=c++ --disable-nls
Neil, do you use any particular configuration options?
I'll (re)kill /codesourcery/egcs and give it a try. If it doesn't
work then I'll gave up and will do binary search when I have more
time.
-- Gaby
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-11 13:19 ` Gabriel Dos Reis
@ 2001-04-11 13:23 ` Richard Henderson
2001-04-11 13:31 ` Gabriel Dos Reis
2001-04-11 15:24 ` Gabriel Dos Reis
2001-04-11 13:53 ` Phil Edwards
2001-04-11 13:55 ` Neil Booth
2 siblings, 2 replies; 223+ messages in thread
From: Richard Henderson @ 2001-04-11 13:23 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: Benjamin Kosnik, gcc-patches
On Wed, Apr 11, 2001 at 10:19:30PM +0200, Gabriel Dos Reis wrote:
> Nothing really particular. My configure command line is:
>
> /codesourcery/egcs/configure --prefix=/codesourcery \
> --enable-languages=c++ --disable-nls
Huh. Ok, well, I guess I'll try --disable-nls to see.
One other thing. I'm using glibc-2.2-12; what have you
got installed there?
r~
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-11 13:23 ` Richard Henderson
@ 2001-04-11 13:31 ` Gabriel Dos Reis
2001-04-11 13:33 ` Richard Henderson
2001-04-11 15:24 ` Gabriel Dos Reis
1 sibling, 1 reply; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-04-11 13:31 UTC (permalink / raw)
To: Richard Henderson; +Cc: Gabriel Dos Reis, Benjamin Kosnik, gcc-patches
Richard Henderson <rth@redhat.com> writes:
| On Wed, Apr 11, 2001 at 10:19:30PM +0200, Gabriel Dos Reis wrote:
| > Nothing really particular. My configure command line is:
| >
| > /codesourcery/egcs/configure --prefix=/codesourcery \
| > --enable-languages=c++ --disable-nls
|
| Huh. Ok, well, I guess I'll try --disable-nls to see.
|
| One other thing. I'm using glibc-2.2-12; what have you
| got installed there?
rpm -q glibc reports
glibc-2.2-7
That is the library which is shipped with SuSE-7.1 -- normally I
refrain from using CVS glibc or experimental kernel.
Thakns for your help,
-- Gaby
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-11 13:31 ` Gabriel Dos Reis
@ 2001-04-11 13:33 ` Richard Henderson
0 siblings, 0 replies; 223+ messages in thread
From: Richard Henderson @ 2001-04-11 13:33 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: Benjamin Kosnik, gcc-patches
On Wed, Apr 11, 2001 at 10:31:59PM +0200, Gabriel Dos Reis wrote:
> glibc-2.2-7
Ok. I was worried it might be a glibc 2.1 vs 2.2 thing.
r~
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-11 13:19 ` Gabriel Dos Reis
2001-04-11 13:23 ` Richard Henderson
@ 2001-04-11 13:53 ` Phil Edwards
2001-04-11 13:55 ` Neil Booth
2 siblings, 0 replies; 223+ messages in thread
From: Phil Edwards @ 2001-04-11 13:53 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: Richard Henderson, Benjamin Kosnik, gcc-patches
[we oughta find a better list for this]
On Wed, Apr 11, 2001 at 10:19:30PM +0200, Gabriel Dos Reis wrote:
> Richard Henderson <rth@redhat.com> writes:
> | On Wed, Apr 11, 2001 at 08:04:04PM +0200, Gabriel Dos Reis wrote:
> | > This happens on a i686 running a SuSE-7.1. Binutils is 2.10.91 (I'm
> | > not sure that is relevant though)
> |
> | Ok, I've just bootstrapped again without a problem.
> | For reference, I've got
> |
> | binutils-2.10.0.18-1
> | gcc-2.96-69
>
> I'm using gcc-3.0 from 20010408.
Just for more data points: I've had no problems building trunk or branch
lately, on i686 running RH7, using
gcc-2.96-54
binutils-2.10.0.18-1
glibc-2.2-9
as the bootstrapper. HOWEVER, note that:
- more-or-less-current CVS binutils is always built along with the
compiler, otherwise various bad things happen. Also gdb is built
so that I can demangle c++ coredumps.
- the linkonce patch disabled here
http://gcc.gnu.org/ml/gcc-patches/2001-01/msg01679.html
must be re-enabled; with it disabled I get segfaults during init
and fini. I have no idea even where to begin looking there; I am
not a back-end expert. I've concluded that it's local weirdness
somehow. (how?)
> Nothing really particular. My configure command line is:
>
> /codesourcery/egcs/configure --prefix=/codesourcery --enable-languages=c++ --disable-nls
/home/pme/src/3unified/configure
--prefix=/home/pme/build/install-2001-04-11-3branch
--with-gnu-as --with-gnu-ld --with-gcc
--enable-languages=c++
--enable-install-libiberty // always testing my patch
--disable-nls --disable-sim --enable-gdbtk // also building GDB
--enable-shared --enable-debug
The --enable-debug is intended for libstdc++; I don't know what else might
be picking it up. (The drive containing the sources is offline right now
for some TLC&PM, or I'd grep for it.)
Problems bootstrapping the branch on sparc-sun-solaris2.8, yes, but i686, no.
--
pedwards at disaster dot jaj dot com | pme at sources dot redhat dot com
devphil at several other less interesting addresses in various dot domains
The gods do not protect fools. Fools are protected by more capable fools.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-11 13:19 ` Gabriel Dos Reis
2001-04-11 13:23 ` Richard Henderson
2001-04-11 13:53 ` Phil Edwards
@ 2001-04-11 13:55 ` Neil Booth
2001-04-11 13:58 ` Richard Henderson
2 siblings, 1 reply; 223+ messages in thread
From: Neil Booth @ 2001-04-11 13:55 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: Richard Henderson, Benjamin Kosnik, gcc-patches
Gabriel Dos Reis wrote:-
> Nothing really particular. My configure command line is:
>
> /codesourcery/egcs/configure --prefix=/codesourcery --enable-languages=c++ --disable-nls
>
>
> Neil, do you use any particular configuration options?
Just --enable-shared --enable-threads=posix
and usually --disable-checking.
I'm trying to narrow down the dates. If / when I get bored, I'll pass it on to
you for a while :-)
Neil.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-11 13:55 ` Neil Booth
@ 2001-04-11 13:58 ` Richard Henderson
0 siblings, 0 replies; 223+ messages in thread
From: Richard Henderson @ 2001-04-11 13:58 UTC (permalink / raw)
To: Neil Booth; +Cc: Gabriel Dos Reis, Benjamin Kosnik, gcc-patches
On Wed, Apr 11, 2001 at 09:54:59PM +0100, Neil Booth wrote:
> I'm trying to narrow down the dates.
Don't bother. It's a lot of work, and I really doubt it
will tell you anything. You might as well just debug the
problem directly.
I'd do it myself if I could reproduce the damned thing...
r~
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-11 13:23 ` Richard Henderson
2001-04-11 13:31 ` Gabriel Dos Reis
@ 2001-04-11 15:24 ` Gabriel Dos Reis
2001-04-11 15:52 ` Richard Henderson
2001-04-11 23:32 ` Neil Booth
1 sibling, 2 replies; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-04-11 15:24 UTC (permalink / raw)
To: Richard Henderson; +Cc: Gabriel Dos Reis, Benjamin Kosnik, gcc-patches
Richard Henderson <rth@redhat.com> writes:
| I guess I'll try --disable-nls to see.
--disable-nls doesn't change observable behaviour :-)
I just made sure a checkout with "co -D20010327" is fine.
Before I go bed I'll try one from mid 2001-03-28.
-- Gaby
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-11 15:24 ` Gabriel Dos Reis
@ 2001-04-11 15:52 ` Richard Henderson
2001-04-11 16:25 ` Zack Weinberg
` (2 more replies)
2001-04-11 23:32 ` Neil Booth
1 sibling, 3 replies; 223+ messages in thread
From: Richard Henderson @ 2001-04-11 15:52 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: Benjamin Kosnik, gcc-patches
On Thu, Apr 12, 2001 at 12:24:15AM +0200, Gabriel Dos Reis wrote:
> --disable-nls doesn't change observable behaviour :-)
Yeah, well. I've just tried --disable-nls and
--enable-checking=rtl,tree,misc,gc and neither
elicited a failure.
I don't know what else to try.
r~
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-11 15:52 ` Richard Henderson
@ 2001-04-11 16:25 ` Zack Weinberg
2001-04-11 16:27 ` Gabriel Dos Reis
2001-04-11 23:06 ` Benjamin Kosnik
2 siblings, 0 replies; 223+ messages in thread
From: Zack Weinberg @ 2001-04-11 16:25 UTC (permalink / raw)
To: Richard Henderson, Gabriel Dos Reis, Benjamin Kosnik, gcc-patches
On Wed, Apr 11, 2001 at 03:52:39PM -0700, Richard Henderson wrote:
> On Thu, Apr 12, 2001 at 12:24:15AM +0200, Gabriel Dos Reis wrote:
> > --disable-nls doesn't change observable behaviour :-)
>
> Yeah, well. I've just tried --disable-nls and
> --enable-checking=rtl,tree,misc,gc and neither
> elicited a failure.
>
> I don't know what else to try.
Maybe diffs of objdump -dr output for the files that are observed to
be different would be helpful?
zw
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-11 15:52 ` Richard Henderson
2001-04-11 16:25 ` Zack Weinberg
@ 2001-04-11 16:27 ` Gabriel Dos Reis
2001-04-11 16:31 ` Richard Henderson
2001-04-11 23:06 ` Benjamin Kosnik
2 siblings, 1 reply; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-04-11 16:27 UTC (permalink / raw)
To: Richard Henderson; +Cc: Gabriel Dos Reis, Benjamin Kosnik, gcc-patches
Richard Henderson <rth@redhat.com> writes:
| I don't know what else to try.
I don't know if this could help. I tried a diff of stage-2 and the
final stage of an objdumped cxxmain.o (one of the incriminated files);
below is the diff. The difference is occuring in optable. I don't
know useful it is.
-- Gaby
*** cxxmain-2.s Thu Apr 12 01:07:20 2001
--- cxxmain-f.s Thu Apr 12 01:07:08 2001
***************
*** 1,5 ****
! stage2/cxxmain.o: file format elf32-i386
Disassembly of section .text:
--- 1,5 ----
! cxxmain.o: file format elf32-i386
Disassembly of section .text:
*************** Disassembly of section .text:
*** 634,658 ****
7a9: 8b 7d 08 mov 0x8(%ebp),%edi
7ac: 57 push %edi
7ad: e8 fc ff ff ff call 7ae <cplus_mangle_opname+0xe>
! 7b2: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp)
! 7b9: 89 c3 mov %eax,%ebx
! 7bb: 83 c4 10 add $0x10,%esp
! 7be: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp)
! 7c5: 8b 45 0c mov 0xc(%ebp),%eax
! 7c8: 83 e0 02 and $0x2,%eax
! 7cb: 89 45 ec mov %eax,0xffffffec(%ebp)
! 7ce: 89 f6 mov %esi,%esi
! 7d0: 8b 55 e8 mov 0xffffffe8(%ebp),%edx
! 7d3: b8 44 02 00 00 mov $0x244,%eax
7d8: 83 ec 0c sub $0xc,%esp
! 7db: 8b 34 10 mov (%eax,%edx,1),%esi
7de: 56 push %esi
7df: e8 fc ff ff ff call 7e0 <cplus_mangle_opname+0x40>
7e4: 83 c4 10 add $0x10,%esp
7e7: 39 d8 cmp %ebx,%eax
7e9: 74 17 je 802 <cplus_mangle_opname+0x62>
7eb: ff 45 f0 incl 0xfffffff0(%ebp)
! 7ee: 83 45 e8 0c addl $0xc,0xffffffe8(%ebp)
7f2: 83 7d f0 4e cmpl $0x4e,0xfffffff0(%ebp)
7f6: 76 d8 jbe 7d0 <cplus_mangle_opname+0x30>
7f8: 31 c0 xor %eax,%eax
--- 634,656 ----
7a9: 8b 7d 08 mov 0x8(%ebp),%edi
7ac: 57 push %edi
7ad: e8 fc ff ff ff call 7ae <cplus_mangle_opname+0xe>
! 7b2: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp)
! 7b9: 83 c4 10 add $0x10,%esp
! 7bc: 89 c3 mov %eax,%ebx
! 7be: 83 65 0c 02 andl $0x2,0xc(%ebp)
! 7c2: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp)
! 7c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,1),%esi
! 7d0: 8b 45 ec mov 0xffffffec(%ebp),%eax
! 7d3: ba 44 02 00 00 mov $0x244,%edx
7d8: 83 ec 0c sub $0xc,%esp
! 7db: 8b 34 02 mov (%edx,%eax,1),%esi
7de: 56 push %esi
7df: e8 fc ff ff ff call 7e0 <cplus_mangle_opname+0x40>
7e4: 83 c4 10 add $0x10,%esp
7e7: 39 d8 cmp %ebx,%eax
7e9: 74 17 je 802 <cplus_mangle_opname+0x62>
7eb: ff 45 f0 incl 0xfffffff0(%ebp)
! 7ee: 83 45 ec 0c addl $0xc,0xffffffec(%ebp)
7f2: 83 7d f0 4e cmpl $0x4e,0xfffffff0(%ebp)
7f6: 76 d8 jbe 7d0 <cplus_mangle_opname+0x30>
7f8: 31 c0 xor %eax,%eax
*************** Disassembly of section .text:
*** 662,671 ****
7ff: 5f pop %edi
800: 5d pop %ebp
801: c3 ret
! 802: 8b 55 e8 mov 0xffffffe8(%ebp),%edx
805: 8b 82 48 02 00 00 mov 0x248(%edx),%eax
80b: 83 e0 02 and $0x2,%eax
! 80e: 39 45 ec cmp %eax,0xffffffec(%ebp)
811: 75 d8 jne 7eb <cplus_mangle_opname+0x4b>
813: fc cld
814: b8 44 02 00 00 mov $0x244,%eax
--- 660,669 ----
7ff: 5f pop %edi
800: 5d pop %ebp
801: c3 ret
! 802: 8b 55 ec mov 0xffffffec(%ebp),%edx
805: 8b 82 48 02 00 00 mov 0x248(%edx),%eax
80b: 83 e0 02 and $0x2,%eax
! 80e: 39 45 0c cmp %eax,0xc(%ebp)
811: 75 d8 jne 7eb <cplus_mangle_opname+0x4b>
813: fc cld
814: b8 44 02 00 00 mov $0x244,%eax
*************** Disassembly of section .text:
*** 678,684 ****
828: 0f 92 c0 setb %al
82b: 38 c2 cmp %al,%dl
82d: 75 bc jne 7eb <cplus_mangle_opname+0x4b>
! 82f: 8b 55 e8 mov 0xffffffe8(%ebp),%edx
832: 8b 82 40 02 00 00 mov 0x240(%edx),%eax
838: eb c0 jmp 7fa <cplus_mangle_opname+0x5a>
83a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
--- 676,682 ----
828: 0f 92 c0 setb %al
82b: 38 c2 cmp %al,%dl
82d: 75 bc jne 7eb <cplus_mangle_opname+0x4b>
! 82f: 8b 55 ec mov 0xffffffec(%ebp),%edx
832: 8b 82 40 02 00 00 mov 0x240(%edx),%eax
838: eb c0 jmp 7fa <cplus_mangle_opname+0x5a>
83a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-11 16:27 ` Gabriel Dos Reis
@ 2001-04-11 16:31 ` Richard Henderson
2001-04-11 16:40 ` Gabriel Dos Reis
0 siblings, 1 reply; 223+ messages in thread
From: Richard Henderson @ 2001-04-11 16:31 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: gcc-patches
On Thu, Apr 12, 2001 at 01:27:25AM +0200, Gabriel Dos Reis wrote:
> - 7b2: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp)
> + 7b2: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp)
So, we've got differences in stack layout,
> - 7b9: 89 c3 mov %eax,%ebx
> - 7bb: 83 c4 10 add $0x10,%esp
> + 7b9: 83 c4 10 add $0x10,%esp
> + 7bc: 89 c3 mov %eax,%ebx
and differences in scheduling.
It would be instructive to know how early in the
rtl dumps differences begin appearing.
r~
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-11 16:31 ` Richard Henderson
@ 2001-04-11 16:40 ` Gabriel Dos Reis
2001-04-11 16:46 ` Richard Henderson
0 siblings, 1 reply; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-04-11 16:40 UTC (permalink / raw)
To: Richard Henderson; +Cc: Gabriel Dos Reis, gcc-patches
Richard Henderson <rth@redhat.com> writes:
| On Thu, Apr 12, 2001 at 01:27:25AM +0200, Gabriel Dos Reis wrote:
| > - 7b2: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp)
| > + 7b2: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp)
|
| So, we've got differences in stack layout,
|
| > - 7b9: 89 c3 mov %eax,%ebx
| > - 7bb: 83 c4 10 add $0x10,%esp
| > + 7b9: 83 c4 10 add $0x10,%esp
| > + 7bc: 89 c3 mov %eax,%ebx
|
| and differences in scheduling.
|
| It would be instructive to know how early in the
| rtl dumps differences begin appearing.
I'm completely ignorant as to how to get those information. What is
the magic incantation?
(I swear I'll learn all those magical options :-)
-- Gaby
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-11 16:40 ` Gabriel Dos Reis
@ 2001-04-11 16:46 ` Richard Henderson
2001-04-11 17:35 ` Gabriel Dos Reis
0 siblings, 1 reply; 223+ messages in thread
From: Richard Henderson @ 2001-04-11 16:46 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: gcc-patches
On Thu, Apr 12, 2001 at 01:40:17AM +0200, Gabriel Dos Reis wrote:
> I'm completely ignorant as to how to get those information. What is
> the magic incantation?
rm cxxmain.o
make cxxmain.o CFLAGS='--save-temps'
./stage1/cc1 -fpreprocessed -da cxxmain.i -O2 -g
mv cxxmain.i.* ..
./stage2/cc1 -fpreprocessed -da cxxmain.i -O2 -g
r~
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-11 16:46 ` Richard Henderson
@ 2001-04-11 17:35 ` Gabriel Dos Reis
0 siblings, 0 replies; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-04-11 17:35 UTC (permalink / raw)
To: Richard Henderson; +Cc: Gabriel Dos Reis, gcc-patches
Richard Henderson <rth@redhat.com> writes:
| On Thu, Apr 12, 2001 at 01:40:17AM +0200, Gabriel Dos Reis wrote:
| > I'm completely ignorant as to how to get those information. What is
| > the magic incantation?
|
| rm cxxmain.o
| make cxxmain.o CFLAGS='--save-temps'
| ./stage1/cc1 -fpreprocessed -da cxxmain.i -O2 -g
| mv cxxmain.i.* ..
| ./stage2/cc1 -fpreprocessed -da cxxmain.i -O2 -g
Thanks!
I think the difference appears in the first phase as reported by
@@ -4595,15 +4595,15 @@
(note 1 0 4 ("cxxmain.c") 951)
(insn 4 1 6 (set (reg/v/f:SI 58)
- (mem/f:SI (reg/f:SI 53 virtual-incoming-args) 312)) -1 (nil)
- (expr_list:REG_EQUIV (mem/f:SI (reg/f:SI 53 virtual-incoming-args) 312)
+ (mem/f:SI (reg/f:SI 53 virtual-incoming-args) 311)) -1 (nil)
+ (expr_list:REG_EQUIV (mem/f:SI (reg/f:SI 53 virtual-incoming-args) 311)
(nil)))
(insn 6 4 8 (set (reg/v/f:SI 59)
(mem/f:SI (plus:SI (reg/f:SI 53 virtual-incoming-args)
- (const_int 4 [0x4])) 313)) -1 (nil)
+ (const_int 4 [0x4])) 312)) -1 (nil)
(expr_list:REG_EQUIV (mem/f:SI (plus:SI (reg/f:SI 53 virtual-incoming-args)
- (const_int 4 [0x4])) 313)
+ (const_int 4 [0x4])) 312)
(nil)))
The whole diff of cxxmain.i.00.rtl is at
http://www.cmla.ens-cachan.fr/~dosreis/gcc-ices/
If I understand Peter's report correctly, gcc-3.1 wouldn't be a good
candidate to build stage1... That would be very odd.
Thanks again.
-- Gaby
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-11 15:52 ` Richard Henderson
2001-04-11 16:25 ` Zack Weinberg
2001-04-11 16:27 ` Gabriel Dos Reis
@ 2001-04-11 23:06 ` Benjamin Kosnik
2 siblings, 0 replies; 223+ messages in thread
From: Benjamin Kosnik @ 2001-04-11 23:06 UTC (permalink / raw)
To: Richard Henderson; +Cc: Gabriel Dos Reis, gcc-patches
I just bootstrapped with current sources on a RH7/6x86 machine.
So, something wrong with your build gaby? Perhaps you could try a clean
configure/bootstrap, after building current binutils and putting it in
your path?
-benjamin
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-11 15:24 ` Gabriel Dos Reis
2001-04-11 15:52 ` Richard Henderson
@ 2001-04-11 23:32 ` Neil Booth
2001-04-11 23:48 ` Gabriel Dos Reis
2001-04-12 0:40 ` Neil Booth
1 sibling, 2 replies; 223+ messages in thread
From: Neil Booth @ 2001-04-11 23:32 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: Richard Henderson, Benjamin Kosnik, gcc-patches
Gabriel Dos Reis wrote:-
> I just made sure a checkout with "co -D20010327" is fine.
>
> Before I go bed I'll try one from mid 2001-03-28.
I can add another data point. -D "2001-03-28 12:00" is fine.
Given you think it was broken sometime on the 28th, I'm going to try
2001-03-29 00:00 and expect it to be broken. Could you try 2001-03-28
18:00?
Neil.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-11 23:32 ` Neil Booth
@ 2001-04-11 23:48 ` Gabriel Dos Reis
2001-04-12 0:37 ` Neil Booth
2001-04-12 0:40 ` Neil Booth
1 sibling, 1 reply; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-04-11 23:48 UTC (permalink / raw)
To: Neil Booth; +Cc: Richard Henderson, Benjamin Kosnik, gcc-patches
Neil Booth <neil@daikokuya.demon.co.uk> writes:
| Gabriel Dos Reis wrote:-
|
| > I just made sure a checkout with "co -D20010327" is fine.
| >
| > Before I go bed I'll try one from mid 2001-03-28.
|
| I can add another data point. -D "2001-03-28 12:00" is fine.
|
| Given you think it was broken sometime on the 28th, I'm going to try
| 2001-03-29 00:00 and expect it to be broken. Could you try 2001-03-28
| 18:00?
Yes, my night was short and I expect the day will be better :-)
Were you bootstrapping with gcc-3.0?
Thanks,
-- Gaby
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-11 23:48 ` Gabriel Dos Reis
@ 2001-04-12 0:37 ` Neil Booth
2001-04-12 0:41 ` Gabriel Dos Reis
0 siblings, 1 reply; 223+ messages in thread
From: Neil Booth @ 2001-04-12 0:37 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: gcc-patches
Gabriel Dos Reis wrote:-
> Yes, my night was short and I expect the day will be better :-)
>
> Were you bootstrapping with gcc-3.0?
Yes.
Neil.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-11 23:32 ` Neil Booth
2001-04-11 23:48 ` Gabriel Dos Reis
@ 2001-04-12 0:40 ` Neil Booth
2001-04-12 1:42 ` Gabriel Dos Reis
1 sibling, 1 reply; 223+ messages in thread
From: Neil Booth @ 2001-04-12 0:40 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: Richard Henderson, Benjamin Kosnik, gcc-patches
Neil Booth wrote:-
> Given you think it was broken sometime on the 28th, I'm going to try
> 2001-03-29 00:00 and expect it to be broken. Could you try 2001-03-28
> 18:00?
I can confirm that 2001-03-29 00:00 fails:-
Bootstrap comparison failure!
fold-const.o differs
real.o differs
tree.o differs
(--enable-languages=c). So we have it down to a 12-hour interval.
NEil.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 0:37 ` Neil Booth
@ 2001-04-12 0:41 ` Gabriel Dos Reis
0 siblings, 0 replies; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-04-12 0:41 UTC (permalink / raw)
To: Neil Booth; +Cc: gcc-patches
Neil Booth <neil@daikokuya.demon.co.uk> writes:
| Gabriel Dos Reis wrote:-
|
| > Yes, my night was short and I expect the day will be better :-)
| >
| > Were you bootstrapping with gcc-3.0?
|
| Yes.
OK, so we're on the same wavelength. FYI, 2001-03-28 22:00 fails.
-- Gaby
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 0:40 ` Neil Booth
@ 2001-04-12 1:42 ` Gabriel Dos Reis
2001-04-12 2:28 ` Mainline bootstrap failure (Hit) Gabriel Dos Reis
` (2 more replies)
0 siblings, 3 replies; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-04-12 1:42 UTC (permalink / raw)
To: Neil Booth
Cc: Gabriel Dos Reis, Richard Henderson, Benjamin Kosnik, gcc-patches
Neil Booth <neil@daikokuya.demon.co.uk> writes:
| Neil Booth wrote:-
|
| > Given you think it was broken sometime on the 28th, I'm going to try
| > 2001-03-29 00:00 and expect it to be broken. Could you try 2001-03-28
| > 18:00?
|
| I can confirm that 2001-03-29 00:00 fails:-
|
| Bootstrap comparison failure!
| fold-const.o differs
| real.o differs
| tree.o differs
|
| (--enable-languages=c). So we have it down to a 12-hour interval.
The breakage seems to happen between 16:00 and 18:00. Currently I'm
suspecting this patch:
2001-03-28 DJ Delorie <dj@redhat.com>
* Makefile.in (stage1_build): Revert CFLAGS patch.
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.632
retrieving revision 1.633
diff -p -r1.632 -r1.633
*** Makefile.in 2001/03/28 11:03:47 1.632
--- Makefile.in 2001/03/28 17:50:11 1.633
*************** STAGE2_FLAGS_TO_PASS = \
*** 2937,2944 ****
# we can guarantee will build with the native compiler, and also it
is the
# only thing useful for building stage2.
stage1_build:
! $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)" \
! CFLAGS="$(CFLAGS)"
touch stage1_build
echo stage1_build > stage_last
--- 2937,2943 ----
# we can guarantee will build with the native compiler, and also it
# is the
# only thing useful for building stage2.
stage1_build:
! $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)"
touch stage1_build
echo stage1_build > stage_last
The only patches checked-in in that interval are:
2001-03-28 DJ Delorie <dj@redhat.com>
* Makefile.in (stage1_build): Revert CFLAGS patch.
2001-03-28 Marek Michalkiewicz <marekm@linux.org.pl>
* config/avr/libgcc.S (__mulhi3): Correct tests to exit the loop
when multiplier or multiplicand is zero.
The latter is inocuous but the former may explain the difference in
the scheduling Richard alluded to.
-- Gaby
^ permalink raw reply [flat|nested] 223+ messages in thread
* Mainline bootstrap failure (Hit)
2001-04-12 1:42 ` Gabriel Dos Reis
@ 2001-04-12 2:28 ` Gabriel Dos Reis
2001-04-12 3:02 ` Gabriel Dos Reis
2001-04-12 2:44 ` Mainline bootstrap failure (Re: libstdc++ execute tests) Alexandre Oliva
2001-04-12 2:58 ` Franz Sirl
2 siblings, 1 reply; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-04-12 2:28 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: Neil Booth, Richard Henderson, gcc-patches
Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr> writes:
| Neil Booth <neil@daikokuya.demon.co.uk> writes:
|
| | Neil Booth wrote:-
| |
| | > Given you think it was broken sometime on the 28th, I'm going to try
| | > 2001-03-29 00:00 and expect it to be broken. Could you try 2001-03-28
| | > 18:00?
| |
| | I can confirm that 2001-03-29 00:00 fails:-
| |
| | Bootstrap comparison failure!
| | fold-const.o differs
| | real.o differs
| | tree.o differs
| |
| | (--enable-languages=c). So we have it down to a 12-hour interval.
|
| The breakage seems to happen between 16:00 and 18:00. Currently I'm
| suspecting this patch:
|
| 2001-03-28 DJ Delorie <dj@redhat.com>
|
| * Makefile.in (stage1_build): Revert CFLAGS patch.
OK I have more info on this. I can attest that the breakage happens
on 18:00 but not on 17:40. The only patch checked in is the above.
Now, what I don't understand is why the same problem doesn't appear
when bootstrapping 3.0.
I just started a bootstrap with that patch removed.
-- Gaby
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 1:42 ` Gabriel Dos Reis
2001-04-12 2:28 ` Mainline bootstrap failure (Hit) Gabriel Dos Reis
@ 2001-04-12 2:44 ` Alexandre Oliva
[not found] ` <5.1.0.12.2.20010412170823.026d5540@mail.lauterbach.co!>
` (3 more replies)
2001-04-12 2:58 ` Franz Sirl
2 siblings, 4 replies; 223+ messages in thread
From: Alexandre Oliva @ 2001-04-12 2:44 UTC (permalink / raw)
To: Gabriel Dos Reis
Cc: Neil Booth, Gabriel Dos Reis, Richard Henderson, Benjamin Kosnik,
gcc-patches
On Apr 12, 2001, Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr> wrote:
> The breakage seems to happen between 16:00 and 18:00. Currently I'm
> suspecting this patch:
> - $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)" \
> - CFLAGS="$(CFLAGS)"
> + $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)"
In this case, your bootstrap compiler is a strong suspect.
What is CFLAGS set to in the top-level Makefile? How about
STAGE1_CFLAGS in gcc/Makefile? With DJ's patch, the top-level CFLAGS
probably stops overriding STAGE1_CFLAGS, so you may get an optimized
stage1. If the bootstrap compiler mis-optimizes the code, stage1 may
simply crash. However, if you're lucky (and you seem to be!), it'll
just disable a few optimizations, so stage2 will work correctly, but
it will generate different code, because it won't miss the
optimizations. If this theory is correct, bootstrap4 should succeed.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 1:42 ` Gabriel Dos Reis
2001-04-12 2:28 ` Mainline bootstrap failure (Hit) Gabriel Dos Reis
2001-04-12 2:44 ` Mainline bootstrap failure (Re: libstdc++ execute tests) Alexandre Oliva
@ 2001-04-12 2:58 ` Franz Sirl
2001-04-12 5:32 ` Gabriel Dos Reis
2 siblings, 1 reply; 223+ messages in thread
From: Franz Sirl @ 2001-04-12 2:58 UTC (permalink / raw)
To: Gabriel Dos Reis
Cc: Neil Booth, Gabriel Dos Reis, Richard Henderson, Benjamin Kosnik,
gcc-patches
[-- Attachment #1: Type: text/plain, Size: 1315 bytes --]
At 10:40 12.04.2001, Gabriel Dos Reis wrote:
>Neil Booth <neil@daikokuya.demon.co.uk> writes:
>
>| Neil Booth wrote:-
>|
>| > Given you think it was broken sometime on the 28th, I'm going to try
>| > 2001-03-29 00:00 and expect it to be broken. Could you try 2001-03-28
>| > 18:00?
>|
>| I can confirm that 2001-03-29 00:00 fails:-
>|
>| Bootstrap comparison failure!
>| fold-const.o differs
>| real.o differs
>| tree.o differs
>|
>| (--enable-languages=c). So we have it down to a 12-hour interval.
>
>The breakage seems to happen between 16:00 and 18:00. Currently I'm
>suspecting this patch:
>
>2001-03-28 DJ Delorie <dj@redhat.com>
>
> * Makefile.in (stage1_build): Revert CFLAGS patch.
If you have problems with this reversal, try the attached patch from my 3.0
queue which makes STAGE1_CFLAGS overrideable from the toplevel. Then a
make bootstrap STAGE1_CFLAGS="-O2 -g"
should give you the same setup as before the patch reversal. You can also
play with with different STAGE1_CFLAGS a bit to see when it breaks, maybe
we are chasing a -O0 miscompilation caused by some uninitialized
memory/flag/etc. in the -O0 case.
Franz.
ChangeLog:
* Makefile.in (STAGE1_CFLAGS): Pass down.
gcc/ChangeLog:
* Makefile.in (stage1_build): Pass down STAGE1_CFLAGS and MAKEINFO.
[-- Attachment #2: stage1_cflags.patch --]
[-- Type: text/x-diff, Size: 2079 bytes --]
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/Makefile.in,v
retrieving revision 1.80
diff -u -p -r1.80 Makefile.in
--- Makefile.in 2001/04/02 01:26:14 1.80
+++ Makefile.in 2001/04/12 09:44:25
@@ -475,6 +475,7 @@ EXTRA_GCC_FLAGS = \
"`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
"`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
"`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
+ "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
"`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
Index: gcc/Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/Makefile.in,v
retrieving revision 1.643
diff -u -p -r1.643 Makefile.in
--- gcc/Makefile.in 2001/04/11 18:36:49 1.643
+++ gcc/Makefile.in 2001/04/12 09:44:26
@@ -64,7 +64,7 @@ BOOT_LANGUAGES = c @all_boot_languages@
# compilations.
# XCFLAGS is used for most compilations but not when using the GCC just built.
# TCFLAGS is used for compilations with the GCC just built.
-# STAGE1_CFLAGS is set by configure on some targets.
+# STAGE1_CFLAGS is set by configure on some targets or passed from toplevel.
XCFLAGS =
TCFLAGS =
BOOT_CFLAGS = -g -O2
@@ -2942,9 +2942,12 @@ STAGE2_FLAGS_TO_PASS = \
# Only build the C compiler for stage1, because that is the only one that
# we can guarantee will build with the native compiler, and also it is the
-# only thing useful for building stage2.
+# only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS) and
+# MAKEINFO are explicitly passed here to make them overrideable
+# (for a bootstrap build stage1 also builds gcc.info).
stage1_build:
- $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)"
+ $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)" \
+ CFLAGS="$(STAGE1_CFLAGS)" MAKEINFO="$(MAKEINFO)"
touch stage1_build
echo stage1_build > stage_last
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Hit)
2001-04-12 2:28 ` Mainline bootstrap failure (Hit) Gabriel Dos Reis
@ 2001-04-12 3:02 ` Gabriel Dos Reis
2001-04-12 11:03 ` Richard Henderson
0 siblings, 1 reply; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-04-12 3:02 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: Neil Booth, Richard Henderson, gcc-patches
Gabriel Dos Reis <gdr@codesourcery.com> writes:
[...]
| I just started a bootstrap with that patch removed.
Success! For today source without DJ's patch.
Now, all theories are welcome :-)
-- Gaby
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 2:44 ` Mainline bootstrap failure (Re: libstdc++ execute tests) Alexandre Oliva
[not found] ` <5.1.0.12.2.20010412170823.026d5540@mail.lauterbach.co!>
@ 2001-04-12 3:04 ` Franz Sirl
2001-04-12 3:23 ` Alexandre Oliva
2001-04-12 3:14 ` Gabriel Dos Reis
[not found] ` <5.1.0.12.2.20010412170823.026d5540@mail.lauterbach.co!m>
3 siblings, 1 reply; 223+ messages in thread
From: Franz Sirl @ 2001-04-12 3:04 UTC (permalink / raw)
To: Alexandre Oliva
Cc: Gabriel Dos Reis, Neil Booth, Gabriel Dos Reis,
Richard Henderson, Benjamin Kosnik, gcc-patches
At 11:44 12.04.2001, Alexandre Oliva wrote:
>On Apr 12, 2001, Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr> wrote:
>
> > The breakage seems to happen between 16:00 and 18:00. Currently I'm
> > suspecting this patch:
>
> > - $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)" \
> > - CFLAGS="$(CFLAGS)"
> > + $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)"
>
>In this case, your bootstrap compiler is a strong suspect.
>
>What is CFLAGS set to in the top-level Makefile? How about
>STAGE1_CFLAGS in gcc/Makefile? With DJ's patch, the top-level CFLAGS
>probably stops overriding STAGE1_CFLAGS, so you may get an optimized
>stage1. If the bootstrap compiler mis-optimizes the code, stage1 may
>simply crash. However, if you're lucky (and you seem to be!), it'll
>just disable a few optimizations, so stage2 will work correctly, but
>it will generate different code, because it won't miss the
>optimizations. If this theory is correct, bootstrap4 should succeed.
No, the patch got reverted, so STAGE1_CFLAGS should default to "-g", see my
other posting for a correct patch.
On bootstrap4, I think he may get different problems with that, cause
AFAICS, stage4_build passes the -B flags in the wrong order...
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 2:44 ` Mainline bootstrap failure (Re: libstdc++ execute tests) Alexandre Oliva
[not found] ` <5.1.0.12.2.20010412170823.026d5540@mail.lauterbach.co!>
2001-04-12 3:04 ` Franz Sirl
@ 2001-04-12 3:14 ` Gabriel Dos Reis
2001-04-12 3:34 ` Alexandre Oliva
2001-04-12 3:56 ` Franz Sirl
[not found] ` <5.1.0.12.2.20010412170823.026d5540@mail.lauterbach.co!m>
3 siblings, 2 replies; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-04-12 3:14 UTC (permalink / raw)
To: Alexandre Oliva; +Cc: Neil Booth, Richard Henderson, gcc-patches
Alexandre Oliva <aoliva@redhat.com> writes:
| On Apr 12, 2001, Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr> wrote:
|
| > The breakage seems to happen between 16:00 and 18:00. Currently I'm
| > suspecting this patch:
|
| > - $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)" \
| > - CFLAGS="$(CFLAGS)"
| > + $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)"
|
| In this case, your bootstrap compiler is a strong suspect.
It is gcc-3.0.
| What is CFLAGS set to in the top-level Makefile?
CFLAGS = -Wall -O4
| How about STAGE1_CFLAGS in gcc/Makefile?
# STAGE1_CFLAGS is set by configure on some targets.
XCFLAGS =
TCFLAGS =
BOOT_CFLAGS = -g -O2
STAGE1_CFLAGS = -g
CFLAGS = $(STAGE1_CFLAGS)
| With DJ's patch, the top-level CFLAGS probably stops overriding
| STAGE1_CFLAGS, so you may get an optimized stage1.
| If the bootstrap compiler mis-optimizes the code, stage1 may
| simply crash. However, if you're lucky (and you seem to be!), it'll
| just disable a few optimizations, so stage2 will work correctly, but
| it will generate different code, because it won't miss the
| optimizations. If this theory is correct, bootstrap4 should succeed.
I don't know if the theory is incorrect but bootstrap4 doesn't
succeed :-(
Since the bootstrapping compiler is gcc-3.0, the problem is serious.
Note that I'm now able to bootstrap mainline WITHOUT DJ's patch.
I can't remember what problem it is supposed to solve.
-- Gaby
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 3:04 ` Franz Sirl
@ 2001-04-12 3:23 ` Alexandre Oliva
2001-04-12 7:39 ` DJ Delorie
0 siblings, 1 reply; 223+ messages in thread
From: Alexandre Oliva @ 2001-04-12 3:23 UTC (permalink / raw)
To: Franz Sirl
Cc: Gabriel Dos Reis, Neil Booth, Gabriel Dos Reis,
Richard Henderson, Benjamin Kosnik, gcc-patches, dj
On Apr 12, 2001, Franz Sirl <Franz.Sirl-kernel@lauterbach.com> wrote:
> On bootstrap4, I think he may get different problems with that, cause
> AFAICS, stage4_build passes the -B flags in the wrong order...
Yes, indeed. I suppose that's a bug, though. DJ?
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 3:14 ` Gabriel Dos Reis
@ 2001-04-12 3:34 ` Alexandre Oliva
2001-04-12 5:37 ` Franz Sirl
2001-04-12 3:56 ` Franz Sirl
1 sibling, 1 reply; 223+ messages in thread
From: Alexandre Oliva @ 2001-04-12 3:34 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: Neil Booth, Richard Henderson, gcc-patches
On Apr 12, 2001, Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr> wrote:
> I don't know if the theory is incorrect but bootstrap4 doesn't
> succeed :-(
Well, it may just as well be that it needs one (or more) stages to
converge. It may never converge, too, if it remains oscillating
between two or more slightly different states.
> Note that I'm now able to bootstrap mainline WITHOUT DJ's patch.
> I can't remember what problem it is supposed to solve.
It's supposed to let you override CFLAGS (for stage1 only), just like
you did.
The problem is that CFLAGS is passed down from the top-level Makefile,
overriding CFLAGS=$(STAGE1_CFLAGS) in gcc/Makefile. If the stage1
$(MAKE) doesn't pass CFLAGS down, CFLAGS=$(STAGE1_CFLAGS) will prevail
in the sub-make. If it does, then the flag incoming from the
top-level takes over.
It appears to me that CFLAGS shouldn't be passed down from the
top-level unconditionally; we could use the XFOO sed trick to get it
passed down only if the user explicitly specified it.
In any case, try setting CFLAGS in the top level to just -g, and then
restart the bootstrap. Or just run cleanstrap within the GCC
directory; this should be equivalent.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 3:14 ` Gabriel Dos Reis
2001-04-12 3:34 ` Alexandre Oliva
@ 2001-04-12 3:56 ` Franz Sirl
2001-04-12 4:57 ` Alexandre Oliva
1 sibling, 1 reply; 223+ messages in thread
From: Franz Sirl @ 2001-04-12 3:56 UTC (permalink / raw)
To: Gabriel Dos Reis
Cc: Alexandre Oliva, Neil Booth, Richard Henderson, gcc-patches
At 12:14 12.04.2001, Gabriel Dos Reis wrote:
>Alexandre Oliva <aoliva@redhat.com> writes:
>
>| With DJ's patch, the top-level CFLAGS probably stops overriding
>| STAGE1_CFLAGS, so you may get an optimized stage1.
>| If the bootstrap compiler mis-optimizes the code, stage1 may
>| simply crash. However, if you're lucky (and you seem to be!), it'll
>| just disable a few optimizations, so stage2 will work correctly, but
>| it will generate different code, because it won't miss the
>| optimizations. If this theory is correct, bootstrap4 should succeed.
>
>I don't know if the theory is incorrect but bootstrap4 doesn't
>succeed :-(
>
>Since the bootstrapping compiler is gcc-3.0, the problem is serious.
I suspect the gcc-3.0 you use for bootstrapping is broken at least for the
-O0 case.
>Note that I'm now able to bootstrap mainline WITHOUT DJ's patch.
>I can't remember what problem it is supposed to solve.
The original patch to pass down CFLAGS to the stage1_build is simply wrong,
so it was reverted as a first measure. It may even be that the original
patch caused the breakage of your current bootstrap compiler...
Overall I'm quite annoyed that nobody fixes up the build and test machinery
for 3.0, currently I get differing testsuite results (for the complete
compiler with the default languages enabled) for the following reasons:
- building on glibc-2.1 or glibc-2.2 (but libstdc++ test results
are not reported
for 3.0, so nobody notices)
- building with or without --enable-shared (objc is not libgcc_s
aware yet)
- building with or without an installed gcc-3.0 with matching
prefixes (again
objc)
Additionally libstdc++ installs a $prefix/lib/libstdc++.la which includes
the libstdc++ *build* directories in dependency_libs, with the result that
libtool aware applications like KDE2 use them for their -L flags during
linking...
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 3:56 ` Franz Sirl
@ 2001-04-12 4:57 ` Alexandre Oliva
2001-04-16 13:36 ` Gary V. Vaughan
0 siblings, 1 reply; 223+ messages in thread
From: Alexandre Oliva @ 2001-04-12 4:57 UTC (permalink / raw)
To: Franz Sirl
Cc: Gabriel Dos Reis, Neil Booth, Richard Henderson, gcc-patches, libtool
On Apr 12, 2001, Franz Sirl <Franz.Sirl-kernel@lauterbach.com> wrote:
> Additionally libstdc++ installs a $prefix/lib/libstdc++.la which
> includes the libstdc++ *build* directories in dependency_libs, with
> the result that libtool aware applications like KDE2 use them for
> their -L flags during linking...
Uh oh. This is bad.
The problem is that libtool has no way to tell which directories
specified with -L are part of ``the current build'', so it assumes any
dependencies of the library being built might be in one of those
directories after the library is installed, so the directories must be
added to the search path of libtool.
I see two ways to avoid this:
- not use any -L flags when creating libtool libraries; instead,
specify library names explicitly. This does The Right Thing (or at
least is supposed to) if the dependence libraries are libtool
libraries (which, unfortunately, is not the case) or static
libraries. The shared libgcc would be a problem in this case, and
more so before the -L flag is taken implicitly from the flags the
compiler driver passes down to the linker.
- create some way to tell libtool ``look, this -L flag is to be used
only when building this particular library, it's not needed for any of
its dependencies after the library is installed.'' This might be
accomplished by specifying the root of the current build tree. So,
libstdc++-v3 would be configured such that it would pass to libtool
something like, say -L-$(top_builddir)/$(MULTILIBTOP)/.., and libtool
would compare the prefix of the canonicalized full pathname
corresponding to $(MULTILIBTOP)/.. with that of each directory passed
in -L, and remove it from dependency_libs in the installable .la file.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 2:58 ` Franz Sirl
@ 2001-04-12 5:32 ` Gabriel Dos Reis
2001-04-12 15:08 ` Richard Henderson
0 siblings, 1 reply; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-04-12 5:32 UTC (permalink / raw)
To: Franz Sirl; +Cc: Neil Booth, Richard Henderson, Benjamin Kosnik, gcc-patches
Franz Sirl <Franz.Sirl-kernel@lauterbach.com> writes:
| >2001-03-28 DJ Delorie <dj@redhat.com>
| >
| > * Makefile.in (stage1_build): Revert CFLAGS patch.
|
| If you have problems with this reversal, try the attached patch from my 3.0
| queue which makes STAGE1_CFLAGS overrideable from the toplevel. Then a
|
| make bootstrap STAGE1_CFLAGS="-O2 -g"
|
| should give you the same setup as before the patch reversal. You can also
| play with with different STAGE1_CFLAGS a bit to see when it breaks, maybe
| we are chasing a -O0 miscompilation caused by some uninitialized
| memory/flag/etc. in the -O0 case.
Your diagnostics match reality.
Bootstrapping compiler is
gcc version 3.0 20010412 (prerelease)
With you patch, I have:
make bootstrap STAGE1_CFLAGS="-O0 -g" # failure
make bootstrap STAGE1_CFLAGS="-O1 -g" # failure
make bootstrap STAGE1_CFLAGS="-O2 -g" # success
Source is mainline freshly updated.
Now that we have more data, I think the problem could be reproduced by
other people.
Thanks,
-- Gaby
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 3:34 ` Alexandre Oliva
@ 2001-04-12 5:37 ` Franz Sirl
2001-04-12 5:44 ` Franz Sirl
2001-04-12 5:53 ` Alexandre Oliva
0 siblings, 2 replies; 223+ messages in thread
From: Franz Sirl @ 2001-04-12 5:37 UTC (permalink / raw)
To: Alexandre Oliva
Cc: Gabriel Dos Reis, Neil Booth, Richard Henderson, gcc-patches,
Zack Weinberg
[-- Attachment #1: Type: text/plain, Size: 1401 bytes --]
At 12:32 12.04.2001, Alexandre Oliva wrote:
>On Apr 12, 2001, Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr> wrote:
> > Note that I'm now able to bootstrap mainline WITHOUT DJ's patch.
> > I can't remember what problem it is supposed to solve.
>
>It's supposed to let you override CFLAGS (for stage1 only), just like
>you did.
>
>The problem is that CFLAGS is passed down from the top-level Makefile,
>overriding CFLAGS=$(STAGE1_CFLAGS) in gcc/Makefile. If the stage1
>$(MAKE) doesn't pass CFLAGS down, CFLAGS=$(STAGE1_CFLAGS) will prevail
>in the sub-make. If it does, then the flag incoming from the
>top-level takes over.
Ah, yes. I forgot the STAGE1_CFLAGS introduced by Zack differs from the
setup I used for a long time on the gcc-2_95-branch.
The attached patch partly reverts Zacks 2000-10-27 patch in respect to the
default CFLAGS and BOOT_CFLAGS setup, however it still preserves the only
functionality Zack wanted to introduce (and is very useful at times IMHO),
namely to pass specific compiler flags to stage1.
Zack, any opinion on that?
Franz.
ChangeLog:
* Makefile.in (STAGE1_CFLAGS): Pass down.
gcc/ChangeLog:
* Makefile.in (CFLAGS, BOOT_CFLAGS): Partly revert 2000-10-27 patch.
(stage1_build): Instead pass down STAGE1_CFLAGS here. Pass down
MAKEINFO and MAKEINFOFLAGS too.
(stage4_build): Correctly order -B flags.
[-- Attachment #2: stage1_cflags-2.patch --]
[-- Type: text/x-diff, Size: 2717 bytes --]
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/Makefile.in,v
retrieving revision 1.80
diff -u -p -r1.80 Makefile.in
--- Makefile.in 2001/04/02 01:26:14 1.80
+++ Makefile.in 2001/04/12 12:20:11
@@ -475,6 +475,7 @@ EXTRA_GCC_FLAGS = \
"`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
"`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
"`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
+ "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
"`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
Index: gcc/Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/Makefile.in,v
retrieving revision 1.643
diff -u -p -r1.643 Makefile.in
--- gcc/Makefile.in 2001/04/11 18:36:49 1.643
+++ gcc/Makefile.in 2001/04/12 12:20:17
@@ -64,12 +64,12 @@ BOOT_LANGUAGES = c @all_boot_languages@
# compilations.
# XCFLAGS is used for most compilations but not when using the GCC just built.
# TCFLAGS is used for compilations with the GCC just built.
-# STAGE1_CFLAGS is set by configure on some targets.
+# STAGE1_CFLAGS is set by configure on some targets or passed from toplevel.
XCFLAGS =
TCFLAGS =
-BOOT_CFLAGS = -g -O2
+CFLAGS = -g
STAGE1_CFLAGS = -g @stage1_cflags@
-CFLAGS = $(STAGE1_CFLAGS)
+BOOT_CFLAGS = -g $(CFLAGS)
# The warning flags are separate from BOOT_CFLAGS because people tend to
# override optimization flags and we'd like them to still have warnings
@@ -2942,9 +2942,13 @@ STAGE2_FLAGS_TO_PASS = \
# Only build the C compiler for stage1, because that is the only one that
# we can guarantee will build with the native compiler, and also it is the
-# only thing useful for building stage2.
+# only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS),
+# MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
+# overrideable (for a bootstrap build stage1 also builds gcc.info).
stage1_build:
- $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)"
+ $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)" \
+ CFLAGS="$(STAGE1_CFLAGS)" MAKEINFO="$(MAKEINFO)" \
+ MAKEINFOFLAGS="$(MAKEINFOFLAGS)"
touch stage1_build
echo stage1_build > stage_last
@@ -2979,7 +2983,7 @@ stage3_copy: stage3_build
echo stage4_build > stage_last
stage4_build: stage3_copy
- $(MAKE) CC="stage3/xgcc$(exeext) -B$(build_tooldir)/bin/ -Bstage3/" \
+ $(MAKE) CC="stage3/xgcc$(exeext) -Bstage3/ -B$(build_tooldir)/bin/" \
STAGE_PREFIX=stage3/ \
$(STAGE2_FLAGS_TO_PASS)
touch stage4_build
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 5:37 ` Franz Sirl
@ 2001-04-12 5:44 ` Franz Sirl
2001-04-12 6:32 ` Alexandre Oliva
2001-04-12 5:53 ` Alexandre Oliva
1 sibling, 1 reply; 223+ messages in thread
From: Franz Sirl @ 2001-04-12 5:44 UTC (permalink / raw)
To: Alexandre Oliva
Cc: Gabriel Dos Reis, Neil Booth, Richard Henderson, gcc-patches,
Zack Weinberg
[-- Attachment #1: Type: text/plain, Size: 443 bytes --]
At 14:37 12.04.2001, Alexandre Oliva wrote:
ChangeLog:
> * Makefile.in (STAGE1_CFLAGS): Pass down.
>
>gcc/ChangeLog:
> * Makefile.in (CFLAGS, BOOT_CFLAGS): Partly revert 2000-10-27 patch.
> (stage1_build): Instead pass down STAGE1_CFLAGS here. Pass down
> MAKEINFO and MAKEINFOFLAGS too.
> (stage4_build): Correctly order -B flags.
Sorry, attached the wrong patch :-(. This is the correct one.
Franz.
[-- Attachment #2: stage1_cflags-3.patch --]
[-- Type: text/x-diff, Size: 2718 bytes --]
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/Makefile.in,v
retrieving revision 1.80
diff -u -p -r1.80 Makefile.in
--- Makefile.in 2001/04/02 01:26:14 1.80
+++ Makefile.in 2001/04/12 12:40:19
@@ -475,6 +475,7 @@ EXTRA_GCC_FLAGS = \
"`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
"`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
"`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
+ "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
"`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
Index: gcc/Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/Makefile.in,v
retrieving revision 1.643
diff -u -p -r1.643 Makefile.in
--- gcc/Makefile.in 2001/04/11 18:36:49 1.643
+++ gcc/Makefile.in 2001/04/12 12:40:34
@@ -64,12 +64,12 @@ BOOT_LANGUAGES = c @all_boot_languages@
# compilations.
# XCFLAGS is used for most compilations but not when using the GCC just built.
# TCFLAGS is used for compilations with the GCC just built.
-# STAGE1_CFLAGS is set by configure on some targets.
+# STAGE1_CFLAGS is set by configure on some targets or passed from toplevel.
XCFLAGS =
TCFLAGS =
-BOOT_CFLAGS = -g -O2
+CFLAGS = -g
STAGE1_CFLAGS = -g @stage1_cflags@
-CFLAGS = $(STAGE1_CFLAGS)
+BOOT_CFLAGS = -O2 $(CFLAGS)
# The warning flags are separate from BOOT_CFLAGS because people tend to
# override optimization flags and we'd like them to still have warnings
@@ -2942,9 +2942,13 @@ STAGE2_FLAGS_TO_PASS = \
# Only build the C compiler for stage1, because that is the only one that
# we can guarantee will build with the native compiler, and also it is the
-# only thing useful for building stage2.
+# only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS),
+# MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
+# overrideable (for a bootstrap build stage1 also builds gcc.info).
stage1_build:
- $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)"
+ $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)" \
+ CFLAGS="$(STAGE1_CFLAGS)" MAKEINFO="$(MAKEINFO)" \
+ MAKEINFOFLAGS="$(MAKEINFOFLAGS)"
touch stage1_build
echo stage1_build > stage_last
@@ -2979,7 +2983,7 @@ stage3_copy: stage3_build
echo stage4_build > stage_last
stage4_build: stage3_copy
- $(MAKE) CC="stage3/xgcc$(exeext) -B$(build_tooldir)/bin/ -Bstage3/" \
+ $(MAKE) CC="stage3/xgcc$(exeext) -Bstage3/ -B$(build_tooldir)/bin/" \
STAGE_PREFIX=stage3/ \
$(STAGE2_FLAGS_TO_PASS)
touch stage4_build
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 5:37 ` Franz Sirl
2001-04-12 5:44 ` Franz Sirl
@ 2001-04-12 5:53 ` Alexandre Oliva
2001-04-12 6:03 ` Franz Sirl
1 sibling, 1 reply; 223+ messages in thread
From: Alexandre Oliva @ 2001-04-12 5:53 UTC (permalink / raw)
To: Franz Sirl
Cc: Gabriel Dos Reis, Neil Booth, Richard Henderson, gcc-patches,
Zack Weinberg
On Apr 12, 2001, Franz Sirl <Franz.Sirl-kernel@lauterbach.com> wrote:
> -BOOT_CFLAGS = -g -O2
> +CFLAGS = -g
> STAGE1_CFLAGS = -g @stage1_cflags@
> -CFLAGS = $(STAGE1_CFLAGS)
> +BOOT_CFLAGS = -g $(CFLAGS)
Here's something I don't understand. Why is BOOT_CFLAGS forced to
start with `-g'? IMO, it should be exactly $(CFLAGS). Thinking of
the perspective of someone who ones CFLAGS, as passed to make, to
affect the compilation of the final executables, I'd expect CFLAGS to
be used to build stage3 of the bootstrap (and stage2, so that compare
passes). So, I'd just let CFLAGS be AC_SUBSTed, and default
BOOT_CFLAGS to $(CFLAGS). It is STAGE1_CFLAGS that should be handled
differently.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 5:53 ` Alexandre Oliva
@ 2001-04-12 6:03 ` Franz Sirl
2001-04-12 6:26 ` Alexandre Oliva
0 siblings, 1 reply; 223+ messages in thread
From: Franz Sirl @ 2001-04-12 6:03 UTC (permalink / raw)
To: Alexandre Oliva
Cc: Gabriel Dos Reis, Neil Booth, Richard Henderson, gcc-patches,
Zack Weinberg
At 14:53 12.04.2001, Alexandre Oliva wrote:
>On Apr 12, 2001, Franz Sirl <Franz.Sirl-kernel@lauterbach.com> wrote:
>
> > -BOOT_CFLAGS = -g -O2
> > +CFLAGS = -g
> > STAGE1_CFLAGS = -g @stage1_cflags@
> > -CFLAGS = $(STAGE1_CFLAGS)
> > +BOOT_CFLAGS = -g $(CFLAGS)
>
>Here's something I don't understand. Why is BOOT_CFLAGS forced to
>start with `-g'? IMO, it should be exactly $(CFLAGS). Thinking of
>the perspective of someone who ones CFLAGS, as passed to make, to
>affect the compilation of the final executables, I'd expect CFLAGS to
>be used to build stage3 of the bootstrap (and stage2, so that compare
>passes). So, I'd just let CFLAGS be AC_SUBSTed, and default
>BOOT_CFLAGS to $(CFLAGS). It is STAGE1_CFLAGS that should be handled
>differently.
Sorry, sent the wrong patch, see my followup post. BOOT_CFLAGS = -O2
$(CFLAGS) is actually the right thing to do.
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 6:03 ` Franz Sirl
@ 2001-04-12 6:26 ` Alexandre Oliva
2001-04-12 6:37 ` Franz Sirl
0 siblings, 1 reply; 223+ messages in thread
From: Alexandre Oliva @ 2001-04-12 6:26 UTC (permalink / raw)
To: Franz Sirl
Cc: Gabriel Dos Reis, Neil Booth, Richard Henderson, gcc-patches,
Zack Weinberg
On Apr 12, 2001, Franz Sirl <Franz.Sirl-kernel@lauterbach.com> wrote:
> Sorry, sent the wrong patch, see my followup post. BOOT_CFLAGS = -O2
> $(CFLAGS) is actually the right thing to do.
I'm not sure I agree with that.
Suppose I want to bootstrap a complete tool-chain without
optimization. Shouldn't `make CFLAGS=-g bootstrap' accomplish that?
With your patch, it wouldn't: the stage3 GCC would still be compiled
with optimization.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 5:44 ` Franz Sirl
@ 2001-04-12 6:32 ` Alexandre Oliva
2001-04-12 6:44 ` Franz Sirl
0 siblings, 1 reply; 223+ messages in thread
From: Alexandre Oliva @ 2001-04-12 6:32 UTC (permalink / raw)
To: Franz Sirl
Cc: Gabriel Dos Reis, Neil Booth, Richard Henderson, gcc-patches,
Zack Weinberg
On Apr 12, 2001, Franz Sirl <Franz.Sirl-kernel@lauterbach.com> wrote:
> Sorry, attached the wrong patch :-(. This is the correct one.
The patch is Ok, please install it. We can settle down the issue of
CFLAGS and BOOT_CFLAGS later. Let's get the bootstrap problem fixed
first.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 6:26 ` Alexandre Oliva
@ 2001-04-12 6:37 ` Franz Sirl
2001-04-12 7:31 ` Alexandre Oliva
0 siblings, 1 reply; 223+ messages in thread
From: Franz Sirl @ 2001-04-12 6:37 UTC (permalink / raw)
To: Alexandre Oliva
Cc: Gabriel Dos Reis, Neil Booth, Richard Henderson, gcc-patches,
Zack Weinberg
At 15:25 12.04.2001, Alexandre Oliva wrote:
>On Apr 12, 2001, Franz Sirl <Franz.Sirl-kernel@lauterbach.com> wrote:
>
> > Sorry, sent the wrong patch, see my followup post. BOOT_CFLAGS = -O2
> > $(CFLAGS) is actually the right thing to do.
>
>I'm not sure I agree with that.
>
>Suppose I want to bootstrap a complete tool-chain without
>optimization. Shouldn't `make CFLAGS=-g bootstrap' accomplish that?
>With your patch, it wouldn't: the stage3 GCC would still be compiled
>with optimization.
Yes, and what's the problem? You didn't tell to override optimizations, you
just told to generate debug information. For overriding optimizations you
pass CFLAGS="-g -O0" as with any other package that defaults to certain
optimizations that are not handled directly via CFLAGS.
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 6:32 ` Alexandre Oliva
@ 2001-04-12 6:44 ` Franz Sirl
0 siblings, 0 replies; 223+ messages in thread
From: Franz Sirl @ 2001-04-12 6:44 UTC (permalink / raw)
To: Alexandre Oliva
Cc: Gabriel Dos Reis, Neil Booth, Richard Henderson, gcc-patches,
Zack Weinberg
At 15:28 12.04.2001, Alexandre Oliva wrote:
>On Apr 12, 2001, Franz Sirl <Franz.Sirl-kernel@lauterbach.com> wrote:
>
> > Sorry, attached the wrong patch :-(. This is the correct one.
>
>The patch is Ok, please install it. We can settle down the issue of
>CFLAGS and BOOT_CFLAGS later. Let's get the bootstrap problem fixed
>first.
I won't be able to commit for at least 4 hours, as I use a separate ssh key
for GCC that I only keep on my home machine for security reasons.
Feel free to commit it for me.
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 6:37 ` Franz Sirl
@ 2001-04-12 7:31 ` Alexandre Oliva
2001-04-12 9:06 ` Franz Sirl
0 siblings, 1 reply; 223+ messages in thread
From: Alexandre Oliva @ 2001-04-12 7:31 UTC (permalink / raw)
To: Franz Sirl
Cc: Gabriel Dos Reis, Neil Booth, Richard Henderson, gcc-patches,
Zack Weinberg
On Apr 12, 2001, Franz Sirl <Franz.Sirl-kernel@lauterbach.com> wrote:
> Yes, and what's the problem? You didn't tell to override
> optimizations, you just told to generate debug information. For
> overriding optimizations you pass CFLAGS="-g -O0" as with any other
> package that defaults to certain optimizations that are not handled
> directly via CFLAGS.
http://www.gnu.org/prep/standards_52.html:
If there are C compiler options that must be used for proper
compilation of certain files, do not include them in
CFLAGS. Users expect to be able to specify CFLAGS freely
themselves. Instead, arrange to pass the necessary options to
the C compiler independently of CFLAGS
[...]
Do include the `-g' option in CFLAGS, because that is not
required for proper compilation. You can consider it a default
that is only recommended. If the package is set up so that it
is compiled with GCC by default, then you might as well
include `-O' in the default value of CFLAGS as well.
Put CFLAGS last in the compilation command, after other
variables containing compiler options, so the user can use
CFLAGS to override the others.
-O2 is certainly not necessary for proper compilation. It shouldn't
be used in addition to CFLAGS; CFLAGS should override it.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 3:23 ` Alexandre Oliva
@ 2001-04-12 7:39 ` DJ Delorie
0 siblings, 0 replies; 223+ messages in thread
From: DJ Delorie @ 2001-04-12 7:39 UTC (permalink / raw)
To: aoliva; +Cc: Franz.Sirl-kernel, gcc-patches
Geez, put off reading the list just once and the whole world falls
apart ;-)
> On Apr 12, 2001, Franz Sirl <Franz.Sirl-kernel@lauterbach.com> wrote:
> > On bootstrap4, I think he may get different problems with that, cause
> > AFAICS, stage4_build passes the -B flags in the wrong order...
>
> Yes, indeed. I suppose that's a bug, though. DJ?
Yup. Patch away.
To summarize the other patch pair: At first, there was no way to
override CFLAGS for stage1 from the top. I approved a patch to fix
that, but (1) it used an inappropriate value, and (2) configure was
supposed to provide the right CFLAGS for stage1 anyway. So, I
reverted it. I think the right patch is to allow STAGE1_CFLAGS to be
overridden from the top.
And it is inappropriate for the Makefile to provide a -g or -O option
that cannot be removed (not just overridden) by the user.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 7:31 ` Alexandre Oliva
@ 2001-04-12 9:06 ` Franz Sirl
0 siblings, 0 replies; 223+ messages in thread
From: Franz Sirl @ 2001-04-12 9:06 UTC (permalink / raw)
To: Alexandre Oliva
Cc: Gabriel Dos Reis, Neil Booth, Richard Henderson, gcc-patches,
Zack Weinberg
At 16:30 12.04.2001, Alexandre Oliva wrote:
>On Apr 12, 2001, Franz Sirl <Franz.Sirl-kernel@lauterbach.com> wrote:
>
> > Yes, and what's the problem? You didn't tell to override
> > optimizations, you just told to generate debug information. For
> > overriding optimizations you pass CFLAGS="-g -O0" as with any other
> > package that defaults to certain optimizations that are not handled
> > directly via CFLAGS.
>
> http://www.gnu.org/prep/standards_52.html:
>
> If there are C compiler options that must be used for proper
> compilation of certain files, do not include them in
> CFLAGS. Users expect to be able to specify CFLAGS freely
> themselves. Instead, arrange to pass the necessary options to
> the C compiler independently of CFLAGS
>
> [...]
>
> Do include the `-g' option in CFLAGS, because that is not
> required for proper compilation. You can consider it a default
> that is only recommended. If the package is set up so that it
> is compiled with GCC by default, then you might as well
> include `-O' in the default value of CFLAGS as well.
>
> Put CFLAGS last in the compilation command, after other
> variables containing compiler options, so the user can use
> CFLAGS to override the others.
>
>-O2 is certainly not necessary for proper compilation. It shouldn't
>be used in addition to CFLAGS; CFLAGS should override it.
Well, gcc is very special here and it's actually a good thing that way
IMHO. I would rather have BOOT_CFLAGS = -O2 -g without _any_ CFLAGS
involved and always requiring direct override via passing BOOT_CFLAGS from
toplevel.
CFLAGS in the gcc case simply is much too overloaded, for a big overhaul I
would prefer to rip out CFLAGS from *anything* that is not related to the
host environment (eg. no uses of pure CFLAGS in gcc/Makefile.in at all...).
All other uses of CFLAGS are just convenient shortcuts for gcc developers
IMHO, and should _only_ be controlled by things like HOST_CFLAGS,
BOOT_CFLAGS, STAGE1_CFLAGS, TARGET_CFLAGS, TARGET_CXXFLAGS, etc.
Say you are on sparc-solaris and want to bootstrap a native compiler with
the system compiler. A "make bootstrap CFLAGS=<system-compilerflags>" or
"make bootstrap CFLAGS=<gcc-compilerflags>" is rather senseless then, as
both won't work correctly without passing accompanying variables.
Simply try one thing, document how to sensibly use CFLAGS with gcc,
covering all cases like systemcompiler!=gcc, cross vs. native...
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
[not found] ` <5.1.0.12.2.20010412170823.026d5540@mail.lauterbach.co!m>
@ 2001-04-12 9:39 ` Gabriel Dos Reis
2001-04-12 12:27 ` Alexandre Oliva
0 siblings, 1 reply; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-04-12 9:39 UTC (permalink / raw)
To: Franz Sirl
Cc: Alexandre Oliva, Neil Booth, Richard Henderson, gcc-patches,
Zack Weinberg
Franz Sirl <Franz.Sirl-kernel@lauterbach.com> writes:
[...]
| Say you are on sparc-solaris and want to bootstrap a native compiler with
| the system compiler. A "make bootstrap CFLAGS=<system-compilerflags>" or
| "make bootstrap CFLAGS=<gcc-compilerflags>" is rather senseless then, as
| both won't work correctly without passing accompanying variables.
I second you here. And I know of couple of people around (well,
well-known GCC developpers) who would like to be able to use native
compilers to bootstrap GCC without jumping through hoops.
-- Gaby
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Hit)
2001-04-12 3:02 ` Gabriel Dos Reis
@ 2001-04-12 11:03 ` Richard Henderson
2001-04-12 11:21 ` Gabriel Dos Reis
0 siblings, 1 reply; 223+ messages in thread
From: Richard Henderson @ 2001-04-12 11:03 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: Neil Booth, gcc-patches
On Thu, Apr 12, 2001 at 12:03:05PM +0200, Gabriel Dos Reis wrote:
> Success! For today source without DJ's patch.
>
> Now, all theories are welcome :-)
Broken bootstrap compiler. Which, since you're using
gcc 3.0, means we have a bug to fix.
r~
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Hit)
2001-04-12 11:03 ` Richard Henderson
@ 2001-04-12 11:21 ` Gabriel Dos Reis
0 siblings, 0 replies; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-04-12 11:21 UTC (permalink / raw)
To: Richard Henderson; +Cc: Gabriel Dos Reis, Neil Booth, gcc-patches
Richard Henderson <rth@redhat.com> writes:
| On Thu, Apr 12, 2001 at 12:03:05PM +0200, Gabriel Dos Reis wrote:
| > Success! For today source without DJ's patch.
| >
| > Now, all theories are welcome :-)
|
| Broken bootstrap compiler. Which, since you're using
| gcc 3.0, means we have a bug to fix.
Since this seems to be a back-end issue, that is over my head (I would
love to help but my knowledge of how the back-end works is
inexistent).
Scenari as how to reproduce the bug have been described elsewhere.
Bootstrap is successful with -O2 but failed with anything lower.
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 9:39 ` Gabriel Dos Reis
@ 2001-04-12 12:27 ` Alexandre Oliva
2001-04-12 13:49 ` Franz Sirl
0 siblings, 1 reply; 223+ messages in thread
From: Alexandre Oliva @ 2001-04-12 12:27 UTC (permalink / raw)
To: Gabriel Dos Reis
Cc: Franz Sirl, Neil Booth, Richard Henderson, gcc-patches, Zack Weinberg
On Apr 12, 2001, Gabriel Dos Reis <gdr@codesourcery.com> wrote:
> Franz Sirl <Franz.Sirl-kernel@lauterbach.com> writes:
> [...]
> | Say you are on sparc-solaris and want to bootstrap a native compiler with
> | the system compiler. A "make bootstrap CFLAGS=<system-compilerflags>" or
> | "make bootstrap CFLAGS=<gcc-compilerflags>" is rather senseless then, as
> | both won't work correctly without passing accompanying variables.
> I second you here. And I know of couple of people around (well,
> well-known GCC developpers) who would like to be able to use native
> compilers to bootstrap GCC without jumping through hoops.
I don't understand this point. CFLAGS is *not* to influence stage1.
It's not influence the final build of the compiler, i.e., stage3 (and
stage2 too, so that they compare equal).
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 12:27 ` Alexandre Oliva
@ 2001-04-12 13:49 ` Franz Sirl
2001-04-12 13:56 ` Alexandre Oliva
0 siblings, 1 reply; 223+ messages in thread
From: Franz Sirl @ 2001-04-12 13:49 UTC (permalink / raw)
To: Alexandre Oliva
Cc: Gabriel Dos Reis, Neil Booth, Richard Henderson, gcc-patches,
Zack Weinberg
At 21:27 12.04.2001, Alexandre Oliva wrote:
>On Apr 12, 2001, Gabriel Dos Reis <gdr@codesourcery.com> wrote:
>
> > Franz Sirl <Franz.Sirl-kernel@lauterbach.com> writes:
> > [...]
>
> > | Say you are on sparc-solaris and want to bootstrap a native compiler
> with
> > | the system compiler. A "make bootstrap CFLAGS=<system-compilerflags>" or
> > | "make bootstrap CFLAGS=<gcc-compilerflags>" is rather senseless then, as
> > | both won't work correctly without passing accompanying variables.
>
> > I second you here. And I know of couple of people around (well,
> > well-known GCC developpers) who would like to be able to use native
> > compilers to bootstrap GCC without jumping through hoops.
>
>I don't understand this point. CFLAGS is *not* to influence stage1.
>It's not influence the final build of the compiler, i.e., stage3 (and
>stage2 too, so that they compare equal).
Looking again it seems you are right if I change my patch to "BOOT_CFLAGS =
-g -O2" without any mention of CFLAGS. But then the commentary about CFLAGS
above is wrong, I'll improve the commentary too when I checkin the patch
with that modification.
So it seems we just misunderstood each other, I thought you _wanted_ CFLAGS
to override things like BOOT_CFLAGS for a bootstrap compile...
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 13:49 ` Franz Sirl
@ 2001-04-12 13:56 ` Alexandre Oliva
2001-04-12 14:17 ` Franz Sirl
0 siblings, 1 reply; 223+ messages in thread
From: Alexandre Oliva @ 2001-04-12 13:56 UTC (permalink / raw)
To: Franz Sirl
Cc: Gabriel Dos Reis, Neil Booth, Richard Henderson, gcc-patches,
Zack Weinberg
On Apr 12, 2001, Franz Sirl <Franz.Sirl-kernel@lauterbach.com> wrote:
> So it seems we just misunderstood each other, I thought you _wanted_
> CFLAGS to override things like BOOT_CFLAGS for a bootstrap compile...
Err... I do want BOOT_CFLAGS = $(CFLAGS) by default. And I want
CFLAGS = -g -O2 by default. And STAGE1_CFLAGS = -g by default.
It's BOOT_CFLAGS that should be affected by the incoming CFLAGS, not
STAGE1_CFLAGS. IMHO :-)
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 13:56 ` Alexandre Oliva
@ 2001-04-12 14:17 ` Franz Sirl
2001-04-12 14:31 ` Alexandre Oliva
0 siblings, 1 reply; 223+ messages in thread
From: Franz Sirl @ 2001-04-12 14:17 UTC (permalink / raw)
To: Alexandre Oliva
Cc: Gabriel Dos Reis, Neil Booth, Richard Henderson, gcc-patches,
Zack Weinberg
At 22:56 12.04.2001, Alexandre Oliva wrote:
>On Apr 12, 2001, Franz Sirl <Franz.Sirl-kernel@lauterbach.com> wrote:
>
> > So it seems we just misunderstood each other, I thought you _wanted_
> > CFLAGS to override things like BOOT_CFLAGS for a bootstrap compile...
>
>Err... I do want BOOT_CFLAGS = $(CFLAGS) by default. And I want
>CFLAGS = -g -O2 by default. And STAGE1_CFLAGS = -g by default.
>It's BOOT_CFLAGS that should be affected by the incoming CFLAGS, not
>STAGE1_CFLAGS. IMHO :-)
Uhm, the default CFLAGS is never used with my patch during a bootstrap
compile and for a cross compile it doesn't make sense to put a gcc specific
opt flag in there.
STAGE1_CFLAGS has no relation to CFLAGS at all with my patch, so what's the
point?
If we default BOOT_CFLAGS to CFLAGS we have exactly the situation Gaby and
I don't want, namely that a "make bootstrap CFLAGS=<system-compilerflags>"
in the toplevel will break with a non-gcc system compiler. If we want that,
we need to break the connection between CFLAGS and CFLAGS_FOR_TARGET in the
toplevel Makefile.in.
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 14:17 ` Franz Sirl
@ 2001-04-12 14:31 ` Alexandre Oliva
0 siblings, 0 replies; 223+ messages in thread
From: Alexandre Oliva @ 2001-04-12 14:31 UTC (permalink / raw)
To: Franz Sirl
Cc: Gabriel Dos Reis, Neil Booth, Richard Henderson, gcc-patches,
Zack Weinberg
On Apr 12, 2001, Franz Sirl <Franz.Sirl-kernel@lauterbach.com> wrote:
> If we default BOOT_CFLAGS to CFLAGS we have exactly the situation Gaby
> and I don't want, namely that a "make bootstrap
> CFLAGS=<system-compilerflags>" in the toplevel will break with a
> non-gcc system compiler.
Why will it break? BOOT_CFLAGS is only used for stage2 and 3.
Oh! I see! The problem is that, if you use a non-GCC bootstrap
compiler and pass CFLAGS to this compiler, that GCC wouldn't
understand, bootstrap would fail to build stage2.
Point taken. Your patch is perfectly correct. The approach I
proposed would be desirable, from a standards perspective, but it's
unworkable for bootstrapping.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: gcc.c-torture/execute/20010114-2.c
[not found] ` <5.1.0.12.2.20010412232819.0475ebc0@mail.lauterbach.com>
@ 2001-04-12 14:44 ` Geoff Keating
2001-04-12 14:51 ` gcc.c-torture/execute/20010114-2.c Franz Sirl
0 siblings, 1 reply; 223+ messages in thread
From: Geoff Keating @ 2001-04-12 14:44 UTC (permalink / raw)
To: Franz Sirl; +Cc: gcc-patches
Franz Sirl <Franz.Sirl-kernel@lauterbach.com> writes:
> At 21:03 09.04.2001, Joern Rennecke wrote:
> > > > I think the gcc.c-torture/execute/20010114-2.c test is invalid,
> > because it
> > > > will fail if you have excess precision in intermediate calculations, or
> > > > if you just have a float implementation with more than the minimal
> > > > precision required.
> > >
> > > I'm not sure. On PPC it gets calculated with extra precision as well
> > and it
> > > works as only exactly representable numbberss are used, but I have no
> > problem
> > > restricting the test to some platforms.
> >
> >The rintf founction relies on rounding error to do its work. When more
> >than 23 bit precision comes into play, the argument is returned unchanged.
>
> Hmm, since I don't know if the test will still trigger the bug on PPC with
> -ffloat-store, OK to move the test to the ieee dir and copy it to gcc.dg
> restricted to PPC?
Does the ieee directory use -ffloat-store on ppc? It shouldn't.
--
- Geoffrey Keating <geoffk@geoffk.org>
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: gcc.c-torture/execute/20010114-2.c
2001-04-12 14:44 ` gcc.c-torture/execute/20010114-2.c Geoff Keating
@ 2001-04-12 14:51 ` Franz Sirl
0 siblings, 0 replies; 223+ messages in thread
From: Franz Sirl @ 2001-04-12 14:51 UTC (permalink / raw)
To: Geoff Keating; +Cc: gcc-patches
At 23:44 12.04.2001, Geoff Keating wrote:
>Franz Sirl <Franz.Sirl-kernel@lauterbach.com> writes:
>
> > At 21:03 09.04.2001, Joern Rennecke wrote:
> > > > > I think the gcc.c-torture/execute/20010114-2.c test is invalid,
> > > because it
> > > > > will fail if you have excess precision in intermediate
> calculations, or
> > > > > if you just have a float implementation with more than the minimal
> > > > > precision required.
> > > >
> > > > I'm not sure. On PPC it gets calculated with extra precision as well
> > > and it
> > > > works as only exactly representable numbberss are used, but I have no
> > > problem
> > > > restricting the test to some platforms.
> > >
> > >The rintf founction relies on rounding error to do its work. When more
> > >than 23 bit precision comes into play, the argument is returned unchanged.
> >
> > Hmm, since I don't know if the test will still trigger the bug on PPC with
> > -ffloat-store, OK to move the test to the ieee dir and copy it to gcc.dg
> > restricted to PPC?
>
>Does the ieee directory use -ffloat-store on ppc? It shouldn't.
It does. According to execute/ieee/ieee.exp -ffloat-store is appended
unconditionally.
Franz.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 5:32 ` Gabriel Dos Reis
@ 2001-04-12 15:08 ` Richard Henderson
0 siblings, 0 replies; 223+ messages in thread
From: Richard Henderson @ 2001-04-12 15:08 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: Franz Sirl, Neil Booth, Benjamin Kosnik, gcc-patches
On Thu, Apr 12, 2001 at 02:32:29PM +0200, Gabriel Dos Reis wrote:
> Now that we have more data, I think the problem could be reproduced by
> other people.
Yep. I've reproduced the failure now. Whee.
r~
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: libstdc++ execute tests
2001-04-10 22:02 ` Benjamin Kosnik
2001-04-11 2:55 ` Gabriel Dos Reis
@ 2001-04-12 19:50 ` Gabriel Dos Reis
1 sibling, 0 replies; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-04-12 19:50 UTC (permalink / raw)
To: Benjamin Kosnik, libstdc++; +Cc: Richard Henderson, gcc-patches
Benjamin Kosnik <bkoz@redhat.com> writes:
| I don't suppose you could also figure out why XFAIL is failing before I do,
| could you?
Now that I can bootstrap, I can look into that :-)
Fixed with this.
Thanks,
-- Gaby
2001-04-13 Gabriel Dos Reis <gdr@codesourcery.com>
* testsuite/23_containers/set_operators.cc: Just try to compile.
Mark as XFAIL.
* testsuite/23_containers/map_operators.cc: Same.
Index: testsuite/23_containers/map_operators.cc
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/testsuite/23_containers/map_operators.cc,v
retrieving revision 1.4
diff -p -r1.4 map_operators.cc
*** map_operators.cc 2001/03/30 08:14:15 1.4
--- map_operators.cc 2001/04/13 02:04:55
***************
*** 27,32 ****
--- 27,36 ----
// map and set
// libstdc++/86: map & set iterator comparisons are not type-safe
// XXX this is XFAIL for the time being, ie this should not compile
+
+ // Just try to compile
+ // { dg-do compile }
+
void test01()
{
bool test = true;
*************** void test01()
*** 39,46 ****
std::map<unsigned, int>::iterator itr(mapByIndex.begin());
// NB: notice, it's not mapByIndex!!
! test &= itr != mapByName.end(); // ERROR - * XFAIL *-*-*
! test &= itr == mapByName.end(); // ERROR - * XFAIL *-*-*
}
// http://gcc.gnu.org/ml/libstdc++/2000-11/msg00093.html
--- 43,50 ----
std::map<unsigned, int>::iterator itr(mapByIndex.begin());
// NB: notice, it's not mapByIndex!!
! test &= itr != mapByName.end(); // { dg-error ".*" "" { xfail *-*-* } }
! test &= itr == mapByName.end(); // { dg-error ".*" "" { xfail *-*-* } }
}
// http://gcc.gnu.org/ml/libstdc++/2000-11/msg00093.html
Index: testsuite/23_containers/set_operators.cc
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/testsuite/23_containers/set_operators.cc,v
retrieving revision 1.2
diff -p -r1.2 set_operators.cc
*** set_operators.cc 2001/03/30 08:14:15 1.2
--- set_operators.cc 2001/04/13 02:04:55
***************
*** 25,30 ****
--- 25,33 ----
// map and set
// libstdc++/86: map & set iterator comparisons are not type-safe
+
+ // { dg-do compile }
+
int main(void)
{
bool test = true;
*************** int main(void)
*** 35,42 ****
std::set<unsigned int>::iterator itr(setByIndex.begin());
// NB: it's not setByIndex!!
! test &= itr != setByName.end(); // ERROR - * XFAIL *-*-*
! test &= itr == setByName.end(); // ERROR - * XFAIL *-*-*
return 0;
}
--- 38,45 ----
std::set<unsigned int>::iterator itr(setByIndex.begin());
// NB: it's not setByIndex!!
! test &= itr != setByName.end(); // { dg-error ".*" "" { xfail *-*-* } }
! test &= itr == setByName.end(); // { dg-error ".*" "" { xfail *-*-* } }
return 0;
}
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
2001-04-12 4:57 ` Alexandre Oliva
@ 2001-04-16 13:36 ` Gary V. Vaughan
0 siblings, 0 replies; 223+ messages in thread
From: Gary V. Vaughan @ 2001-04-16 13:36 UTC (permalink / raw)
To: Alexandre Oliva, Franz Sirl
Cc: Gabriel Dos Reis, Neil Booth, Richard Henderson, gcc-patches, libtool
On Thursday 12 April 2001 12:56 pm, Alexandre Oliva wrote:
> - create some way to tell libtool ``look, this -L flag is to be used
> only when building this particular library, it's not needed for any of
> its dependencies after the library is installed.'' This might be
> accomplished by specifying the root of the current build tree. So,
> libstdc++-v3 would be configured such that it would pass to libtool
> something like, say -L-$(top_builddir)/$(MULTILIBTOP)/.., and libtool
> would compare the prefix of the canonicalized full pathname
> corresponding to $(MULTILIBTOP)/.. with that of each directory passed
> in -L, and remove it from dependency_libs in the installable .la file.
I like this idea. Would you add it to the libtool TODO file please,
Alexandre?
Cheers,
Gary.
--
___ _ ___ __ _ mailto: gvv@techie.com
/ __|__ _ _ ___ _| | / / | / /_ _ _ _ __ _| |_ __ _ ___ gary@gnu.org
| (_ / _` | '_|// / |/ /| |/ / _` | || / _` | ' \/ _` | _ \
\___\__,_|_|\_, /|___(_)___/\__,_|\_,_\__, |_||_\__,_|//_/
home page: /___/ /___/ gpg public key:
http://www.oranda.demon.co.uk http://www.oranda.demon.co.uk/key.asc
^ permalink raw reply [flat|nested] 223+ messages in thread
* PATCH: Table-ize builtins
[not found] ` <address>
@ 2001-05-25 13:08 ` Mark Mitchell
2001-05-25 13:51 ` Gabriel Dos Reis
` (4 subsequent siblings)
5 siblings, 0 replies; 223+ messages in thread
From: Mark Mitchell @ 2001-05-25 13:08 UTC (permalink / raw)
To: gcc-patches
I was trying to understand all of our builtins while producing the
patches for the V3 yesterday. I couldn't; creating the builtins was
strewn over multiple places and involved hundreds of lines of code
creating function types and then passing mysterious parameters to
builtin_function_2 and such.
I bit the bullet and made all this stuff table-driven. Other minor
benefits: there is now a one-to-one correspondence between builtin
functions and BUILT_IN_* enumerals; previously multiple functions
sometimes got mapped to the same enumeral, which confused me.
Boostrapped and tested on i686-pc-linux-gnu. Installed on the
mainline only; if I did it right this change will not change
the behavior of the compiler one iota.
(Totally parenthetically, what is the point of SMALL_STACK? It is
used only to make `alloca' not a builtin (even though
`__builtin_alloca' still is). I can imagine that using `alloca'
wouldn't make a lot of sense on a machine with a small stack, but how
is thunking to a library routine supposed to help? The manual
documents this macro, but not why you'd would want to define it.)
This will be my last patch for a week; I'm outta here.
May the source be with you,
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
2001-05-26 Mark Mitchell <mark@codesourcery.com>
* builtins.def: Encode additional information, such as names and
types, here.
* builtin-types.def: New file.
* builtins.c (built_in_names): Adjust use of DEF_BUILTIN.
(built_in_decls): Likewise. Don't explicitly initialize global
data to NULL.
(expand_builtin_mathfn): Handle float and long double variants of
math builtins.
(expand_builtin): Likewise.
* c-common.c (c_common_nodes_and_builtins): Make it table-driven.
(expand_tree_builtin): Handle long, long long, float, and long
double variants of math functions.
* c-common.h (c_tree_index): Remove some unused nodes.
(void_ftype): Remove.
(void_type_ptr): Likewise.
(int_ftype_int): Likewise.
(ptr_ftype_sizetype): Likewise.
* c-decl.c (init_decl_processing): Remove creation of DWARF
builtins.
* defaults.h (MD_INIT_BUILTINS): Provide default definition.
* tree.h (built_in_function): Adjust definition of DEF_BUILTIN.
* Makefile.in (c-common.o): Depend on builtin-types.def.
2001-05-26 Mark Mitchell <mark@codesourcery.com>
* decl.c (init_decl_processing): Tweak.
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.668
diff -c -p -r1.668 Makefile.in
*** Makefile.in 2001/05/23 22:58:40 1.668
--- Makefile.in 2001/05/25 19:48:57
*************** s-under: $(GCC_PASSES)
*** 1227,1233 ****
c-common.o : c-common.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(OBSTACK_H) \
$(C_COMMON_H) flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \
! $(EXPR_H) $(TM_P_H)
c-format.o : c-format.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
$(C_COMMON_H) flags.h toplev.h intl.h diagnostic.h
--- 1227,1233 ----
c-common.o : c-common.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(OBSTACK_H) \
$(C_COMMON_H) flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \
! $(EXPR_H) $(TM_P_H) builtin-types.def
c-format.o : c-format.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
$(C_COMMON_H) flags.h toplev.h intl.h diagnostic.h
Index: builtin-types.def
===================================================================
RCS file: builtin-types.def
diff -N builtin-types.def
*** /dev/null Tue May 5 13:32:27 1998
--- builtin-types.def Fri May 25 12:48:57 2001
***************
*** 0 ****
--- 1,177 ----
+ /* Copyright (C) 2001 Free Software Foundation, Inc.
+
+ This file is part of GNU CC.
+
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GNU CC; see the file COPYING. If not, write to
+ the Free Software Foundation, 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+ /* This header provides a declaritive way of describing the types that
+ are used when declaring builtin functions.
+
+ Before including this header, you must define the following macros:
+
+ DEF_PRIMITIVE_TYPE (ENUM, TYPE)
+
+ The ENUM is an identifier indicating which type is being defined.
+ TYPE is an expression for a `tree' that represents the type.
+
+ DEF_FUNCTION_TYPE_0 (ENUM, RETURN)
+ DEF_FUNCTION_TYPE_1 (ENUM, RETURN, ARG1)
+ DEF_FUNCTION_TYPE_2 (ENUM, RETURN, ARG1, ARG2)
+ DEF_FUNCTION_TYPE_3 (ENUM, RETURN, ARG1, ARG2, ARG3)
+ DEF_FUNCTION_TYPE_4 (ENUM, RETURN, ARG1, ARG2, ARG3, ARG4)
+
+ These macros describe function types. ENUM is as above. The
+ RETURN type is one of the enumerals already defined. ARG1, ARG2,
+ and ARG3 give the types of the arguments, similarly.
+
+ DEF_FUNCTION_TYPE_VAR_0 (ENUM, RETURN)
+ DEF_FUNCTION_TYPE_VAR_1 (ENUM, RETURN, ARG1)
+ DEF_FUNCTION_TYPE_VAR_2 (ENUM, RETURN, ARG1, ARG2)
+
+ Similar, but for function types that take variable arguments.
+ For example:
+
+ DEF_FUNCTION_TYPE_1 (BT_INT_DOUBLE, BT_INT, BT_DOUBLE)
+
+ describes the type `int ()(double)', using the enumeral
+ BT_INT_DOUBLE, whereas:
+
+ DEF_FUNCTION_TYPE_VAR_1 (BT_INT_DOUBLE_VAR, BT_INT, BT_DOUBLE)
+
+ describes the type `int ()(double, ...)'.
+
+ DEF_POINTER_TYPE (ENUM, TYPE)
+
+ This macro describes a pointer type. ENUM is as above; TYPE is
+ the type pointed to. */
+
+ DEF_PRIMITIVE_TYPE (BT_VOID, void_type_node)
+ DEF_PRIMITIVE_TYPE (BT_INT, integer_type_node)
+ DEF_PRIMITIVE_TYPE (BT_UNSIGNED, unsigned_type_node)
+ DEF_PRIMITIVE_TYPE (BT_LONG, long_integer_type_node)
+ DEF_PRIMITIVE_TYPE (BT_LONGLONG, long_long_integer_type_node)
+ DEF_PRIMITIVE_TYPE (BT_FLOAT, float_type_node)
+ DEF_PRIMITIVE_TYPE (BT_INTMAX, intmax_type_node)
+ DEF_PRIMITIVE_TYPE (BT_DOUBLE, double_type_node)
+ DEF_PRIMITIVE_TYPE (BT_LONG_DOUBLE, long_double_type_node)
+ DEF_PRIMITIVE_TYPE (BT_COMPLEX_FLOAT, complex_float_type_node)
+ DEF_PRIMITIVE_TYPE (BT_COMPLEX_DOUBLE, complex_double_type_node)
+ DEF_PRIMITIVE_TYPE (BT_COMPLEX_LONG_DOUBLE, complex_long_double_type_node)
+
+ DEF_PRIMITIVE_TYPE (BT_PTR, ptr_type_node)
+ DEF_PRIMITIVE_TYPE (BT_CONST_PTR, const_ptr_type_node)
+ DEF_PRIMITIVE_TYPE (BT_TRAD_PTR, traditional_ptr_type_node)
+ DEF_PRIMITIVE_TYPE (BT_TRAD_CONST_PTR, traditional_cptr_type_node)
+ DEF_PRIMITIVE_TYPE (BT_PTRMODE, type_for_mode (ptr_mode, 0))
+ DEF_PRIMITIVE_TYPE (BT_SIZE, c_size_type_node)
+ DEF_PRIMITIVE_TYPE (BT_STRING, string_type_node)
+ DEF_PRIMITIVE_TYPE (BT_CONST_STRING, const_string_type_node)
+ DEF_PRIMITIVE_TYPE (BT_LEN, traditional_len_type_node)
+
+ DEF_PRIMITIVE_TYPE (BT_VALIST_REF, va_list_ref_type_node)
+ DEF_PRIMITIVE_TYPE (BT_VALIST_ARG, va_list_arg_type_node)
+
+ DEF_FUNCTION_TYPE_0 (BT_FN_VOID, BT_VOID)
+ DEF_FUNCTION_TYPE_0 (BT_FN_PTR, BT_PTR)
+ DEF_FUNCTION_TYPE_0 (BT_FN_UNSIGNED, BT_UNSIGNED)
+
+ DEF_FUNCTION_TYPE_1 (BT_FN_LONG_LONG, BT_LONG, BT_LONG)
+ DEF_FUNCTION_TYPE_1 (BT_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TR, BT_INT, BT_PTR)
+ DEF_FUNCTION_TYPE_1 (BT_FN_VOID_PTR, BT_VOID, BT_PTR)
+ DEF_FUNCTION_TYPE_1 (BT_FN_LEN_CONST_STRING, BT_LEN, BT_CONST_STRING)
+ DEF_FUNCTION_TYPE_1 (BT_FN_INT_CONST_STRING, BT_INT, BT_CONST_STRING)
+ DEF_FUNCTION_TYPE_1 (BT_FN_PTR_PTR, BT_PTR, BT_PTR)
+ DEF_FUNCTION_TYPE_1 (BT_FN_VOID_VALIST_REF, BT_VOID, BT_VALIST_REF)
+ DEF_FUNCTION_TYPE_1 (BT_FN_VOID_INT, BT_VOID, BT_INT)
+
+ DEF_FUNCTION_TYPE_2 (BT_FN_VOID_PTR_INT, BT_VOID, BT_PTR, BT_INT)
+ DEF_FUNCTION_TYPE_2 (BT_FN_STRING_STRING_CONST_STRING,
+ BT_STRING, BT_STRING, BT_CONST_STRING)
+ DEF_FUNCTION_TYPE_2 (BT_FN_INT_CONST_STRING_CONST_STRING,
+ BT_INT, BT_CONST_STRING, BT_CONST_STRING)
+ DEF_FUNCTION_TYPE_2 (BT_FN_STRING_CONST_STRING_CONST_STRING,
+ BT_STRING, BT_CONST_STRING, BT_CONST_STRING)
+ DEF_FUNCTION_TYPE_2 (BT_FN_SIZE_CONST_STRING_CONST_STRING,
+ BT_SIZE, BT_CONST_STRING, BT_CONST_STRING)
+ DEF_FUNCTION_TYPE_2 (BT_FN_STRING_CONST_STRING_INT,
+ BT_STRING, BT_CONST_STRING, BT_INT)
+ DEF_FUNCTION_TYPE_2 (BT_FN_INT_CONST_STRING_PTR,
+ BT_INT, BT_CONST_STRING, BT_PTR)
+ DEF_FUNCTION_TYPE_2 (BT_FN_INT_INT_PTR,
+ BT_INT, BT_INT, BT_PTR)
+ DEF_FUNCTION_TYPE_2 (BT_FN_VOID_PTRMODE_PTR,
+ BT_VOID, BT_PTRMODE, BT_PTR)
+ DEF_FUNCTION_TYPE_2 (BT_FN_VOID_VALIST_REF_VALIST_ARG,
+ BT_VOID, BT_VALIST_REF, BT_VALIST_ARG)
+ DEF_FUNCTION_TYPE_2 (BT_FN_LONG_LONG_LONG,
+ BT_LONG, BT_LONG, BT_LONG)
+ DEF_FUNCTION_TYPE_2 (BT_FN_INT_PTR_CONST_STRING,
+ BT_INT, BT_PTR, BT_CONST_STRING)
+ DEF_FUNCTION_TYPE_2 (BT_FN_VOID_TRAD_PTR_LEN,
+ BT_VOID, BT_TRAD_PTR, BT_LEN)
+
+ DEF_FUNCTION_TYPE_3 (BT_FN_STRING_STRING_CONST_STRING_SIZE,
+ BT_STRING, BT_STRING, BT_CONST_STRING, BT_SIZE)
+ DEF_FUNCTION_TYPE_3 (BT_FN_INT_CONST_STRING_CONST_STRING_SIZE,
+ BT_INT, BT_CONST_STRING, BT_CONST_STRING, BT_SIZE)
+ DEF_FUNCTION_TYPE_3 (BT_FN_TRAD_PTR_PTR_CONST_PTR_SIZE,
+ BT_TRAD_PTR, BT_PTR, BT_CONST_PTR, BT_SIZE)
+ DEF_FUNCTION_TYPE_3 (BT_FN_INT_CONST_PTR_CONST_PTR_SIZE,
+ BT_INT, BT_CONST_PTR, BT_CONST_PTR, BT_SIZE)
+ DEF_FUNCTION_TYPE_3 (BT_FN_TRAD_PTR_PTR_INT_SIZE,
+ BT_TRAD_PTR, BT_PTR, BT_INT, BT_SIZE)
+ DEF_FUNCTION_TYPE_3 (BT_FN_INT_TRAD_CONST_PTR_TRAD_CONST_PTR_LEN,
+ BT_INT, BT_TRAD_CONST_PTR, BT_TRAD_CONST_PTR, BT_LEN)
+
+ DEF_FUNCTION_TYPE_4 (BT_FN_SIZE_CONST_PTR_SIZE_SIZE_PTR,
+ BT_SIZE, BT_CONST_PTR, BT_SIZE, BT_SIZE, BT_PTR)
+
+ DEF_FUNCTION_TYPE_VAR_0 (BT_FN_VOID_VAR, BT_VOID)
+ DEF_FUNCTION_TYPE_VAR_0 (BT_FN_INT_VAR, BT_INT)
+ DEF_FUNCTION_TYPE_VAR_0 (BT_FN_PTR_VAR, BT_PTR)
+
+ DEF_FUNCTION_TYPE_VAR_1 (BT_FN_VOID_VALIST_REF_VAR,
+ BT_VOID, BT_VALIST_REF)
+ DEF_FUNCTION_TYPE_VAR_1 (BT_FN_INT_CONST_STRING_VAR,
+ BT_INT, BT_CONST_STRING)
+
+ DEF_FUNCTION_TYPE_VAR_2 (BT_FN_INT_PTR_CONST_STRING_VAR,
+ BT_INT, BT_PTR, BT_CONST_STRING)
+
+ DEF_POINTER_TYPE (BT_PTR_FN_VOID_VAR, BT_FN_VOID_VAR)
+ DEF_FUNCTION_TYPE_3 (BT_FN_PTR_PTR_FN_VOID_VAR_PTR_SIZE,
+ BT_PTR, BT_PTR_FN_VOID_VAR, BT_PTR, BT_SIZE)
Index: builtins.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/builtins.c,v
retrieving revision 1.99
diff -c -p -r1.99 builtins.c
*** builtins.c 2001/05/22 20:04:57 1.99
--- builtins.c 2001/05/25 19:48:58
*************** Boston, MA 02111-1307, USA. */
*** 57,63 ****
const char *const built_in_class_names[4]
= {"NOT_BUILT_IN", "BUILT_IN_FRONTEND", "BUILT_IN_MD", "BUILT_IN_NORMAL"};
! #define DEF_BUILTIN(x) STRINGX(x),
const char *const built_in_names[(int) END_BUILTINS] =
{
#include "builtins.def"
--- 57,63 ----
const char *const built_in_class_names[4]
= {"NOT_BUILT_IN", "BUILT_IN_FRONTEND", "BUILT_IN_MD", "BUILT_IN_NORMAL"};
! #define DEF_BUILTIN(X, N, C, T, LT, B, F, NA) STRINGX(X),
const char *const built_in_names[(int) END_BUILTINS] =
{
#include "builtins.def"
*************** const char *const built_in_names[(int) E
*** 66,77 ****
/* Setup an array of _DECL trees, make sure each element is
initialized to NULL_TREE. */
! #define DEF_BUILTIN(x) NULL_TREE,
! tree built_in_decls[(int) END_BUILTINS] =
! {
! #include "builtins.def"
! };
! #undef DEF_BUILTIN
tree (*lang_type_promotes_to) PARAMS ((tree));
--- 66,72 ----
/* Setup an array of _DECL trees, make sure each element is
initialized to NULL_TREE. */
! tree built_in_decls[(int) END_BUILTINS];
tree (*lang_type_promotes_to) PARAMS ((tree));
*************** expand_builtin_mathfn (exp, target, subt
*** 1409,1419 ****
switch (DECL_FUNCTION_CODE (fndecl))
{
! case BUILT_IN_SIN:
builtin_optab = sin_optab; break;
! case BUILT_IN_COS:
builtin_optab = cos_optab; break;
! case BUILT_IN_FSQRT:
builtin_optab = sqrt_optab; break;
default:
abort ();
--- 1404,1420 ----
switch (DECL_FUNCTION_CODE (fndecl))
{
! case BUILT_IN_SIN:
! case BUILT_IN_SINF:
! case BUILT_IN_SINL:
builtin_optab = sin_optab; break;
! case BUILT_IN_COS:
! case BUILT_IN_COSF:
! case BUILT_IN_COSL:
builtin_optab = cos_optab; break;
! case BUILT_IN_FSQRT:
! case BUILT_IN_SQRTF:
! case BUILT_IN_SQRTL:
builtin_optab = sqrt_optab; break;
default:
abort ();
*************** expand_builtin (exp, target, subtarget,
*** 3300,3306 ****
set of builtins. */
if (! optimize && ! CALLED_AS_BUILT_IN (fndecl)
&& (fcode == BUILT_IN_SIN || fcode == BUILT_IN_COS
! || fcode == BUILT_IN_FSQRT || fcode == BUILT_IN_MEMSET
|| fcode == BUILT_IN_MEMCPY || fcode == BUILT_IN_MEMCMP
|| fcode == BUILT_IN_BCMP || fcode == BUILT_IN_BZERO
|| fcode == BUILT_IN_INDEX || fcode == BUILT_IN_RINDEX
--- 3301,3308 ----
set of builtins. */
if (! optimize && ! CALLED_AS_BUILT_IN (fndecl)
&& (fcode == BUILT_IN_SIN || fcode == BUILT_IN_COS
! || fcode == BUILT_IN_FSQRT || fcode == BUILT_IN_SQRTF
! || fcode == BUILT_IN_SQRTL || fcode == BUILT_IN_MEMSET
|| fcode == BUILT_IN_MEMCPY || fcode == BUILT_IN_MEMCMP
|| fcode == BUILT_IN_BCMP || fcode == BUILT_IN_BZERO
|| fcode == BUILT_IN_INDEX || fcode == BUILT_IN_RINDEX
*************** expand_builtin (exp, target, subtarget,
*** 3319,3342 ****
--- 3321,3361 ----
switch (fcode)
{
case BUILT_IN_ABS:
+ case BUILT_IN_LABS:
+ case BUILT_IN_LLABS:
+ case BUILT_IN_IMAXABS:
case BUILT_IN_FABS:
+ case BUILT_IN_FABSF:
+ case BUILT_IN_FABSL:
/* build_function_call changes these into ABS_EXPR. */
abort ();
case BUILT_IN_CONJ:
+ case BUILT_IN_CONJF:
+ case BUILT_IN_CONJL:
case BUILT_IN_CREAL:
+ case BUILT_IN_CREALF:
+ case BUILT_IN_CREALL:
case BUILT_IN_CIMAG:
+ case BUILT_IN_CIMAGF:
+ case BUILT_IN_CIMAGL:
/* expand_tree_builtin changes these into CONJ_EXPR, REALPART_EXPR
and IMAGPART_EXPR. */
abort ();
case BUILT_IN_SIN:
+ case BUILT_IN_SINF:
+ case BUILT_IN_SINL:
case BUILT_IN_COS:
+ case BUILT_IN_COSF:
+ case BUILT_IN_COSL:
/* Treat these like sqrt only if unsafe math optimizations are allowed,
because of possible accuracy problems. */
if (! flag_unsafe_math_optimizations)
break;
case BUILT_IN_FSQRT:
+ case BUILT_IN_SQRTF:
+ case BUILT_IN_SQRTL:
target = expand_builtin_mathfn (exp, target, subtarget);
if (target)
return target;
Index: builtins.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/builtins.def,v
retrieving revision 1.19
diff -c -p -r1.19 builtins.def
*** builtins.def 2001/03/28 11:03:48 1.19
--- builtins.def 2001/05/25 19:48:58
*************** along with GNU CC; see the file COPYING.
*** 19,112 ****
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
! DEF_BUILTIN(BUILT_IN_ALLOCA)
! DEF_BUILTIN(BUILT_IN_ABS)
! DEF_BUILTIN(BUILT_IN_FABS)
! DEF_BUILTIN(BUILT_IN_CONJ)
! DEF_BUILTIN(BUILT_IN_CREAL)
! DEF_BUILTIN(BUILT_IN_CIMAG)
! DEF_BUILTIN(BUILT_IN_FFS)
! DEF_BUILTIN(BUILT_IN_DIV)
! DEF_BUILTIN(BUILT_IN_LDIV)
! DEF_BUILTIN(BUILT_IN_FFLOOR)
! DEF_BUILTIN(BUILT_IN_FCEIL)
! DEF_BUILTIN(BUILT_IN_FMOD)
! DEF_BUILTIN(BUILT_IN_FREM)
! DEF_BUILTIN(BUILT_IN_MEMCPY)
! DEF_BUILTIN(BUILT_IN_MEMCMP)
! DEF_BUILTIN(BUILT_IN_MEMSET)
! DEF_BUILTIN(BUILT_IN_BZERO)
! DEF_BUILTIN(BUILT_IN_BCMP)
! DEF_BUILTIN(BUILT_IN_INDEX)
! DEF_BUILTIN(BUILT_IN_RINDEX)
! DEF_BUILTIN(BUILT_IN_STRCAT)
! DEF_BUILTIN(BUILT_IN_STRNCAT)
! DEF_BUILTIN(BUILT_IN_STRCPY)
! DEF_BUILTIN(BUILT_IN_STRNCPY)
! DEF_BUILTIN(BUILT_IN_STRCMP)
! DEF_BUILTIN(BUILT_IN_STRNCMP)
! DEF_BUILTIN(BUILT_IN_STRLEN)
! DEF_BUILTIN(BUILT_IN_STRSTR)
! DEF_BUILTIN(BUILT_IN_STRPBRK)
! DEF_BUILTIN(BUILT_IN_STRSPN)
! DEF_BUILTIN(BUILT_IN_STRCSPN)
! DEF_BUILTIN(BUILT_IN_STRCHR)
! DEF_BUILTIN(BUILT_IN_STRRCHR)
! DEF_BUILTIN(BUILT_IN_FSQRT)
! DEF_BUILTIN(BUILT_IN_SIN)
! DEF_BUILTIN(BUILT_IN_COS)
! DEF_BUILTIN(BUILT_IN_GETEXP)
! DEF_BUILTIN(BUILT_IN_GETMAN)
! DEF_BUILTIN(BUILT_IN_SAVEREGS)
! DEF_BUILTIN(BUILT_IN_CLASSIFY_TYPE)
! DEF_BUILTIN(BUILT_IN_NEXT_ARG)
! DEF_BUILTIN(BUILT_IN_ARGS_INFO)
! DEF_BUILTIN(BUILT_IN_CONSTANT_P)
! DEF_BUILTIN(BUILT_IN_FRAME_ADDRESS)
! DEF_BUILTIN(BUILT_IN_RETURN_ADDRESS)
! DEF_BUILTIN(BUILT_IN_AGGREGATE_INCOMING_ADDRESS)
! DEF_BUILTIN(BUILT_IN_APPLY_ARGS)
! DEF_BUILTIN(BUILT_IN_APPLY)
! DEF_BUILTIN(BUILT_IN_RETURN)
! DEF_BUILTIN(BUILT_IN_SETJMP)
! DEF_BUILTIN(BUILT_IN_LONGJMP)
! DEF_BUILTIN(BUILT_IN_TRAP)
!
! /* Stdio builtins. */
! DEF_BUILTIN(BUILT_IN_PUTCHAR)
! DEF_BUILTIN(BUILT_IN_PUTS)
! DEF_BUILTIN(BUILT_IN_PRINTF)
! DEF_BUILTIN(BUILT_IN_FPUTC)
! DEF_BUILTIN(BUILT_IN_FPUTS)
! DEF_BUILTIN(BUILT_IN_FWRITE)
! DEF_BUILTIN(BUILT_IN_FPRINTF)
/* ISO C99 floating point unordered comparisons. */
! DEF_BUILTIN(BUILT_IN_ISGREATER)
! DEF_BUILTIN(BUILT_IN_ISGREATEREQUAL)
! DEF_BUILTIN(BUILT_IN_ISLESS)
! DEF_BUILTIN(BUILT_IN_ISLESSEQUAL)
! DEF_BUILTIN(BUILT_IN_ISLESSGREATER)
! DEF_BUILTIN(BUILT_IN_ISUNORDERED)
!
! /* Various hooks for the DWARF 2 __throw routine. */
! DEF_BUILTIN(BUILT_IN_UNWIND_INIT)
! DEF_BUILTIN(BUILT_IN_DWARF_CFA)
! DEF_BUILTIN(BUILT_IN_DWARF_FP_REGNUM)
! DEF_BUILTIN(BUILT_IN_INIT_DWARF_REG_SIZES)
! DEF_BUILTIN(BUILT_IN_FROB_RETURN_ADDR)
! DEF_BUILTIN(BUILT_IN_EXTRACT_RETURN_ADDR)
! DEF_BUILTIN(BUILT_IN_EH_RETURN)
! DEF_BUILTIN(BUILT_IN_EH_RETURN_DATA_REGNO)
!
! DEF_BUILTIN(BUILT_IN_VARARGS_START)
! DEF_BUILTIN(BUILT_IN_STDARG_START)
! DEF_BUILTIN(BUILT_IN_VA_END)
! DEF_BUILTIN(BUILT_IN_VA_COPY)
! DEF_BUILTIN(BUILT_IN_EXPECT)
!
! /* C++ extensions */
! DEF_BUILTIN(BUILT_IN_NEW)
! DEF_BUILTIN(BUILT_IN_VEC_NEW)
! DEF_BUILTIN(BUILT_IN_DELETE)
! DEF_BUILTIN(BUILT_IN_VEC_DELETE)
--- 19,436 ----
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
! /* Before including this file, you should define a macro:
+ DEF_BUILTIN (ENUM, NAME, CLASS, TYPE, LIBTYPE, BOTH_P,
+ FALLBACK_P, NONANSI_P)
+
+ This macro will be called once for each builtin function. The
+ ENUM will be of type `enum built_in_function', and will indicate
+ which builtin function is being processed. The NAME of the builtin
+ function (which will always start with `__builtin_') is a string
+ literal. The CLASS is of type `enum built_in_class' and indicates
+ what kind of builtin is being processed.
+
+ Some builtins are actually two separate functions. For example,
+ for `strcmp' there are two builtin functions; `__builtin_strcmp'
+ and `strcmp' itself. Both behave identically. Other builtins
+ define only the `__builtin' variant. If BOTH_P is TRUE, then this
+ builtin has both variants; otherwise, it is has only the first
+ variant.
+
+ TYPE indicates the type of the function. The symbols correspond to
+ enumerals from builtin-types.def. If BOTH_P is true, then LIBTYPE
+ is the type of the non-`__builtin_' variant. Otherwise, LIBTYPE
+ should be ignored.
+
+ If FALLBACK_P is true then, if for some reason, the compiler cannot
+ expand the builtin function directly, it will call the
+ corresponding library function (which does not have the
+ `__builtin_' prefix.
+
+ If NONANSI_P is true, then the non-`__builtin_' variant is not an
+ ANSI/ISO library function, and so we should pretend it does not
+ exist when compiling in ANSI conformant mode. */
+
+ /* A GCC builtin (like __builtin_saveregs) is provided by the
+ compiler, but does not correspond to a function in the standard
+ library. */
+ #undef DEF_GCC_BUILTIN
+ #define DEF_GCC_BUILTIN(ENUM, NAME, TYPE) \
+ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, BT_LAST, \
+ false, false, false)
+
+
+ /* A fallback builtin is a builtin (like __builtin_puts) that falls
+ back to the corresopnding library function if necessary -- but
+ for which we should not introduce the non-`__builtin' variant of
+ the name. */
+ #undef DEF_FALLBACK_BUILTIN
+ #define DEF_FALLBACK_BUILTIN(ENUM, NAME, TYPE) \
+ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
+ false, true, false)
+
+ /* A library builtin (like __builtin_strchr) is a builtin equivalent
+ of an ANSI/ISO standard library function. In addition to the
+ `__builtin' version, we will create a an ordinary version (e.g,
+ `strchr') as well. If we cannot compute the answer using the
+ builtin function, we will fall back to the standard library
+ version. */
+ #undef DEF_LIB_BUILTIN
+ #define DEF_LIB_BUILTIN(ENUM, NAME, TYPE) \
+ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
+ true, true, false)
+
+ /* Like DEF_LIB_BUILTIN, except that a call to the builtin should
+ never fall back to the library version. */
+ #undef DEF_LIB_ALWAYS_BUILTIN
+ #define DEF_LIB_ALWAYS_BUILTIN(ENUM, NAME, TYPE) \
+ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
+ true, false, true)
+
+ /* Like DEF_LIB_BUILTIN, except that the function is not one that is
+ specified by ANSI/ISO C. So, when we're being fully conformant we
+ ignore the version of these builtins that does not begin with
+ __builtin. */
+ #undef DEF_EXT_LIB_BUILTIN
+ #define DEF_EXT_LIB_BUILTIN(ENUM, NAME, TYPE) \
+ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
+ true, true, true)
+
+ /* Like DEF_LIB_BUILTIN, except that the function is only a part of
+ the standard in C99 or above. */
+ #undef DEF_C99_BUILTIN
+ #define DEF_C99_BUILTIN(ENUM, NAME, TYPE) \
+ DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
+ true, !flag_isoc99, true)
+
+ /* Like DEF_LIB_BUILTIN, except that the function is expanded in the
+ front-end. */
+ #undef DEF_FRONT_END_LIB_BUILTIN
+ #define DEF_FRONT_END_LIB_BUILTIN(ENUM, NAME, TYPE) \
+ DEF_BUILTIN (ENUM, NAME, BUILT_IN_FRONTEND, TYPE, TYPE, \
+ true, true, false)
+
+ /* A built-in that is not currently used. */
+ #undef DEF_UNUSED_BUILTIN
+ #define DEF_UNUSED_BUILTIN(X) \
+ DEF_BUILTIN (X, (const char *) NULL, NOT_BUILT_IN, BT_LAST, \
+ BT_LAST, false, false, false)
+
+ /* If SMALL_STACK is defined, then `alloca' is only defined in its
+ `__builtin' form. */
+ #if SMALL_STACK
+ DEF_FALLBACK_BUILTIN(BUILT_IN_ALLOCA,
+ "__builtin_alloca",
+ BT_FN_PTR_SIZE)
+ #else
+ DEF_EXT_LIB_BUILTIN(BUILT_IN_ALLOCA,
+ "__builtin_alloca",
+ BT_FN_PTR_SIZE)
+ #endif
+
+ DEF_LIB_ALWAYS_BUILTIN(BUILT_IN_ABS,
+ "__builtin_abs",
+ BT_FN_INT_INT)
+ DEF_LIB_ALWAYS_BUILTIN(BUILT_IN_LABS,
+ "__builtin_labs",
+ BT_FN_LONG_LONG)
+
+ DEF_LIB_ALWAYS_BUILTIN(BUILT_IN_FABS,
+ "__builtin_fabs",
+ BT_FN_DOUBLE_DOUBLE)
+ DEF_LIB_ALWAYS_BUILTIN(BUILT_IN_FABSF,
+ "__builtin_fabsf",
+ BT_FN_FLOAT_FLOAT)
+ DEF_LIB_ALWAYS_BUILTIN(BUILT_IN_FABSL,
+ "__builtin_fabsl",
+ BT_FN_LONG_DOUBLE_LONG_DOUBLE)
+
+ DEF_C99_BUILTIN(BUILT_IN_LLABS,
+ "__builtin_llabs",
+ BT_FN_LONGLONG_LONGLONG)
+ DEF_C99_BUILTIN(BUILT_IN_IMAXABS,
+ "__builtin_imaxabs",
+ BT_FN_INTMAX_INTMAX)
+ DEF_C99_BUILTIN(BUILT_IN_CONJ,
+ "__builtin_conj",
+ BT_FN_COMPLEX_DOUBLE_COMPLEX_DOUBLE)
+ DEF_C99_BUILTIN(BUILT_IN_CONJF,
+ "__builtin_conjf",
+ BT_FN_COMPLEX_FLOAT_COMPLEX_FLOAT)
+ DEF_C99_BUILTIN(BUILT_IN_CONJL,
+ "__builtin_conjl",
+ BT_FN_COMPLEX_LONG_DOUBLE_COMPLEX_LONG_DOUBLE)
+ DEF_C99_BUILTIN(BUILT_IN_CREAL,
+ "__builtin_creal",
+ BT_FN_DOUBLE_COMPLEX_DOUBLE)
+ DEF_C99_BUILTIN(BUILT_IN_CREALF,
+ "__builtin_crealf",
+ BT_FN_FLOAT_COMPLEX_FLOAT)
+ DEF_C99_BUILTIN(BUILT_IN_CREALL,
+ "__builtin_creall",
+ BT_FN_LONG_DOUBLE_COMPLEX_LONG_DOUBLE)
+ DEF_C99_BUILTIN(BUILT_IN_CIMAG,
+ "__builtin_cimag",
+ BT_FN_DOUBLE_COMPLEX_DOUBLE)
+ DEF_C99_BUILTIN(BUILT_IN_CIMAGF,
+ "__builtin_cimagf",
+ BT_FN_FLOAT_COMPLEX_FLOAT)
+ DEF_C99_BUILTIN(BUILT_IN_CIMAGL,
+ "__builtin_cimagl",
+ BT_FN_LONG_DOUBLE_COMPLEX_LONG_DOUBLE)
+
+ DEF_UNUSED_BUILTIN(BUILT_IN_DIV)
+ DEF_UNUSED_BUILTIN(BUILT_IN_LDIV)
+ DEF_UNUSED_BUILTIN(BUILT_IN_FFLOOR)
+ DEF_UNUSED_BUILTIN(BUILT_IN_FCEIL)
+ DEF_UNUSED_BUILTIN(BUILT_IN_FMOD)
+ DEF_UNUSED_BUILTIN(BUILT_IN_FREM)
+
+ /* The system prototypes for `bzero' and `bcmp' functions have many
+ variations, so don't specify parameters to avoid conflicts. The
+ expand_* functions check the argument types anyway. */
+ DEF_BUILTIN (BUILT_IN_BZERO,
+ "__builtin_bzero",
+ BUILT_IN_NORMAL,
+ BT_FN_VOID_TRAD_PTR_LEN,
+ BT_FN_VOID_VAR,
+ true, true, true)
+ DEF_BUILTIN (BUILT_IN_BCMP,
+ "__builtin_bcmp",
+ BUILT_IN_NORMAL,
+ BT_FN_INT_TRAD_CONST_PTR_TRAD_CONST_PTR_LEN,
+ BT_FN_INT_VAR,
+ true, true, true)
+
+ DEF_EXT_LIB_BUILTIN(BUILT_IN_FFS,
+ "__builtin_ffs",
+ BT_FN_INT_INT)
+ DEF_EXT_LIB_BUILTIN(BUILT_IN_INDEX,
+ "__builtin_index",
+ BT_FN_STRING_CONST_STRING_INT)
+ DEF_EXT_LIB_BUILTIN(BUILT_IN_RINDEX,
+ "__builtin_rindex",
+ BT_FN_STRING_CONST_STRING_INT)
+
+ DEF_LIB_BUILTIN(BUILT_IN_MEMCPY,
+ "__builtin_memcpy",
+ BT_FN_TRAD_PTR_PTR_CONST_PTR_SIZE)
+ DEF_LIB_BUILTIN(BUILT_IN_MEMCMP,
+ "__builtin_memcmp",
+ BT_FN_INT_CONST_PTR_CONST_PTR_SIZE)
+ DEF_LIB_BUILTIN(BUILT_IN_MEMSET,
+ "__builtin_memset",
+ BT_FN_TRAD_PTR_PTR_INT_SIZE)
+
+ DEF_LIB_BUILTIN(BUILT_IN_STRCAT,
+ "__builtin_strcat",
+ BT_FN_STRING_STRING_CONST_STRING)
+ DEF_LIB_BUILTIN(BUILT_IN_STRNCAT,
+ "__builtin_strncat",
+ BT_FN_STRING_STRING_CONST_STRING_SIZE)
+ DEF_LIB_BUILTIN(BUILT_IN_STRCPY,
+ "__builtin_strcpy",
+ BT_FN_STRING_STRING_CONST_STRING)
+ DEF_LIB_BUILTIN(BUILT_IN_STRNCPY,
+ "__builtin_strncpy",
+ BT_FN_STRING_STRING_CONST_STRING_SIZE)
+ DEF_LIB_BUILTIN(BUILT_IN_STRCMP,
+ "__builtin_strcmp",
+ BT_FN_INT_CONST_STRING_CONST_STRING)
+ DEF_LIB_BUILTIN(BUILT_IN_STRNCMP,
+ "__builtin_strncmp",
+ BT_FN_INT_CONST_STRING_CONST_STRING_SIZE)
+ DEF_LIB_BUILTIN(BUILT_IN_STRLEN,
+ "__builtin_strlen",
+ BT_FN_LEN_CONST_STRING)
+ DEF_LIB_BUILTIN(BUILT_IN_STRSTR,
+ "__builtin_strstr",
+ BT_FN_STRING_CONST_STRING_CONST_STRING)
+ DEF_LIB_BUILTIN(BUILT_IN_STRPBRK,
+ "__builtin_strpbrk",
+ BT_FN_STRING_CONST_STRING_CONST_STRING)
+ DEF_LIB_BUILTIN(BUILT_IN_STRSPN,
+ "__builtin_strspn",
+ BT_FN_SIZE_CONST_STRING_CONST_STRING)
+ DEF_LIB_BUILTIN(BUILT_IN_STRCSPN,
+ "__builtin_strcspn",
+ BT_FN_SIZE_CONST_STRING_CONST_STRING)
+ DEF_LIB_BUILTIN(BUILT_IN_STRCHR,
+ "__builtin_strchr",
+ BT_FN_STRING_CONST_STRING_INT)
+ DEF_LIB_BUILTIN(BUILT_IN_STRRCHR,
+ "__builtin_strrchr",
+ BT_FN_STRING_CONST_STRING_INT)
+
+ DEF_LIB_BUILTIN(BUILT_IN_FSQRT,
+ "__builtin_fsqrt",
+ BT_FN_DOUBLE_DOUBLE)
+ DEF_LIB_BUILTIN(BUILT_IN_SIN,
+ "__builtin_sin",
+ BT_FN_DOUBLE_DOUBLE)
+ DEF_LIB_BUILTIN(BUILT_IN_COS,
+ "__builtin_cos",
+ BT_FN_DOUBLE_DOUBLE)
+ DEF_LIB_BUILTIN(BUILT_IN_SQRTF,
+ "__builtin_sqrtf",
+ BT_FN_FLOAT_FLOAT)
+ DEF_LIB_BUILTIN(BUILT_IN_SINF,
+ "__builtin_sinf",
+ BT_FN_FLOAT_FLOAT)
+ DEF_LIB_BUILTIN(BUILT_IN_COSF,
+ "__builtin_cosf",
+ BT_FN_LONG_DOUBLE_LONG_DOUBLE)
+ DEF_LIB_BUILTIN(BUILT_IN_SQRTL,
+ "__builtin_sqrtl",
+ BT_FN_LONG_DOUBLE_LONG_DOUBLE)
+ DEF_LIB_BUILTIN(BUILT_IN_SINL,
+ "__builtin_sinl",
+ BT_FN_LONG_DOUBLE_LONG_DOUBLE)
+ DEF_LIB_BUILTIN(BUILT_IN_COSL,
+ "__builtin_cosl",
+ BT_FN_LONG_DOUBLE_LONG_DOUBLE)
+
+ DEF_UNUSED_BUILTIN(BUILT_IN_GETEXP)
+ DEF_UNUSED_BUILTIN(BUILT_IN_GETMAN)
+
+ DEF_GCC_BUILTIN(BUILT_IN_SAVEREGS,
+ "__builtin_saveregs",
+ BT_FN_PTR_VAR)
+ DEF_GCC_BUILTIN(BUILT_IN_CLASSIFY_TYPE,
+ "__builtin_classify_type",
+ BT_FN_INT_VAR)
+ DEF_GCC_BUILTIN(BUILT_IN_NEXT_ARG,
+ "__builtin_next_arg",
+ BT_FN_PTR_VAR)
+ DEF_GCC_BUILTIN(BUILT_IN_ARGS_INFO,
+ "__builtin_args_info",
+ BT_FN_INT_INT)
+ DEF_GCC_BUILTIN(BUILT_IN_CONSTANT_P,
+ "__builtin_constant_p",
+ BT_FN_INT_VAR)
+ DEF_GCC_BUILTIN(BUILT_IN_FRAME_ADDRESS,
+ "__builtin_frame_address",
+ BT_FN_PTR_UNSIGNED)
+ DEF_GCC_BUILTIN(BUILT_IN_RETURN_ADDRESS,
+ "__builtin_return_address",
+ BT_FN_PTR_UNSIGNED)
+ DEF_GCC_BUILTIN(BUILT_IN_AGGREGATE_INCOMING_ADDRESS,
+ "__builtin_aggregate_incoming_address",
+ BT_FN_PTR_VAR)
+ DEF_GCC_BUILTIN(BUILT_IN_APPLY_ARGS,
+ "__builtin_apply_args",
+ BT_FN_PTR_VAR)
+ DEF_GCC_BUILTIN(BUILT_IN_APPLY,
+ "__builtin_apply",
+ BT_FN_PTR_PTR_FN_VOID_VAR_PTR_SIZE)
+ DEF_GCC_BUILTIN(BUILT_IN_RETURN,
+ "__builtin_return",
+ BT_FN_VOID_PTR)
+ DEF_GCC_BUILTIN(BUILT_IN_SETJMP,
+ "__builtin_setjmp",
+ BT_FN_INT_PTR)
+ DEF_GCC_BUILTIN(BUILT_IN_LONGJMP,
+ "__builtin_longjmp",
+ BT_FN_VOID_PTR_INT)
+ DEF_GCC_BUILTIN(BUILT_IN_TRAP,
+ "__builtin_trap",
+ BT_FN_VOID)
+
+ /* Stdio builtins. */
+ DEF_FALLBACK_BUILTIN(BUILT_IN_PUTCHAR,
+ "__builtin_putchar",
+ BT_FN_INT_INT)
+ DEF_FALLBACK_BUILTIN(BUILT_IN_PUTS,
+ "__builtin_puts",
+ BT_FN_INT_CONST_STRING)
+ DEF_FRONT_END_LIB_BUILTIN(BUILT_IN_PRINTF,
+ "__builtin_printf",
+ BT_FN_INT_CONST_STRING_VAR)
+ DEF_FALLBACK_BUILTIN(BUILT_IN_FPUTC,
+ "__builtin_fputc",
+ BT_FN_INT_INT_PTR)
+ /* Declare the __builtin_ style with arguments and the regular style
+ without them. We rely on stdio.h to supply the arguments for the
+ regular style declaration since we had to use void* instead of
+ FILE* in the __builtin_ prototype supplied here. */
+ DEF_BUILTIN (BUILT_IN_FPUTS,
+ "__builtin_fputs",
+ BUILT_IN_NORMAL,
+ BT_FN_INT_CONST_STRING_PTR,
+ BT_FN_INT_VAR,
+ true, true, false)
+ DEF_FALLBACK_BUILTIN(BUILT_IN_FWRITE,
+ "__builtin_fwrite",
+ BT_FN_SIZE_CONST_PTR_SIZE_SIZE_PTR)
+ DEF_FRONT_END_LIB_BUILTIN(BUILT_IN_FPRINTF,
+ "__builtin_fprintf",
+ BT_FN_INT_PTR_CONST_STRING_VAR)
+
/* ISO C99 floating point unordered comparisons. */
! DEF_GCC_BUILTIN(BUILT_IN_ISGREATER,
! "__builtin_isgreater",
! BT_FN_INT_VAR)
! DEF_GCC_BUILTIN(BUILT_IN_ISGREATEREQUAL,
! "__builtin_isgreaterequal",
! BT_FN_INT_VAR)
! DEF_GCC_BUILTIN(BUILT_IN_ISLESS,
! "__builtin_isless",
! BT_FN_INT_VAR)
! DEF_GCC_BUILTIN(BUILT_IN_ISLESSEQUAL,
! "__builtin_islessequal",
! BT_FN_INT_VAR)
! DEF_GCC_BUILTIN(BUILT_IN_ISLESSGREATER,
! "__builtin_islessgreater",
! BT_FN_INT_VAR)
! DEF_GCC_BUILTIN(BUILT_IN_ISUNORDERED,
! "__builtin_isunordered",
! BT_FN_INT_VAR)
!
! /* Various hooks for the DWARF 2 __throw routine. */
! DEF_GCC_BUILTIN(BUILT_IN_UNWIND_INIT,
! "__builtin_unwind_init",
! BT_FN_VOID)
! DEF_GCC_BUILTIN(BUILT_IN_DWARF_CFA,
! "__builtin_dwarf_cfa",
! BT_FN_PTR)
! DEF_GCC_BUILTIN(BUILT_IN_DWARF_FP_REGNUM,
! "__builtin_dwarf_fp_regnum",
! BT_FN_UNSIGNED)
! DEF_GCC_BUILTIN(BUILT_IN_INIT_DWARF_REG_SIZES,
! "__builtin_init_dwarf_reg_size_table",
! BT_FN_VOID_PTR)
! DEF_GCC_BUILTIN(BUILT_IN_FROB_RETURN_ADDR,
! "__builtin_frob_return_addr",
! BT_FN_PTR_PTR)
! DEF_GCC_BUILTIN(BUILT_IN_EXTRACT_RETURN_ADDR,
! "__builtin_extract_return_addr",
! BT_FN_PTR_PTR)
! DEF_GCC_BUILTIN(BUILT_IN_EH_RETURN,
! "__builtin_eh_return",
! BT_FN_VOID_PTRMODE_PTR)
! DEF_GCC_BUILTIN(BUILT_IN_EH_RETURN_DATA_REGNO,
! "__builtin_eh_return_data_regno",
! BT_FN_INT_INT)
!
! DEF_GCC_BUILTIN(BUILT_IN_VARARGS_START,
! "__builtin_varargs_start",
! BT_FN_VOID_VALIST_REF)
! DEF_GCC_BUILTIN(BUILT_IN_STDARG_START,
! "__builtin_stdarg_start",
! BT_FN_VOID_VALIST_REF_VAR)
! DEF_GCC_BUILTIN(BUILT_IN_VA_END,
! "__builtin_va_end",
! BT_FN_VOID_VALIST_REF)
! DEF_GCC_BUILTIN(BUILT_IN_VA_COPY,
! "__builtin_va_copy",
! BT_FN_VOID_VALIST_REF_VALIST_ARG)
! DEF_GCC_BUILTIN(BUILT_IN_EXPECT,
! "__builtin_expect",
! BT_FN_LONG_LONG_LONG)
!
! /* C++ extensions */
! DEF_UNUSED_BUILTIN(BUILT_IN_NEW)
! DEF_UNUSED_BUILTIN(BUILT_IN_VEC_NEW)
! DEF_UNUSED_BUILTIN(BUILT_IN_DELETE)
! DEF_UNUSED_BUILTIN(BUILT_IN_VEC_DELETE)
Index: c-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.c,v
retrieving revision 1.235
diff -c -p -r1.235 c-common.c
*** c-common.c 2001/05/21 16:06:37 1.235
--- c-common.c 2001/05/25 19:48:58
*************** cpp_reader *parse_in; /* Declared in c-
*** 152,165 ****
tree default_function_type;
- Function types `int (int)', etc.
-
- tree int_ftype_int;
- tree void_ftype;
- tree void_ftype_ptr;
- tree int_ftype_int;
- tree ptr_ftype_sizetype;
-
A VOID_TYPE node, packaged in a TREE_LIST.
tree void_list_node;
--- 152,157 ----
*************** lang_get_alias_set (t)
*** 2869,2901 ****
void
c_common_nodes_and_builtins ()
{
int wchar_type_size;
tree array_domain_type;
- tree temp;
- tree memcpy_ftype, memset_ftype, strlen_ftype;
- tree bzero_ftype, bcmp_ftype, puts_ftype, printf_ftype;
- tree fputs_ftype, fputc_ftype, fwrite_ftype, fprintf_ftype;
- tree endlink, int_endlink, double_endlink, unsigned_endlink;
- tree cstring_endlink, sizetype_endlink;
- tree ptr_ftype, ptr_ftype_unsigned;
- tree void_ftype_any, void_ftype_int, int_ftype_any;
- tree double_ftype_double, double_ftype_double_double;
- tree float_ftype_float, ldouble_ftype_ldouble;
- tree cfloat_ftype_cfloat, cdouble_ftype_cdouble, cldouble_ftype_cldouble;
- tree float_ftype_cfloat, double_ftype_cdouble, ldouble_ftype_cldouble;
- tree int_ftype_cptr_cptr_sizet, sizet_ftype_cstring_cstring;
- tree int_ftype_cstring_cstring, string_ftype_string_cstring;
- tree string_ftype_cstring_int, string_ftype_cstring_cstring;
- tree string_ftype_string_cstring_sizet, int_ftype_cstring_cstring_sizet;
- tree long_ftype_long;
- tree longlong_ftype_longlong;
- tree intmax_ftype_intmax;
/* Either char* or void*. */
tree traditional_ptr_type_node;
/* Either const char* or const void*. */
tree traditional_cptr_type_node;
tree traditional_len_type_node;
- tree traditional_len_endlink;
tree va_list_ref_type_node;
tree va_list_arg_type_node;
--- 2861,2902 ----
void
c_common_nodes_and_builtins ()
{
+ enum builtin_type
+ {
+ #define DEF_PRIMITIVE_TYPE(NAME, VALUE) NAME,
+ #define DEF_FUNCTION_TYPE_0(NAME, RETURN) NAME,
+ #define DEF_FUNCTION_TYPE_1(NAME, RETURN, ARG1) NAME,
+ #define DEF_FUNCTION_TYPE_2(NAME, RETURN, ARG1, ARG2) NAME,
+ #define DEF_FUNCTION_TYPE_3(NAME, RETURN, ARG1, ARG2, ARG3) NAME,
+ #define DEF_FUNCTION_TYPE_4(NAME, RETURN, ARG1, ARG2, ARG3, ARG4) NAME,
+ #define DEF_FUNCTION_TYPE_VAR_0(NAME, RETURN) NAME,
+ #define DEF_FUNCTION_TYPE_VAR_1(NAME, RETURN, ARG1) NAME,
+ #define DEF_FUNCTION_TYPE_VAR_2(NAME, RETURN, ARG1, ARG2) NAME,
+ #define DEF_POINTER_TYPE(NAME, TYPE) NAME,
+ #include "builtin-types.def"
+ #undef DEF_PRIMITIVE_TYPE
+ #undef DEF_FUNCTION_TYPE_0
+ #undef DEF_FUNCTION_TYPE_1
+ #undef DEF_FUNCTION_TYPE_2
+ #undef DEF_FUNCTION_TYPE_3
+ #undef DEF_FUNCTION_TYPE_4
+ #undef DEF_FUNCTION_TYPE_VAR_0
+ #undef DEF_FUNCTION_TYPE_VAR_1
+ #undef DEF_FUNCTION_TYPE_VAR_2
+ #undef DEF_POINTER_TYPE
+ BT_LAST
+ };
+
+ typedef enum builtin_type builtin_type;
+
+ tree builtin_types[(int)BT_LAST];
int wchar_type_size;
tree array_domain_type;
/* Either char* or void*. */
tree traditional_ptr_type_node;
/* Either const char* or const void*. */
tree traditional_cptr_type_node;
tree traditional_len_type_node;
tree va_list_ref_type_node;
tree va_list_arg_type_node;
*************** c_common_nodes_and_builtins ()
*** 2986,2991 ****
--- 2987,2995 ----
record_builtin_type (RID_VOID, NULL, void_type_node);
+ void_zero_node = build_int_2 (0, 0);
+ TREE_TYPE (void_zero_node) = void_type_node;
+
void_list_node = build_void_list_node ();
/* Make a type to be the domain of a few array types
*************** c_common_nodes_and_builtins ()
*** 3004,3013 ****
/* Likewise for arrays of ints. */
int_array_type_node
= build_array_type (integer_type_node, array_domain_type);
! #ifdef MD_INIT_BUILTINS
MD_INIT_BUILTINS;
- #endif
/* This is special for C++ so functions can be overloaded. */
wchar_type_node = get_identifier (flag_short_wchar
--- 3008,3027 ----
/* Likewise for arrays of ints. */
int_array_type_node
= build_array_type (integer_type_node, array_domain_type);
+
+ string_type_node = build_pointer_type (char_type_node);
+ const_string_type_node
+ = build_pointer_type (build_qualified_type
+ (char_type_node, TYPE_QUAL_CONST));
! traditional_ptr_type_node = ((flag_traditional &&
! c_language != clk_cplusplus)
! ? string_type_node : ptr_type_node);
! traditional_cptr_type_node = ((flag_traditional &&
! c_language != clk_cplusplus)
! ? const_string_type_node : const_ptr_type_node);
!
MD_INIT_BUILTINS;
/* This is special for C++ so functions can be overloaded. */
wchar_type_node = get_identifier (flag_short_wchar
*************** c_common_nodes_and_builtins ()
*** 3033,3042 ****
wchar_array_type_node
= build_array_type (wchar_type_node, array_domain_type);
- string_type_node = build_pointer_type (char_type_node);
- const_string_type_node
- = build_pointer_type (build_type_variant (char_type_node, 1, 0));
-
wint_type_node =
TREE_TYPE (identifier_global_value (get_identifier (WINT_TYPE)));
--- 3047,3052 ----
*************** c_common_nodes_and_builtins ()
*** 3070,3633 ****
va_list_ref_type_node = build_reference_type (va_list_type_node);
}
- endlink = void_list_node;
- int_endlink = tree_cons (NULL_TREE, integer_type_node, endlink);
- double_endlink = tree_cons (NULL_TREE, double_type_node, endlink);
- unsigned_endlink = tree_cons (NULL_TREE, unsigned_type_node, endlink);
- cstring_endlink = tree_cons (NULL_TREE, const_string_type_node, endlink);
-
- ptr_ftype = build_function_type (ptr_type_node, NULL_TREE);
- ptr_ftype_unsigned = build_function_type (ptr_type_node, unsigned_endlink);
- sizetype_endlink = tree_cons (NULL_TREE, TYPE_DOMAIN (sizetype), endlink);
- /* We realloc here because sizetype could be int or unsigned. S'ok. */
- ptr_ftype_sizetype = build_function_type (ptr_type_node, sizetype_endlink);
-
- int_ftype_any = build_function_type (integer_type_node, NULL_TREE);
- void_ftype_any = build_function_type (void_type_node, NULL_TREE);
- void_ftype = build_function_type (void_type_node, endlink);
- void_ftype_int = build_function_type (void_type_node, int_endlink);
- void_ftype_ptr
- = build_function_type (void_type_node,
- tree_cons (NULL_TREE, ptr_type_node, endlink));
-
- float_ftype_float
- = build_function_type (float_type_node,
- tree_cons (NULL_TREE, float_type_node, endlink));
-
- double_ftype_double
- = build_function_type (double_type_node, double_endlink);
-
- ldouble_ftype_ldouble
- = build_function_type (long_double_type_node,
- tree_cons (NULL_TREE, long_double_type_node,
- endlink));
-
- double_ftype_double_double
- = build_function_type (double_type_node,
- tree_cons (NULL_TREE, double_type_node,
- double_endlink));
-
- cfloat_ftype_cfloat
- = build_function_type (complex_float_type_node,
- tree_cons (NULL_TREE, complex_float_type_node,
- endlink));
- cdouble_ftype_cdouble
- = build_function_type (complex_double_type_node,
- tree_cons (NULL_TREE, complex_double_type_node,
- endlink));
- cldouble_ftype_cldouble
- = build_function_type (complex_long_double_type_node,
- tree_cons (NULL_TREE, complex_long_double_type_node,
- endlink));
-
- float_ftype_cfloat
- = build_function_type (float_type_node,
- tree_cons (NULL_TREE, complex_float_type_node,
- endlink));
- double_ftype_cdouble
- = build_function_type (double_type_node,
- tree_cons (NULL_TREE, complex_double_type_node,
- endlink));
- ldouble_ftype_cldouble
- = build_function_type (long_double_type_node,
- tree_cons (NULL_TREE, complex_long_double_type_node,
- endlink));
-
- int_ftype_int
- = build_function_type (integer_type_node, int_endlink);
-
- long_ftype_long
- = build_function_type (long_integer_type_node,
- tree_cons (NULL_TREE, long_integer_type_node,
- endlink));
-
- longlong_ftype_longlong
- = build_function_type (long_long_integer_type_node,
- tree_cons (NULL_TREE, long_long_integer_type_node,
- endlink));
-
- intmax_ftype_intmax
- = build_function_type (intmax_type_node,
- tree_cons (NULL_TREE, intmax_type_node,
- endlink));
-
- int_ftype_cptr_cptr_sizet
- = build_function_type (integer_type_node,
- tree_cons (NULL_TREE, const_ptr_type_node,
- tree_cons (NULL_TREE,
- const_ptr_type_node,
- sizetype_endlink)));
-
- void_zero_node = build_int_2 (0, 0);
- TREE_TYPE (void_zero_node) = void_type_node;
-
- /* Prototype for strcpy/strcat. */
- string_ftype_string_cstring
- = build_function_type (string_type_node,
- tree_cons (NULL_TREE, string_type_node,
- cstring_endlink));
-
- /* Prototype for strncpy/strncat. */
- string_ftype_string_cstring_sizet
- = build_function_type (string_type_node,
- tree_cons (NULL_TREE, string_type_node,
- tree_cons (NULL_TREE,
- const_string_type_node,
- sizetype_endlink)));
-
traditional_len_type_node = ((flag_traditional &&
c_language != clk_cplusplus)
? integer_type_node : sizetype);
- traditional_len_endlink = tree_cons (NULL_TREE, traditional_len_type_node,
- endlink);
-
- /* Prototype for strcmp. */
- int_ftype_cstring_cstring
- = build_function_type (integer_type_node,
- tree_cons (NULL_TREE, const_string_type_node,
- cstring_endlink));
-
- /* Prototype for strspn/strcspn. */
- sizet_ftype_cstring_cstring
- = build_function_type (c_size_type_node,
- tree_cons (NULL_TREE, const_string_type_node,
- cstring_endlink));
-
- /* Prototype for strncmp. */
- int_ftype_cstring_cstring_sizet
- = build_function_type (integer_type_node,
- tree_cons (NULL_TREE, const_string_type_node,
- tree_cons (NULL_TREE,
- const_string_type_node,
- sizetype_endlink)));
-
- /* Prototype for strstr, strpbrk, etc. */
- string_ftype_cstring_cstring
- = build_function_type (string_type_node,
- tree_cons (NULL_TREE, const_string_type_node,
- cstring_endlink));
-
- /* Prototype for strchr. */
- string_ftype_cstring_int
- = build_function_type (string_type_node,
- tree_cons (NULL_TREE, const_string_type_node,
- int_endlink));
-
- /* Prototype for strlen. */
- strlen_ftype
- = build_function_type (traditional_len_type_node, cstring_endlink);
! traditional_ptr_type_node = ((flag_traditional &&
! c_language != clk_cplusplus)
! ? string_type_node : ptr_type_node);
! traditional_cptr_type_node = ((flag_traditional &&
! c_language != clk_cplusplus)
! ? const_string_type_node : const_ptr_type_node);
!
! /* Prototype for memcpy. */
! memcpy_ftype
! = build_function_type (traditional_ptr_type_node,
! tree_cons (NULL_TREE, ptr_type_node,
! tree_cons (NULL_TREE, const_ptr_type_node,
! sizetype_endlink)));
!
! /* Prototype for memset. */
! memset_ftype
! = build_function_type (traditional_ptr_type_node,
! tree_cons (NULL_TREE, ptr_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! sizetype_endlink)));
!
! /* Prototype for bzero. */
! bzero_ftype
! = build_function_type (void_type_node,
! tree_cons (NULL_TREE, traditional_ptr_type_node,
! traditional_len_endlink));
!
! /* Prototype for bcmp. */
! bcmp_ftype
! = build_function_type (integer_type_node,
! tree_cons (NULL_TREE, traditional_cptr_type_node,
! tree_cons (NULL_TREE,
! traditional_cptr_type_node,
! traditional_len_endlink)));
!
! /* Prototype for puts. */
! puts_ftype
! = build_function_type (integer_type_node, cstring_endlink);
!
! /* Prototype for printf. */
! printf_ftype
! = build_function_type (integer_type_node,
! tree_cons (NULL_TREE, const_string_type_node,
NULL_TREE));
! /* These stdio prototypes are declared using void* in place of
! FILE*. They are only used for __builtin_ style calls, regular
! style builtin prototypes omit the arguments and merge those
! provided by stdio.h. */
! /* Prototype for fwrite. */
! fwrite_ftype
! = build_function_type (c_size_type_node,
! tree_cons (NULL_TREE, const_ptr_type_node,
! tree_cons (NULL_TREE, c_size_type_node,
! tree_cons (NULL_TREE, c_size_type_node,
! tree_cons (NULL_TREE, ptr_type_node, endlink)))));
!
! /* Prototype for fputc. */
! fputc_ftype
! = build_function_type (integer_type_node,
! tree_cons (NULL_TREE, integer_type_node,
! tree_cons (NULL_TREE, ptr_type_node, endlink)));
!
! /* Prototype for fputs. */
! fputs_ftype
! = build_function_type (integer_type_node,
! tree_cons (NULL_TREE, const_string_type_node,
! tree_cons (NULL_TREE, ptr_type_node, endlink)));
!
! /* Prototype for fprintf. */
! fprintf_ftype
! = build_function_type (integer_type_node,
! tree_cons (NULL_TREE, ptr_type_node,
! tree_cons (NULL_TREE,
! const_string_type_node,
! NULL_TREE)));
!
! builtin_function ("__builtin_constant_p", default_function_type,
! BUILT_IN_CONSTANT_P, BUILT_IN_NORMAL, NULL);
!
! builtin_function ("__builtin_return_address", ptr_ftype_unsigned,
! BUILT_IN_RETURN_ADDRESS, BUILT_IN_NORMAL, NULL);
!
! builtin_function ("__builtin_frame_address", ptr_ftype_unsigned,
! BUILT_IN_FRAME_ADDRESS, BUILT_IN_NORMAL, NULL);
!
! #ifdef EH_RETURN_DATA_REGNO
! builtin_function ("__builtin_eh_return_data_regno", int_ftype_int,
! BUILT_IN_EH_RETURN_DATA_REGNO, BUILT_IN_NORMAL, NULL);
! #endif
- builtin_function ("__builtin_alloca", ptr_ftype_sizetype,
- BUILT_IN_ALLOCA, BUILT_IN_NORMAL, "alloca");
- builtin_function_2 ("__builtin_ffs", "ffs",
- int_ftype_int, int_ftype_int,
- BUILT_IN_FFS, BUILT_IN_NORMAL, 0, 1, 0);
- /* Define alloca as builtin, unless SMALL_STACK. */
- #ifndef SMALL_STACK
- builtin_function_2 (NULL, "alloca", NULL_TREE, ptr_ftype_sizetype,
- BUILT_IN_ALLOCA, BUILT_IN_NORMAL, 0, 1, 0);
- #endif
/* Declare _exit and _Exit just to mark them as non-returning. */
! builtin_function_2 (NULL, "_exit", NULL_TREE, void_ftype_int,
0, NOT_BUILT_IN, 0, 1, 1);
! builtin_function_2 (NULL, "_Exit", NULL_TREE, void_ftype_int,
0, NOT_BUILT_IN, 0, !flag_isoc99, 1);
- builtin_function_2 ("__builtin_index", "index",
- string_ftype_cstring_int, string_ftype_cstring_int,
- BUILT_IN_INDEX, BUILT_IN_NORMAL, 1, 1, 0);
- builtin_function_2 ("__builtin_rindex", "rindex",
- string_ftype_cstring_int, string_ftype_cstring_int,
- BUILT_IN_RINDEX, BUILT_IN_NORMAL, 1, 1, 0);
-
- /* The system prototypes for these functions have many
- variations, so don't specify parameters to avoid conflicts.
- The expand_* functions check the argument types anyway. */
- builtin_function_2 ("__builtin_bzero", "bzero",
- bzero_ftype, void_ftype_any,
- BUILT_IN_BZERO, BUILT_IN_NORMAL, 1, 1, 0);
- builtin_function_2 ("__builtin_bcmp", "bcmp",
- bcmp_ftype, int_ftype_any,
- BUILT_IN_BCMP, BUILT_IN_NORMAL, 1, 1, 0);
-
- builtin_function_2 ("__builtin_abs", "abs",
- int_ftype_int, int_ftype_int,
- BUILT_IN_ABS, BUILT_IN_NORMAL, 0, 0, 0);
- builtin_function_2 ("__builtin_fabsf", "fabsf",
- float_ftype_float, float_ftype_float,
- BUILT_IN_FABS, BUILT_IN_NORMAL, 0, 0, 0);
- builtin_function_2 ("__builtin_fabs", "fabs",
- double_ftype_double, double_ftype_double,
- BUILT_IN_FABS, BUILT_IN_NORMAL, 0, 0, 0);
- builtin_function_2 ("__builtin_fabsl", "fabsl",
- ldouble_ftype_ldouble, ldouble_ftype_ldouble,
- BUILT_IN_FABS, BUILT_IN_NORMAL, 0, 0, 0);
- builtin_function_2 ("__builtin_labs", "labs",
- long_ftype_long, long_ftype_long,
- BUILT_IN_ABS, BUILT_IN_NORMAL, 0, 0, 0);
- builtin_function_2 ("__builtin_llabs", "llabs",
- longlong_ftype_longlong, longlong_ftype_longlong,
- BUILT_IN_ABS, BUILT_IN_NORMAL, 0, !flag_isoc99, 0);
- builtin_function_2 ("__builtin_imaxabs", "imaxabs",
- intmax_ftype_intmax, intmax_ftype_intmax,
- BUILT_IN_ABS, BUILT_IN_NORMAL, 0, !flag_isoc99, 0);
-
- builtin_function ("__builtin_saveregs", ptr_ftype, BUILT_IN_SAVEREGS,
- BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_classify_type", default_function_type,
- BUILT_IN_CLASSIFY_TYPE, BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_next_arg", ptr_ftype, BUILT_IN_NEXT_ARG,
- BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_args_info", int_ftype_int, BUILT_IN_ARGS_INFO,
- BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_setjmp",
- build_function_type (integer_type_node,
- tree_cons (NULL_TREE, ptr_type_node,
- endlink)),
- BUILT_IN_SETJMP, BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_longjmp",
- build_function_type (void_type_node,
- tree_cons (NULL_TREE, ptr_type_node,
- int_endlink)),
- BUILT_IN_LONGJMP, BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_trap", void_ftype, BUILT_IN_TRAP,
- BUILT_IN_NORMAL, NULL);
-
- /* ISO C99 IEEE Unordered compares. */
- builtin_function ("__builtin_isgreater", default_function_type,
- BUILT_IN_ISGREATER, BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_isgreaterequal", default_function_type,
- BUILT_IN_ISGREATEREQUAL, BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_isless", default_function_type,
- BUILT_IN_ISLESS, BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_islessequal", default_function_type,
- BUILT_IN_ISLESSEQUAL, BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_islessgreater", default_function_type,
- BUILT_IN_ISLESSGREATER, BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_isunordered", default_function_type,
- BUILT_IN_ISUNORDERED, BUILT_IN_NORMAL, NULL);
-
- /* Untyped call and return. */
- builtin_function ("__builtin_apply_args", ptr_ftype,
- BUILT_IN_APPLY_ARGS, BUILT_IN_NORMAL, NULL);
-
- temp = tree_cons (NULL_TREE,
- build_pointer_type (build_function_type (void_type_node,
- NULL_TREE)),
- tree_cons (NULL_TREE, ptr_type_node, sizetype_endlink));
- builtin_function ("__builtin_apply",
- build_function_type (ptr_type_node, temp),
- BUILT_IN_APPLY, BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_return", void_ftype_ptr,
- BUILT_IN_RETURN, BUILT_IN_NORMAL, NULL);
-
- /* Support for varargs.h and stdarg.h. */
- builtin_function ("__builtin_varargs_start",
- build_function_type (void_type_node,
- tree_cons (NULL_TREE,
- va_list_ref_type_node,
- endlink)),
- BUILT_IN_VARARGS_START, BUILT_IN_NORMAL, NULL);
-
- builtin_function ("__builtin_stdarg_start",
- build_function_type (void_type_node,
- tree_cons (NULL_TREE,
- va_list_ref_type_node,
- NULL_TREE)),
- BUILT_IN_STDARG_START, BUILT_IN_NORMAL, NULL);
-
- builtin_function ("__builtin_va_end",
- build_function_type (void_type_node,
- tree_cons (NULL_TREE,
- va_list_ref_type_node,
- endlink)),
- BUILT_IN_VA_END, BUILT_IN_NORMAL, NULL);
-
- builtin_function ("__builtin_va_copy",
- build_function_type (void_type_node,
- tree_cons (NULL_TREE,
- va_list_ref_type_node,
- tree_cons (NULL_TREE,
- va_list_arg_type_node,
- endlink))),
- BUILT_IN_VA_COPY, BUILT_IN_NORMAL, NULL);
-
- /* ??? Ought to be `T __builtin_expect(T, T)' for any type T. */
- builtin_function ("__builtin_expect",
- build_function_type (long_integer_type_node,
- tree_cons (NULL_TREE,
- long_integer_type_node,
- tree_cons (NULL_TREE,
- long_integer_type_node,
- endlink))),
- BUILT_IN_EXPECT, BUILT_IN_NORMAL, NULL);
-
- /* Currently under experimentation. */
- builtin_function_2 ("__builtin_memcpy", "memcpy",
- memcpy_ftype, memcpy_ftype,
- BUILT_IN_MEMCPY, BUILT_IN_NORMAL, 1, 0, 0);
- builtin_function_2 ("__builtin_memcmp", "memcmp",
- int_ftype_cptr_cptr_sizet, int_ftype_cptr_cptr_sizet,
- BUILT_IN_MEMCMP, BUILT_IN_NORMAL, 1, 0, 0);
- builtin_function_2 ("__builtin_memset", "memset",
- memset_ftype, memset_ftype,
- BUILT_IN_MEMSET, BUILT_IN_NORMAL, 1, 0, 0);
- built_in_decls[BUILT_IN_STRCMP] =
- builtin_function_2 ("__builtin_strcmp", "strcmp",
- int_ftype_cstring_cstring, int_ftype_cstring_cstring,
- BUILT_IN_STRCMP, BUILT_IN_NORMAL, 1, 0, 0);
- builtin_function_2 ("__builtin_strncmp", "strncmp",
- int_ftype_cstring_cstring_sizet,
- int_ftype_cstring_cstring_sizet,
- BUILT_IN_STRNCMP, BUILT_IN_NORMAL, 1, 0, 0);
- builtin_function_2 ("__builtin_strstr", "strstr",
- string_ftype_cstring_cstring, string_ftype_cstring_cstring,
- BUILT_IN_STRSTR, BUILT_IN_NORMAL, 1, 0, 0);
- builtin_function_2 ("__builtin_strpbrk", "strpbrk",
- string_ftype_cstring_cstring, string_ftype_cstring_cstring,
- BUILT_IN_STRPBRK, BUILT_IN_NORMAL, 1, 0, 0);
- built_in_decls[BUILT_IN_STRCHR] =
- builtin_function_2 ("__builtin_strchr", "strchr",
- string_ftype_cstring_int, string_ftype_cstring_int,
- BUILT_IN_STRCHR, BUILT_IN_NORMAL, 1, 0, 0);
- builtin_function_2 ("__builtin_strrchr", "strrchr",
- string_ftype_cstring_int, string_ftype_cstring_int,
- BUILT_IN_STRRCHR, BUILT_IN_NORMAL, 1, 0, 0);
- builtin_function_2 ("__builtin_strcpy", "strcpy",
- string_ftype_string_cstring, string_ftype_string_cstring,
- BUILT_IN_STRCPY, BUILT_IN_NORMAL, 1, 0, 0);
- builtin_function_2 ("__builtin_strncpy", "strncpy",
- string_ftype_string_cstring_sizet,
- string_ftype_string_cstring_sizet,
- BUILT_IN_STRNCPY, BUILT_IN_NORMAL, 1, 0, 0);
- built_in_decls[BUILT_IN_STRCAT] =
- builtin_function_2 ("__builtin_strcat", "strcat",
- string_ftype_string_cstring,
- string_ftype_string_cstring,
- BUILT_IN_STRCAT, BUILT_IN_NORMAL, 1, 0, 0);
- builtin_function_2 ("__builtin_strncat", "strncat",
- string_ftype_string_cstring_sizet,
- string_ftype_string_cstring_sizet,
- BUILT_IN_STRNCAT, BUILT_IN_NORMAL, 1, 0, 0);
- builtin_function_2 ("__builtin_strspn", "strspn",
- sizet_ftype_cstring_cstring, sizet_ftype_cstring_cstring,
- BUILT_IN_STRSPN, BUILT_IN_NORMAL, 1, 0, 0);
- builtin_function_2 ("__builtin_strcspn", "strcspn",
- sizet_ftype_cstring_cstring, sizet_ftype_cstring_cstring,
- BUILT_IN_STRCSPN, BUILT_IN_NORMAL, 1, 0, 0);
- built_in_decls[BUILT_IN_STRLEN] =
- builtin_function_2 ("__builtin_strlen", "strlen",
- strlen_ftype, strlen_ftype,
- BUILT_IN_STRLEN, BUILT_IN_NORMAL, 1, 0, 0);
-
- builtin_function_2 ("__builtin_sqrtf", "sqrtf",
- float_ftype_float, float_ftype_float,
- BUILT_IN_FSQRT, BUILT_IN_NORMAL, 1, 0, 0);
- builtin_function_2 ("__builtin_fsqrt", "sqrt",
- double_ftype_double, double_ftype_double,
- BUILT_IN_FSQRT, BUILT_IN_NORMAL, 1, 0, 0);
- builtin_function_2 ("__builtin_sqrtl", "sqrtl",
- ldouble_ftype_ldouble, ldouble_ftype_ldouble,
- BUILT_IN_FSQRT, BUILT_IN_NORMAL, 1, 0, 0);
- builtin_function_2 ("__builtin_sinf", "sinf",
- float_ftype_float, float_ftype_float,
- BUILT_IN_SIN, BUILT_IN_NORMAL, 1, 0, 0);
- builtin_function_2 ("__builtin_sin", "sin",
- double_ftype_double, double_ftype_double,
- BUILT_IN_SIN, BUILT_IN_NORMAL, 1, 0, 0);
- builtin_function_2 ("__builtin_sinl", "sinl",
- ldouble_ftype_ldouble, ldouble_ftype_ldouble,
- BUILT_IN_SIN, BUILT_IN_NORMAL, 1, 0, 0);
- builtin_function_2 ("__builtin_cosf", "cosf",
- float_ftype_float, float_ftype_float,
- BUILT_IN_COS, BUILT_IN_NORMAL, 1, 0, 0);
- builtin_function_2 ("__builtin_cos", "cos",
- double_ftype_double, double_ftype_double,
- BUILT_IN_COS, BUILT_IN_NORMAL, 1, 0, 0);
- builtin_function_2 ("__builtin_cosl", "cosl",
- ldouble_ftype_ldouble, ldouble_ftype_ldouble,
- BUILT_IN_COS, BUILT_IN_NORMAL, 1, 0, 0);
-
- /* ISO C99 complex arithmetic functions. */
- builtin_function_2 ("__builtin_conjf", "conjf",
- cfloat_ftype_cfloat, cfloat_ftype_cfloat,
- BUILT_IN_CONJ, BUILT_IN_NORMAL, 0, !flag_isoc99, 0);
- builtin_function_2 ("__builtin_conj", "conj",
- cdouble_ftype_cdouble, cdouble_ftype_cdouble,
- BUILT_IN_CONJ, BUILT_IN_NORMAL, 0, !flag_isoc99, 0);
- builtin_function_2 ("__builtin_conjl", "conjl",
- cldouble_ftype_cldouble, cldouble_ftype_cldouble,
- BUILT_IN_CONJ, BUILT_IN_NORMAL, 0, !flag_isoc99, 0);
- builtin_function_2 ("__builtin_crealf", "crealf",
- float_ftype_cfloat, float_ftype_cfloat,
- BUILT_IN_CREAL, BUILT_IN_NORMAL, 0, !flag_isoc99, 0);
- builtin_function_2 ("__builtin_creal", "creal",
- double_ftype_cdouble, double_ftype_cdouble,
- BUILT_IN_CREAL, BUILT_IN_NORMAL, 0, !flag_isoc99, 0);
- builtin_function_2 ("__builtin_creall", "creall",
- ldouble_ftype_cldouble, ldouble_ftype_cldouble,
- BUILT_IN_CREAL, BUILT_IN_NORMAL, 0, !flag_isoc99, 0);
- builtin_function_2 ("__builtin_cimagf", "cimagf",
- float_ftype_cfloat, float_ftype_cfloat,
- BUILT_IN_CIMAG, BUILT_IN_NORMAL, 0, !flag_isoc99, 0);
- builtin_function_2 ("__builtin_cimag", "cimag",
- double_ftype_cdouble, double_ftype_cdouble,
- BUILT_IN_CIMAG, BUILT_IN_NORMAL, 0, !flag_isoc99, 0);
- builtin_function_2 ("__builtin_cimagl", "cimagl",
- ldouble_ftype_cldouble, ldouble_ftype_cldouble,
- BUILT_IN_CIMAG, BUILT_IN_NORMAL, 0, !flag_isoc99, 0);
-
- built_in_decls[BUILT_IN_PUTCHAR] =
- builtin_function ("__builtin_putchar", int_ftype_int,
- BUILT_IN_PUTCHAR, BUILT_IN_NORMAL, "putchar");
- built_in_decls[BUILT_IN_PUTS] =
- builtin_function ("__builtin_puts", puts_ftype,
- BUILT_IN_PUTS, BUILT_IN_NORMAL, "puts");
- builtin_function_2 ("__builtin_printf", "printf",
- printf_ftype, printf_ftype,
- BUILT_IN_PRINTF, BUILT_IN_FRONTEND, 1, 0, 0);
- builtin_function_2 ("__builtin_fprintf", "fprintf",
- fprintf_ftype, fprintf_ftype,
- BUILT_IN_FPRINTF, BUILT_IN_FRONTEND, 1, 0, 0);
- built_in_decls[BUILT_IN_FWRITE] =
- builtin_function ("__builtin_fwrite", fwrite_ftype,
- BUILT_IN_FWRITE, BUILT_IN_NORMAL, "fwrite");
- built_in_decls[BUILT_IN_FPUTC] =
- builtin_function ("__builtin_fputc", fputc_ftype,
- BUILT_IN_FPUTC, BUILT_IN_NORMAL, "fputc");
- /* Declare the __builtin_ style with arguments and the regular style
- without them. We rely on stdio.h to supply the arguments for the
- regular style declaration since we had to use void* instead of
- FILE* in the __builtin_ prototype supplied here. */
- built_in_decls[BUILT_IN_FPUTS] =
- builtin_function_2 ("__builtin_fputs", "fputs",
- fputs_ftype, int_ftype_any,
- BUILT_IN_FPUTS, BUILT_IN_NORMAL, 1, 0, 0);
-
/* Declare these functions non-returning
to avoid spurious "control drops through" warnings. */
builtin_function_2 (NULL, "abort",
NULL_TREE, ((c_language == clk_cplusplus)
! ? void_ftype : void_ftype_any),
0, NOT_BUILT_IN, 0, 0, 1);
builtin_function_2 (NULL, "exit",
NULL_TREE, ((c_language == clk_cplusplus)
! ? void_ftype_int : void_ftype_any),
0, NOT_BUILT_IN, 0, 0, 1);
- #if 0
- /* Support for these has not been written in either expand_builtin
- or build_function_call. */
- builtin_function ("__builtin_div", default_ftype, BUILT_IN_DIV,
- BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_ldiv", default_ftype, BUILT_IN_LDIV,
- BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_ffloor", double_ftype_double, BUILT_IN_FFLOOR,
- BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_fceil", double_ftype_double, BUILT_IN_FCEIL,
- BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_fmod", double_ftype_double_double,
- BUILT_IN_FMOD, BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_frem", double_ftype_double_double,
- BUILT_IN_FREM, BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_getexp", double_ftype_double, BUILT_IN_GETEXP,
- BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_getman", double_ftype_double, BUILT_IN_GETMAN,
- BUILT_IN_NORMAL, NULL);
- #endif
-
main_identifier_node = get_identifier ("main");
/* ??? Perhaps there's a better place to do this. But it is related
--- 3080,3220 ----
va_list_ref_type_node = build_reference_type (va_list_type_node);
}
traditional_len_type_node = ((flag_traditional &&
c_language != clk_cplusplus)
? integer_type_node : sizetype);
! #define DEF_PRIMITIVE_TYPE(ENUM, VALUE) \
! builtin_types[(int) ENUM] = VALUE;
! #define DEF_FUNCTION_TYPE_0(ENUM, RETURN) \
! builtin_types[(int) ENUM] \
! = build_function_type (builtin_types[(int) RETURN], \
! void_list_node);
! #define DEF_FUNCTION_TYPE_1(ENUM, RETURN, ARG1) \
! builtin_types[(int) ENUM] \
! = build_function_type (builtin_types[(int) RETURN], \
! tree_cons (NULL_TREE, \
! builtin_types[(int) ARG1], \
! void_list_node));
! #define DEF_FUNCTION_TYPE_2(ENUM, RETURN, ARG1, ARG2) \
! builtin_types[(int) ENUM] \
! = build_function_type \
! (builtin_types[(int) RETURN], \
! tree_cons (NULL_TREE, \
! builtin_types[(int) ARG1], \
! tree_cons (NULL_TREE, \
! builtin_types[(int) ARG2], \
! void_list_node)));
! #define DEF_FUNCTION_TYPE_3(ENUM, RETURN, ARG1, ARG2, ARG3) \
! builtin_types[(int) ENUM] \
! = build_function_type \
! (builtin_types[(int) RETURN], \
! tree_cons (NULL_TREE, \
! builtin_types[(int) ARG1], \
! tree_cons (NULL_TREE, \
! builtin_types[(int) ARG2], \
! tree_cons (NULL_TREE, \
! builtin_types[(int) ARG3], \
! void_list_node))));
! #define DEF_FUNCTION_TYPE_4(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4) \
! builtin_types[(int) ENUM] \
! = build_function_type \
! (builtin_types[(int) RETURN], \
! tree_cons (NULL_TREE, \
! builtin_types[(int) ARG1], \
! tree_cons (NULL_TREE, \
! builtin_types[(int) ARG2], \
! tree_cons \
! (NULL_TREE, \
! builtin_types[(int) ARG3], \
! tree_cons (NULL_TREE, \
! builtin_types[(int) ARG4], \
! void_list_node)))));
! #define DEF_FUNCTION_TYPE_VAR_0(ENUM, RETURN) \
! builtin_types[(int) ENUM] \
! = build_function_type (builtin_types[(int) RETURN], NULL_TREE);
! #define DEF_FUNCTION_TYPE_VAR_1(ENUM, RETURN, ARG1) \
! builtin_types[(int) ENUM] \
! = build_function_type (builtin_types[(int) RETURN], \
! tree_cons (NULL_TREE, \
! builtin_types[(int) ARG1], \
NULL_TREE));
! #define DEF_FUNCTION_TYPE_VAR_2(ENUM, RETURN, ARG1, ARG2) \
! builtin_types[(int) ENUM] \
! = build_function_type \
! (builtin_types[(int) RETURN], \
! tree_cons (NULL_TREE, \
! builtin_types[(int) ARG1], \
! tree_cons (NULL_TREE, \
! builtin_types[(int) ARG2], \
! NULL_TREE)));
! #define DEF_POINTER_TYPE(ENUM, TYPE) \
! builtin_types[(int) ENUM] \
! = build_pointer_type (builtin_types[(int) TYPE]);
! #include "builtin-types.def"
! #undef DEF_PRIMITIVE_TYPE
! #undef DEF_FUNCTION_TYPE_1
! #undef DEF_FUNCTION_TYPE_2
! #undef DEF_FUNCTION_TYPE_3
! #undef DEF_FUNCTION_TYPE_4
! #undef DEF_FUNCTION_TYPE_VAR_0
! #undef DEF_FUNCTION_TYPE_VAR_1
! #undef DEF_POINTER_TYPE
!
! #define DEF_BUILTIN(ENUM, NAME, CLASS, \
! TYPE, LIBTYPE, BOTH_P, FALLBACK_P, NONANSI_P) \
! if (NAME) \
! { \
! tree decl; \
! \
! if (strncmp (NAME, "__builtin_", strlen ("__builtin_")) != 0) \
! abort (); \
! \
! if (!BOTH_P) \
! decl = builtin_function (NAME, builtin_types[TYPE], ENUM, \
! CLASS, \
! (FALLBACK_P \
! ? (NAME + strlen ("__builtin_")) \
! : NULL)); \
! else \
! decl = builtin_function_2 (NAME, \
! NAME + strlen ("__builtin_"), \
! builtin_types[TYPE], \
! builtin_types[LIBTYPE], \
! ENUM, \
! CLASS, \
! FALLBACK_P, \
! NONANSI_P, \
! /*noreturn_p=*/0); \
! \
! built_in_decls[(int) ENUM] = decl; \
! }
! #include "builtins.def"
! #undef DEF_BUILTIN
/* Declare _exit and _Exit just to mark them as non-returning. */
! builtin_function_2 (NULL, "_exit", NULL_TREE,
! builtin_types[BT_FN_VOID_INT],
0, NOT_BUILT_IN, 0, 1, 1);
! builtin_function_2 (NULL, "_Exit", NULL_TREE,
! builtin_types[BT_FN_VOID_INT],
0, NOT_BUILT_IN, 0, !flag_isoc99, 1);
/* Declare these functions non-returning
to avoid spurious "control drops through" warnings. */
builtin_function_2 (NULL, "abort",
NULL_TREE, ((c_language == clk_cplusplus)
! ? builtin_types[BT_FN_VOID]
! : builtin_types[BT_FN_VOID_VAR]),
0, NOT_BUILT_IN, 0, 0, 1);
builtin_function_2 (NULL, "exit",
NULL_TREE, ((c_language == clk_cplusplus)
! ? builtin_types[BT_FN_VOID_INT]
! : builtin_types[BT_FN_VOID_VAR]),
0, NOT_BUILT_IN, 0, 0, 1);
main_identifier_node = get_identifier ("main");
/* ??? Perhaps there's a better place to do this. But it is related
*************** expand_tree_builtin (function, params, c
*** 3815,3836 ****
--- 3402,3434 ----
switch (DECL_FUNCTION_CODE (function))
{
case BUILT_IN_ABS:
+ case BUILT_IN_LABS:
+ case BUILT_IN_LLABS:
+ case BUILT_IN_IMAXABS:
case BUILT_IN_FABS:
+ case BUILT_IN_FABSL:
+ case BUILT_IN_FABSF:
if (coerced_params == 0)
return integer_zero_node;
return build_unary_op (ABS_EXPR, TREE_VALUE (coerced_params), 0);
case BUILT_IN_CONJ:
+ case BUILT_IN_CONJF:
+ case BUILT_IN_CONJL:
if (coerced_params == 0)
return integer_zero_node;
return build_unary_op (CONJ_EXPR, TREE_VALUE (coerced_params), 0);
case BUILT_IN_CREAL:
+ case BUILT_IN_CREALF:
+ case BUILT_IN_CREALL:
if (coerced_params == 0)
return integer_zero_node;
return build_unary_op (REALPART_EXPR, TREE_VALUE (coerced_params), 0);
case BUILT_IN_CIMAG:
+ case BUILT_IN_CIMAGF:
+ case BUILT_IN_CIMAGL:
if (coerced_params == 0)
return integer_zero_node;
return build_unary_op (IMAGPART_EXPR, TREE_VALUE (coerced_params), 0);
Index: c-common.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.h,v
retrieving revision 1.71
diff -c -p -r1.71 c-common.h
*** c-common.h 2001/05/20 06:26:32 1.71
--- c-common.h 2001/05/25 19:48:59
*************** enum c_tree_index
*** 148,158 ****
CTI_C_BOOL_FALSE,
CTI_DEFAULT_FUNCTION_TYPE,
- CTI_VOID_FTYPE,
- CTI_VOID_FTYPE_PTR,
- CTI_INT_FTYPE_INT,
- CTI_PTR_FTYPE_SIZETYPE,
-
CTI_G77_INTEGER_TYPE,
CTI_G77_UINTEGER_TYPE,
CTI_G77_LONGINT_TYPE,
--- 148,153 ----
*************** struct c_common_identifier
*** 207,216 ****
#define const_string_type_node c_global_trees[CTI_CONST_STRING_TYPE]
#define default_function_type c_global_trees[CTI_DEFAULT_FUNCTION_TYPE]
- #define void_ftype c_global_trees[CTI_VOID_FTYPE]
- #define void_ftype_ptr c_global_trees[CTI_VOID_FTYPE_PTR]
- #define int_ftype_int c_global_trees[CTI_INT_FTYPE_INT]
- #define ptr_ftype_sizetype c_global_trees[CTI_PTR_FTYPE_SIZETYPE]
/* g77 integer types, which which must be kept in sync with f/com.h */
#define g77_integer_type_node c_global_trees[CTI_G77_INTEGER_TYPE]
--- 202,207 ----
Index: c-decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-decl.c,v
retrieving revision 1.221
diff -c -p -r1.221 c-decl.c
*** c-decl.c 2001/05/21 18:36:57 1.221
--- c-decl.c 2001/05/25 19:49:00
*************** init_decl_processing ()
*** 3056,3091 ****
g77_ulongint_type_node));
}
- builtin_function ("__builtin_aggregate_incoming_address",
- build_function_type (ptr_type_node, NULL_TREE),
- BUILT_IN_AGGREGATE_INCOMING_ADDRESS,
- BUILT_IN_NORMAL, NULL);
-
- /* Hooks for the DWARF 2 __throw routine. */
- builtin_function ("__builtin_unwind_init",
- build_function_type (void_type_node, endlink),
- BUILT_IN_UNWIND_INIT, BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_dwarf_cfa", ptr_ftype_void,
- BUILT_IN_DWARF_CFA, BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_dwarf_fp_regnum",
- build_function_type (unsigned_type_node, endlink),
- BUILT_IN_DWARF_FP_REGNUM, BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_init_dwarf_reg_size_table", void_ftype_ptr,
- BUILT_IN_INIT_DWARF_REG_SIZES, BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_frob_return_addr", ptr_ftype_ptr,
- BUILT_IN_FROB_RETURN_ADDR, BUILT_IN_NORMAL, NULL);
- builtin_function ("__builtin_extract_return_addr", ptr_ftype_ptr,
- BUILT_IN_EXTRACT_RETURN_ADDR, BUILT_IN_NORMAL, NULL);
- builtin_function
- ("__builtin_eh_return",
- build_function_type (void_type_node,
- tree_cons (NULL_TREE,
- type_for_mode (ptr_mode, 0),
- tree_cons (NULL_TREE,
- ptr_type_node,
- endlink))),
- BUILT_IN_EH_RETURN, BUILT_IN_NORMAL, NULL);
-
pedantic_lvalues = pedantic;
make_fname_decl = c_make_fname_decl;
--- 3056,3061 ----
Index: defaults.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/defaults.h,v
retrieving revision 1.39
diff -c -p -r1.39 defaults.h
*** defaults.h 2001/05/19 17:56:47 1.39
--- defaults.h 2001/05/25 19:49:00
*************** do { \
*** 343,347 ****
--- 343,355 ----
#define TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER true
#endif
+ /* Define this macro if you have any machine-specific builtin
+ functions that need to be defined. It should be a C expression
+ that performs the necessary setup. */
+
+ #ifndef MD_INIT_BUILTINS
+ #define MD_INIT_BUILTINS
+ #endif
+
#endif /* GCC_DEFAULTS_H */
Index: tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.241
diff -c -p -r1.241 tree.h
*** tree.h 2001/05/22 07:23:37 1.241
--- tree.h 2001/05/25 19:49:04
*************** extern const char *const built_in_class_
*** 84,90 ****
/* Codes that identify the various built in functions
so that expand_call can identify them quickly. */
! #define DEF_BUILTIN(x) x,
enum built_in_function
{
#include "builtins.def"
--- 84,90 ----
/* Codes that identify the various built in functions
so that expand_call can identify them quickly. */
! #define DEF_BUILTIN(ENUM, N, C, T, LT, B, F, NA) ENUM,
enum built_in_function
{
#include "builtins.def"
Index: cp/decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.787
diff -c -p -r1.787 decl.c
*** decl.c 2001/05/25 01:27:08 1.787
--- decl.c 2001/05/25 19:49:07
*************** void
*** 6325,6330 ****
--- 6325,6332 ----
init_decl_processing ()
{
tree fields[20];
+ tree void_ftype;
+ tree void_ftype_ptr;
/* Check to see that the user did not specify an invalid combination
of command-line options. */
*************** init_decl_processing ()
*** 6452,6457 ****
--- 6454,6464 ----
vtt_parm_type = build_pointer_type (const_ptr_type_node);
lang_type_promotes_to = convert_type_from_ellipsis;
+ void_ftype = build_function_type (void_type_node, void_list_node);
+ void_ftype_ptr = build_function_type (void_type_node,
+ tree_cons (NULL_TREE,
+ ptr_type_node,
+ void_list_node));
void_ftype_ptr
= build_exception_variant (void_ftype_ptr, empty_except_spec);
*************** init_decl_processing ()
*** 6528,6540 ****
{
tree bad_alloc_type_node, newtype, deltype;
!
if (flag_honor_std)
push_namespace (std_identifier);
bad_alloc_type_node = xref_tag
(class_type_node, get_identifier ("bad_alloc"), 1);
if (flag_honor_std)
pop_namespace ();
newtype = build_exception_variant
(ptr_ftype_sizetype, add_exception_specifier
(NULL_TREE, bad_alloc_type_node, -1));
--- 6535,6553 ----
{
tree bad_alloc_type_node, newtype, deltype;
! tree ptr_ftype_sizetype;
!
if (flag_honor_std)
push_namespace (std_identifier);
bad_alloc_type_node = xref_tag
(class_type_node, get_identifier ("bad_alloc"), 1);
if (flag_honor_std)
pop_namespace ();
+ ptr_ftype_sizetype
+ = build_function_type (ptr_type_node,
+ tree_cons (NULL_TREE,
+ c_size_type_node,
+ void_list_node));
newtype = build_exception_variant
(ptr_ftype_sizetype, add_exception_specifier
(NULL_TREE, bad_alloc_type_node, -1));
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: PATCH: Table-ize builtins
[not found] ` <address>
2001-05-25 13:08 ` PATCH: Table-ize builtins Mark Mitchell
@ 2001-05-25 13:51 ` Gabriel Dos Reis
2001-05-26 4:42 ` Fergus Henderson
` (3 subsequent siblings)
5 siblings, 0 replies; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-05-25 13:51 UTC (permalink / raw)
To: Mark Mitchell; +Cc: gcc-patches
Mark Mitchell <mark@codesourcery.com> writes:
| I was trying to understand all of our builtins while producing the
| patches for the V3 yesterday. I couldn't; creating the builtins was
| strewn over multiple places and involved hundreds of lines of code
| creating function types and then passing mysterious parameters to
| builtin_function_2 and such.
Thanks for sorting these bits. I just went through them when trying to
produce a patch for the math stuff in V3. Thanks for making the code
much easier to read and understand.
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: PATCH: Table-ize builtins
[not found] ` <address>
2001-05-25 13:08 ` PATCH: Table-ize builtins Mark Mitchell
2001-05-25 13:51 ` Gabriel Dos Reis
@ 2001-05-26 4:42 ` Fergus Henderson
2001-05-26 5:06 ` Fergus Henderson
` (2 subsequent siblings)
5 siblings, 0 replies; 223+ messages in thread
From: Fergus Henderson @ 2001-05-26 4:42 UTC (permalink / raw)
To: Mark Mitchell; +Cc: gcc-patches
On 26-May-2001, Mark Mitchell <mark@codesourcery.com> wrote:
>
> (Totally parenthetically, what is the point of SMALL_STACK? It is
> used only to make `alloca' not a builtin (even though
> `__builtin_alloca' still is). I can imagine that using `alloca'
> wouldn't make a lot of sense on a machine with a small stack, but how
> is thunking to a library routine supposed to help? The manual
> documents this macro, but not why you'd would want to define it.)
I think the idea is that on machines with a small stack, the library routine
will implement alloca() so that it allocates on the heap (using malloc(),
as is done in libiberty/alloca.c), or in some other data area.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: < http://www.cs.mu.oz.au/~fjh > | -- the last words of T. S. Garp.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: PATCH: Table-ize builtins
[not found] ` <address>
` (2 preceding siblings ...)
2001-05-26 4:42 ` Fergus Henderson
@ 2001-05-26 5:06 ` Fergus Henderson
2001-05-26 6:23 ` Joseph S. Myers
2001-07-10 23:26 ` C++ PATCH: Fix PR2626 Mark Mitchell
5 siblings, 0 replies; 223+ messages in thread
From: Fergus Henderson @ 2001-05-26 5:06 UTC (permalink / raw)
To: Mark Mitchell; +Cc: gcc-patches
On 26-May-2001, Mark Mitchell <mark@codesourcery.com> wrote:
>
> + DEF_BUILTIN (ENUM, NAME, CLASS, TYPE, LIBTYPE, BOTH_P,
> + FALLBACK_P, NONANSI_P)
...
> + #define DEF_FALLBACK_BUILTIN(ENUM, NAME, TYPE) \
> + DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
> + false, true, false)
...
> + /* If SMALL_STACK is defined, then `alloca' is only defined in its
> + `__builtin' form. */
> + #if SMALL_STACK
> + DEF_FALLBACK_BUILTIN(BUILT_IN_ALLOCA,
> + "__builtin_alloca",
> + BT_FN_PTR_SIZE)
> + #else
> + DEF_EXT_LIB_BUILTIN(BUILT_IN_ALLOCA,
> + "__builtin_alloca",
> + BT_FN_PTR_SIZE)
> + #endif
I don't think using DEF_FALLBACK_BUILTIN there is correct, since that makes
NONANSI_P false, but alloca() is not standard, so NONANSI_P should be true.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: < http://www.cs.mu.oz.au/~fjh > | -- the last words of T. S. Garp.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: PATCH: Table-ize builtins
[not found] ` <address>
` (3 preceding siblings ...)
2001-05-26 5:06 ` Fergus Henderson
@ 2001-05-26 6:23 ` Joseph S. Myers
2001-05-26 14:26 ` Richard Henderson
2001-07-10 23:26 ` C++ PATCH: Fix PR2626 Mark Mitchell
5 siblings, 1 reply; 223+ messages in thread
From: Joseph S. Myers @ 2001-05-26 6:23 UTC (permalink / raw)
To: Mark Mitchell; +Cc: gcc-patches
On Sat, 26 May 2001, Mark Mitchell wrote:
> + Some builtins are actually two separate functions. For example,
> + for `strcmp' there are two builtin functions; `__builtin_strcmp'
> + and `strcmp' itself. Both behave identically. Other builtins
> + define only the `__builtin' variant. If BOTH_P is TRUE, then this
> + builtin has both variants; otherwise, it is has only the first
> + variant.
I think this patch broke 26_numerics/complex_value.cc, which now fails
with "undefined reference to `fsqrt'". The builtin __builtin_fsqrt
corresponds to sqrt, not fsqrt (as documented in extend.texi - I don't
know why it is called __builtin_fsqrt, though).
> + DEF_LIB_BUILTIN(BUILT_IN_FSQRT,
> + "__builtin_fsqrt",
> + BT_FN_DOUBLE_DOUBLE)
--
Joseph S. Myers
jsm28@cam.ac.uk
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: PATCH: Table-ize builtins
2001-05-26 6:23 ` Joseph S. Myers
@ 2001-05-26 14:26 ` Richard Henderson
2001-05-27 8:25 ` Gabriel Dos Reis
0 siblings, 1 reply; 223+ messages in thread
From: Richard Henderson @ 2001-05-26 14:26 UTC (permalink / raw)
To: Joseph S. Myers; +Cc: Mark Mitchell, gcc-patches
On Sat, May 26, 2001 at 02:22:53PM +0100, Joseph S. Myers wrote:
> The builtin __builtin_fsqrt corresponds to sqrt, not fsqrt
> (as documented in extend.texi - I don't know why it is called
> __builtin_fsqrt, though).
We should probably change it, as it's confusing.
r~
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: PATCH: Table-ize builtins
2001-05-26 14:26 ` Richard Henderson
@ 2001-05-27 8:25 ` Gabriel Dos Reis
2001-05-27 9:52 ` Joseph S. Myers
2001-05-27 16:16 ` Richard Henderson
0 siblings, 2 replies; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-05-27 8:25 UTC (permalink / raw)
To: Richard Henderson; +Cc: Joseph S. Myers, Mark Mitchell, gcc-patches
Richard Henderson <rth@redhat.com> writes:
| On Sat, May 26, 2001 at 02:22:53PM +0100, Joseph S. Myers wrote:
| > The builtin __builtin_fsqrt corresponds to sqrt, not fsqrt
| > (as documented in extend.texi - I don't know why it is called
| > __builtin_fsqrt, though).
|
| We should probably change it, as it's confusing.
Is a patch to that effect will be accepted for GCC-3.0?
Changing it in GCC-3.1 will be an ABI breakage.
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: PATCH: Table-ize builtins
2001-05-27 8:25 ` Gabriel Dos Reis
@ 2001-05-27 9:52 ` Joseph S. Myers
2001-05-27 16:16 ` Richard Henderson
1 sibling, 0 replies; 223+ messages in thread
From: Joseph S. Myers @ 2001-05-27 9:52 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: Richard Henderson, Mark Mitchell, gcc-patches
On 27 May 2001, Gabriel Dos Reis wrote:
> Richard Henderson <rth@redhat.com> writes:
>
> | On Sat, May 26, 2001 at 02:22:53PM +0100, Joseph S. Myers wrote:
> | > The builtin __builtin_fsqrt corresponds to sqrt, not fsqrt
> | > (as documented in extend.texi - I don't know why it is called
> | > __builtin_fsqrt, though).
> |
> | We should probably change it, as it's confusing.
>
> Is a patch to that effect will be accepted for GCC-3.0?
> Changing it in GCC-3.1 will be an ABI breakage.
The builtin has existed under the name __builtin_fsqrt since GCC 2.1 (and
was in a #if 0 block under that name back at least to 1.35), but hasn't
been documented under that name until 3.0. If the builtin name is
changed, I think it ought to be done before 3.0.
--
Joseph S. Myers
jsm28@cam.ac.uk
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: PATCH: Table-ize builtins
2001-05-27 8:25 ` Gabriel Dos Reis
2001-05-27 9:52 ` Joseph S. Myers
@ 2001-05-27 16:16 ` Richard Henderson
2001-05-27 17:43 ` Gabriel Dos Reis
1 sibling, 1 reply; 223+ messages in thread
From: Richard Henderson @ 2001-05-27 16:16 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: Joseph S. Myers, Mark Mitchell, gcc-patches
On Sun, May 27, 2001 at 05:25:08PM +0200, Gabriel Dos Reis wrote:
> Is a patch to that effect will be accepted for GCC-3.0?
Yes.
r~
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: PATCH: Table-ize builtins
2001-05-27 16:16 ` Richard Henderson
@ 2001-05-27 17:43 ` Gabriel Dos Reis
2001-05-27 18:59 ` Richard Henderson
0 siblings, 1 reply; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-05-27 17:43 UTC (permalink / raw)
To: Richard Henderson; +Cc: Joseph S. Myers, Mark Mitchell, gcc-patches
Richard Henderson <rth@redhat.com> writes:
| On Sun, May 27, 2001 at 05:25:08PM +0200, Gabriel Dos Reis wrote:
| > Is a patch to that effect will be accepted for GCC-3.0?
|
| Yes.
I've just fired a bootstrap with the below. OK to commit if testsuite
reveals no regression?
-- Gaby
gcc/
2001-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
* c-common.c (c_common_nodes_and_builtins): Change __builtin_fsqrt
to __builtin_sqrt.
* extend.texi (Other Builtins): Update documentation about
__builtin_sqrt.
libstdc++-v3/
2001-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
* include/c_std/bits/std_cmath.h (sqrt): Change __builtin_fsqrt to
__builtin_sqrt.
Index: gcc/c-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.c,v
retrieving revision 1.226.2.2
diff -p -r1.226.2.2 c-common.c
*** c-common.c 2001/05/13 07:09:51 1.226.2.2
--- c-common.c 2001/05/28 00:22:30
*************** c_common_nodes_and_builtins ()
*** 3357,3363 ****
builtin_function_2 ("__builtin_sqrtf", "sqrtf",
float_ftype_float, float_ftype_float,
BUILT_IN_FSQRT, BUILT_IN_NORMAL, 1, 0, 0);
! builtin_function_2 ("__builtin_fsqrt", "sqrt",
double_ftype_double, double_ftype_double,
BUILT_IN_FSQRT, BUILT_IN_NORMAL, 1, 0, 0);
builtin_function_2 ("__builtin_sqrtl", "sqrtl",
--- 3357,3363 ----
builtin_function_2 ("__builtin_sqrtf", "sqrtf",
float_ftype_float, float_ftype_float,
BUILT_IN_FSQRT, BUILT_IN_NORMAL, 1, 0, 0);
! builtin_function_2 ("__builtin_sqrt", "sqrt",
double_ftype_double, double_ftype_double,
BUILT_IN_FSQRT, BUILT_IN_NORMAL, 1, 0, 0);
builtin_function_2 ("__builtin_sqrtl", "sqrtl",
Index: gcc/extend.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/extend.texi,v
retrieving revision 1.92.2.13
diff -p -r1.92.2.13 extend.texi
*** extend.texi 2001/05/23 18:45:42 1.92.2.13
--- extend.texi 2001/05/28 00:22:33
*************** The following ISO C89 functions are reco
*** 3796,3803 ****
@code{strlen}, @code{strncat}, @code{strncmp}, @code{strncpy},
@code{strpbrk}, @code{strrchr}, @code{strspn}, and @code{strstr}. All
of these functions have corresponding versions prefixed with
! @code{__builtin_}, except that the version for @code{sqrt} is called
! @code{__builtin_fsqrt}.
GNU CC provides builtin versions of the ISO C99 floating point
comparison macros (that avoid raising exceptions for unordered
--- 3796,3802 ----
@code{strlen}, @code{strncat}, @code{strncmp}, @code{strncpy},
@code{strpbrk}, @code{strrchr}, @code{strspn}, and @code{strstr}. All
of these functions have corresponding versions prefixed with
! @code{__builtin_}.
GNU CC provides builtin versions of the ISO C99 floating point
comparison macros (that avoid raising exceptions for unordered
Index: libstdc++-v3/include/c_std/bits/std_cmath.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/c_std/bits/std_cmath.h,v
retrieving revision 1.6.2.4
diff -p -r1.6.2.4 std_cmath.h
*** std_cmath.h 2001/05/26 07:00:53 1.6.2.4
--- std_cmath.h 2001/05/28 00:22:36
*************** namespace std
*** 522,528 ****
inline double
sqrt(double __x)
! { return __builtin_fsqrt(__x); }
inline long double
sqrt(long double __x)
--- 522,528 ----
inline double
sqrt(double __x)
! { return __builtin_sqrt(__x); }
inline long double
sqrt(long double __x)
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: PATCH: Table-ize builtins
2001-05-27 17:43 ` Gabriel Dos Reis
@ 2001-05-27 18:59 ` Richard Henderson
2001-05-28 1:34 ` Gabriel Dos Reis
2001-06-03 22:26 ` Mark Mitchell
0 siblings, 2 replies; 223+ messages in thread
From: Richard Henderson @ 2001-05-27 18:59 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: Joseph S. Myers, Mark Mitchell, gcc-patches
On Mon, May 28, 2001 at 02:43:47AM +0200, Gabriel Dos Reis wrote:
> I've just fired a bootstrap with the below. OK to commit if testsuite
> reveals no regression?
Yep.
r~
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: PATCH: Table-ize builtins
2001-05-27 18:59 ` Richard Henderson
@ 2001-05-28 1:34 ` Gabriel Dos Reis
2001-06-07 16:50 ` Joseph S. Myers
2001-06-03 22:26 ` Mark Mitchell
1 sibling, 1 reply; 223+ messages in thread
From: Gabriel Dos Reis @ 2001-05-28 1:34 UTC (permalink / raw)
To: Richard Henderson
Cc: Gabriel Dos Reis, Joseph S. Myers, Mark Mitchell, gcc-patches
Richard Henderson <rth@redhat.com> writes:
| On Mon, May 28, 2001 at 02:43:47AM +0200, Gabriel Dos Reis wrote:
| > I've just fired a bootstrap with the below. OK to commit if testsuite
| > reveals no regression?
|
| Yep.
Done, thanks.
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: PATCH: Table-ize builtins
2001-05-27 18:59 ` Richard Henderson
2001-05-28 1:34 ` Gabriel Dos Reis
@ 2001-06-03 22:26 ` Mark Mitchell
1 sibling, 0 replies; 223+ messages in thread
From: Mark Mitchell @ 2001-06-03 22:26 UTC (permalink / raw)
To: rth; +Cc: gdr, jsm28, gcc-patches
>>>>> "Richard" == Richard Henderson <rth@redhat.com> writes:
>> I've just fired a bootstrap with the below. OK to commit if
>> testsuite reveals no regression?
Richard> Yep.
Thanks to all who participated in fixing this problem.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: PATCH: Table-ize builtins
2001-05-28 1:34 ` Gabriel Dos Reis
@ 2001-06-07 16:50 ` Joseph S. Myers
0 siblings, 0 replies; 223+ messages in thread
From: Joseph S. Myers @ 2001-06-07 16:50 UTC (permalink / raw)
To: Gabriel Dos Reis; +Cc: Richard Henderson, Mark Mitchell, gcc-patches
On 28 May 2001, Gabriel Dos Reis wrote:
> Richard Henderson <rth@redhat.com> writes:
>
> | On Mon, May 28, 2001 at 02:43:47AM +0200, Gabriel Dos Reis wrote:
> | > I've just fired a bootstrap with the below. OK to commit if testsuite
> | > reveals no regression?
> |
> | Yep.
>
> Done, thanks.
You don't appear to have applied a corresponding patch to the mainline,
only this patch to the branch - so the mainline still defines
__builtin_fsqrt falling back to fsqrt, and the test case in question is
still shown as failing by the automated regresion tester. Is there any
particular reason for this?
--
Joseph S. Myers
jsm28@cam.ac.uk
^ permalink raw reply [flat|nested] 223+ messages in thread
* C++ PATCH: Fix PR2626
[not found] ` <address>
` (4 preceding siblings ...)
2001-05-26 6:23 ` Joseph S. Myers
@ 2001-07-10 23:26 ` Mark Mitchell
5 siblings, 0 replies; 223+ messages in thread
From: Mark Mitchell @ 2001-07-10 23:26 UTC (permalink / raw)
To: gcc-patches
This patch fixes PR2626, a regression from GCC 2.95.x.
Tested on i686-pc-linux-gnu, applied to the branch and the trunk.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
2001-07-10 Mark Mitchell <mark@codesourcery.com>
* pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
variables.
Index: cp/pt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/pt.c,v
retrieving revision 1.516.2.15
diff -c -p -r1.516.2.15 pt.c
*** pt.c 2001/06/18 10:35:29 1.516.2.15
--- pt.c 2001/07/11 05:19:19
*************** tsubst_decl (t, args, type)
*** 5959,5970 ****
ctx = tsubst_aggr_type (DECL_CONTEXT (t), args,
/*complain=*/1,
in_decl, /*entering_scope=*/1);
else
{
/* Subsequent calls to pushdecl will fill this in. */
ctx = NULL_TREE;
! if (!DECL_NAMESPACE_SCOPE_P (t))
! local_p = 1;
}
/* Check to see if we already have this specialization. */
--- 5959,5971 ----
ctx = tsubst_aggr_type (DECL_CONTEXT (t), args,
/*complain=*/1,
in_decl, /*entering_scope=*/1);
+ else if (DECL_NAMESPACE_SCOPE_P (t))
+ ctx = DECL_CONTEXT (t);
else
{
/* Subsequent calls to pushdecl will fill this in. */
ctx = NULL_TREE;
! local_p = 1;
}
/* Check to see if we already have this specialization. */
Index: testsuite/g++.old-deja/g++.ns/template18.C
===================================================================
RCS file: template18.C
diff -N template18.C
*** /dev/null Tue May 5 13:32:27 1998
--- template18.C Tue Jul 10 22:19:23 2001
***************
*** 0 ****
--- 1,24 ----
+ // Build don't run:
+ // Origin: Andrey Slepuhin <pooh@msu.ru>
+
+ namespace A
+ {
+ int j;
+
+ template <typename val_t>
+ struct X
+ {
+ inline X ()
+ {
+ extern int j;
+ i = j;
+ }
+
+ int i;
+ };
+ }
+
+ int main ()
+ {
+ A::X<int> x;
+ }
^ permalink raw reply [flat|nested] 223+ messages in thread
* [PATCH V2 1/8] Update config.sub and config.guess.
2019-08-17 1:00 [PATCH V2 0/8] eBPF support for GCC Jose E. Marchesi
@ 2019-08-17 0:51 ` Jose E. Marchesi
2019-08-19 1:26 ` Jeff Law
2019-08-17 0:51 ` [PATCH V2 5/8] bpf: make target-supports.exp aware of eBPF Jose E. Marchesi
` (6 subsequent siblings)
7 siblings, 1 reply; 223+ messages in thread
From: Jose E. Marchesi @ 2019-08-17 0:51 UTC (permalink / raw)
To: gcc-patches
* config.sub: Import upstream version 2019-06-30.
* config.guess: Import upstream version 2019-07-24.
---
ChangeLog | 5 ++
config.guess | 264 +++++++++++++++++++++++++++++++++++++++++++++++------------
config.sub | 50 +++++------
3 files changed, 240 insertions(+), 79 deletions(-)
diff --git a/config.guess b/config.guess
index 8e2a58b864f..97ad0733304 100755
--- a/config.guess
+++ b/config.guess
@@ -2,7 +2,7 @@
# Attempt to guess a canonical system name.
# Copyright 1992-2019 Free Software Foundation, Inc.
-timestamp='2019-01-03'
+timestamp='2019-07-24'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -262,6 +262,9 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
*:SolidBSD:*:*)
echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
exit ;;
+ *:OS108:*:*)
+ echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE"
+ exit ;;
macppc:MirBSD:*:*)
echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
exit ;;
@@ -275,8 +278,8 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
echo "$UNAME_MACHINE"-unknown-redox
exit ;;
mips:OSF1:*.*)
- echo mips-dec-osf1
- exit ;;
+ echo mips-dec-osf1
+ exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
@@ -385,20 +388,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- set_cc_for_build
- SUN_ARCH=sparc
- # If there is a compiler, see if it is configured for 64-bit objects.
- # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
- # This test works for both compilers.
- if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
- if (echo '#ifdef __sparcv9'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- SUN_ARCH=sparcv9
- fi
- fi
- echo "$SUN_ARCH"-sun-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+ echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
exit ;;
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
echo i386-pc-auroraux"$UNAME_RELEASE"
@@ -998,22 +988,50 @@ EOF
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
set_cc_for_build
+ IS_GLIBC=0
+ test x"${LIBC}" = xgnu && IS_GLIBC=1
sed 's/^ //' << EOF > "$dummy.c"
#undef CPU
- #undef ${UNAME_MACHINE}
- #undef ${UNAME_MACHINE}el
+ #undef mips
+ #undef mipsel
+ #undef mips64
+ #undef mips64el
+ #if ${IS_GLIBC} && defined(_ABI64)
+ LIBCABI=gnuabi64
+ #else
+ #if ${IS_GLIBC} && defined(_ABIN32)
+ LIBCABI=gnuabin32
+ #else
+ LIBCABI=${LIBC}
+ #endif
+ #endif
+
+ #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+ CPU=mipsisa64r6
+ #else
+ #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+ CPU=mipsisa32r6
+ #else
+ #if defined(__mips64)
+ CPU=mips64
+ #else
+ CPU=mips
+ #endif
+ #endif
+ #endif
+
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=${UNAME_MACHINE}el
+ MIPS_ENDIAN=el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=${UNAME_MACHINE}
+ MIPS_ENDIAN=
#else
- CPU=
+ MIPS_ENDIAN=
#endif
#endif
EOF
- eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
- test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
+ eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`"
+ test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
;;
mips64el:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
@@ -1126,7 +1144,7 @@ EOF
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
- echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
+ echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}"
exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
@@ -1310,38 +1328,39 @@ EOF
echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
exit ;;
*:Darwin:*:*)
- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- set_cc_for_build
- if test "$UNAME_PROCESSOR" = unknown ; then
- UNAME_PROCESSOR=powerpc
+ UNAME_PROCESSOR=`uname -p`
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ if command -v xcode-select > /dev/null 2> /dev/null && \
+ ! xcode-select --print-path > /dev/null 2> /dev/null ; then
+ # Avoid executing cc if there is no toolchain installed as
+ # cc will be a stub that puts up a graphical alert
+ # prompting the user to install developer tools.
+ CC_FOR_BUILD=no_compiler_found
+ else
+ set_cc_for_build
fi
- if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
- if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- case $UNAME_PROCESSOR in
- i386) UNAME_PROCESSOR=x86_64 ;;
- powerpc) UNAME_PROCESSOR=powerpc64 ;;
- esac
- fi
- # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
- if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_PPC >/dev/null
- then
- UNAME_PROCESSOR=powerpc
- fi
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_PPC >/dev/null
+ then
+ UNAME_PROCESSOR=powerpc
fi
elif test "$UNAME_PROCESSOR" = i386 ; then
- # Avoid executing cc on OS X 10.9, as it ships with a stub
- # that puts up a graphical alert prompting to install
- # developer tools. Any system running Mac OS X 10.7 or
- # later (Darwin 11 and later) is required to have a 64-bit
- # processor. This is not true of the ARM version of Darwin
- # that Apple uses in portable devices.
- UNAME_PROCESSOR=x86_64
+ # uname -m returns i386 or x86_64
+ UNAME_PROCESSOR=$UNAME_MACHINE
fi
echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
exit ;;
@@ -1446,6 +1465,143 @@ EOF
exit ;;
esac
+# No uname command or uname output not recognized.
+set_cc_for_build
+cat > "$dummy.c" <<EOF
+#ifdef _SEQUENT_
+#include <sys/types.h>
+#include <sys/utsname.h>
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#include <signal.h>
+#if defined(_SIZE_T_) || defined(SIGLOST)
+#include <sys/utsname.h>
+#endif
+#endif
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+#include <sys/param.h>
+#if defined (BSD)
+#if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+#else
+#if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#else
+ printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#endif
+#else
+ printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#else
+#if defined(_SIZE_T_) || defined(SIGLOST)
+ struct utsname un;
+ uname (&un);
+ printf ("vax-dec-ultrix%s\n", un.release); exit (0);
+#else
+ printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#if defined(_SIZE_T_) || defined(SIGLOST)
+ struct utsname *un;
+ uname (&un);
+ printf ("mips-dec-ultrix%s\n", un.release); exit (0);
+#else
+ printf ("mips-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
+
echo "$0: unable to guess system type" >&2
case "$UNAME_MACHINE:$UNAME_SYSTEM" in
diff --git a/config.sub b/config.sub
index 75bb6a3135b..a318a468685 100755
--- a/config.sub
+++ b/config.sub
@@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2019 Free Software Foundation, Inc.
-timestamp='2019-01-01'
+timestamp='2019-06-30'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -337,17 +337,14 @@ case $1 in
basic_machine=m88k-harris
os=sysv3
;;
- hp300)
+ hp300 | hp300hpux)
basic_machine=m68k-hp
+ os=hpux
;;
hp300bsd)
basic_machine=m68k-hp
os=bsd
;;
- hp300hpux)
- basic_machine=m68k-hp
- os=hpux
- ;;
hppaosf)
basic_machine=hppa1.1-hp
os=osf
@@ -360,10 +357,6 @@ case $1 in
basic_machine=i386-mach
os=mach
;;
- vsta)
- basic_machine=i386-pc
- os=vsta
- ;;
isi68 | isi)
basic_machine=m68k-isi
os=sysv
@@ -612,6 +605,10 @@ case $1 in
basic_machine=vax-dec
os=vms
;;
+ vsta)
+ basic_machine=i386-pc
+ os=vsta
+ ;;
vxworks960)
basic_machine=i960-wrs
os=vxworks
@@ -822,7 +819,9 @@ case $basic_machine in
cpu=m68k
vendor=next
case $os in
- nextstep* )
+ openstep*)
+ ;;
+ nextstep*)
;;
ns2*)
os=nextstep2
@@ -919,7 +918,7 @@ case $basic_machine in
;;
*-*)
- # shellcheck disable=SC2162
+ # shellcheck disable=SC2162
IFS="-" read cpu vendor <<EOF
$basic_machine
EOF
@@ -1170,7 +1169,7 @@ case $cpu-$vendor in
| asmjs \
| ba \
| be32 | be64 \
- | bfin | bs2000 \
+ | bfin | bpf | bs2000 \
| c[123]* | c30 | [cjt]90 | c4x \
| c8051 | clipper | craynv | csky | cydra \
| d10v | d30v | dlx | dsp16xx \
@@ -1185,13 +1184,13 @@ case $cpu-$vendor in
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle \
- | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k | v70 | w65 \
- | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \
+ | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
+ | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
| m88110 | m88k | maxq | mb | mcore | mep | metag \
| microblaze | microblazeel \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
- | mips64 | mips64el \
+ | mips64 | mips64eb | mips64el \
| mips64octeon | mips64octeonel \
| mips64orion | mips64orionel \
| mips64r5900 | mips64r5900el \
@@ -1218,11 +1217,12 @@ case $cpu-$vendor in
| nds32 | nds32le | nds32be \
| nfp \
| nios | nios2 | nios2eb | nios2el \
- | none | np1 | ns16k | ns32k \
+ | none | np1 | ns16k | ns32k | nvptx \
| open8 \
| or1k* \
| or32 \
| orion \
+ | picochip \
| pdp10 | pdp11 | pj | pjl | pn | power \
| powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
| pru \
@@ -1230,7 +1230,8 @@ case $cpu-$vendor in
| riscv | riscv32 | riscv64 \
| rl78 | romp | rs6000 | rx \
| score \
- | sh | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
+ | sh | shl \
+ | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
| sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
| sparclite \
@@ -1240,10 +1241,11 @@ case $cpu-$vendor in
| tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
| tron \
| ubicom32 \
- | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+ | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
| vax \
| visium \
- | wasm32 \
+ | w65 \
+ | wasm32 | wasm64 \
| we32k \
| x86 | x86_64 | xc16x | xgate | xps100 \
| xstormy16 | xtensa* \
@@ -1345,7 +1347,7 @@ case $os in
| nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
| clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
| knetbsd* | mirbsd* | netbsd* \
- | bitrig* | openbsd* | solidbsd* | libertybsd* \
+ | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \
| ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
| bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
| ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
@@ -1363,7 +1365,8 @@ case $os in
| powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
| skyos* | haiku* | rdos* | toppers* | drops* | es* \
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
- | midnightbsd* | amdhsa* | unleashed* | emscripten*)
+ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
+ | nsk* | powerunix)
# Remember, each alternative MUST END IN *, to match a version number.
;;
qnx*)
@@ -1447,9 +1450,6 @@ case $os in
ns2)
os=nextstep2
;;
- nsk*)
- os=nsk
- ;;
# Preserve the version number of sinix5.
sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
--
2.11.0
^ permalink raw reply [flat|nested] 223+ messages in thread
* [PATCH V2 5/8] bpf: make target-supports.exp aware of eBPF
2019-08-17 1:00 [PATCH V2 0/8] eBPF support for GCC Jose E. Marchesi
2019-08-17 0:51 ` [PATCH V2 1/8] Update config.sub and config.guess Jose E. Marchesi
@ 2019-08-17 0:51 ` Jose E. Marchesi
2019-08-19 1:36 ` Jeff Law
2019-08-19 12:13 ` Segher Boessenkool
2019-08-17 0:51 ` [PATCH V2 6/8] bpf: adjust GCC testsuite to eBPF limitations Jose E. Marchesi
` (5 subsequent siblings)
7 siblings, 2 replies; 223+ messages in thread
From: Jose E. Marchesi @ 2019-08-17 0:51 UTC (permalink / raw)
To: gcc-patches
This patch makes the several effective target checks in
target-supports.exp to be aware of eBPF targets.
gcc/testsuite/ChangeLog:
* lib/target-supports.exp (check_effective_target_malloc): New
function.
(check_effective_target_trampolines): Adapt to eBPF.
(check_effective_target_stack_size): Likewise.
(dg-effective-target-value): Likewise.
(check_effective_target_indirect_jumps): Likewise.
(check_effective_target_nonlocal_goto): Likewise.
(check_effective_target_global_constructor): Likewise.
(check_effective_target_return_address): Likewise.
---
gcc/testsuite/ChangeLog | 11 +++++++++++
gcc/testsuite/lib/target-supports.exp | 27 +++++++++++++++++++--------
2 files changed, 30 insertions(+), 8 deletions(-)
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 300d22a2d65..8b6168626d8 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -526,7 +526,8 @@ proc check_effective_target_trampolines { } {
|| [istarget nvptx-*-*]
|| [istarget hppa2.0w-hp-hpux11.23]
|| [istarget hppa64-hp-hpux11.23]
- || [istarget pru-*-*] } {
+ || [istarget pru-*-*]
+ || [istarget bpf-*-*] } {
return 0;
}
return 1
@@ -538,6 +539,9 @@ proc check_effective_target_stack_size { } {
if [target_info exists gcc,stack_size] {
return 1
}
+ if [istarget bpf-*-*] {
+ return 1
+ }
return 0
}
@@ -546,7 +550,11 @@ proc check_effective_target_stack_size { } {
proc dg-effective-target-value { effective_target } {
if { "$effective_target" == "stack_size" } {
if [check_effective_target_stack_size] {
- return [target_info gcc,stack_size]
+ if [istarget bpf-*-*] {
+ return "512"
+ } else {
+ return [target_info gcc,stack_size]
+ }
}
}
@@ -781,7 +789,7 @@ proc add_options_for_tls { flags } {
# Return 1 if indirect jumps are supported, 0 otherwise.
proc check_effective_target_indirect_jumps {} {
- if { [istarget nvptx-*-*] } {
+ if { [istarget nvptx-*-*] || [istarget bpf-*-*] } {
return 0
}
return 1
@@ -790,7 +798,7 @@ proc check_effective_target_indirect_jumps {} {
# Return 1 if nonlocal goto is supported, 0 otherwise.
proc check_effective_target_nonlocal_goto {} {
- if { [istarget nvptx-*-*] } {
+ if { [istarget nvptx-*-*] || [istarget bpf-*-*] } {
return 0
}
return 1
@@ -799,10 +807,9 @@ proc check_effective_target_nonlocal_goto {} {
# Return 1 if global constructors are supported, 0 otherwise.
proc check_effective_target_global_constructor {} {
- if { [istarget nvptx-*-*] } {
- return 0
- }
- if { [istarget amdgcn-*-*] } {
+ if { [istarget nvptx-*-*]
+ || [istarget amdgcn-*-*]
+ || [istarget bpf-*-*] } {
return 0
}
return 1
@@ -825,6 +832,10 @@ proc check_effective_target_return_address {} {
if { [istarget nvptx-*-*] } {
return 0
}
+ # No notion of return address in eBPF.
+ if { [istarget bpf-*-*] } {
+ return 0
+ }
# It could be supported on amdgcn, but isn't yet.
if { [istarget amdgcn*-*-*] } {
return 0
--
2.11.0
^ permalink raw reply [flat|nested] 223+ messages in thread
* [PATCH V2 7/8] bpf: manual updates for eBPF
2019-08-17 1:00 [PATCH V2 0/8] eBPF support for GCC Jose E. Marchesi
` (3 preceding siblings ...)
2019-08-17 0:51 ` [PATCH V2 3/8] bpf: new libgcc port Jose E. Marchesi
@ 2019-08-17 0:51 ` Jose E. Marchesi
2019-08-19 6:15 ` Jeff Law
2019-08-17 0:51 ` [PATCH V2 4/8] bpf: gcc.target eBPF testsuite Jose E. Marchesi
` (2 subsequent siblings)
7 siblings, 1 reply; 223+ messages in thread
From: Jose E. Marchesi @ 2019-08-17 0:51 UTC (permalink / raw)
To: gcc-patches
gcc/ChangeLog:
* doc/invoke.texi (Option Summary): Cover eBPF.
(eBPF Options): New section.
* doc/extend.texi (BPF Built-in Functions): Likewise.
(BPF Kernel Helpers): Likewise.
---
gcc/ChangeLog | 7 +++
gcc/doc/extend.texi | 171 ++++++++++++++++++++++++++++++++++++++++++++++++++++
gcc/doc/invoke.texi | 30 +++++++++
3 files changed, 208 insertions(+)
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 2ba9b74811a..7b75326590c 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -13603,6 +13603,8 @@ instructions, but allow the compiler to schedule those calls.
* ARM ARMv8-M Security Extensions::
* AVR Built-in Functions::
* Blackfin Built-in Functions::
+* BPF Built-in Functions::
+* BPF Kernel Helpers::
* FR-V Built-in Functions::
* MIPS DSP Built-in Functions::
* MIPS Paired-Single Support::
@@ -14600,6 +14602,175 @@ void __builtin_bfin_csync (void)
void __builtin_bfin_ssync (void)
@end smallexample
+@node BPF Built-in Functions
+@subsection BPF Built-in Functions
+
+The following built-in functions are available for eBPF targets.
+
+@deftypefn {Built-in Function} unsigned long long __builtin_bpf_load_byte (unsigned long long @var{offset})
+Load a byte from the @code{struct sk_buff} packet data pointed by the register @code{%r6} and return it.
+@end deftypefn
+
+@deftypefn {Built-in Function} unsigned long long __builtin_bpf_load_half (unsigned long long @var{offset})
+Load 16-bits from the @code{struct sk_buff} packet data pointed by the register @code{%r6} and return it.
+@end deftypefn
+
+@deftypefn {Built-in Function} unsigned long long __builtin_bpf_load_word (unsigned long long @var{offset})
+Load 32-bits from the @code{struct sk_buff} packet data pointed by the register @code{%r6} and return it.
+@end deftypefn
+
+@node BPF Kernel Helpers
+@subsection BPF Kernel Helpers
+
+These built-in functions are available for calling kernel helpers, and
+they are available depending on the kernel version selected as the
+CPU.
+
+Rather than using the built-ins directly, it is preferred for programs
+to include @file{bpf-helpers.h} and use the wrappers defined there.
+
+For a full description of what the helpers do, the arguments they
+take, and the returned value, see the
+@file{linux/include/uapi/linux/bpf.h} in a Linux source tree.
+
+@smallexample
+void *__builtin_bpf_helper_map_lookup_elem (void *map, void *key)
+int __builtin_bpf_helper_map_update_elem (void *map, void *key,
+ void *value,
+ unsigned long long flags)
+int __builtin_bpf_helper_map_delete_elem (void *map, const void *key)
+int __builtin_bpf_helper_map_push_elem (void *map, const void *value,
+ unsigned long long flags)
+int __builtin_bpf_helper_map_pop_elem (void *map, void *value)
+int __builtin_bpf_helper_map_peek_elem (void *map, void *value)
+int __builtin_bpf_helper_clone_redirect (void *skb,
+ unsigned int ifindex,
+ unsigned long long flags)
+int __builtin_bpf_helper_skb_get_tunnel_key (void *ctx, void *key, int size, int flags)
+int __builtin_bpf_helper_skb_set_tunnel_key (void *ctx, void *key, int size, int flags)
+int __builtin_bpf_helper_skb_get_tunnel_opt (void *ctx, void *md, int size)
+int __builtin_bpf_helper_skb_set_tunnel_opt (void *ctx, void *md, int size)
+int __builtin_bpf_helper_skb_get_xfrm_state (void *ctx, int index, void *state,
+ int size, int flags)
+static unsigned long long __builtin_bpf_helper_skb_cgroup_id (void *ctx)
+static unsigned long long __builtin_bpf_helper_skb_ancestor_cgroup_id
+ (void *ctx, int level)
+int __builtin_bpf_helper_skb_vlan_push (void *ctx, __be16 vlan_proto, __u16 vlan_tci)
+int __builtin_bpf_helper_skb_vlan_pop (void *ctx)
+int __builtin_bpf_helper_skb_ecn_set_ce (void *ctx)
+
+int __builtin_bpf_helper_skb_load_bytes (void *ctx, int off, void *to, int len)
+int __builtin_bpf_helper_skb_load_bytes_relative (void *ctx, int off, void *to, int len, __u32 start_header)
+int __builtin_bpf_helper_skb_store_bytes (void *ctx, int off, void *from, int len, int flags)
+int __builtin_bpf_helper_skb_under_cgroup (void *ctx, void *map, int index)
+int __builtin_bpf_helper_skb_change_head (void *, int len, int flags)
+int __builtin_bpf_helper_skb_pull_data (void *, int len)
+int __builtin_bpf_helper_skb_change_proto (void *ctx, __be16 proto, __u64 flags)
+int __builtin_bpf_helper_skb_change_type (void *ctx, __u32 type)
+int __builtin_bpf_helper_skb_change_tail (void *ctx, __u32 len, __u64 flags)
+int __builtin_bpf_helper_skb_adjust_room (void *ctx, __s32 len_diff, __u32 mode,
+ unsigned long long flags)
+@end smallexample
+
+Other helpers:
+
+@smallexample
+int __builtin_bpf_helper_probe_read (void *dst, unsigned int size, void *src)
+unsigned long long __builtin_bpf_helper_ktime_get_ns (void)
+int __builtin_bpf_helper_trace_printk (const char *fmt, unsigned int fmt_size, ...)
+void __builtin_bpf_helper_tail_call (void *ctx, void *prog_array_map, unsigned int index)
+unsigned int __builtin_bpf_helper_get_smp_processor_id (void)
+unsigned long long __builtin_bpf_helper_get_current_pid_tgid (void)
+unsigned long long __builtin_bpf_helper_get_current_uid_gid (void)
+int __builtin_bpf_helper_get_current_comm (void *buf, unsigned int size_of_buf)
+unsigned long long __builtin_bpf_helper_perf_event_read (void *map, unsigned long long flags)
+
+int __builtin_bpf_helper_redirect (unsigned int ifindex, unsigned long long flags)
+int __builtin_bpf_helper_redirect_map (void *map, unsigned int key, unsigned long long flags)
+int __builtin_bpf_helper_perf_event_output (void *ctx,void *map, unsigned long long flags, void *data, unsigned long long size)
+int __builtin_bpf_helper_get_stackid (void *ctx, void *map, unsigned long long flags)
+int __builtin_bpf_helper_probe_write_user (void *dst, const void *src, unsigned int len)
+int __builtin_bpf_helper_current_task_under_cgroup (void *map, unsigned int index)
+
+static unsigned long long __builtin_bpf_helper_get_prandom_u32 (void)
+int __builtin_bpf_helper_xdp_adjust_head (void *ctx, int offset)
+int __builtin_bpf_helper_xdp_adjust_meta (void *ctx, int offset)
+int __builtin_bpf_helper_get_socket_cookie (void *ctx)
+int __builtin_bpf_helper_setsockopt (void *ctx, int level, int optname, void *optval,
+ int optlen)
+int __builtin_bpf_helper_getsockopt (void *ctx, int level, int optname, void *optval,
+ int optlen)
+int __builtin_bpf_helper_sock_ops_cb_flags_set (void *ctx, int flags)
+int __builtin_bpf_helper_sk_redirect_map (void *ctx, void *map, int key, int flags)
+int __builtin_bpf_helper_sk_redirect_hash (void *ctx, void *map, void *key, int flags)
+int __builtin_bpf_helper_sock_map_update (void *map, void *key, void *value,
+ unsigned long long flags)
+int __builtin_bpf_helper_sock_hash_update (void *map, void *key, void *value,
+ unsigned long long flags)
+int __builtin_bpf_helper_perf_event_read_value (void *map, unsigned long long flags,
+ void *buf, unsigned int buf_size)
+int __builtin_bpf_helper_perf_prog_read_value (void *ctx, void *buf,
+ unsigned int buf_size)
+
+int __builtin_bpf_helper_override_return (void *ctx, unsigned long rc)
+int __builtin_bpf_helper_msg_redirect_map (void *ctx, void *map, int key, int flags)
+int __builtin_bpf_helper_msg_redirect_hash (void *ctx,
+ void *map, void *key, int flags)
+int __builtin_bpf_helper_msg_apply_bytes (void *ctx, int len)
+int __builtin_bpf_helper_msg_cork_bytes (void *ctx, int len)
+int __builtin_bpf_helper_msg_pull_data (void *ctx, int start, int end, int flags)
+int __builtin_bpf_helper_msg_push_data (void *ctx, int start, int end, int flags)
+int __builtin_bpf_helper_msg_pop_data (void *ctx, int start, int cut, int flags)
+int __builtin_bpf_helper_bind (void *ctx, void *addr, int addr_len)
+int __builtin_bpf_helper_xdp_adjust_tail (void *ctx, int offset)
+int __builtin_bpf_helper_sk_select_reuseport (void *ctx, void *map, void *key, __u32 flags)
+int __builtin_bpf_helper_get_stack (void *ctx, void *buf, int size, int flags)
+int __builtin_bpf_helper_fib_lookup (void *ctx, struct bpf_fib_lookup *params,
+ int plen, __u32 flags)
+
+int __builtin_bpf_helper_lwt_push_encap (void *ctx, unsigned int type, void *hdr,
+ unsigned int len)
+int __builtin_bpf_helper_lwt_seg6_store_bytes (void *ctx, unsigned int offset,
+ void *from, unsigned int len)
+int __builtin_bpf_helper_lwt_seg6_action (void *ctx, unsigned int action, void *param,
+ unsigned int param_len)
+int __builtin_bpf_helper_lwt_seg6_adjust_srh (void *ctx, unsigned int offset,
+ unsigned int len)
+int __builtin_bpf_helper_rc_repeat (void *ctx)
+int __builtin_bpf_helper_rc_keydown (void *ctx, unsigned int protocol,
+ unsigned long long scancode, unsigned int toggle)
+static unsigned long long __builtin_bpf_helper_get_current_cgroup_id (void)
+static void *__builtin_bpf_helper_get_local_storage (void *map, unsigned long long flags)
+static struct bpf_sock *__builtin_bpf_helper_sk_lookup_tcp (void *ctx, void *tuple, int size, unsigned long long netns_id, unsigned long long flags)
+static struct bpf_sock *__builtin_bpf_helper_sk_lookup_udp (void *ctx, void *tuple, int size, unsigned long long netns_id, unsigned long long flags)
+int __builtin_bpf_helper_sk_release (struct bpf_sock *sk)
+int __builtin_bpf_helper_rc_pointer_rel (void *ctx, int rel_x, int rel_y)
+static void __builtin_bpf_helper_spin_lock (struct bpf_spin_lock *lock)
+static void __builtin_bpf_helper_spin_unlock (struct bpf_spin_lock *lock)
+
+static struct bpf_sock *__builtin_bpf_helper_sk_fullsock (struct bpf_sock *sk)
+static struct bpf_tcp_sock *__builtin_bpf_helper_tcp_sock (struct bpf_sock *sk)
+static struct bpf_sock *__builtin_bpf_helper_get_listener_sock (struct bpf_sock *sk)
+
+int __builtin_bpf_helper_l3_csum_replace (void *ctx, int off, int from, int to, int flags)
+int __builtin_bpf_helper_l4_csum_replace (void *ctx, int off, int from, int to, int flags)
+int __builtin_bpf_helper_csum_diff (void *from, int from_size, void *to, int to_size, int seed)
+
+static unsigned int __builtin_bpf_helper_get_cgroup_classid (void *ctx)
+static unsigned int __builtin_bpf_helper_get_route_realm (void *ctx)
+static unsigned int __builtin_bpf_helper_get_hash_recalc (void *ctx)
+static unsigned long long __builtin_bpf_helper_get_current_task (void *ctx)
+
+static long long __builtin_bpf_helper_csum_update (void *ctx, __u32 csum)
+static void __builtin_bpf_helper_set_hash_invalid (void *ctx)
+int __builtin_bpf_helper_get_numa_node_id (void)
+int __builtin_bpf_helper_probe_read_str (void *ctx, __u32 size,
+ const void *unsafe_ptr)
+static unsigned int __builtin_bpf_helper_get_socket_uid (void *ctx)
+static unsigned int __builtin_bpf_helper_set_hash (void *ctx, __u32 hash)
+@end smallexample
+
+
@node FR-V Built-in Functions
@subsection FR-V Built-in Functions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index ca111792885..621416aa40b 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -800,6 +800,9 @@ Objective-C and Objective-C++ Dialects}.
-msmall-text -mlarge-text @gol
-mmemory-latency=@var{time}}
+@emph{eBPF Options}
+@gccoptlist{-mbig-endian -mlittle-endian -mkernel=@var{version}}
+
@emph{FR30 Options}
@gccoptlist{-msmall-model -mno-lsim}
@@ -15660,6 +15663,7 @@ platform.
* C-SKY Options::
* Darwin Options::
* DEC Alpha Options::
+* eBPF Options::
* FR30 Options::
* FT32 Options::
* FRV Options::
@@ -19780,6 +19784,32 @@ Note that L3 is only valid for EV5.
@end table
@end table
+@node eBPF Options
+@subsection eBPF Options
+@cindex eBPF Options
+
+@table @gcctabopt
+@item -mkernel=@var{version}
+@opindex mkernel
+This specifies the minimum version of the kernel that will run the
+compiled program. GCC uses this version to determine which
+instructions to use, what kernel helpers to allow, etc. Currently,
+@var{version} can be one of @samp{4.0}, @samp{4.1}, @samp{4.2},
+@samp{4.3}, @samp{4.4}, @samp{4.5}, @samp{4.6}, @samp{4.7},
+@samp{4.8}, @samp{4.9}, @samp{4.10}, @samp{4.11}, @samp{4.12},
+@samp{4.13}, @samp{4.14}, @samp{4.15}, @samp{4.16}, @samp{4.17},
+@samp{4.18}, @samp{4.19}, @samp{4.20}, @samp{5.0}, @samp{5.1},
+@samp{5.2}, @samp{latest} and @samp{native}.
+
+@item -mbig-endian
+@opindex mbig-endian
+Generate code for a big-endian target.
+
+@item -mlittle-endian
+@opindex mlittle-endian
+Generate code for a little-endian target. This is the default.
+@end table
+
@node FR30 Options
@subsection FR30 Options
@cindex FR30 Options
--
2.11.0
^ permalink raw reply [flat|nested] 223+ messages in thread
* [PATCH V2 4/8] bpf: gcc.target eBPF testsuite
2019-08-17 1:00 [PATCH V2 0/8] eBPF support for GCC Jose E. Marchesi
` (4 preceding siblings ...)
2019-08-17 0:51 ` [PATCH V2 7/8] bpf: manual updates for eBPF Jose E. Marchesi
@ 2019-08-17 0:51 ` Jose E. Marchesi
2019-08-19 1:36 ` Jeff Law
2019-08-17 0:59 ` [PATCH V2 8/8] bpf: add myself as the maintainer for the eBPF port Jose E. Marchesi
2019-08-17 2:39 ` [PATCH V2 2/8] bpf: new GCC port Jose E. Marchesi
7 siblings, 1 reply; 223+ messages in thread
From: Jose E. Marchesi @ 2019-08-17 0:51 UTC (permalink / raw)
To: gcc-patches
This patch adds a new testsuite to gcc.target, with eBPF specific
tests.
Tests are included for:
- Target specific diagnostics.
- All built-in functions.
testsuite/ChangeLog:
* gcc.target/bpf/bpf.exp: New file.
* gcc.target/bpf/builtin-load.c: Likewise.
* cc.target/bpf/constant-calls.c: Likewise.
* gcc.target/bpf/diag-funargs.c: Likewise.
* cc.target/bpf/diag-indcalls.c: Likewise.
* gcc.target/bpf/helper-bind.c: Likewise.
* cc.target/bpf/helper-bpf-redirect.c: Likewise.
* gcc.target/bpf/helper-clone-redirect.c: Likewise.
* gcc.target/bpf/helper-csum-diff.c: Likewise.
* gcc.target/bpf/helper-csum-update.c: Likewise.
* gcc.target/bpf/helper-current-task-under-cgroup.c: Likewise.
* gcc.target/bpf/helper-fib-lookup.c: Likewise.
* gcc.target/bpf/helper-get-cgroup-classid.c: Likewise.
* gcc.target/bpf/helper-get-current-cgroup-id.c: Likewise.
* gcc.target/bpf/helper-get-current-comm.c: Likewise.
* gcc.target/bpf/helper-get-current-pid-tgid.c: Likewise.
* gcc.target/bpf/helper-get-current-task.c: Likewise.
* gcc.target/bpf/helper-get-current-uid-gid.c: Likewise.
* gcc.target/bpf/helper-get-hash-recalc.c: Likewise.
* gcc.target/bpf/helper-get-listener-sock.c: Likewise.
* gcc.target/bpf/helper-get-local-storage.c: Likewise.
* gcc.target/bpf/helper-get-numa-node-id.c: Likewise.
* gcc.target/bpf/helper-get-prandom-u32.c: Likewise.
* gcc.target/bpf/helper-get-route-realm.c: Likewise.
* gcc.target/bpf/helper-get-smp-processor-id.c: Likewise.
* gcc.target/bpf/helper-get-socket-cookie.c: Likewise.
* gcc.target/bpf/helper-get-socket-uid.c: Likewise.
* gcc.target/bpf/helper-getsockopt.c: Likewise.
* gcc.target/bpf/helper-get-stack.c: Likewise.
* gcc.target/bpf/helper-get-stackid.c: Likewise.
* gcc.target/bpf/helper-ktime-get-ns.c: Likewise.
* gcc.target/bpf/helper-l3-csum-replace.c: Likewise.
* gcc.target/bpf/helper-l4-csum-replace.c: Likewise.
* gcc.target/bpf/helper-lwt-push-encap.c: Likewise.
* gcc.target/bpf/helper-lwt-seg6-action.c: Likewise.
* gcc.target/bpf/helper-lwt-seg6-adjust-srh.c: Likewise.
* gcc.target/bpf/helper-lwt-seg6-store-bytes.c: Likewise.
* gcc.target/bpf/helper-map-delete-elem.c: Likewise.
* gcc.target/bpf/helper-map-lookup-elem.c: Likewise.
* gcc.target/bpf/helper-map-peek-elem.c: Likewise.
* gcc.target/bpf/helper-map-pop-elem.c: Likewise.
* gcc.target/bpf/helper-map-push-elem.c: Likewise.
* gcc.target/bpf/helper-map-update-elem.c: Likewise.
* gcc.target/bpf/helper-msg-apply-bytes.c: Likewise.
* gcc.target/bpf/helper-msg-cork-bytes.c: Likewise.
* gcc.target/bpf/helper-msg-pop-data.c: Likewise.
* gcc.target/bpf/helper-msg-pull-data.c: Likewise.
* gcc.target/bpf/helper-msg-push-data.c: Likewise.
* gcc.target/bpf/helper-msg-redirect-hash.c: Likewise.
* gcc.target/bpf/helper-msg-redirect-map.c: Likewise.
* gcc.target/bpf/helper-override-return.c: Likewise.
* gcc.target/bpf/helper-perf-event-output.c: Likewise.
* gcc.target/bpf/helper-perf-event-read.c: Likewise.
* gcc.target/bpf/helper-perf-event-read-value.c: Likewise.
* gcc.target/bpf/helper-perf-prog-read-value.c: Likewise.
* gcc.target/bpf/helper-probe-read.c: Likewise.
* gcc.target/bpf/helper-probe-read-str.c: Likewise.
* gcc.target/bpf/helper-probe-write-user.c: Likewise.
* gcc.target/bpf/helper-rc-keydown.c: Likewise.
* gcc.target/bpf/helper-rc-pointer-rel.c: Likewise.
* gcc.target/bpf/helper-rc-repeat.c: Likewise.
* gcc.target/bpf/helper-redirect-map.c: Likewise.
* gcc.target/bpf/helper-set-hash.c: Likewise.
* gcc.target/bpf/helper-set-hash-invalid.c: Likewise.
* gcc.target/bpf/helper-setsockopt.c: Likewise.
* gcc.target/bpf/helper-skb-adjust-room.c: Likewise.
* gcc.target/bpf/helper-skb-cgroup-id.c: Likewise.
* gcc.target/bpf/helper-skb-change-head.c: Likewise.
* gcc.target/bpf/helper-skb-change-proto.c: Likewise.
* gcc.target/bpf/helper-skb-change-tail.c: Likewise.
* gcc.target/bpf/helper-skb-change-type.c: Likewise.
* gcc.target/bpf/helper-skb-ecn-set-ce.c: Likewise.
* gcc.target/bpf/helper-skb-get-tunnel-key.c: Likewise.
* gcc.target/bpf/helper-skb-get-tunnel-opt.c: Likewise.
* gcc.target/bpf/helper-skb-get-xfrm-state.c: Likewise.
* gcc.target/bpf/helper-skb-load-bytes.c: Likewise.
* gcc.target/bpf/helper-skb-load-bytes-relative.c: Likewise.
* gcc.target/bpf/helper-skb-pull-data.c: Likewise.
* gcc.target/bpf/helper-skb-set-tunnel-key.c: Likewise.
* gcc.target/bpf/helper-skb-set-tunnel-opt.c: Likewise.
* gcc.target/bpf/helper-skb-store-bytes.c: Likewise.
* gcc.target/bpf/helper-skb-under-cgroup.c: Likewise.
* gcc.target/bpf/helper-skb-vlan-pop.c: Likewise.
* gcc.target/bpf/helper-skb-vlan-push.c: Likewise.
* gcc.target/bpf/helper-skc-lookup-tcp.c: Likewise.
* gcc.target/bpf/helper-sk-fullsock.c: Likewise.
* gcc.target/bpf/helper-sk-lookup-tcp.c: Likewise.
* gcc.target/bpf/helper-sk-lookup-upd.c: Likewise.
* gcc.target/bpf/helper-sk-redirect-hash.c: Likewise.
* gcc.target/bpf/helper-sk-redirect-map.c: Likewise.
* gcc.target/bpf/helper-sk-release.c: Likewise.
* gcc.target/bpf/helper-sk-select-reuseport.c: Likewise.
* gcc.target/bpf/helper-sk-storage-delete.c: Likewise.
* gcc.target/bpf/helper-sk-storage-get.c: Likewise.
* gcc.target/bpf/helper-sock-hash-update.c: Likewise.
* gcc.target/bpf/helper-sock-map-update.c: Likewise.
* gcc.target/bpf/helper-sock-ops-cb-flags-set.c: Likewise.
* gcc.target/bpf/helper-spin-lock.c: Likewise.
* gcc.target/bpf/helper-spin-unlock.c: Likewise.
* gcc.target/bpf/helper-strtol.c: Likewise.
* gcc.target/bpf/helper-strtoul.c: Likewise.
* gcc.target/bpf/helper-sysctl-get-current-value.c: Likewise.
* gcc.target/bpf/helper-sysctl-get-name.c: Likewise.
* gcc.target/bpf/helper-sysctl-get-new-value.c: Likewise.
* gcc.target/bpf/helper-sysctl-set-new-value.c: Likewise.
* gcc.target/bpf/helper-tail-call.c: Likewise.
* gcc.target/bpf/helper-tcp-check-syncookie.c: Likewise.
* gcc.target/bpf/helper-tcp-sock.c: Likewise.
* gcc.target/bpf/helper-trace-printk.c: Likewise.
* gcc.target/bpf/helper-xdp-adjust-head.c: Likewise.
* gcc.target/bpf/helper-xdp-adjust-meta.c: Likewise.
* gcc.target/bpf/helper-xdp-adjust-tail.c: Likewise.
* gcc.target/bpf/skb-ancestor-cgroup-id.c: Likewise.
* gcc.target/bpf/sync-fetch-and-add.c: Likewise.
---
gcc/testsuite/ChangeLog | 117 +++++++++++++++++++++
gcc/testsuite/gcc.target/bpf/bpf.exp | 41 ++++++++
gcc/testsuite/gcc.target/bpf/builtin-load.c | 20 ++++
gcc/testsuite/gcc.target/bpf/constant-calls.c | 19 ++++
gcc/testsuite/gcc.target/bpf/diag-funargs.c | 15 +++
gcc/testsuite/gcc.target/bpf/diag-indcalls.c | 11 ++
gcc/testsuite/gcc.target/bpf/helper-bind.c | 15 +++
gcc/testsuite/gcc.target/bpf/helper-bpf-redirect.c | 15 +++
.../gcc.target/bpf/helper-clone-redirect.c | 16 +++
gcc/testsuite/gcc.target/bpf/helper-csum-diff.c | 16 +++
gcc/testsuite/gcc.target/bpf/helper-csum-update.c | 15 +++
.../bpf/helper-current-task-under-cgroup.c | 15 +++
gcc/testsuite/gcc.target/bpf/helper-fib-lookup.c | 16 +++
.../gcc.target/bpf/helper-get-cgroup-classid.c | 14 +++
.../gcc.target/bpf/helper-get-current-cgroup-id.c | 13 +++
.../gcc.target/bpf/helper-get-current-comm.c | 15 +++
.../gcc.target/bpf/helper-get-current-pid-tgid.c | 13 +++
.../gcc.target/bpf/helper-get-current-task.c | 14 +++
.../gcc.target/bpf/helper-get-current-uid-gid.c | 13 +++
.../gcc.target/bpf/helper-get-hash-recalc.c | 14 +++
.../gcc.target/bpf/helper-get-listener-sock.c | 13 +++
.../gcc.target/bpf/helper-get-local-storage.c | 14 +++
.../gcc.target/bpf/helper-get-numa-node-id.c | 13 +++
.../gcc.target/bpf/helper-get-prandom-u32.c | 13 +++
.../gcc.target/bpf/helper-get-route-realm.c | 14 +++
.../gcc.target/bpf/helper-get-smp-processor-id.c | 13 +++
.../gcc.target/bpf/helper-get-socket-cookie.c | 14 +++
.../gcc.target/bpf/helper-get-socket-uid.c | 14 +++
gcc/testsuite/gcc.target/bpf/helper-get-stack.c | 16 +++
gcc/testsuite/gcc.target/bpf/helper-get-stackid.c | 15 +++
gcc/testsuite/gcc.target/bpf/helper-getsockopt.c | 17 +++
gcc/testsuite/gcc.target/bpf/helper-ktime-get-ns.c | 12 +++
.../gcc.target/bpf/helper-l3-csum-replace.c | 16 +++
.../gcc.target/bpf/helper-l4-csum-replace.c | 16 +++
.../gcc.target/bpf/helper-lwt-push-encap.c | 15 +++
.../gcc.target/bpf/helper-lwt-seg6-action.c | 16 +++
.../gcc.target/bpf/helper-lwt-seg6-adjust-srh.c | 16 +++
.../gcc.target/bpf/helper-lwt-seg6-store-bytes.c | 16 +++
.../gcc.target/bpf/helper-map-delete-elem.c | 14 +++
.../gcc.target/bpf/helper-map-lookup-elem.c | 12 +++
.../gcc.target/bpf/helper-map-peek-elem.c | 14 +++
gcc/testsuite/gcc.target/bpf/helper-map-pop-elem.c | 14 +++
.../gcc.target/bpf/helper-map-push-elem.c | 16 +++
.../gcc.target/bpf/helper-map-update-elem.c | 16 +++
.../gcc.target/bpf/helper-msg-apply-bytes.c | 15 +++
.../gcc.target/bpf/helper-msg-cork-bytes.c | 15 +++
gcc/testsuite/gcc.target/bpf/helper-msg-pop-data.c | 16 +++
.../gcc.target/bpf/helper-msg-pull-data.c | 16 +++
.../gcc.target/bpf/helper-msg-push-data.c | 16 +++
.../gcc.target/bpf/helper-msg-redirect-hash.c | 16 +++
.../gcc.target/bpf/helper-msg-redirect-map.c | 17 +++
.../gcc.target/bpf/helper-override-return.c | 15 +++
.../gcc.target/bpf/helper-perf-event-output.c | 17 +++
.../gcc.target/bpf/helper-perf-event-read-value.c | 16 +++
.../gcc.target/bpf/helper-perf-event-read.c | 15 +++
.../gcc.target/bpf/helper-perf-prog-read-value.c | 15 +++
.../gcc.target/bpf/helper-probe-read-str.c | 16 +++
gcc/testsuite/gcc.target/bpf/helper-probe-read.c | 15 +++
.../gcc.target/bpf/helper-probe-write-user.c | 15 +++
gcc/testsuite/gcc.target/bpf/helper-rc-keydown.c | 17 +++
.../gcc.target/bpf/helper-rc-pointer-rel.c | 15 +++
gcc/testsuite/gcc.target/bpf/helper-rc-repeat.c | 14 +++
gcc/testsuite/gcc.target/bpf/helper-redirect-map.c | 16 +++
.../gcc.target/bpf/helper-set-hash-invalid.c | 13 +++
gcc/testsuite/gcc.target/bpf/helper-set-hash.c | 15 +++
gcc/testsuite/gcc.target/bpf/helper-setsockopt.c | 19 ++++
gcc/testsuite/gcc.target/bpf/helper-sk-fullsock.c | 13 +++
.../gcc.target/bpf/helper-sk-lookup-tcp.c | 19 ++++
.../gcc.target/bpf/helper-sk-lookup-upd.c | 19 ++++
.../gcc.target/bpf/helper-sk-redirect-hash.c | 16 +++
.../gcc.target/bpf/helper-sk-redirect-map.c | 16 +++
gcc/testsuite/gcc.target/bpf/helper-sk-release.c | 14 +++
.../gcc.target/bpf/helper-sk-select-reuseport.c | 16 +++
.../gcc.target/bpf/helper-sk-storage-delete.c | 14 +++
.../gcc.target/bpf/helper-sk-storage-get.c | 16 +++
.../gcc.target/bpf/helper-skb-adjust-room.c | 17 +++
.../gcc.target/bpf/helper-skb-cgroup-id.c | 14 +++
.../gcc.target/bpf/helper-skb-change-head.c | 16 +++
.../gcc.target/bpf/helper-skb-change-proto.c | 16 +++
.../gcc.target/bpf/helper-skb-change-tail.c | 16 +++
.../gcc.target/bpf/helper-skb-change-type.c | 15 +++
.../gcc.target/bpf/helper-skb-ecn-set-ce.c | 14 +++
.../gcc.target/bpf/helper-skb-get-tunnel-key.c | 16 +++
.../gcc.target/bpf/helper-skb-get-tunnel-opt.c | 16 +++
.../gcc.target/bpf/helper-skb-get-xfrm-state.c | 17 +++
.../bpf/helper-skb-load-bytes-relative.c | 17 +++
.../gcc.target/bpf/helper-skb-load-bytes.c | 15 +++
.../gcc.target/bpf/helper-skb-pull-data.c | 15 +++
.../gcc.target/bpf/helper-skb-set-tunnel-key.c | 16 +++
.../gcc.target/bpf/helper-skb-set-tunnel-opt.c | 16 +++
.../gcc.target/bpf/helper-skb-store-bytes.c | 18 ++++
.../gcc.target/bpf/helper-skb-under-cgroup.c | 15 +++
gcc/testsuite/gcc.target/bpf/helper-skb-vlan-pop.c | 14 +++
.../gcc.target/bpf/helper-skb-vlan-push.c | 16 +++
.../gcc.target/bpf/helper-skc-lookup-tcp.c | 17 +++
.../gcc.target/bpf/helper-sock-hash-update.c | 16 +++
.../gcc.target/bpf/helper-sock-map-update.c | 16 +++
.../gcc.target/bpf/helper-sock-ops-cb-flags-set.c | 16 +++
gcc/testsuite/gcc.target/bpf/helper-spin-lock.c | 13 +++
gcc/testsuite/gcc.target/bpf/helper-spin-unlock.c | 13 +++
gcc/testsuite/gcc.target/bpf/helper-strtol.c | 18 ++++
gcc/testsuite/gcc.target/bpf/helper-strtoul.c | 18 ++++
.../bpf/helper-sysctl-get-current-value.c | 17 +++
.../gcc.target/bpf/helper-sysctl-get-name.c | 18 ++++
.../gcc.target/bpf/helper-sysctl-get-new-value.c | 17 +++
.../gcc.target/bpf/helper-sysctl-set-new-value.c | 17 +++
gcc/testsuite/gcc.target/bpf/helper-tail-call.c | 14 +++
.../gcc.target/bpf/helper-tcp-check-syncookie.c | 17 +++
gcc/testsuite/gcc.target/bpf/helper-tcp-sock.c | 13 +++
gcc/testsuite/gcc.target/bpf/helper-trace-printk.c | 13 +++
.../gcc.target/bpf/helper-xdp-adjust-head.c | 15 +++
.../gcc.target/bpf/helper-xdp-adjust-meta.c | 15 +++
.../gcc.target/bpf/helper-xdp-adjust-tail.c | 15 +++
.../gcc.target/bpf/skb-ancestor-cgroup-id.c | 16 +++
gcc/testsuite/gcc.target/bpf/sync-fetch-and-add.c | 14 +++
115 files changed, 1890 insertions(+)
create mode 100644 gcc/testsuite/gcc.target/bpf/bpf.exp
create mode 100644 gcc/testsuite/gcc.target/bpf/builtin-load.c
create mode 100644 gcc/testsuite/gcc.target/bpf/constant-calls.c
create mode 100644 gcc/testsuite/gcc.target/bpf/diag-funargs.c
create mode 100644 gcc/testsuite/gcc.target/bpf/diag-indcalls.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-bind.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-bpf-redirect.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-clone-redirect.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-csum-diff.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-csum-update.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-current-task-under-cgroup.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-fib-lookup.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-cgroup-classid.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-current-cgroup-id.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-current-comm.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-current-pid-tgid.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-current-task.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-current-uid-gid.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-hash-recalc.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-listener-sock.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-local-storage.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-numa-node-id.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-prandom-u32.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-route-realm.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-smp-processor-id.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-socket-cookie.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-socket-uid.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-stack.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-stackid.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-getsockopt.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-ktime-get-ns.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-l3-csum-replace.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-l4-csum-replace.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-lwt-push-encap.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-action.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-adjust-srh.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-store-bytes.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-map-delete-elem.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-map-lookup-elem.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-map-peek-elem.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-map-pop-elem.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-map-push-elem.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-map-update-elem.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-msg-apply-bytes.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-msg-cork-bytes.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-msg-pop-data.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-msg-pull-data.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-msg-push-data.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-msg-redirect-hash.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-msg-redirect-map.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-override-return.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-perf-event-output.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-perf-event-read-value.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-perf-event-read.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-perf-prog-read-value.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-probe-read-str.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-probe-read.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-probe-write-user.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-rc-keydown.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-rc-pointer-rel.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-rc-repeat.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-redirect-map.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-set-hash-invalid.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-set-hash.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-setsockopt.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-fullsock.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-lookup-tcp.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-lookup-upd.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-redirect-hash.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-redirect-map.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-release.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-select-reuseport.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-storage-delete.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-storage-get.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-adjust-room.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-cgroup-id.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-change-head.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-change-proto.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-change-tail.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-change-type.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-ecn-set-ce.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-get-tunnel-key.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-get-tunnel-opt.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-get-xfrm-state.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-load-bytes-relative.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-load-bytes.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-pull-data.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-set-tunnel-key.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-set-tunnel-opt.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-store-bytes.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-under-cgroup.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-vlan-pop.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-vlan-push.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skc-lookup-tcp.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sock-hash-update.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sock-map-update.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sock-ops-cb-flags-set.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-spin-lock.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-spin-unlock.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-strtol.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-strtoul.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sysctl-get-current-value.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sysctl-get-name.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sysctl-get-new-value.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sysctl-set-new-value.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-tail-call.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-tcp-check-syncookie.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-tcp-sock.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-trace-printk.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-head.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-meta.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-tail.c
create mode 100644 gcc/testsuite/gcc.target/bpf/skb-ancestor-cgroup-id.c
create mode 100644 gcc/testsuite/gcc.target/bpf/sync-fetch-and-add.c
diff --git a/gcc/testsuite/gcc.target/bpf/bpf.exp b/gcc/testsuite/gcc.target/bpf/bpf.exp
new file mode 100644
index 00000000000..e5c8cfcf6b0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/bpf.exp
@@ -0,0 +1,41 @@
+# Copyright (C) 2019 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Exit immediately if this isn't an eBPF target.
+if ![istarget bpf-*-*] then {
+ return
+}
+
+# Load support procs.
+load_lib gcc-dg.exp
+
+# If a testcase doesn't have special options, use these.
+global DEFAULT_CFLAGS
+if ![info exists DEFAULT_CFLAGS] then {
+ set DEFAULT_CFLAGS " -ansi -pedantic-errors"
+}
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
+ "" $DEFAULT_CFLAGS
+
+# All done.
+dg-finish
diff --git a/gcc/testsuite/gcc.target/bpf/builtin-load.c b/gcc/testsuite/gcc.target/bpf/builtin-load.c
new file mode 100644
index 00000000000..0f93d91fb6f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/builtin-load.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O0 -std=gnu99" } */
+
+void foo ()
+{
+ long long ll, off;
+
+ /* Indirect. */
+ ll = __builtin_bpf_load_byte (off);
+ ll = __builtin_bpf_load_half (off);
+ ll = __builtin_bpf_load_word (off);
+
+ /* Absolute. */
+ ll = __builtin_bpf_load_byte (0);
+ ll = __builtin_bpf_load_half (4);
+ ll = __builtin_bpf_load_word (8);
+}
+
+/* { dg-final { scan-assembler "ldindb\t%r.,0.*ldindh\t%r.,0.*ldindw\t%r.,0" } } */
+/* { dg-final { scan-assembler "ldabsb\t0.*ldabsh\t4.*ldabsw\t8" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/constant-calls.c b/gcc/testsuite/gcc.target/bpf/constant-calls.c
new file mode 100644
index 00000000000..6effc7dfdd4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/constant-calls.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+
+typedef void *(*T)(void);
+f1 ()
+{
+ ((T) 0)();
+}
+f2 ()
+{
+ ((T) 1000)();
+}
+f3 ()
+{
+ ((T) 1000000)();
+}
+
+/* { dg-final { scan-assembler "call\t0" } } */
+/* { dg-final { scan-assembler "call\t1000" } } */
+/* { dg-final { scan-assembler "call\t10000" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/diag-funargs.c b/gcc/testsuite/gcc.target/bpf/diag-funargs.c
new file mode 100644
index 00000000000..63b71f91b6d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/diag-funargs.c
@@ -0,0 +1,15 @@
+/* Verify proper errors are generated for functions taking too many
+ arguments. */
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+int
+foo (int a1, /* { dg-error "more than 5 arguments" } */
+ int a2,
+ int a3,
+ int a4,
+ int a5,
+ int a6)
+{
+ return a6;
+}
diff --git a/gcc/testsuite/gcc.target/bpf/diag-indcalls.c b/gcc/testsuite/gcc.target/bpf/diag-indcalls.c
new file mode 100644
index 00000000000..9263fcf7e1a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/diag-indcalls.c
@@ -0,0 +1,11 @@
+/* Verify proper errors are generated for indirect function calls. */
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+void (*fnp) (void);
+
+void
+foo ()
+{
+ (*fnp) ();
+} /* { dg-error "indirect call in function" } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-bind.c b/gcc/testsuite/gcc.target/bpf/helper-bind.c
new file mode 100644
index 00000000000..2d1fedc4ce8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-bind.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *ctx, *addr;
+ int addr_len;
+
+ ret = __builtin_bpf_helper_bind (ctx, addr, addr_len);
+}
+
+/* { dg-final { scan-assembler "call\t64" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-bpf-redirect.c b/gcc/testsuite/gcc.target/bpf/helper-bpf-redirect.c
new file mode 100644
index 00000000000..844c88d3e34
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-bpf-redirect.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ uint32_t ifindex;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_redirect (ifindex, flags);
+}
+
+/* { dg-final { scan-assembler "call\t23" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-clone-redirect.c b/gcc/testsuite/gcc.target/bpf/helper-clone-redirect.c
new file mode 100644
index 00000000000..a4fb8139234
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-clone-redirect.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb;
+ uint32_t ifindex;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_clone_redirect (skb, ifindex, flags);
+}
+
+/* { dg-final { scan-assembler "call\t13" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-csum-diff.c b/gcc/testsuite/gcc.target/bpf/helper-csum-diff.c
new file mode 100644
index 00000000000..ef38192efd3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-csum-diff.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int64_t ret;
+ int32_t *to, *from;
+ uint64_t to_size, from_size;
+ int seed;
+
+ ret = __builtin_bpf_helper_csum_diff (from, from_size, to, to_size, seed);
+}
+
+/* { dg-final { scan-assembler "call\t28" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-csum-update.c b/gcc/testsuite/gcc.target/bpf/helper-csum-update.c
new file mode 100644
index 00000000000..3cde8678cb5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-csum-update.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int64_t ret;
+ void *skb;
+ int csum;
+
+ ret = __builtin_bpf_helper_csum_update (skb, csum);
+}
+
+/* { dg-final { scan-assembler "call\t40" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-current-task-under-cgroup.c b/gcc/testsuite/gcc.target/bpf/helper-current-task-under-cgroup.c
new file mode 100644
index 00000000000..a7eb6e617e8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-current-task-under-cgroup.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *map;
+ uint32_t index;
+
+ ret = __builtin_bpf_helper_current_task_under_cgroup (map, index);
+}
+
+/* { dg-final { scan-assembler "call\t37" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-fib-lookup.c b/gcc/testsuite/gcc.target/bpf/helper-fib-lookup.c
new file mode 100644
index 00000000000..9a9f79d402c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-fib-lookup.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *ctx, *params;
+ int plen;
+ uint32_t flags;
+
+ ret = __builtin_bpf_helper_fib_lookup (ctx, params, plen, flags);
+}
+
+/* { dg-final { scan-assembler "call\t69" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-cgroup-classid.c b/gcc/testsuite/gcc.target/bpf/helper-get-cgroup-classid.c
new file mode 100644
index 00000000000..6cfd14d0ad1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-get-cgroup-classid.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ uint32_t ret;
+ void *skb;
+
+ ret = __builtin_bpf_helper_get_cgroup_classid (skb);
+}
+
+/* { dg-final { scan-assembler "call\t17" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-current-cgroup-id.c b/gcc/testsuite/gcc.target/bpf/helper-get-current-cgroup-id.c
new file mode 100644
index 00000000000..916dc4d3bb1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-get-current-cgroup-id.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ uint64_t ret;
+
+ ret = __builtin_bpf_helper_get_current_cgroup_id ();
+}
+
+/* { dg-final { scan-assembler "call\t80" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-current-comm.c b/gcc/testsuite/gcc.target/bpf/helper-get-current-comm.c
new file mode 100644
index 00000000000..efc330c3c98
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-get-current-comm.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *buf;
+ uint32_t size_of_buf;
+
+ ret = __builtin_bpf_helper_get_current_comm (buf, size_of_buf);
+}
+
+/* { dg-final { scan-assembler "call\t16" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-current-pid-tgid.c b/gcc/testsuite/gcc.target/bpf/helper-get-current-pid-tgid.c
new file mode 100644
index 00000000000..32d3e9c91d1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-get-current-pid-tgid.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ uint64_t ret;
+
+ ret = __builtin_bpf_helper_get_current_pid_tgid ();
+}
+
+/* { dg-final { scan-assembler "call\t14" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-current-task.c b/gcc/testsuite/gcc.target/bpf/helper-get-current-task.c
new file mode 100644
index 00000000000..c1290f6516e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-get-current-task.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ uint64_t ret;
+ void *ctx;
+
+ ret = __builtin_bpf_helper_get_current_task (ctx);
+}
+
+/* { dg-final { scan-assembler "call\t35" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-current-uid-gid.c b/gcc/testsuite/gcc.target/bpf/helper-get-current-uid-gid.c
new file mode 100644
index 00000000000..1dc2f9f41e5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-get-current-uid-gid.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ uint64_t ret;
+
+ ret = __builtin_bpf_helper_get_current_uid_gid ();
+}
+
+/* { dg-final { scan-assembler "call\t15" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-hash-recalc.c b/gcc/testsuite/gcc.target/bpf/helper-get-hash-recalc.c
new file mode 100644
index 00000000000..1db5d871c26
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-get-hash-recalc.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ uint32_t ret;
+ void *skb;
+
+ ret = __builtin_bpf_helper_get_hash_recalc (skb);
+}
+
+/* { dg-final { scan-assembler "call\t34" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-listener-sock.c b/gcc/testsuite/gcc.target/bpf/helper-get-listener-sock.c
new file mode 100644
index 00000000000..298da1c949b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-get-listener-sock.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ void *ret, *sk;
+
+ ret = __builtin_bpf_helper_get_listener_sock (sk);
+}
+
+/* { dg-final { scan-assembler "call\t98" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-local-storage.c b/gcc/testsuite/gcc.target/bpf/helper-get-local-storage.c
new file mode 100644
index 00000000000..88da67e99ae
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-get-local-storage.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ void *ret, *map;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_get_local_storage (map, flags);
+}
+
+/* { dg-final { scan-assembler "call\t81" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-numa-node-id.c b/gcc/testsuite/gcc.target/bpf/helper-get-numa-node-id.c
new file mode 100644
index 00000000000..628e1012152
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-get-numa-node-id.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+
+ ret = __builtin_bpf_helper_get_numa_node_id ();
+}
+
+/* { dg-final { scan-assembler "call\t42" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-prandom-u32.c b/gcc/testsuite/gcc.target/bpf/helper-get-prandom-u32.c
new file mode 100644
index 00000000000..6d3e5bc7a22
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-get-prandom-u32.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ uint32_t ret;
+
+ ret = __builtin_bpf_helper_get_prandom_u32 ();
+}
+
+/* { dg-final { scan-assembler "call\t7" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-route-realm.c b/gcc/testsuite/gcc.target/bpf/helper-get-route-realm.c
new file mode 100644
index 00000000000..5056c4adb1f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-get-route-realm.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ uint32_t ret;
+ void *skb;
+
+ ret = __builtin_bpf_helper_get_route_realm (skb);
+}
+
+/* { dg-final { scan-assembler "call\t24" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-smp-processor-id.c b/gcc/testsuite/gcc.target/bpf/helper-get-smp-processor-id.c
new file mode 100644
index 00000000000..655b87341df
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-get-smp-processor-id.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ uint32_t ret;
+
+ ret = __builtin_bpf_helper_get_smp_processor_id ();
+}
+
+/* { dg-final { scan-assembler "call\t8" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-socket-cookie.c b/gcc/testsuite/gcc.target/bpf/helper-get-socket-cookie.c
new file mode 100644
index 00000000000..afd17ddcd50
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-get-socket-cookie.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ uint64_t ret;
+ void *skb;
+
+ ret = __builtin_bpf_helper_get_socket_cookie (skb);
+}
+
+/* { dg-final { scan-assembler "call\t46" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-socket-uid.c b/gcc/testsuite/gcc.target/bpf/helper-get-socket-uid.c
new file mode 100644
index 00000000000..3a274c965f7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-get-socket-uid.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ uint32_t ret;
+ void *skb;
+
+ ret = __builtin_bpf_helper_get_socket_uid (skb);
+}
+
+/* { dg-final { scan-assembler "call\t47" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-stack.c b/gcc/testsuite/gcc.target/bpf/helper-get-stack.c
new file mode 100644
index 00000000000..bbcdeb58775
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-get-stack.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *regs, *buf;
+ uint32_t size;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_get_stack (regs, buf, size, flags);
+}
+
+/* { dg-final { scan-assembler "call\t67" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-get-stackid.c b/gcc/testsuite/gcc.target/bpf/helper-get-stackid.c
new file mode 100644
index 00000000000..319d15cd2fa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-get-stackid.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *ctx, *map;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_get_stackid (ctx, map, flags);
+}
+
+/* { dg-final { scan-assembler "call\t27" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-getsockopt.c b/gcc/testsuite/gcc.target/bpf/helper-getsockopt.c
new file mode 100644
index 00000000000..fb16f15e6ea
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-getsockopt.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *bpf_socket;
+ int level, optname, optlen;
+ char *optval;
+
+ ret = __builtin_bpf_helper_getsockopt (bpf_socket, level,
+ optname, optval, optlen);
+}
+
+/* { dg-final { scan-assembler "call\t57" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-ktime-get-ns.c b/gcc/testsuite/gcc.target/bpf/helper-ktime-get-ns.c
new file mode 100644
index 00000000000..405df057e30
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-ktime-get-ns.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ uint64_t ret;
+ ret = __builtin_bpf_helper_ktime_get_ns ();
+}
+
+/* { dg-final { scan-assembler "call\t5" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-l3-csum-replace.c b/gcc/testsuite/gcc.target/bpf/helper-l3-csum-replace.c
new file mode 100644
index 00000000000..ac17662c5d6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-l3-csum-replace.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb;
+ uint32_t offset;
+ uint64_t from, to, size;
+
+ ret = __builtin_bpf_helper_l3_csum_replace (skb, offset, from, to, size);
+}
+
+/* { dg-final { scan-assembler "call\t10" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-l4-csum-replace.c b/gcc/testsuite/gcc.target/bpf/helper-l4-csum-replace.c
new file mode 100644
index 00000000000..52b5514b6cb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-l4-csum-replace.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb;
+ uint32_t offset;
+ uint64_t from, to, size;
+
+ ret = __builtin_bpf_helper_l4_csum_replace (skb, offset, from, to, size);
+}
+
+/* { dg-final { scan-assembler "call\t11" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-lwt-push-encap.c b/gcc/testsuite/gcc.target/bpf/helper-lwt-push-encap.c
new file mode 100644
index 00000000000..1baed27fac7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-lwt-push-encap.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb, *hdr;
+ uint32_t type, len;
+
+ ret = __builtin_bpf_helper_lwt_push_encap (skb, type, hdr, len);
+}
+
+/* { dg-final { scan-assembler "call\t73" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-action.c b/gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-action.c
new file mode 100644
index 00000000000..ccc94c1af9d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-action.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb, *param;
+ uint32_t action, param_len;
+
+ ret = __builtin_bpf_helper_lwt_seg6_action (skb, action,
+ param, param_len);
+}
+
+/* { dg-final { scan-assembler "call\t76" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-adjust-srh.c b/gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-adjust-srh.c
new file mode 100644
index 00000000000..5e95124ad0f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-adjust-srh.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb;
+ uint32_t offset, delta;
+
+ ret = __builtin_bpf_helper_lwt_seg6_adjust_srh (skb, offset,
+ delta);
+}
+
+/* { dg-final { scan-assembler "call\t75" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-store-bytes.c b/gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-store-bytes.c
new file mode 100644
index 00000000000..098f97680f2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-store-bytes.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb, *from;
+ uint32_t offset, len;
+
+ ret = __builtin_bpf_helper_lwt_seg6_store_bytes (skb, offset,
+ from, len);
+}
+
+/* { dg-final { scan-assembler "call\t74" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-map-delete-elem.c b/gcc/testsuite/gcc.target/bpf/helper-map-delete-elem.c
new file mode 100644
index 00000000000..b8a6cdec4ee
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-map-delete-elem.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+char *map () { return 0; }
+
+void
+foo ()
+{
+ int ret;
+ char *key = 0;
+
+ ret = __builtin_bpf_helper_map_delete_elem (map (), key);
+}
+
+/* { dg-final { scan-assembler "call\t3" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-map-lookup-elem.c b/gcc/testsuite/gcc.target/bpf/helper-map-lookup-elem.c
new file mode 100644
index 00000000000..839cfc423a7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-map-lookup-elem.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+
+char *map () { return 0; }
+
+void
+foo ()
+{
+ char *key = 0, *value = 0;
+ value = __builtin_bpf_helper_map_lookup_elem (map (), key);
+}
+
+/* { dg-final { scan-assembler "call\t1" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-map-peek-elem.c b/gcc/testsuite/gcc.target/bpf/helper-map-peek-elem.c
new file mode 100644
index 00000000000..6d0acb1dcb7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-map-peek-elem.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+char *map () { return 0; }
+
+void
+foo ()
+{
+ int ret;
+ char *value = 0;
+
+ ret = __builtin_bpf_helper_map_peek_elem (map (), value);
+}
+
+/* { dg-final { scan-assembler "call\t89" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-map-pop-elem.c b/gcc/testsuite/gcc.target/bpf/helper-map-pop-elem.c
new file mode 100644
index 00000000000..71a7851ca9c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-map-pop-elem.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+char *map () { return 0; }
+
+void
+foo ()
+{
+ int ret;
+ char *value = 0;
+
+ ret = __builtin_bpf_helper_map_pop_elem (map (), value);
+}
+
+/* { dg-final { scan-assembler "call\t88" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-map-push-elem.c b/gcc/testsuite/gcc.target/bpf/helper-map-push-elem.c
new file mode 100644
index 00000000000..53bc0ac5dd7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-map-push-elem.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-std=gnu99" } */
+
+char *map () { return 0; }
+
+void
+foo ()
+{
+ int ret;
+ char *value = 0;
+ long long flags = 0;
+
+ ret = __builtin_bpf_helper_map_push_elem (map (), value, flags);
+}
+
+/* { dg-final { scan-assembler "call\t87" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-map-update-elem.c b/gcc/testsuite/gcc.target/bpf/helper-map-update-elem.c
new file mode 100644
index 00000000000..6281442ba3d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-map-update-elem.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-std=gnu99" } */
+
+char *map () { return 0; }
+
+void
+foo ()
+{
+ int ret;
+ long long flags = 0;
+ char *key = 0, *value = 0;
+
+ ret = __builtin_bpf_helper_map_update_elem (map (), key, value, flags);
+}
+
+/* { dg-final { scan-assembler "call\t2" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-msg-apply-bytes.c b/gcc/testsuite/gcc.target/bpf/helper-msg-apply-bytes.c
new file mode 100644
index 00000000000..3b831acad64
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-msg-apply-bytes.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *msg;
+ uint32_t bytes;
+
+ ret = __builtin_bpf_helper_msg_apply_bytes (msg, bytes);
+}
+
+/* { dg-final { scan-assembler "call\t61" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-msg-cork-bytes.c b/gcc/testsuite/gcc.target/bpf/helper-msg-cork-bytes.c
new file mode 100644
index 00000000000..2c4ee218832
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-msg-cork-bytes.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *msg;
+ uint32_t bytes;
+
+ ret = __builtin_bpf_helper_msg_cork_bytes (msg, bytes);
+}
+
+/* { dg-final { scan-assembler "call\t62" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-msg-pop-data.c b/gcc/testsuite/gcc.target/bpf/helper-msg-pop-data.c
new file mode 100644
index 00000000000..377c036603e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-msg-pop-data.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb;
+ uint32_t start, pop;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_msg_pop_data (skb, start, pop, flags);
+}
+
+/* { dg-final { scan-assembler "call\t91" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-msg-pull-data.c b/gcc/testsuite/gcc.target/bpf/helper-msg-pull-data.c
new file mode 100644
index 00000000000..ef27493122b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-msg-pull-data.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *msg;
+ uint32_t start, end;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_msg_pull_data (msg, start, end, flags);
+}
+
+/* { dg-final { scan-assembler "call\t63" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-msg-push-data.c b/gcc/testsuite/gcc.target/bpf/helper-msg-push-data.c
new file mode 100644
index 00000000000..9e256bc5ca7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-msg-push-data.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb;
+ uint32_t start, len;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_msg_push_data (skb, start, len, flags);
+}
+
+/* { dg-final { scan-assembler "call\t90" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-msg-redirect-hash.c b/gcc/testsuite/gcc.target/bpf/helper-msg-redirect-hash.c
new file mode 100644
index 00000000000..2e9d4137d66
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-msg-redirect-hash.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *msg, *map, *key;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_msg_redirect_hash (msg, map, key,
+ flags);
+}
+
+/* { dg-final { scan-assembler "call\t71" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-msg-redirect-map.c b/gcc/testsuite/gcc.target/bpf/helper-msg-redirect-map.c
new file mode 100644
index 00000000000..f5f8405e324
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-msg-redirect-map.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *msg, *map;
+ uint64_t key;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_msg_redirect_map (msg, map, key,
+ flags);
+}
+
+/* { dg-final { scan-assembler "call\t60" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-override-return.c b/gcc/testsuite/gcc.target/bpf/helper-override-return.c
new file mode 100644
index 00000000000..3bd5424353f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-override-return.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *regs;
+ uint64_t rc;
+
+ ret = __builtin_bpf_helper_override_return (regs, rc);
+}
+
+/* { dg-final { scan-assembler "call\t58" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-perf-event-output.c b/gcc/testsuite/gcc.target/bpf/helper-perf-event-output.c
new file mode 100644
index 00000000000..afb32010bdd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-perf-event-output.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *ctx, *map;
+ uint64_t flags;
+ void *data;
+ uint64_t size;
+
+ ret = __builtin_bpf_helper_perf_event_output (ctx, map, flags, data, size);
+}
+
+/* { dg-final { scan-assembler "call\t25" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-perf-event-read-value.c b/gcc/testsuite/gcc.target/bpf/helper-perf-event-read-value.c
new file mode 100644
index 00000000000..1d512c9ec65
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-perf-event-read-value.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *map, *buf;
+ uint64_t flags;
+ uint64_t buf_size;
+
+ ret = __builtin_bpf_helper_perf_event_read_value (map, flags, buf, buf_size);
+}
+
+/* { dg-final { scan-assembler "call\t55" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-perf-event-read.c b/gcc/testsuite/gcc.target/bpf/helper-perf-event-read.c
new file mode 100644
index 00000000000..f099a09d66f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-perf-event-read.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ uint64_t ret;
+ void *map;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_perf_event_read (map, flags);
+}
+
+/* { dg-final { scan-assembler "call\t22" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-perf-prog-read-value.c b/gcc/testsuite/gcc.target/bpf/helper-perf-prog-read-value.c
new file mode 100644
index 00000000000..00c4a3a78b5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-perf-prog-read-value.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *ctx, *buf;
+ uint64_t buf_size;
+
+ ret = __builtin_bpf_helper_perf_prog_read_value (ctx, buf, buf_size);
+}
+
+/* { dg-final { scan-assembler "call\t56" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-probe-read-str.c b/gcc/testsuite/gcc.target/bpf/helper-probe-read-str.c
new file mode 100644
index 00000000000..fd04760221d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-probe-read-str.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ int size;
+ void *dst;
+ const void *unsafe_ptr;
+
+ ret = __builtin_bpf_helper_probe_read_str (dst, size, unsafe_ptr);
+}
+
+/* { dg-final { scan-assembler "call\t45" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-probe-read.c b/gcc/testsuite/gcc.target/bpf/helper-probe-read.c
new file mode 100644
index 00000000000..a77a907767b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-probe-read.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *src, *dst;
+ uint32_t size;
+
+ ret = __builtin_bpf_helper_probe_read (dst, size, src);
+}
+
+/* { dg-final { scan-assembler "call\t4" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-probe-write-user.c b/gcc/testsuite/gcc.target/bpf/helper-probe-write-user.c
new file mode 100644
index 00000000000..bf226206769
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-probe-write-user.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *dst, *src;
+ uint32_t len;
+
+ ret = __builtin_bpf_helper_probe_write_user (dst, src, len);
+}
+
+/* { dg-final { scan-assembler "call\t36" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-rc-keydown.c b/gcc/testsuite/gcc.target/bpf/helper-rc-keydown.c
new file mode 100644
index 00000000000..58e9395dbeb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-rc-keydown.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *ctx;
+ uint32_t protocol, toggle;
+ uint64_t scancode;
+
+ ret = __builtin_bpf_helper_rc_keydown (ctx, protocol,
+ scancode, toggle);
+}
+
+/* { dg-final { scan-assembler "call\t78" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-rc-pointer-rel.c b/gcc/testsuite/gcc.target/bpf/helper-rc-pointer-rel.c
new file mode 100644
index 00000000000..e776bc75963
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-rc-pointer-rel.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *ctx;
+ int32_t rel_x, rel_y;
+
+ ret = __builtin_bpf_helper_rc_pointer_rel (ctx, rel_x, rel_y);
+}
+
+/* { dg-final { scan-assembler "call\t92" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-rc-repeat.c b/gcc/testsuite/gcc.target/bpf/helper-rc-repeat.c
new file mode 100644
index 00000000000..0ebc7de5bdf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-rc-repeat.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *ctx;
+
+ ret = __builtin_bpf_helper_rc_repeat (ctx);
+}
+
+/* { dg-final { scan-assembler "call\t77" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-redirect-map.c b/gcc/testsuite/gcc.target/bpf/helper-redirect-map.c
new file mode 100644
index 00000000000..daeecc2a01e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-redirect-map.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *map;
+ uint32_t key;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_redirect_map (map, key, flags);
+}
+
+/* { dg-final { scan-assembler "call\t51" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-set-hash-invalid.c b/gcc/testsuite/gcc.target/bpf/helper-set-hash-invalid.c
new file mode 100644
index 00000000000..4bc63ffa063
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-set-hash-invalid.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ void *skb;
+
+ __builtin_bpf_helper_set_hash_invalid (skb);
+}
+
+/* { dg-final { scan-assembler "call\t41" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-set-hash.c b/gcc/testsuite/gcc.target/bpf/helper-set-hash.c
new file mode 100644
index 00000000000..d01ae6eb268
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-set-hash.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ uint32_t ret;
+ void *skb;
+ uint32_t hash;
+
+ ret = __builtin_bpf_helper_set_hash (skb, hash);
+}
+
+/* { dg-final { scan-assembler "call\t48" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-setsockopt.c b/gcc/testsuite/gcc.target/bpf/helper-setsockopt.c
new file mode 100644
index 00000000000..6f3b450639e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-setsockopt.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *bpf_socket;
+ int level;
+ int optname;
+ void *optval;
+ int optlen;
+
+ ret = __builtin_bpf_helper_setsockopt (bpf_socket, level, optname,
+ optval, optlen);
+}
+
+/* { dg-final { scan-assembler "call\t49" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sk-fullsock.c b/gcc/testsuite/gcc.target/bpf/helper-sk-fullsock.c
new file mode 100644
index 00000000000..abe813d94f6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-sk-fullsock.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ void *ret, *sk;
+
+ ret = __builtin_bpf_helper_sk_fullsock (sk);
+}
+
+/* { dg-final { scan-assembler "call\t95" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sk-lookup-tcp.c b/gcc/testsuite/gcc.target/bpf/helper-sk-lookup-tcp.c
new file mode 100644
index 00000000000..4408640a6b2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-sk-lookup-tcp.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ void *ret;
+ void *ctx, *tuple;
+ uint32_t tuple_size;
+ uint64_t netns, flags;
+
+ ret = __builtin_bpf_helper_sk_lookup_tcp (ctx,
+ tuple,
+ tuple_size,
+ netns, flags);
+}
+
+/* { dg-final { scan-assembler "call\t84" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sk-lookup-upd.c b/gcc/testsuite/gcc.target/bpf/helper-sk-lookup-upd.c
new file mode 100644
index 00000000000..4c50f9c6327
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-sk-lookup-upd.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ void *ret;
+ void *ctx, *tuple;
+ uint32_t tuple_size;
+ uint64_t netns, flags;
+
+ ret = __builtin_bpf_helper_sk_lookup_udp (ctx,
+ tuple,
+ tuple_size,
+ netns, flags);
+}
+
+/* { dg-final { scan-assembler "call\t85" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sk-redirect-hash.c b/gcc/testsuite/gcc.target/bpf/helper-sk-redirect-hash.c
new file mode 100644
index 00000000000..7047c9f1290
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-sk-redirect-hash.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb, *map, *key;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_sk_redirect_hash (skb, map, key,
+ flags);
+}
+
+/* { dg-final { scan-assembler "call\t72" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sk-redirect-map.c b/gcc/testsuite/gcc.target/bpf/helper-sk-redirect-map.c
new file mode 100644
index 00000000000..5afb0ac4100
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-sk-redirect-map.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *ctx, *map;
+ uint32_t key;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_sk_redirect_map (ctx, map, key, flags);
+}
+
+/* { dg-final { scan-assembler "call\t52" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sk-release.c b/gcc/testsuite/gcc.target/bpf/helper-sk-release.c
new file mode 100644
index 00000000000..f054c90652c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-sk-release.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *sock;
+
+ ret = __builtin_bpf_helper_sk_release (sock);
+}
+
+/* { dg-final { scan-assembler "call\t86" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sk-select-reuseport.c b/gcc/testsuite/gcc.target/bpf/helper-sk-select-reuseport.c
new file mode 100644
index 00000000000..399ad2c0231
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-sk-select-reuseport.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *reuse, *map, *key;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_sk_select_reuseport (reuse, map,
+ key, flags);
+}
+
+/* { dg-final { scan-assembler "call\t82" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sk-storage-delete.c b/gcc/testsuite/gcc.target/bpf/helper-sk-storage-delete.c
new file mode 100644
index 00000000000..07c5875d930
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-sk-storage-delete.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *map, *sk;
+
+ ret = __builtin_bpf_helper_sk_storage_delete (map, sk);
+}
+
+/* { dg-final { scan-assembler "call\t108" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sk-storage-get.c b/gcc/testsuite/gcc.target/bpf/helper-sk-storage-get.c
new file mode 100644
index 00000000000..a199ef0ae64
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-sk-storage-get.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ void *ret;
+ void *map, *sk, *value;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_sk_storage_get (map, sk, value,
+ flags);
+}
+
+/* { dg-final { scan-assembler "call\t107" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-adjust-room.c b/gcc/testsuite/gcc.target/bpf/helper-skb-adjust-room.c
new file mode 100644
index 00000000000..88196f5e070
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-skb-adjust-room.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb;
+ int32_t len_diff;
+ uint32_t mode;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_skb_adjust_room (skb, len_diff, mode, flags);
+}
+
+/* { dg-final { scan-assembler "call\t50" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-cgroup-id.c b/gcc/testsuite/gcc.target/bpf/helper-skb-cgroup-id.c
new file mode 100644
index 00000000000..7c9021e1763
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-skb-cgroup-id.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ uint64_t ret;
+ void *skb;
+
+ ret = __builtin_bpf_helper_skb_cgroup_id (skb);
+}
+
+/* { dg-final { scan-assembler "call\t79" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-change-head.c b/gcc/testsuite/gcc.target/bpf/helper-skb-change-head.c
new file mode 100644
index 00000000000..de6281539fd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-skb-change-head.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb;
+ uint32_t len;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_skb_change_head (skb, len, flags);
+}
+
+/* { dg-final { scan-assembler "call\t43" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-change-proto.c b/gcc/testsuite/gcc.target/bpf/helper-skb-change-proto.c
new file mode 100644
index 00000000000..5738f3cc59b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-skb-change-proto.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb;
+ int16_t proto;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_skb_change_proto (skb, proto, flags);
+}
+
+/* { dg-final { scan-assembler "call\t31" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-change-tail.c b/gcc/testsuite/gcc.target/bpf/helper-skb-change-tail.c
new file mode 100644
index 00000000000..1fb6b45cd1b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-skb-change-tail.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb;
+ uint32_t len;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_skb_change_tail (skb, len, flags);
+}
+
+/* { dg-final { scan-assembler "call\t38" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-change-type.c b/gcc/testsuite/gcc.target/bpf/helper-skb-change-type.c
new file mode 100644
index 00000000000..bcf22cebc28
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-skb-change-type.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb;
+ uint32_t type;
+
+ ret = __builtin_bpf_helper_skb_change_type (skb, type);
+}
+
+/* { dg-final { scan-assembler "call\t32" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-ecn-set-ce.c b/gcc/testsuite/gcc.target/bpf/helper-skb-ecn-set-ce.c
new file mode 100644
index 00000000000..f769993f120
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-skb-ecn-set-ce.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb;
+
+ ret = __builtin_bpf_helper_skb_ecn_set_ce (skb);
+}
+
+/* { dg-final { scan-assembler "call\t97" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-get-tunnel-key.c b/gcc/testsuite/gcc.target/bpf/helper-skb-get-tunnel-key.c
new file mode 100644
index 00000000000..0d4db236865
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-skb-get-tunnel-key.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb, *key;
+ uint32_t size;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_skb_get_tunnel_key (skb, key, size, flags);
+}
+
+/* { dg-final { scan-assembler "call\t20" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-get-tunnel-opt.c b/gcc/testsuite/gcc.target/bpf/helper-skb-get-tunnel-opt.c
new file mode 100644
index 00000000000..9428657b932
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-skb-get-tunnel-opt.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb;
+ uint8_t *opt;
+ uint32_t size;
+
+ ret = __builtin_bpf_helper_skb_get_tunnel_opt (skb, opt, size);
+}
+
+/* { dg-final { scan-assembler "call\t29" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-get-xfrm-state.c b/gcc/testsuite/gcc.target/bpf/helper-skb-get-xfrm-state.c
new file mode 100644
index 00000000000..8217b4a17df
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-skb-get-xfrm-state.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb, *xfrm_state;
+ uint32_t index, size;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_skb_get_xfrm_state (skb, index,
+ xfrm_state, size, flags);
+}
+
+/* { dg-final { scan-assembler "call\t66" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-load-bytes-relative.c b/gcc/testsuite/gcc.target/bpf/helper-skb-load-bytes-relative.c
new file mode 100644
index 00000000000..bcaa43be9de
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-skb-load-bytes-relative.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb, *to;
+ uint32_t offset, len, start_header;
+
+ ret = __builtin_bpf_helper_skb_load_bytes_relative (skb, offset,
+ to, len,
+ start_header);
+}
+
+/* { dg-final { scan-assembler "call\t68" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-load-bytes.c b/gcc/testsuite/gcc.target/bpf/helper-skb-load-bytes.c
new file mode 100644
index 00000000000..9da545400c7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-skb-load-bytes.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb, *to;
+ uint32_t offset, len;
+
+ ret = __builtin_bpf_helper_skb_load_bytes (skb, offset, to, len);
+}
+
+/* { dg-final { scan-assembler "call\t26" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-pull-data.c b/gcc/testsuite/gcc.target/bpf/helper-skb-pull-data.c
new file mode 100644
index 00000000000..9bb8b8d6e78
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-skb-pull-data.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb;
+ uint32_t len;
+
+ ret = __builtin_bpf_helper_skb_pull_data (skb, len);
+}
+
+/* { dg-final { scan-assembler "call\t39" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-set-tunnel-key.c b/gcc/testsuite/gcc.target/bpf/helper-skb-set-tunnel-key.c
new file mode 100644
index 00000000000..21b835f5cef
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-skb-set-tunnel-key.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb, *key;
+ uint32_t size;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_skb_set_tunnel_key (skb, key, size, flags);
+}
+
+/* { dg-final { scan-assembler "call\t21" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-set-tunnel-opt.c b/gcc/testsuite/gcc.target/bpf/helper-skb-set-tunnel-opt.c
new file mode 100644
index 00000000000..5a0528ec0a3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-skb-set-tunnel-opt.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb;
+ uint8_t *opt;
+ uint32_t size;
+
+ ret = __builtin_bpf_helper_skb_set_tunnel_opt (skb, opt, size);
+}
+
+/* { dg-final { scan-assembler "call\t30" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-store-bytes.c b/gcc/testsuite/gcc.target/bpf/helper-skb-store-bytes.c
new file mode 100644
index 00000000000..a41967cb904
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-skb-store-bytes.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb;
+ uint32_t offset;
+ void *from;
+ uint32_t len;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_skb_store_bytes (skb, offset, from, len, flags);
+}
+
+/* { dg-final { scan-assembler "call\t9" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-under-cgroup.c b/gcc/testsuite/gcc.target/bpf/helper-skb-under-cgroup.c
new file mode 100644
index 00000000000..0ccee8bed5c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-skb-under-cgroup.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb, *map;
+ uint32_t index;
+
+ ret = __builtin_bpf_helper_skb_under_cgroup (skb, map, index);
+}
+
+/* { dg-final { scan-assembler "call\t33" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-vlan-pop.c b/gcc/testsuite/gcc.target/bpf/helper-skb-vlan-pop.c
new file mode 100644
index 00000000000..e99a0ac7802
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-skb-vlan-pop.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb;
+
+ ret = __builtin_bpf_helper_skb_vlan_pop (skb);
+}
+
+/* { dg-final { scan-assembler "call\t19" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skb-vlan-push.c b/gcc/testsuite/gcc.target/bpf/helper-skb-vlan-push.c
new file mode 100644
index 00000000000..dbe52aee1b8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-skb-vlan-push.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb;
+ int16_t vlan_proto;
+ uint16_t vlan_tci;
+
+ ret = __builtin_bpf_helper_skb_vlan_push (skb, vlan_proto, vlan_tci);
+}
+
+/* { dg-final { scan-assembler "call\t18" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-skc-lookup-tcp.c b/gcc/testsuite/gcc.target/bpf/helper-skc-lookup-tcp.c
new file mode 100644
index 00000000000..bbc4b99a808
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-skc-lookup-tcp.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ void *ret;
+ void *ctx, *tuple;
+ uint32_t tuple_size;
+ uint64_t netns, flags;
+
+ ret = __builtin_bpf_helper_skc_lookup_tcp (ctx, tuple,
+ tuple_size, netns, flags);
+}
+
+/* { dg-final { scan-assembler "call\t99" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sock-hash-update.c b/gcc/testsuite/gcc.target/bpf/helper-sock-hash-update.c
new file mode 100644
index 00000000000..bbb77ef9ad5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-sock-hash-update.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skops, *map, *key;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_sock_hash_update (skops, map, key,
+ flags);
+}
+
+/* { dg-final { scan-assembler "call\t70" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sock-map-update.c b/gcc/testsuite/gcc.target/bpf/helper-sock-map-update.c
new file mode 100644
index 00000000000..301e59e975b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-sock-map-update.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skops, *map, *key;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_sock_map_update (skops, map, key,
+ flags);
+}
+
+/* { dg-final { scan-assembler "call\t53" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sock-ops-cb-flags-set.c b/gcc/testsuite/gcc.target/bpf/helper-sock-ops-cb-flags-set.c
new file mode 100644
index 00000000000..2056312bcf3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-sock-ops-cb-flags-set.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *bpf_sock;
+ int argval;
+
+ ret = __builtin_bpf_helper_sock_ops_cb_flags_set (bpf_sock,
+ argval);
+}
+
+/* { dg-final { scan-assembler "call\t59" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-spin-lock.c b/gcc/testsuite/gcc.target/bpf/helper-spin-lock.c
new file mode 100644
index 00000000000..4178914ae13
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-spin-lock.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ void *lock;
+
+ __builtin_bpf_helper_spin_lock (lock);
+}
+
+/* { dg-final { scan-assembler "call\t93" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-spin-unlock.c b/gcc/testsuite/gcc.target/bpf/helper-spin-unlock.c
new file mode 100644
index 00000000000..c2416b66994
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-spin-unlock.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ void *lock;
+
+ __builtin_bpf_helper_spin_unlock (lock);
+}
+
+/* { dg-final { scan-assembler "call\t94" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-strtol.c b/gcc/testsuite/gcc.target/bpf/helper-strtol.c
new file mode 100644
index 00000000000..e15b6d6b968
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-strtol.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+#include <stddef.h>
+
+void
+foo ()
+{
+ int ret;
+ void *buf;
+ long res;
+ uint64_t flags;
+ size_t buf_len;
+
+ ret = __builtin_bpf_helper_strtol (buf, buf_len, flags, &res);
+}
+
+/* { dg-final { scan-assembler "call\t105" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-strtoul.c b/gcc/testsuite/gcc.target/bpf/helper-strtoul.c
new file mode 100644
index 00000000000..bc0d77656d2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-strtoul.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+#include <stddef.h>
+
+void
+foo ()
+{
+ int ret;
+ void *buf;
+ unsigned long res;
+ uint64_t flags;
+ size_t buf_len;
+
+ ret = __builtin_bpf_helper_strtoul (buf, buf_len, flags, &res);
+}
+
+/* { dg-final { scan-assembler "call\t106" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sysctl-get-current-value.c b/gcc/testsuite/gcc.target/bpf/helper-sysctl-get-current-value.c
new file mode 100644
index 00000000000..803584171dd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-sysctl-get-current-value.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+#include <stddef.h>
+
+void
+foo ()
+{
+ int ret;
+ void *ctx, *buf;
+ size_t buf_len;
+
+ ret = __builtin_bpf_helper_sysctl_get_current_value (ctx, buf,
+ buf_len);
+}
+
+/* { dg-final { scan-assembler "call\t102" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sysctl-get-name.c b/gcc/testsuite/gcc.target/bpf/helper-sysctl-get-name.c
new file mode 100644
index 00000000000..a748b4bf911
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-sysctl-get-name.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+#include <stddef.h>
+
+void
+foo ()
+{
+ int ret;
+ void *ctx, *buf;
+ size_t buf_len;
+ uint64_t flags;
+
+ ret = __builtin_bpf_helper_sysctl_get_name (ctx, buf,
+ buf_len, flags);
+}
+
+/* { dg-final { scan-assembler "call\t101" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sysctl-get-new-value.c b/gcc/testsuite/gcc.target/bpf/helper-sysctl-get-new-value.c
new file mode 100644
index 00000000000..2c4835100c9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-sysctl-get-new-value.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+#include <stddef.h>
+
+void
+foo ()
+{
+ int ret;
+ void *ctx, *buf;
+ size_t buf_len;
+
+ ret = __builtin_bpf_helper_sysctl_get_new_value (ctx, buf,
+ buf_len);
+}
+
+/* { dg-final { scan-assembler "call\t103" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-sysctl-set-new-value.c b/gcc/testsuite/gcc.target/bpf/helper-sysctl-set-new-value.c
new file mode 100644
index 00000000000..fc3780da7e2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-sysctl-set-new-value.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+#include <stddef.h>
+
+void
+foo ()
+{
+ int ret;
+ void *ctx, *buf;
+ size_t buf_len;
+
+ ret = __builtin_bpf_helper_sysctl_set_new_value (ctx, buf,
+ buf_len);
+}
+
+/* { dg-final { scan-assembler "call\t104" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-tail-call.c b/gcc/testsuite/gcc.target/bpf/helper-tail-call.c
new file mode 100644
index 00000000000..618064f4aea
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-tail-call.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ void *ctx, *prog_array_map;
+ uint32_t index;
+
+ __builtin_bpf_helper_tail_call (ctx, prog_array_map, index);
+}
+
+/* { dg-final { scan-assembler "call\t12" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-tcp-check-syncookie.c b/gcc/testsuite/gcc.target/bpf/helper-tcp-check-syncookie.c
new file mode 100644
index 00000000000..95846c6f2d7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-tcp-check-syncookie.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *sk, *iph, *th;
+ uint32_t iph_len, th_len;
+
+ ret = __builtin_bpf_helper_tcp_check_syncookie (sk, iph,
+ iph_len,
+ th, th_len);
+}
+
+/* { dg-final { scan-assembler "call\t100" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-tcp-sock.c b/gcc/testsuite/gcc.target/bpf/helper-tcp-sock.c
new file mode 100644
index 00000000000..ab8f2de05d8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-tcp-sock.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ void *ret, *sk;
+
+ ret = __builtin_bpf_helper_tcp_sock (sk);
+}
+
+/* { dg-final { scan-assembler "call\t96" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-trace-printk.c b/gcc/testsuite/gcc.target/bpf/helper-trace-printk.c
new file mode 100644
index 00000000000..fcf9d5c9e50
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-trace-printk.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+
+char *map () { return 0; }
+
+void
+foo ()
+{
+ int ret;
+
+ ret = __builtin_bpf_helper_trace_printk ("foo %d %d", sizeof ("foo %d %d"), 10, 20);
+}
+
+/* { dg-final { scan-assembler "call\t6" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-head.c b/gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-head.c
new file mode 100644
index 00000000000..3dce5434535
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-head.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *xdp_md;
+ int delta;
+
+ ret = __builtin_bpf_helper_xdp_adjust_head (xdp_md, delta);
+}
+
+/* { dg-final { scan-assembler "call\t44" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-meta.c b/gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-meta.c
new file mode 100644
index 00000000000..38a13748737
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-meta.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *xdp_md;
+ int delta;
+
+ ret = __builtin_bpf_helper_xdp_adjust_meta (xdp_md, delta);
+}
+
+/* { dg-final { scan-assembler "call\t54" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-tail.c b/gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-tail.c
new file mode 100644
index 00000000000..319b65a233d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-tail.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *xdp_md;
+ int delta;
+
+ ret = __builtin_bpf_helper_xdp_adjust_tail (xdp_md, delta);
+}
+
+/* { dg-final { scan-assembler "call\t65" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/skb-ancestor-cgroup-id.c b/gcc/testsuite/gcc.target/bpf/skb-ancestor-cgroup-id.c
new file mode 100644
index 00000000000..ce193ec14bf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/skb-ancestor-cgroup-id.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#include <stdint.h>
+
+void
+foo ()
+{
+ int ret;
+ void *skb;
+ int ancestor_level;
+
+ ret = __builtin_bpf_helper_skb_ancestor_cgroup_id (skb,
+ ancestor_level);
+}
+
+/* { dg-final { scan-assembler "call\t83" } } */
diff --git a/gcc/testsuite/gcc.target/bpf/sync-fetch-and-add.c b/gcc/testsuite/gcc.target/bpf/sync-fetch-and-add.c
new file mode 100644
index 00000000000..69949f14d0c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/bpf/sync-fetch-and-add.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+long delta;
+long *val;
+
+void
+foo ()
+{
+ __sync_fetch_and_add(val, delta);
+ __sync_fetch_and_add((int *)val, (int)delta);
+}
+
+/* { dg-final { scan-assembler "xadddw\t.*" } } */
+/* { dg-final { scan-assembler "xaddw\t.*" } } */
--
2.11.0
^ permalink raw reply [flat|nested] 223+ messages in thread
* [PATCH V2 6/8] bpf: adjust GCC testsuite to eBPF limitations
2019-08-17 1:00 [PATCH V2 0/8] eBPF support for GCC Jose E. Marchesi
2019-08-17 0:51 ` [PATCH V2 1/8] Update config.sub and config.guess Jose E. Marchesi
2019-08-17 0:51 ` [PATCH V2 5/8] bpf: make target-supports.exp aware of eBPF Jose E. Marchesi
@ 2019-08-17 0:51 ` Jose E. Marchesi
2019-08-19 3:22 ` Jeff Law
2019-08-17 0:51 ` [PATCH V2 3/8] bpf: new libgcc port Jose E. Marchesi
` (4 subsequent siblings)
7 siblings, 1 reply; 223+ messages in thread
From: Jose E. Marchesi @ 2019-08-17 0:51 UTC (permalink / raw)
To: gcc-patches
This patch makes many tests in gcc.dg and gcc.c-torture to be skipped
in bpf-*-* targets. This is due to the many limitations imposed by
eBPF to what would be perfectly valid C code: no support for indirect
calls, no support for more than 5 arguments to function calls, no
support for indirect jumps, a very limited range for direct jumps, the
stack limit, lack of standard header files, etc.
Hopefully some of these restrictions will be relaxed in the future.
In particular, I expect the stack limit will be significantly
increased at some point. Also, as semantics associated with object
linking get developed in eBPF, it may be possible at some point to
provide a set of standard run-time libraries for eBPF programs.
gcc/testsuite/ChangeLog:
* gcc.dg/builtins-config.h: eBPF doesn't support C99 standard
functions.
* gcc.c-torture/compile/20000211-1.c: Skip if target bpf-*-*.
* gcc.c-torture/compile/20000403-1.c: Likewise.
* gcc.c-torture/compile/20000609-1.c: Likewise.
* gcc.c-torture/compile/20000804-1.c: Likewise.
* gcc.c-torture/compile/20001226-1.c: Likewise.
* gcc.c-torture/compile/20010102-1.c: Likewise.
* gcc.c-torture/compile/20010107-1.c: Likewise.
* gcc.c-torture/compile/20011109-1.c: Likewise.
* gcc.c-torture/compile/20011218-1.c: Likewise.
* gcc.c-torture/compile/20011229-1.c: Likewise.
* gcc.c-torture/compile/20020129-1.c: Likewise.
* gcc.c-torture/compile/20020304-1.c: Likewise.
* gcc.c-torture/compile/20020320-1.c: Likewise.
* gcc.c-torture/compile/20020604-1.c: Likewise.
* gcc.c-torture/compile/20020706-1.c: Likewise.
* gcc.c-torture/compile/20020706-2.c: Likewise.
* gcc.c-torture/compile/20021015-1.c: Likewise.
* gcc.c-torture/compile/20021205-1.c: Likewise.
* gcc.c-torture/compile/20030903-1.c: Likewise.
* gcc.c-torture/compile/20030921-1.c: Likewise.
* gcc.c-torture/compile/20031023-1.c: Likewise.
* gcc.c-torture/compile/20031023-2.c: Likewise.
* gcc.c-torture/compile/20031023-3.c: Likewise.
* gcc.c-torture/compile/20031023-4.c: Likewise.
* gcc.c-torture/compile/20031125-1.c: Likewise.
* gcc.c-torture/compile/20040101-1.c: Likewise.
* gcc.c-torture/compile/20040317-2.c: Likewise.
* gcc.c-torture/compile/20040614-1.c: Likewise.
* gcc.c-torture/compile/20040726-1.c: Likewise.
* gcc.c-torture/compile/20040909-1.c: Likewise.
* gcc.c-torture/compile/20050122-1.c: Likewise.
* gcc.c-torture/compile/20050202-1.c: Likewise.
* gcc.c-torture/compile/20050303-1.c: Likewise.
* gcc.c-torture/compile/20050622-1.c: Likewise.
* gcc.c-torture/compile/20051216-1.c: Likewise.
* gcc.c-torture/compile/20060208-1.c: Likewise.
* gcc.c-torture/compile/20060421-1.c: Likewise.
* gcc.c-torture/compile/20071207-1.c: Likewise.
* gcc.c-torture/compile/20080903-1.c: Likewise.
* gcc.c-torture/compile/20081108-1.c: Likewise.
* gcc.c-torture/compile/20101217-1.c: Likewise.
* gcc.c-torture/compile/20121027-1.c: Likewise.
* gcc.c-torture/compile/20150327.c: Likewise.
* gcc.c-torture/compile/20151204.c: Likewise.
* gcc.c-torture/compile/900313-1.c: Likewise.
* gcc.c-torture/compile/920428-2.c: Likewise.
* gcc.c-torture/compile/920501-12.c: Likewise.
* gcc.c-torture/compile/920501-4.c: Likewise.
* gcc.c-torture/compile/920501-7.c: Likewise.
* gcc.c-torture/compile/920625-1.c: Likewise.
* gcc.c-torture/compile/920723-1.c: Likewise.
* gcc.c-torture/compile/920928-5.c: Likewise.
* gcc.c-torture/compile/921202-1.c: Likewise.
* gcc.c-torture/compile/930117-1.c: Likewise.
* gcc.c-torture/compile/930421-1.c: Likewise.
* gcc.c-torture/compile/930607-1.c: Likewise.
* gcc.c-torture/compile/930623-1.c: Likewise.
* gcc.c-torture/compile/931003-1.c: Likewise.
* gcc.c-torture/compile/931004-1.c: Likewise.
* gcc.c-torture/compile/950719-1.c: Likewise.
* gcc.c-torture/compile/951222-1.c: Likewise.
* gcc.c-torture/compile/961004-1.c: Likewise.
* gcc.c-torture/compile/980504-1.c: Likewise.
* gcc.c-torture/compile/980816-1.c: Likewise.
* gcc.c-torture/compile/990517-1.c: Likewise.
* gcc.c-torture/compile/990625-1.c: Likewise.
* gcc.c-torture/compile/991213-2.c: Likewise.
* gcc.c-torture/compile/DFcmp.c: Likewise.
* gcc.c-torture/compile/HIcmp.c: Likewise.
* gcc.c-torture/compile/HIset.c: Likewise.
* gcc.c-torture/compile/QIcmp.c: Likewise.
* gcc.c-torture/compile/QIset.c: Likewise.
* gcc.c-torture/compile/SFset.c: Likewise.
* gcc.c-torture/compile/SIcmp.c: Likewise.
* gcc.c-torture/compile/SIset.c: Likewise.
* gcc.c-torture/compile/UHIcmp.c: Likewise.
* gcc.c-torture/compile/UQIcmp.c: Likewise.
* gcc.c-torture/compile/USIcmp.c: Likewise.
* gcc.c-torture/compile/bcopy.c: Likewise.
* gcc.c-torture/compile/callind.c: Likewise.
* gcc.c-torture/compile/calls-void.c: Likewise.
* gcc.c-torture/compile/calls.c: Likewise.
* gcc.c-torture/compile/consec.c: Likewise.
* gcc.c-torture/compile/limits-fndefn.c: Likewise.
* gcc.c-torture/compile/lll.c: Likewise.
* gcc.c-torture/compile/parms.c: Likewise.
* gcc.c-torture/compile/pass.c: Likewise.
* gcc.c-torture/compile/poor.c: Likewise.
* gcc.c-torture/compile/pp.c: Likewise.
* gcc.c-torture/compile/pr21840.c: Likewise.
* gcc.c-torture/compile/pr23929.c: Likewise.
* gcc.c-torture/compile/pr25310.c: Likewise.
* gcc.c-torture/compile/pr25311.c: Likewise.
* gcc.c-torture/compile/pr32139.c: Likewise.
* gcc.c-torture/compile/pr32399.c: Likewise.
* gcc.c-torture/compile/pr34091.c: Likewise.
* gcc.c-torture/compile/pr34458.c: Likewise.
* gcc.c-torture/compile/pr34688.c: Likewise.
* gcc.c-torture/compile/pr35607.c: Likewise.
* gcc.c-torture/compile/pr37258.c: Likewise.
* gcc.c-torture/compile/pr37327.c: Likewise.
* gcc.c-torture/compile/pr37381.c: Likewise.
* gcc.c-torture/compile/pr37433-1.c: Likewise.
* gcc.c-torture/compile/pr37433.c: Likewise.
* gcc.c-torture/compile/pr37669-2.c: Likewise.
* gcc.c-torture/compile/pr37669.c: Likewise.
* gcc.c-torture/compile/pr37742-3.c: Likewise.
* gcc.c-torture/compile/pr39937.c: Likewise.
* gcc.c-torture/compile/pr39941.c: Likewise.
* gcc.c-torture/compile/pr40080.c: Likewise.
* gcc.c-torture/compile/pr41181.c: Likewise.
* gcc.c-torture/compile/pr41634.c: Likewise.
* gcc.c-torture/compile/pr43415.c: Likewise.
* gcc.c-torture/compile/pr43417.c: Likewise.
* gcc.c-torture/compile/pr43635.c: Likewise.
* gcc.c-torture/compile/pr43791.c: Likewise.
* gcc.c-torture/compile/pr43845.c: Likewise.
* gcc.c-torture/compile/pr44043.c: Likewise.
* gcc.c-torture/compile/pr44063.c: Likewise.
* gcc.c-torture/compile/pr44788.c: Likewise.
* gcc.c-torture/compile/pr48596.c: Likewise.
* gcc.c-torture/compile/pr51694.c: Likewise.
* gcc.c-torture/compile/pr51856.c: Likewise.
* gcc.c-torture/compile/pr52750.c: Likewise.
* gcc.c-torture/compile/pr54713-1.c: Likewise.
* gcc.c-torture/compile/pr54713-2.c: Likewise.
* gcc.c-torture/compile/pr54713-3.c: Likewise.
* gcc.c-torture/compile/pr55921.c: Likewise.
* gcc.c-torture/compile/pr70240.c: Likewise.
* gcc.c-torture/compile/pr70355.c: Likewise.
* gcc.c-torture/compile/pr77754-2.c: Likewise.
* gcc.c-torture/compile/pr77754-3.c: Likewise.
* gcc.c-torture/compile/pr77754-4.c: Likewise.
* gcc.c-torture/compile/pr82052.c: Likewise.
* gcc.c-torture/compile/pr83487.c: Likewise.
* gcc.c-torture/compile/pr86122.c: Likewise.
* gcc.c-torture/compile/pr89280.c: Likewise.
* gcc.c-torture/compile/pr89663-2.c: Likewise.
* gcc.c-torture/compile/pret-arg.c: Likewise.
* gcc.c-torture/compile/pta-1.c: Likewise.
* gcc.c-torture/compile/regs-arg-size.c: Likewise.
* gcc.c-torture/compile/sound.c: Likewise.
* gcc.c-torture/compile/stack-check-1.c: Likewise.
* gcc.c-torture/compile/structret.c: Likewise.
* gcc.c-torture/compile/uuarg.c: Likewise.
* gcc.dg/20001009-1.c: Likewise.
* gcc.dg/20020418-1.c: Likewise.
* gcc.dg/20020426-2.c: Likewise.
* gcc.dg/20020430-1.c: Likewise.
* gcc.dg/20040306-1.c: Likewise.
* gcc.dg/20040622-2.c: Likewise.
* gcc.dg/20050603-2.c: Likewise.
* gcc.dg/20050629-1.c: Likewise.
* gcc.dg/20061026.c: Likewise.
* gcc.dg/Walloc-size-larger-than-18.c: Likewise.
* gcc.dg/Warray-bounds-3.c: Likewise.
* gcc.dg/Warray-bounds-30.c: Likewise.
* gcc.dg/Wframe-larger-than-2.c: Likewise.
* gcc.dg/Wframe-larger-than.c: Likewise.
* gcc.dg/Wrestrict-11.c: Likewise.
---
gcc/testsuite/ChangeLog | 165 +++++++++++++++++++++
gcc/testsuite/gcc.c-torture/compile/20000211-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20000403-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20000609-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20000804-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20001226-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20010102-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20010107-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20011109-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20011218-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20011229-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20020129-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20020304-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20020320-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20020604-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20020706-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20020706-2.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20021015-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20021205-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20030903-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20030921-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20031023-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20031023-2.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20031023-3.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20031023-4.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20031125-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20040101-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20040317-2.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20040614-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20040726-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20040909-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20050122-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20050202-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20050303-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20050622-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20051216-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20060208-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20060421-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20071207-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20080903-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20081108-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20101217-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20121027-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20150327.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20151204.c | 1 +
gcc/testsuite/gcc.c-torture/compile/900313-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/920428-2.c | 2 +
gcc/testsuite/gcc.c-torture/compile/920501-12.c | 1 +
gcc/testsuite/gcc.c-torture/compile/920501-4.c | 1 +
gcc/testsuite/gcc.c-torture/compile/920501-7.c | 1 +
gcc/testsuite/gcc.c-torture/compile/920625-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/920723-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/920928-5.c | 3 +
gcc/testsuite/gcc.c-torture/compile/921202-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/930117-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/930421-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/930607-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/930623-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/931003-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/931004-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/950719-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/951222-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/961004-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/980504-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/980816-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/990517-1.c | 3 +
gcc/testsuite/gcc.c-torture/compile/990625-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/991213-2.c | 2 +
gcc/testsuite/gcc.c-torture/compile/DFcmp.c | 2 +
gcc/testsuite/gcc.c-torture/compile/HIcmp.c | 2 +
gcc/testsuite/gcc.c-torture/compile/HIset.c | 2 +
gcc/testsuite/gcc.c-torture/compile/QIcmp.c | 2 +
gcc/testsuite/gcc.c-torture/compile/QIset.c | 2 +
gcc/testsuite/gcc.c-torture/compile/SFset.c | 1 +
gcc/testsuite/gcc.c-torture/compile/SIcmp.c | 2 +
gcc/testsuite/gcc.c-torture/compile/SIset.c | 2 +
gcc/testsuite/gcc.c-torture/compile/UHIcmp.c | 2 +
gcc/testsuite/gcc.c-torture/compile/UQIcmp.c | 2 +
gcc/testsuite/gcc.c-torture/compile/USIcmp.c | 2 +
gcc/testsuite/gcc.c-torture/compile/bcopy.c | 1 +
gcc/testsuite/gcc.c-torture/compile/callind.c | 2 +
gcc/testsuite/gcc.c-torture/compile/calls-void.c | 1 +
gcc/testsuite/gcc.c-torture/compile/calls.c | 1 +
gcc/testsuite/gcc.c-torture/compile/consec.c | 2 +
.../gcc.c-torture/compile/limits-fndefn.c | 1 +
gcc/testsuite/gcc.c-torture/compile/lll.c | 1 +
gcc/testsuite/gcc.c-torture/compile/parms.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pass.c | 2 +
gcc/testsuite/gcc.c-torture/compile/poor.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pp.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr21840.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr23929.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr25310.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr25311.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr32139.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr32399.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr34091.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr34458.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr34688.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr35607.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr37258.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr37327.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr37381.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr37433-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr37433.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr37669-2.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr37669.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr37742-3.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr39937.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr39941.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr40080.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr41181.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr41634.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr43415.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr43417.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr43635.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr43791.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr43845.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr44043.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr44063.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr44788.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr48596.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr51694.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr51856.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr52750.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr54713-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr54713-2.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr54713-3.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr55921.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr70240.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr70355.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr77754-2.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr77754-3.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr77754-4.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr82052.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr83487.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr86122.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr89280.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr89663-2.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pret-arg.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pta-1.c | 2 +
.../gcc.c-torture/compile/regs-arg-size.c | 2 +
gcc/testsuite/gcc.c-torture/compile/sound.c | 1 +
.../gcc.c-torture/compile/stack-check-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/structret.c | 2 +
gcc/testsuite/gcc.c-torture/compile/uuarg.c | 2 +
gcc/testsuite/gcc.dg/20001009-1.c | 1 +
gcc/testsuite/gcc.dg/20020418-1.c | 1 +
gcc/testsuite/gcc.dg/20020426-2.c | 1 +
gcc/testsuite/gcc.dg/20020430-1.c | 1 +
gcc/testsuite/gcc.dg/20040306-1.c | 2 +-
gcc/testsuite/gcc.dg/20040622-2.c | 1 +
gcc/testsuite/gcc.dg/20050603-2.c | 1 +
gcc/testsuite/gcc.dg/20050629-1.c | 1 +
gcc/testsuite/gcc.dg/20061026.c | 1 +
gcc/testsuite/gcc.dg/Walloc-size-larger-than-18.c | 1 +
gcc/testsuite/gcc.dg/Warray-bounds-3.c | 1 +
gcc/testsuite/gcc.dg/Warray-bounds-30.c | 3 +-
gcc/testsuite/gcc.dg/Wframe-larger-than-2.c | 3 +-
gcc/testsuite/gcc.dg/Wframe-larger-than.c | 1 +
gcc/testsuite/gcc.dg/Wrestrict-11.c | 3 +-
gcc/testsuite/gcc.dg/builtins-config.h | 4 +-
162 files changed, 431 insertions(+), 5 deletions(-)
diff --git a/gcc/testsuite/gcc.c-torture/compile/20000211-1.c b/gcc/testsuite/gcc.c-torture/compile/20000211-1.c
index 7a7c8c0cb20..b83d6a40520 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20000211-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20000211-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
typedef __SIZE_TYPE__ size_t;
typedef unsigned char Bufbyte;
typedef int Bytecount;
diff --git a/gcc/testsuite/gcc.c-torture/compile/20000403-1.c b/gcc/testsuite/gcc.c-torture/compile/20000403-1.c
index 27345b56fef..cb56028fb8b 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20000403-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20000403-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
struct utsname {
char sysname[32 ];
char version[32 ];
diff --git a/gcc/testsuite/gcc.c-torture/compile/20000609-1.c b/gcc/testsuite/gcc.c-torture/compile/20000609-1.c
index f03aa35a7ac..9a891a82534 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20000609-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20000609-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+
int main ()
{
char temp[1024] = "tempfile";
diff --git a/gcc/testsuite/gcc.c-torture/compile/20000804-1.c b/gcc/testsuite/gcc.c-torture/compile/20000804-1.c
index 35464c212d2..1a8e80c5489 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20000804-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20000804-1.c
@@ -6,6 +6,7 @@
/* { dg-skip-if "Not enough 64-bit registers" { pdp11-*-* } { "-O0" } { "" } } */
/* { dg-xfail-if "Inconsistent constraint on asm" { csky-*-* } { "-O0" } { "" } } */
/* { dg-xfail-if "" { h8300-*-* } } */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
/* Copyright (C) 2000, 2003 Free Software Foundation */
__complex__ long long f ()
diff --git a/gcc/testsuite/gcc.c-torture/compile/20001226-1.c b/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
index be0bdcf7631..9f6bd0af2e5 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
@@ -3,6 +3,7 @@
/* { dg-skip-if "too much code for pdp11" { "pdp11-*-*" } } */
/* { dg-xfail-if "PR36698" { spu-*-* } { "-O0" } { "" } } */
/* { dg-skip-if "" { m32c-*-* } } */
+/* { dg-skip-if "jumps too far for eBPF" { bpf-*-* } } */
/* { dg-timeout-factor 4.0 } */
/* This testcase exposed two branch shortening bugs on powerpc. */
diff --git a/gcc/testsuite/gcc.c-torture/compile/20010102-1.c b/gcc/testsuite/gcc.c-torture/compile/20010102-1.c
index a409b566098..2896f6a6b75 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20010102-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20010102-1.c
@@ -4,6 +4,8 @@
Copyright (C) 2001 Free Software Foundation. */
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
# define PTR_INT_TYPE __PTRDIFF_TYPE__
struct _obstack_chunk
diff --git a/gcc/testsuite/gcc.c-torture/compile/20010107-1.c b/gcc/testsuite/gcc.c-torture/compile/20010107-1.c
index 222def4d9ef..1214beb0d26 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20010107-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20010107-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
unsigned long x[4];
void foo(void)
diff --git a/gcc/testsuite/gcc.c-torture/compile/20011109-1.c b/gcc/testsuite/gcc.c-torture/compile/20011109-1.c
index f1987a74bf2..96b225f2fea 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20011109-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20011109-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
typedef struct { short x[4]; } S;
typedef struct { unsigned int a, b, c; S *d; } T;
diff --git a/gcc/testsuite/gcc.c-torture/compile/20011218-1.c b/gcc/testsuite/gcc.c-torture/compile/20011218-1.c
index bf63489b855..d7971655c58 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20011218-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20011218-1.c
@@ -2,6 +2,8 @@
for the indirect call was exposed too early and reload couldn't
allocate it for multiplication and division. */
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
struct S {
int a, b;
void (*f) (long, int);
diff --git a/gcc/testsuite/gcc.c-torture/compile/20011229-1.c b/gcc/testsuite/gcc.c-torture/compile/20011229-1.c
index 97b2655434a..7ebd2068d22 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20011229-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20011229-1.c
@@ -1,5 +1,7 @@
/* ICE: call insn does not satisfy its constraints, MMIX port.
Origin: ghostscript-6.52, reduction from hp@bitrange.com. */
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
struct s0
{
void (*init_color)(void *, void *);
diff --git a/gcc/testsuite/gcc.c-torture/compile/20020129-1.c b/gcc/testsuite/gcc.c-torture/compile/20020129-1.c
index 7b17ba475e4..b137912f393 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20020129-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20020129-1.c
@@ -1,4 +1,5 @@
/* Test call to static variable. */
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
typedef struct
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/20020304-1.c b/gcc/testsuite/gcc.c-torture/compile/20020304-1.c
index 3940d5ffd2e..726ba925b7e 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20020304-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20020304-1.c
@@ -4,6 +4,8 @@
Original bug report is c/5830 by Manuel Serrano <Manuel.Serrano@inria.fr>.
*/
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+
typedef union scmobj {
struct pair {
union scmobj *car;
diff --git a/gcc/testsuite/gcc.c-torture/compile/20020320-1.c b/gcc/testsuite/gcc.c-torture/compile/20020320-1.c
index 385c061e193..36245fc7c17 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20020320-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20020320-1.c
@@ -2,6 +2,8 @@
This testcase caused infinite loop in flow (several places),
because flow assumes gen_jump generates simple_jump_p. */
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
typedef void (*T) (void);
extern T x[];
diff --git a/gcc/testsuite/gcc.c-torture/compile/20020604-1.c b/gcc/testsuite/gcc.c-torture/compile/20020604-1.c
index d2e186a7182..82eb47a1fa9 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20020604-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20020604-1.c
@@ -1,6 +1,7 @@
/* { dg-do assemble } */
/* { dg-require-effective-target ptr32plus } */
/* { dg-xfail-if "The array too big" { "h8300-*-*" } { "-mno-h" "-mn" } { "" } } */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
/* PR c/6957
This testcase ICEd at -O2 on IA-32, because
diff --git a/gcc/testsuite/gcc.c-torture/compile/20020706-1.c b/gcc/testsuite/gcc.c-torture/compile/20020706-1.c
index c8811bc68ff..d2e0b330ef5 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20020706-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20020706-1.c
@@ -1,5 +1,6 @@
// Contributed by Alexandre Oliva <aoliva@redhat.com>
// From Red Hat case 106165.
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
typedef struct s1
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/20020706-2.c b/gcc/testsuite/gcc.c-torture/compile/20020706-2.c
index b84dda60fd3..14a872f6abd 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20020706-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20020706-2.c
@@ -1,5 +1,6 @@
// Contributed by Alexandre Oliva <aoliva@redhat.com>
// From Red Hat case 106165.
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
typedef unsigned short (FUNC_P) (void *, unsigned char *, unsigned short);
diff --git a/gcc/testsuite/gcc.c-torture/compile/20021015-1.c b/gcc/testsuite/gcc.c-torture/compile/20021015-1.c
index 789b8a8b176..dd49659a9d4 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20021015-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20021015-1.c
@@ -1,4 +1,5 @@
/* PR target/7370. */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
int g (int *x, int *y);
diff --git a/gcc/testsuite/gcc.c-torture/compile/20021205-1.c b/gcc/testsuite/gcc.c-torture/compile/20021205-1.c
index 73648e94951..f9959ca96f4 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20021205-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20021205-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
typedef struct x x;
extern void *baz(char *);
struct x { char * (*bar) (int); };
diff --git a/gcc/testsuite/gcc.c-torture/compile/20030903-1.c b/gcc/testsuite/gcc.c-torture/compile/20030903-1.c
index fa4d30db6c0..116b0923721 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20030903-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20030903-1.c
@@ -1,6 +1,8 @@
/* Derived from PR optimization/11700. */
/* The compiler used to ICE during reload for m68k targets. */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+
void check_complex (__complex__ double, __complex__ double,
__complex__ double, __complex__ int);
void check_float (double, double, double, int);
diff --git a/gcc/testsuite/gcc.c-torture/compile/20030921-1.c b/gcc/testsuite/gcc.c-torture/compile/20030921-1.c
index 8199dc657f2..6b6b559e331 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20030921-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20030921-1.c
@@ -2,6 +2,7 @@
f is not being emitted. TREE_SYMBOL_REFERENCED was being set
instead of calling mark_referenced. */
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
static void f(void);
void g(void (*x) (void)){x();}
diff --git a/gcc/testsuite/gcc.c-torture/compile/20031023-1.c b/gcc/testsuite/gcc.c-torture/compile/20031023-1.c
index be837762e66..960fec3667a 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20031023-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20031023-1.c
@@ -1,5 +1,7 @@
/* Declaration of the frame size doesn't work on ptx. */
/* { dg-require-effective-target untyped_assembly } */
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
#ifndef ASIZE
# define ASIZE 0x10000000000UL
#endif
diff --git a/gcc/testsuite/gcc.c-torture/compile/20031023-2.c b/gcc/testsuite/gcc.c-torture/compile/20031023-2.c
index 66d66458c85..5df9162c487 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20031023-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20031023-2.c
@@ -1,4 +1,6 @@
/* Declaration of the frame size doesn't work on ptx. */
/* { dg-require-effective-target untyped_assembly } */
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
#define ASIZE 0x1000000000UL
#include "20031023-1.c"
diff --git a/gcc/testsuite/gcc.c-torture/compile/20031023-3.c b/gcc/testsuite/gcc.c-torture/compile/20031023-3.c
index 5859634c343..5030c9feb45 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20031023-3.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20031023-3.c
@@ -1,4 +1,6 @@
/* Declaration of the frame size doesn't work on ptx. */
/* { dg-require-effective-target untyped_assembly } */
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
#define ASIZE 0x100000000UL
#include "20031023-1.c"
diff --git a/gcc/testsuite/gcc.c-torture/compile/20031023-4.c b/gcc/testsuite/gcc.c-torture/compile/20031023-4.c
index 5c61f3743d4..db15721c5e9 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20031023-4.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20031023-4.c
@@ -1,2 +1,4 @@
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
#define ASIZE 0x80000000UL
#include "20031023-1.c"
diff --git a/gcc/testsuite/gcc.c-torture/compile/20031125-1.c b/gcc/testsuite/gcc.c-torture/compile/20031125-1.c
index d3e92679c8b..bec6c9372a8 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20031125-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20031125-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
short *_offsetTable;
/* This tests to make sure PRE splits the entry block ->block 0 edge
when there are multiple block 0 predecessors.
diff --git a/gcc/testsuite/gcc.c-torture/compile/20040101-1.c b/gcc/testsuite/gcc.c-torture/compile/20040101-1.c
index 5c2688ad830..6027cb53fb4 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20040101-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20040101-1.c
@@ -1,4 +1,5 @@
/* { dg-skip-if "not enough registers" { pdp11-*-* } } */
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
diff --git a/gcc/testsuite/gcc.c-torture/compile/20040317-2.c b/gcc/testsuite/gcc.c-torture/compile/20040317-2.c
index 3c8ee2b8ec5..3a1fbde2969 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20040317-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20040317-2.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
typedef struct _ScaleRec *ScaleWidget;
typedef struct
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/20040614-1.c b/gcc/testsuite/gcc.c-torture/compile/20040614-1.c
index b692ab569f2..728a9f1d4cb 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20040614-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20040614-1.c
@@ -1,4 +1,5 @@
/* { dg-require-effective-target label_values } */
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
void f(int r1, int *fp)
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/20040726-1.c b/gcc/testsuite/gcc.c-torture/compile/20040726-1.c
index e53ccd655bb..aea43a56f34 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20040726-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20040726-1.c
@@ -1,4 +1,6 @@
/* PR rtl-optimization/16643 */
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
void foo (int a, int b, int c, int d, int e, int *f)
{
if (a == 0)
diff --git a/gcc/testsuite/gcc.c-torture/compile/20040909-1.c b/gcc/testsuite/gcc.c-torture/compile/20040909-1.c
index 8bbf90191b4..aaeeedc97cd 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20040909-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20040909-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
static __inline__ int
one_utf8_to_utf16 () { }
diff --git a/gcc/testsuite/gcc.c-torture/compile/20050122-1.c b/gcc/testsuite/gcc.c-torture/compile/20050122-1.c
index a70907d9051..0e66cd078e0 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20050122-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20050122-1.c
@@ -1,4 +1,6 @@
/* From PR 19484. */
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
extern void foo (void) __attribute__((noreturn));
int n;
diff --git a/gcc/testsuite/gcc.c-torture/compile/20050202-1.c b/gcc/testsuite/gcc.c-torture/compile/20050202-1.c
index b3f81764538..30838c6c702 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20050202-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20050202-1.c
@@ -1,4 +1,6 @@
/* From PR 19578. */
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
extern void foo (void) __attribute__((noreturn));
void
diff --git a/gcc/testsuite/gcc.c-torture/compile/20050303-1.c b/gcc/testsuite/gcc.c-torture/compile/20050303-1.c
index 22154b30af5..3df81e43fef 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20050303-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20050303-1.c
@@ -1,5 +1,6 @@
/* { dg-require-effective-target int32plus } */
/* { dg-require-effective-target size32plus } */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
void crc()
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/20050622-1.c b/gcc/testsuite/gcc.c-torture/compile/20050622-1.c
index 829f9dd857d..d8d29adc19a 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20050622-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20050622-1.c
@@ -1,4 +1,5 @@
/* { dg-skip-if "Array too big" { "pdp11-*-*" } { "-mint32" } } */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
#if __SCHAR_MAX__ == 127 && __INT_MAX__ >= 2147483647
struct S { char buf[72*1024*1024]; };
diff --git a/gcc/testsuite/gcc.c-torture/compile/20051216-1.c b/gcc/testsuite/gcc.c-torture/compile/20051216-1.c
index ed6ac723069..55751ec8ab2 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20051216-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20051216-1.c
@@ -1,4 +1,5 @@
/* PR rtl-optimization/25432 */
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
void *malloc (__SIZE_TYPE__);
void *realloc (void *, __SIZE_TYPE__);
diff --git a/gcc/testsuite/gcc.c-torture/compile/20060208-1.c b/gcc/testsuite/gcc.c-torture/compile/20060208-1.c
index 3881474f722..e9d93023f03 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20060208-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20060208-1.c
@@ -1,5 +1,7 @@
/* PR middle-end/26092 */
/* { dg-skip-if "can't take address of malloc" { nvptx-*-* } } */
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
typedef __SIZE_TYPE__ size_t;
extern void *malloc (size_t);
diff --git a/gcc/testsuite/gcc.c-torture/compile/20060421-1.c b/gcc/testsuite/gcc.c-torture/compile/20060421-1.c
index 1bd4079b4c8..c6b2905497d 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20060421-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20060421-1.c
@@ -1,4 +1,6 @@
/* This test used to ICE on ARM with -mcpu=iwmmxt. */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+
void
foo (void)
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/20071207-1.c b/gcc/testsuite/gcc.c-torture/compile/20071207-1.c
index 27b871616b1..f313bd15993 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20071207-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20071207-1.c
@@ -1,4 +1,5 @@
/* PR tree-optimization/34371 */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
/* Testcase by Martin Michlmayr <tbm@cyrius.com> */
void centerln (int width, int ch, char *s)
diff --git a/gcc/testsuite/gcc.c-torture/compile/20080903-1.c b/gcc/testsuite/gcc.c-torture/compile/20080903-1.c
index 180b926bf3d..c7e479174da 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20080903-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20080903-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+
struct bar { unsigned short length; };
int
diff --git a/gcc/testsuite/gcc.c-torture/compile/20081108-1.c b/gcc/testsuite/gcc.c-torture/compile/20081108-1.c
index 3209a90c83b..0b45e2341dc 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20081108-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20081108-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
/* Test function call with function designator involving VLA
side-effects does not lead to an ICE. */
diff --git a/gcc/testsuite/gcc.c-torture/compile/20101217-1.c b/gcc/testsuite/gcc.c-torture/compile/20101217-1.c
index c4eef0ed464..cd902afe709 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20101217-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20101217-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "no usable stdio.h for eBPF" { bpf-*-* } } */
+
/* Testcase provided by HUAWEI. */
#include <stdio.h>
int main()
diff --git a/gcc/testsuite/gcc.c-torture/compile/20121027-1.c b/gcc/testsuite/gcc.c-torture/compile/20121027-1.c
index 3d3ff31f69b..575236bbc9e 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20121027-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20121027-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+
extern int nc;
void f(void)
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/20150327.c b/gcc/testsuite/gcc.c-torture/compile/20150327.c
index 373ea6183c3..c46d9c58066 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20150327.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20150327.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
int a;
int (*b)(), (*c)();
int fn1(int p1) {
diff --git a/gcc/testsuite/gcc.c-torture/compile/20151204.c b/gcc/testsuite/gcc.c-torture/compile/20151204.c
index e41f6c1dca9..1701ef124d7 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20151204.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20151204.c
@@ -1,4 +1,5 @@
/* { dg-require-effective-target size20plus } */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/gcc.c-torture/compile/900313-1.c b/gcc/testsuite/gcc.c-torture/compile/900313-1.c
index 2bac5814a7b..12252b4b229 100644
--- a/gcc/testsuite/gcc.c-torture/compile/900313-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/900313-1.c
@@ -1,4 +1,6 @@
/* { dg-require-effective-target alloca } */
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
main ()
{
char *a;
diff --git a/gcc/testsuite/gcc.c-torture/compile/920428-2.c b/gcc/testsuite/gcc.c-torture/compile/920428-2.c
index f313b32986b..72c29f29d43 100644
--- a/gcc/testsuite/gcc.c-torture/compile/920428-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/920428-2.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
double sin(double x);
double cos(double x);
double tan(double x);
diff --git a/gcc/testsuite/gcc.c-torture/compile/920501-12.c b/gcc/testsuite/gcc.c-torture/compile/920501-12.c
index 68892a689df..8d6d839a449 100644
--- a/gcc/testsuite/gcc.c-torture/compile/920501-12.c
+++ b/gcc/testsuite/gcc.c-torture/compile/920501-12.c
@@ -1,5 +1,6 @@
/* { dg-do assemble } */
/* { dg-skip-if "Array too big" { "pdp11-*-*" } { "-mint32" } } */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
x(x){ return 3 + x;}
a(x){int y[994]; return 3 + x;}
diff --git a/gcc/testsuite/gcc.c-torture/compile/920501-4.c b/gcc/testsuite/gcc.c-torture/compile/920501-4.c
index 10736ae76a4..8675e425152 100644
--- a/gcc/testsuite/gcc.c-torture/compile/920501-4.c
+++ b/gcc/testsuite/gcc.c-torture/compile/920501-4.c
@@ -1,6 +1,7 @@
/* { dg-do assemble } */
/* { dg-skip-if "ptxas times out" { nvptx-*-* } { "-O1" } { "" } } */
/* { dg-skip-if "Array too big" { "pdp11-*-*" } { "-mint32" } } */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
foo ()
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/920501-7.c b/gcc/testsuite/gcc.c-torture/compile/920501-7.c
index 2af15e3b7ec..0fac5f3495f 100644
--- a/gcc/testsuite/gcc.c-torture/compile/920501-7.c
+++ b/gcc/testsuite/gcc.c-torture/compile/920501-7.c
@@ -1,3 +1,4 @@
/* { dg-require-effective-target label_values } */
+/* { dg-skip-if "no support for indirect jumps" { bpf-*-* } } */
x(){if(&&e-&&b<0)x();b:goto*&&b;e:;}
diff --git a/gcc/testsuite/gcc.c-torture/compile/920625-1.c b/gcc/testsuite/gcc.c-torture/compile/920625-1.c
index 720d43fd42f..759a356b5b7 100644
--- a/gcc/testsuite/gcc.c-torture/compile/920625-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/920625-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
typedef unsigned long int unsigned_word;
typedef signed long int signed_word;
typedef unsigned_word word;
diff --git a/gcc/testsuite/gcc.c-torture/compile/920723-1.c b/gcc/testsuite/gcc.c-torture/compile/920723-1.c
index cd8710be7e8..d6f85817e65 100644
--- a/gcc/testsuite/gcc.c-torture/compile/920723-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/920723-1.c
@@ -1,4 +1,5 @@
/* { dg-add-options stack_size } */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
#if defined(STACK_SIZE) && STACK_SIZE < 65536
# define GITT_SIZE 75
diff --git a/gcc/testsuite/gcc.c-torture/compile/920928-5.c b/gcc/testsuite/gcc.c-torture/compile/920928-5.c
index 8c975f0c051..70da53261df 100644
--- a/gcc/testsuite/gcc.c-torture/compile/920928-5.c
+++ b/gcc/testsuite/gcc.c-torture/compile/920928-5.c
@@ -1,4 +1,7 @@
/* REPRODUCED:CC1:SIGNAL MACHINE:m68k OPTIONS:-fpcc-struct-return */
+
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
struct b{};
f(struct b(*f)())
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/921202-1.c b/gcc/testsuite/gcc.c-torture/compile/921202-1.c
index 1287edc57b8..31f969e7c8c 100644
--- a/gcc/testsuite/gcc.c-torture/compile/921202-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/921202-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+
f ()
{
long dx[2055];
diff --git a/gcc/testsuite/gcc.c-torture/compile/930117-1.c b/gcc/testsuite/gcc.c-torture/compile/930117-1.c
index 83317cdd07b..9321448082f 100644
--- a/gcc/testsuite/gcc.c-torture/compile/930117-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/930117-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
f(x)
{
(*(void (*)())&x)();
diff --git a/gcc/testsuite/gcc.c-torture/compile/930421-1.c b/gcc/testsuite/gcc.c-torture/compile/930421-1.c
index 01b465f7fec..9e16fe17dd9 100644
--- a/gcc/testsuite/gcc.c-torture/compile/930421-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/930421-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
double q(double);
f (int **x, int *r, int *s, int a, int b, int c, int d)
diff --git a/gcc/testsuite/gcc.c-torture/compile/930607-1.c b/gcc/testsuite/gcc.c-torture/compile/930607-1.c
index 97c94b25ec3..f866dbfb3dc 100644
--- a/gcc/testsuite/gcc.c-torture/compile/930607-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/930607-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
typedef void f ();
typedef f *pf;
long long i;
diff --git a/gcc/testsuite/gcc.c-torture/compile/930623-1.c b/gcc/testsuite/gcc.c-torture/compile/930623-1.c
index 022ad01804e..9dbfe1e73c5 100644
--- a/gcc/testsuite/gcc.c-torture/compile/930623-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/930623-1.c
@@ -1,4 +1,5 @@
/* { dg-require-effective-target untyped_assembly } */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
g (a, b) {}
diff --git a/gcc/testsuite/gcc.c-torture/compile/931003-1.c b/gcc/testsuite/gcc.c-torture/compile/931003-1.c
index 922b14379c9..8db815fc764 100644
--- a/gcc/testsuite/gcc.c-torture/compile/931003-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/931003-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+
f (n, a)
int n;
double a[];
diff --git a/gcc/testsuite/gcc.c-torture/compile/931004-1.c b/gcc/testsuite/gcc.c-torture/compile/931004-1.c
index 0e741fd4ac0..34766b5559a 100644
--- a/gcc/testsuite/gcc.c-torture/compile/931004-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/931004-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+
#define A "This is a long test that tests the structure initialization"
#define B A,A
#define C B,B,B,B
diff --git a/gcc/testsuite/gcc.c-torture/compile/950719-1.c b/gcc/testsuite/gcc.c-torture/compile/950719-1.c
index d3277fada4e..fa1b01b9a7e 100644
--- a/gcc/testsuite/gcc.c-torture/compile/950719-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/950719-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+
typedef struct
{
int Header;
diff --git a/gcc/testsuite/gcc.c-torture/compile/951222-1.c b/gcc/testsuite/gcc.c-torture/compile/951222-1.c
index b8246f5fe81..8a447f3473c 100644
--- a/gcc/testsuite/gcc.c-torture/compile/951222-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/951222-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+
extern long long foo ();
long long
diff --git a/gcc/testsuite/gcc.c-torture/compile/961004-1.c b/gcc/testsuite/gcc.c-torture/compile/961004-1.c
index 6407b625d66..cf47f60d5ea 100644
--- a/gcc/testsuite/gcc.c-torture/compile/961004-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/961004-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
void
f1 (o1, o2, o3, i, j, k)
long long *o1, *o2, *o3;
diff --git a/gcc/testsuite/gcc.c-torture/compile/980504-1.c b/gcc/testsuite/gcc.c-torture/compile/980504-1.c
index 7b757ccd2e8..6e043a7af19 100644
--- a/gcc/testsuite/gcc.c-torture/compile/980504-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/980504-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
typedef struct _geom_elem {
double coeffs[6];
} pGeomDefRec, *pGeomDefPtr;
diff --git a/gcc/testsuite/gcc.c-torture/compile/980816-1.c b/gcc/testsuite/gcc.c-torture/compile/980816-1.c
index a79100fab57..5bd83b17063 100644
--- a/gcc/testsuite/gcc.c-torture/compile/980816-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/980816-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
typedef __SIZE_TYPE__ size_t;
typedef void *XtPointer;
diff --git a/gcc/testsuite/gcc.c-torture/compile/990517-1.c b/gcc/testsuite/gcc.c-torture/compile/990517-1.c
index c738d4be760..5a08a866002 100644
--- a/gcc/testsuite/gcc.c-torture/compile/990517-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/990517-1.c
@@ -1,4 +1,7 @@
/* Extracted from the sdm module in perl. */
+
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+
typedef struct {
char *dptr;
int dsize;
diff --git a/gcc/testsuite/gcc.c-torture/compile/990625-1.c b/gcc/testsuite/gcc.c-torture/compile/990625-1.c
index 97a2331c7a5..befff06579e 100644
--- a/gcc/testsuite/gcc.c-torture/compile/990625-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/990625-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "no string.h in eBPF" { bpf-*-* } } */
+
#define __USE_STRING_INLINES
#include <string.h>
diff --git a/gcc/testsuite/gcc.c-torture/compile/991213-2.c b/gcc/testsuite/gcc.c-torture/compile/991213-2.c
index 98385d56263..aecf4e0f0cb 100644
--- a/gcc/testsuite/gcc.c-torture/compile/991213-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/991213-2.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
typedef long __kernel_time_t;
typedef __kernel_time_t time_t;
time2(
diff --git a/gcc/testsuite/gcc.c-torture/compile/DFcmp.c b/gcc/testsuite/gcc.c-torture/compile/DFcmp.c
index 3bb253476d7..808874de1a8 100644
--- a/gcc/testsuite/gcc.c-torture/compile/DFcmp.c
+++ b/gcc/testsuite/gcc.c-torture/compile/DFcmp.c
@@ -1,4 +1,6 @@
/* { dg-require-effective-target int32plus } */
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
#define type double
type glob0, glob1;
diff --git a/gcc/testsuite/gcc.c-torture/compile/HIcmp.c b/gcc/testsuite/gcc.c-torture/compile/HIcmp.c
index 77b47886ed1..6e68271a009 100644
--- a/gcc/testsuite/gcc.c-torture/compile/HIcmp.c
+++ b/gcc/testsuite/gcc.c-torture/compile/HIcmp.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
#define type short
type glob0, glob1;
diff --git a/gcc/testsuite/gcc.c-torture/compile/HIset.c b/gcc/testsuite/gcc.c-torture/compile/HIset.c
index 163cb7cbe32..a0d426c2c07 100644
--- a/gcc/testsuite/gcc.c-torture/compile/HIset.c
+++ b/gcc/testsuite/gcc.c-torture/compile/HIset.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
#define E0 ((type *)10000000)
#define reg0 r0
#define indreg0 (*p0)
diff --git a/gcc/testsuite/gcc.c-torture/compile/QIcmp.c b/gcc/testsuite/gcc.c-torture/compile/QIcmp.c
index c5161646f2c..a4dba2487e4 100644
--- a/gcc/testsuite/gcc.c-torture/compile/QIcmp.c
+++ b/gcc/testsuite/gcc.c-torture/compile/QIcmp.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
#define type signed char
type glob0, glob1;
diff --git a/gcc/testsuite/gcc.c-torture/compile/QIset.c b/gcc/testsuite/gcc.c-torture/compile/QIset.c
index 212609dc864..e2fde2bda7e 100644
--- a/gcc/testsuite/gcc.c-torture/compile/QIset.c
+++ b/gcc/testsuite/gcc.c-torture/compile/QIset.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
#define E0 ((type *)10000000)
#define reg0 r0
#define indreg0 (*p0)
diff --git a/gcc/testsuite/gcc.c-torture/compile/SFset.c b/gcc/testsuite/gcc.c-torture/compile/SFset.c
index dc7f48dd2dd..a7efecf9717 100644
--- a/gcc/testsuite/gcc.c-torture/compile/SFset.c
+++ b/gcc/testsuite/gcc.c-torture/compile/SFset.c
@@ -1,4 +1,5 @@
/* { dg-require-effective-target int32plus } */
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
#define E0 ((type *)10000000)
#define reg0 r0
diff --git a/gcc/testsuite/gcc.c-torture/compile/SIcmp.c b/gcc/testsuite/gcc.c-torture/compile/SIcmp.c
index 4a9e0d57fd7..ce1281b6093 100644
--- a/gcc/testsuite/gcc.c-torture/compile/SIcmp.c
+++ b/gcc/testsuite/gcc.c-torture/compile/SIcmp.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
#define type int
type glob0, glob1;
diff --git a/gcc/testsuite/gcc.c-torture/compile/SIset.c b/gcc/testsuite/gcc.c-torture/compile/SIset.c
index 5fb93579f4b..b200a264b95 100644
--- a/gcc/testsuite/gcc.c-torture/compile/SIset.c
+++ b/gcc/testsuite/gcc.c-torture/compile/SIset.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
#define E0 ((type *)10000000)
#define reg0 r0
#define indreg0 (*p0)
diff --git a/gcc/testsuite/gcc.c-torture/compile/UHIcmp.c b/gcc/testsuite/gcc.c-torture/compile/UHIcmp.c
index 529e3a33fd3..b0029d23ea4 100644
--- a/gcc/testsuite/gcc.c-torture/compile/UHIcmp.c
+++ b/gcc/testsuite/gcc.c-torture/compile/UHIcmp.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
#define type unsigned short
type glob0, glob1;
diff --git a/gcc/testsuite/gcc.c-torture/compile/UQIcmp.c b/gcc/testsuite/gcc.c-torture/compile/UQIcmp.c
index 3e9cdebc903..e28d13b03ab 100644
--- a/gcc/testsuite/gcc.c-torture/compile/UQIcmp.c
+++ b/gcc/testsuite/gcc.c-torture/compile/UQIcmp.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
#define type unsigned char
type glob0, glob1;
diff --git a/gcc/testsuite/gcc.c-torture/compile/USIcmp.c b/gcc/testsuite/gcc.c-torture/compile/USIcmp.c
index 69788a45b2e..27e5503bd4d 100644
--- a/gcc/testsuite/gcc.c-torture/compile/USIcmp.c
+++ b/gcc/testsuite/gcc.c-torture/compile/USIcmp.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
#define type unsigned int
type glob0, glob1;
diff --git a/gcc/testsuite/gcc.c-torture/compile/bcopy.c b/gcc/testsuite/gcc.c-torture/compile/bcopy.c
index 8108f296600..5225a2f9156 100644
--- a/gcc/testsuite/gcc.c-torture/compile/bcopy.c
+++ b/gcc/testsuite/gcc.c-torture/compile/bcopy.c
@@ -1,4 +1,5 @@
/* { dg-add-options stack_size } */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
void
bcopy1 (s, d, c)
diff --git a/gcc/testsuite/gcc.c-torture/compile/callind.c b/gcc/testsuite/gcc.c-torture/compile/callind.c
index 5938d1b88fc..8a2004de2c0 100644
--- a/gcc/testsuite/gcc.c-torture/compile/callind.c
+++ b/gcc/testsuite/gcc.c-torture/compile/callind.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
bar (foo, a)
int (**foo) ();
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/calls-void.c b/gcc/testsuite/gcc.c-torture/compile/calls-void.c
index eeed4fdfdc1..e086837ac97 100644
--- a/gcc/testsuite/gcc.c-torture/compile/calls-void.c
+++ b/gcc/testsuite/gcc.c-torture/compile/calls-void.c
@@ -1,5 +1,6 @@
/* { dg-require-effective-target ptr32plus } */
/* { dg-require-effective-target untyped_assembly } */
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
typedef void (*T)(void);
f1 ()
diff --git a/gcc/testsuite/gcc.c-torture/compile/calls.c b/gcc/testsuite/gcc.c-torture/compile/calls.c
index ca07122a786..a8084de0e5a 100644
--- a/gcc/testsuite/gcc.c-torture/compile/calls.c
+++ b/gcc/testsuite/gcc.c-torture/compile/calls.c
@@ -1,5 +1,6 @@
/* { dg-require-effective-target ptr32plus } */
/* { dg-require-effective-target untyped_assembly } */
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
typedef void *(*T)(void);
f1 ()
diff --git a/gcc/testsuite/gcc.c-torture/compile/consec.c b/gcc/testsuite/gcc.c-torture/compile/consec.c
index 01fa25b009b..b8c376d7076 100644
--- a/gcc/testsuite/gcc.c-torture/compile/consec.c
+++ b/gcc/testsuite/gcc.c-torture/compile/consec.c
@@ -1,4 +1,6 @@
/* { dg-require-effective-target untyped_assembly } */
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
int glob;
conseq (a, b, c, d)
diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c b/gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c
index 0bd8f6af995..53204735493 100644
--- a/gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c
+++ b/gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c
@@ -1,5 +1,6 @@
/* { dg-skip-if "too complex for avr" { avr-*-* } } */
/* { dg-skip-if "ptxas times out" { nvptx-*-* } } */
+/* { dg-skip-if "no chance for bpf" { bpf-*-* } } */
/* { dg-timeout-factor 4.0 } */
#define LIM1(x) x##0, x##1, x##2, x##3, x##4, x##5, x##6, x##7, x##8, x##9,
#define LIM2(x) LIM1(x##0) LIM1(x##1) LIM1(x##2) LIM1(x##3) LIM1(x##4) \
diff --git a/gcc/testsuite/gcc.c-torture/compile/lll.c b/gcc/testsuite/gcc.c-torture/compile/lll.c
index dee9dc37d15..ea09c871c6b 100644
--- a/gcc/testsuite/gcc.c-torture/compile/lll.c
+++ b/gcc/testsuite/gcc.c-torture/compile/lll.c
@@ -1,3 +1,4 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
byte_match_count2 (buf, n, xm, m1, m2, m3, m4)
unsigned *buf;
diff --git a/gcc/testsuite/gcc.c-torture/compile/parms.c b/gcc/testsuite/gcc.c-torture/compile/parms.c
index 8205a9c1454..1bfc93d2abb 100644
--- a/gcc/testsuite/gcc.c-torture/compile/parms.c
+++ b/gcc/testsuite/gcc.c-torture/compile/parms.c
@@ -1,4 +1,5 @@
/* { dg-require-effective-target alloca } */
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
#define alloca __builtin_alloca
x (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, x, y)
diff --git a/gcc/testsuite/gcc.c-torture/compile/pass.c b/gcc/testsuite/gcc.c-torture/compile/pass.c
index 4e028393feb..529a01dac85 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pass.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pass.c
@@ -1,4 +1,6 @@
/* { dg-require-effective-target untyped_assembly } */
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
int
foo (a, b, c)
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/poor.c b/gcc/testsuite/gcc.c-torture/compile/poor.c
index 66d584aff43..20287ef2354 100644
--- a/gcc/testsuite/gcc.c-torture/compile/poor.c
+++ b/gcc/testsuite/gcc.c-torture/compile/poor.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+
typedef struct
{
char c[510];
diff --git a/gcc/testsuite/gcc.c-torture/compile/pp.c b/gcc/testsuite/gcc.c-torture/compile/pp.c
index 7d38d53de0f..c1e09eab407 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pp.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pp.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
foo (a, b, c, d, e, i0, f, i1)
double a, b, c, d, e, f;
int i0, i1;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr21840.c b/gcc/testsuite/gcc.c-torture/compile/pr21840.c
index bec3d6bf5d7..af47fa5c0e0 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr21840.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr21840.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
void fn_show_state(void);
typedef void (*fn_handler_fn)(void);
static fn_handler_fn fn_handler[1];
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr23929.c b/gcc/testsuite/gcc.c-torture/compile/pr23929.c
index 210bb585e06..d63eb71e7bd 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr23929.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr23929.c
@@ -1,4 +1,5 @@
/* PR tree-optimization/23929 */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
extern void bar (char *);
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr25310.c b/gcc/testsuite/gcc.c-torture/compile/pr25310.c
index 54695e05b4f..674745f80ec 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr25310.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr25310.c
@@ -1,4 +1,5 @@
/* { dg-skip-if "Array too big" { "pdp11-*-*" } { "-mint32" } } */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
/* Prevent spurious test failures on 16-bit targets. */
#if __INT_MAX__ >= 2147483647L
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr25311.c b/gcc/testsuite/gcc.c-torture/compile/pr25311.c
index 26c5bc37b83..43ef3fd9523 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr25311.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr25311.c
@@ -1,3 +1,4 @@
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
struct w
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr32139.c b/gcc/testsuite/gcc.c-torture/compile/pr32139.c
index 7b8522f5174..8b13cb9665a 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr32139.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr32139.c
@@ -1,4 +1,6 @@
/* PR tree-optimization/32139 */
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
int foo (void);
int bar (void) __attribute__ ((const));
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr32399.c b/gcc/testsuite/gcc.c-torture/compile/pr32399.c
index cc2b1b18984..b29dbd7986a 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr32399.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr32399.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
void f(unsigned char *src, unsigned char *dst, int num, unsigned char *pos, unsigned char *diffuse, int hasdiffuse, unsigned char *specular, int hasspecular) {
int i;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr34091.c b/gcc/testsuite/gcc.c-torture/compile/pr34091.c
index 0b8549132e6..a623a383fd0 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr34091.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr34091.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
typedef unsigned int GLenum;
typedef unsigned char GLboolean;
typedef int GLint;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr34458.c b/gcc/testsuite/gcc.c-torture/compile/pr34458.c
index 096cc0c9b89..09febbea31f 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr34458.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr34458.c
@@ -1,4 +1,5 @@
/* Testcase by Martin Michlmayr <tbm@cyrius.com> */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
typedef struct
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr34688.c b/gcc/testsuite/gcc.c-torture/compile/pr34688.c
index 60e0f3c9f15..ec890cb8f15 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr34688.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr34688.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
typedef __SIZE_TYPE__ size_t;
typedef struct {
}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr35607.c b/gcc/testsuite/gcc.c-torture/compile/pr35607.c
index 7f5aa7a2b7c..9dc1b5c4b90 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr35607.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr35607.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
extern void (*__fini_array_start []) (void);
extern void (*__fini_array_end []) (void);
void
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr37258.c b/gcc/testsuite/gcc.c-torture/compile/pr37258.c
index 286f2fc4427..41801781e3a 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr37258.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr37258.c
@@ -1,4 +1,6 @@
/* { dg-require-effective-target untyped_assembly } */
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
typedef signed char int8_t;
typedef short int int16_t;
typedef int int32_t;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr37327.c b/gcc/testsuite/gcc.c-torture/compile/pr37327.c
index 79946b7522d..5ca9d1d45b6 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr37327.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr37327.c
@@ -1,4 +1,6 @@
/* { dg-require-effective-target untyped_assembly } */
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
typedef signed char int8_t;
typedef short int int16_t;
typedef int int32_t;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr37381.c b/gcc/testsuite/gcc.c-torture/compile/pr37381.c
index a2fed66c4ee..d8cd47d329d 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr37381.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr37381.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
extern unsigned int __invalid_size_argument_for_IOC;
typedef unsigned int __u32;
struct video_window
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr37433-1.c b/gcc/testsuite/gcc.c-torture/compile/pr37433-1.c
index 322c167d682..a067c19182b 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr37433-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr37433-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
void regex_subst(void)
{
const void *subst = "";
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr37433.c b/gcc/testsuite/gcc.c-torture/compile/pr37433.c
index 0ba1179886c..7237f38b6f2 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr37433.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr37433.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
int regex_subst(void)
{
const void *subst = "";
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr37669-2.c b/gcc/testsuite/gcc.c-torture/compile/pr37669-2.c
index abeae7a2f32..2170dda67f0 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr37669-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr37669-2.c
@@ -1,4 +1,5 @@
/* PR middle-end/37669 */
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
#define FMT10 "%d%d%d%d%d%d%d%d%d%d"
#define FMT100 FMT10 FMT10 FMT10 FMT10 FMT10 FMT10 FMT10 FMT10 FMT10 FMT10
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr37669.c b/gcc/testsuite/gcc.c-torture/compile/pr37669.c
index a2eafc75cb3..36e4c39d8ed 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr37669.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr37669.c
@@ -1,6 +1,7 @@
/* This testcase used to fail because a miscompiled execute_fold_all_builtins. */
/* { dg-options "-fgnu89-inline" } */
/* { dg-require-effective-target int32plus } */
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
typedef __SIZE_TYPE__ size_t;
extern __inline __attribute__ ((__always_inline__)) int __attribute__
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr37742-3.c b/gcc/testsuite/gcc.c-torture/compile/pr37742-3.c
index 541bd42ad5d..9e7b10fb7a3 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr37742-3.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr37742-3.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
void matmul_i4 (int * __restrict dest_y,
const int * __restrict abase,
const int * __restrict bbase_y,
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr39937.c b/gcc/testsuite/gcc.c-torture/compile/pr39937.c
index d0231053258..35a5e64b05f 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr39937.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr39937.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+
int foo (__const char *__restrict __s);
static void
read_anisou(char line[])
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr39941.c b/gcc/testsuite/gcc.c-torture/compile/pr39941.c
index b6209086be9..8a3156f77c8 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr39941.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr39941.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
typedef void (*entry_func) (void) __attribute__ ((noreturn));
extern entry_func entry_addr;
static void bsd_boot_entry (void)
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr40080.c b/gcc/testsuite/gcc.c-torture/compile/pr40080.c
index e36f14273e8..d7dd1d0f47a 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr40080.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr40080.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
extern void *ff(void*,int);
struct lpgl { struct lpgl *next; };
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr41181.c b/gcc/testsuite/gcc.c-torture/compile/pr41181.c
index f866249b605..410309c89ee 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr41181.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr41181.c
@@ -1,5 +1,7 @@
/* { dg-require-effective-target ptr32plus } */
/* { dg-skip-if "The array is too big" { "avr-*-*" "pdp11-*-*" } } */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+
char paths[1024];
static void x264_slicetype_path(char (*best_paths)[250], int n, int length)
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr41634.c b/gcc/testsuite/gcc.c-torture/compile/pr41634.c
index 976e463e2ba..e6f653c0395 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr41634.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr41634.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+
extern int _xgetw();
extern int foo(char*);
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr43415.c b/gcc/testsuite/gcc.c-torture/compile/pr43415.c
index c00e1c41ce9..a11ac30ad84 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr43415.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr43415.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+
int main()
{
unsigned long long table[256];
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr43417.c b/gcc/testsuite/gcc.c-torture/compile/pr43417.c
index 45bf053a0cb..061cc2951bf 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr43417.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr43417.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+
int pid_count = 0;
unsigned int getopt (int, const char**, const char*);
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr43635.c b/gcc/testsuite/gcc.c-torture/compile/pr43635.c
index df826b6f4c0..4862e5da81e 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr43635.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr43635.c
@@ -1,4 +1,6 @@
/* { dg-require-effective-target untyped_assembly } */
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
extern void d (void);
void (*foo (void)) (float)
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr43791.c b/gcc/testsuite/gcc.c-torture/compile/pr43791.c
index 2b1d06ff789..68202859a52 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr43791.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr43791.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
int owner();
int clear();
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr43845.c b/gcc/testsuite/gcc.c-torture/compile/pr43845.c
index bdb45e7d2a8..8c7541f2a37 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr43845.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr43845.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
typedef int __attribute__ ((const)) (*x264_pixel_cmp_t)(void);
typedef struct {
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr44043.c b/gcc/testsuite/gcc.c-torture/compile/pr44043.c
index 943501b4091..ed8806be4f2 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr44043.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr44043.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
typedef unsigned char __u8;
typedef unsigned short __u16;
typedef unsigned int __u32;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr44063.c b/gcc/testsuite/gcc.c-torture/compile/pr44063.c
index 596e1dc991f..32208f610f9 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr44063.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr44063.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+
typedef signed char int8_t;
typedef short int16_t;
typedef unsigned char uint8_t;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr44788.c b/gcc/testsuite/gcc.c-torture/compile/pr44788.c
index 99dc7982394..6e7e153ee95 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr44788.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr44788.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+
void joint_decode(float* mlt_buffer1, int t) {
int i;
float decode_buffer[1060];
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr48596.c b/gcc/testsuite/gcc.c-torture/compile/pr48596.c
index 382a152413e..743bd82e868 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr48596.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr48596.c
@@ -1,4 +1,6 @@
/* PR target/48596 */
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
enum { nrrdCenterUnknown, nrrdCenterNode, nrrdCenterCell, nrrdCenterLast };
typedef struct { int size; int center; } NrrdAxis;
typedef struct { int dim; NrrdAxis axis[10]; } Nrrd;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr51694.c b/gcc/testsuite/gcc.c-torture/compile/pr51694.c
index f5c1a40df86..66b6acff617 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr51694.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr51694.c
@@ -1,4 +1,6 @@
/* { dg-require-effective-target untyped_assembly } */
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
void
foo (x, fn)
void (*fn) ();
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr51856.c b/gcc/testsuite/gcc.c-torture/compile/pr51856.c
index 6644c7fdc14..823a0bed073 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr51856.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr51856.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
struct B { int b1; long long b2, b3; int b4; };
struct C { char c1[40], c2, c3[96]; long long c4[5], c5; char c6[596]; };
void fn1 (long long), fn2 (char *, int), fn4 (void);
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr52750.c b/gcc/testsuite/gcc.c-torture/compile/pr52750.c
index 36391bac5d9..78d48a92547 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr52750.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr52750.c
@@ -1,4 +1,5 @@
/* PR middle-end/52750 */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
typedef signed char V __attribute__((vector_size (32)));
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr54713-1.c b/gcc/testsuite/gcc.c-torture/compile/pr54713-1.c
index f042ea2fc6c..0d4172a576b 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr54713-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr54713-1.c
@@ -1,4 +1,5 @@
/* PR tree-optimization/54713 */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
#ifndef N
#define N 8
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr54713-2.c b/gcc/testsuite/gcc.c-torture/compile/pr54713-2.c
index c3910373111..f7d2364e197 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr54713-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr54713-2.c
@@ -1,4 +1,5 @@
/* PR tree-optimization/54713 */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
#define N 16
#define ONE 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr54713-3.c b/gcc/testsuite/gcc.c-torture/compile/pr54713-3.c
index 6164a5eec0e..76a35b067c5 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr54713-3.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr54713-3.c
@@ -1,4 +1,5 @@
/* PR tree-optimization/54713 */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
#define N 32
#define ONE 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr55921.c b/gcc/testsuite/gcc.c-torture/compile/pr55921.c
index de0635d66ad..cf9084e33f0 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr55921.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr55921.c
@@ -1,5 +1,6 @@
/* PR tree-optimization/55921 */
/* { dg-skip-if "Not enough registers" { "pdp11-*-*" } } */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
typedef union
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr70240.c b/gcc/testsuite/gcc.c-torture/compile/pr70240.c
index 830d4ddcc93..466d3a7c961 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr70240.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr70240.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
typedef short v16hi __attribute__ ((vector_size (32)));
typedef int v8si __attribute__ ((vector_size (32)));
typedef long long v4di __attribute__ ((vector_size (32)));
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr70355.c b/gcc/testsuite/gcc.c-torture/compile/pr70355.c
index 474942715f8..f7114208005 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr70355.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr70355.c
@@ -1,5 +1,7 @@
/* { dg-require-effective-target int128 } */
/* { dg-additional-options "-g" } */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+
typedef unsigned __int128 v2ti __attribute__ ((vector_size (32)));
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr77754-2.c b/gcc/testsuite/gcc.c-torture/compile/pr77754-2.c
index d088961963d..2c9a409cdae 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr77754-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr77754-2.c
@@ -1,5 +1,6 @@
// { dg-require-effective-target alloca }
/* PR c/77754 */
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
int fn3();
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr77754-3.c b/gcc/testsuite/gcc.c-torture/compile/pr77754-3.c
index fb25e234fe2..4af1ffac22b 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr77754-3.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr77754-3.c
@@ -1,5 +1,6 @@
// { dg-require-effective-target alloca }
/* PR c/77754 */
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
int fn3();
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr77754-4.c b/gcc/testsuite/gcc.c-torture/compile/pr77754-4.c
index 1c5c4619a33..874c28dc0f0 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr77754-4.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr77754-4.c
@@ -1,5 +1,6 @@
// { dg-require-effective-target alloca }
/* PR c/77754 */
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
int fn3();
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr82052.c b/gcc/testsuite/gcc.c-torture/compile/pr82052.c
index 3763161e350..09fac5edb1e 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr82052.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr82052.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned uint32_t;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr83487.c b/gcc/testsuite/gcc.c-torture/compile/pr83487.c
index 9effb1eef03..9de0e17939f 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr83487.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr83487.c
@@ -1,4 +1,5 @@
/* PR middle-end/83487 */
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
struct __attribute__ ((aligned)) A {};
struct A a;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr86122.c b/gcc/testsuite/gcc.c-torture/compile/pr86122.c
index 0a4fd144ae6..1bd46733183 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr86122.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr86122.c
@@ -1,4 +1,5 @@
/* PR middle-end/86122 */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
_Complex int
foo (_Complex int x)
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr89280.c b/gcc/testsuite/gcc.c-torture/compile/pr89280.c
index 15b6e7051f8..64ca7028894 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr89280.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr89280.c
@@ -1,6 +1,7 @@
// { dg-require-effective-target nonlocal_goto }
// { dg-require-effective-target label_values }
/* PR tree-optimization/89280 */
+/* { dg-skip-if "no support for indirect jumps" { bpf-*-* } } */
int a;
void foo (void);
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr89663-2.c b/gcc/testsuite/gcc.c-torture/compile/pr89663-2.c
index 052fe69f40e..94193203738 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr89663-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr89663-2.c
@@ -1,4 +1,5 @@
/* PR middle-end/89663 */
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
int irint (double);
long lrint (double);
diff --git a/gcc/testsuite/gcc.c-torture/compile/pret-arg.c b/gcc/testsuite/gcc.c-torture/compile/pret-arg.c
index a7fa8562830..d86d135dc4b 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pret-arg.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pret-arg.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
foo (a, b, c, d, e, f, g, h, i, j, xx)
double xx;
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/pta-1.c b/gcc/testsuite/gcc.c-torture/compile/pta-1.c
index 515e5ff13f4..38c60cdda2d 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pta-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pta-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
+
typedef struct JSObject JSObject;
typedef struct JSObjectMap *(*JSNewObjectMapOp) (JSObject *obj);
typedef JSObject *(*JSGetMethodOp) (JSObject *obj);
diff --git a/gcc/testsuite/gcc.c-torture/compile/regs-arg-size.c b/gcc/testsuite/gcc.c-torture/compile/regs-arg-size.c
index f5f01116eda..77518866d3f 100644
--- a/gcc/testsuite/gcc.c-torture/compile/regs-arg-size.c
+++ b/gcc/testsuite/gcc.c-torture/compile/regs-arg-size.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+
int foo;
typedef long unsigned int size_t;
typedef short unsigned int wchar_t;
diff --git a/gcc/testsuite/gcc.c-torture/compile/sound.c b/gcc/testsuite/gcc.c-torture/compile/sound.c
index be727e3febb..781ad4a3087 100644
--- a/gcc/testsuite/gcc.c-torture/compile/sound.c
+++ b/gcc/testsuite/gcc.c-torture/compile/sound.c
@@ -1,3 +1,4 @@
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
main ()
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/stack-check-1.c b/gcc/testsuite/gcc.c-torture/compile/stack-check-1.c
index 2a03f7c29ae..6bb079e7fd2 100644
--- a/gcc/testsuite/gcc.c-torture/compile/stack-check-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/stack-check-1.c
@@ -1,4 +1,5 @@
/* { dg-require-effective-target untyped_assembly } */
/* { dg-require-stack-check "" } */
/* { dg-additional-options "-fstack-check" } */
+/* { dg-skip-if "no support for indirect calls" { bpf-*-* } } */
#include "20031023-1.c"
diff --git a/gcc/testsuite/gcc.c-torture/compile/structret.c b/gcc/testsuite/gcc.c-torture/compile/structret.c
index 9c705d4c0a2..d99eaa630bb 100644
--- a/gcc/testsuite/gcc.c-torture/compile/structret.c
+++ b/gcc/testsuite/gcc.c-torture/compile/structret.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
struct foo
{
int a, b, c, d;
diff --git a/gcc/testsuite/gcc.c-torture/compile/uuarg.c b/gcc/testsuite/gcc.c-torture/compile/uuarg.c
index 930dd8ab5f6..875c7c3b50f 100644
--- a/gcc/testsuite/gcc.c-torture/compile/uuarg.c
+++ b/gcc/testsuite/gcc.c-torture/compile/uuarg.c
@@ -1,4 +1,6 @@
/* { dg-require-effective-target untyped_assembly } */
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+
foo (a, b, c, d, e, f, g, h, i)
{
return foo () + i;
diff --git a/gcc/testsuite/gcc.dg/20001009-1.c b/gcc/testsuite/gcc.dg/20001009-1.c
index 1a5567779b5..580e4b4d307 100644
--- a/gcc/testsuite/gcc.dg/20001009-1.c
+++ b/gcc/testsuite/gcc.dg/20001009-1.c
@@ -1,5 +1,6 @@
/* { dg-do compile { target fpic } } */
/* { dg-options "-O2 -fpic" } */
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
extern void foo (void *a, double x, double y);
void
diff --git a/gcc/testsuite/gcc.dg/20020418-1.c b/gcc/testsuite/gcc.dg/20020418-1.c
index 7314ec000ef..456967fdd36 100644
--- a/gcc/testsuite/gcc.dg/20020418-1.c
+++ b/gcc/testsuite/gcc.dg/20020418-1.c
@@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-options "-O2 -msse -ffast-math" { target i?86-*-* x86_64-*-* } } */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
void bar (float *a, float *b);
diff --git a/gcc/testsuite/gcc.dg/20020426-2.c b/gcc/testsuite/gcc.dg/20020426-2.c
index 9ad7a54f601..96517f7b840 100644
--- a/gcc/testsuite/gcc.dg/20020426-2.c
+++ b/gcc/testsuite/gcc.dg/20020426-2.c
@@ -3,6 +3,7 @@
/* { dg-do run } */
/* { dg-options "-O2" } */
/* { dg-options "-O2 -frename-registers -fomit-frame-pointer -fPIC -mtune=i686" { target { { i?86-*-* x86_64-*-* } && { ia32 && fpic } } } } */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
extern void exit (int);
diff --git a/gcc/testsuite/gcc.dg/20020430-1.c b/gcc/testsuite/gcc.dg/20020430-1.c
index 63915a24b17..f48bb672aaf 100644
--- a/gcc/testsuite/gcc.dg/20020430-1.c
+++ b/gcc/testsuite/gcc.dg/20020430-1.c
@@ -6,6 +6,7 @@
/* { dg-do compile { target fpic } } */
/* { dg-options "-O2 -frename-registers -fpic" } */
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
typedef unsigned long XID;
typedef XID Window;
diff --git a/gcc/testsuite/gcc.dg/20040306-1.c b/gcc/testsuite/gcc.dg/20040306-1.c
index 903d20ac256..8cac8697d99 100644
--- a/gcc/testsuite/gcc.dg/20040306-1.c
+++ b/gcc/testsuite/gcc.dg/20040306-1.c
@@ -2,7 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-O2" } */
-
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
typedef struct test
{
diff --git a/gcc/testsuite/gcc.dg/20040622-2.c b/gcc/testsuite/gcc.dg/20040622-2.c
index 0be320fa4e2..e62ec36d43a 100644
--- a/gcc/testsuite/gcc.dg/20040622-2.c
+++ b/gcc/testsuite/gcc.dg/20040622-2.c
@@ -1,5 +1,6 @@
/* { dg-do link } */
/* { dg-require-effective-target ptr32plus } */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
/* This validates codegen for [r1+32760] on Darwin. */
void f(char x[32688], double *y, double *z) __attribute__((noinline));
void f(char x[32688], double *y, double *z) {}
diff --git a/gcc/testsuite/gcc.dg/20050603-2.c b/gcc/testsuite/gcc.dg/20050603-2.c
index 8c8e58e1b4d..a135e3ea1a0 100644
--- a/gcc/testsuite/gcc.dg/20050603-2.c
+++ b/gcc/testsuite/gcc.dg/20050603-2.c
@@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2" } */
+/* { dg-skip-if "no stdlib.h in eBPF" { bpf-*-* } } */
#include <stdlib.h>
struct s {
unsigned short f: 16;
diff --git a/gcc/testsuite/gcc.dg/20050629-1.c b/gcc/testsuite/gcc.dg/20050629-1.c
index 0dd47f7024b..99d9ce823b0 100644
--- a/gcc/testsuite/gcc.dg/20050629-1.c
+++ b/gcc/testsuite/gcc.dg/20050629-1.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -w" } */
+/* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
/* This file was automatically reduced from tree-ssa-operands.c. It
contains many warnings, but it exposes a copy propagation bug that
diff --git a/gcc/testsuite/gcc.dg/20061026.c b/gcc/testsuite/gcc.dg/20061026.c
index 741ea2eb3b8..fa8069ce4cf 100644
--- a/gcc/testsuite/gcc.dg/20061026.c
+++ b/gcc/testsuite/gcc.dg/20061026.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O1" } */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
/* This testcase failed on s390. The frame size for function f will be
exactly 32768 bytes. The back end has to recognize that this is to
diff --git a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-18.c b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-18.c
index b4aa167f655..838a4935b0b 100644
--- a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-18.c
+++ b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-18.c
@@ -4,6 +4,7 @@
with zero or excessive size trigger either -Walloc-zero or
-Walloc-size-larger-than warnings.
{ dg-do compile }
+ { dg-skip-if "no support for indirect calls" { bpf-*-* } }
{ dg-options "-O2 -Wall -Walloc-zero -ftrack-macro-expansion=0" } */
#define ATTR(...) __attribute__ ((__VA_ARGS__))
diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-3.c b/gcc/testsuite/gcc.dg/Warray-bounds-3.c
index 773f4633dc7..f119502f025 100644
--- a/gcc/testsuite/gcc.dg/Warray-bounds-3.c
+++ b/gcc/testsuite/gcc.dg/Warray-bounds-3.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -Warray-bounds" } */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
/* based on PR 31227 */
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-30.c b/gcc/testsuite/gcc.dg/Warray-bounds-30.c
index ac7e9a6e8fb..b9965682101 100644
--- a/gcc/testsuite/gcc.dg/Warray-bounds-30.c
+++ b/gcc/testsuite/gcc.dg/Warray-bounds-30.c
@@ -1,7 +1,8 @@
/* PR tree-optimization/84047 - missing -Warray-bounds on an out-of-bounds
index into an array
{ dg-do compile }
- { dg-options "-O2 -Warray-bounds=2 -ftrack-macro-expansion=0" } */
+ { dg-options "-O2 -Warray-bounds=2 -ftrack-macro-expansion=0" }
+ { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
#include "range.h"
diff --git a/gcc/testsuite/gcc.dg/Wframe-larger-than-2.c b/gcc/testsuite/gcc.dg/Wframe-larger-than-2.c
index 1a5402f8120..d7068d04aef 100644
--- a/gcc/testsuite/gcc.dg/Wframe-larger-than-2.c
+++ b/gcc/testsuite/gcc.dg/Wframe-larger-than-2.c
@@ -1,6 +1,7 @@
/* Exercise -Wframe-larger-than= with a byte-size suffix.
{ dg-do compile }
- { dg-options "-O -Wframe-larger-than=1KB" } */
+ { dg-options "-O -Wframe-larger-than=1KB" }
+ { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
extern void f (void*, ...);
diff --git a/gcc/testsuite/gcc.dg/Wframe-larger-than.c b/gcc/testsuite/gcc.dg/Wframe-larger-than.c
index fab0adf37ee..8a40cf36df8 100644
--- a/gcc/testsuite/gcc.dg/Wframe-larger-than.c
+++ b/gcc/testsuite/gcc.dg/Wframe-larger-than.c
@@ -4,6 +4,7 @@
/* { dg-do compile } */
/* { dg-options "-Wframe-larger-than=2048" } */
+/* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
extern void func(char *);
diff --git a/gcc/testsuite/gcc.dg/Wrestrict-11.c b/gcc/testsuite/gcc.dg/Wrestrict-11.c
index 7b4b5aa2527..07b9cddad4b 100644
--- a/gcc/testsuite/gcc.dg/Wrestrict-11.c
+++ b/gcc/testsuite/gcc.dg/Wrestrict-11.c
@@ -3,7 +3,8 @@
that calls to strncpy involving multidimensional arrays of structs don't
trigger false positive -Wrestrict warnings.
{ dg-do compile }
- { dg-options "-O2 -Wrestrict -ftrack-macro-expansion=0" } */
+ { dg-options "-O2 -Wrestrict -ftrack-macro-expansion=0" }
+ { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/gcc.dg/builtins-config.h b/gcc/testsuite/gcc.dg/builtins-config.h
index f00e91a750f..5e27c1deb33 100644
--- a/gcc/testsuite/gcc.dg/builtins-config.h
+++ b/gcc/testsuite/gcc.dg/builtins-config.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005, 2006, 2009, 2011, 2012
+/* Copyright (C) 2003, 2004, 2005, 2006, 2009, 2011, 2012, 2019
Free Software Foundation.
Define macros useful in tests for bulitin functions. */
@@ -20,6 +20,8 @@
/* FreeBSD up to version 8 lacks support for cexp and friends. */
#elif defined(__vxworks)
/* VxWorks doesn't have a full C99 time. (cabs is missing, for example.) */
+#elif defined (__BPF__)
+/* No chance for eBPF to support C99 functions. */
#elif defined(_WIN32) && !defined(__CYGWIN__)
/* Windows doesn't have the entire C99 runtime. */
#elif (defined(__APPLE__) && defined(__ppc__) \
--
2.11.0
^ permalink raw reply [flat|nested] 223+ messages in thread
* [PATCH V2 3/8] bpf: new libgcc port
2019-08-17 1:00 [PATCH V2 0/8] eBPF support for GCC Jose E. Marchesi
` (2 preceding siblings ...)
2019-08-17 0:51 ` [PATCH V2 6/8] bpf: adjust GCC testsuite to eBPF limitations Jose E. Marchesi
@ 2019-08-17 0:51 ` Jose E. Marchesi
2019-08-19 1:33 ` Jeff Law
2019-08-17 0:51 ` [PATCH V2 7/8] bpf: manual updates for eBPF Jose E. Marchesi
` (3 subsequent siblings)
7 siblings, 1 reply; 223+ messages in thread
From: Jose E. Marchesi @ 2019-08-17 0:51 UTC (permalink / raw)
To: gcc-patches
This patch adds an eBPF port to libgcc.
As of today, compiled eBPF programs do not support a single-entry
point schema. Instead, a BPF "executable" is a relocatable ELF object
file containing multiple entry points, in certain named sections.
Also, the BPF loaders in the kernel do not execute .ini/.fini
constructors/destructors. Therefore, this patch provides empty crtn.S
and cri.S files.
libgcc/ChangeLog:
* config.host: Set cpu_type for bpf-*-* targets.
* config/bpf/t-bpf: Likewise.
* config/bpf/crtn.S: Likewise.
* config/bpf/crti.S: New file.
---
libgcc/ChangeLog | 7 +++++++
libgcc/config.host | 7 +++++++
libgcc/config/bpf/crti.S | 0
libgcc/config/bpf/crtn.S | 0
libgcc/config/bpf/t-bpf | 24 ++++++++++++++++++++++++
5 files changed, 38 insertions(+)
create mode 100644 libgcc/config/bpf/crti.S
create mode 100644 libgcc/config/bpf/crtn.S
create mode 100644 libgcc/config/bpf/t-bpf
diff --git a/libgcc/config.host b/libgcc/config.host
index 503ebb6be20..2e9fbc35482 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -107,6 +107,9 @@ avr-*-*)
bfin*-*)
cpu_type=bfin
;;
+bpf-*-*)
+ cpu_type=bpf
+ ;;
cr16-*-*)
;;
crisv32-*-*)
@@ -526,6 +529,10 @@ bfin*-*)
tmake_file="$tmake_file bfin/t-bfin t-fdpbit"
extra_parts="crtbegin.o crtend.o crti.o crtn.o"
;;
+bpf-*-*)
+ tmake_file="$tmake_file ${cpu_type}/t-${cpu_type}"
+ extra_parts="crti.o crtn.o"
+ ;;
cr16-*-elf)
tmake_file="${tmake_file} cr16/t-cr16 cr16/t-crtlibid t-fdpbit"
extra_parts="$extra_parts crti.o crtn.o crtlibid.o"
diff --git a/libgcc/config/bpf/crti.S b/libgcc/config/bpf/crti.S
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/libgcc/config/bpf/crtn.S b/libgcc/config/bpf/crtn.S
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/libgcc/config/bpf/t-bpf b/libgcc/config/bpf/t-bpf
new file mode 100644
index 00000000000..c1bda7c98cb
--- /dev/null
+++ b/libgcc/config/bpf/t-bpf
@@ -0,0 +1,24 @@
+HOST_LIBGCC2_CFLAGS += -O0
+LIB2ADDEH =
+
+crti.o: $(srcdir)/config/bpf/crti.S
+ $(crt_compile) $(CRTSTUFF_T_CFLAGS) -c $<
+
+crtn.o: $(srcdir)/config/bpf/crtn.S
+ $(crt_compile) $(CRTSTUFF_T_CFLAGS) -c $<
+
+# Some of the functions defined in libgcc2 exceed the eBPF stack
+# limit, or other restrictions imposed by this peculiar target.
+# Therefore we have to exclude them here.
+#
+# Patterns in bpf.md must guarantee that no calls to the excluded
+# functions are ever generated, and compiler tests should make sure
+# this holds.
+#
+# Note that the modes in the function names below are misleading: di
+# means TImode.
+LIB2FUNCS_EXCLUDE = _mulvdi3 _divdi3 _moddi3 _divmoddi4 _udivdi3 _umoddi3 \
+ _udivmoddi4
+
+# Prevent building "advanced" stuff (for example, gcov support).
+INHIBIT_LIBC_CFLAGS = -Dinhibit_libc
--
2.11.0
^ permalink raw reply [flat|nested] 223+ messages in thread
* [PATCH V2 8/8] bpf: add myself as the maintainer for the eBPF port
2019-08-17 1:00 [PATCH V2 0/8] eBPF support for GCC Jose E. Marchesi
` (5 preceding siblings ...)
2019-08-17 0:51 ` [PATCH V2 4/8] bpf: gcc.target eBPF testsuite Jose E. Marchesi
@ 2019-08-17 0:59 ` Jose E. Marchesi
2019-08-19 6:26 ` Jeff Law
2019-08-19 12:45 ` Segher Boessenkool
2019-08-17 2:39 ` [PATCH V2 2/8] bpf: new GCC port Jose E. Marchesi
7 siblings, 2 replies; 223+ messages in thread
From: Jose E. Marchesi @ 2019-08-17 0:59 UTC (permalink / raw)
To: gcc-patches
ChangeLog:
* MAINTAINERS: Add myself as the maintainer for the eBPF port.
---
ChangeLog | 4 ++++
MAINTAINERS | 1 +
2 files changed, 5 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 5d8402949bc..bcf81e8f337 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -57,6 +57,7 @@ arm port Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
arm port Kyrylo Tkachov <kyrylo.tkachov@arm.com>
avr port Denis Chertykov <chertykov@gmail.com>
bfin port Jie Zhang <jzhang918@gmail.com>
+bpf port Jose E. Marchesi <jose.marchesi@oracle.com>
c6x port Bernd Schmidt <bernds_cb1@t-online.de>
cris port Hans-Peter Nilsson <hp@axis.com>
c-sky port Xianmiao Qu <xianmiao_qu@c-sky.com>
--
2.11.0
^ permalink raw reply [flat|nested] 223+ messages in thread
* [PATCH V2 0/8] eBPF support for GCC
@ 2019-08-17 1:00 Jose E. Marchesi
2019-08-17 0:51 ` [PATCH V2 1/8] Update config.sub and config.guess Jose E. Marchesi
` (7 more replies)
0 siblings, 8 replies; 223+ messages in thread
From: Jose E. Marchesi @ 2019-08-17 1:00 UTC (permalink / raw)
To: gcc-patches
[Differences from V1:
. A bug in bpf_target_macros was embarrassing enough to trigger me to
send this fixed new version of the patch series. My strlen
vs. sizeof dyslexia attacking again...
. Rebased to latest master.]
Hi people!
This patch series introduces a port of GCC to eBPF, which is a virtual
machine that resides in the Linux kernel. Initially intended for
user-level packet capture and filtering, eBPF is nowadays generalized
to serve as a general-purpose infrastructure also for non-networking
purposes.
The binutils support is already upstream. See
https://sourceware.org/ml/binutils/2019-05/msg00306.html.
eBPF architecture and ABI
=========================
Documentation for eBPF can be found in the linux kernel source tree,
file Documentation/networking/filter.txt. It covers the instructions
set, the way the interpreter works and the many restrictions imposed
by the kernel verifier.
As for the ABI, att this moment compiled eBPF doesn't have very well
established conventions. The details on what is expected to be in an
ELF file containing eBPF is determined, in practice, by what the llvm
BPF backend generates and what is expected by the the two existing
kernel loaders: bpf_load.c and libbpf.
We hope that the addition of this port to the GNU toolchain will help
to mature this domain.
Overview of the patch series
============================
The first patch is preparatory. It updates config.guess and
config.sub from the 'config' upstream project, in order to recognize
bpf-*-* triplets.
The second patch adds the new GCC port proper. Machine description,
implementation of target hooks and macros, command-line options and
the like.
The third patch adds a libgcc port for eBPF. At the moment, it is
minimal and it basically addresses the limitations imposed by the
target, by excluding a few functions in libgcc2 (all of them related
to TImodes) whose default implementations exceed the eBPF stack limit.
The fourth, fifth and sixth patches deal with testing the new
port. The gcc.target testsuite is extended with eBPF-specific tests,
covering the backend-specific built-in functions and diagnostics. The
check-effective-target functions are made aware of eBPF targets. Many
tests in the gcc.c-torture/compile testsuite are annotated to be
skipped in bpf-*-* targets, since they violate some restriction
imposed by the hardware (such as surpassing the stack limit.) The
resulting testsuite doesn't have unexpected failures, and is currently
the principal way to check for regressions in the port. Likewise,
many tests in the gcc.dg testsuite are annotated to be skipped in
bpf-*-* targets.
The seventh patch adds documentation updates to the GCC manual,
including information on the new command line options and compiler
built-ins.
Finally, the eight patch adds myself as the maintainer of the BPF
port. I personally commit to evolve and maintain the port for as long
as necessary, and to find a suitable replacement in case I have to
step down for whatever reason.
Some notes on the port
======================
As a compilation target, eBPF is rather peculiar. This is mainly due
to the quite hard restrictions imposed by the kernel verifier, and
also due to the security-driven design of the architecture itself.
To list a few examples:
. The stack is disjoint, and each stack frame corresponding to a
function activation is isolated: it is not possible for a callee to
access the stack frame of the caller, nor for a caller to access the
stack frame of it's callees. The frame pointer register is
read-only.
. Therefore it is not possible to pass arguments in the stack.
. Argument passing is restricted to 5 arguments.
. Each stack frame is limited to 512 bytes.
. The instruction set doesn't support indirect jumps.
. The instruction set doesn't support indirect calls.
. The architecture doesn't provide an explicit stack pointer.
Instead, the eBPF "hardware" (in this case the kernel verifier)
examines the compiled program and, by looking at the way the stack
is accessed, estimates the size of the stack frame for each
function.
. eBPF "programs" are not ELF executables, but relocatable ELF
objects. This is because the kernel loaders need access to certain
relocations, and each object contains several entry points, which
are different kind of eBPF kernel programs hooked to different parts
of the kernel. We are working on a more "Elf conventional"
alternative load model for eBPF programs, but that's a tangent at
this point.
Restrictions like the above impact the port in several ways, some of
which are good to keep in mind while reviewing the patches:
. Only (a subset of) C is supported at the moment. It should be
possible to add more languages in the future, as the eBPF kernel
verifier gets smarter and therefore more sophisticated programs are
allowed.
. The back end tries to issue errors when an eBPF restriction is
violated. This is to increase the chances of the resulting objects
to be palatable to the kernel verifier, shortening the development
cycle.
. Dynamic stack allocation (alloca and VLAs) is achieved by using what
otherwise would be a perfectly normal general register, %r9, as a
pseudo stack pointer. This has the disadvantage of making the
register "fixed" and therefore not available for general register
allocation. Hopefully there is a way to conditionalize this, since
both alloca and VLAs are relatively uncommon; I haven't found it
yet.
. The restrictions imposed by the kernel verifier, the characteristics
of the virtual architecture, the available kernel helpers, and the
behavior of the loaders, all change from one version of the kernel
to another. Therefore, the GCC backend provides a -mkernel command
line option that specifies the minimum kernel version in which the
program is to be executed. This is conceptually similar to the
-mcpu option provided by most ports.
I am preparing a white paper on "compiled eBPF" that will be available
at the Cauldron next month, addressing the points above, and many
others, in depth.
I am really eager to discuss with you people, how to best compile eBPF
:)
Present and future work
=======================
This port provides a rough equivalence of what the llvm port does [1]
and, along with the binutils support, it can be used to develop
compiled eBPF applications.
However, it is in no way finished.
There are a lot of further refinements and additions to the port on
our radar: how to translate more C, CO-RE capabilities (compile-once,
run-everywhere), generation of BTF, and much more... the eBPF field
moves very fast!
Also, a simulator and GDB support is on the works. Once completed, it
will emulate the different kernel contexts where eBPF programs
execute. Once the simulator works, a suitable board description will
be added to dejagnu, making it possible to run the GCC testsuites on
it.
Now that GCC is entering the play, there will be two C compilers able
to generate eBPF, the other being clang/llvm. Interoperability
between programs generated by both compilers becomes an important
concern, and keeping it will be an an on-going task, requiring
communication between the compilers communities and the kernel
community.
[1] modulus the very recently added CO-RE stuff added in llvm upstream
a few weeks ago.
Testing
=======
The following test suites have been executed for target
bpf-unknown-none in a x86-64-pc-linux-gnu host, using the latest
binutils from master.
Running /home/jemarch/gnu/src/gcc-git/gcc/testsuite/gcc.target/bpf/bpf.exp ...
=== gcc Summary ===
# of expected passes 230
Running /home/jemarch/gnu/src/gcc-git/gcc/testsuite/gcc.c-torture/compile/compile.exp ...
=== gcc Summary ===
# of expected passes 11743
# of unresolved testcases 28
# of unsupported tests 1482
Running /home/jemarch/gnu/src/gcc-git/gcc/testsuite/gcc.dg/dg.exp ...
=== gcc Summary ===
# of expected passes 23062
# of unexpected failures 819
# of unexpected successes 3
# of expected failures 267
# of unresolved testcases 559
# of unsupported tests 649
Most of the failures running the gcc-dg tests are due to linker errors
like undefined references to `exit' and other standard functions,
which are not available for the target.
Jose E. Marchesi (8):
Update config.sub and config.guess.
bpf: new GCC port
bpf: new libgcc port
bpf: gcc.target eBPF testsuite
bpf: make target-supports.exp aware of eBPF
bpf: adjust GCC testsuite to eBPF limitations
bpf: manual updates for eBPF
bpf: add myself as the maintainer for the eBPF port
ChangeLog | 14 +
MAINTAINERS | 1 +
config.guess | 264 ++++-
config.sub | 50 +-
configure | 68 +-
configure.ac | 54 +-
contrib/ChangeLog | 4 +
contrib/config-list.mk | 2 +-
gcc/ChangeLog | 23 +
gcc/common/config/bpf/bpf-common.c | 57 +
gcc/config.gcc | 9 +
gcc/config/bpf/bpf-helpers.def | 194 ++++
gcc/config/bpf/bpf-helpers.h | 324 ++++++
gcc/config/bpf/bpf-opts.h | 56 +
gcc/config/bpf/bpf-protos.h | 33 +
gcc/config/bpf/bpf.c | 1136 ++++++++++++++++++++
gcc/config/bpf/bpf.h | 565 ++++++++++
gcc/config/bpf/bpf.md | 528 +++++++++
gcc/config/bpf/bpf.opt | 119 ++
gcc/config/bpf/constraints.md | 29 +
gcc/config/bpf/predicates.md | 105 ++
gcc/config/bpf/t-bpf | 0
gcc/doc/extend.texi | 171 +++
gcc/doc/invoke.texi | 30 +
gcc/testsuite/ChangeLog | 293 +++++
gcc/testsuite/gcc.c-torture/compile/20000211-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20000403-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20000609-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20000804-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20001226-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20010102-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20010107-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20011109-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20011218-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20011229-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20020129-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20020304-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20020320-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20020604-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20020706-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20020706-2.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20021015-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20021205-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20030903-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20030921-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20031023-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20031023-2.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20031023-3.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20031023-4.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20031125-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20040101-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20040317-2.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20040614-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20040726-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20040909-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20050122-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20050202-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20050303-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20050622-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20051216-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20060208-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20060421-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20071207-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/20080903-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20081108-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20101217-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20121027-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20150327.c | 2 +
gcc/testsuite/gcc.c-torture/compile/20151204.c | 1 +
gcc/testsuite/gcc.c-torture/compile/900313-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/920428-2.c | 2 +
gcc/testsuite/gcc.c-torture/compile/920501-12.c | 1 +
gcc/testsuite/gcc.c-torture/compile/920501-4.c | 1 +
gcc/testsuite/gcc.c-torture/compile/920501-7.c | 1 +
gcc/testsuite/gcc.c-torture/compile/920625-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/920723-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/920928-5.c | 3 +
gcc/testsuite/gcc.c-torture/compile/921202-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/930117-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/930421-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/930607-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/930623-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/931003-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/931004-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/950719-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/951222-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/961004-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/980504-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/980816-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/990517-1.c | 3 +
gcc/testsuite/gcc.c-torture/compile/990625-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/991213-2.c | 2 +
gcc/testsuite/gcc.c-torture/compile/DFcmp.c | 2 +
gcc/testsuite/gcc.c-torture/compile/HIcmp.c | 2 +
gcc/testsuite/gcc.c-torture/compile/HIset.c | 2 +
gcc/testsuite/gcc.c-torture/compile/QIcmp.c | 2 +
gcc/testsuite/gcc.c-torture/compile/QIset.c | 2 +
gcc/testsuite/gcc.c-torture/compile/SFset.c | 1 +
gcc/testsuite/gcc.c-torture/compile/SIcmp.c | 2 +
gcc/testsuite/gcc.c-torture/compile/SIset.c | 2 +
gcc/testsuite/gcc.c-torture/compile/UHIcmp.c | 2 +
gcc/testsuite/gcc.c-torture/compile/UQIcmp.c | 2 +
gcc/testsuite/gcc.c-torture/compile/USIcmp.c | 2 +
gcc/testsuite/gcc.c-torture/compile/bcopy.c | 1 +
gcc/testsuite/gcc.c-torture/compile/callind.c | 2 +
gcc/testsuite/gcc.c-torture/compile/calls-void.c | 1 +
gcc/testsuite/gcc.c-torture/compile/calls.c | 1 +
gcc/testsuite/gcc.c-torture/compile/consec.c | 2 +
.../gcc.c-torture/compile/limits-fndefn.c | 1 +
gcc/testsuite/gcc.c-torture/compile/lll.c | 1 +
gcc/testsuite/gcc.c-torture/compile/parms.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pass.c | 2 +
gcc/testsuite/gcc.c-torture/compile/poor.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pp.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr21840.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr23929.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr25310.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr25311.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr32139.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr32399.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr34091.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr34458.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr34688.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr35607.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr37258.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr37327.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr37381.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr37433-1.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr37433.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr37669-2.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr37669.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr37742-3.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr39937.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr39941.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr40080.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr41181.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr41634.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr43415.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr43417.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr43635.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr43791.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr43845.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr44043.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr44063.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr44788.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr48596.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr51694.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr51856.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr52750.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr54713-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr54713-2.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr54713-3.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr55921.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr70240.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr70355.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr77754-2.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr77754-3.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr77754-4.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr82052.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pr83487.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr86122.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr89280.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pr89663-2.c | 1 +
gcc/testsuite/gcc.c-torture/compile/pret-arg.c | 2 +
gcc/testsuite/gcc.c-torture/compile/pta-1.c | 2 +
.../gcc.c-torture/compile/regs-arg-size.c | 2 +
gcc/testsuite/gcc.c-torture/compile/sound.c | 1 +
.../gcc.c-torture/compile/stack-check-1.c | 1 +
gcc/testsuite/gcc.c-torture/compile/structret.c | 2 +
gcc/testsuite/gcc.c-torture/compile/uuarg.c | 2 +
gcc/testsuite/gcc.dg/20001009-1.c | 1 +
gcc/testsuite/gcc.dg/20020418-1.c | 1 +
gcc/testsuite/gcc.dg/20020426-2.c | 1 +
gcc/testsuite/gcc.dg/20020430-1.c | 1 +
gcc/testsuite/gcc.dg/20040306-1.c | 2 +-
gcc/testsuite/gcc.dg/20040622-2.c | 1 +
gcc/testsuite/gcc.dg/20050603-2.c | 1 +
gcc/testsuite/gcc.dg/20050629-1.c | 1 +
gcc/testsuite/gcc.dg/20061026.c | 1 +
gcc/testsuite/gcc.dg/Walloc-size-larger-than-18.c | 1 +
gcc/testsuite/gcc.dg/Warray-bounds-3.c | 1 +
gcc/testsuite/gcc.dg/Warray-bounds-30.c | 3 +-
gcc/testsuite/gcc.dg/Wframe-larger-than-2.c | 3 +-
gcc/testsuite/gcc.dg/Wframe-larger-than.c | 1 +
gcc/testsuite/gcc.dg/Wrestrict-11.c | 3 +-
gcc/testsuite/gcc.dg/builtins-config.h | 4 +-
gcc/testsuite/gcc.target/bpf/bpf.exp | 41 +
gcc/testsuite/gcc.target/bpf/builtin-load.c | 20 +
gcc/testsuite/gcc.target/bpf/constant-calls.c | 19 +
gcc/testsuite/gcc.target/bpf/diag-funargs.c | 15 +
gcc/testsuite/gcc.target/bpf/diag-indcalls.c | 11 +
gcc/testsuite/gcc.target/bpf/helper-bind.c | 15 +
gcc/testsuite/gcc.target/bpf/helper-bpf-redirect.c | 15 +
.../gcc.target/bpf/helper-clone-redirect.c | 16 +
gcc/testsuite/gcc.target/bpf/helper-csum-diff.c | 16 +
gcc/testsuite/gcc.target/bpf/helper-csum-update.c | 15 +
.../bpf/helper-current-task-under-cgroup.c | 15 +
gcc/testsuite/gcc.target/bpf/helper-fib-lookup.c | 16 +
.../gcc.target/bpf/helper-get-cgroup-classid.c | 14 +
.../gcc.target/bpf/helper-get-current-cgroup-id.c | 13 +
.../gcc.target/bpf/helper-get-current-comm.c | 15 +
.../gcc.target/bpf/helper-get-current-pid-tgid.c | 13 +
.../gcc.target/bpf/helper-get-current-task.c | 14 +
.../gcc.target/bpf/helper-get-current-uid-gid.c | 13 +
.../gcc.target/bpf/helper-get-hash-recalc.c | 14 +
.../gcc.target/bpf/helper-get-listener-sock.c | 13 +
.../gcc.target/bpf/helper-get-local-storage.c | 14 +
.../gcc.target/bpf/helper-get-numa-node-id.c | 13 +
.../gcc.target/bpf/helper-get-prandom-u32.c | 13 +
.../gcc.target/bpf/helper-get-route-realm.c | 14 +
.../gcc.target/bpf/helper-get-smp-processor-id.c | 13 +
.../gcc.target/bpf/helper-get-socket-cookie.c | 14 +
.../gcc.target/bpf/helper-get-socket-uid.c | 14 +
gcc/testsuite/gcc.target/bpf/helper-get-stack.c | 16 +
gcc/testsuite/gcc.target/bpf/helper-get-stackid.c | 15 +
gcc/testsuite/gcc.target/bpf/helper-getsockopt.c | 17 +
gcc/testsuite/gcc.target/bpf/helper-ktime-get-ns.c | 12 +
.../gcc.target/bpf/helper-l3-csum-replace.c | 16 +
.../gcc.target/bpf/helper-l4-csum-replace.c | 16 +
.../gcc.target/bpf/helper-lwt-push-encap.c | 15 +
.../gcc.target/bpf/helper-lwt-seg6-action.c | 16 +
.../gcc.target/bpf/helper-lwt-seg6-adjust-srh.c | 16 +
.../gcc.target/bpf/helper-lwt-seg6-store-bytes.c | 16 +
.../gcc.target/bpf/helper-map-delete-elem.c | 14 +
.../gcc.target/bpf/helper-map-lookup-elem.c | 12 +
.../gcc.target/bpf/helper-map-peek-elem.c | 14 +
gcc/testsuite/gcc.target/bpf/helper-map-pop-elem.c | 14 +
.../gcc.target/bpf/helper-map-push-elem.c | 16 +
.../gcc.target/bpf/helper-map-update-elem.c | 16 +
.../gcc.target/bpf/helper-msg-apply-bytes.c | 15 +
.../gcc.target/bpf/helper-msg-cork-bytes.c | 15 +
gcc/testsuite/gcc.target/bpf/helper-msg-pop-data.c | 16 +
.../gcc.target/bpf/helper-msg-pull-data.c | 16 +
.../gcc.target/bpf/helper-msg-push-data.c | 16 +
.../gcc.target/bpf/helper-msg-redirect-hash.c | 16 +
.../gcc.target/bpf/helper-msg-redirect-map.c | 17 +
.../gcc.target/bpf/helper-override-return.c | 15 +
.../gcc.target/bpf/helper-perf-event-output.c | 17 +
.../gcc.target/bpf/helper-perf-event-read-value.c | 16 +
.../gcc.target/bpf/helper-perf-event-read.c | 15 +
.../gcc.target/bpf/helper-perf-prog-read-value.c | 15 +
.../gcc.target/bpf/helper-probe-read-str.c | 16 +
gcc/testsuite/gcc.target/bpf/helper-probe-read.c | 15 +
.../gcc.target/bpf/helper-probe-write-user.c | 15 +
gcc/testsuite/gcc.target/bpf/helper-rc-keydown.c | 17 +
.../gcc.target/bpf/helper-rc-pointer-rel.c | 15 +
gcc/testsuite/gcc.target/bpf/helper-rc-repeat.c | 14 +
gcc/testsuite/gcc.target/bpf/helper-redirect-map.c | 16 +
.../gcc.target/bpf/helper-set-hash-invalid.c | 13 +
gcc/testsuite/gcc.target/bpf/helper-set-hash.c | 15 +
gcc/testsuite/gcc.target/bpf/helper-setsockopt.c | 19 +
gcc/testsuite/gcc.target/bpf/helper-sk-fullsock.c | 13 +
.../gcc.target/bpf/helper-sk-lookup-tcp.c | 19 +
.../gcc.target/bpf/helper-sk-lookup-upd.c | 19 +
.../gcc.target/bpf/helper-sk-redirect-hash.c | 16 +
.../gcc.target/bpf/helper-sk-redirect-map.c | 16 +
gcc/testsuite/gcc.target/bpf/helper-sk-release.c | 14 +
.../gcc.target/bpf/helper-sk-select-reuseport.c | 16 +
.../gcc.target/bpf/helper-sk-storage-delete.c | 14 +
.../gcc.target/bpf/helper-sk-storage-get.c | 16 +
.../gcc.target/bpf/helper-skb-adjust-room.c | 17 +
.../gcc.target/bpf/helper-skb-cgroup-id.c | 14 +
.../gcc.target/bpf/helper-skb-change-head.c | 16 +
.../gcc.target/bpf/helper-skb-change-proto.c | 16 +
.../gcc.target/bpf/helper-skb-change-tail.c | 16 +
.../gcc.target/bpf/helper-skb-change-type.c | 15 +
.../gcc.target/bpf/helper-skb-ecn-set-ce.c | 14 +
.../gcc.target/bpf/helper-skb-get-tunnel-key.c | 16 +
.../gcc.target/bpf/helper-skb-get-tunnel-opt.c | 16 +
.../gcc.target/bpf/helper-skb-get-xfrm-state.c | 17 +
.../bpf/helper-skb-load-bytes-relative.c | 17 +
.../gcc.target/bpf/helper-skb-load-bytes.c | 15 +
.../gcc.target/bpf/helper-skb-pull-data.c | 15 +
.../gcc.target/bpf/helper-skb-set-tunnel-key.c | 16 +
.../gcc.target/bpf/helper-skb-set-tunnel-opt.c | 16 +
.../gcc.target/bpf/helper-skb-store-bytes.c | 18 +
.../gcc.target/bpf/helper-skb-under-cgroup.c | 15 +
gcc/testsuite/gcc.target/bpf/helper-skb-vlan-pop.c | 14 +
.../gcc.target/bpf/helper-skb-vlan-push.c | 16 +
.../gcc.target/bpf/helper-skc-lookup-tcp.c | 17 +
.../gcc.target/bpf/helper-sock-hash-update.c | 16 +
.../gcc.target/bpf/helper-sock-map-update.c | 16 +
.../gcc.target/bpf/helper-sock-ops-cb-flags-set.c | 16 +
gcc/testsuite/gcc.target/bpf/helper-spin-lock.c | 13 +
gcc/testsuite/gcc.target/bpf/helper-spin-unlock.c | 13 +
gcc/testsuite/gcc.target/bpf/helper-strtol.c | 18 +
gcc/testsuite/gcc.target/bpf/helper-strtoul.c | 18 +
.../bpf/helper-sysctl-get-current-value.c | 17 +
.../gcc.target/bpf/helper-sysctl-get-name.c | 18 +
.../gcc.target/bpf/helper-sysctl-get-new-value.c | 17 +
.../gcc.target/bpf/helper-sysctl-set-new-value.c | 17 +
gcc/testsuite/gcc.target/bpf/helper-tail-call.c | 14 +
.../gcc.target/bpf/helper-tcp-check-syncookie.c | 17 +
gcc/testsuite/gcc.target/bpf/helper-tcp-sock.c | 13 +
gcc/testsuite/gcc.target/bpf/helper-trace-printk.c | 13 +
.../gcc.target/bpf/helper-xdp-adjust-head.c | 15 +
.../gcc.target/bpf/helper-xdp-adjust-meta.c | 15 +
.../gcc.target/bpf/helper-xdp-adjust-tail.c | 15 +
.../gcc.target/bpf/skb-ancestor-cgroup-id.c | 16 +
gcc/testsuite/gcc.target/bpf/sync-fetch-and-add.c | 14 +
gcc/testsuite/lib/target-supports.exp | 27 +-
libgcc/ChangeLog | 7 +
libgcc/config.host | 7 +
libgcc/config/bpf/crti.S | 0
libgcc/config/bpf/crtn.S | 0
libgcc/config/bpf/t-bpf | 24 +
306 files changed, 6142 insertions(+), 96 deletions(-)
create mode 100644 gcc/common/config/bpf/bpf-common.c
create mode 100644 gcc/config/bpf/bpf-helpers.def
create mode 100644 gcc/config/bpf/bpf-helpers.h
create mode 100644 gcc/config/bpf/bpf-opts.h
create mode 100644 gcc/config/bpf/bpf-protos.h
create mode 100644 gcc/config/bpf/bpf.c
create mode 100644 gcc/config/bpf/bpf.h
create mode 100644 gcc/config/bpf/bpf.md
create mode 100644 gcc/config/bpf/bpf.opt
create mode 100644 gcc/config/bpf/constraints.md
create mode 100644 gcc/config/bpf/predicates.md
create mode 100644 gcc/config/bpf/t-bpf
create mode 100644 gcc/testsuite/gcc.target/bpf/bpf.exp
create mode 100644 gcc/testsuite/gcc.target/bpf/builtin-load.c
create mode 100644 gcc/testsuite/gcc.target/bpf/constant-calls.c
create mode 100644 gcc/testsuite/gcc.target/bpf/diag-funargs.c
create mode 100644 gcc/testsuite/gcc.target/bpf/diag-indcalls.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-bind.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-bpf-redirect.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-clone-redirect.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-csum-diff.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-csum-update.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-current-task-under-cgroup.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-fib-lookup.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-cgroup-classid.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-current-cgroup-id.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-current-comm.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-current-pid-tgid.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-current-task.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-current-uid-gid.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-hash-recalc.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-listener-sock.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-local-storage.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-numa-node-id.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-prandom-u32.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-route-realm.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-smp-processor-id.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-socket-cookie.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-socket-uid.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-stack.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-get-stackid.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-getsockopt.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-ktime-get-ns.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-l3-csum-replace.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-l4-csum-replace.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-lwt-push-encap.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-action.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-adjust-srh.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-lwt-seg6-store-bytes.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-map-delete-elem.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-map-lookup-elem.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-map-peek-elem.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-map-pop-elem.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-map-push-elem.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-map-update-elem.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-msg-apply-bytes.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-msg-cork-bytes.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-msg-pop-data.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-msg-pull-data.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-msg-push-data.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-msg-redirect-hash.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-msg-redirect-map.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-override-return.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-perf-event-output.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-perf-event-read-value.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-perf-event-read.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-perf-prog-read-value.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-probe-read-str.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-probe-read.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-probe-write-user.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-rc-keydown.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-rc-pointer-rel.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-rc-repeat.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-redirect-map.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-set-hash-invalid.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-set-hash.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-setsockopt.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-fullsock.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-lookup-tcp.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-lookup-upd.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-redirect-hash.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-redirect-map.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-release.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-select-reuseport.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-storage-delete.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sk-storage-get.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-adjust-room.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-cgroup-id.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-change-head.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-change-proto.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-change-tail.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-change-type.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-ecn-set-ce.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-get-tunnel-key.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-get-tunnel-opt.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-get-xfrm-state.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-load-bytes-relative.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-load-bytes.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-pull-data.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-set-tunnel-key.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-set-tunnel-opt.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-store-bytes.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-under-cgroup.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-vlan-pop.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skb-vlan-push.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-skc-lookup-tcp.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sock-hash-update.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sock-map-update.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sock-ops-cb-flags-set.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-spin-lock.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-spin-unlock.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-strtol.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-strtoul.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sysctl-get-current-value.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sysctl-get-name.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sysctl-get-new-value.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-sysctl-set-new-value.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-tail-call.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-tcp-check-syncookie.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-tcp-sock.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-trace-printk.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-head.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-meta.c
create mode 100644 gcc/testsuite/gcc.target/bpf/helper-xdp-adjust-tail.c
create mode 100644 gcc/testsuite/gcc.target/bpf/skb-ancestor-cgroup-id.c
create mode 100644 gcc/testsuite/gcc.target/bpf/sync-fetch-and-add.c
create mode 100644 libgcc/config/bpf/crti.S
create mode 100644 libgcc/config/bpf/crtn.S
create mode 100644 libgcc/config/bpf/t-bpf
--
2.11.0
^ permalink raw reply [flat|nested] 223+ messages in thread
* [PATCH V2 2/8] bpf: new GCC port
2019-08-17 1:00 [PATCH V2 0/8] eBPF support for GCC Jose E. Marchesi
` (6 preceding siblings ...)
2019-08-17 0:59 ` [PATCH V2 8/8] bpf: add myself as the maintainer for the eBPF port Jose E. Marchesi
@ 2019-08-17 2:39 ` Jose E. Marchesi
2019-08-19 20:20 ` Richard Sandiford
` (2 more replies)
7 siblings, 3 replies; 223+ messages in thread
From: Jose E. Marchesi @ 2019-08-17 2:39 UTC (permalink / raw)
To: Jose E. Marchesi; +Cc: gcc-patches
This patch adds a port for the Linux kernel eBPF architecture to GCC.
ChangeLog:
* configure.ac: Support for bpf-*-* targets.
* configure: Regenerate.
contrib/ChangeLog:
* config-list.mk (LIST): Disable go in bpf-*-* targets.
gcc/ChangeLog:
* config.gcc: Support for bpf-*-* targets.
* common/config/bpf/bpf-common.c: New file.
* config/bpf/t-bpf: Likewise.
* config/bpf/predicates.md: Likewise.
* config/bpf/constraints.md: Likewise.
* config/bpf/bpf.opt: Likewise.
* config/bpf/bpf.md: Likewise.
* config/bpf/bpf.h: Likewise.
* config/bpf/bpf.c: Likewise.
* config/bpf/bpf-protos.h: Likewise.
* config/bpf/bpf-opts.h: Likewise.
* config/bpf/bpf-helpers.h: Likewise.
* config/bpf/bpf-helpers.def: Likewise.
---
ChangeLog | 5 +
configure | 68 ++-
configure.ac | 54 +-
contrib/ChangeLog | 4 +
contrib/config-list.mk | 2 +-
gcc/ChangeLog | 16 +
gcc/common/config/bpf/bpf-common.c | 57 ++
gcc/config.gcc | 9 +
gcc/config/bpf/bpf-helpers.def | 194 ++++++
gcc/config/bpf/bpf-helpers.h | 324 ++++++++++
gcc/config/bpf/bpf-opts.h | 56 ++
gcc/config/bpf/bpf-protos.h | 33 ++
gcc/config/bpf/bpf.c | 1136 ++++++++++++++++++++++++++++++++++++
gcc/config/bpf/bpf.h | 565 ++++++++++++++++++
gcc/config/bpf/bpf.md | 528 +++++++++++++++++
gcc/config/bpf/bpf.opt | 119 ++++
gcc/config/bpf/constraints.md | 29 +
gcc/config/bpf/predicates.md | 105 ++++
gcc/config/bpf/t-bpf | 0
19 files changed, 3300 insertions(+), 4 deletions(-)
create mode 100644 gcc/common/config/bpf/bpf-common.c
create mode 100644 gcc/config/bpf/bpf-helpers.def
create mode 100644 gcc/config/bpf/bpf-helpers.h
create mode 100644 gcc/config/bpf/bpf-opts.h
create mode 100644 gcc/config/bpf/bpf-protos.h
create mode 100644 gcc/config/bpf/bpf.c
create mode 100644 gcc/config/bpf/bpf.h
create mode 100644 gcc/config/bpf/bpf.md
create mode 100644 gcc/config/bpf/bpf.opt
create mode 100644 gcc/config/bpf/constraints.md
create mode 100644 gcc/config/bpf/predicates.md
create mode 100644 gcc/config/bpf/t-bpf
diff --git a/configure b/configure
index 63b1e33f41c..4f8e68a4085 100755
--- a/configure
+++ b/configure
@@ -754,6 +754,7 @@ infodir
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -919,6 +920,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE}'
@@ -1171,6 +1173,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1308,7 +1319,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+ libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1468,6 +1479,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -3353,6 +3365,9 @@ case "${target}" in
# No hosted I/O support.
noconfigdirs="$noconfigdirs target-libssp"
;;
+ bpf-*-*)
+ noconfigdirs="$noconfigdirs target-libssp"
+ ;;
powerpc-*-aix* | rs6000-*-aix*)
noconfigdirs="$noconfigdirs target-libssp"
;;
@@ -3387,12 +3402,43 @@ if test "${ENABLE_LIBSTDCXX}" = "default" ; then
avr-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3"
;;
+ bpf-*-*)
+ noconfigdirs="$noconfigdirs target-libstdc++-v3"
+ ;;
ft32-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3"
;;
esac
fi
+# Disable C++ on systems where it is known to not work.
+# For testing, you can override this with --enable-languages=c++.
+case ,${enable_languages}, in
+ *,c++,*)
+ ;;
+ *)
+ case "${target}" in
+ bpf-*-*)
+ unsupported_languages="$unsupported_languages c++"
+ ;;
+ esac
+ ;;
+esac
+
+# Disable Objc on systems where it is known to not work.
+# For testing, you can override this with --enable-languages=objc.
+case ,${enable_languages}, in
+ *,objc,*)
+ ;;
+ *)
+ case "${target}" in
+ bpf-*-*)
+ unsupported_languages="$unsupported_languages objc"
+ ;;
+ esac
+ ;;
+esac
+
# Disable D on systems where it is known to not work.
# For testing, you can override this with --enable-languages=d.
case ,${enable_languages}, in
@@ -3402,6 +3448,9 @@ case ,${enable_languages}, in
case "${target}" in
*-*-darwin*)
unsupported_languages="$unsupported_languages d"
+ ;;
+ bpf-*-*)
+ unsupported_languages="$unsupported_languages d"
;;
esac
;;
@@ -3433,6 +3482,9 @@ case "${target}" in
# See <http://gcc.gnu.org/ml/gcc-patches/2004-11/msg00572.html>.
unsupported_languages="$unsupported_languages fortran"
;;
+ bpf-*-*)
+ unsupported_languages="$unsupported_languages fortran"
+ ;;
esac
# Disable libffi for some systems.
@@ -3479,6 +3531,9 @@ case "${target}" in
arm*-*-symbianelf*)
noconfigdirs="$noconfigdirs target-libffi"
;;
+ bpf-*-*)
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
cris-*-* | crisv32-*-*)
case "${target}" in
*-*-linux*)
@@ -3525,7 +3580,7 @@ esac
# Disable the go frontend on systems where it is known to not work. Please keep
# this in sync with contrib/config-list.mk.
case "${target}" in
-*-*-darwin* | *-*-cygwin* | *-*-mingw*)
+*-*-darwin* | *-*-cygwin* | *-*-mingw* | bpf-* )
unsupported_languages="$unsupported_languages go"
;;
esac
@@ -3541,6 +3596,9 @@ if test x$enable_libgo = x; then
*-*-cygwin* | *-*-mingw*)
noconfigdirs="$noconfigdirs target-libgo"
;;
+ bpf-*-*)
+ noconfigdirs="$noconfigdirs target-libgo"
+ ;;
esac
fi
@@ -3612,6 +3670,9 @@ case "${target}" in
sparc-*-sunos4*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
+ bpf-*-*)
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+ ;;
*-*-aix*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
@@ -3725,6 +3786,9 @@ case "${target}" in
# newlib is not 64 bit ready
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
+ bpf-*-*)
+ noconfigdirs="$noconfigdirs target-libobjc target-libbacktrace"
+ ;;
sh*-*-pe|mips*-*-pe|*arm-wince-pe)
noconfigdirs="$noconfigdirs tcl tk itcl libgui sim"
;;
diff --git a/configure.ac b/configure.ac
index dcc89fbdde1..b7ca25c04c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -638,6 +638,9 @@ case "${target}" in
# No hosted I/O support.
noconfigdirs="$noconfigdirs target-libssp"
;;
+ bpf-*-*)
+ noconfigdirs="$noconfigdirs target-libssp"
+ ;;
powerpc-*-aix* | rs6000-*-aix*)
noconfigdirs="$noconfigdirs target-libssp"
;;
@@ -672,12 +675,43 @@ if test "${ENABLE_LIBSTDCXX}" = "default" ; then
avr-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3"
;;
+ bpf-*-*)
+ noconfigdirs="$noconfigdirs target-libstdc++-v3"
+ ;;
ft32-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3"
;;
esac
fi
+# Disable C++ on systems where it is known to not work.
+# For testing, you can override this with --enable-languages=c++.
+case ,${enable_languages}, in
+ *,c++,*)
+ ;;
+ *)
+ case "${target}" in
+ bpf-*-*)
+ unsupported_languages="$unsupported_languages c++"
+ ;;
+ esac
+ ;;
+esac
+
+# Disable Objc on systems where it is known to not work.
+# For testing, you can override this with --enable-languages=objc.
+case ,${enable_languages}, in
+ *,objc,*)
+ ;;
+ *)
+ case "${target}" in
+ bpf-*-*)
+ unsupported_languages="$unsupported_languages objc"
+ ;;
+ esac
+ ;;
+esac
+
# Disable D on systems where it is known to not work.
# For testing, you can override this with --enable-languages=d.
case ,${enable_languages}, in
@@ -687,6 +721,9 @@ case ,${enable_languages}, in
case "${target}" in
*-*-darwin*)
unsupported_languages="$unsupported_languages d"
+ ;;
+ bpf-*-*)
+ unsupported_languages="$unsupported_languages d"
;;
esac
;;
@@ -715,6 +752,9 @@ case "${target}" in
# See <http://gcc.gnu.org/ml/gcc-patches/2004-11/msg00572.html>.
unsupported_languages="$unsupported_languages fortran"
;;
+ bpf-*-*)
+ unsupported_languages="$unsupported_languages fortran"
+ ;;
esac
# Disable libffi for some systems.
@@ -761,6 +801,9 @@ case "${target}" in
arm*-*-symbianelf*)
noconfigdirs="$noconfigdirs target-libffi"
;;
+ bpf-*-*)
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
cris-*-* | crisv32-*-*)
case "${target}" in
*-*-linux*)
@@ -807,7 +850,7 @@ esac
# Disable the go frontend on systems where it is known to not work. Please keep
# this in sync with contrib/config-list.mk.
case "${target}" in
-*-*-darwin* | *-*-cygwin* | *-*-mingw*)
+*-*-darwin* | *-*-cygwin* | *-*-mingw* | bpf-* )
unsupported_languages="$unsupported_languages go"
;;
esac
@@ -823,6 +866,9 @@ if test x$enable_libgo = x; then
*-*-cygwin* | *-*-mingw*)
noconfigdirs="$noconfigdirs target-libgo"
;;
+ bpf-*-*)
+ noconfigdirs="$noconfigdirs target-libgo"
+ ;;
esac
fi
@@ -894,6 +940,9 @@ case "${target}" in
sparc-*-sunos4*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
+ bpf-*-*)
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+ ;;
*-*-aix*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
@@ -1007,6 +1056,9 @@ case "${target}" in
# newlib is not 64 bit ready
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
+ bpf-*-*)
+ noconfigdirs="$noconfigdirs target-libobjc target-libbacktrace"
+ ;;
sh*-*-pe|mips*-*-pe|*arm-wince-pe)
noconfigdirs="$noconfigdirs tcl tk itcl libgui sim"
;;
diff --git a/contrib/config-list.mk b/contrib/config-list.mk
index 69c826e649a..aa9fdb64eaf 100644
--- a/contrib/config-list.mk
+++ b/contrib/config-list.mk
@@ -123,7 +123,7 @@ $(LIST): make-log-dir
TGT=`echo $@ | awk 'BEGIN { FS = "OPT" }; { print $$1 }'` && \
TGT=`$(GCC_SRC_DIR)/config.sub $$TGT` && \
case $$TGT in \
- *-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*) \
+ *-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix* | bpf-*-* ) \
ADDITIONAL_LANGUAGES=""; \
;; \
*) \
diff --git a/gcc/common/config/bpf/bpf-common.c b/gcc/common/config/bpf/bpf-common.c
new file mode 100644
index 00000000000..a68feb62897
--- /dev/null
+++ b/gcc/common/config/bpf/bpf-common.c
@@ -0,0 +1,57 @@
+/* Common hooks for eBPF.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
+#include "common/common-target.h"
+#include "common/common-target-def.h"
+#include "config/bpf/bpf-protos.h"
+
+#undef TARGET_DEFAULT_TARGET_FLAGS
+#define TARGET_DEFAULT_TARGET_FLAGS 0
+
+/* Implement TARGET_OPTION_OPTIMIZATION_TABLE. */
+static const struct default_options bpf_option_optimization_table[] =
+ {
+ /* Enable -funroll-all-loops by default. */
+ { OPT_LEVELS_ALL, OPT_funroll_all_loops, NULL, 1 },
+ /* Disable -fomit-frame-pointer by default. */
+ { OPT_LEVELS_ALL, OPT_fomit_frame_pointer, NULL, 0 },
+ { OPT_LEVELS_NONE, 0, NULL, 0 }
+ };
+
+#undef TARGET_OPTION_OPTIMIZATION_TABLE
+#define TARGET_OPTION_OPTIMIZATION_TABLE bpf_option_optimization_table
+
+/* Implement TARGET_OPTION_DEFAULT_PARAMS. */
+
+static void
+bpf_option_default_params (void)
+{
+ /* XXX large-stack-frame = 512 bytes */
+ /* XXX max-unrolled-insns */
+ /* XXX max-unroll-times */
+}
+
+#undef TARGET_OPTION_DEFAULT_PARAMS
+#define TARGET_OPTION_DEFAULT_PARAMS bpf_option_default_params
+
+struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 40cbc52dc99..60673a422a7 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -360,6 +360,9 @@ avr-*-*)
bfin*-*)
cpu_type=bfin
;;
+bpf-*-*)
+ cpu_type=bpf
+ ;;
crisv32-*)
cpu_type=cris
;;
@@ -1310,6 +1313,12 @@ bfin*-*)
use_collect2=no
use_gcc_stdint=wrap
;;
+bpf-*-*)
+ tmake_file="${tmake_file} bpf/t-bpf"
+ use_collect2=no
+ extra_headers="bpf-helpers.h"
+ use_gcc_stdint=provide
+ ;;
cr16-*-elf)
tm_file="elfos.h ${tm_file} newlib-stdint.h"
tmake_file="${tmake_file} cr16/t-cr16 "
diff --git a/gcc/config/bpf/bpf-helpers.def b/gcc/config/bpf/bpf-helpers.def
new file mode 100644
index 00000000000..4f6b8eb0892
--- /dev/null
+++ b/gcc/config/bpf/bpf-helpers.def
@@ -0,0 +1,194 @@
+/* Kernel helpers database.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+/* This file contains the definition of the kernel helpers that are
+ available to eBPF programs.
+
+ The primary source for information on kernel helpers is the
+ linux/include/uapi/linux/bpf.h file in the Linux source tree.
+ Please keep this database in sync.
+
+ The first column is the first kernel version featuring the helper
+ function. This should be an enumerate from bpf_kernel_version,
+ defined in bpf-opts.h. Note that the backend assumes that helpers
+ never get deprecated in the kernel. If that eventually happens,
+ then we will need to use a bitmask here instead of an enumerate.
+
+ The second column is the constant-name for the helper.
+ The third column is the program-name of the helper.
+
+ The fourth column is a list of names describing the types of the
+ values returned and accepted by the helper, in one of these forms:
+
+ TYPES (type1, type2, ..., 0)
+ VTYPES (type1, type2, ..., 0)
+
+ VTYPES should be used should the helper accept a variable number of
+ arguments, TYPES otherwise. The valid type names are:
+
+ `vt' for void.
+ `it' for signed int.
+ `ut' for unsigned int.
+ `pt' for *void.
+ `cpt' for const *void.
+ `st' for short int.
+ `ust' for unsigned short int.
+ `cst' for const char *.
+ `ullt' for unsigned long long.
+ `llt' for long long.
+ `u32t' for uint32.
+ `u64t' for uint64.
+
+ In types descriptions, the firt entry corresponds to the value
+ returned by the helper. Subsequent names correspond to the helper
+ arguments. Finally, a 0 should close the list.
+
+ VERY IMPORTANT: the helper entries should be listed in the same
+ order than in the definition of __BPF_FUNC_MAPPER in
+ linux/include/uapi/linux/bpf.h! */
+
+DEF_HELPER (LINUX_V4_0, MAP_LOOKUP_ELEM, map_lookup_elem, TYPES (pt, pt, pt, 0))
+DEF_HELPER (LINUX_V4_0, MAP_UPDATE_ELEM, map_update_elem, TYPES (it, pt, pt, pt, ullt, 0))
+DEF_HELPER (LINUX_V4_0, MAP_DELETE_ELEM, map_delete_elem, TYPES (it, pt, pt, 0))
+DEF_HELPER (LINUX_V4_1, PROBE_READ, probe_read, TYPES (it, pt, ut, cpt, 0))
+DEF_HELPER (LINUX_V4_1, KTIME_GET_NS, ktime_get_ns, TYPES (ullt, 0))
+DEF_HELPER (LINUX_V4_1, TRACE_PRINTK, trace_printk, VTYPES (it, cst, it, 0))
+DEF_HELPER (LINUX_V4_1, GET_PRANDOM_U32, get_prandom_u32, TYPES (ullt, 0))
+DEF_HELPER (LINUX_V4_1, GET_SMP_PROCESSOR_ID, get_smp_processor_id, TYPES (ullt, 0))
+DEF_HELPER (LINUX_V4_1, SKB_STORE_BYTES, skb_store_bytes, TYPES (it, pt, it, pt, it, it, 0))
+DEF_HELPER (LINUX_V4_1, L3_CSUM_REPLACE, l3_csum_replace, TYPES (it, pt, it, it ,it ,it, 0))
+DEF_HELPER (LINUX_V4_1, L4_CSUM_REPLACE, l4_csum_replace, TYPES (it, pt, it, it, it, it, 0))
+DEF_HELPER (LINUX_V4_2, TAIL_CALL, tail_call, TYPES (vt, pt, pt, it, 0))
+DEF_HELPER (LINUX_V4_2, CLONE_REDIRECT, clone_redirect, TYPES (it, pt, it, it, 0))
+DEF_HELPER (LINUX_V4_2, GET_CURRENT_PID_TGID, get_current_pid_tgid, TYPES (ullt, 0))
+DEF_HELPER (LINUX_V4_2, GET_CURRENT_UID_GID, get_current_uid_gid, TYPES (ullt, 0))
+DEF_HELPER (LINUX_V4_2, GET_CURRENT_COMM, get_current_comm, TYPES (it, pt, it, 0))
+DEF_HELPER (LINUX_V4_3, GET_CGROUP_CLASSID, get_cgroup_classid, TYPES (it, pt, 0))
+DEF_HELPER (LINUX_V4_3, SKB_VLAN_PUSH, skb_vlan_push, TYPES (it, pt, st, ust, 0))
+DEF_HELPER (LINUX_V4_3, SKB_VLAN_POP, skb_vlan_pop, TYPES (it, pt, 0))
+DEF_HELPER (LINUX_V4_3, SKB_GET_TUNNEL_KEY, skb_get_tunnel_key, TYPES (it, pt, pt, it, it, 0))
+DEF_HELPER (LINUX_V4_3, SKB_SET_TUNNEL_KEY, skb_set_tunnel_key, TYPES (it, pt, pt, it, it, 0))
+DEF_HELPER (LINUX_V4_3, PERF_EVENT_READ, perf_event_read, TYPES (ullt, pt, ullt, 0))
+DEF_HELPER (LINUX_V4_4, REDIRECT, redirect, TYPES (it, it, it, 0))
+DEF_HELPER (LINUX_V4_4, GET_ROUTE_REALM, get_route_realm, TYPES (ut, pt, 0))
+DEF_HELPER (LINUX_V4_4, PERF_EVENT_OUTPUT, perf_event_output, \
+ TYPES (it, pt, pt, ullt, pt, it, 0))
+DEF_HELPER (LINUX_V4_5, SKB_LOAD_BYTES, skb_load_bytes, TYPES (it, pt, it, pt, it, 0))
+DEF_HELPER (LINUX_V4_6, GET_STACKID, get_stackid, TYPES (it, pt, pt, it, 0))
+DEF_HELPER (LINUX_V4_6, CSUM_DIFF, csum_diff, TYPES (it, pt, it, pt, it, it, 0))
+DEF_HELPER (LINUX_V4_6, SKB_GET_TUNNEL_OPT, skb_get_tunnel_opt, TYPES (it, pt, pt, it, 0))
+DEF_HELPER (LINUX_V4_6, SKB_SET_TUNNEL_OPT, skb_set_tunnel_opt, TYPES (it, pt, pt, it, 0))
+DEF_HELPER (LINUX_V4_8, SKB_CHANGE_PROTO, skb_change_proto, TYPES (it, pt, st, u64t, 0))
+DEF_HELPER (LINUX_V4_8, SKB_CHANGE_TYPE, skb_change_type, TYPES (it, pt, u32t, 0))
+DEF_HELPER (LINUX_V4_8, SKB_UNDER_CGROUP, skb_under_cgroup, TYPES (it, pt, pt, it, 0))
+DEF_HELPER (LINUX_V4_8, GET_HASH_RECALC, get_hash_recalc, TYPES (ut, pt, 0))
+DEF_HELPER (LINUX_V4_8, GET_CURRENT_TASK, get_current_task, TYPES (ullt, pt, 0))
+DEF_HELPER (LINUX_V4_8, PROBE_WRITE_USER, probe_write_user, TYPES (it, pt, cpt, ut, 0))
+DEF_HELPER (LINUX_V4_9, CURRENT_TASK_UNDER_CGROUP, current_task_under_cgroup, \
+ TYPES (it, pt, it, 0))
+DEF_HELPER (LINUX_V4_9, SKB_CHANGE_TAIL, skb_change_tail, TYPES (it, pt, ut, u64t, 0))
+DEF_HELPER (LINUX_V4_9, SKB_PULL_DATA, skb_pull_data, TYPES (it, pt, it, 0))
+DEF_HELPER (LINUX_V4_9, CSUM_UPDATE, csum_update, TYPES (llt, pt, u32t, 0))
+DEF_HELPER (LINUX_V4_9, SET_HASH_INVALID, set_hash_invalid, TYPES (vt, pt, 0))
+DEF_HELPER (LINUX_V4_10, GET_NUMA_NODE_ID, get_numa_node_id, TYPES (it, 0))
+DEF_HELPER (LINUX_V4_10, SKB_CHANGE_HEAD, skb_change_head, TYPES (it, pt, it, it, 0))
+DEF_HELPER (LINUX_V4_10, XDP_ADJUST_HEAD, xdp_adjust_head, TYPES (it, pt, it, 0))
+DEF_HELPER (LINUX_V4_11, PROBE_READ_STR, probe_read_str, TYPES (it, pt, u32t, cpt, 0))
+DEF_HELPER (LINUX_V4_12, GET_SOCKET_COOKIE, get_socket_cookie, TYPES (it, pt, 0))
+DEF_HELPER (LINUX_V4_12, GET_SOCKET_UID, get_socket_uid, TYPES (ut, pt, 0))
+DEF_HELPER (LINUX_V4_13, SET_HASH, set_hash, TYPES (ut, pt, u32t, 0))
+DEF_HELPER (LINUX_V4_13, SETSOCKOPT, setsockopt, TYPES (it, pt, it, it, pt, it, 0))
+DEF_HELPER (LINUX_V4_13, SKB_ADJUST_ROOM, skb_adjust_room, TYPES (it, pt, st, u32t, ullt, 0))
+DEF_HELPER (LINUX_V4_14, REDIRECT_MAP, redirect_map, TYPES (it, pt, it, it, 0))
+DEF_HELPER (LINUX_V4_14, SK_REDIRECT_MAP, sk_redirect_map, TYPES (it, pt, pt, it, it, 0))
+DEF_HELPER (LINUX_V4_14, SOCK_MAP_UPDATE, sock_map_update, TYPES (it, pt, pt, pt, ullt, 0))
+DEF_HELPER (LINUX_V4_15, XDP_ADJUST_META, xdp_adjust_meta, TYPES (it, pt, it, 0))
+DEF_HELPER (LINUX_V4_15, PERF_EVENT_READ_VALUE, perf_event_read_value,
+ TYPES (it, pt, ullt, pt, ut, 0))
+DEF_HELPER (LINUX_V4_15, PERF_PROG_READ_VALUE, perf_prog_read_value,
+ TYPES (it, pt, pt, ut, 0))
+DEF_HELPER (LINUX_V4_15, GETSOCKOPT, getsockopt, TYPES (it, pt, it, it, pt, it, 0))
+
+DEF_HELPER (LINUX_V4_16, OVERRIDE_RETURN, override_return, TYPES (it, pt, ult, 0))
+DEF_HELPER (LINUX_V4_16, SOCK_OPS_CB_FLAGS_SET, sock_ops_cb_flags_set, TYPES (it, pt, it, 0))
+DEF_HELPER (LINUX_V4_17, MSG_REDIRECT_MAP, msg_redirect_map, TYPES (it, pt, pt, it, it, 0))
+DEF_HELPER (LINUX_V4_17, MSG_APPLY_BYTES, msg_apply_bytes, TYPES (it, pt, it, 0))
+DEF_HELPER (LINUX_V4_17, MSG_CORK_BYTES, msg_cork_bytes, TYPES (it, pt, it, 0))
+DEF_HELPER (LINUX_V4_17, MSG_PULL_DATA, msg_pull_data, TYPES (it, pt, it, it, it, 0))
+DEF_HELPER (LINUX_V4_17, BIND, bind, TYPES (it, pt, pt, it, 0))
+DEF_HELPER (LINUX_V4_18, XDP_ADJUST_TAIL, xdp_adjust_tail, TYPES (it, pt, it, 0))
+DEF_HELPER (LINUX_V4_18, SKB_GET_XFRM_STATE,
+ skb_get_xfrm_state, TYPES (it, pt, it, pt, it, it, 0))
+DEF_HELPER (LINUX_V4_18, GET_STACK, get_stack, TYPES (it, pt, pt, it, it, 0))
+DEF_HELPER (LINUX_V4_18, SKB_LOAD_BYTES_RELATIVE, skb_load_bytes_relative,
+ TYPES (it, pt, it, pt, it, ut, 0))
+DEF_HELPER (LINUX_V4_18, FIB_LOOKUP, fib_lookup, TYPES (it, pt, pt, it, ut, 0))
+DEF_HELPER (LINUX_V4_18, SOCK_HASH_UPDATE, sock_hash_update, TYPES (it, pt, pt, pt, ullt, 0))
+DEF_HELPER (LINUX_V4_18, MSG_REDIRECT_HASH, msg_redirect_hash, TYPES (it, pt, pt, pt, it, 0))
+DEF_HELPER (LINUX_V4_18, SK_REDIRECT_HASH, sk_redirect_hash, TYPES (it, pt, pt, pt, it, 0))
+DEF_HELPER (LINUX_V4_18, LWT_PUSH_ENCAP, lwt_push_encap, TYPES (it, pt, ut, pt, ut, 0))
+DEF_HELPER (LINUX_V4_18, LWT_SEG6_STORE_BYTES, lwt_seg6_store_bytes,
+ TYPES (it, pt, ut, pt, ut, 0))
+DEF_HELPER (LINUX_V4_18, LWT_SEG6_ADJUST_SRH, lwt_seg6_adjust_srh, TYPES (it, pt, ut, ut, 0))
+DEF_HELPER (LINUX_V4_18, LWT_SEG6_ACTION, lwt_seg6_action, TYPES (it, pt, ut, pt, ut, 0))
+DEF_HELPER (LINUX_V4_18, RC_REPEAT, rc_repeat, TYPES (it, pt, 0))
+DEF_HELPER (LINUX_V4_18, RC_KEYDOWN, rc_keydown, TYPES (it, pt, ut, ullt, ut, 0))
+DEF_HELPER (LINUX_V4_18, SKB_CGROUP_ID, skb_cgroup_id, TYPES (ullt, pt, 0))
+DEF_HELPER (LINUX_V4_18, GET_CURRENT_CGROUP_ID, get_current_cgroup_id, TYPES (ullt, 0))
+DEF_HELPER (LINUX_V4_19, GET_LOCAL_STORAGE, get_local_storage, TYPES (pt, pt, ullt, 0))
+DEF_HELPER (LINUX_V4_19, SK_SELECT_REUSEPORT, sk_select_reuseport,
+ TYPES (it, pt, pt, pt, ut, 0))
+DEF_HELPER (LINUX_V4_19, SKB_ANCESTOR_CGROUP_ID, skb_ancestor_cgroup_id,
+ TYPES (ullt, pt, it, 0))
+DEF_HELPER (LINUX_V4_20, SK_LOOKUP_TCP, sk_lookup_tcp, TYPES (pt, pt, pt, it, ullt, ullt, 0))
+DEF_HELPER (LINUX_V4_20, SK_LOOKUP_UDP, sk_lookup_udp, TYPES (pt, pt, pt, it, ullt, ullt, 0))
+DEF_HELPER (LINUX_V4_20, SK_RELEASE, sk_release, TYPES (it, pt, 0))
+DEF_HELPER (LINUX_V4_20, MAP_PUSH_ELEM, map_push_elem, TYPES (it, pt, pt, ullt, 0))
+DEF_HELPER (LINUX_V4_20, MAP_POP_ELEM, map_pop_elem, TYPES (it, pt, pt, 0))
+DEF_HELPER (LINUX_V4_20, MAP_PEEK_ELEM, map_peek_elem, TYPES (it, pt, pt, 0))
+DEF_HELPER (LINUX_V4_20, MSG_PUSH_DATA, msg_push_data, TYPES (it, pt, it, it, it, 0))
+DEF_HELPER (LINUX_V5_0, MSG_POP_DATA, msg_pop_data, TYPES (it, pt, it, it, it, 0))
+DEF_HELPER (LINUX_V5_0, RC_POINTER_REL, rc_pointer_rel, TYPES (it, pt, it, it, 0))
+DEF_HELPER (LINUX_V5_1, SPIN_LOCK, spin_lock, TYPES (vt, pt, 0))
+DEF_HELPER (LINUX_V5_1, SPIN_UNLOCK, spin_unlock, TYPES (vt, pt, 0))
+DEF_HELPER (LINUX_V5_1, SK_FULLSOCK, sk_fullsock, TYPES (pt, pt, 0))
+DEF_HELPER (LINUX_V5_1, TCP_SOCK, tcp_sock, TYPES (pt, pt, 0))
+DEF_HELPER (LINUX_V5_1, SKB_ECN_SET_CE, skb_ecn_set_ce, TYPES (it, pt, 0))
+DEF_HELPER (LINUX_V5_1, GET_LISTENER_SOCK, get_listener_sock, TYPES (pt, pt, 0))
+DEF_HELPER (LINUX_V5_2, SKC_LOOKUP_TCP, skc_lookup_tcp,
+ TYPES (pt, pt, pt, u32t, u64t, u64t, 0))
+DEF_HELPER (LINUX_V5_2, TCP_CHECK_SYNCOOKIE, tcp_check_syncookie,
+ TYPES (it, pt, pt, u32t, pt, u32t, 0))
+DEF_HELPER (LINUX_V5_2, SYSCTL_GET_NAME, sysctl_get_name, TYPES (it, pt, pt, ullt, u64t, 0))
+DEF_HELPER (LINUX_V5_2, SYSCTL_GET_CURRENT_VALUE, sysctl_get_current_value,
+ TYPES (it, pt, pt, ullt, 0))
+DEF_HELPER (LINUX_V5_2, SYSCTL_GET_NEW_VALUE, sysctl_get_new_value,
+ TYPES (it, pt, pt, ullt, 0))
+DEF_HELPER (LINUX_V5_2, SYSCTL_SET_NEW_VALUE, sysctl_set_new_value,
+ TYPES (it, pt, pt, ullt, 0))
+DEF_HELPER (LINUX_V5_2, STRTOL, strtol, TYPES (it, cst, ullt, u64t, pt, 0))
+DEF_HELPER (LINUX_V5_2, STRTOUL, strtoul, TYPES (it, pt, ullt, u64t, pt, 0))
+DEF_HELPER (LINUX_V5_2, SK_STORAGE_GET, sk_storage_get, TYPES (pt, pt, pt, pt, u64t, 0))
+DEF_HELPER (LINUX_V5_2, SK_STORAGE_DELETE, sk_storage_delete, TYPES (it, pt, pt, 0))
+
+/*
+Local variables:
+mode:c
+End:
+*/
diff --git a/gcc/config/bpf/bpf-helpers.h b/gcc/config/bpf/bpf-helpers.h
new file mode 100644
index 00000000000..2fe96be7637
--- /dev/null
+++ b/gcc/config/bpf/bpf-helpers.h
@@ -0,0 +1,324 @@
+/* Copyright (C) 2019 Free Software Foundation, Inc.
+
+ This file is part of GCC.
+
+ GCC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ GCC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the GCC Runtime Library Exception, version
+ 3.1, as published by the Free Software Foundation.
+
+ You should have received a copy of the GNU General Public License and
+ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* The purpose of this file is to provide a compatiblity layer with
+ the Linux kernel bpf_helpers.h header that is located in
+ linux/tools/testing/selftests/bpf/bpf_helpers.h. That file is
+ currently llvm-specific. */
+
+#ifndef __BPF_HELPERS_H
+#define __BPF_HELPERS_H
+
+#define SEC(NAME) __attribute__((section(NAME), used))
+
+/* Flags used in some kernel helpers. */
+
+#define BPF_ANY 0
+#define BPF_NOEXIST 1
+#define BPF_EXIST 2
+
+#define BPF_F_LOCK 4
+#define BPF_F_NO_COMMON_LRU (1U << 1)
+#define BPF_F_NUMA_NODE (1U << 2)
+
+/* Functions to call kernel helpers. We provide the "standard" bpf_*
+ names as synonyms of the corresponding GCC builtins. In some
+ cases, where non-void pointers are passed to the helper, inline
+ functions are used to achieve proper type checking. */
+
+#ifndef KERNEL_VERSION
+# define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
+#endif
+
+#if __BPF_KERNEL_VERSION_CODE__ >= KERNEL_VERSION (4,0,0)
+
+#define bpf_map_lookup_elem __builtin_bpf_helper_map_lookup_elem
+#define bpf_map_update_elem __builtin_bpf_helper_map_update_elem
+#define bpf_map_delete_elem __builtin_bpf_helper_map_delete_elem
+
+#if __BPF_KERNEL_VERSION_CODE__ >= KERNEL_VERSION (4,1,0)
+
+#define bpf_probe_read __builtin_bpf_helper_probe_read
+#define bpf_ktime_get_ns __builtin_bpf_helper_ktime_get_ns
+#define bpf_trace_printk __builtin_bpf_helper_trace_printk
+#define bpf_get_prandom_u32 __builtin_bpf_helper_get_prandom_u32
+#define bpf_get_smp_processor_id __builtin_bpf_helper_get_smp_processor_id
+#define bpf_skb_store_bytes __builtin_bpf_helper_skb_store_bytes
+#define bpf_l3_csum_replace __builtin_bpf_helper_l3_csum_replace
+#define bpf_l4_csum_replace __builtin_bpf_helper_l4_csum_replace
+
+#if __BPF_KERNEL_VERSION_CODE__ >= KERNEL_VERSION (4,2,0)
+
+#define bpf_tail_call __builtin_bpf_helper_tail_call
+#define bpf_clone_redirect __builtin_bpf_helper_clone_redirect
+#define bpf_get_current_pid_tgid __builtin_bpf_helper_get_current_pid_tgid
+#define bpf_get_current_uid_gid __builtin_bpf_helper_get_current_uid_gid
+#define bpf_get_current_comm __builtin_bpf_helper_get_current_comm
+
+#if __BPF_KERNEL_VERSION_CODE__ >= KERNEL_VERSION (4,3,0)
+
+#define bpf_get_cgroup_classid __builtin_bpf_helper_get_cgroup_classid
+#define bpf_skb_vlan_push __builtin_bpf_helper_skb_vlan_push
+#define bpf_skb_vlan_pop __builtin_bpf_helper_skb_vlan_pop
+#define bpf_skb_get_tunnel_key __builtin_bpf_helper_skb_get_tunnel_key
+#define bpf_skb_set_tunnel_key __builtin_bpf_helper_skb_set_tunnel_key
+#define bpf_perf_event_read __builtin_bpf_helper_perf_event_read
+
+#if __BPF_KERNEL_VERSION_CODE__ >= KERNEL_VERSION (4,4,0)
+
+#define bpf_redirect __builtin_bpf_helper_redirect
+#define bpf_get_route_realm __builtin_bpf_helper_get_route_realm
+#define bpf_perf_event_output __builtin_bpf_helper_perf_event_output
+
+#if __BPF_KERNEL_VERSION_CODE__ >= KERNEL_VERSION (4,5,0)
+
+#define bpf_skb_load_bytes __builtin_bpf_helper_skb_load_bytes
+
+#if __BPF_KERNEL_VERSION_CODE__ >= KERNEL_VERSION (4,6,0)
+
+#define bpf_get_stackid __builtin_bpf_helper_get_stackid
+#define bpf_csum_diff __builtin_bpf_helper_csum_diff
+#define bpf_skb_get_tunnel_opt __builtin_bpf_helper_skb_get_tunnel_opt
+#define bpf_skb_set_tunnel_opt __builtin_bpf_helper_skb_set_tunnel_opt
+
+#if __BPF_KERNEL_VERSION_CODE__ >= KERNEL_VERSION (4,8,0)
+
+#define bpf_skb_change_proto __builtin_bpf_helper_skb_change_proto
+#define bpf_skb_change_type __builtin_bpf_helper_skb_change_type
+#define bpf_skb_under_cgroup __builtin_bpf_helper_skb_under_cgroup
+#define bpf_get_hash_recalc __builtin_bpf_helper_get_hash_recalc
+#define bpf_get_current_task __builtin_bpf_helper_get_current_task
+#define bpf_probe_write_user __builtin_bpf_helper_probe_write_user
+
+#if __BPF_KERNEL_VERSION_CODE__ >= KERNEL_VERSION (4,9,0)
+
+#define bpf_current_task_under_cgroup __builtin_bpf_helper_current_task_under_cgroup
+#define bpf_skb_change_tail __builtin_bpf_helper_skb_change_tail
+#define bpf_skb_pull_data __builtin_bpf_helper_skb_pull_data
+#define bpf_csum_update __builtin_bpf_helper_csum_update
+#define bpf_set_hash_invalid __builtin_bpf_helper_set_hash_invalid
+
+#if __BPF_KERNEL_VERSION_CODE__ >= KERNEL_VERSION (4,10,0)
+
+#define bpf_get_numa_node_id __builtin_bpf_helper_get_numa_node_id
+#define bpf_skb_change_head __builtin_bpf_helper_skb_change_head
+#define bpf_xdp_adjust_head __builtin_bpf_helper_xdp_adjust_head
+
+#if __BPF_KERNEL_VERSION_CODE__ >= KERNEL_VERSION (4,11,0)
+
+#define bpf_probe_read_str __builtin_bpf_helper_probe_read_str
+
+#if __BPF_KERNEL_VERSION_CODE__ >= KERNEL_VERSION (4,12,0)
+
+#define bpf_get_socket_cookie __builtin_bpf_helper_get_socket_cookie
+#define bpf_get_socket_uid __builtin_bpf_helper_get_socket_uid
+
+#if __BPF_KERNEL_VERSION_CODE__ >= KERNEL_VERSION (4,13,0)
+
+#define bpf_set_hash __builtin_bpf_helper_set_hash
+#define bpf_setsockopt __builtin_bpf_helper_setsockopt
+#define bpf_skb_adjust_room __builtin_bpf_helper_skb_adjust_room
+
+#if __BPF_KERNEL_VERSION_CODE__ >= KERNEL_VERSION (4,14,0)
+
+#define bpf_redirect_map __builtin_bpf_helper_redirect_map
+#define bpf_sk_redirect_map __builtin_bpf_helper_sk_redirect_map
+#define bpf_sock_map_update __builtin_bpf_helper_sock_map_update
+
+#if __BPF_KERNEL_VERSION_CODE__ >= KERNEL_VERSION (4,15,0)
+
+#define bpf_perf_event_read_value __builtin_bpf_helper_perf_event_read_value
+#define bpf_perf_prog_read_value __builtin_bpf_helper_perf_prog_read_value
+#define bpf_getsockopt __builtin_bpf_helper_getsockopt
+#define bpf_xdp_adjust_meta __builtin_bpf_helper_xdp_adjust_meta
+
+#if __BPF_KERNEL_VERSION_CODE__ >= KERNEL_VERSION (4,16,0)
+
+#define bpf_override_return __builtin_bpf_helper_override_return
+#define bpf_sock_ops_cb_flags_set __builtin_bpf_helper_sock_ops_cb_flags_set
+
+#if __BPF_KERNEL_VERSION_CODE__ >= KERNEL_VERSION (4,17,0)
+
+#define bpf_msg_redirect_map __builtin_bpf_helper_msg_redirect_map
+#define bpf_msg_apply_bytes __builtin_bpf_helper_msg_apply_bytes
+#define bpf_msg_cork_bytes __builtin_bpf_helper_msg_cork_bytes
+#define bpf_pull_data __builtin_bpf_helper_pull_data
+#define bpf_bind __builtin_bpf_helper_bpf_bind
+
+#if __BPF_KERNEL_VERSION_CODE__ >= KERNEL_VERSION (4,18,0)
+
+#define bpf_xdp_adjust_tail __builtin_bpf_helper_xdp_adjust_tail
+#define bpf_skb_get_xfrm_state __builtin_bpf_helper_skb_get_xfrm_state
+#define bpf_get_stack __builtin_bpf_helper_get_stack
+#define bpf_skb_load_bytes_relative __builtin_bpf_helper_skb_load_bytes_relative
+#define bpf_sock_hash_update __builtin_bpf_helper_sock_hash_update
+#define bpf_msg_redirect_hash __builtin_bpf_helper_msg_redirect_hash
+#define bpf_sk_redirect_hash __builtin_bpf_helper_sk_redirect_hash
+#define bpf_lwt_push_encap __builtin_bpf_helper_lwt_push_encap
+#define bpf_lwt_seg6_store_bytes __builtin_bpf_helper_lwt_seg6_store_bytes
+#define bpf_lwt_seg6_adjust_srh __builtin_bpf_helper_lwt_seg6_adjust_srh
+#define bpf_lwt_seg6_action __builtin_bpf_helper_lwt_seg6_action
+#define bpf_rc_repeat __builtin_bpf_helper_rc_repeat
+#define bpf_rc_keydown __builtin_bpf_helper_rc_keydown
+#define bpf_skb_cgroup_id __builtin_bpf_helper_skb_cgroup_id
+#define bpf_get_current_cgroup_id __builtin_bpf_helper_get_current_cgroup_id
+
+static inline int
+bpf_fib_lookup (void *ctx, struct bpf_fib_lookup *param, int plen,
+ unsigned int flags)
+{
+ return __builtin_bpf_helper_fib_lookup (ctx, (void *) param, plen, flags);
+}
+
+
+#if __BPF_KERNEL_VERSION_CODE__ >= KERNEL_VERSION (4,19,0)
+
+#define bpf_get_local_storage __builtin_bpf_helper_get_local_storage
+#define bpf_sk_select_reuseport __builtin_bpf_helper_sk_select_reuseport
+#define bpf_skb_ancestor_cgroup_id __builtin_bpf_helper_skb_ancestor_cgroup_id
+
+#if __BPF_KERNEL_VERSION_CODE__ >= KERNEL_VERSION (4,20,0)
+
+#define bpf_sk_release __builtin_bpf_helper_sk_release
+#define bpf_map_push_elem __builtin_bpf_helper_map_push_elem
+#define bpf_map_pop_elem __builtin_bpf_helper_map_pop_elem
+#define bpf_map_peek_elem __builtin_bpf_helper_map_peek_elem
+#define bpf_msg_push_data __builtin_bpf_helper_msg_push_data
+
+static inline struct bpf_sock *
+bpf_sk_lookup_tcp (void *ctx, struct bpf_sock_tuple *tuple,
+ int size, unsigned long long netns_id,
+ unsigned long long flags)
+{
+ return
+ (struct bpf_sock *) __builtin_bpf_helper_sk_lookup_tcp (ctx,
+ (void *) tuple,
+ size,
+ netns_id, flags);
+}
+
+static inline struct bpf_sock *
+bpf_sk_lookup_udp (void *ctx, struct bpf_sock_tuple *tuple,
+ int size, unsigned long long netns_id,
+ unsigned long long flags)
+{
+ return
+ (struct bpf_sock *) __builtin_bpf_helper_sk_lookup_udp (ctx,
+ (void *) tuple,
+ size,
+ netns_id, flags);
+}
+
+#if __BPF_KERNEL_VERSION_CODE__ >= KERNEL_VERSION (5,0,0)
+
+#define bpf_msg_pop_data __builtin_bpf_helper_pop_data
+#define bpf_rc_pointer_rel __builtin_bpf_helper_rc_pointer_rel
+
+#if __BPF_KERNEL_VERSION_CODE__ >= KERNEL_VERSION (5,1,0)
+
+#define bpf_spin_lock __builtin_bpf_helper_spin_lock
+#define bpf_spin_unlock __builtin_bpf_helper_spin_unlock
+#define bpf_skb_ecn_set_ce __builtin_bpf_helper_skb_ecn_set_ce
+
+static inline struct bpf_sock *
+bpf_sk_fullsock (struct bpf_sock *sk)
+{
+ return
+ (struct bpf_sock *) __builtin_bpf_helper_sk_fullsock ((void *) sk);
+}
+
+static inline struct bpf_sock *
+bpf_tcp_sock (struct bpf_sock *sk)
+{
+ return
+ (struct bpf_sock *) __builtin_bpf_helper_tcp_sock ((void *) sk);
+}
+
+static inline struct bpf_sock *
+bpf_get_listener_sock (struct bpf_sock *sk)
+{
+ return
+ (struct bpf_sock *) __builtin_bpf_helper_get_listener_sock ((void *) sk);
+}
+
+#if __BPF_KERNEL_VERSION_CODE__ >= KERNEL_VERSION (5,2,0)
+
+
+#endif /* 5.2 */
+#endif /* 5.1 */
+#endif /* 5.0 */
+#endif /* 4.20 */
+#endif /* 4.19 */
+#endif /* 4.18 */
+#endif /* 4.17 */
+#endif /* 4.16 */
+#endif /* 4.15 */
+#endif /* 4.14 */
+#endif /* 4.13 */
+#endif /* 4.12 */
+#endif /* 4.11 */
+#endif /* 4.10 */
+#endif /* 4.9 */
+#endif /* 4.8 */
+#endif /* 4.6 */
+#endif /* 4.5 */
+#endif /* 4.4 */
+#endif /* 4.3 */
+#endif /* 4.2 */
+#endif /* 4.1 */
+#endif /* 4.0 */
+
+/* Functions to emit BPF_LD_ABS and BPF_LD_IND instructions. We
+ provide the "standard" names as synonyms of the corresponding GCC
+ builtins. Note how the SKB argument is ignored. */
+
+static inline long long
+load_byte (void *skb, unsigned long long off)
+{
+ return __builtin_bpf_load_byte (off);
+}
+
+static inline long long
+load_half (void *skb, unsigned long long off)
+{
+ return __builtin_bpf_load_half (off);
+}
+
+static inline long long
+load_word (void *skb, unsigned long long off)
+{
+ return __builtin_bpf_load_word (off);
+}
+
+struct bpf_map_def
+{
+ unsigned int type;
+ unsigned int key_size;
+ unsigned int value_size;
+ unsigned int max_entries;
+ unsigned int map_flags;
+ unsigned int inner_map_idx;
+ unsigned int numa_node;
+};
+
+#endif /* ! __BPF_HELPERS_H */
diff --git a/gcc/config/bpf/bpf-opts.h b/gcc/config/bpf/bpf-opts.h
new file mode 100644
index 00000000000..5c76a40f131
--- /dev/null
+++ b/gcc/config/bpf/bpf-opts.h
@@ -0,0 +1,56 @@
+/* Definitions for option handling for eBPF.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+
+ This file is part of GCC.
+
+ GCC is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ GCC is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef BPF_OPTS_H
+#define BPF_OPTS_H
+
+/* Supported versions of the Linux kernel. */
+enum bpf_kernel_version
+{
+ /* Linux 4.x */
+ LINUX_V4_0,
+ LINUX_V4_1,
+ LINUX_V4_2,
+ LINUX_V4_3,
+ LINUX_V4_4,
+ LINUX_V4_5,
+ LINUX_V4_6,
+ LINUX_V4_7,
+ LINUX_V4_8,
+ LINUX_V4_9,
+ LINUX_V4_10,
+ LINUX_V4_11,
+ LINUX_V4_12,
+ LINUX_V4_13,
+ LINUX_V4_14,
+ LINUX_V4_15,
+ LINUX_V4_16,
+ LINUX_V4_17,
+ LINUX_V4_18,
+ LINUX_V4_19,
+ LINUX_V4_20,
+ /* Linux 5.x */
+ LINUX_V5_0,
+ LINUX_V5_1,
+ LINUX_V5_2,
+ LINUX_LATEST = LINUX_V5_2,
+ LINUX_NATIVE,
+};
+
+#endif /* ! BPF_OPTS_H */
diff --git a/gcc/config/bpf/bpf-protos.h b/gcc/config/bpf/bpf-protos.h
new file mode 100644
index 00000000000..3a835f4f12e
--- /dev/null
+++ b/gcc/config/bpf/bpf-protos.h
@@ -0,0 +1,33 @@
+/* Definition of eBPF target for GNU compiler.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#ifndef GCC_BPF_PROTOS_H
+#define GCC_BPF_PROTOS_H
+
+/* Routines implemented in bpf.c. */
+
+extern HOST_WIDE_INT bpf_initial_elimination_offset (int, int);
+extern const char *bpf_output_call (rtx);
+extern void bpf_target_macros (cpp_reader *);
+extern void bpf_print_operand (FILE *, rtx, int);
+extern void bpf_print_operand_address (FILE *, rtx);
+extern void bpf_expand_prologue (void);
+extern void bpf_expand_epilogue (void);
+
+#endif /* ! GCC_BPF_PROTOS_H */
diff --git a/gcc/config/bpf/bpf.c b/gcc/config/bpf/bpf.c
new file mode 100644
index 00000000000..4a42259a9c3
--- /dev/null
+++ b/gcc/config/bpf/bpf.c
@@ -0,0 +1,1136 @@
+/* Subroutines used for code generation for eBPF.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#define IN_TARGET_CODE 1
+
+#define INCLUDE_STRING
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
+#include "rtl.h"
+#include "regs.h"
+#include "insn-config.h"
+#include "insn-attr.h"
+#include "recog.h"
+#include "output.h"
+#include "alias.h"
+#include "tree.h"
+#include "stringpool.h"
+#include "attribs.h"
+#include "varasm.h"
+#include "stor-layout.h"
+#include "calls.h"
+#include "function.h"
+#include "explow.h"
+#include "memmodel.h"
+#include "emit-rtl.h"
+#include "reload.h"
+#include "tm_p.h"
+#include "target.h"
+#include "target-def.h"
+#include "basic-block.h"
+#include "expr.h"
+#include "optabs.h"
+#include "bitmap.h"
+#include "df.h"
+#include "c-family/c-common.h"
+#include "diagnostic.h"
+#include "builtins.h"
+#include "predict.h"
+#include "langhooks.h"
+
+/* Per-function machine data. */
+struct GTY(()) machine_function
+{
+ /* Number of bytes saved on the stack for local variables. */
+ int local_vars_size;
+
+ /* Number of bytes saved on the stack for callee-saved
+ registers. */
+ int callee_saved_reg_size;
+
+ /* Whether diagnostics for the function have been
+ checked/reported. */
+ int diagnostics_checked_p;
+};
+
+/* Data structures for the eBPF specific built-ins. */
+
+/* Maximum number of arguments taken by a builtin function, plus
+ one. */
+#define BPF_BUILTIN_MAX_ARGS 5
+
+enum bpf_builtins
+{
+ BPF_BUILTIN_UNUSED = 0,
+ /* Built-ins for kernel helpers. */
+#define DEF_HELPER(V,D,N,T) BPF_BUILTIN_HELPER_##D,
+# include "bpf-helpers.def"
+#undef DEF_HELPER
+ BPF_BUILTIN_HELPER_MAX,
+ /* Built-ins for non-generic loads and stores. */
+ BPF_BUILTIN_LOAD_BYTE = BPF_BUILTIN_HELPER_MAX,
+ BPF_BUILTIN_LOAD_HALF,
+ BPF_BUILTIN_LOAD_WORD,
+ BPF_BUILTIN_MAX,
+};
+
+/* This table is indexed by an enum bpf_builtin. */
+static const char *bpf_helper_names[] =
+{
+ NULL,
+#define DEF_HELPER(V,D,N,T) #N,
+# include "bpf-helpers.def"
+#undef DEF_HELPER
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
+
+/* Return the builtin code corresponding to the kernel helper builtin
+ __builtin_NAME, or 0 if the name doesn't correspond to a kernel
+ helper builtin. */
+
+static inline int
+bpf_helper_code (const char *name)
+{
+ int i;
+
+ for (i = 1; i < BPF_BUILTIN_HELPER_MAX; ++i)
+ {
+ if (strcmp (name, bpf_helper_names[i]) == 0)
+ return i;
+ }
+
+ return 0;
+}
+
+static GTY (()) tree bpf_builtins[(int) BPF_BUILTIN_MAX];
+
+/* Initialize the per-function machine status. */
+
+static struct machine_function *
+bpf_init_machine_status (void)
+{
+ /* Note this initializes all fields to 0, which is just OK for
+ us. */
+ return ggc_cleared_alloc<machine_function> ();
+}
+
+/* Override options and do some other initialization. */
+
+static void
+bpf_option_override (void)
+{
+ /* Set the default target kernel if no -mkernel was specified. */
+ if (!global_options_set.x_bpf_kernel)
+ bpf_kernel = LINUX_LATEST;
+
+ /* Set the initializer for the per-function status structure. */
+ init_machine_status = bpf_init_machine_status;
+}
+
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE bpf_option_override
+
+/* Determine whether the port is prepared to handle insns involving
+ scalar mode MODE. For a scalar mode to be considered supported,
+ all the basic arithmetic and comparisons must work. */
+
+static bool
+bpf_scalar_mode_supported_p (scalar_mode mode)
+{
+ switch (mode)
+ {
+ case E_QImode:
+ case E_HImode:
+ case E_SImode:
+ case E_DImode:
+ case E_TImode:
+ return true;
+
+ default:
+ return false;
+ }
+
+ return false;
+}
+
+#undef TARGET_SCALAR_MODE_SUPPORTED_P
+#define TARGET_SCALAR_MODE_SUPPORTED_P bpf_scalar_mode_supported_p
+
+/* Define target-specific CPP macros. This function in used in the
+ definition of TARGET_CPU_CPP_BUILTINS in bpf.h */
+
+#define builtin_define(TXT) cpp_define (pfile, TXT)
+
+void
+bpf_target_macros (cpp_reader *pfile)
+{
+ builtin_define ("__BPF__");
+
+ if (TARGET_LITTLE_ENDIAN)
+ builtin_define ("__BPF_LITTLE_ENDIAN__");
+ else
+ builtin_define ("__BPF_BIG_ENDIAN__");
+
+ /* Define BPF_KERNEL_VERSION_CODE */
+ {
+ const char *version_code;
+ char *kernel_version_code;
+
+ switch (bpf_kernel)
+ {
+ case LINUX_V4_0: version_code = "0x40000"; break;
+ case LINUX_V4_1: version_code = "0x40100"; break;
+ case LINUX_V4_2: version_code = "0x40200"; break;
+ case LINUX_V4_3: version_code = "0x40300"; break;
+ case LINUX_V4_4: version_code = "0x40400"; break;
+ case LINUX_V4_5: version_code = "0x40500"; break;
+ case LINUX_V4_6: version_code = "0x40600"; break;
+ case LINUX_V4_7: version_code = "0x40700"; break;
+ case LINUX_V4_8: version_code = "0x40800"; break;
+ case LINUX_V4_9: version_code = "0x40900"; break;
+ case LINUX_V4_10: version_code = "0x40a00"; break;
+ case LINUX_V4_11: version_code = "0x40b00"; break;
+ case LINUX_V4_12: version_code = "0x40c00"; break;
+ case LINUX_V4_13: version_code = "0x40d00"; break;
+ case LINUX_V4_14: version_code = "0x40e00"; break;
+ case LINUX_V4_15: version_code = "0x40f00"; break;
+ case LINUX_V4_16: version_code = "0x41000"; break;
+ case LINUX_V4_17: version_code = "0x42000"; break;
+ case LINUX_V4_18: version_code = "0x43000"; break;
+ case LINUX_V4_19: version_code = "0x44000"; break;
+ case LINUX_V4_20: version_code = "0x45000"; break;
+ case LINUX_V5_0: version_code = "0x50000"; break;
+ case LINUX_V5_1: version_code = "0x50100"; break;
+ case LINUX_V5_2: version_code = "0x50200"; break;
+ default:
+ gcc_unreachable ();
+ }
+
+#define KERNEL_VERSION_CODE "__BPF_KERNEL_VERSION_CODE__="
+ kernel_version_code
+ = (char *) alloca (strlen (KERNEL_VERSION_CODE) + 7 + 1);
+ strcpy (kernel_version_code, KERNEL_VERSION_CODE);
+#undef KERNEL_VERSION_CODE
+ strcat (kernel_version_code, version_code);
+ builtin_define (kernel_version_code);
+ }
+}
+
+/* Output assembly directives to switch to section NAME. The section
+ should have attributes as specified by FLAGS, which is a bit mask
+ of the 'SECTION_*' flags defined in 'output.h'. If DECL is
+ non-NULL, it is the 'VAR_DECL' or 'FUNCTION_DECL' with which this
+ section is associated. */
+
+static void
+bpf_asm_named_section (const char *name,
+ unsigned int flags ATTRIBUTE_UNUSED,
+ tree decl ATTRIBUTE_UNUSED)
+{
+ fprintf (asm_out_file, "\t.section\t%s\n", name);
+}
+
+#undef TARGET_ASM_NAMED_SECTION
+#define TARGET_ASM_NAMED_SECTION bpf_asm_named_section
+
+/* Return an RTX representing the place where a function returns or
+ receives a value of data type RET_TYPE, a tree node representing a
+ data type. */
+
+static rtx
+bpf_function_value (const_tree ret_type,
+ const_tree fntype_or_decl ATTRIBUTE_UNUSED,
+ bool outgoing ATTRIBUTE_UNUSED)
+{
+ enum machine_mode mode;
+ int unsignedp;
+
+ mode = TYPE_MODE (ret_type);
+ if (INTEGRAL_TYPE_P (ret_type))
+ mode = promote_function_mode (ret_type, mode, &unsignedp, fntype_or_decl, 1);
+
+ return gen_rtx_REG (mode, 0);
+}
+
+#undef TARGET_FUNCTION_VALUE
+#define TARGET_FUNCTION_VALUE bpf_function_value
+
+/* Return true if REGNO is th enumber of a hard register in which the
+ values of called function may come back. */
+
+static bool
+bpf_function_value_regno_p (const unsigned int regno)
+{
+ return (regno == 0);
+}
+
+#undef TARGET_FUNCTION_VALUE_REGNO_P
+#define TARGET_FUNCTION_VALUE_REGNO_P bpf_function_value_regno_p
+
+/* Compute the size of the function's stack frame, including the local
+ area and the register-save area. */
+
+static void
+bpf_compute_frame (void)
+{
+ int stack_alignment = STACK_BOUNDARY / BITS_PER_UNIT;
+ int padding_locals, regno;
+
+ /* Set the space used in the stack by local variables. This is
+ rounded up to respect the minimum stack alignment. */
+ cfun->machine->local_vars_size = get_frame_size ();
+
+ padding_locals = cfun->machine->local_vars_size % stack_alignment;
+ if (padding_locals)
+ padding_locals = stack_alignment - padding_locals;
+
+ cfun->machine->local_vars_size += padding_locals;
+
+ /* Set the space used in the stack by callee-saved used registers in
+ the current function. There is no need to round up, since the
+ registers are all 8 bytes wide. */
+ for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
+ if ((!fixed_regs[regno]
+ && df_regs_ever_live_p (regno)
+ && !call_used_regs[regno])
+ || (cfun->calls_alloca
+ && regno == STACK_POINTER_REGNUM))
+ cfun->machine->callee_saved_reg_size += 8;
+
+ /* Check that the total size of the frame doesn't exceed the limit
+ imposed by eBPF: currently 512 bytes. */
+ if ((cfun->machine->local_vars_size
+ + cfun->machine->callee_saved_reg_size) > 512)
+ {
+ static int stack_limit_exceeded = 0;
+
+ if (!stack_limit_exceeded)
+ error ("eBPF stack limit of 512 bytes exceeded");
+ stack_limit_exceeded = 1;
+ }
+}
+
+/* Expand to the instructions in a function prologue. This function
+ is called when expanding the 'prologue' pattern in bpf.md. */
+
+void
+bpf_expand_prologue (void)
+{
+ int regno, fp_offset;
+ rtx insn;
+ HOST_WIDE_INT size;
+
+ bpf_compute_frame ();
+ size = (cfun->machine->local_vars_size
+ + cfun->machine->callee_saved_reg_size);
+ fp_offset = -cfun->machine->local_vars_size;
+
+ /* Save callee-saved hard registes. The register-save-area starts
+ right after the local variables. */
+ for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
+ {
+ if ((!fixed_regs[regno]
+ && df_regs_ever_live_p (regno)
+ && !call_used_regs[regno])
+ || (cfun->calls_alloca
+ && regno == STACK_POINTER_REGNUM))
+ {
+ rtx mem;
+
+ if (!IN_RANGE (fp_offset, -1 - 0x7fff, 0x7fff))
+ /* This has been already reported as an error in
+ bpf_compute_frame. */
+ break;
+ else
+ {
+ mem = gen_frame_mem (DImode,
+ plus_constant (DImode,
+ gen_rtx_REG (DImode, FRAME_POINTER_REGNUM),
+ fp_offset - 8));
+ insn = emit_move_insn (mem, gen_rtx_REG (DImode, regno));
+ RTX_FRAME_RELATED_P (insn) = 1;
+ fp_offset -= 8;
+ }
+ }
+ }
+
+ /* Set the stack pointer, if the function allocates space
+ dynamically. Note that the value of %sp should be directly
+ derived from %fp, for the kernel verifier to track it as a stack
+ accessor. */
+ if (cfun->calls_alloca)
+ {
+ insn = emit_move_insn (stack_pointer_rtx,
+ gen_rtx_REG (DImode, FRAME_POINTER_REGNUM));
+ RTX_FRAME_RELATED_P (insn) = 1;
+
+ if (size > 0)
+ {
+ insn = emit_insn (gen_rtx_SET (stack_pointer_rtx,
+ gen_rtx_PLUS (Pmode,
+ stack_pointer_rtx,
+ GEN_INT (-size))));
+ RTX_FRAME_RELATED_P (insn) = 1;
+ }
+ }
+}
+
+/* Expand to the instructions in a function epilogue. This function
+ is called when expanding the 'prologue' pattern in bpf.md. */
+
+void
+bpf_expand_epilogue (void)
+{
+ int regno, fp_offset;
+ rtx insn;
+
+ bpf_compute_frame ();
+ fp_offset = -cfun->machine->local_vars_size;
+
+ /* Restore callee-saved hard registes from the stack. */
+ for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
+ {
+ if ((!fixed_regs[regno]
+ && df_regs_ever_live_p (regno)
+ && !call_used_regs[regno])
+ || (cfun->calls_alloca
+ && regno == STACK_POINTER_REGNUM))
+ {
+ rtx mem;
+
+ if (!IN_RANGE (fp_offset, -1 - 0x7fff, 0x7fff))
+ /* This has been already reported as an error in
+ bpf_compute_frame. */
+ break;
+ else
+ {
+ mem = gen_frame_mem (DImode,
+ plus_constant (DImode,
+ gen_rtx_REG (DImode, FRAME_POINTER_REGNUM),
+ fp_offset - 8));
+ insn = emit_move_insn (gen_rtx_REG (DImode, regno), mem);
+ RTX_FRAME_RELATED_P (insn) = 1;
+ fp_offset -= 8;
+ }
+ }
+ }
+
+ emit_jump_insn (gen_exit ());
+}
+
+/* Output the extra assembler code for entry to a function. Note this
+ doesn't generally include instructions, but extra needed
+ directives. */
+
+void
+bpf_asm_function_prologue (FILE *file ATTRIBUTE_UNUSED)
+{
+}
+
+#undef TARGET_ASM_FUNCTION_PROLOGUE
+#define TARGET_ASM_FUNCTION_PROLOGUE bpf_asm_function_prologue
+
+/* Output the extra assembler code for exit from a function. */
+
+static void
+bpf_asm_function_epilogue (FILE *file ATTRIBUTE_UNUSED)
+{
+}
+
+#undef TARGET_ASM_FUNCTION_EPILOGUE
+#define TARGET_ASM_FUNCTION_EPILOGUE bpf_asm_function_epilogue
+
+/* Return the initial difference between the specified pair of
+ registers. The registers that can figure in FROM, and TO, are
+ specified by ELIMINABLE_REGS in bpf.h.
+
+ This function is used in the definition of
+ INITIAL_ELIMINATION_OFFSET in bpf.h */
+
+HOST_WIDE_INT
+bpf_initial_elimination_offset (int from,
+ int to)
+{
+ HOST_WIDE_INT ret;
+
+ if (from == ARG_POINTER_REGNUM && to == STACK_POINTER_REGNUM)
+ {
+ bpf_compute_frame ();
+ ret = (cfun->machine->local_vars_size
+ + cfun->machine->callee_saved_reg_size);
+ }
+ else if (from == ARG_POINTER_REGNUM && to == FRAME_POINTER_REGNUM)
+ ret = 0;
+ else
+ abort ();
+
+ return ret;
+}
+
+/* Return the number of consecutive hard registers, starting at
+ register number REGNO, required to hold a value of mode MODE. */
+
+static unsigned int
+bpf_hard_regno_nregs (unsigned int regno ATTRIBUTE_UNUSED,
+ enum machine_mode mode)
+{
+ return ((GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) / UNITS_PER_WORD);
+}
+
+#undef TARGET_HARD_REGNO_NREGS
+#define TARGET_HARD_REGNO_NREGS bpf_hard_regno_nregs
+
+/* Return true if it is permissible to store a value of mode MODE in
+ hard register number REGNO, or in several registers starting with
+ that one. */
+
+static bool
+bpf_hard_regno_mode_ok (unsigned int regno ATTRIBUTE_UNUSED,
+ enum machine_mode mode)
+{
+ switch (mode)
+ {
+ case E_SImode:
+ case E_DImode:
+ case E_HImode:
+ case E_QImode:
+ case E_TImode:
+ case E_SFmode:
+ case E_DFmode:
+ return true;
+ default:
+ return false;
+ }
+}
+
+#undef TARGET_HARD_REGNO_MODE_OK
+#define TARGET_HARD_REGNO_MODE_OK bpf_hard_regno_mode_ok
+
+/* Return true if a value of mode MODE1 is accessible in mode MODE2
+ without copying. */
+
+static bool
+bpf_modes_tieable_p (enum machine_mode mode1,
+ enum machine_mode mode2)
+{
+ return (mode1 == mode2
+ || GET_MODE_CLASS (mode1) == GET_MODE_CLASS (mode2));
+}
+
+#undef TARGET_MODES_TIEABLE_P
+#define TARGET_MODES_TIEABLE_P bpf_modes_tieable_p
+
+/* Return true if a function must have and use a frame pointer. */
+
+static bool
+bpf_frame_pointer_required (void)
+{
+ /* We do not have a stack pointer, so we absolutely depend on the
+ frame-pointer in order to access the stack... and fishes walk and
+ pigs fly glglgl */
+ return true;
+}
+
+#undef TARGET_FRAME_POINTER_REQUIRED
+#define TARGET_FRAME_POINTER_REQUIRED bpf_frame_pointer_required
+
+/* Return `true' if the given RTX X is a valid base for an indirect
+ memory access. STRICT has the same meaning than in
+ bpf_legitimate_address_p. */
+
+static inline bool
+bpf_address_base_p (rtx x, bool strict)
+{
+ return (GET_CODE (x) == REG
+ && (REGNO (x) < 11
+ || (!strict && REGNO (x) >= FIRST_PSEUDO_REGISTER)));
+}
+
+/* Return true if X (a RTX) is a legitimate memory address on the
+ target machine for a memory operand of mode MODE. */
+
+static bool
+bpf_legitimate_address_p (machine_mode mode ATTRIBUTE_UNUSED,
+ rtx x,
+ bool strict)
+{
+ switch (GET_CODE (x))
+ {
+ case LABEL_REF:
+ case SYMBOL_REF:
+ case CONST:
+ /* These are assumed to fit in 32-bit, because the kernel
+ imposes a limit to the size of eBPF programs. */
+ return true;
+ break;
+
+ case CONST_INT:
+ /* This is only valid if the constant fits in a signed
+ 32-bit. */
+ return IN_RANGE (INTVAL (x), -1 - 0x7fffffff, 0x7fffffff);
+ break;
+
+ case REG:
+ return bpf_address_base_p (x, strict);
+ break;
+
+ case PLUS:
+ {
+ /* The valid patterns here are:
+
+ (PLUS ADDR_BASE CONST_INT)
+ (PLUS CONST_INT ADDR_BASE)
+
+ provided CONST_INT fits in a signed 16-bit.
+
+ Note that LABEL_REF and SYMBOL_REF are not allowed in
+ REG+IMM addresses, because it is almost certain they will
+ overload the offset field. */
+
+ rtx x0 = XEXP (x, 0);
+ rtx x1 = XEXP (x, 1);
+
+ if (bpf_address_base_p (x0, strict) && GET_CODE (x1) == CONST_INT)
+ return IN_RANGE (INTVAL (x1), -1 - 0x7fff, 0x7fff);
+
+ if (bpf_address_base_p (x1, strict) && GET_CODE (x0) == CONST_INT)
+ return IN_RANGE (INTVAL (x0), -1 - 0x7fff, 0x7fff);
+
+ break;
+ }
+ default:
+ break;
+ }
+
+ return false;
+}
+
+#undef TARGET_LEGITIMATE_ADDRESS_P
+#define TARGET_LEGITIMATE_ADDRESS_P bpf_legitimate_address_p
+
+/* Split an out-of-range address displacement into hi and lo parts.
+ The hi part will have to be loaded into a register separately, but
+ the low part will be folded into the memory operand. */
+
+static bool
+bpf_legitimize_address_displacement (rtx *off1, rtx *off2,
+ poly_int64 poly_offset, machine_mode)
+{
+ HOST_WIDE_INT orig_offset = poly_offset;
+
+ /* Our case is very easy: the REG part of an indirect address is
+ 64-bit wide, so it can hold any address. This always leads to
+ REG+0 */
+
+ *off1 = GEN_INT (orig_offset);
+ *off2 = GEN_INT (0);
+ return true;
+}
+
+#undef TARGET_LEGITIMIZE_ADDRESS_DISPLACEMENT
+#define TARGET_LEGITIMIZE_ADDRESS_DISPLACEMENT bpf_legitimize_address_displacement
+
+/* Return true if memory address ADDR in address space AS can have
+ different meanings depending on the machine mode of the memory
+ reference it is used for or if the address is valid for some modes
+ but not others. */
+
+static bool
+bpf_mode_dependent_address_p (const_rtx addr ATTRIBUTE_UNUSED,
+ addr_space_t as ATTRIBUTE_UNUSED)
+{
+ return true;
+}
+
+#undef TARGET_MODE_DEPENDENT_ADDRESS_P
+#define TARGET_MODE_DEPENDENT_ADDRESS_P bpf_mode_dependent_address_p
+
+/* Return true if X is a legitimate constant for a MODE-mode immediate
+ operand on the target machine. */
+
+static bool
+bpf_legitimate_constant_p (enum machine_mode mode ATTRIBUTE_UNUSED,
+ rtx x ATTRIBUTE_UNUSED)
+{
+ return true;
+}
+
+#undef TARGET_LEGITIMATE_CONSTANT_P
+#define TARGET_LEGITIMATE_CONSTANT_P bpf_legitimate_constant_p
+
+/* Describe the relative costs of RTL expressions. Return true when
+ all subexpressions of X have been processed, and false when
+ `rtx_cost' should recurse. */
+
+static bool
+bpf_rtx_costs (rtx x ATTRIBUTE_UNUSED,
+ enum machine_mode mode ATTRIBUTE_UNUSED,
+ int outer_code ATTRIBUTE_UNUSED,
+ int opno ATTRIBUTE_UNUSED,
+ int *total ATTRIBUTE_UNUSED,
+ bool speed ATTRIBUTE_UNUSED)
+{
+ /* To be written. */
+ return false;
+}
+
+#undef TARGET_RTX_COSTS
+#define TARGET_RTX_COSTS bpf_rtx_costs
+
+/* Return a RTX indicating whether a function argument is passed in a
+ register and if so, which register. */
+
+static rtx
+bpf_function_arg (cumulative_args_t ca, enum machine_mode mode ATTRIBUTE_UNUSED,
+ const_tree type ATTRIBUTE_UNUSED, bool named ATTRIBUTE_UNUSED)
+{
+ CUMULATIVE_ARGS *cum = get_cumulative_args (ca);
+
+ if (*cum < 5)
+ return gen_rtx_REG (mode, *cum + 1);
+ else
+ /* An error have been emitted for this in
+ bpf_function_arg_advance. */
+ return NULL_RTX;
+}
+
+#undef TARGET_FUNCTION_ARG
+#define TARGET_FUNCTION_ARG bpf_function_arg
+
+/* Update the summarizer variable pointed by CA to advance past an
+ argument in the argument list. */
+
+static void
+bpf_function_arg_advance (cumulative_args_t ca, enum machine_mode mode ATTRIBUTE_UNUSED,
+ const_tree type ATTRIBUTE_UNUSED, bool named ATTRIBUTE_UNUSED)
+{
+ CUMULATIVE_ARGS *cum = get_cumulative_args (ca);
+
+ if (*cum > 4)
+ error ("eBPF doesn't support functions with more than 5 arguments");
+ (*cum)++;
+}
+
+#undef TARGET_FUNCTION_ARG_ADVANCE
+#define TARGET_FUNCTION_ARG_ADVANCE bpf_function_arg_advance
+
+/* Return true if an argument at the position indicated by CUM should
+ be passed by reference. If the hook returns true, a copy of that
+ argument is made in memory and a pointer to the argument is passed
+ instead of the argument itself. */
+
+static bool
+bpf_pass_by_reference (cumulative_args_t cum ATTRIBUTE_UNUSED,
+ enum machine_mode mode, const_tree type,
+ bool named ATTRIBUTE_UNUSED)
+{
+ unsigned HOST_WIDE_INT size;
+
+ if (type)
+ {
+ if (AGGREGATE_TYPE_P (type))
+ return true;
+ size = int_size_in_bytes (type);
+ }
+ else
+ size = GET_MODE_SIZE (mode);
+
+ return (size > 8*5);
+}
+
+#undef TARGET_PASS_BY_REFERENCE
+#define TARGET_PASS_BY_REFERENCE bpf_pass_by_reference
+
+/* Diagnostics on function contents. */
+
+static void
+bpf_set_current_function (tree decl)
+{
+ if (decl == NULL_TREE
+ || current_function_decl == NULL_TREE
+ || current_function_decl == error_mark_node
+ || !cfun->machine
+ || cfun->machine->diagnostics_checked_p)
+ return;
+
+ /* Currently we don't do anything meaningful here. To be
+ changed. */
+
+ /* Don't print the above diagnostics more than once. */
+ cfun->machine->diagnostics_checked_p = 1;
+}
+
+#undef TARGET_SET_CURRENT_FUNCTION
+#define TARGET_SET_CURRENT_FUNCTION bpf_set_current_function
+
+/* Output the assembly code for a constructor. Since eBPF doesn't
+ support indirect calls, constructors are not supported. */
+
+static void
+bpf_output_constructor (rtx symbol, int priority ATTRIBUTE_UNUSED)
+{
+ fatal_insn ("no support for constructors sorry", symbol);
+}
+
+#undef TARGET_ASM_CONSTRUCTOR
+#define TARGET_ASM_CONSTRUCTOR bpf_output_constructor
+
+/* Output the assembly code for a destructor. Since eBPF doesn't
+ support indirect calls, destructors are not supported. */
+
+static void
+bpf_output_destructor (rtx symbol, int priority ATTRIBUTE_UNUSED)
+{
+ fatal_insn ("no support for destructors sorry", symbol);
+}
+
+#undef TARGET_ASM_DESTRUCTOR
+#define TARGET_ASM_DESTRUCTOR bpf_output_destructor
+
+/* Return the appropriate instruction to CALL to a function. TARGET
+ is a `mem' RTX denoting the address of the called function.
+
+ The main purposes of this function are:
+ - To reject indirect CALL instructions, which are not supported by
+ eBPf.
+ - To recognize calls to kernel helper functions and emit the
+ corresponding CALL N instruction.
+
+ This function is called from the expansion of the 'call' pattern in
+ bpf.md. */
+
+const char *
+bpf_output_call (rtx target)
+{
+ static char *insn;
+ rtx op;
+
+ op = XEXP (target, 0);
+ switch (GET_CODE (op))
+ {
+ case CONST_INT:
+ insn = (char *) xmalloc (5 + 6 + 1);
+ sprintf (insn, "call\t%ld", INTVAL (op));
+ break;
+ case SYMBOL_REF:
+ {
+ const char *function_name = XSTR (op, 0);
+ int code;
+
+ if (strncmp (function_name, "__builtin_bpf_helper_", 21) == 0
+ && ((code = bpf_helper_code (function_name + 21)) != 0))
+ {
+ insn = (char *) xmalloc (5 + 6 + 1);
+ sprintf (insn, "call\t%d", code);
+ }
+ else
+ {
+ insn = (char *) xmalloc (strlen (function_name) + 5 + 1);
+ sprintf (insn, "call\t%s", function_name);
+ }
+ break;
+ }
+ default:
+ error ("indirect call in function, which are not supported by eBPF");
+ insn = xstrdup ("call 0");
+ break;
+ }
+
+ return insn;
+}
+
+/* Print an instruction operand. This function is called in the macro
+ PRINT_OPERAND defined in bpf.h */
+
+void
+bpf_print_operand (FILE *file, rtx op, int code ATTRIBUTE_UNUSED)
+{
+ switch (GET_CODE (op))
+ {
+ case REG:
+ fprintf (file, "%s", reg_names[REGNO (op)]);
+ break;
+ case MEM:
+ output_address (GET_MODE (op), XEXP (op, 0));
+ break;
+ case CONST_DOUBLE:
+ if (CONST_DOUBLE_HIGH (op))
+ fprintf (file, HOST_WIDE_INT_PRINT_DOUBLE_HEX,
+ CONST_DOUBLE_HIGH (op), CONST_DOUBLE_LOW (op));
+ else if (CONST_DOUBLE_LOW (op) < 0)
+ fprintf (file, HOST_WIDE_INT_PRINT_HEX, CONST_DOUBLE_LOW (op));
+ else
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_DOUBLE_LOW (op));
+ break;
+ case LABEL_REF:
+ /* This is for label values. */
+ /* Fallthrough. */
+ default:
+ output_addr_const (file, op);
+ }
+}
+
+/* Print an operand which is an address. This function should handle
+ any legit address, as accepted by bpf_legitimate_address_p.
+
+ This function is called in the PRINT_OPERAND_ADDRESS macro defined
+ in bpf.h */
+
+void
+bpf_print_operand_address (FILE *file, rtx addr)
+{
+ switch (GET_CODE (addr))
+ {
+ case REG:
+ fprintf (file, "[%s+0]", reg_names[REGNO (addr)]);
+ break;
+ case PLUS:
+ {
+ rtx op0 = XEXP (addr, 0);
+ rtx op1 = XEXP (addr, 1);
+
+ if (GET_CODE (op0) == REG && CONSTANT_ADDRESS_P (op1))
+ {
+ fprintf (file, "[%s+", reg_names[REGNO (op0)]);
+ output_addr_const (file, op1);
+ fputs ("]", file);
+ }
+ else if (GET_CODE (op1) == REG && CONSTANT_ADDRESS_P (op0))
+ {
+ fprintf (file, "[%s+", reg_names[REGNO (op1)]);
+ output_addr_const (file, op0);
+ fputs ("]", file);
+ }
+ else
+ fatal_insn ("invalid address in operand", addr);
+ break;
+ }
+ case MEM:
+ /* Fallthrough. */
+ case LABEL_REF:
+ /* Fallthrough. */
+ fatal_insn ("unsupported operand", addr);
+ break;
+ default:
+ output_addr_const (file, addr);
+ break;
+ }
+}
+
+/* Add a BPF builtin function with NAME, CODE and TYPE. Return
+ the function decl or NULL_TREE if the builtin was not added. */
+
+static tree
+def_builtin (const char *name, enum bpf_builtins code, tree type)
+{
+ tree t
+ = add_builtin_function (name, type, code, BUILT_IN_MD, NULL, NULL_TREE);
+
+ if (t)
+ bpf_builtins[code] = t;
+
+ return t;
+}
+
+/* Define machine-specific built-in functions. */
+
+static void
+bpf_init_builtins (void)
+{
+ /* Built-ins for calling kernel helpers. */
+
+ tree pt = build_pointer_type (void_type_node);
+ tree const_void_type
+ = build_qualified_type (void_type_node, TYPE_QUAL_CONST);
+ tree cpt = build_pointer_type (const_void_type);
+ tree st = short_integer_type_node;
+ tree ust = uint16_type_node;
+ tree it = integer_type_node;
+ tree ut = unsigned_type_node;
+ tree const_char_type
+ = build_qualified_type (char_type_node, TYPE_QUAL_CONST);
+ tree cst = build_pointer_type (const_char_type);
+ tree vt = void_type_node;
+ tree ult = long_unsigned_type_node;
+ tree u32t = uint32_type_node;
+ tree u64t = uint64_type_node;
+ tree llt = long_long_integer_type_node;
+ tree ullt = long_long_unsigned_type_node;
+
+#define TYPES build_function_type_list
+#define VTYPES build_varargs_function_type_list
+#define DEF_HELPER(V,D,N,T) \
+ do \
+ { \
+ if (bpf_kernel >= (V)) \
+ def_builtin ("__builtin_bpf_helper_" #N, \
+ BPF_BUILTIN_HELPER_##D, \
+ T); \
+ } while (0);
+# include "bpf-helpers.def"
+#undef TYPES
+#undef VTYPES
+#undef DEF_HELPER
+
+ /* Built-ins for BPF_LD_ABS and BPF_LD_IND instructions. */
+
+ def_builtin ("__builtin_bpf_load_byte", BPF_BUILTIN_LOAD_BYTE,
+ build_function_type_list (ullt, ullt, 0));
+ def_builtin ("__builtin_bpf_load_half", BPF_BUILTIN_LOAD_HALF,
+ build_function_type_list (ullt, ullt, 0));
+ def_builtin ("__builtin_bpf_load_word", BPF_BUILTIN_LOAD_WORD,
+ build_function_type_list (ullt, ullt, 0));
+}
+
+#undef TARGET_INIT_BUILTINS
+#define TARGET_INIT_BUILTINS bpf_init_builtins
+
+/* Expand a call to a BPF-specific built-in function that was set up
+ with bpf_init_builtins. */
+
+static rtx
+bpf_expand_builtin (tree exp, rtx target,
+ rtx subtarget ATTRIBUTE_UNUSED,
+ machine_mode mode ATTRIBUTE_UNUSED,
+ int ignore)
+{
+ tree fndecl = TREE_OPERAND (CALL_EXPR_FN (exp), 0);
+ int code = DECL_MD_FUNCTION_CODE (fndecl);
+
+ if (code >= 1 && code < BPF_BUILTIN_HELPER_MAX)
+ {
+ /* This is a builtin to call a kernel helper function.
+
+ For these builtins, we just expand the function call normally
+ with expand_call like we would do for a libcall. The function
+ bpf_output_call below will then do The Right Thing (TM),
+ recognizing the name of the called __builtin_helper_* symbol
+ and emitting the corresponding CALL N instruction whenever
+ necessary. */
+
+ return expand_call (exp, target, ignore);
+ }
+ else if (code == BPF_BUILTIN_LOAD_BYTE
+ || code == BPF_BUILTIN_LOAD_HALF
+ || code == BPF_BUILTIN_LOAD_WORD)
+ {
+ /* Expand an indirect load from the sk_buff in the context.
+ There is just one argument to the builtin, which is the
+ offset.
+
+ We try first to expand a ldabs* instruction. In case this
+ fails, we try a ldind* instruction. */
+
+ enum insn_code abs_icode
+ = (code == BPF_BUILTIN_LOAD_BYTE ? CODE_FOR_ldabsb
+ : code == BPF_BUILTIN_LOAD_HALF ? CODE_FOR_ldabsh
+ : CODE_FOR_ldabsw);
+
+ enum insn_code ind_icode
+ = (code == BPF_BUILTIN_LOAD_BYTE ? CODE_FOR_ldindb
+ : code == BPF_BUILTIN_LOAD_HALF ? CODE_FOR_ldindh
+ : CODE_FOR_ldindw);
+
+ tree offset_arg = CALL_EXPR_ARG (exp, 0);
+ struct expand_operand ops[2];
+
+ create_input_operand (&ops[0], expand_normal (offset_arg),
+ TYPE_MODE (TREE_TYPE (offset_arg)));
+ create_input_operand (&ops[1], gen_rtx_CONST_INT (SImode, 0),
+ SImode);
+
+ if (!maybe_expand_insn (abs_icode, 2, ops)
+ && !maybe_expand_insn (ind_icode, 2, ops))
+ {
+ error ("invalid argument to built-in function");
+ return gen_rtx_REG (ops[0].mode, 0);
+ }
+
+ /* The result of the load is in R0. */
+ return gen_rtx_REG (ops[0].mode, 0);
+ }
+
+ gcc_unreachable ();
+}
+
+#undef TARGET_EXPAND_BUILTIN
+#define TARGET_EXPAND_BUILTIN bpf_expand_builtin
+
+/* Initialize target-specific function library calls. This is mainly
+ used to call library-provided soft-fp operations, since eBPF
+ doesn't support floating-point in "hardware". */
+
+static void
+bpf_init_libfuncs (void)
+{
+ set_conv_libfunc (sext_optab, DFmode, SFmode,
+ "__bpf_extendsfdf2");
+ set_conv_libfunc (trunc_optab, SFmode, DFmode,
+ "__bpf_truncdfsf2");
+ set_conv_libfunc (sfix_optab, SImode, DFmode,
+ "__bpf_fix_truncdfsi");
+ set_conv_libfunc (sfloat_optab, DFmode, SImode,
+ "__bpf_floatsidf");
+ set_conv_libfunc (ufloat_optab, DFmode, SImode,
+ "__bpf_floatunsidf");
+}
+
+#undef TARGET_INIT_LIBFUNCS
+#define TARGET_INIT_LIBFUNCS bpf_init_libfuncs
+
+/* Define the mechanism that will be used for describing frame unwind
+ information to the debugger. In eBPF it is not possible to unwind
+ frames. */
+
+static enum unwind_info_type
+bpf_debug_unwind_info ()
+{
+ return UI_NONE;
+}
+
+#undef TARGET_DEBUG_UNWIND_INFO
+#define TARGET_DEBUG_UNWIND_INFO bpf_debug_unwind_info
+
+/* Always promote arguments and return values in function calls. */
+
+#undef TARGET_PROMOTE_FUNCTION_MODE
+#define TARGET_PROMOTE_FUNCTION_MODE default_promote_function_mode_always_promote
+
+/* Output assembly directives to assemble data of various sized and
+ alignments. */
+
+#undef TARGET_ASM_BYTE_OP
+#define TARGET_ASM_BYTE_OP "\t.byte\t"
+#undef TARGET_ASM_ALIGNED_HI_OP
+#define TARGET_ASM_ALIGNED_HI_OP "\t.half\t"
+#undef TARGET_ASM_ALIGNED_SI_OP
+#define TARGET_ASM_ALIGNED_SI_OP "\t.word\t"
+#undef TARGET_ASM_ALIGNED_DI_OP
+#define TARGET_ASM_ALIGNED_DI_OP "\t.dword\t"
+
+/* Finally, build the GCC target. */
+
+struct gcc_target targetm = TARGET_INITIALIZER;
+
+#include "gt-bpf.h"
diff --git a/gcc/config/bpf/bpf.h b/gcc/config/bpf/bpf.h
new file mode 100644
index 00000000000..038542b5e22
--- /dev/null
+++ b/gcc/config/bpf/bpf.h
@@ -0,0 +1,565 @@
+/* Definition of the eBPF target for GCC.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+
+ This file is part of GCC.
+
+ GCC is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ GCC is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef GCC_BPF_H
+#define GCC_BPF_H
+
+/**** Controlling the Compilation Driver. */
+
+#define ASM_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL}"
+#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL}"
+#define LIB_SPEC ""
+#define STARTFILE_SPEC ""
+
+/**** Run-time Target Specification. */
+
+#define TARGET_CPU_CPP_BUILTINS() bpf_target_macros (pfile)
+
+/**** Storage Layout. */
+
+/* Endianness and word size. */
+#define BITS_BIG_ENDIAN 0
+#define BYTES_BIG_ENDIAN (!TARGET_LITTLE_ENDIAN)
+#define WORDS_BIG_ENDIAN (!TARGET_LITTLE_ENDIAN)
+#define BITS_PER_WORD 64
+#define UNITS_PER_WORD 8
+
+/* This should not be needed, because ptr_mode, Pmode and word_mode
+ are all the same width. */
+#define POINTERS_EXTEND_UNSIGNED 1
+
+/* When storing an integer whose size is less than 64-bit in a
+ register, promote it to a DImode. */
+#define PROMOTE_MODE(M, UNSIGNEDP, TYPE) \
+ do \
+ { \
+ if (GET_MODE_CLASS (M) == MODE_INT \
+ && GET_MODE_SIZE (M) < 8) \
+ M = DImode; \
+ } while (0)
+
+/* Biggest alignment supported by the object file format of this
+ machine. In this case this is ELF. Use the same definition than
+ in elfos.h */
+#define MAX_OFILE_ALIGNMENT (((unsigned int) 1 << 28) * 8)
+
+/* Align argument parameters on the stack to 64-bit, at a minimum. */
+#define PARM_BOUNDARY 64
+
+/* The hardware enforces that the stack pointer should be aligned to
+ 64-bit at any time. */
+#define STACK_BOUNDARY 64
+
+/* Function entry points are aligned to 128 bits. */
+#define FUNCTION_BOUNDARY 128
+
+/* Maximum alignment required by data of any type. */
+#define BIGGEST_ALIGNMENT 64
+
+/* The load and store instructions won't work if the data is not in
+ it's expected alignment. */
+#define STRICT_ALIGNMENT 1
+
+/* We use Pmode as the mode of the size increment operand in an
+ `allocate_stack' pattern. */
+#define STACK_SIZE_MODE Pmode
+
+/**** Layout of Source Language Data Types. */
+
+#define INT_TYPE_SIZE 32
+#define SHORT_TYPE_SIZE 16
+#define LONG_TYPE_SIZE 64
+#define LONG_LONG_TYPE_SIZE 64
+#define CHAR_TYPE_SIZE 8
+#define FLOAT_TYPE_SIZE 32
+#define DOUBLE_TYPE_SIZE 64
+#define LONG_DOUBLE_TYPE_SIZE 64
+
+#define INTPTR_TYPE "long int"
+#define UINTPTR_TYPE "long unsigned int"
+#define SIZE_TYPE "long unsigned int"
+#define PTRDIFF_TYPE "long int"
+
+#define SIG_ATOMIC_TYPE "char"
+
+#define INT8_TYPE "char"
+#define INT16_TYPE "short int"
+#define INT32_TYPE "int"
+#define INT64_TYPE "long int"
+#define UINT8_TYPE "unsigned char"
+#define UINT16_TYPE "short unsigned int"
+#define UINT32_TYPE "unsigned int"
+#define UINT64_TYPE "long unsigned int"
+
+#define INT_LEAST8_TYPE INT8_TYPE
+#define INT_LEAST16_TYPE INT16_TYPE
+#define INT_LEAST32_TYPE INT32_TYPE
+#define INT_LEAST64_TYPE INT64_TYPE
+#define UINT_LEAST8_TYPE UINT8_TYPE
+#define UINT_LEAST16_TYPE UINT16_TYPE
+#define UINT_LEAST32_TYPE UINT32_TYPE
+#define UINT_LEAST64_TYPE UINT64_TYPE
+
+#define INT_FAST8_TYPE INT8_TYPE
+#define INT_FAST16_TYPE INT16_TYPE
+#define INT_FAST32_TYPE INT32_TYPE
+#define INT_FAST64_TYPE INT64_TYPE
+#define UINT_FAST8_TYPE UINT8_TYPE
+#define UINT_FAST16_TYPE UINT16_TYPE
+#define UINT_FAST32_TYPE UINT32_TYPE
+#define UINT_FAST64_TYPE UINT64_TYPE
+
+/* `char' is signed by default, like in x86. */
+#define DEFAULT_SIGNED_CHAR 1
+
+/* The widest floating-point format supported by the hardware is
+ 64-bit. */
+#define WIDEST_HARDWARE_FP_SIZE 64
+
+/* `wchar_t' is a signed 32-bit type. The second constant is used by
+ cpp, which can't use WCHAR_TYPE. */
+#define WCHAR_TYPE "int"
+#define WCHAR_TYPE_SIZE 32
+
+/* `wint_t' is a signed 32-bit type. */
+#define WINT_TYPE "int"
+#define WINT_TYPE_SIZE 32
+
+/**** Register Usage. */
+
+/*** Basic Characteristics of Registers. */
+
+#define BPF_R0 0
+#define BPF_R1 1
+#define BPF_R2 2
+#define BPF_R3 3
+#define BPF_R4 4
+#define BPF_R5 5
+#define BPF_R6 6
+#define BPF_CTX BPF_R6
+#define BPF_R7 7
+#define BPF_R8 8
+#define BPF_R9 9
+#define BPF_SP BPF_R9
+#define BPF_R10 10
+#define BPF_FP BPF_R10
+/* 11 is not a real eBPF hard register and is eliminated or not used
+ in the final assembler. See below. */
+
+#define FIRST_PSEUDO_REGISTER 12
+
+/* The registers %r0..%r8 are available for general allocation. */
+#define FIXED_REGISTERS \
+ {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1}
+
+/* %r0..%r5 are clobbered by function calls. */
+#define CALL_USED_REGISTERS \
+ {1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1}
+
+/*** Order of Allocation of Registers. */
+
+/* We generally want to put call-clobbered registers ahead of
+ call-saved ones. (IRA expects this.) */
+#define REG_ALLOC_ORDER \
+ {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
+
+/**** Register Classes. */
+
+enum reg_class
+{
+ NO_REGS, /* no registers in set. */
+ GR_REGS, /* general-purpose integer registers. */
+ ALL_REGS, /* all registers. */
+ LIM_REG_CLASSES /* max value + 1. */
+};
+
+#define N_REG_CLASSES (int) LIM_REG_CLASSES
+#define GENERAL_REGS GR_REGS
+
+/* An initializer containing the names of the register classes as C
+ string constants. These names are used in writing some of the
+ debugging dumps. */
+#define REG_CLASS_NAMES \
+{ \
+ "NO_REGS", \
+ "GR_REGS", \
+ "ALL_REGS" \
+}
+
+/* An initializer containing the contents of the register classes, as
+ integers which are bit masks. The Nth integer specifies the
+ contents of class N. The way the integer MASK is interpreted is
+ that register R is in the class if `MASK & (1 << R)' is 1. */
+#define REG_CLASS_CONTENTS \
+{ \
+ 0x00000000, /* NO_REGS */ \
+ 0x000007ff, /* GR_REGS */ \
+ 0x000007ff, /* ALL_REGS */ \
+}
+
+/* A C expression whose value is a register class containing hard
+ register REGNO. In general there is more that one such class;
+ choose a class which is "minimal", meaning that no smaller class
+ also contains the register. */
+#define REGNO_REG_CLASS(REGNO) ((REGNO) < 11 ? GR_REGS : ALL_REGS)
+
+/* A macro whose definition is the name of the class to which a
+ valid base register must belong. A base register is one used in
+ an address which is the register value plus a displacement. */
+#define BASE_REG_CLASS GR_REGS
+
+/* A macro whose definition is the name of the class to which a
+ valid index register must belong. An index register is one used
+ in an address where its value is either multiplied by a scale
+ factor or added to another register (as well as added to a
+ displacement). */
+#define INDEX_REG_CLASS GR_REGS
+
+/* C expression which is nonzero if register number REGNO is suitable
+ for use as a base register in operand addresses. In eBPF every
+ hard register can be used for this purpose. */
+#define REGNO_OK_FOR_BASE_P(REGNO) \
+ ((REGNO) < FIRST_PSEUDO_REGISTER \
+ || (unsigned)reg_renumber[REGNO] < FIRST_PSEUDO_REGISTER)
+
+/* C expression which is nonzero if register number REGNO is suitable
+ for use as an index register in operand addresses. */
+#define REGNO_OK_FOR_INDEX_P(REGNO) \
+ REGNO_OK_FOR_BASE_P(REGNO)
+
+/* It is safe to return CLASS here. No more restrictive class is
+ needed. */
+#define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS
+
+/* Maximum number of consecutive registers of class CLASS needed to
+ hold a value of mode MODE. */
+#define CLASS_MAX_NREGS(CLASS, MODE) \
+ (((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
+
+
+/**** Debugging Info ****/
+
+/* We cannot support DWARF2 because of the limitations of eBPF. */
+#define DBX_DEBUGGING_INFO
+
+/**** Stack Layout and Calling Conventions. */
+
+/*** Basic Stack Layout. */
+
+#define STACK_GROWS_DOWNWARD 1
+#define FRAME_GROWS_DOWNWARD 1
+
+/* The argument pointer always points to the first argument. */
+#define FIRST_PARM_OFFSET(FNDECL) 0
+
+/* Unsupported. */
+#define RETURN_ADDR_RTX(count, frame) const0_rtx
+
+/*** Registers That Address the Stack Frame. */
+
+#define FRAME_POINTER_REGNUM 10
+#define STACK_POINTER_REGNUM 9
+#define ARG_POINTER_REGNUM 11
+#define STATIC_CHAIN_REGNUM 8
+
+/*** Registers elimination. */
+
+#define ELIMINABLE_REGS \
+ {{ ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM }, \
+ { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM }}
+
+/* Define the offset between two registers, one to be eliminated, and
+ the other its replacement, at the start of a routine. */
+#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
+ do \
+ { \
+ (OFFSET) = bpf_initial_elimination_offset ((FROM), (TO)); \
+ } while (0)
+
+/*** Passing Function Arguments on the Stack. */
+
+/* The eBPF ABI doesn't support passing arguments on the stack. Only
+ in the first five registers. Code in bpf.c assures the stack is
+ never used when passing arguments. However, we still have to
+ define the constants below. */
+
+/* If nonzero, push insns will be used to pass outgoing arguments. */
+#define PUSH_ARGS 0
+
+/* If nonzero, function arguments will be evaluated from last to
+ first, rather than from first to last. */
+#define PUSH_ARGS_REVERSED 1
+
+/* Allocate stack space for arguments at the beginning of each
+ function. */
+#define ACCUMULATE_OUTGOING_ARGS 1
+
+/*** Passing Arguments in Registers. */
+
+/* Use an integer in order to keep track of the number of arguments
+ passed to a function in integer registers, up to
+ MAX_ARGS_IN_REGISTERS. */
+#define CUMULATIVE_ARGS int
+
+/* INIT_CUMULATIVE_ARGS initializes a variable CUM of type
+ CUMULATIVE_ARGS for a call to a function whose data type is FNTYPE.
+ For a library call, FNTYPE is 0. */
+#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,FNDECL,N_NAMED_ARGS) \
+ memset (&(CUM), 0, sizeof (CUM))
+
+/* Nonzero if N is the number of a hard register in which function
+ arguments are sometimes passed. */
+#define FUNCTION_ARG_REGNO_P(N) ((N) >= 1 && (N) <= 5)
+
+/*** How Scalar Function Values are Returned. */
+
+/* Define how to find the value returned by a library function
+ assuming the value has mode MODE. This is always %r0 for eBPF. */
+#define LIBCALL_VALUE(MODE) \
+ gen_rtx_REG ((MODE), 0)
+
+/*** Generating Code for Profiling. */
+
+/* We do not support profiling yet, so do not call `mcount'. */
+#define FUNCTION_PROFILER(FILE, LABELNO) do { } while (0)
+
+/*** Function Entry and Exit. */
+
+/* We do not require an accurate stack pointer at function return.
+ This is because the stack pointer's original value is initialized
+ from the frame pointer, rather than decreased, to satisfy the
+ kernel's verifier. Thus, we have to save the stack pointer in
+ function prologue and restore it in function epilogue. If
+ EXIT_IGNORE_STACK is not set, then superfluous instructions are
+ generated to save and restore the stack pointer after and before
+ the function epilogue, respectively. */
+#define EXIT_IGNORE_STACK 1
+
+/**** Support for Nested Functions. */
+
+/* We have to define TRAMPOLINE_SIZE even if we don't ever generate
+ them. Set to 64 arbitrarily. */
+#define TRAMPOLINE_SIZE 64
+
+/**** Addressing Modes. */
+
+/* Maximum number of registers that can appear in a valid memory
+ address. */
+#define MAX_REGS_PER_ADDRESS 1
+
+/* 1 if X is an rtx for a constant that is a valid address. */
+
+#define CONSTANT_ADDRESS_P(X) \
+ (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
+ || GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST)
+
+/**** Describing Relative Costs of Operations. */
+
+/* Cost of moving data of mode MODE from a register in class FROM to a
+ register in class TO. Note that 2 is the default. */
+#define REGISTER_MOVE_COST(MODE,FROM,TO) 2
+
+/* Cost of moving data of mode MODE between a register of class CLASS
+ and memory. IN is zero if the value is to be written to memory,
+ nonzero if it is to be read in. */
+#define MEMORY_MOVE_COST(MODE,CLASS,IN) 4
+
+/* Cost of a branch instruction. A value of 1 is the default. */
+#define BRANCH_COST(SPEED_P,PREDICTABLE_P) 1
+
+/* The SPARC port says: Nonzero if access to memory by bytes is slow
+ and undesirable. For RISC chips, it means that access to memory by
+ bytes is no better than access by words when possible, so grab a
+ whole word and maybe make use of that. */
+#define SLOW_BYTE_ACCESS 1
+
+/* Threshold of number of scalar memory-to-memory move instructions,
+ _below_ which a sequence of insns should be generated instead of a
+ string move insn or a library call. */
+#define MOVE_RATIO(speed) 128
+
+/* Threshold of number of scalar move instructions, _below_ which a
+ sequence of insns should be generated to clear memory instead of a
+ string clear insn or a library call. */
+#define CLEAR_RATIO(speed) 128
+
+/* Threshold of number of scalar move instructions, _below_ which a
+ sequence of insns should be generated to set memory to a constant
+ value, instead of a block set insn or a library call. */
+#define SET_RATIO(speed) 128
+
+/* True if it is as good or better to call a constant function address
+ than to call an address kept in a register. */
+#define NO_FUNCTION_CSE 1
+
+/**** Dividing the Output into Sections. */
+
+#define TEXT_SECTION_ASM_OP "\t.text"
+#define DATA_SECTION_ASM_OP "\t.data"
+#define BSS_SECTION_ASM_OP "\t.bss"
+#define COMMON_ASM_OP "\t.common\t"
+
+/**** Defining the Output Assembler Language. */
+
+/*** The Overall Framework of an Assembler File. */
+
+#define ASM_COMMENT_START ";"
+
+/* Output to assembler file text saying following lines
+ may contain character constants, extra white space, comments, etc. */
+
+#ifndef ASM_APP_ON
+#define ASM_APP_ON " #APP\n"
+#endif
+
+/* Output to assembler file text saying following lines
+ no longer contain unusual constructs. */
+
+#ifndef ASM_APP_OFF
+#define ASM_APP_OFF " #NO_APP\n"
+#endif
+
+/*** Output of Data. */
+
+/*** Output of Uninitialized Variables. */
+
+/* How to output an assembler line to define a local common
+ symbol. */
+
+#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
+ do \
+ { \
+ fprintf ((FILE), "%s", COMMON_ASM_OP); \
+ assemble_name ((FILE), (NAME)); \
+ fprintf ((FILE), ",%u,%u\n", (int)(SIZE), (ALIGN) / (BITS_PER_UNIT)); \
+ } \
+ while (0)
+
+/* A C statement (sans semicolon) to output to the stdio stream
+ FILE the assembler definition of uninitialized global DECL named
+ NAME whose size is SIZE bytes and alignment is ALIGN bytes.
+ Try to use asm_output_aligned_bss to implement this macro. */
+
+#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
+ do { \
+ ASM_OUTPUT_ALIGNED_LOCAL (FILE, NAME, SIZE, ALIGN); \
+ } while (0)
+
+/* This says how to output an assembler line to define a local common
+ symbol. */
+
+#define ASM_OUTPUT_ALIGNED_LOCAL(FILE,NAME,SIZE,ALIGN) \
+ ( fputs ("\t.lcomm ", (FILE)), \
+ assemble_name ((FILE), (NAME)), \
+ fprintf ((FILE), "," HOST_WIDE_INT_PRINT_UNSIGNED "\n", \
+ (SIZE), ((ALIGN) / BITS_PER_UNIT)))
+
+/*** Output and Generation of Labels. */
+
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.global\t"
+
+/* This is how to store into the string LABEL
+ the symbol_ref name of an internal numbered label where
+ PREFIX is the class of label and NUM is the number within the class.
+ This is suitable for output with `assemble_name'. */
+
+#undef ASM_GENERATE_INTERNAL_LABEL
+#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
+ sprintf ((LABEL), "*%s%s%ld", (LOCAL_LABEL_PREFIX), (PREFIX), (long)(NUM))
+
+/*** Macros Controlling Initialization Routines. */
+
+#define INIT_SECTION_ASM_OP "\t.init"
+#define FINI_SECTION_ASM_OP "\t.fini"
+
+/*** Output of Assembler Instructions. */
+
+#define REGISTER_NAMES \
+ { "%r0", "%r1", "%r2", "%r3", "%r4", "%r5", "%r6", "%r7", \
+ "%r8", "%r9", "%fp", "__arg__" }
+
+#define ADDITIONAL_REGISTER_NAMES \
+ { { "%a", 0 }, { "%ctx", 6 }, { "%r10" , 10 } }
+
+#define LOCAL_LABEL_PREFIX "."
+#define USER_LABEL_PREFIX ""
+
+#define PRINT_OPERAND(STREAM,X,CODE) \
+ bpf_print_operand ((STREAM),(X),(CODE))
+
+#define PRINT_OPERAND_ADDRESS(STREAM,X) \
+ bpf_print_operand_address ((STREAM), (X))
+
+/*** Assembler Commands for Alignment. */
+
+/* This is how to output an assembler line that says to advance the
+ location counter to a multiple of 2**LOG bytes. */
+#define ASM_OUTPUT_ALIGN(STREAM,LOG) \
+ fprintf (STREAM, "\t.align\t%d\n", (LOG))
+
+/* This is how to output an assembler line
+ that says to advance the location counter by SIZE bytes. */
+#define ASM_OUTPUT_SKIP(FILE,SIZE) \
+ fprintf (FILE, "\t.skip\t" HOST_WIDE_INT_PRINT_UNSIGNED "\n", (SIZE))
+
+/**** Miscellaneous Parameters. */
+
+/* Specify the machine mode that this machine uses for the index in
+ the tablejump instruction. */
+#define CASE_VECTOR_MODE DImode
+
+/* Define if operations between registers with integral mode smaller
+ than a word are always performed on the entire register. */
+#define WORD_REGISTER_OPERATIONS 1
+
+/* C expression indicating when insns that read memory in MEM_MODE, an
+ integral mode narrower than a word, set the bits outsize of
+ MEM_MODE to be either the sign-extension or the zero-extension of
+ the data read. */
+#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND
+
+/* The maximum number of bytes that a signle instruction can move
+ quickly between memory and registers or between two memory
+ locations. */
+#define MOVE_MAX 8
+
+/* An alias for the machine mode for pointers. */
+#define Pmode DImode
+
+/* An alias for the machine mode used for memory references to
+ functions being called, in 'call' RTL expressions. */
+#define FUNCTION_MODE Pmode
+
+/* No libm on eBPF (for now.) */
+#define MATH_LIBRARY ""
+
+/**** libgcc settings. */
+
+/* Iterating over the global constructors and destructors and
+ executing them requires the ability of doing indirect calls.
+
+ eBPF doesn't support indirect calls, so no chance of supporting
+ constructors and destructors. */
+#define DO_GLOBAL_CTORS_BODY \
+ do { } while (0)
+#define DO_GLOBAL_DTORS_BODY \
+ do { } while (0)
+
+#endif /* ! GCC_BPF_H */
diff --git a/gcc/config/bpf/bpf.md b/gcc/config/bpf/bpf.md
new file mode 100644
index 00000000000..6954a438c20
--- /dev/null
+++ b/gcc/config/bpf/bpf.md
@@ -0,0 +1,528 @@
+;; Machine description for eBPF.
+;; Copyright (C) 2019 Free Software Foundation, Inc.
+
+;; This file is part of GCC.
+
+;; GCC is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; GCC is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GCC; see the file COPYING3. If not see
+;; <http://www.gnu.org/licenses/>.
+
+(include "predicates.md")
+(include "constraints.md")
+
+;;;; Unspecs
+
+(define_c_enum "unspec" [
+ UNSPEC_LDINDABS
+ UNSPEC_XADD
+])
+
+;;;; Constants
+
+(define_constants
+ [(R0_REGNUM 0)
+ (R1_REGNUM 1)
+ (R2_REGNUM 2)
+ (R3_REGNUM 3)
+ (R4_REGNUM 4)
+ (R5_REGNUM 5)
+ (R6_REGNUM 6)
+ (R7_REGNUM 7)
+ (R8_REGNUM 8)
+ (R9_REGNUM 9)
+ (R10_REGNUM 10)
+ (R11_REGNUM 11)
+])
+
+;;;; Attributes
+
+;; Instruction classes.
+;; alu 64-bit arithmetic.
+;; alu32 32-bit arithmetic.
+;; end endianness conversion instructions.
+;; ld load instructions.
+;; lddx load 64-bit immediate instruction.
+;; ldx generic load instructions.
+;; st generic store instructions for immediates.
+;; stx generic store instructions.
+;; jmp jump instructions.
+;; xadd atomic exchange-and-add instructions.
+;; multi multiword sequence (or user asm statements).
+
+(define_attr "type"
+ "unknown,alu,alu32,end,ld,lddw,ldx,st,stx,jmp,xadd,multi"
+ (const_string "unknown"))
+
+;; Length of instruction in bytes.
+(define_attr "length" ""
+ (cond [
+ (eq_attr "type" "lddw") (const_int 16)
+ ] (const_int 8)))
+
+;; Describe a user's asm statement.
+(define_asm_attributes
+ [(set_attr "type" "multi")])
+
+;;;; Mode attributes and iterators
+
+(define_mode_attr mop [(QI "b") (HI "h") (SI "w") (DI "dw")
+ (SF "w") (DF "dw")])
+(define_mode_attr mtype [(SI "alu32") (DI "alu")])
+(define_mode_attr msuffix [(SI "32") (DI "")])
+
+;;;; NOPs
+
+(define_insn "nop"
+ [(const_int 0)]
+ ""
+ "mov\t%%r0,%%r0"
+ [(set_attr "type" "alu")])
+
+;;;; Arithmetic/Logical
+
+;; The arithmetic and logic operations below are defined for SI and DI
+;; modes. The mode iterator AM is used in order to expand to two
+;; insns, with the proper modes.
+;;
+;; 32-bit arithmetic (for SI modes) is implemented using the alu32
+;; instructions.
+
+(define_mode_iterator AM [SI DI])
+
+;;; Addition
+(define_insn "add<AM:mode>3"
+ [(set (match_operand:AM 0 "register_operand" "=r,r")
+ (plus:AM (match_operand:AM 1 "register_operand" " 0,0")
+ (match_operand:AM 2 "reg_or_imm_operand" " r,I")))]
+ "1"
+ "add<msuffix>\t%0,%2"
+ [(set_attr "type" "<mtype>")])
+
+;;; Subtraction
+(define_insn "sub<AM:mode>3"
+ [(set (match_operand:AM 0 "register_operand" "=r,r")
+ (plus:AM (match_operand:AM 1 "register_operand" " 0,0")
+ (match_operand:AM 2 "reg_or_imm_operand" " r,I")))]
+ "1"
+ "sub<msuffix>\t%0,%2"
+ [(set_attr "type" "<mtype>")])
+
+;;; Negation
+(define_insn "neg<AM:mode>2"
+ [(set (match_operand:AM 0 "register_operand" "=r")
+ (neg:AM (match_operand:AM 1 "register_operand" " 0")))]
+ ""
+ "neg<msuffix>\t%0"
+ [(set_attr "type" "<mtype>")])
+
+;;; Multiplication
+(define_insn "mul<AM:mode>3"
+ [(set (match_operand:AM 0 "register_operand" "=r,r")
+ (mult:AM (match_operand:AM 1 "register_operand" " 0,0")
+ (match_operand:AM 2 "reg_or_imm_operand" " r,I")))]
+ ""
+ "mul<msuffix>\t%0,%2"
+ [(set_attr "type" "<mtype>")])
+
+(define_insn "*mulsi3_extended"
+ [(set (match_operand:DI 0 "register_operand" "=r,r")
+ (sign_extend:DI
+ (mult:SI (match_operand:SI 1 "register_operand" "0,0")
+ (match_operand:SI 2 "reg_or_imm_operand" "r,I"))))]
+ ""
+ "mul32\t%0,%2"
+ [(set_attr "type" "alu32")])
+
+;; Division
+(define_insn "div<AM:mode>3"
+ [(set (match_operand:AM 0 "register_operand" "=r,r")
+ (div:AM (match_operand:AM 1 "register_operand" " 0,0")
+ (match_operand:AM 2 "reg_or_imm_operand" "r,I")))]
+ ""
+ "div<msuffix>\t%0,%2"
+ [(set_attr "type" "<mtype>")])
+
+(define_insn "udiv<AM:mode>3"
+ [(set (match_operand:AM 0 "register_operand" "=r,r")
+ (div:AM (match_operand:AM 1 "register_operand" " 0,0")
+ (match_operand:AM 2 "reg_or_imm_operand" "r,I")))]
+ ""
+ "div<msuffix>\t%0,%2"
+ [(set_attr "type" "<mtype>")])
+
+;;; Modulus
+(define_insn "mod<AM:mode>3"
+ [(set (match_operand:AM 0 "register_operand" "=r,r")
+ (mod:AM (match_operand:AM 1 "register_operand" " 0,0")
+ (match_operand:AM 2 "reg_or_imm_operand" "r,I")))]
+ ""
+ "mod<msuffix>\t%0,%2"
+ [(set_attr "type" "<mtype>")])
+
+(define_insn "umod<AM:mode>3"
+ [(set (match_operand:AM 0 "register_operand" "=r,r")
+ (mod:AM (match_operand:AM 1 "register_operand" " 0,0")
+ (match_operand:AM 2 "reg_or_imm_operand" "r,I")))]
+ ""
+ "mod<msuffix>\t%0,%2"
+ [(set_attr "type" "<mtype>")])
+
+;;; Logical AND
+(define_insn "and<AM:mode>3"
+ [(set (match_operand:AM 0 "register_operand" "=r,r")
+ (and:AM (match_operand:AM 1 "register_operand" " 0,0")
+ (match_operand:AM 2 "reg_or_imm_operand" "r,I")))]
+ ""
+ "and<msuffix>\t%0,%2"
+ [(set_attr "type" "<mtype>")])
+
+;;; Logical inclusive-OR
+(define_insn "ior<AM:mode>3"
+ [(set (match_operand:AM 0 "register_operand" "=r,r")
+ (ior:AM (match_operand:AM 1 "register_operand" " 0,0")
+ (match_operand:AM 2 "reg_or_imm_operand" "r,I")))]
+ ""
+ "or<msuffix>\t%0,%2"
+ [(set_attr "type" "<mtype>")])
+
+;;; Logical exclusive-OR
+(define_insn "xor<AM:mode>3"
+ [(set (match_operand:AM 0 "register_operand" "=r,r")
+ (xor:AM (match_operand:AM 1 "register_operand" " 0,0")
+ (match_operand:AM 2 "reg_or_imm_operand" "r,I")))]
+ ""
+ "xor<msuffix>\t%0,%2"
+ [(set_attr "type" "<mtype>")])
+
+;;;; Conversions
+
+;;; Zero-extensions
+
+;; For register operands smaller than 32-bit zero-extending is
+;; achieved ANDing the value in the source register to a suitable
+;; mask.
+;;
+;; For register operands bigger or equal than 32-bit, we generate a
+;; sequence of two shift instructions to zero the high 32-bits of the
+;; destination register.
+;;
+;; For memory operands, of any width, zero-extending is achieved using
+;; the ldx{bhwdw} instructions to load the values in registers.
+
+(define_insn "zero_extendhidi2"
+ [(set (match_operand:DI 0 "register_operand" "=r,r")
+ (zero_extend:DI (match_operand:HI 1 "reg_or_indirect_memory_operand" "r,m")))]
+ ""
+ "@
+ and\t%0,0xffff
+ ldxh\t%0,%1"
+ [(set_attr "type" "alu,ldx")])
+
+(define_insn "zero_extendqidi2"
+ [(set (match_operand:DI 0 "register_operand" "=r,r")
+ (zero_extend:DI (match_operand:QI 1 "reg_or_indirect_memory_operand" "r,m")))]
+ ""
+ "@
+ and\t%0,0xff
+ ldxb\t%0,%1"
+ [(set_attr "type" "alu,ldx")])
+
+(define_expand "zero_extendsidi2"
+ [(set (match_operand:DI 0 "register_operand" "=r,r")
+ (zero_extend:DI (match_operand:SI 1 "reg_or_indirect_memory_operand" "r,m")))]
+ ""
+{
+ if (register_operand (operands[1], SImode))
+ {
+ operands[1] = gen_lowpart (DImode, operands[1]);
+ emit_insn (gen_ashldi3 (operands[0], operands[1], GEN_INT (32)));
+ emit_insn (gen_lshrdi3 (operands[0], operands[0], GEN_INT (32)));
+ DONE;
+ }
+})
+
+(define_insn "*zero_extendsidi2"
+ [(set (match_operand:DI 0 "register_operand" "=r,r")
+ (zero_extend:DI (match_operand:SI 1 "reg_or_indirect_memory_operand" "0,m")))]
+ ""
+ "@
+ lsh\t%0,32\n\trsh\t%0,32
+ ldxw\t%0,%1"
+ [(set_attr "type" "alu,ldx")
+ (set_attr "length" "16,8")])
+
+;;; Sign-extension
+
+;; Sign-extending a 32-bit value into a 64-bit value is achieved using
+;; shifting, with instructions generated by the expand below.
+
+(define_expand "extendsidi2"
+ [(set (match_operand:DI 0 "register_operand" "=r")
+ (sign_extend:DI (match_operand:SI 1 "register_operand" "r")))]
+ ""
+{
+ operands[1] = gen_lowpart (DImode, operands[1]);
+ emit_insn (gen_ashldi3 (operands[0], operands[1], GEN_INT (32)));
+ emit_insn (gen_ashrdi3 (operands[0], operands[0], GEN_INT (32)));
+ DONE;
+})
+
+(define_insn "*extendsidi2"
+ [(set (match_operand:DI 0 "register_operand" "=r")
+ (sign_extend:DI (match_operand:SI 1 "register_operand" "0")))]
+ ""
+ "lsh\t%0,32\n\tarsh\t%0,32"
+ [(set_attr "type" "alu")
+ (set_attr "length" "16")])
+
+;;;; Data movement
+
+(define_mode_iterator AMM [QI HI SI DI SF DF])
+
+(define_expand "mov<AMM:mode>"
+ [(set (match_operand:AMM 0 "general_operand" "")
+ (match_operand:AMM 1 "general_operand" ""))]
+ ""
+ "
+{
+ if (!register_operand(operands[0], <AMM:MODE>mode)
+ && !register_operand(operands[1], <AMM:MODE>mode))
+ operands[1] = force_reg (<AMM:MODE>mode, operands[1]);
+
+ /* In cases where the moved entity is a constant address, we
+ need to emit an extra mov and modify the second operand to
+ obtain something like:
+
+ lddw %T, %1
+ ldxw %0, [%T+0]
+
+ Ditto for stores. */
+
+ if (MEM_P (operands[1])
+ && CONSTANT_ADDRESS_P (XEXP (operands[1], 0)))
+ {
+ rtx tmp = gen_reg_rtx (DImode);
+
+ emit_move_insn (tmp, XEXP (operands[1], 0));
+ operands[1] = gen_rtx_MEM (<AMM:MODE>mode, tmp);
+ }
+
+ if (MEM_P (operands[0])
+ && CONSTANT_ADDRESS_P (XEXP (operands[0], 0)))
+ {
+ rtx tmp = gen_reg_rtx (DImode);
+
+ emit_move_insn (tmp, XEXP (operands[0], 0));
+ operands[0] = gen_rtx_MEM (<AMM:MODE>mode, tmp);
+ }
+
+}")
+
+(define_mode_iterator MM [QI HI SI DI SF DF])
+
+(define_insn "*mov<MM:mode>"
+ [(set (match_operand:MM 0 "mov_dst_operand" "=r, r,r,m,m")
+ (match_operand:MM 1 "mov_src_operand" " m,rI,B,r,I"))]
+ ""
+ "@
+ ldx<mop>\t%0,%1
+ mov\t%0,%1
+ lddw\t%0,%1
+ stx<mop>\t%0,%1
+ st<mop>\t%0,%1"
+[(set_attr "type" "ldx,alu,alu,stx,st")])
+
+;;;; Shifts
+
+(define_mode_iterator SIM [SI DI])
+
+(define_insn "ashr<SIM:mode>3"
+ [(set (match_operand:SIM 0 "register_operand" "=r,r")
+ (ashiftrt:SIM (match_operand:SIM 1 "register_operand" " 0,0")
+ (match_operand:SIM 2 "reg_or_imm_operand" " r,I")))]
+ ""
+ "arsh<msuffix>\t%0,%2"
+ [(set_attr "type" "<mtype>")])
+
+(define_insn "ashl<SIM:mode>3"
+ [(set (match_operand:SIM 0 "register_operand" "=r,r")
+ (ashift:SIM (match_operand:SIM 1 "register_operand" " 0,0")
+ (match_operand:SIM 2 "reg_or_imm_operand" " r,I")))]
+ ""
+ "lsh<msuffix>\t%0,%2"
+ [(set_attr "type" "<mtype>")])
+
+(define_insn "lshr<SIM:mode>3"
+ [(set (match_operand:SIM 0 "register_operand" "=r,r")
+ (lshiftrt:SIM (match_operand:SIM 1 "register_operand" " 0,0")
+ (match_operand:SIM 2 "reg_or_imm_operand" " r,I")))]
+ ""
+ "rsh<msuffix>\t%0,%2"
+ [(set_attr "type" "<mtype>")])
+
+;;;; Conditional branches
+
+;; The eBPF jump instructions use 64-bit arithmetic when evaluating
+;; the jump conditions. Therefore we use DI modes below.
+
+(define_expand "cbranchdi4"
+ [(set (pc)
+ (if_then_else (match_operator 0 "comparison_operator"
+ [(match_operand:DI 1 "register_operand" "r")
+ (match_operand:DI 2 "reg_or_imm_operand" "rI")])
+ (label_ref (match_operand 3 "" ""))
+ (pc)))]
+ ""
+{
+ if (!ordered_comparison_operator (operands[0], VOIDmode))
+ FAIL;
+})
+
+(define_insn "*branch_on_di"
+ [(set (pc)
+ (if_then_else (match_operator 3 "ordered_comparison_operator"
+ [(match_operand:DI 0 "register_operand" "r")
+ (match_operand:DI 1 "reg_or_imm_operand" "rI")])
+ (label_ref (match_operand 2 "" ""))
+ (pc)))]
+ ""
+{
+ int code = GET_CODE (operands[3]);
+
+ switch (code)
+ {
+ case EQ: return "jeq\t%0,%1,%2"; break;
+ case NE: return "jne\t%0,%1,%2"; break;
+ case LT: return "jslt\t%0,%1,%2"; break;
+ case LE: return "jsle\t%0,%1,%2"; break;
+ case GT: return "jsgt\t%0,%1,%2"; break;
+ case GE: return "jsge\t%0,%1,%2"; break;
+ case LTU: return "jlt\t%0,%1,%2"; break;
+ case LEU: return "jle\t%0,%1,%2"; break;
+ case GTU: return "jgt\t%0,%1,%2"; break;
+ case GEU: return "jge\t%0,%1,%2"; break;
+ default:
+ error ("unknown comparison code %d in *branch_on_di\n", code);
+ return "";
+ }
+}
+ [(set_attr "type" "jmp")])
+
+;;;; Unconditional branches
+
+(define_insn "jump"
+ [(set (pc)
+ (label_ref (match_operand 0 "" "")))]
+ ""
+ "ja\t%0"
+[(set_attr "type" "jmp")])
+
+;;;; Function prologue/epilogue
+
+(define_insn "exit"
+ [(simple_return)]
+ ""
+ "exit"
+ [(set_attr "type" "jmp")])
+
+(define_expand "prologue"
+ [(const_int 0)]
+ ""
+{
+ bpf_expand_prologue ();
+ DONE;
+})
+
+(define_expand "epilogue"
+ [(const_int 0)]
+ ""
+{
+ bpf_expand_epilogue ();
+ DONE;
+})
+
+;;;; Function calls
+
+(define_insn "call"
+ [(call (match_operand:DI 0 "call_operand" "m")
+ (match_operand:SI 1 "general_operand" ""))]
+ ;; operands[2] is next_arg_register
+ ;; operands[3] is struct_value_size_rtx.
+ ""
+ { return bpf_output_call (operands[0]); }
+ [(set_attr "type" "jmp")])
+
+(define_insn "call_value"
+ [(set (match_operand 0 "register_operand" "")
+ (call (match_operand:DI 1 "call_operand" "m")
+ (match_operand:SI 2 "general_operand" "")))]
+ ;; operands[3] is next_arg_register
+ ;; operands[4] is struct_value_size_rtx.
+ ""
+ { return bpf_output_call (operands[1]); }
+ [(set_attr "type" "jmp")])
+
+(define_insn "sibcall"
+ [(call (label_ref (match_operand 0 "" ""))
+ (match_operand:SI 1 "general_operand" ""))]
+ ;; operands[2] is next_arg_register
+ ;; operands[3] is struct_value_size_rtx.
+ ""
+ "ja\t%0"
+ [(set_attr "type" "jmp")])
+
+;;;; Non-generic load instructions
+
+(define_mode_iterator LDM [QI HI SI DI])
+(define_mode_attr ldop [(QI "b") (HI "h") (SI "w") (DI "dw")])
+
+(define_insn "ldind<ldop>"
+ [(set (reg:LDM R0_REGNUM)
+ (unspec:LDM [(match_operand:DI 0 "register_operand" "r")
+ (match_operand:SI 1 "imm32_operand" "I")]
+ UNSPEC_LDINDABS))
+ (clobber (reg:DI R1_REGNUM))
+ (clobber (reg:DI R2_REGNUM))
+ (clobber (reg:DI R3_REGNUM))
+ (clobber (reg:DI R4_REGNUM))]
+ ""
+ "ldind<ldop>\t%0,%1"
+ [(set_attr "type" "ld")])
+
+(define_insn "ldabs<ldop>"
+ [(set (reg:LDM R0_REGNUM)
+ (unspec:LDM [(match_operand:SI 0 "imm32_operand" "I")
+ (match_operand:SI 1 "imm32_operand" "I")]
+ UNSPEC_LDINDABS))
+ (clobber (reg:DI R1_REGNUM))
+ (clobber (reg:DI R2_REGNUM))
+ (clobber (reg:DI R3_REGNUM))
+ (clobber (reg:DI R4_REGNUM))]
+ ""
+ "ldabs<ldop>\t%0"
+ [(set_attr "type" "ld")])
+
+;;;; Atomic increments
+
+(define_mode_iterator AMO [SI DI])
+
+(define_insn "atomic_add<AMO:mode>"
+ [(set (match_operand:AMO 0 "indirect_memory_operand" "+m")
+ (unspec_volatile:AMO
+ [(plus:AMO (match_dup 0)
+ (match_operand:AMO 1 "register_operand" "r"))
+ (match_operand:SI 2 "const_int_operand")] ;; Memory model.
+ UNSPEC_XADD))]
+ ""
+ "xadd<mop>\t%0,%1"
+ [(set_attr "type" "xadd")])
diff --git a/gcc/config/bpf/bpf.opt b/gcc/config/bpf/bpf.opt
new file mode 100644
index 00000000000..b04c8c8f504
--- /dev/null
+++ b/gcc/config/bpf/bpf.opt
@@ -0,0 +1,119 @@
+; Options for the eBPF compiler port.
+
+; Copyright (C) 2019 Free Software Foundation, Inc.
+;
+; This file is part of GCC.
+;
+; GCC is free software; you can redistribute it and/or modify it under
+; the terms of the GNU General Public License as published by the Free
+; Software Foundation; either version 3, or (at your option) any later
+; version.
+;
+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+; for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with GCC; see the file COPYING3. If not see
+; <http://www.gnu.org/licenses/>.
+
+HeaderInclude
+config/bpf/bpf-opts.h
+
+; Selecting the kind of kernel the eBPF will be running on.
+
+mkernel=
+Target RejectNegative Joined Var(bpf_kernel) Enum(bpf_kernel) Init(LINUX_LATEST)
+Generate eBPF for the given Linux kernel version.
+
+Enum
+Name(bpf_kernel) Type(enum bpf_kernel_version)
+
+EnumValue
+Enum(bpf_kernel) String(native) Value(LINUX_NATIVE) DriverOnly
+
+EnumVAlue
+Enum(bpf_kernel) String(latest) Value(LINUX_LATEST) DriverOnly
+
+EnumValue
+Enum(bpf_kernel) String(4.0) Value(LINUX_V4_0)
+
+EnumValue
+Enum(bpf_kernel) String(4.1) Value(LINUX_V4_1)
+
+EnumValue
+Enum(bpf_kernel) String(4.2) Value(LINUX_V4_2)
+
+EnumValue
+Enum(bpf_kernel) String(4.3) Value(LINUX_V4_3)
+
+EnumValue
+Enum(bpf_kernel) String(4.4) Value(LINUX_V4_4)
+
+EnumValue
+Enum(bpf_kernel) String(4.5) Value(LINUX_V4_5)
+
+EnumValue
+Enum(bpf_kernel) String(4.6) Value(LINUX_V4_6)
+
+EnumValue
+Enum(bpf_kernel) String(4.7) Value(LINUX_V4_7)
+
+EnumValue
+Enum(bpf_kernel) String(4.8) Value(LINUX_V4_8)
+
+EnumValue
+Enum(bpf_kernel) String(4.9) Value(LINUX_V4_9)
+
+EnumValue
+Enum(bpf_kernel) String(4.10) Value(LINUX_V4_10)
+
+EnumValue
+Enum(bpf_kernel) String(4.11) Value(LINUX_V4_11)
+
+EnumValue
+Enum(bpf_kernel) String(4.12) Value(LINUX_V4_12)
+
+EnumValue
+Enum(bpf_kernel) String(4.13) Value(LINUX_V4_13)
+
+EnumValue
+Enum(bpf_kernel) String(4.14) Value(LINUX_V4_14)
+
+EnumValue
+Enum(bpf_kernel) String(4.15) Value(LINUX_V4_15)
+
+EnumValue
+Enum(bpf_kernel) String(4.16) Value(LINUX_V4_16)
+
+EnumValue
+Enum(bpf_kernel) String(4.17) Value(LINUX_V4_17)
+
+EnumValue
+Enum(bpf_kernel) String(4.18) Value(LINUX_V4_18)
+
+EnumValue
+Enum(bpf_kernel) String(4.19) Value(LINUX_V4_19)
+
+EnumValue
+Enum(bpf_kernel) String(4.20) Value(LINUX_V4_20)
+
+EnumValue
+Enum(bpf_kernel) String(5.0) Value(LINUX_V5_0)
+
+EnumValue
+Enum(bpf_kernel) String(5.1) Value(LINUX_V5_1)
+
+EnumValue
+Enum(bpf_kernel) String(5.2) Value(LINUX_V5_2)
+
+; Selecting big endian or little endian targets.
+
+mbig-endian
+Target RejectNegative Report InverseMask(LITTLE_ENDIAN)
+Generate big-endian eBPF.
+
+mlittle-endian
+Target RejectNegative Report Mask(LITTLE_ENDIAN)
+Generate little-endian eBPF.
diff --git a/gcc/config/bpf/constraints.md b/gcc/config/bpf/constraints.md
new file mode 100644
index 00000000000..aa886d0c075
--- /dev/null
+++ b/gcc/config/bpf/constraints.md
@@ -0,0 +1,29 @@
+;; Constraint definitions for eBPF.
+;; Copyright (C) 2019 Free Software Foundation, Inc.
+;;
+;; This file is part of GCC.
+;;
+;; GCC is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+;;
+;; GCC is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GCC; see the file COPYING3. If not see
+;; <http://www.gnu.org/licenses/>.
+
+(define_constraint "I"
+ "A 32-bit signed immediate."
+ (and (match_code "const_int")
+ (match_test "IN_RANGE (ival, -1 - 0x7fffffff, 0x7fffffff)")))
+
+(define_constraint "B"
+ "A constant argument for LDDW."
+ (ior (match_code "const,symbol_ref,label_ref,const_double")
+ (and (match_code "const_int")
+ (match_test "IN_RANGE (ival, -1 - 0x7fffffffffffffff, 0x7fffffffffffffff)"))))
diff --git a/gcc/config/bpf/predicates.md b/gcc/config/bpf/predicates.md
new file mode 100644
index 00000000000..73cd2fe9b90
--- /dev/null
+++ b/gcc/config/bpf/predicates.md
@@ -0,0 +1,105 @@
+;; Predicate definitions for eBPF.
+;; Copyright (C) 2019 Free Software Foundation, Inc.
+;;
+;; This file is part of GCC.
+;;
+;; GCC is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+;;
+;; GCC is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GCC; see the file COPYING3. If not see
+;; <http://www.gnu.org/licenses/>.
+
+(define_predicate "reg_or_imm_operand"
+ (ior (and (match_code "const_int")
+ (match_test "IN_RANGE (INTVAL (op), -1 - 0x7fffffff, 0x7fffffff)"))
+ (match_operand 0 "register_operand")))
+
+(define_predicate "imm32_operand"
+ (ior (and (match_code "const_int")
+ (match_test "IN_RANGE (INTVAL (op), 0, 0xffffffff)"))
+ (match_code "symbol_ref,label_ref,const")))
+
+(define_predicate "lddw_operand"
+ (ior (and (match_code "const_int")
+ (match_test "IN_RANGE (INTVAL (op), 0, 0xffffffffffffffff)"))
+ (match_code "symbol_ref,label_ref,const,const_double")))
+
+(define_predicate "call_operand"
+ (match_code "mem")
+{
+ if (GET_CODE (op) != MEM)
+ return 0;
+
+ op = XEXP (op, 0);
+
+ if (GET_MODE (op) != mode
+ && GET_MODE (op) != VOIDmode
+ && mode != VOIDmode)
+ return 0;
+
+ switch (GET_CODE (op))
+ {
+ case REG:
+ case CONST_INT:
+ case SYMBOL_REF:
+ case LABEL_REF:
+ return 1;
+ break;
+ case CONST:
+ {
+ switch (GET_CODE (XEXP (op, 0)))
+ {
+ case SYMBOL_REF:
+ case LABEL_REF:
+ case CONST_INT:
+ return 1;
+ default:
+ break;
+ }
+ break;
+ }
+ default:
+ break;
+ }
+
+ return 0;
+})
+
+(define_predicate "indirect_memory_operand"
+ (match_operand 0 "memory_operand")
+{
+ if (GET_CODE (op) != MEM)
+ return 0;
+
+ op = XEXP (op, 0);
+
+ if (CONSTANT_ADDRESS_P (op))
+ return 0;
+
+ return 1;
+})
+
+(define_predicate "reg_or_indirect_memory_operand"
+ (ior (match_operand 0 "register_operand")
+ (match_operand 0 "indirect_memory_operand")))
+
+(define_predicate "mov_dst_operand"
+ (ior (match_operand 0 "register_operand")
+ (match_operand 0 "indirect_memory_operand")))
+
+(define_predicate "mov_src_operand"
+ (ior (match_operand 0 "indirect_memory_operand")
+ (match_operand 0 "reg_or_imm_operand")
+ (match_operand 0 "lddw_operand")))
+
+(define_predicate "register_compare_operator"
+ (match_code "eq,ne,geu,gtu,ge,gt"))
+
diff --git a/gcc/config/bpf/t-bpf b/gcc/config/bpf/t-bpf
new file mode 100644
index 00000000000..e69de29bb2d
--
2.11.0
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 1/8] Update config.sub and config.guess.
2019-08-17 0:51 ` [PATCH V2 1/8] Update config.sub and config.guess Jose E. Marchesi
@ 2019-08-19 1:26 ` Jeff Law
0 siblings, 0 replies; 223+ messages in thread
From: Jeff Law @ 2019-08-19 1:26 UTC (permalink / raw)
To: Jose E. Marchesi, gcc-patches
On 8/16/19 6:50 PM, Jose E. Marchesi wrote:
> * config.sub: Import upstream version 2019-06-30.
> * config.guess: Import upstream version 2019-07-24.
Similar to the runtimes and such where we're downstream resyncing to the
upstream sources is always OK in stage1. Feel free to commit whenever
you want.
jeff
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 3/8] bpf: new libgcc port
2019-08-17 0:51 ` [PATCH V2 3/8] bpf: new libgcc port Jose E. Marchesi
@ 2019-08-19 1:33 ` Jeff Law
2019-08-19 14:06 ` Jose E. Marchesi
0 siblings, 1 reply; 223+ messages in thread
From: Jeff Law @ 2019-08-19 1:33 UTC (permalink / raw)
To: Jose E. Marchesi, gcc-patches
On 8/16/19 6:50 PM, Jose E. Marchesi wrote:
> This patch adds an eBPF port to libgcc.
>
> As of today, compiled eBPF programs do not support a single-entry
> point schema. Instead, a BPF "executable" is a relocatable ELF object
> file containing multiple entry points, in certain named sections.
>
> Also, the BPF loaders in the kernel do not execute .ini/.fini
> constructors/destructors. Therefore, this patch provides empty crtn.S
> and cri.S files.
>
> libgcc/ChangeLog:
>
> * config.host: Set cpu_type for bpf-*-* targets.
> * config/bpf/t-bpf: Likewise.
> * config/bpf/crtn.S: Likewise.
> * config/bpf/crti.S: New file.
> diff --git a/libgcc/config/bpf/crti.S b/libgcc/config/bpf/crti.S
> new file mode 100644
> index 00000000000..e69de29bb2d
> diff --git a/libgcc/config/bpf/crtn.S b/libgcc/config/bpf/crtn.S
> new file mode 100644
> index 00000000000..e69de29bb2d
> diff --git a/libgcc/config/bpf/t-bpf b/libgcc/config/bpf/t-bpf
> new file mode 100644
> index 00000000000..c1bda7c98cb
> --- /dev/null
> +++ b/libgcc/config/bpf/t-bpf
> @@ -0,0 +1,24 @@
> +HOST_LIBGCC2_CFLAGS += -O0
> +LIB2ADDEH =
I'd like to understand the motivation behind the -O0, but otherwise I
don't see anything particularly concerning here.
Jeff
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 4/8] bpf: gcc.target eBPF testsuite
2019-08-17 0:51 ` [PATCH V2 4/8] bpf: gcc.target eBPF testsuite Jose E. Marchesi
@ 2019-08-19 1:36 ` Jeff Law
0 siblings, 0 replies; 223+ messages in thread
From: Jeff Law @ 2019-08-19 1:36 UTC (permalink / raw)
To: Jose E. Marchesi, gcc-patches
On 8/16/19 6:50 PM, Jose E. Marchesi wrote:
> This patch adds a new testsuite to gcc.target, with eBPF specific
> tests.
>
> Tests are included for:
> - Target specific diagnostics.
> - All built-in functions.
>
> testsuite/ChangeLog:
>
> * gcc.target/bpf/bpf.exp: New file.
> * gcc.target/bpf/builtin-load.c: Likewise.
> * cc.target/bpf/constant-calls.c: Likewise.
> * gcc.target/bpf/diag-funargs.c: Likewise.
> * cc.target/bpf/diag-indcalls.c: Likewise.
> * gcc.target/bpf/helper-bind.c: Likewise.
> * cc.target/bpf/helper-bpf-redirect.c: Likewise.
> * gcc.target/bpf/helper-clone-redirect.c: Likewise.
> * gcc.target/bpf/helper-csum-diff.c: Likewise.
> * gcc.target/bpf/helper-csum-update.c: Likewise.
> * gcc.target/bpf/helper-current-task-under-cgroup.c: Likewise.
> * gcc.target/bpf/helper-fib-lookup.c: Likewise.
> * gcc.target/bpf/helper-get-cgroup-classid.c: Likewise.
> * gcc.target/bpf/helper-get-current-cgroup-id.c: Likewise.
> * gcc.target/bpf/helper-get-current-comm.c: Likewise.
> * gcc.target/bpf/helper-get-current-pid-tgid.c: Likewise.
> * gcc.target/bpf/helper-get-current-task.c: Likewise.
> * gcc.target/bpf/helper-get-current-uid-gid.c: Likewise.
> * gcc.target/bpf/helper-get-hash-recalc.c: Likewise.
> * gcc.target/bpf/helper-get-listener-sock.c: Likewise.
> * gcc.target/bpf/helper-get-local-storage.c: Likewise.
> * gcc.target/bpf/helper-get-numa-node-id.c: Likewise.
> * gcc.target/bpf/helper-get-prandom-u32.c: Likewise.
> * gcc.target/bpf/helper-get-route-realm.c: Likewise.
> * gcc.target/bpf/helper-get-smp-processor-id.c: Likewise.
> * gcc.target/bpf/helper-get-socket-cookie.c: Likewise.
> * gcc.target/bpf/helper-get-socket-uid.c: Likewise.
> * gcc.target/bpf/helper-getsockopt.c: Likewise.
> * gcc.target/bpf/helper-get-stack.c: Likewise.
> * gcc.target/bpf/helper-get-stackid.c: Likewise.
> * gcc.target/bpf/helper-ktime-get-ns.c: Likewise.
> * gcc.target/bpf/helper-l3-csum-replace.c: Likewise.
> * gcc.target/bpf/helper-l4-csum-replace.c: Likewise.
> * gcc.target/bpf/helper-lwt-push-encap.c: Likewise.
> * gcc.target/bpf/helper-lwt-seg6-action.c: Likewise.
> * gcc.target/bpf/helper-lwt-seg6-adjust-srh.c: Likewise.
> * gcc.target/bpf/helper-lwt-seg6-store-bytes.c: Likewise.
> * gcc.target/bpf/helper-map-delete-elem.c: Likewise.
> * gcc.target/bpf/helper-map-lookup-elem.c: Likewise.
> * gcc.target/bpf/helper-map-peek-elem.c: Likewise.
> * gcc.target/bpf/helper-map-pop-elem.c: Likewise.
> * gcc.target/bpf/helper-map-push-elem.c: Likewise.
> * gcc.target/bpf/helper-map-update-elem.c: Likewise.
> * gcc.target/bpf/helper-msg-apply-bytes.c: Likewise.
> * gcc.target/bpf/helper-msg-cork-bytes.c: Likewise.
> * gcc.target/bpf/helper-msg-pop-data.c: Likewise.
> * gcc.target/bpf/helper-msg-pull-data.c: Likewise.
> * gcc.target/bpf/helper-msg-push-data.c: Likewise.
> * gcc.target/bpf/helper-msg-redirect-hash.c: Likewise.
> * gcc.target/bpf/helper-msg-redirect-map.c: Likewise.
> * gcc.target/bpf/helper-override-return.c: Likewise.
> * gcc.target/bpf/helper-perf-event-output.c: Likewise.
> * gcc.target/bpf/helper-perf-event-read.c: Likewise.
> * gcc.target/bpf/helper-perf-event-read-value.c: Likewise.
> * gcc.target/bpf/helper-perf-prog-read-value.c: Likewise.
> * gcc.target/bpf/helper-probe-read.c: Likewise.
> * gcc.target/bpf/helper-probe-read-str.c: Likewise.
> * gcc.target/bpf/helper-probe-write-user.c: Likewise.
> * gcc.target/bpf/helper-rc-keydown.c: Likewise.
> * gcc.target/bpf/helper-rc-pointer-rel.c: Likewise.
> * gcc.target/bpf/helper-rc-repeat.c: Likewise.
> * gcc.target/bpf/helper-redirect-map.c: Likewise.
> * gcc.target/bpf/helper-set-hash.c: Likewise.
> * gcc.target/bpf/helper-set-hash-invalid.c: Likewise.
> * gcc.target/bpf/helper-setsockopt.c: Likewise.
> * gcc.target/bpf/helper-skb-adjust-room.c: Likewise.
> * gcc.target/bpf/helper-skb-cgroup-id.c: Likewise.
> * gcc.target/bpf/helper-skb-change-head.c: Likewise.
> * gcc.target/bpf/helper-skb-change-proto.c: Likewise.
> * gcc.target/bpf/helper-skb-change-tail.c: Likewise.
> * gcc.target/bpf/helper-skb-change-type.c: Likewise.
> * gcc.target/bpf/helper-skb-ecn-set-ce.c: Likewise.
> * gcc.target/bpf/helper-skb-get-tunnel-key.c: Likewise.
> * gcc.target/bpf/helper-skb-get-tunnel-opt.c: Likewise.
> * gcc.target/bpf/helper-skb-get-xfrm-state.c: Likewise.
> * gcc.target/bpf/helper-skb-load-bytes.c: Likewise.
> * gcc.target/bpf/helper-skb-load-bytes-relative.c: Likewise.
> * gcc.target/bpf/helper-skb-pull-data.c: Likewise.
> * gcc.target/bpf/helper-skb-set-tunnel-key.c: Likewise.
> * gcc.target/bpf/helper-skb-set-tunnel-opt.c: Likewise.
> * gcc.target/bpf/helper-skb-store-bytes.c: Likewise.
> * gcc.target/bpf/helper-skb-under-cgroup.c: Likewise.
> * gcc.target/bpf/helper-skb-vlan-pop.c: Likewise.
> * gcc.target/bpf/helper-skb-vlan-push.c: Likewise.
> * gcc.target/bpf/helper-skc-lookup-tcp.c: Likewise.
> * gcc.target/bpf/helper-sk-fullsock.c: Likewise.
> * gcc.target/bpf/helper-sk-lookup-tcp.c: Likewise.
> * gcc.target/bpf/helper-sk-lookup-upd.c: Likewise.
> * gcc.target/bpf/helper-sk-redirect-hash.c: Likewise.
> * gcc.target/bpf/helper-sk-redirect-map.c: Likewise.
> * gcc.target/bpf/helper-sk-release.c: Likewise.
> * gcc.target/bpf/helper-sk-select-reuseport.c: Likewise.
> * gcc.target/bpf/helper-sk-storage-delete.c: Likewise.
> * gcc.target/bpf/helper-sk-storage-get.c: Likewise.
> * gcc.target/bpf/helper-sock-hash-update.c: Likewise.
> * gcc.target/bpf/helper-sock-map-update.c: Likewise.
> * gcc.target/bpf/helper-sock-ops-cb-flags-set.c: Likewise.
> * gcc.target/bpf/helper-spin-lock.c: Likewise.
> * gcc.target/bpf/helper-spin-unlock.c: Likewise.
> * gcc.target/bpf/helper-strtol.c: Likewise.
> * gcc.target/bpf/helper-strtoul.c: Likewise.
> * gcc.target/bpf/helper-sysctl-get-current-value.c: Likewise.
> * gcc.target/bpf/helper-sysctl-get-name.c: Likewise.
> * gcc.target/bpf/helper-sysctl-get-new-value.c: Likewise.
> * gcc.target/bpf/helper-sysctl-set-new-value.c: Likewise.
> * gcc.target/bpf/helper-tail-call.c: Likewise.
> * gcc.target/bpf/helper-tcp-check-syncookie.c: Likewise.
> * gcc.target/bpf/helper-tcp-sock.c: Likewise.
> * gcc.target/bpf/helper-trace-printk.c: Likewise.
> * gcc.target/bpf/helper-xdp-adjust-head.c: Likewise.
> * gcc.target/bpf/helper-xdp-adjust-meta.c: Likewise.
> * gcc.target/bpf/helper-xdp-adjust-tail.c: Likewise.
> * gcc.target/bpf/skb-ancestor-cgroup-id.c: Likewise.
> * gcc.target/bpf/sync-fetch-and-add.c: Likewise.
This is fine and can be installed once the port is approved.
jeff
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 5/8] bpf: make target-supports.exp aware of eBPF
2019-08-17 0:51 ` [PATCH V2 5/8] bpf: make target-supports.exp aware of eBPF Jose E. Marchesi
@ 2019-08-19 1:36 ` Jeff Law
2019-08-19 14:34 ` Jose E. Marchesi
2019-08-19 12:13 ` Segher Boessenkool
1 sibling, 1 reply; 223+ messages in thread
From: Jeff Law @ 2019-08-19 1:36 UTC (permalink / raw)
To: Jose E. Marchesi, gcc-patches
On 8/16/19 6:50 PM, Jose E. Marchesi wrote:
> This patch makes the several effective target checks in
> target-supports.exp to be aware of eBPF targets.
>
> gcc/testsuite/ChangeLog:
>
> * lib/target-supports.exp (check_effective_target_malloc): New
> function.
> (check_effective_target_trampolines): Adapt to eBPF.
> (check_effective_target_stack_size): Likewise.
> (dg-effective-target-value): Likewise.
> (check_effective_target_indirect_jumps): Likewise.
> (check_effective_target_nonlocal_goto): Likewise.
> (check_effective_target_global_constructor): Likewise.
> (check_effective_target_return_address): Likewise.
> ---
> gcc/testsuite/ChangeLog | 11 +++++++++++
> gcc/testsuite/lib/target-supports.exp | 27 +++++++++++++++++++--------
> 2 files changed, 30 insertions(+), 8 deletions(-)
>
> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
> index 300d22a2d65..8b6168626d8 100644
> --- a/gcc/testsuite/lib/target-supports.exp
> +++ b/gcc/testsuite/lib/target-supports.exp
>
> @@ -546,7 +550,11 @@ proc check_effective_target_stack_size { } {
> proc dg-effective-target-value { effective_target } {
> if { "$effective_target" == "stack_size" } {
> if [check_effective_target_stack_size] {
> - return [target_info gcc,stack_size]
> + if [istarget bpf-*-*] {
> + return "512"
> + } else {
> + return [target_info gcc,stack_size]
> + }
> }
> }
Shouldn't the BPF stack size be defined be in your target files?
The ChangeLog mentions check_effective_target_malloc, but I don't see it
in the patch itself. Note that it needs to be documented in
gcc/doc/sourcebuild.texi as well if you are adding a new
check_effective_target_<whatever>
jeff
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 6/8] bpf: adjust GCC testsuite to eBPF limitations
2019-08-17 0:51 ` [PATCH V2 6/8] bpf: adjust GCC testsuite to eBPF limitations Jose E. Marchesi
@ 2019-08-19 3:22 ` Jeff Law
2019-08-19 12:21 ` Segher Boessenkool
2019-08-19 15:11 ` Jose E. Marchesi
0 siblings, 2 replies; 223+ messages in thread
From: Jeff Law @ 2019-08-19 3:22 UTC (permalink / raw)
To: Jose E. Marchesi, gcc-patches
On 8/16/19 6:50 PM, Jose E. Marchesi wrote:
> This patch makes many tests in gcc.dg and gcc.c-torture to be skipped
> in bpf-*-* targets. This is due to the many limitations imposed by
> eBPF to what would be perfectly valid C code: no support for indirect
> calls, no support for more than 5 arguments to function calls, no
> support for indirect jumps, a very limited range for direct jumps, the
> stack limit, lack of standard header files, etc.
>
> Hopefully some of these restrictions will be relaxed in the future.
> In particular, I expect the stack limit will be significantly
> increased at some point. Also, as semantics associated with object
> linking get developed in eBPF, it may be possible at some point to
> provide a set of standard run-time libraries for eBPF programs.
>
> gcc/testsuite/ChangeLog:
>
> * gcc.dg/builtins-config.h: eBPF doesn't support C99 standard
> functions.
> * gcc.c-torture/compile/20000211-1.c: Skip if target bpf-*-*.
> * gcc.c-torture/compile/20000403-1.c: Likewise.
> * gcc.c-torture/compile/20000609-1.c: Likewise.
> * gcc.c-torture/compile/20000804-1.c: Likewise.
> * gcc.c-torture/compile/20001226-1.c: Likewise.
> * gcc.c-torture/compile/20010102-1.c: Likewise.
> * gcc.c-torture/compile/20010107-1.c: Likewise.
> * gcc.c-torture/compile/20011109-1.c: Likewise.
> * gcc.c-torture/compile/20011218-1.c: Likewise.
> * gcc.c-torture/compile/20011229-1.c: Likewise.
> * gcc.c-torture/compile/20020129-1.c: Likewise.
> * gcc.c-torture/compile/20020304-1.c: Likewise.
> * gcc.c-torture/compile/20020320-1.c: Likewise.
> * gcc.c-torture/compile/20020604-1.c: Likewise.
> * gcc.c-torture/compile/20020706-1.c: Likewise.
> * gcc.c-torture/compile/20020706-2.c: Likewise.
> * gcc.c-torture/compile/20021015-1.c: Likewise.
> * gcc.c-torture/compile/20021205-1.c: Likewise.
> * gcc.c-torture/compile/20030903-1.c: Likewise.
> * gcc.c-torture/compile/20030921-1.c: Likewise.
> * gcc.c-torture/compile/20031023-1.c: Likewise.
> * gcc.c-torture/compile/20031023-2.c: Likewise.
> * gcc.c-torture/compile/20031023-3.c: Likewise.
> * gcc.c-torture/compile/20031023-4.c: Likewise.
> * gcc.c-torture/compile/20031125-1.c: Likewise.
> * gcc.c-torture/compile/20040101-1.c: Likewise.
> * gcc.c-torture/compile/20040317-2.c: Likewise.
> * gcc.c-torture/compile/20040614-1.c: Likewise.
> * gcc.c-torture/compile/20040726-1.c: Likewise.
> * gcc.c-torture/compile/20040909-1.c: Likewise.
> * gcc.c-torture/compile/20050122-1.c: Likewise.
> * gcc.c-torture/compile/20050202-1.c: Likewise.
> * gcc.c-torture/compile/20050303-1.c: Likewise.
> * gcc.c-torture/compile/20050622-1.c: Likewise.
> * gcc.c-torture/compile/20051216-1.c: Likewise.
> * gcc.c-torture/compile/20060208-1.c: Likewise.
> * gcc.c-torture/compile/20060421-1.c: Likewise.
> * gcc.c-torture/compile/20071207-1.c: Likewise.
> * gcc.c-torture/compile/20080903-1.c: Likewise.
> * gcc.c-torture/compile/20081108-1.c: Likewise.
> * gcc.c-torture/compile/20101217-1.c: Likewise.
> * gcc.c-torture/compile/20121027-1.c: Likewise.
> * gcc.c-torture/compile/20150327.c: Likewise.
> * gcc.c-torture/compile/20151204.c: Likewise.
> * gcc.c-torture/compile/900313-1.c: Likewise.
> * gcc.c-torture/compile/920428-2.c: Likewise.
> * gcc.c-torture/compile/920501-12.c: Likewise.
> * gcc.c-torture/compile/920501-4.c: Likewise.
> * gcc.c-torture/compile/920501-7.c: Likewise.
> * gcc.c-torture/compile/920625-1.c: Likewise.
> * gcc.c-torture/compile/920723-1.c: Likewise.
> * gcc.c-torture/compile/920928-5.c: Likewise.
> * gcc.c-torture/compile/921202-1.c: Likewise.
> * gcc.c-torture/compile/930117-1.c: Likewise.
> * gcc.c-torture/compile/930421-1.c: Likewise.
> * gcc.c-torture/compile/930607-1.c: Likewise.
> * gcc.c-torture/compile/930623-1.c: Likewise.
> * gcc.c-torture/compile/931003-1.c: Likewise.
> * gcc.c-torture/compile/931004-1.c: Likewise.
> * gcc.c-torture/compile/950719-1.c: Likewise.
> * gcc.c-torture/compile/951222-1.c: Likewise.
> * gcc.c-torture/compile/961004-1.c: Likewise.
> * gcc.c-torture/compile/980504-1.c: Likewise.
> * gcc.c-torture/compile/980816-1.c: Likewise.
> * gcc.c-torture/compile/990517-1.c: Likewise.
> * gcc.c-torture/compile/990625-1.c: Likewise.
> * gcc.c-torture/compile/991213-2.c: Likewise.
> * gcc.c-torture/compile/DFcmp.c: Likewise.
> * gcc.c-torture/compile/HIcmp.c: Likewise.
> * gcc.c-torture/compile/HIset.c: Likewise.
> * gcc.c-torture/compile/QIcmp.c: Likewise.
> * gcc.c-torture/compile/QIset.c: Likewise.
> * gcc.c-torture/compile/SFset.c: Likewise.
> * gcc.c-torture/compile/SIcmp.c: Likewise.
> * gcc.c-torture/compile/SIset.c: Likewise.
> * gcc.c-torture/compile/UHIcmp.c: Likewise.
> * gcc.c-torture/compile/UQIcmp.c: Likewise.
> * gcc.c-torture/compile/USIcmp.c: Likewise.
> * gcc.c-torture/compile/bcopy.c: Likewise.
> * gcc.c-torture/compile/callind.c: Likewise.
> * gcc.c-torture/compile/calls-void.c: Likewise.
> * gcc.c-torture/compile/calls.c: Likewise.
> * gcc.c-torture/compile/consec.c: Likewise.
> * gcc.c-torture/compile/limits-fndefn.c: Likewise.
> * gcc.c-torture/compile/lll.c: Likewise.
> * gcc.c-torture/compile/parms.c: Likewise.
> * gcc.c-torture/compile/pass.c: Likewise.
> * gcc.c-torture/compile/poor.c: Likewise.
> * gcc.c-torture/compile/pp.c: Likewise.
> * gcc.c-torture/compile/pr21840.c: Likewise.
> * gcc.c-torture/compile/pr23929.c: Likewise.
> * gcc.c-torture/compile/pr25310.c: Likewise.
> * gcc.c-torture/compile/pr25311.c: Likewise.
> * gcc.c-torture/compile/pr32139.c: Likewise.
> * gcc.c-torture/compile/pr32399.c: Likewise.
> * gcc.c-torture/compile/pr34091.c: Likewise.
> * gcc.c-torture/compile/pr34458.c: Likewise.
> * gcc.c-torture/compile/pr34688.c: Likewise.
> * gcc.c-torture/compile/pr35607.c: Likewise.
> * gcc.c-torture/compile/pr37258.c: Likewise.
> * gcc.c-torture/compile/pr37327.c: Likewise.
> * gcc.c-torture/compile/pr37381.c: Likewise.
> * gcc.c-torture/compile/pr37433-1.c: Likewise.
> * gcc.c-torture/compile/pr37433.c: Likewise.
> * gcc.c-torture/compile/pr37669-2.c: Likewise.
> * gcc.c-torture/compile/pr37669.c: Likewise.
> * gcc.c-torture/compile/pr37742-3.c: Likewise.
> * gcc.c-torture/compile/pr39937.c: Likewise.
> * gcc.c-torture/compile/pr39941.c: Likewise.
> * gcc.c-torture/compile/pr40080.c: Likewise.
> * gcc.c-torture/compile/pr41181.c: Likewise.
> * gcc.c-torture/compile/pr41634.c: Likewise.
> * gcc.c-torture/compile/pr43415.c: Likewise.
> * gcc.c-torture/compile/pr43417.c: Likewise.
> * gcc.c-torture/compile/pr43635.c: Likewise.
> * gcc.c-torture/compile/pr43791.c: Likewise.
> * gcc.c-torture/compile/pr43845.c: Likewise.
> * gcc.c-torture/compile/pr44043.c: Likewise.
> * gcc.c-torture/compile/pr44063.c: Likewise.
> * gcc.c-torture/compile/pr44788.c: Likewise.
> * gcc.c-torture/compile/pr48596.c: Likewise.
> * gcc.c-torture/compile/pr51694.c: Likewise.
> * gcc.c-torture/compile/pr51856.c: Likewise.
> * gcc.c-torture/compile/pr52750.c: Likewise.
> * gcc.c-torture/compile/pr54713-1.c: Likewise.
> * gcc.c-torture/compile/pr54713-2.c: Likewise.
> * gcc.c-torture/compile/pr54713-3.c: Likewise.
> * gcc.c-torture/compile/pr55921.c: Likewise.
> * gcc.c-torture/compile/pr70240.c: Likewise.
> * gcc.c-torture/compile/pr70355.c: Likewise.
> * gcc.c-torture/compile/pr77754-2.c: Likewise.
> * gcc.c-torture/compile/pr77754-3.c: Likewise.
> * gcc.c-torture/compile/pr77754-4.c: Likewise.
> * gcc.c-torture/compile/pr82052.c: Likewise.
> * gcc.c-torture/compile/pr83487.c: Likewise.
> * gcc.c-torture/compile/pr86122.c: Likewise.
> * gcc.c-torture/compile/pr89280.c: Likewise.
> * gcc.c-torture/compile/pr89663-2.c: Likewise.
> * gcc.c-torture/compile/pret-arg.c: Likewise.
> * gcc.c-torture/compile/pta-1.c: Likewise.
> * gcc.c-torture/compile/regs-arg-size.c: Likewise.
> * gcc.c-torture/compile/sound.c: Likewise.
> * gcc.c-torture/compile/stack-check-1.c: Likewise.
> * gcc.c-torture/compile/structret.c: Likewise.
> * gcc.c-torture/compile/uuarg.c: Likewise.
> * gcc.dg/20001009-1.c: Likewise.
> * gcc.dg/20020418-1.c: Likewise.
> * gcc.dg/20020426-2.c: Likewise.
> * gcc.dg/20020430-1.c: Likewise.
> * gcc.dg/20040306-1.c: Likewise.
> * gcc.dg/20040622-2.c: Likewise.
> * gcc.dg/20050603-2.c: Likewise.
> * gcc.dg/20050629-1.c: Likewise.
> * gcc.dg/20061026.c: Likewise.
> * gcc.dg/Walloc-size-larger-than-18.c: Likewise.
> * gcc.dg/Warray-bounds-3.c: Likewise.
> * gcc.dg/Warray-bounds-30.c: Likewise.
> * gcc.dg/Wframe-larger-than-2.c: Likewise.
> * gcc.dg/Wframe-larger-than.c: Likewise.
> * gcc.dg/Wrestrict-11.c: Likewise.
So I think we probably want an effective target check for indirect calls
rather than checking explicitly for ebpf in all these files.
It also seems like rather than checking for ebpf on files with large
stacks, we should be using the generic mechanisms to defined the allowed
size of the stack (mentioned in prior review) & mark test which use too
much space. This would almost certainly help other embedded targets as
well.
Not sure the best way to deal with too many arguments. I suspect we
want an efffective target check for that. Keeping this up-to-date will
be painful as people write more tests.
/* Copyright (C) 2000, 2003 Free Software Foundation */
> __complex__ long long f ()
> diff --git a/gcc/testsuite/gcc.c-torture/compile/20001226-1.c b/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
> index be0bdcf7631..9f6bd0af2e5 100644
> --- a/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
> +++ b/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
> @@ -3,6 +3,7 @@
> /* { dg-skip-if "too much code for pdp11" { "pdp11-*-*" } } */
> /* { dg-xfail-if "PR36698" { spu-*-* } { "-O0" } { "" } } */
> /* { dg-skip-if "" { m32c-*-* } } */
> +/* { dg-skip-if "jumps too far for eBPF" { bpf-*-* } } */
> /* { dg-timeout-factor 4.0 } */
Jumps too far is probably an indication you need to fix something in
your port. Though I guess its OK if you're never going to support far
away targets.
>
> diff --git a/gcc/testsuite/gcc.c-torture/compile/20101217-1.c b/gcc/testsuite/gcc.c-torture/compile/20101217-1.c
> index c4eef0ed464..cd902afe709 100644
> --- a/gcc/testsuite/gcc.c-torture/compile/20101217-1.c
> +++ b/gcc/testsuite/gcc.c-torture/compile/20101217-1.c
> @@ -1,3 +1,5 @@
> +/* { dg-skip-if "no usable stdio.h for eBPF" { bpf-*-* } } */
I think this is only to get the printf prototype. I suspect you could
just provide a suitable prototype and drop the #include <stdio.h>.
Jeff
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 7/8] bpf: manual updates for eBPF
2019-08-17 0:51 ` [PATCH V2 7/8] bpf: manual updates for eBPF Jose E. Marchesi
@ 2019-08-19 6:15 ` Jeff Law
0 siblings, 0 replies; 223+ messages in thread
From: Jeff Law @ 2019-08-19 6:15 UTC (permalink / raw)
To: Jose E. Marchesi, gcc-patches
On 8/16/19 6:50 PM, Jose E. Marchesi wrote:
> gcc/ChangeLog:
>
> * doc/invoke.texi (Option Summary): Cover eBPF.
> (eBPF Options): New section.
> * doc/extend.texi (BPF Built-in Functions): Likewise.
> (BPF Kernel Helpers): Likewise.
This is likely fine once the port as a whole is accepted.
jeff
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 8/8] bpf: add myself as the maintainer for the eBPF port
2019-08-17 0:59 ` [PATCH V2 8/8] bpf: add myself as the maintainer for the eBPF port Jose E. Marchesi
@ 2019-08-19 6:26 ` Jeff Law
2019-08-19 12:45 ` Segher Boessenkool
1 sibling, 0 replies; 223+ messages in thread
From: Jeff Law @ 2019-08-19 6:26 UTC (permalink / raw)
To: Jose E. Marchesi, gcc-patches
On 8/16/19 6:50 PM, Jose E. Marchesi wrote:
> ChangeLog:
>
> * MAINTAINERS: Add myself as the maintainer for the eBPF port.
Will need steering committee approval, but I don't see that being
problematical.
jeff
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 5/8] bpf: make target-supports.exp aware of eBPF
2019-08-17 0:51 ` [PATCH V2 5/8] bpf: make target-supports.exp aware of eBPF Jose E. Marchesi
2019-08-19 1:36 ` Jeff Law
@ 2019-08-19 12:13 ` Segher Boessenkool
2019-08-19 14:44 ` Jose E. Marchesi
1 sibling, 1 reply; 223+ messages in thread
From: Segher Boessenkool @ 2019-08-19 12:13 UTC (permalink / raw)
To: Jose E. Marchesi; +Cc: gcc-patches
Hi Jose,
On Sat, Aug 17, 2019 at 02:50:53AM +0200, Jose E. Marchesi wrote:
> --- a/gcc/testsuite/lib/target-supports.exp
> +++ b/gcc/testsuite/lib/target-supports.exp
> @@ -526,7 +526,8 @@ proc check_effective_target_trampolines { } {
> || [istarget nvptx-*-*]
> || [istarget hppa2.0w-hp-hpux11.23]
> || [istarget hppa64-hp-hpux11.23]
> - || [istarget pru-*-*] } {
> + || [istarget pru-*-*]
> + || [istarget bpf-*-*] } {
There is some whitespace damage here.
> @@ -538,6 +539,9 @@ proc check_effective_target_stack_size { } {
> if [target_info exists gcc,stack_size] {
> return 1
> }
> + if [istarget bpf-*-*] {
> + return 1
> + }
You should still set the proper stack size in your board file, so does
this help you at all?
> @@ -546,7 +550,11 @@ proc check_effective_target_stack_size { } {
> proc dg-effective-target-value { effective_target } {
> if { "$effective_target" == "stack_size" } {
> if [check_effective_target_stack_size] {
> - return [target_info gcc,stack_size]
> + if [istarget bpf-*-*] {
> + return "512"
> + } else {
> + return [target_info gcc,stack_size]
> + }
Yeah okay... Can't you directly override the gcc,stack_size setting,
instead of doing that in every(?) place it is checked?
Segher
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 6/8] bpf: adjust GCC testsuite to eBPF limitations
2019-08-19 3:22 ` Jeff Law
@ 2019-08-19 12:21 ` Segher Boessenkool
2019-08-19 15:11 ` Jose E. Marchesi
1 sibling, 0 replies; 223+ messages in thread
From: Segher Boessenkool @ 2019-08-19 12:21 UTC (permalink / raw)
To: Jeff Law; +Cc: Jose E. Marchesi, gcc-patches
On Sun, Aug 18, 2019 at 07:33:20PM -0600, Jeff Law wrote:
> On 8/16/19 6:50 PM, Jose E. Marchesi wrote:
> So I think we probably want an effective target check for indirect calls
> rather than checking explicitly for ebpf in all these files.
+1
> It also seems like rather than checking for ebpf on files with large
> stacks, we should be using the generic mechanisms to defined the allowed
> size of the stack (mentioned in prior review) & mark test which use too
> much space. This would almost certainly help other embedded targets as
> well.
+2
> Not sure the best way to deal with too many arguments. I suspect we
> want an efffective target check for that. Keeping this up-to-date will
> be painful as people write more tests.
You could add a command line option to *allow* many args. You wouldn't
use that in the kernel, but it helps (compiler) testing a lot.
You could do something similar for indirect jumps, and bigger stack size,
etc.
Segher
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 8/8] bpf: add myself as the maintainer for the eBPF port
2019-08-17 0:59 ` [PATCH V2 8/8] bpf: add myself as the maintainer for the eBPF port Jose E. Marchesi
2019-08-19 6:26 ` Jeff Law
@ 2019-08-19 12:45 ` Segher Boessenkool
1 sibling, 0 replies; 223+ messages in thread
From: Segher Boessenkool @ 2019-08-19 12:45 UTC (permalink / raw)
To: Jose E. Marchesi; +Cc: gcc-patches
On Sat, Aug 17, 2019 at 02:50:56AM +0200, Jose E. Marchesi wrote:
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 5d8402949bc..bcf81e8f337 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -57,6 +57,7 @@ arm port Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
> arm port Kyrylo Tkachov <kyrylo.tkachov@arm.com>
> avr port Denis Chertykov <chertykov@gmail.com>
> bfin port Jie Zhang <jzhang918@gmail.com>
> +bpf port Jose E. Marchesi <jose.marchesi@oracle.com>
> c6x port Bernd Schmidt <bernds_cb1@t-online.de>
> cris port Hans-Peter Nilsson <hp@axis.com>
> c-sky port Xianmiao Qu <xianmiao_qu@c-sky.com>
Don't forget to remove yourself from the Write After Approval section,
when you commit this.
Segher
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 3/8] bpf: new libgcc port
2019-08-19 1:33 ` Jeff Law
@ 2019-08-19 14:06 ` Jose E. Marchesi
0 siblings, 0 replies; 223+ messages in thread
From: Jose E. Marchesi @ 2019-08-19 14:06 UTC (permalink / raw)
To: Jeff Law; +Cc: gcc-patches
Hi Jeff.
First of all, thanks for reviewing the port.
> +++ b/libgcc/config/bpf/t-bpf
> @@ -0,0 +1,24 @@
> +HOST_LIBGCC2_CFLAGS += -O0
> +LIB2ADDEH =
I'd like to understand the motivation behind the -O0, but otherwise I
don't see anything particularly concerning here.
Oh that's a reminiscency from earlier development stages when libgcc
wouldn't built with -O2. I just removed it and everything builds ok.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 5/8] bpf: make target-supports.exp aware of eBPF
2019-08-19 1:36 ` Jeff Law
@ 2019-08-19 14:34 ` Jose E. Marchesi
0 siblings, 0 replies; 223+ messages in thread
From: Jose E. Marchesi @ 2019-08-19 14:34 UTC (permalink / raw)
To: Jeff Law; +Cc: gcc-patches
> --- a/gcc/testsuite/lib/target-supports.exp
> +++ b/gcc/testsuite/lib/target-supports.exp
>
> @@ -546,7 +550,11 @@ proc check_effective_target_stack_size { } {
> proc dg-effective-target-value { effective_target } {
> if { "$effective_target" == "stack_size" } {
> if [check_effective_target_stack_size] {
> - return [target_info gcc,stack_size]
> + if [istarget bpf-*-*] {
> + return "512"
> + } else {
> + return [target_info gcc,stack_size]
> + }
> }
> }
Shouldn't the BPF stack size be defined be in your target files?
Yes, definitely. I am adding a board description to dejagnu. Will
set_board_info gcc,stack_size 512 there and remove this nasty overwrite
in dg-effective-target-value.
The ChangeLog mentions check_effective_target_malloc, but I don't see it
in the patch itself. Note that it needs to be documented in
gcc/doc/sourcebuild.texi as well if you are adding a new
check_effective_target_<whatever>
Oh at some point I introduced a check_effective_target_malloc, then
removed it. What you saw is a stale reference in the ChangeLog. Will
get rid of it.
Thanks!
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 5/8] bpf: make target-supports.exp aware of eBPF
2019-08-19 12:13 ` Segher Boessenkool
@ 2019-08-19 14:44 ` Jose E. Marchesi
0 siblings, 0 replies; 223+ messages in thread
From: Jose E. Marchesi @ 2019-08-19 14:44 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: gcc-patches
Hi Seguer! Thanks for reviewing :)
> @@ -538,6 +539,9 @@ proc check_effective_target_stack_size { } {
> if [target_info exists gcc,stack_size] {
> return 1
> }
> + if [istarget bpf-*-*] {
> + return 1
> + }
You should still set the proper stack size in your board file, so does
this help you at all?
> @@ -546,7 +550,11 @@ proc check_effective_target_stack_size { } {
> proc dg-effective-target-value { effective_target } {
> if { "$effective_target" == "stack_size" } {
> if [check_effective_target_stack_size] {
> - return [target_info gcc,stack_size]
> + if [istarget bpf-*-*] {
> + return "512"
> + } else {
> + return [target_info gcc,stack_size]
> + }
Yeah okay... Can't you directly override the gcc,stack_size setting,
instead of doing that in every(?) place it is checked?
Yes I agree these things belong to the board configuration files, so I
will remove that ad-hoc logic from the patch.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 6/8] bpf: adjust GCC testsuite to eBPF limitations
2019-08-19 3:22 ` Jeff Law
2019-08-19 12:21 ` Segher Boessenkool
@ 2019-08-19 15:11 ` Jose E. Marchesi
2019-08-19 19:57 ` Jeff Law
1 sibling, 1 reply; 223+ messages in thread
From: Jose E. Marchesi @ 2019-08-19 15:11 UTC (permalink / raw)
To: Jeff Law; +Cc: gcc-patches
[...]
> * gcc.dg/Wframe-larger-than-2.c: Likewise.
> * gcc.dg/Wframe-larger-than.c: Likewise.
> * gcc.dg/Wrestrict-11.c: Likewise.
So I think we probably want an effective target check for indirect calls
rather than checking explicitly for ebpf in all these files.
Ok, will introduce it.
It also seems like rather than checking for ebpf on files with large
stacks, we should be using the generic mechanisms to defined the allowed
size of the stack (mentioned in prior review) & mark test which use too
much space. This would almost certainly help other embedded targets as
well.
I first thought about doing that, but hesitated when I realized it would
require to alter existing tests in no trivial ways: will the test still
effectively test whatever it is supposed to test, after the size of an
array is changed, for example?
Not sure the best way to deal with too many arguments. I suspect we
want an efffective target check for that. Keeping this up-to-date will
be painful as people write more tests.
Yeah, that won't be fun :(
/* Copyright (C) 2000, 2003 Free Software Foundation */
> __complex__ long long f ()
> diff --git a/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
> b/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
> index be0bdcf7631..9f6bd0af2e5 100644
> --- a/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
> +++ b/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
> @@ -3,6 +3,7 @@
> /* { dg-skip-if "too much code for pdp11" { "pdp11-*-*" } } */
> /* { dg-xfail-if "PR36698" { spu-*-* } { "-O0" } { "" } } */
> /* { dg-skip-if "" { m32c-*-* } } */
> +/* { dg-skip-if "jumps too far for eBPF" { bpf-*-* } } */
> /* { dg-timeout-factor 4.0 } */
Jumps too far is probably an indication you need to fix something in
your port. Though I guess its OK if you're never going to support far
away targets.
The reasons for this are that eBPF doesn't have indirect jump
instructions, and the direct jump instruction's displacement is a signed
PC-relative 16-bit offset, in 64-bit word units.
So, unless the compiler gets able to generate a "chain" of direct jumps
to reach the destination (that would be a fun hack :D) the range for
branches is severely limited.
> diff --git a/gcc/testsuite/gcc.c-torture/compile/20101217-1.c
> b/gcc/testsuite/gcc.c-torture/compile/20101217-1.c
> index c4eef0ed464..cd902afe709 100644
> --- a/gcc/testsuite/gcc.c-torture/compile/20101217-1.c
> +++ b/gcc/testsuite/gcc.c-torture/compile/20101217-1.c
> @@ -1,3 +1,5 @@
> +/* { dg-skip-if "no usable stdio.h for eBPF" { bpf-*-* } } */
I think this is only to get the printf prototype. I suspect you could
just provide a suitable prototype and drop the #include <stdio.h>.
Nice, will do just that.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 6/8] bpf: adjust GCC testsuite to eBPF limitations
2019-08-19 15:11 ` Jose E. Marchesi
@ 2019-08-19 19:57 ` Jeff Law
[not found] ` <(Jeff>
0 siblings, 1 reply; 223+ messages in thread
From: Jeff Law @ 2019-08-19 19:57 UTC (permalink / raw)
To: Jose E. Marchesi; +Cc: gcc-patches
On 8/19/19 8:23 AM, Jose E. Marchesi wrote:
>
> [...]
> > * gcc.dg/Wframe-larger-than-2.c: Likewise.
> > * gcc.dg/Wframe-larger-than.c: Likewise.
> > * gcc.dg/Wrestrict-11.c: Likewise.
> So I think we probably want an effective target check for indirect calls
> rather than checking explicitly for ebpf in all these files.
>
> Ok, will introduce it.
>
> It also seems like rather than checking for ebpf on files with large
> stacks, we should be using the generic mechanisms to defined the allowed
> size of the stack (mentioned in prior review) & mark test which use too
> much space. This would almost certainly help other embedded targets as
> well.
>
> I first thought about doing that, but hesitated when I realized it would
> require to alter existing tests in no trivial ways: will the test still
> effectively test whatever it is supposed to test, after the size of an
> array is changed, for example?
I think you just add something like
/* dg-require-stack-size "<size>" */
Assuming that's right you don't have to worry about changing the test
itself and potentially changing its meaning.
I wouldn't necessarily try to figure the exact size needed by each test.
A reasonable guesstimation ought to be sufficient.
>
> Not sure the best way to deal with too many arguments. I suspect we
> want an efffective target check for that. Keeping this up-to-date will
> be painful as people write more tests.
>
> Yeah, that won't be fun :(
>
> /* Copyright (C) 2000, 2003 Free Software Foundation */
> > __complex__ long long f ()
> > diff --git a/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
> > b/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
> > index be0bdcf7631..9f6bd0af2e5 100644
> > --- a/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
> > +++ b/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
> > @@ -3,6 +3,7 @@
> > /* { dg-skip-if "too much code for pdp11" { "pdp11-*-*" } } */
> > /* { dg-xfail-if "PR36698" { spu-*-* } { "-O0" } { "" } } */
> > /* { dg-skip-if "" { m32c-*-* } } */
> > +/* { dg-skip-if "jumps too far for eBPF" { bpf-*-* } } */
> > /* { dg-timeout-factor 4.0 } */
> Jumps too far is probably an indication you need to fix something in
> your port. Though I guess its OK if you're never going to support far
> away targets.
>
> The reasons for this are that eBPF doesn't have indirect jump
> instructions, and the direct jump instruction's displacement is a signed
> PC-relative 16-bit offset, in 64-bit word units.
>
> So, unless the compiler gets able to generate a "chain" of direct jumps
> to reach the destination (that would be a fun hack :D) the range for
> branches is severely limited.
OK. Perhaps another effective target check. Or leave this one with
the epf check.
jeff
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 2/8] bpf: new GCC port
2019-08-17 2:39 ` [PATCH V2 2/8] bpf: new GCC port Jose E. Marchesi
@ 2019-08-19 20:20 ` Richard Sandiford
2019-08-20 14:56 ` Jose E. Marchesi
` (2 more replies)
2019-08-20 20:32 ` Jeff Law
2019-08-23 19:19 ` Joseph Myers
2 siblings, 3 replies; 223+ messages in thread
From: Richard Sandiford @ 2019-08-19 20:20 UTC (permalink / raw)
To: Jose E. Marchesi; +Cc: Jose E. Marchesi, gcc-patches
In addition to Segher's comments:
jemarch@gnu.org (Jose E. Marchesi) writes:
> [...]
> +/* This file contains the definition of the kernel helpers that are
> + available to eBPF programs.
> +
> + The primary source for information on kernel helpers is the
> + linux/include/uapi/linux/bpf.h file in the Linux source tree.
> + Please keep this database in sync.
> +
> + The first column is the first kernel version featuring the helper
> + function. This should be an enumerate from bpf_kernel_version,
> + defined in bpf-opts.h. Note that the backend assumes that helpers
> + never get deprecated in the kernel. If that eventually happens,
> + then we will need to use a bitmask here instead of an enumerate.
> +
> + The second column is the constant-name for the helper.
> + The third column is the program-name of the helper.
> +
> + The fourth column is a list of names describing the types of the
> + values returned and accepted by the helper, in one of these forms:
> +
> + TYPES (type1, type2, ..., 0)
> + VTYPES (type1, type2, ..., 0)
> +
> + VTYPES should be used should the helper accept a variable number of
> + arguments, TYPES otherwise. The valid type names are:
> +
> + `vt' for void.
> + `it' for signed int.
> + `ut' for unsigned int.
> + `pt' for *void.
> + `cpt' for const *void.
"*" after "void" in both cases.
> + `st' for short int.
> + `ust' for unsigned short int.
> + `cst' for const char *.
Very minor, but it might be less confusing to pick something other than "s"
for "cst" given the above.
> [...]
> +/* Functions to emit BPF_LD_ABS and BPF_LD_IND instructions. We
> + provide the "standard" names as synonyms of the corresponding GCC
> + builtins. Note how the SKB argument is ignored. */
> +
> +static inline long long
> +load_byte (void *skb, unsigned long long off)
> +{
> + return __builtin_bpf_load_byte (off);
> +}
> [etc]
It might be worth adding __attribute__((unused)) to them, in case
anyone compiles with -Wsystem-headers.
> [...]
> +/* Supported versions of the Linux kernel. */
> +enum bpf_kernel_version
> +{
> + /* Linux 4.x */
> + LINUX_V4_0,
> [etc.]
The contents should be indented by two spaces.
> [...]
> +enum bpf_builtins
> +{
> + BPF_BUILTIN_UNUSED = 0,
> + /* Built-ins for kernel helpers. */
> +#define DEF_HELPER(V,D,N,T) BPF_BUILTIN_HELPER_##D,
> +# include "bpf-helpers.def"
> +#undef DEF_HELPER
> + BPF_BUILTIN_HELPER_MAX,
> + /* Built-ins for non-generic loads and stores. */
> + BPF_BUILTIN_LOAD_BYTE = BPF_BUILTIN_HELPER_MAX,
> + BPF_BUILTIN_LOAD_HALF,
> + BPF_BUILTIN_LOAD_WORD,
> + BPF_BUILTIN_MAX,
> +};
> +
> +/* This table is indexed by an enum bpf_builtin. */
> +static const char *bpf_helper_names[] =
> +{
> + NULL,
> +#define DEF_HELPER(V,D,N,T) #N,
> +# include "bpf-helpers.def"
> +#undef DEF_HELPER
> + NULL,
> + NULL,
> + NULL,
> + NULL
> +};
Same for these two.
> [...]
> +#define INCLUDE_STRING
You didn't seem to rely on this (i.e. std::string).
> [...]
> +/* Override options and do some other initialization. */
> +
> +static void
> +bpf_option_override (void)
> +{
> + /* Set the default target kernel if no -mkernel was specified. */
> + if (!global_options_set.x_bpf_kernel)
> + bpf_kernel = LINUX_LATEST;
LINUX_LATEST is the default in the .opt file, so when is this needed?
> [...]
> + /* Define BPF_KERNEL_VERSION_CODE */
> + {
> + const char *version_code;
> + char *kernel_version_code;
> +
> + switch (bpf_kernel)
> + {
> + case LINUX_V4_0: version_code = "0x40000"; break;
> + case LINUX_V4_1: version_code = "0x40100"; break;
> + case LINUX_V4_2: version_code = "0x40200"; break;
> + case LINUX_V4_3: version_code = "0x40300"; break;
> + case LINUX_V4_4: version_code = "0x40400"; break;
> + case LINUX_V4_5: version_code = "0x40500"; break;
> + case LINUX_V4_6: version_code = "0x40600"; break;
> + case LINUX_V4_7: version_code = "0x40700"; break;
> + case LINUX_V4_8: version_code = "0x40800"; break;
> + case LINUX_V4_9: version_code = "0x40900"; break;
> + case LINUX_V4_10: version_code = "0x40a00"; break;
> + case LINUX_V4_11: version_code = "0x40b00"; break;
> + case LINUX_V4_12: version_code = "0x40c00"; break;
> + case LINUX_V4_13: version_code = "0x40d00"; break;
> + case LINUX_V4_14: version_code = "0x40e00"; break;
> + case LINUX_V4_15: version_code = "0x40f00"; break;
> + case LINUX_V4_16: version_code = "0x41000"; break;
> + case LINUX_V4_17: version_code = "0x42000"; break;
> + case LINUX_V4_18: version_code = "0x43000"; break;
> + case LINUX_V4_19: version_code = "0x44000"; break;
> + case LINUX_V4_20: version_code = "0x45000"; break;
> + case LINUX_V5_0: version_code = "0x50000"; break;
> + case LINUX_V5_1: version_code = "0x50100"; break;
> + case LINUX_V5_2: version_code = "0x50200"; break;
> + default:
> + gcc_unreachable ();
> + }
> +
> +#define KERNEL_VERSION_CODE "__BPF_KERNEL_VERSION_CODE__="
> + kernel_version_code
> + = (char *) alloca (strlen (KERNEL_VERSION_CODE) + 7 + 1);
> + strcpy (kernel_version_code, KERNEL_VERSION_CODE);
> +#undef KERNEL_VERSION_CODE
> + strcat (kernel_version_code, version_code);
> + builtin_define (kernel_version_code);
FWIW, a slightly easier way of writing this is:
kernel_version_code = ACONCAT (("__BPF_KERNEL_VERSION_CODE__=",
version_code, NULL));
> [...]
> +/* Determine whether the port is prepared to handle insns involving
> + scalar mode MODE. For a scalar mode to be considered supported,
> + all the basic arithmetic and comparisons must work. */
> +
> +static bool
> +bpf_scalar_mode_supported_p (scalar_mode mode)
> +{
> + switch (mode)
> + {
> + case E_QImode:
> + case E_HImode:
> + case E_SImode:
> + case E_DImode:
> + case E_TImode:
> + return true;
> +
> + default:
> + return false;
> + }
> +
> + return false;
> +}
Are you overriding this just to exclude floating-point modes?
If so, what specifically doesn't work?
Would be worth a comment.
> [...]
> +/* Return true if REGNO is th enumber of a hard register in which the
typo: "th enumber".
> [...]
> +/* Compute the size of the function's stack frame, including the local
> + area and the register-save area. */
> +
> +static void
> +bpf_compute_frame (void)
> +{
> + int stack_alignment = STACK_BOUNDARY / BITS_PER_UNIT;
> + int padding_locals, regno;
> +
> + /* Set the space used in the stack by local variables. This is
> + rounded up to respect the minimum stack alignment. */
> + cfun->machine->local_vars_size = get_frame_size ();
> +
> + padding_locals = cfun->machine->local_vars_size % stack_alignment;
> + if (padding_locals)
> + padding_locals = stack_alignment - padding_locals;
> +
> + cfun->machine->local_vars_size += padding_locals;
> +
> + /* Set the space used in the stack by callee-saved used registers in
> + the current function. There is no need to round up, since the
> + registers are all 8 bytes wide. */
> + for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
> + if ((!fixed_regs[regno]
> + && df_regs_ever_live_p (regno)
> + && !call_used_regs[regno])
> + || (cfun->calls_alloca
> + && regno == STACK_POINTER_REGNUM))
> + cfun->machine->callee_saved_reg_size += 8;
> +
> + /* Check that the total size of the frame doesn't exceed the limit
> + imposed by eBPF: currently 512 bytes. */
> + if ((cfun->machine->local_vars_size
> + + cfun->machine->callee_saved_reg_size) > 512)
> + {
> + static int stack_limit_exceeded = 0;
> +
> + if (!stack_limit_exceeded)
> + error ("eBPF stack limit of 512 bytes exceeded");
> + stack_limit_exceeded = 1;
> + }
> +}
I think this does what TARGET_COMPUTE_FRAME_LAYOUT expects.
It'd be good to define the hook to bpf_compute_frame and avoid calling
it explicitly in the prologue, epilogue and elimination routines.
(The documentation says the hook's optional, but when it's such a
natural fit...)
> [...]
> + /* Save callee-saved hard registes. The register-save-area starts
> + right after the local variables. */
> + for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
> + {
> + if ((!fixed_regs[regno]
> + && df_regs_ever_live_p (regno)
> + && !call_used_regs[regno])
> + || (cfun->calls_alloca
> + && regno == STACK_POINTER_REGNUM))
> + {
> + rtx mem;
> +
> + if (!IN_RANGE (fp_offset, -1 - 0x7fff, 0x7fff))
> + /* This has been already reported as an error in
> + bpf_compute_frame. */
> + break;
> + else
> + {
> + mem = gen_frame_mem (DImode,
> + plus_constant (DImode,
> + gen_rtx_REG (DImode, FRAME_POINTER_REGNUM),
hard_frame_pointer_rtx here and elsewhere.
> [...]
> +/* Return true if a value of mode MODE1 is accessible in mode MODE2
> + without copying. */
> +
> +static bool
> +bpf_modes_tieable_p (enum machine_mode mode1,
> + enum machine_mode mode2)
> +{
> + return (mode1 == mode2
> + || GET_MODE_CLASS (mode1) == GET_MODE_CLASS (mode2));
> +}
The second part makes the first part redundant. But why do you
need to restrict it based on classes? It seems like eBPF is an
example of an architecture where any modes are tieable, so using
the default would be better if possible.
If the restriction is needed, it would be worth having a comment
explaining which case you're excluding and why.
> [...]
> + case PLUS:
> + {
> + /* The valid patterns here are:
> +
> + (PLUS ADDR_BASE CONST_INT)
> + (PLUS CONST_INT ADDR_BASE)
The second one isn't canonical rtl, so you shouldn't (need to) handle it.
Please raise a bug if you find a case where it's being generated. :-)
> [...]
> +/* Split an out-of-range address displacement into hi and lo parts.
> + The hi part will have to be loaded into a register separately, but
> + the low part will be folded into the memory operand. */
> +
> +static bool
> +bpf_legitimize_address_displacement (rtx *off1, rtx *off2,
> + poly_int64 poly_offset, machine_mode)
> +{
> + HOST_WIDE_INT orig_offset = poly_offset;
> +
> + /* Our case is very easy: the REG part of an indirect address is
> + 64-bit wide, so it can hold any address. This always leads to
> + REG+0 */
> +
> + *off1 = GEN_INT (orig_offset);
> + *off2 = GEN_INT (0);
> + return true;
> +}
> +
> +#undef TARGET_LEGITIMIZE_ADDRESS_DISPLACEMENT
> +#define TARGET_LEGITIMIZE_ADDRESS_DISPLACEMENT bpf_legitimize_address_displacement
But then do you need to define the hook at all? I think this is what
LRA does by default. The hook is only really there to get better spill
code (via common anchor points) on targets with limited offset ranges.
> [...]
> +/* Return true if memory address ADDR in address space AS can have
> + different meanings depending on the machine mode of the memory
> + reference it is used for or if the address is valid for some modes
> + but not others. */
> +
> +static bool
> +bpf_mode_dependent_address_p (const_rtx addr ATTRIBUTE_UNUSED,
> + addr_space_t as ATTRIBUTE_UNUSED)
> +{
> + return true;
> +}
> +
> +#undef TARGET_MODE_DEPENDENT_ADDRESS_P
> +#define TARGET_MODE_DEPENDENT_ADDRESS_P bpf_mode_dependent_address_p
Why does this need to be true? False is the better answer if you can
give it. :-) And it looks like the set of legitimate addresses doesn't
really care about modes.
> [...]
> +/* Return true if X is a legitimate constant for a MODE-mode immediate
> + operand on the target machine. */
> +
> +static bool
> +bpf_legitimate_constant_p (enum machine_mode mode ATTRIBUTE_UNUSED,
> + rtx x ATTRIBUTE_UNUSED)
> +{
> + return true;
> +}
> +
> +#undef TARGET_LEGITIMATE_CONSTANT_P
> +#define TARGET_LEGITIMATE_CONSTANT_P bpf_legitimate_constant_p
This is the default, no real need to define it.
> [...]
> +/* Return a RTX indicating whether a function argument is passed in a
> + register and if so, which register. */
> +
> +static rtx
> +bpf_function_arg (cumulative_args_t ca, enum machine_mode mode ATTRIBUTE_UNUSED,
> + const_tree type ATTRIBUTE_UNUSED, bool named ATTRIBUTE_UNUSED)
> +{
> + CUMULATIVE_ARGS *cum = get_cumulative_args (ca);
> +
> + if (*cum < 5)
> + return gen_rtx_REG (mode, *cum + 1);
> + else
> + /* An error have been emitted for this in
> + bpf_function_arg_advance. */
> + return NULL_RTX;
This hook is called first, so "will be" rather than "has been".
(BTW, I just submitted a series of patches to change this interface,
but it should be a trivial change for whichever of us gets to make it.)
> [...]
> +/* Update the summarizer variable pointed by CA to advance past an
> + argument in the argument list. */
> +
> +static void
> +bpf_function_arg_advance (cumulative_args_t ca, enum machine_mode mode ATTRIBUTE_UNUSED,
> + const_tree type ATTRIBUTE_UNUSED, bool named ATTRIBUTE_UNUSED)
> +{
> + CUMULATIVE_ARGS *cum = get_cumulative_args (ca);
> +
> + if (*cum > 4)
> + error ("eBPF doesn't support functions with more than 5 arguments");
> + (*cum)++;
> +}
You allow TImode (int128_t) support, and arguments might be aggregates,
so shouldn't this be incrementing by the number of words rather than 1?
I guess the error logic also needs to be tweaked to report an error for
(say) a TImode argument passed after 4 DImode arguments, which would
need 6 registers in total. It would also be good to avoid multiple
errors for the same argument list.
> [...]
> +/* Return true if an argument at the position indicated by CUM should
> + be passed by reference. If the hook returns true, a copy of that
> + argument is made in memory and a pointer to the argument is passed
> + instead of the argument itself. */
> +
> +static bool
> +bpf_pass_by_reference (cumulative_args_t cum ATTRIBUTE_UNUSED,
> + enum machine_mode mode, const_tree type,
> + bool named ATTRIBUTE_UNUSED)
> +{
> + unsigned HOST_WIDE_INT size;
> +
> + if (type)
> + {
> + if (AGGREGATE_TYPE_P (type))
> + return true;
> + size = int_size_in_bytes (type);
> + }
> + else
> + size = GET_MODE_SIZE (mode);
> +
> + return (size > 8*5);
> +}
> +
> +#undef TARGET_PASS_BY_REFERENCE
> +#define TARGET_PASS_BY_REFERENCE bpf_pass_by_reference
I might have misunderstood, but I thought from an earlier (IRC?)
message, it wasn't possible for the callee to access the caller's
frame, which was why you had the error about running out of argument
registers. If so, won't passing by reference make the argument
inaccessible in practice? I don't see what you gain by defining
the hook, since I'd have assumed (at least after the fix above)
that it would be better to pass by value and get an error about
having no argument registers left.
> [...]
> +/* Diagnostics on function contents. */
> +
> +static void
> +bpf_set_current_function (tree decl)
> +{
> + if (decl == NULL_TREE
> + || current_function_decl == NULL_TREE
> + || current_function_decl == error_mark_node
> + || !cfun->machine
> + || cfun->machine->diagnostics_checked_p)
> + return;
> +
> + /* Currently we don't do anything meaningful here. To be
> + changed. */
> +
> + /* Don't print the above diagnostics more than once. */
> + cfun->machine->diagnostics_checked_p = 1;
> +}
> +
> +#undef TARGET_SET_CURRENT_FUNCTION
> +#define TARGET_SET_CURRENT_FUNCTION bpf_set_current_function
IMO it'd be better to leave this undefined until it needs to do
something. (Same for diagnostics_checked_p itself.)
> [...]
> +/* Output the assembly code for a constructor. Since eBPF doesn't
> + support indirect calls, constructors are not supported. */
> +
> +static void
> +bpf_output_constructor (rtx symbol, int priority ATTRIBUTE_UNUSED)
> +{
> + fatal_insn ("no support for constructors sorry", symbol);
Would be better to use:
sorry ("no support for constructors");
Even better, when SYMBOL_REF_DECL is nonnull, use it to provide an
alternative, more helpful message :-)
> [...]
> +/* Output the assembly code for a destructor. Since eBPF doesn't
> + support indirect calls, destructors are not supported. */
> +
> +static void
> +bpf_output_destructor (rtx symbol, int priority ATTRIBUTE_UNUSED)
> +{
> + fatal_insn ("no support for destructors sorry", symbol);
Same idea here.
> [...]
> +/* Return the appropriate instruction to CALL to a function. TARGET
> + is a `mem' RTX denoting the address of the called function.
> +
> + The main purposes of this function are:
> + - To reject indirect CALL instructions, which are not supported by
> + eBPf.
typo: eBPF
> + - To recognize calls to kernel helper functions and emit the
> + corresponding CALL N instruction.
> +
> + This function is called from the expansion of the 'call' pattern in
> + bpf.md. */
> +
> +const char *
> +bpf_output_call (rtx target)
> +{
> + static char *insn;
> + rtx op;
> +
> + op = XEXP (target, 0);
> + switch (GET_CODE (op))
> + {
> + case CONST_INT:
> + insn = (char *) xmalloc (5 + 6 + 1);
> + sprintf (insn, "call\t%ld", INTVAL (op));
Would be good to avoid the memory leak. Two ways of doing that are:
(1) output the instructions via output_asm_insn here and return "".
(2) strip the MEM wrapper from operands[0] before printing. You can
then return "call %0" for the above. For...
> + break;
> + case SYMBOL_REF:
> + {
> + const char *function_name = XSTR (op, 0);
> + int code;
> +
> + if (strncmp (function_name, "__builtin_bpf_helper_", 21) == 0
> + && ((code = bpf_helper_code (function_name + 21)) != 0))
> + {
> + insn = (char *) xmalloc (5 + 6 + 1);
> + sprintf (insn, "call\t%d", code);
> + }
> + else
> + {
> + insn = (char *) xmalloc (strlen (function_name) + 5 + 1);
> + sprintf (insn, "call\t%s", function_name);
> + }
> + break;
...this you could define a new prefix letter for printing the SYMBOL_REF
operand appropriately ("f" say) and return "call %f0".
But (1) is easiest. :-)
> + }
> + default:
> + error ("indirect call in function, which are not supported by eBPF");
> + insn = xstrdup ("call 0");
Can just return "call 0" without the xstrdup.
> [...]
> +/* Print an instruction operand. This function is called in the macro
> + PRINT_OPERAND defined in bpf.h */
> +
> +void
> +bpf_print_operand (FILE *file, rtx op, int code ATTRIBUTE_UNUSED)
> +{
> + switch (GET_CODE (op))
> + {
> + case REG:
> + fprintf (file, "%s", reg_names[REGNO (op)]);
> + break;
> + case MEM:
> + output_address (GET_MODE (op), XEXP (op, 0));
> + break;
> + case CONST_DOUBLE:
> + if (CONST_DOUBLE_HIGH (op))
> + fprintf (file, HOST_WIDE_INT_PRINT_DOUBLE_HEX,
> + CONST_DOUBLE_HIGH (op), CONST_DOUBLE_LOW (op));
> + else if (CONST_DOUBLE_LOW (op) < 0)
> + fprintf (file, HOST_WIDE_INT_PRINT_HEX, CONST_DOUBLE_LOW (op));
> + else
> + fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_DOUBLE_LOW (op));
> + break;
> + case LABEL_REF:
> + /* This is for label values. */
> + /* Fallthrough. */
> + default:
> + output_addr_const (file, op);
> + }
> +}
The three lines above the "default:" look redundant.
> [...]
> +/* Print an operand which is an address. This function should handle
> + any legit address, as accepted by bpf_legitimate_address_p.
> +
> + This function is called in the PRINT_OPERAND_ADDRESS macro defined
> + in bpf.h */
> +
> +void
> +bpf_print_operand_address (FILE *file, rtx addr)
> +{
> + switch (GET_CODE (addr))
> + {
> + case REG:
> + fprintf (file, "[%s+0]", reg_names[REGNO (addr)]);
> + break;
> + case PLUS:
> + {
> + rtx op0 = XEXP (addr, 0);
> + rtx op1 = XEXP (addr, 1);
> +
> + if (GET_CODE (op0) == REG && CONSTANT_ADDRESS_P (op1))
> + {
> + fprintf (file, "[%s+", reg_names[REGNO (op0)]);
> + output_addr_const (file, op1);
> + fputs ("]", file);
> + }
> + else if (GET_CODE (op1) == REG && CONSTANT_ADDRESS_P (op0))
> + {
> + fprintf (file, "[%s+", reg_names[REGNO (op1)]);
> + output_addr_const (file, op0);
> + fputs ("]", file);
> + }
As above, you shouldn't (need to) handle the case in which the constant
comes before the register.
> [...]
> +/* Add a BPF builtin function with NAME, CODE and TYPE. Return
> + the function decl or NULL_TREE if the builtin was not added. */
> +
> +static tree
> +def_builtin (const char *name, enum bpf_builtins code, tree type)
> +{
> + tree t
> + = add_builtin_function (name, type, code, BUILT_IN_MD, NULL, NULL_TREE);
> +
> + if (t)
> + bpf_builtins[code] = t;
I don't think add_builtin_function is allowed to return null,
and assigning null would just reassert the initial value anyway.
> [...]
> + tree offset_arg = CALL_EXPR_ARG (exp, 0);
> + struct expand_operand ops[2];
> +
> + create_input_operand (&ops[0], expand_normal (offset_arg),
> + TYPE_MODE (TREE_TYPE (offset_arg)));
> + create_input_operand (&ops[1], gen_rtx_CONST_INT (SImode, 0),
> + SImode);
const0_rtx (or use create_integer_operand).
> [...]
> +/* Always promote arguments and return values in function calls. */
> +
> +#undef TARGET_PROMOTE_FUNCTION_MODE
> +#define TARGET_PROMOTE_FUNCTION_MODE default_promote_function_mode_always_promote
Not a review comment, just curious: why did you go for this choice?
Is it already enshrined in the ABI?
One of the historical problems with caller promotion from a security
perspective is that the callee then trusts the caller to do the right
thing. See e.g. the code in combine.c that optimises away "redundant"
extensions that the caller is assumed to have done for us.
E.g. a rogue caller could induce an out-of-bounds access for:
unsigned int a[256];
unsigned int f (unsigned char c) { return a[c]; }
because the zero-extension of "c" in the address calculation might be
optimised away. This might not matter in an eBPF context though...
> [...]
> +/* This should not be needed, because ptr_mode, Pmode and word_mode
> + are all the same width. */
> +#define POINTERS_EXTEND_UNSIGNED 1
Yeah, IMO it would be better not to define it.
> [...]
> +/* The widest floating-point format supported by the hardware is
> + 64-bit. */
> +#define WIDEST_HARDWARE_FP_SIZE 64
Normally soft-fp targets don't need to define this. Is this related
to the special conversion libcalls you install for eBPF?
> [...]
> +/*** Order of Allocation of Registers. */
> +
> +/* We generally want to put call-clobbered registers ahead of
> + call-saved ones. (IRA expects this.) */
> +#define REG_ALLOC_ORDER \
> + {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
Do you gain much by defining this? I would have expected better
code without, given the architecture is so regular.
> [...]
> +/**** Register Classes. */
> +
> +enum reg_class
> +{
> + NO_REGS, /* no registers in set. */
> + GR_REGS, /* general-purpose integer registers. */
> + ALL_REGS, /* all registers. */
> + LIM_REG_CLASSES /* max value + 1. */
> +};
> +
> +#define N_REG_CLASSES (int) LIM_REG_CLASSES
> +#define GENERAL_REGS GR_REGS
> +
> +/* An initializer containing the names of the register classes as C
> + string constants. These names are used in writing some of the
> + debugging dumps. */
> +#define REG_CLASS_NAMES \
> +{ \
> + "NO_REGS", \
> + "GR_REGS", \
> + "ALL_REGS" \
> +}
> +
> +/* An initializer containing the contents of the register classes, as
> + integers which are bit masks. The Nth integer specifies the
> + contents of class N. The way the integer MASK is interpreted is
> + that register R is in the class if `MASK & (1 << R)' is 1. */
> +#define REG_CLASS_CONTENTS \
> +{ \
> + 0x00000000, /* NO_REGS */ \
> + 0x000007ff, /* GR_REGS */ \
> + 0x000007ff, /* ALL_REGS */ \
> +}
> +
> +/* A C expression whose value is a register class containing hard
> + register REGNO. In general there is more that one such class;
> + choose a class which is "minimal", meaning that no smaller class
> + also contains the register. */
> +#define REGNO_REG_CLASS(REGNO) ((REGNO) < 11 ? GR_REGS : ALL_REGS)
Did you mean to include register 11 in ALL_REGS in REG_CLASS_CONTENTS?
If not, then there doesn't seem to be any distinction between ALL_REGS
and GR_REGS, and it'd be better to make one the alias of the other
(and make REGNO_REG_CLASS return NO_REGS for 11).
> [...]
> +/* A macro whose definition is the name of the class to which a
> + valid index register must belong. An index register is one used
> + in an address where its value is either multiplied by a scale
> + factor or added to another register (as well as added to a
> + displacement). */
> +#define INDEX_REG_CLASS GR_REGS
It looked like you didn't support register-indexed addressing,
so NO_REGS would be better.
> [...]
> +/* C expression which is nonzero if register number REGNO is suitable
> + for use as a base register in operand addresses. In eBPF every
> + hard register can be used for this purpose. */
> +#define REGNO_OK_FOR_BASE_P(REGNO) \
> + ((REGNO) < FIRST_PSEUDO_REGISTER \
> + || (unsigned)reg_renumber[REGNO] < FIRST_PSEUDO_REGISTER)
The reg_regnumber stuff isn't needed for modern (LRA) targets.
> [...]
> +/* C expression which is nonzero if register number REGNO is suitable
> + for use as an index register in operand addresses. */
> +#define REGNO_OK_FOR_INDEX_P(REGNO) \
> + REGNO_OK_FOR_BASE_P(REGNO)
As above, this should be false if you don't support register-indexed
addressing.
> [...]
> +/* It is safe to return CLASS here. No more restrictive class is
> + needed. */
> +#define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS
This is a legacy macro. The associated target hook is
TARGET_PREFERRED_RELOAD_CLASS, which defaults to the above,
so I think you can just delete this.
> [...]
> +/* Maximum number of consecutive registers of class CLASS needed to
> + hold a value of mode MODE. */
> +#define CLASS_MAX_NREGS(CLASS, MODE) \
> + (((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
Same here for TARGET_CLASS_MAX_NREGS.
> [...]
> +/* We cannot support DWARF2 because of the limitations of eBPF. */
> +#define DBX_DEBUGGING_INFO
(I shed tears at this point, but still I continued...)
> [...]
> +/* Cost of moving data of mode MODE from a register in class FROM to a
> + register in class TO. Note that 2 is the default. */
> +#define REGISTER_MOVE_COST(MODE,FROM,TO) 2
> +
> +/* Cost of moving data of mode MODE between a register of class CLASS
> + and memory. IN is zero if the value is to be written to memory,
> + nonzero if it is to be read in. */
> +#define MEMORY_MOVE_COST(MODE,CLASS,IN) 4
These two are now target hooks.
> [...]
> +;;; Subtraction
> +(define_insn "sub<AM:mode>3"
> + [(set (match_operand:AM 0 "register_operand" "=r,r")
> + (plus:AM (match_operand:AM 1 "register_operand" " 0,0")
> + (match_operand:AM 2 "reg_or_imm_operand" " r,I")))]
> + "1"
> + "sub<msuffix>\t%0,%2"
> + [(set_attr "type" "<mtype>")])
This should only (need to) handle subtractions of registers.
Subtractions of constants become additions.
> [...]
> +(define_insn "*mulsi3_extended"
> + [(set (match_operand:DI 0 "register_operand" "=r,r")
> + (sign_extend:DI
> + (mult:SI (match_operand:SI 1 "register_operand" "0,0")
> + (match_operand:SI 2 "reg_or_imm_operand" "r,I"))))]
> + ""
> + "mul32\t%0,%2"
> + [(set_attr "type" "alu32")])
There's a named pattern for this: mulsidi3. You might get better
code by using that name instead.
> [...]
> +;; Division
> +(define_insn "div<AM:mode>3"
> + [(set (match_operand:AM 0 "register_operand" "=r,r")
> + (div:AM (match_operand:AM 1 "register_operand" " 0,0")
> + (match_operand:AM 2 "reg_or_imm_operand" "r,I")))]
> + ""
> + "div<msuffix>\t%0,%2"
> + [(set_attr "type" "<mtype>")])
> +
> +(define_insn "udiv<AM:mode>3"
> + [(set (match_operand:AM 0 "register_operand" "=r,r")
> + (div:AM (match_operand:AM 1 "register_operand" " 0,0")
> + (match_operand:AM 2 "reg_or_imm_operand" "r,I")))]
> + ""
> + "div<msuffix>\t%0,%2"
> + [(set_attr "type" "<mtype>")])
div and udiv are two different operations. I don't see how we can
use the same eBPF instruction for both. The rtl for udiv should also
use the udiv rtx code.
> +;;; Modulus
> +(define_insn "mod<AM:mode>3"
> + [(set (match_operand:AM 0 "register_operand" "=r,r")
> + (mod:AM (match_operand:AM 1 "register_operand" " 0,0")
> + (match_operand:AM 2 "reg_or_imm_operand" "r,I")))]
> + ""
> + "mod<msuffix>\t%0,%2"
> + [(set_attr "type" "<mtype>")])
> +
> +(define_insn "umod<AM:mode>3"
> + [(set (match_operand:AM 0 "register_operand" "=r,r")
> + (mod:AM (match_operand:AM 1 "register_operand" " 0,0")
> + (match_operand:AM 2 "reg_or_imm_operand" "r,I")))]
> + ""
> + "mod<msuffix>\t%0,%2"
> + [(set_attr "type" "<mtype>")])
Same here, with umod for the rtx code.
> [...]
> +;;; Sign-extension
> +
> +;; Sign-extending a 32-bit value into a 64-bit value is achieved using
> +;; shifting, with instructions generated by the expand below.
> +
> +(define_expand "extendsidi2"
> + [(set (match_operand:DI 0 "register_operand" "=r")
> + (sign_extend:DI (match_operand:SI 1 "register_operand" "r")))]
define_expands shouldn't have constraints. (Same for the rest of the file.)
> [...]
> +(define_expand "mov<AMM:mode>"
> + [(set (match_operand:AMM 0 "general_operand" "")
> + (match_operand:AMM 1 "general_operand" ""))]
> + ""
> + "
> +{
> + if (!register_operand(operands[0], <AMM:MODE>mode)
> + && !register_operand(operands[1], <AMM:MODE>mode))
> + operands[1] = force_reg (<AMM:MODE>mode, operands[1]);
Some odd indentation here. The code should be indented in the same
way as for .c files.
> + /* In cases where the moved entity is a constant address, we
> + need to emit an extra mov and modify the second operand to
> + obtain something like:
> +
> + lddw %T, %1
> + ldxw %0, [%T+0]
> +
> + Ditto for stores. */
> +
> + if (MEM_P (operands[1])
> + && CONSTANT_ADDRESS_P (XEXP (operands[1], 0)))
> + {
> + rtx tmp = gen_reg_rtx (DImode);
> +
> + emit_move_insn (tmp, XEXP (operands[1], 0));
> + operands[1] = gen_rtx_MEM (<AMM:MODE>mode, tmp);
> + }
> +
> + if (MEM_P (operands[0])
> + && CONSTANT_ADDRESS_P (XEXP (operands[0], 0)))
> + {
> + rtx tmp = gen_reg_rtx (DImode);
> +
> + emit_move_insn (tmp, XEXP (operands[0], 0));
> + operands[0] = gen_rtx_MEM (<AMM:MODE>mode, tmp);
> + }
But in that case, why not just say that constant addresses aren't
legitimate? That will make it easier for the optimisers to do the
right thing and (hopefully) generate better code.
> +(define_constraint "B"
> + "A constant argument for LDDW."
> + (ior (match_code "const,symbol_ref,label_ref,const_double")
> + (and (match_code "const_int")
> + (match_test "IN_RANGE (ival, -1 - 0x7fffffffffffffff, 0x7fffffffffffffff)"))))
Like Segher says, the IN_RANGE check is always true. So just:
(match_code "const,symbol_ref,label_ref,const_double,const_int")
should be enough.
> +(define_predicate "imm32_operand"
> + (ior (and (match_code "const_int")
> + (match_test "IN_RANGE (INTVAL (op), 0, 0xffffffff)"))
> + (match_code "symbol_ref,label_ref,const")))
This is only used with SImode. const_ints are represented in
sign-extended form, so the INTVAL will have the range of int32_t
rather than uint32_t. I.e.:
IN_RANGE (INTVAL (op), 0x80000000, 0xffffffff)
is always false for const_ints interpreted as SImode.
> +(define_predicate "lddw_operand"
> + (ior (and (match_code "const_int")
> + (match_test "IN_RANGE (INTVAL (op), 0, 0xffffffffffffffff)"))
> + (match_code "symbol_ref,label_ref,const,const_double")))
Same point here: the INTVAL will have the range of int64_t rather
than uint64_t.
> [...]
> +(define_predicate "call_operand"
> + (match_code "mem")
> +{
> + if (GET_CODE (op) != MEM)
> + return 0;
> +
> + op = XEXP (op, 0);
> +
> + if (GET_MODE (op) != mode
> + && GET_MODE (op) != VOIDmode
> + && mode != VOIDmode)
> + return 0;
No need for the check against "mode". That logically applies to "op" rather
than the address, and is generated automatically.
> +
> + switch (GET_CODE (op))
> + {
> + case REG:
> + case CONST_INT:
> + case SYMBOL_REF:
> + case LABEL_REF:
> + return 1;
> + break;
> + case CONST:
> + {
> + switch (GET_CODE (XEXP (op, 0)))
> + {
> + case SYMBOL_REF:
> + case LABEL_REF:
> + case CONST_INT:
> + return 1;
> + default:
> + break;
> + }
> + break;
> + }
> + default:
> + break;
> + }
Stripping CONST via:
if (GET_CODE (op) == CONST)
op = XEXP (op, 0);
would be simpler. Please also use true/false these days (realise a lot
of existing code doesn't).
It really would be nice to avoid the imports of elfos.h stuff,
but you know that already. :-)
Generally looks really good, thanks.
Richard
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 6/8] bpf: adjust GCC testsuite to eBPF limitations
[not found] ` <-0600")>
@ 2019-08-19 20:32 ` jose.marchesi
0 siblings, 0 replies; 223+ messages in thread
From: jose.marchesi @ 2019-08-19 20:32 UTC (permalink / raw)
To: Jeff Law; +Cc: gcc-patches
> It also seems like rather than checking for ebpf on files with large
> stacks, we should be using the generic mechanisms to defined the allowed
> size of the stack (mentioned in prior review) & mark test which use too
> much space. This would almost certainly help other embedded targets as
> well.
>
> I first thought about doing that, but hesitated when I realized it would
> require to alter existing tests in no trivial ways: will the test still
> effectively test whatever it is supposed to test, after the size of an
> array is changed, for example?
I think you just add something like
/* dg-require-stack-size "<size>" */
Assuming that's right you don't have to worry about changing the test
itself and potentially changing its meaning.
I wouldn't necessarily try to figure the exact size needed by each test.
A reasonable guesstimation ought to be sufficient.
Oh nice, I didn't know about that directive.
Thanks!
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 2/8] bpf: new GCC port
2019-08-19 20:20 ` Richard Sandiford
@ 2019-08-20 14:56 ` Jose E. Marchesi
2019-08-20 15:50 ` Segher Boessenkool
` (2 more replies)
2019-08-20 15:13 ` Segher Boessenkool
2019-08-20 15:19 ` Jose E. Marchesi
2 siblings, 3 replies; 223+ messages in thread
From: Jose E. Marchesi @ 2019-08-20 14:56 UTC (permalink / raw)
To: Jose E. Marchesi; +Cc: gcc-patches, richard.sandiford
Hi Richard!
Many thanks for the deep review. I'm addressing some of your questions
below.
> [...]
> +/* Override options and do some other initialization. */
> +
> +static void
> +bpf_option_override (void)
> +{
> + /* Set the default target kernel if no -mkernel was specified. */
> + if (!global_options_set.x_bpf_kernel)
> + bpf_kernel = LINUX_LATEST;
LINUX_LATEST is the default in the .opt file, so when is this needed?
It is an idiom I got from sparc.c:
/* Set the default CPU if no -mcpu option was specified. */
if (!global_options_set.x_sparc_cpu_and_features)
{
...
}
Maybe the code in sparc.c predates the Init() directive in sparc.opt
file?
> +/* Determine whether the port is prepared to handle insns involving
> + scalar mode MODE. For a scalar mode to be considered supported,
> + all the basic arithmetic and comparisons must work. */
> +
> +static bool
> +bpf_scalar_mode_supported_p (scalar_mode mode)
> +{
> + switch (mode)
> + {
> + case E_QImode:
> + case E_HImode:
> + case E_SImode:
> + case E_DImode:
> + case E_TImode:
> + return true;
> +
> + default:
> + return false;
> + }
> +
> + return false;
> +}
Are you overriding this just to exclude floating-point modes?
If so, what specifically doesn't work?
Would be worth a comment.
Reminiscence of not having support for TImodes at some stage. I'm
removing the target hook.
> [...]
> +/* Return true if a value of mode MODE1 is accessible in mode MODE2
> + without copying. */
> +
> +static bool
> +bpf_modes_tieable_p (enum machine_mode mode1,
> + enum machine_mode mode2)
> +{
> + return (mode1 == mode2
> + || GET_MODE_CLASS (mode1) == GET_MODE_CLASS (mode2));
> +}
The second part makes the first part redundant. But why do you
need to restrict it based on classes? It seems like eBPF is an
example of an architecture where any modes are tieable, so using
the default would be better if possible.
If the restriction is needed, it would be worth having a comment
explaining which case you're excluding and why.
Hm yes, you are right. TARGET_HARD_REGNO_MODE_OK (R,MODE1) ==
TARGET_HARD_REGNO_MODE_OK (R,MODE2) for all supported modes... I'm
removing the target hook.
> [...]
> + case PLUS:
> + {
> + /* The valid patterns here are:
> +
> + (PLUS ADDR_BASE CONST_INT)
> + (PLUS CONST_INT ADDR_BASE)
The second one isn't canonical rtl, so you shouldn't (need to) handle it.
Please raise a bug if you find a case where it's being generated. :-)
Oooh, didn't know that, that's actually very handy :)
Do you know if this is documented anywhere? I don't recall seeing this
in the internals manual, but maybe I missed it.
> [...]
> +/* Split an out-of-range address displacement into hi and lo parts.
> + The hi part will have to be loaded into a register separately, but
> + the low part will be folded into the memory operand. */
> +
> +static bool
> +bpf_legitimize_address_displacement (rtx *off1, rtx *off2,
> + poly_int64 poly_offset, machine_mode)
> +{
> + HOST_WIDE_INT orig_offset = poly_offset;
> +
> + /* Our case is very easy: the REG part of an indirect address is
> + 64-bit wide, so it can hold any address. This always leads to
> + REG+0 */
> +
> + *off1 = GEN_INT (orig_offset);
> + *off2 = GEN_INT (0);
> + return true;
> +}
> +
> +#undef TARGET_LEGITIMIZE_ADDRESS_DISPLACEMENT
> +#define TARGET_LEGITIMIZE_ADDRESS_DISPLACEMENT bpf_legitimize_address_displacement
But then do you need to define the hook at all? I think this is what
LRA does by default. The hook is only really there to get better spill
code (via common anchor points) on targets with limited offset ranges.
Hm I think I wrote this hook to fix some invalid addresses being
generated at some point... but I don't recall the details. It looks
like this hook is no longer necessary with the current implementation of
addresses (legitimize etc) so I'm removing it.
> [...]
> +/* Return true if memory address ADDR in address space AS can have
> + different meanings depending on the machine mode of the memory
> + reference it is used for or if the address is valid for some modes
> + but not others. */
> +
> +static bool
> +bpf_mode_dependent_address_p (const_rtx addr ATTRIBUTE_UNUSED,
> + addr_space_t as ATTRIBUTE_UNUSED)
> +{
> + return true;
> +}
> +
> +#undef TARGET_MODE_DEPENDENT_ADDRESS_P
> +#define TARGET_MODE_DEPENDENT_ADDRESS_P bpf_mode_dependent_address_p
Why does this need to be true? False is the better answer if you can
give it. :-) And it looks like the set of legitimate addresses doesn't
really care about modes.
That true was supposed to be false! :)
I'm removing the hook, as the default returns false anyway.
> [...]
> +/* Return a RTX indicating whether a function argument is passed in a
> + register and if so, which register. */
> +
> +static rtx
> +bpf_function_arg (cumulative_args_t ca, enum machine_mode mode ATTRIBUTE_UNUSED,
> + const_tree type ATTRIBUTE_UNUSED, bool named ATTRIBUTE_UNUSED)
> +{
> + CUMULATIVE_ARGS *cum = get_cumulative_args (ca);
> +
> + if (*cum < 5)
> + return gen_rtx_REG (mode, *cum + 1);
> + else
> + /* An error have been emitted for this in
> + bpf_function_arg_advance. */
> + return NULL_RTX;
This hook is called first, so "will be" rather than "has been".
(BTW, I just submitted a series of patches to change this interface,
but it should be a trivial change for whichever of us gets to make it.)
I see your interface change was approved yesterday, so I will just adapt
in my next rebase :)
> [...]
> +/* Return true if an argument at the position indicated by CUM should
> + be passed by reference. If the hook returns true, a copy of that
> + argument is made in memory and a pointer to the argument is passed
> + instead of the argument itself. */
> +
> +static bool
> +bpf_pass_by_reference (cumulative_args_t cum ATTRIBUTE_UNUSED,
> + enum machine_mode mode, const_tree type,
> + bool named ATTRIBUTE_UNUSED)
> +{
> + unsigned HOST_WIDE_INT size;
> +
> + if (type)
> + {
> + if (AGGREGATE_TYPE_P (type))
> + return true;
> + size = int_size_in_bytes (type);
> + }
> + else
> + size = GET_MODE_SIZE (mode);
> +
> + return (size > 8*5);
> +}
> +
> +#undef TARGET_PASS_BY_REFERENCE
> +#define TARGET_PASS_BY_REFERENCE bpf_pass_by_reference
I might have misunderstood, but I thought from an earlier (IRC?)
message, it wasn't possible for the callee to access the caller's
frame, which was why you had the error about running out of argument
registers. If so, won't passing by reference make the argument
inaccessible in practice? I don't see what you gain by defining
the hook, since I'd have assumed (at least after the fix above)
that it would be better to pass by value and get an error about
having no argument registers left.
Yes. I added that hook before I had the restriction of number of
arguments in place. Removing it.
> [...]
> +/* Always promote arguments and return values in function calls. */
> +
> +#undef TARGET_PROMOTE_FUNCTION_MODE
> +#define TARGET_PROMOTE_FUNCTION_MODE default_promote_function_mode_always_promote
Not a review comment, just curious: why did you go for this choice?
Is it already enshrined in the ABI?
One of the historical problems with caller promotion from a security
perspective is that the callee then trusts the caller to do the right
thing. See e.g. the code in combine.c that optimises away "redundant"
extensions that the caller is assumed to have done for us.
E.g. a rogue caller could induce an out-of-bounds access for:
unsigned int a[256];
unsigned int f (unsigned char c) { return a[c]; }
because the zero-extension of "c" in the address calculation might be
optimised away. This might not matter in an eBPF context though...
Interesting. I have to think about this, and also check whether llvm is
doing caller argument promotion or not.
> [...]
> +/* The widest floating-point format supported by the hardware is
> + 64-bit. */
> +#define WIDEST_HARDWARE_FP_SIZE 64
Normally soft-fp targets don't need to define this. Is this related
to the special conversion libcalls you install for eBPF?
No. I didn't realize its value defaults to LONG_DOUBLE_TYPE_SIZE.
Removing the definition.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 2/8] bpf: new GCC port
2019-08-19 20:20 ` Richard Sandiford
2019-08-20 14:56 ` Jose E. Marchesi
@ 2019-08-20 15:13 ` Segher Boessenkool
2019-08-20 15:32 ` Jose E. Marchesi
2019-08-20 15:19 ` Jose E. Marchesi
2 siblings, 1 reply; 223+ messages in thread
From: Segher Boessenkool @ 2019-08-20 15:13 UTC (permalink / raw)
To: Jose E. Marchesi, Jose E. Marchesi, gcc-patches, richard.sandiford
On Mon, Aug 19, 2019 at 08:57:22PM +0100, Richard Sandiford wrote:
> > +/*** Order of Allocation of Registers. */
> > +
> > +/* We generally want to put call-clobbered registers ahead of
> > + call-saved ones. (IRA expects this.) */
> > +#define REG_ALLOC_ORDER \
> > + {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
>
> Do you gain much by defining this? I would have expected better
> code without, given the architecture is so regular.
It does exactly the same as not defining REG_ALLOC_ORDER, just a tiny
bit less efficient.
> > +#define REG_CLASS_CONTENTS \
> > +{ \
> > + 0x00000000, /* NO_REGS */ \
> > + 0x000007ff, /* GR_REGS */ \
> > + 0x000007ff, /* ALL_REGS */ \
> > +}
> > +
> > +/* A C expression whose value is a register class containing hard
> > + register REGNO. In general there is more that one such class;
> > + choose a class which is "minimal", meaning that no smaller class
> > + also contains the register. */
> > +#define REGNO_REG_CLASS(REGNO) ((REGNO) < 11 ? GR_REGS : ALL_REGS)
>
> Did you mean to include register 11 in ALL_REGS in REG_CLASS_CONTENTS?
> If not, then there doesn't seem to be any distinction between ALL_REGS
> and GR_REGS, and it'd be better to make one the alias of the other
> (and make REGNO_REG_CLASS return NO_REGS for 11).
ALL_REGS is required to contain all (hard) registers, too. I wonder what
will go wrong this way... Well nothing too obvious, apparently! :-)
> > +(define_insn "*mulsi3_extended"
> > + [(set (match_operand:DI 0 "register_operand" "=r,r")
> > + (sign_extend:DI
> > + (mult:SI (match_operand:SI 1 "register_operand" "0,0")
> > + (match_operand:SI 2 "reg_or_imm_operand" "r,I"))))]
> > + ""
> > + "mul32\t%0,%2"
> > + [(set_attr "type" "alu32")])
>
> There's a named pattern for this: mulsidi3. You might get better
> code by using that name instead.
mulsidi3 is something else (it extends the operands before the mult).
> > +(define_expand "extendsidi2"
> > + [(set (match_operand:DI 0 "register_operand" "=r")
> > + (sign_extend:DI (match_operand:SI 1 "register_operand" "r")))]
>
> define_expands shouldn't have constraints. (Same for the rest of the file.)
>
> > [...]
> > +(define_expand "mov<AMM:mode>"
> > + [(set (match_operand:AMM 0 "general_operand" "")
> > + (match_operand:AMM 1 "general_operand" ""))]
Not empty constraints, either... That is, you do not need to write them,
and internally it will be the same thing.
Segher
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 2/8] bpf: new GCC port
2019-08-19 20:20 ` Richard Sandiford
2019-08-20 14:56 ` Jose E. Marchesi
2019-08-20 15:13 ` Segher Boessenkool
@ 2019-08-20 15:19 ` Jose E. Marchesi
2 siblings, 0 replies; 223+ messages in thread
From: Jose E. Marchesi @ 2019-08-20 15:19 UTC (permalink / raw)
To: Jose E. Marchesi; +Cc: gcc-patches, richard.sandiford
> [...]
> +;; Division
> +(define_insn "div<AM:mode>3"
> + [(set (match_operand:AM 0 "register_operand" "=r,r")
> + (div:AM (match_operand:AM 1 "register_operand" " 0,0")
> + (match_operand:AM 2 "reg_or_imm_operand" "r,I")))]
> + ""
> + "div<msuffix>\t%0,%2"
> + [(set_attr "type" "<mtype>")])
> +
> +(define_insn "udiv<AM:mode>3"
> + [(set (match_operand:AM 0 "register_operand" "=r,r")
> + (div:AM (match_operand:AM 1 "register_operand" " 0,0")
> + (match_operand:AM 2 "reg_or_imm_operand" "r,I")))]
> + ""
> + "div<msuffix>\t%0,%2"
> + [(set_attr "type" "<mtype>")])
div and udiv are two different operations. I don't see how we can
use the same eBPF instruction for both. The rtl for udiv should also
use the udiv rtx code.
> +;;; Modulus
> +(define_insn "mod<AM:mode>3"
> + [(set (match_operand:AM 0 "register_operand" "=r,r")
> + (mod:AM (match_operand:AM 1 "register_operand" " 0,0")
> + (match_operand:AM 2 "reg_or_imm_operand" "r,I")))]
> + ""
> + "mod<msuffix>\t%0,%2"
> + [(set_attr "type" "<mtype>")])
> +
> +(define_insn "umod<AM:mode>3"
> + [(set (match_operand:AM 0 "register_operand" "=r,r")
> + (mod:AM (match_operand:AM 1 "register_operand" " 0,0")
> + (match_operand:AM 2 "reg_or_imm_operand" "r,I")))]
> + ""
> + "mod<msuffix>\t%0,%2"
> + [(set_attr "type" "<mtype>")])
Same here, with umod for the rtx code.
Oh dear the signed division... during development I just made both
signed and unsigned flavors to use the same instructions, then forgot to
change it.
Why did I do that? Because eBPF does not provide instructions for doing
_signed_ division, nor signed remainder: both `div' and `mod' perform
unsigned arithmetic.
clang/llvm ICEs whenever it finds signed division in a C program:
$ clang -target bpf foo.c
Error: Unsupport signed division for DAG: t17: i64 = sdiv t15, t16Please convert to unsigned div/mod.
fatal error: error in backend: Cannot select: t17: i64 = sdiv t15, t16
For GCC I much prefer for the compiler to generate funcalls instead, to
__divdi3/__divsi3/__moddi3/__modsi3 or the like, even if nothing is
providing implementations for these functions (yet.)
So I just defined the u{div,mod}MODE3 patterns in bpf.md (yes this time
using the right rtl opcode :P) and removed the insns for signed
operations.
Thanks for noticing this!
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 2/8] bpf: new GCC port
2019-08-20 15:13 ` Segher Boessenkool
@ 2019-08-20 15:32 ` Jose E. Marchesi
0 siblings, 0 replies; 223+ messages in thread
From: Jose E. Marchesi @ 2019-08-20 15:32 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: Jose E. Marchesi, gcc-patches, richard.sandiford
> > +/*** Order of Allocation of Registers. */
> > +
> > +/* We generally want to put call-clobbered registers ahead of
> > + call-saved ones. (IRA expects this.) */
> > +#define REG_ALLOC_ORDER \
> > + {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
>
> Do you gain much by defining this? I would have expected better
> code without, given the architecture is so regular.
It does exactly the same as not defining REG_ALLOC_ORDER, just a tiny
bit less efficient.
Yeah I just removed the definition from the port.
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 2/8] bpf: new GCC port
2019-08-20 14:56 ` Jose E. Marchesi
@ 2019-08-20 15:50 ` Segher Boessenkool
2019-08-20 18:33 ` Richard Sandiford
2019-08-22 5:46 ` Jose E. Marchesi
2 siblings, 0 replies; 223+ messages in thread
From: Segher Boessenkool @ 2019-08-20 15:50 UTC (permalink / raw)
To: Jose E. Marchesi; +Cc: Jose E. Marchesi, gcc-patches, richard.sandiford
On Tue, Aug 20, 2019 at 04:20:03PM +0200, Jose E. Marchesi wrote:
> > + (PLUS ADDR_BASE CONST_INT)
> > + (PLUS CONST_INT ADDR_BASE)
>
> The second one isn't canonical rtl, so you shouldn't (need to) handle it.
> Please raise a bug if you find a case where it's being generated. :-)
>
> Oooh, didn't know that, that's actually very handy :)
>
> Do you know if this is documented anywhere? I don't recall seeing this
> in the internals manual, but maybe I missed it.
@node Insn Canonicalizations
...
@itemize @bullet
@item
For commutative and comparison operators, a constant is always made the
second operand. If a machine only supports a constant as the second
operand, only patterns that match a constant in the second operand need
be supplied.
The whole section is worth reading :-)
Segher
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 2/8] bpf: new GCC port
2019-08-20 14:56 ` Jose E. Marchesi
2019-08-20 15:50 ` Segher Boessenkool
@ 2019-08-20 18:33 ` Richard Sandiford
2019-08-22 5:46 ` Jose E. Marchesi
2 siblings, 0 replies; 223+ messages in thread
From: Richard Sandiford @ 2019-08-20 18:33 UTC (permalink / raw)
To: Jose E. Marchesi; +Cc: Jose E. Marchesi, gcc-patches
jose.marchesi@oracle.com (Jose E. Marchesi) writes:
> Hi Richard!
>
> Many thanks for the deep review. I'm addressing some of your questions
> below.
>
> > [...]
> > +/* Override options and do some other initialization. */
> > +
> > +static void
> > +bpf_option_override (void)
> > +{
> > + /* Set the default target kernel if no -mkernel was specified. */
> > + if (!global_options_set.x_bpf_kernel)
> > + bpf_kernel = LINUX_LATEST;
>
> LINUX_LATEST is the default in the .opt file, so when is this needed?
>
> It is an idiom I got from sparc.c:
>
> /* Set the default CPU if no -mcpu option was specified. */
> if (!global_options_set.x_sparc_cpu_and_features)
> {
> ...
> }
>
> Maybe the code in sparc.c predates the Init() directive in sparc.opt
> file?
Might be wrong, but it looks like the SPARC code is overriding the .opt
default with the configure-time one. I don't think it's needed when
the default is fixed.
> > [...]
> > +/* Return a RTX indicating whether a function argument is passed in a
> > + register and if so, which register. */
> > +
> > +static rtx
> > +bpf_function_arg (cumulative_args_t ca, enum machine_mode mode ATTRIBUTE_UNUSED,
> > + const_tree type ATTRIBUTE_UNUSED, bool named ATTRIBUTE_UNUSED)
> > +{
> > + CUMULATIVE_ARGS *cum = get_cumulative_args (ca);
> > +
> > + if (*cum < 5)
> > + return gen_rtx_REG (mode, *cum + 1);
> > + else
> > + /* An error have been emitted for this in
> > + bpf_function_arg_advance. */
> > + return NULL_RTX;
>
> This hook is called first, so "will be" rather than "has been".
>
> (BTW, I just submitted a series of patches to change this interface,
> but it should be a trivial change for whichever of us gets to make it.)
>
> I see your interface change was approved yesterday, so I will just adapt
> in my next rebase :)
Thanks!
Richard
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 2/8] bpf: new GCC port
2019-08-17 2:39 ` [PATCH V2 2/8] bpf: new GCC port Jose E. Marchesi
2019-08-19 20:20 ` Richard Sandiford
@ 2019-08-20 20:32 ` Jeff Law
2019-08-20 21:42 ` Jose E. Marchesi
2019-08-23 19:19 ` Joseph Myers
2 siblings, 1 reply; 223+ messages in thread
From: Jeff Law @ 2019-08-20 20:32 UTC (permalink / raw)
To: Jose E. Marchesi, Jose E. Marchesi; +Cc: gcc-patches
On 8/16/19 6:59 PM, Jose E. Marchesi wrote:
> This patch adds a port for the Linux kernel eBPF architecture to GCC.
>
> ChangeLog:
>
> * configure.ac: Support for bpf-*-* targets.
> * configure: Regenerate.
>
> contrib/ChangeLog:
>
> * config-list.mk (LIST): Disable go in bpf-*-* targets.
>
> gcc/ChangeLog:
>
> * config.gcc: Support for bpf-*-* targets.
> * common/config/bpf/bpf-common.c: New file.
> * config/bpf/t-bpf: Likewise.
> * config/bpf/predicates.md: Likewise.
> * config/bpf/constraints.md: Likewise.
> * config/bpf/bpf.opt: Likewise.
> * config/bpf/bpf.md: Likewise.
> * config/bpf/bpf.h: Likewise.
> * config/bpf/bpf.c: Likewise.
> * config/bpf/bpf-protos.h: Likewise.
> * config/bpf/bpf-opts.h: Likewise.
> * config/bpf/bpf-helpers.h: Likewise.
> * config/bpf/bpf-helpers.def: Likewise.
So I think various folks have already mentioned the configure rebuild
issues, formatting and other stuff. I'm going to try to keep them all
in mind so that I don't duplicate anything. If I do duplicate someone's
comment, apologies in advance.
At a high level I realize there's lots of things not supported due to
the restricted environment it'll ultimately be used in. However, you
might want to consider extensions that would allow larger portions of
the gcc testsuite to run and some kind of user mode simulator so that
you can reasonably test the target. Not a requirement, but could be
useful (from experience :-)
> ---
> diff --git a/contrib/config-list.mk b/contrib/config-list.mk
> index 69c826e649a..aa9fdb64eaf 100644
> --- a/contrib/config-list.mk
> +++ b/contrib/config-list.mk
> @@ -123,7 +123,7 @@ $(LIST): make-log-dir
> TGT=`echo $@ | awk 'BEGIN { FS = "OPT" }; { print $$1 }'` && \
> TGT=`$(GCC_SRC_DIR)/config.sub $$TGT` && \
> case $$TGT in \
> - *-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*) \
> + *-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix* | bpf-*-* ) \
> ADDITIONAL_LANGUAGES=""; \
> ;; \
> *) \
So I've got no problem disabling Go for BFD, but I don't see bpf added
to LIST, which it should be.
> diff --git a/gcc/common/config/bpf/bpf-common.c b/gcc/common/config/bpf/bpf-common.c
> new file mode 100644
> index 00000000000..a68feb62897
> --- /dev/null
> +++ b/gcc/common/config/bpf/bpf-common.c
[ snip ]
> +/* Implement TARGET_OPTION_OPTIMIZATION_TABLE. */
> +static const struct default_options bpf_option_optimization_table[] =
> + {
> + /* Enable -funroll-all-loops by default. */
> + { OPT_LEVELS_ALL, OPT_funroll_all_loops, NULL, 1 },
> + /* Disable -fomit-frame-pointer by default. */
> + { OPT_LEVELS_ALL, OPT_fomit_frame_pointer, NULL, 0 },
> + { OPT_LEVELS_NONE, 0, NULL, 0 }
> + };
Curious about the motivation on the loop unrolling stuff. In general we
discourage targets from mucking around with the default
flags/optimizations, but it is sometimes the right thing to do.
Rather than -fomit-frame-pointer, I think you can use the
FRAME_POINTER_REQUIRED hook if you always want a frame pointer.
> +
> +#undef TARGET_OPTION_OPTIMIZATION_TABLE
> +#define TARGET_OPTION_OPTIMIZATION_TABLE bpf_option_optimization_table
> +
> +/* Implement TARGET_OPTION_DEFAULT_PARAMS. */
> +
> +static void
> +bpf_option_default_params (void)
> +{
> + /* XXX large-stack-frame = 512 bytes */
> + /* XXX max-unrolled-insns */
> + /* XXX max-unroll-times */
> +}
> +
> +#undef TARGET_OPTION_DEFAULT_PARAMS
> +#define TARGET_OPTION_DEFAULT_PARAMS bpf_option_default_params
I'd generally discourage twiddling the params like this, at least the
ones for the unroller.
> diff --git a/gcc/config/bpf/bpf-helpers.h b/gcc/config/bpf/bpf-helpers.h
> new file mode 100644
> index 00000000000..2fe96be7637
> --- /dev/null
> +++ b/gcc/config/bpf/bpf-helpers.h
I can't remember, is this an installed header that consumers are
expected to use? If so you might want to be careful with polluting user
code with BPF #defines such as BPF_ANY, BPF_NOEXIST, BPF_EXIST, etc.
The #defines for mapping to the builtins are probably OK though.
> diff --git a/gcc/config/bpf/bpf.c b/gcc/config/bpf/bpf.c
> new file mode 100644
> index 00000000000..4a42259a9c3
> --- /dev/null
> +++ b/gcc/config/bpf/bpf.c
> @@ -0,0 +1,1136 @@
[ ... ]
> +
> +/* Return the builtin code corresponding to the kernel helper builtin
> + __builtin_NAME, or 0 if the name doesn't correspond to a kernel
> + helper builtin. */
> +
> +static inline int
> +bpf_helper_code (const char *name)
> +{
> + int i;
> +
> + for (i = 1; i < BPF_BUILTIN_HELPER_MAX; ++i)
> + {
> + if (strcmp (name, bpf_helper_names[i]) == 0)
> + return i;
> + }
> +
> + return 0;
> +}
Does this get called often? If so the linear search could end up being
expensive from a compile-time standpoint.
> +#define KERNEL_VERSION_CODE "__BPF_KERNEL_VERSION_CODE__="
> + kernel_version_code
> + = (char *) alloca (strlen (KERNEL_VERSION_CODE) + 7 + 1);
> + strcpy (kernel_version_code, KERNEL_VERSION_CODE);
> +#undef KERNEL_VERSION_CODE
> + strcat (kernel_version_code, version_code);
> + builtin_define (kernel_version_code);
> + }
> +}
Does builtin_define copy its argument? If not, then I'd expect this to
be problematical as the alloca'd space will be reclaimed.
> +static rtx
> +bpf_function_value (const_tree ret_type,
> + const_tree fntype_or_decl ATTRIBUTE_UNUSED,
> + bool outgoing ATTRIBUTE_UNUSED)
> +{
> + enum machine_mode mode;
> + int unsignedp;
> +
> + mode = TYPE_MODE (ret_type);
> + if (INTEGRAL_TYPE_P (ret_type))
> + mode = promote_function_mode (ret_type, mode, &unsignedp, fntype_or_decl, 1);
> +
> + return gen_rtx_REG (mode, 0);
Rather than using "0" for the register number, consider using its name
from bpf.h.
> +}
> +
> +#undef TARGET_FUNCTION_VALUE
> +#define TARGET_FUNCTION_VALUE bpf_function_value
> +
> +/* Return true if REGNO is th enumber of a hard register in which the
> + values of called function may come back. */
> +
> +static bool
> +bpf_function_value_regno_p (const unsigned int regno)
> +{
> + return (regno == 0);
> +}
Similarly.
> +
> +static void
> +bpf_compute_frame (void)
> +{
> + int stack_alignment = STACK_BOUNDARY / BITS_PER_UNIT;
> + int padding_locals, regno;
> +
> + /* Set the space used in the stack by local variables. This is
> + rounded up to respect the minimum stack alignment. */
> + cfun->machine->local_vars_size = get_frame_size ();
> +
> + padding_locals = cfun->machine->local_vars_size % stack_alignment;
> + if (padding_locals)
> + padding_locals = stack_alignment - padding_locals;
> +
> + cfun->machine->local_vars_size += padding_locals;
> +
> + /* Set the space used in the stack by callee-saved used registers in
> + the current function. There is no need to round up, since the
> + registers are all 8 bytes wide. */
> + for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
> + if ((!fixed_regs[regno]
> + && df_regs_ever_live_p (regno)
> + && !call_used_regs[regno])
> + || (cfun->calls_alloca
> + && regno == STACK_POINTER_REGNUM))
> + cfun->machine->callee_saved_reg_size += 8;
> +
> + /* Check that the total size of the frame doesn't exceed the limit
> + imposed by eBPF: currently 512 bytes. */
> + if ((cfun->machine->local_vars_size
> + + cfun->machine->callee_saved_reg_size) > 512)
> + {
> + static int stack_limit_exceeded = 0;
> +
> + if (!stack_limit_exceeded)
> + error ("eBPF stack limit of 512 bytes exceeded");
> + stack_limit_exceeded = 1;
> + }
Is the stack limit likely to change? Would a param work better here
which would allow us to accommodate such a change without having to
re-release GCC?
> +
> +/* Expand to the instructions in a function epilogue. This function
> + is called when expanding the 'prologue' pattern in bpf.md. */
> +
> +void
> +bpf_expand_epilogue (void)
> +{
> + int regno, fp_offset;
> + rtx insn;
> +
> + bpf_compute_frame ();
> + fp_offset = -cfun->machine->local_vars_size;
> +
> + /* Restore callee-saved hard registes from the stack. */
> + for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
> + {
> + if ((!fixed_regs[regno]
> + && df_regs_ever_live_p (regno)
> + && !call_used_regs[regno])
> + || (cfun->calls_alloca
> + && regno == STACK_POINTER_REGNUM))
> + {
> + rtx mem;
> +
> + if (!IN_RANGE (fp_offset, -1 - 0x7fff, 0x7fff))
> + /* This has been already reported as an error in
> + bpf_compute_frame. */
> + break;
> + else
> + {
> + mem = gen_frame_mem (DImode,
> + plus_constant (DImode,
> + gen_rtx_REG (DImode, FRAME_POINTER_REGNUM),
> + fp_offset - 8));
> + insn = emit_move_insn (gen_rtx_REG (DImode, regno), mem);
> + RTX_FRAME_RELATED_P (insn) = 1;
> + fp_offset -= 8;
> + }
> + }
> + }
> +
> + emit_jump_insn (gen_exit ());
So ebpf doesn't need to do instruction scheduling, but even so it's
probably safest to emit a scheduling barrier before cutting back the stack.
> +HOST_WIDE_INT
> +bpf_initial_elimination_offset (int from,
> + int to)
> +{
> + HOST_WIDE_INT ret;
> +
> + if (from == ARG_POINTER_REGNUM && to == STACK_POINTER_REGNUM)
> + {
> + bpf_compute_frame ();
> + ret = (cfun->machine->local_vars_size
> + + cfun->machine->callee_saved_reg_size);
> + }
> + else if (from == ARG_POINTER_REGNUM && to == FRAME_POINTER_REGNUM)
> + ret = 0;
> + else
> + abort ();
Rather than abort() these days gcc_unreachable () is preferred.
I'm going to skip over all the function argument passing stuff as that
all needs updating after Richard S's changes.
> diff --git a/gcc/config/bpf/bpf.h b/gcc/config/bpf/bpf.h
> +
> +/**** Debugging Info ****/
> +
> +/* We cannot support DWARF2 because of the limitations of eBPF. */
> +#define DBX_DEBUGGING_INFO
Umm, we're trying to get rid of DBX_DEBUGGING_INFO. I'd rather not add
another user at this point. How tough would it be to support dwarf?
> +
> +/* Define how to find the value returned by a library function
> + assuming the value has mode MODE. This is always %r0 for eBPF. */
> +#define LIBCALL_VALUE(MODE) \
> + gen_rtx_REG ((MODE), 0)
Consider using BPF_R0
> +
> +/* The maximum number of bytes that a signle instruction can move
s/signle/single/
> +
> +(define_insn "*mulsi3_extended"
> + [(set (match_operand:DI 0 "register_operand" "=r,r")
> + (sign_extend:DI
> + (mult:SI (match_operand:SI 1 "register_operand" "0,0")
> + (match_operand:SI 2 "reg_or_imm_operand" "r,I"))))]
> + ""
> + "mul32\t%0,%2"
> + [(set_attr "type" "alu32")])
mulsidi3? or umulsidi3 for the name?
I believe you already commented on the need to address the div vs udiv
problem. Similarly for mod vs umod.
> +;;;; Data movement
> +
> +(define_mode_iterator AMM [QI HI SI DI SF DF])
> +
> +(define_expand "mov<AMM:mode>"
> + [(set (match_operand:AMM 0 "general_operand" "")
> + (match_operand:AMM 1 "general_operand" ""))]
> + ""
> + "
> +{
> + if (!register_operand(operands[0], <AMM:MODE>mode)
> + && !register_operand(operands[1], <AMM:MODE>mode))
> + operands[1] = force_reg (<AMM:MODE>mode, operands[1]);
> +
> + /* In cases where the moved entity is a constant address, we
> + need to emit an extra mov and modify the second operand to
> + obtain something like:
> +
> + lddw %T, %1
> + ldxw %0, [%T+0]
> +
> + Ditto for stores. */
> +
> + if (MEM_P (operands[1])
> + && CONSTANT_ADDRESS_P (XEXP (operands[1], 0)))
> + {
> + rtx tmp = gen_reg_rtx (DImode);
> +
> + emit_move_insn (tmp, XEXP (operands[1], 0));
> + operands[1] = gen_rtx_MEM (<AMM:MODE>mode, tmp);
> + }
> +
> + if (MEM_P (operands[0])
> + && CONSTANT_ADDRESS_P (XEXP (operands[0], 0)))
> + {
> + rtx tmp = gen_reg_rtx (DImode);
> +
> + emit_move_insn (tmp, XEXP (operands[0], 0));
> + operands[0] = gen_rtx_MEM (<AMM:MODE>mode, tmp);
> + }
> +
> +}")
Hmm, what happens if you need to reload something from a constant
address? You can't call gen_reg_rtx once register allocation has
started. THe case where you need a scratch register really feels like
you need to be defining secondary reloads.
Generally it looks pretty good. I'd like to take more more looksie at
patch #2 of the series after you've addressed the comments you've
received so far.
jeff
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 2/8] bpf: new GCC port
2019-08-20 20:32 ` Jeff Law
@ 2019-08-20 21:42 ` Jose E. Marchesi
2019-08-21 1:03 ` Jeff Law
` (2 more replies)
0 siblings, 3 replies; 223+ messages in thread
From: Jose E. Marchesi @ 2019-08-20 21:42 UTC (permalink / raw)
To: Jeff Law; +Cc: Jose E. Marchesi, gcc-patches
Hi Jeff.
> This patch adds a port for the Linux kernel eBPF architecture to GCC.
>
> ChangeLog:
>
> * configure.ac: Support for bpf-*-* targets.
> * configure: Regenerate.
>
> contrib/ChangeLog:
>
> * config-list.mk (LIST): Disable go in bpf-*-* targets.
>
> gcc/ChangeLog:
>
> * config.gcc: Support for bpf-*-* targets.
> * common/config/bpf/bpf-common.c: New file.
> * config/bpf/t-bpf: Likewise.
> * config/bpf/predicates.md: Likewise.
> * config/bpf/constraints.md: Likewise.
> * config/bpf/bpf.opt: Likewise.
> * config/bpf/bpf.md: Likewise.
> * config/bpf/bpf.h: Likewise.
> * config/bpf/bpf.c: Likewise.
> * config/bpf/bpf-protos.h: Likewise.
> * config/bpf/bpf-opts.h: Likewise.
> * config/bpf/bpf-helpers.h: Likewise.
> * config/bpf/bpf-helpers.def: Likewise.
So I think various folks have already mentioned the configure rebuild
issues, formatting and other stuff. I'm going to try to keep them all
in mind so that I don't duplicate anything. If I do duplicate someone's
comment, apologies in advance.
At a high level I realize there's lots of things not supported due to
the restricted environment it'll ultimately be used in. However, you
might want to consider extensions that would allow larger portions of
the gcc testsuite to run and some kind of user mode simulator so that
you can reasonably test the target. Not a requirement, but could be
useful (from experience :-)
I agree to both regards.
I have been thinking about Segher's suggestion on providing options to
lift some of the limitations, for compiler testing. Unfortunately, many
of the restrictions are deeply rooted in the design of the
architecture... or the other way around. Finding sane ways to implement
these extensions will be fun :)
As for the simulator, I have one, along with an initial GDB port... but
it doesn't work very well due to a particularly nasty bug in CGEN. I
have a patch that seems to fix it but, as everything that touches cgen's
ifield handling code, it is difficult to be 100% sure about that, and I
also need to adapt some of the other existing cgen-based ports... so it
will take a while before I have something that can run the GCC
testsuite.
> diff --git a/gcc/common/config/bpf/bpf-common.c b/gcc/common/config/bpf/bpf-common.c
> new file mode 100644
> index 00000000000..a68feb62897
> --- /dev/null
> +++ b/gcc/common/config/bpf/bpf-common.c
[ snip ]
> +/* Implement TARGET_OPTION_OPTIMIZATION_TABLE. */
> +static const struct default_options bpf_option_optimization_table[] =
> + {
> + /* Enable -funroll-all-loops by default. */
> + { OPT_LEVELS_ALL, OPT_funroll_all_loops, NULL, 1 },
> + /* Disable -fomit-frame-pointer by default. */
> + { OPT_LEVELS_ALL, OPT_fomit_frame_pointer, NULL, 0 },
> + { OPT_LEVELS_NONE, 0, NULL, 0 }
> + };
Curious about the motivation on the loop unrolling stuff. In general we
discourage targets from mucking around with the default
flags/optimizations, but it is sometimes the right thing to do.
The kernel verifier doesn't allow backward jumps.
This may change at some point. There is much discussion among the
kernel hackers in whether it is possible to allow bounded loops in a
safe way. In that case, some of the restrictions may be lifted.
For now, only loops that can be peeled/massaged and then fully unrolled
are supported.
Rather than -fomit-frame-pointer, I think you can use the
FRAME_POINTER_REQUIRED hook if you always want a frame pointer.
Oh so specifying -fomit-frame-pointer there is redundant... good to
know. Will remove it.
> diff --git a/gcc/config/bpf/bpf-helpers.h b/gcc/config/bpf/bpf-helpers.h
> new file mode 100644
> index 00000000000..2fe96be7637
> --- /dev/null
> +++ b/gcc/config/bpf/bpf-helpers.h
I can't remember, is this an installed header that consumers are
expected to use? If so you might want to be careful with polluting user
code with BPF #defines such as BPF_ANY, BPF_NOEXIST, BPF_EXIST, etc.
The #defines for mapping to the builtins are probably OK though.
Yes, it is a header file for consumers. Unfortunately, the whole
purpose of the header is to provide an interface that is compatible with
the kernel's bpf_helpers.h (which at the moment is llvm-specific). The
API is given :(
This is a point I plan to raise with the eBPF developers in a few weeks,
at the Linux Plumbers conference in Lisbon.
> diff --git a/gcc/config/bpf/bpf.c b/gcc/config/bpf/bpf.c
> new file mode 100644
> index 00000000000..4a42259a9c3
> --- /dev/null
> +++ b/gcc/config/bpf/bpf.c
> @@ -0,0 +1,1136 @@
[ ... ]
> +
> +/* Return the builtin code corresponding to the kernel helper builtin
> + __builtin_NAME, or 0 if the name doesn't correspond to a kernel
> + helper builtin. */
> +
> +static inline int
> +bpf_helper_code (const char *name)
> +{
> + int i;
> +
> + for (i = 1; i < BPF_BUILTIN_HELPER_MAX; ++i)
> + {
> + if (strcmp (name, bpf_helper_names[i]) == 0)
> + return i;
> + }
> +
> + return 0;
> +}
Does this get called often? If so the linear search could end up being
expensive from a compile-time standpoint.
It gets called per function call to a symbol with the form
__builtin_bpf_helper_*... you think it is worth of a hash?
> +#define KERNEL_VERSION_CODE "__BPF_KERNEL_VERSION_CODE__="
> + kernel_version_code
> + = (char *) alloca (strlen (KERNEL_VERSION_CODE) + 7 + 1);
> + strcpy (kernel_version_code, KERNEL_VERSION_CODE);
> +#undef KERNEL_VERSION_CODE
> + strcat (kernel_version_code, version_code);
> + builtin_define (kernel_version_code);
> + }
> +}
Does builtin_define copy its argument? If not, then I'd expect this to
be problematical as the alloca'd space will be reclaimed.
Yes it does.
> +
> +static void
> +bpf_compute_frame (void)
> +{
> + int stack_alignment = STACK_BOUNDARY / BITS_PER_UNIT;
> + int padding_locals, regno;
> +
> + /* Set the space used in the stack by local variables. This is
> + rounded up to respect the minimum stack alignment. */
> + cfun->machine->local_vars_size = get_frame_size ();
> +
> + padding_locals = cfun->machine->local_vars_size % stack_alignment;
> + if (padding_locals)
> + padding_locals = stack_alignment - padding_locals;
> +
> + cfun->machine->local_vars_size += padding_locals;
> +
> + /* Set the space used in the stack by callee-saved used registers in
> + the current function. There is no need to round up, since the
> + registers are all 8 bytes wide. */
> + for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
> + if ((!fixed_regs[regno]
> + && df_regs_ever_live_p (regno)
> + && !call_used_regs[regno])
> + || (cfun->calls_alloca
> + && regno == STACK_POINTER_REGNUM))
> + cfun->machine->callee_saved_reg_size += 8;
> +
> + /* Check that the total size of the frame doesn't exceed the limit
> + imposed by eBPF: currently 512 bytes. */
> + if ((cfun->machine->local_vars_size
> + + cfun->machine->callee_saved_reg_size) > 512)
> + {
> + static int stack_limit_exceeded = 0;
> +
> + if (!stack_limit_exceeded)
> + error ("eBPF stack limit of 512 bytes exceeded");
> + stack_limit_exceeded = 1;
> + }
Is the stack limit likely to change? Would a param work better here
which would allow us to accommodate such a change without having to
re-release GCC?
It will probably be increased at some point. Using a param sounds like
a good idea. However...
The stack limit is associated with kernel version. I guess we can just
set the appropriate defaults in bpf_option_override if we make it
variable, in case the user didn't specify a --param for it, so no
problem.
Also, if we allow the user to specify a stack frame bigger than 0x7fff,
bpf_expand_prologue will break. Probably in that case we want to detect
this, warn and truncate to the -mkernel's default, also in
bpf_option_override.
Does that sound reasonable?
> diff --git a/gcc/config/bpf/bpf.h b/gcc/config/bpf/bpf.h
> +
> +/**** Debugging Info ****/
> +
> +/* We cannot support DWARF2 because of the limitations of eBPF. */
> +#define DBX_DEBUGGING_INFO
Umm, we're trying to get rid of DBX_DEBUGGING_INFO. I'd rather not add
another user at this point. How tough would it be to support dwarf?
Yes relying on stabs sucks.
The main problem I found is that it is not possible to define a CFA, nor
to unwind frames in any way. Given these limitations, is it still
possible to make GCC emit minimally useful DWARF, with locations and
such? That would be great.
> +;;;; Data movement
> +
> +(define_mode_iterator AMM [QI HI SI DI SF DF])
> +
> +(define_expand "mov<AMM:mode>"
> + [(set (match_operand:AMM 0 "general_operand" "")
> + (match_operand:AMM 1 "general_operand" ""))]
> + ""
> + "
> +{
> + if (!register_operand(operands[0], <AMM:MODE>mode)
> + && !register_operand(operands[1], <AMM:MODE>mode))
> + operands[1] = force_reg (<AMM:MODE>mode, operands[1]);
> +
> + /* In cases where the moved entity is a constant address, we
> + need to emit an extra mov and modify the second operand to
> + obtain something like:
> +
> + lddw %T, %1
> + ldxw %0, [%T+0]
> +
> + Ditto for stores. */
> +
> + if (MEM_P (operands[1])
> + && CONSTANT_ADDRESS_P (XEXP (operands[1], 0)))
> + {
> + rtx tmp = gen_reg_rtx (DImode);
> +
> + emit_move_insn (tmp, XEXP (operands[1], 0));
> + operands[1] = gen_rtx_MEM (<AMM:MODE>mode, tmp);
> + }
> +
> + if (MEM_P (operands[0])
> + && CONSTANT_ADDRESS_P (XEXP (operands[0], 0)))
> + {
> + rtx tmp = gen_reg_rtx (DImode);
> +
> + emit_move_insn (tmp, XEXP (operands[0], 0));
> + operands[0] = gen_rtx_MEM (<AMM:MODE>mode, tmp);
> + }
> +
> +}")
Hmm, what happens if you need to reload something from a constant
address? You can't call gen_reg_rtx once register allocation has
started. THe case where you need a scratch register really feels like
you need to be defining secondary reloads.
I really have to think about this. Richard's comment about the
possibility of not considering constant addresses legit already made me
ponder whether it would be better to use a different strategy here.
Generally it looks pretty good. I'd like to take more more looksie at
patch #2 of the series after you've addressed the comments you've
received so far.
Thanks, I appreciate.
Expect a V3 of the series soon :)
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 2/8] bpf: new GCC port
2019-08-20 21:42 ` Jose E. Marchesi
@ 2019-08-21 1:03 ` Jeff Law
2019-08-21 11:47 ` Segher Boessenkool
2019-08-21 11:44 ` Segher Boessenkool
2019-08-21 16:57 ` Jonathan Corbet
2 siblings, 1 reply; 223+ messages in thread
From: Jeff Law @ 2019-08-21 1:03 UTC (permalink / raw)
To: Jose E. Marchesi; +Cc: Jose E. Marchesi, gcc-patches
On 8/20/19 3:14 PM, Jose E. Marchesi wrote:
>
> Hi Jeff.
>
> > This patch adds a port for the Linux kernel eBPF architecture to GCC.
> >
> > ChangeLog:
> >
> > * configure.ac: Support for bpf-*-* targets.
> > * configure: Regenerate.
> >
> > contrib/ChangeLog:
> >
> > * config-list.mk (LIST): Disable go in bpf-*-* targets.
> >
> > gcc/ChangeLog:
> >
> > * config.gcc: Support for bpf-*-* targets.
> > * common/config/bpf/bpf-common.c: New file.
> > * config/bpf/t-bpf: Likewise.
> > * config/bpf/predicates.md: Likewise.
> > * config/bpf/constraints.md: Likewise.
> > * config/bpf/bpf.opt: Likewise.
> > * config/bpf/bpf.md: Likewise.
> > * config/bpf/bpf.h: Likewise.
> > * config/bpf/bpf.c: Likewise.
> > * config/bpf/bpf-protos.h: Likewise.
> > * config/bpf/bpf-opts.h: Likewise.
> > * config/bpf/bpf-helpers.h: Likewise.
> > * config/bpf/bpf-helpers.def: Likewise.
> So I think various folks have already mentioned the configure rebuild
> issues, formatting and other stuff. I'm going to try to keep them all
> in mind so that I don't duplicate anything. If I do duplicate someone's
> comment, apologies in advance.
>
> At a high level I realize there's lots of things not supported due to
> the restricted environment it'll ultimately be used in. However, you
> might want to consider extensions that would allow larger portions of
> the gcc testsuite to run and some kind of user mode simulator so that
> you can reasonably test the target. Not a requirement, but could be
> useful (from experience :-)
>
> I agree to both regards.
>
> I have been thinking about Segher's suggestion on providing options to
> lift some of the limitations, for compiler testing. Unfortunately, many
> of the restrictions are deeply rooted in the design of the
> architecture... or the other way around. Finding sane ways to implement
> these extensions will be fun :)
Hell, it's a virtual architecture. I'd just make up new instructions
for the missing functionality, make them dependent on an flag. I think
the PRU is in a similar position and uses that approach. PTX might have
as well.
>
> As for the simulator, I have one, along with an initial GDB port... but
> it doesn't work very well due to a particularly nasty bug in CGEN. I
> have a patch that seems to fix it but, as everything that touches cgen's
> ifield handling code, it is difficult to be 100% sure about that, and I
> also need to adapt some of the other existing cgen-based ports... so it
> will take a while before I have something that can run the GCC
> testsuite.
ACK.
> Curious about the motivation on the loop unrolling stuff. In general we
> discourage targets from mucking around with the default
> flags/optimizations, but it is sometimes the right thing to do.
>
> The kernel verifier doesn't allow backward jumps.
Oh yea, I should have remembered that. I think it came up in a
systemtap and/or ebpf+systemtap discussion at some point.
>
> This may change at some point. There is much discussion among the
> kernel hackers in whether it is possible to allow bounded loops in a
> safe way. In that case, some of the restrictions may be lifted.
ACK. It's an interesting problem. Would it help if we could annotate
loops with bound information? Not sure how to preserve that from gimple
down to assembly, but it's worth pondering.
> Does this get called often? If so the linear search could end up being
> expensive from a compile-time standpoint.
>
> It gets called per function call to a symbol with the form
> __builtin_bpf_helper_*... you think it is worth of a hash?
Hard to tell. Maybe leave it for now and revisit post integration and
real world feedback.
> Is the stack limit likely to change? Would a param work better here
> which would allow us to accommodate such a change without having to
> re-release GCC?
>
> It will probably be increased at some point. Using a param sounds like
> a good idea. However...
>
> The stack limit is associated with kernel version. I guess we can just
> set the appropriate defaults in bpf_option_override if we make it
> variable, in case the user didn't specify a --param for it, so no
> problem.
>
> Also, if we allow the user to specify a stack frame bigger than 0x7fff,
> bpf_expand_prologue will break. Probably in that case we want to detect
> this, warn and truncate to the -mkernel's default, also in
> bpf_option_override.
>
> Does that sound reasonable?
It does. I think PARAMS have the ability to enforce a min/max and
specify a default. So set a default to 512 since that's what works
everywhere and if the kernel bumps up, folks can just use the param to
allow more stack space.
>
> > diff --git a/gcc/config/bpf/bpf.h b/gcc/config/bpf/bpf.h
> > +
> > +/**** Debugging Info ****/
> > +
> > +/* We cannot support DWARF2 because of the limitations of eBPF. */
> > +#define DBX_DEBUGGING_INFO
> Umm, we're trying to get rid of DBX_DEBUGGING_INFO. I'd rather not add
> another user at this point. How tough would it be to support dwarf?
>
> Yes relying on stabs sucks.
>
> The main problem I found is that it is not possible to define a CFA, nor
> to unwind frames in any way. Given these limitations, is it still
> possible to make GCC emit minimally useful DWARF, with locations and
> such? That would be great.
I thought we had that ability in the past. It may have bitrotted since
most of our targets have moved to supporting CFA and dwarf2.
> Hmm, what happens if you need to reload something from a constant
> address? You can't call gen_reg_rtx once register allocation has
> started. THe case where you need a scratch register really feels like
> you need to be defining secondary reloads.
>
> I really have to think about this. Richard's comment about the
> possibility of not considering constant addresses legit already made me
> ponder whether it would be better to use a different strategy here.
One approach would be to not allow them initially. You can then add
them back with the necessary secondary reload support at a later time.
This is one of those areas where being able to run the testsuite really
helps :-)
Jeff
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 2/8] bpf: new GCC port
2019-08-20 21:42 ` Jose E. Marchesi
2019-08-21 1:03 ` Jeff Law
@ 2019-08-21 11:44 ` Segher Boessenkool
2019-08-21 16:57 ` Jonathan Corbet
2 siblings, 0 replies; 223+ messages in thread
From: Segher Boessenkool @ 2019-08-21 11:44 UTC (permalink / raw)
To: Jose E. Marchesi; +Cc: Jeff Law, Jose E. Marchesi, gcc-patches
On Tue, Aug 20, 2019 at 11:14:35PM +0200, Jose E. Marchesi wrote:
> The kernel verifier doesn't allow backward jumps.
>
> This may change at some point. There is much discussion among the
> kernel hackers in whether it is possible to allow bounded loops in a
> safe way. In that case, some of the restrictions may be lifted.
>
> For now, only loops that can be peeled/massaged and then fully unrolled
> are supported.
You can also generate code like
x5: call x4
jump x1
x4: call x2
x2: call x1
x1: do things once here
ret
to do fixed number of iteration loops. Disgusting? You decide :-)
(Or is something in that not allowed by the verifier?)
Segher
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 2/8] bpf: new GCC port
2019-08-21 1:03 ` Jeff Law
@ 2019-08-21 11:47 ` Segher Boessenkool
0 siblings, 0 replies; 223+ messages in thread
From: Segher Boessenkool @ 2019-08-21 11:47 UTC (permalink / raw)
To: Jeff Law; +Cc: Jose E. Marchesi, Jose E. Marchesi, gcc-patches
On Tue, Aug 20, 2019 at 03:42:53PM -0600, Jeff Law wrote:
> > I have been thinking about Segher's suggestion on providing options to
> > lift some of the limitations, for compiler testing. Unfortunately, many
> > of the restrictions are deeply rooted in the design of the
> > architecture... or the other way around. Finding sane ways to implement
> > these extensions will be fun :)
> Hell, it's a virtual architecture. I'd just make up new instructions
> for the missing functionality, make them dependent on an flag. I think
> the PRU is in a similar position and uses that approach. PTX might have
> as well.
This approach works well for simulators for physical architectures, too.
> > This may change at some point. There is much discussion among the
> > kernel hackers in whether it is possible to allow bounded loops in a
> > safe way. In that case, some of the restrictions may be lifted.
> ACK. It's an interesting problem. Would it help if we could annotate
> loops with bound information? Not sure how to preserve that from gimple
> down to assembly, but it's worth pondering.
You probably should have machine insns that iterate a loop some number of
times given when you first start the loop (and cannot be changed later,
except maybe exiting from the loop). Like "doloop" in GCC. Maybe only
allow a constant number of times, if the verifier want to see that?
The only thing the verifier should be concerned with is how long the code
takes to run, or am I missing something?
Segher
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 2/8] bpf: new GCC port
2019-08-20 21:42 ` Jose E. Marchesi
2019-08-21 1:03 ` Jeff Law
2019-08-21 11:44 ` Segher Boessenkool
@ 2019-08-21 16:57 ` Jonathan Corbet
2 siblings, 0 replies; 223+ messages in thread
From: Jonathan Corbet @ 2019-08-21 16:57 UTC (permalink / raw)
To: Jose E. Marchesi; +Cc: Jeff Law, Jose E. Marchesi, gcc-patches
On Tue, 20 Aug 2019 23:14:35 +0200
jose.marchesi@oracle.com (Jose E. Marchesi) wrote:
> The kernel verifier doesn't allow backward jumps.
>
> This may change at some point. There is much discussion among the
> kernel hackers in whether it is possible to allow bounded loops in a
> safe way. In that case, some of the restrictions may be lifted.
Actually, bounded loops are supported and allowed in the 5.3 kernel.
https://lwn.net/Articles/794934/
jon
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 2/8] bpf: new GCC port
2019-08-20 14:56 ` Jose E. Marchesi
2019-08-20 15:50 ` Segher Boessenkool
2019-08-20 18:33 ` Richard Sandiford
@ 2019-08-22 5:46 ` Jose E. Marchesi
2019-08-22 9:25 ` Segher Boessenkool
2019-08-23 14:37 ` Richard Sandiford
2 siblings, 2 replies; 223+ messages in thread
From: Jose E. Marchesi @ 2019-08-22 5:46 UTC (permalink / raw)
To: Jose E. Marchesi; +Cc: gcc-patches, richard.sandiford
> +#undef TARGET_PASS_BY_REFERENCE
> +#define TARGET_PASS_BY_REFERENCE bpf_pass_by_reference
I might have misunderstood, but I thought from an earlier (IRC?)
message, it wasn't possible for the callee to access the caller's
frame, which was why you had the error about running out of argument
registers. If so, won't passing by reference make the argument
inaccessible in practice? I don't see what you gain by defining
the hook, since I'd have assumed (at least after the fix above)
that it would be better to pass by value and get an error about
having no argument registers left.
Yes. I added that hook before I had the restriction of number of
arguments in place. Removing it.
Happy auto correction :)
A colleague (who actually _uses_ eBPF extensively, ahem) tells me that
the kernel verifier allows to pass addresses of the caller's stack
frame, tracking that it is a ptr to a stack location, and it knows which
stack it came from. So it is indeed possible for the callee to access
the caller's frame, and therefore to pass arguments by reference.
On the downside, it is not possible for a callee to access the caller's
frame applying an offset to its frame pointer, because the stacks are
disjoint. This means that most probably I will have to dedicate a real,
not eliminable register to act as the arg pointer, if I want to get rid
of the annoying limitation on the number of arguments... and in order
to keep ABI compatibility with llvm built objects, this register is
gonna have to be %r5, i.e. the last register usable to pass arguments,
but it should be only used for that purpose if the function gets more
than 5 arguments... sounds messy, but there is hope, yay!
However, unless someone comes with a magical macro to define or an
existing target doing the same thing, I am deferring attacking this
problem for later (TM) and for the time being I will keep both the
ability of passing aggregates and other big arguments by reference, and
the limit on number of arguments (this is what clang does.)
I hope that's ok for you people.
Salud!
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 2/8] bpf: new GCC port
2019-08-22 5:46 ` Jose E. Marchesi
@ 2019-08-22 9:25 ` Segher Boessenkool
2019-08-23 14:37 ` Richard Sandiford
1 sibling, 0 replies; 223+ messages in thread
From: Segher Boessenkool @ 2019-08-22 9:25 UTC (permalink / raw)
To: Jose E. Marchesi; +Cc: Jose E. Marchesi, gcc-patches, richard.sandiford
Hi!
On Thu, Aug 22, 2019 at 04:11:46AM +0200, Jose E. Marchesi wrote:
> A colleague (who actually _uses_ eBPF extensively, ahem) tells me that
> the kernel verifier allows to pass addresses of the caller's stack
> frame, tracking that it is a ptr to a stack location, and it knows which
> stack it came from. So it is indeed possible for the callee to access
> the caller's frame, and therefore to pass arguments by reference.
Good news for testability of the GCC port, and also good news for users,
who will have one less (HUGE) arbitrary restriction to deal with :-)
> On the downside, it is not possible for a callee to access the caller's
> frame applying an offset to its frame pointer,
That is true for many targets.
> because the stacks are disjoint.
And even that sometimes.
> This means that most probably I will have to dedicate a real,
> not eliminable register to act as the arg pointer, if I want to get rid
> of the annoying limitation on the number of arguments... and in order
> to keep ABI compatibility with llvm built objects, this register is
> gonna have to be %r5, i.e. the last register usable to pass arguments,
> but it should be only used for that purpose if the function gets more
> than 5 arguments... sounds messy, but there is hope, yay!
At *function entry* it is in %r5, but you can immediately copy that
elsewhere, at function start; there is no need to dedicate a hard
register to it.
Segher
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 2/8] bpf: new GCC port
2019-08-22 5:46 ` Jose E. Marchesi
2019-08-22 9:25 ` Segher Boessenkool
@ 2019-08-23 14:37 ` Richard Sandiford
1 sibling, 0 replies; 223+ messages in thread
From: Richard Sandiford @ 2019-08-23 14:37 UTC (permalink / raw)
To: Jose E. Marchesi; +Cc: Jose E. Marchesi, gcc-patches
jose.marchesi@oracle.com (Jose E. Marchesi) writes:
> > +#undef TARGET_PASS_BY_REFERENCE
> > +#define TARGET_PASS_BY_REFERENCE bpf_pass_by_reference
>
> I might have misunderstood, but I thought from an earlier (IRC?)
> message, it wasn't possible for the callee to access the caller's
> frame, which was why you had the error about running out of argument
> registers. If so, won't passing by reference make the argument
> inaccessible in practice? I don't see what you gain by defining
> the hook, since I'd have assumed (at least after the fix above)
> that it would be better to pass by value and get an error about
> having no argument registers left.
>
> Yes. I added that hook before I had the restriction of number of
> arguments in place. Removing it.
>
> Happy auto correction :)
>
> A colleague (who actually _uses_ eBPF extensively, ahem) tells me that
> the kernel verifier allows to pass addresses of the caller's stack
> frame, tracking that it is a ptr to a stack location, and it knows which
> stack it came from. So it is indeed possible for the callee to access
> the caller's frame, and therefore to pass arguments by reference.
>
> On the downside, it is not possible for a callee to access the caller's
> frame applying an offset to its frame pointer, because the stacks are
> disjoint. This means that most probably I will have to dedicate a real,
> not eliminable register to act as the arg pointer, if I want to get rid
> of the annoying limitation on the number of arguments... and in order
> to keep ABI compatibility with llvm built objects, this register is
> gonna have to be %r5, i.e. the last register usable to pass arguments,
> but it should be only used for that purpose if the function gets more
> than 5 arguments... sounds messy, but there is hope, yay!
>
> However, unless someone comes with a magical macro to define or an
> existing target doing the same thing, I am deferring attacking this
> problem for later (TM) and for the time being I will keep both the
> ability of passing aggregates and other big arguments by reference, and
> the limit on number of arguments (this is what clang does.)
>
> I hope that's ok for you people.
Sounds good :-)
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 2/8] bpf: new GCC port
2019-08-17 2:39 ` [PATCH V2 2/8] bpf: new GCC port Jose E. Marchesi
2019-08-19 20:20 ` Richard Sandiford
2019-08-20 20:32 ` Jeff Law
@ 2019-08-23 19:19 ` Joseph Myers
2019-08-23 20:37 ` Jose E. Marchesi
2 siblings, 1 reply; 223+ messages in thread
From: Joseph Myers @ 2019-08-23 19:19 UTC (permalink / raw)
To: Jose E. Marchesi; +Cc: Jose E. Marchesi, gcc-patches
On Sat, 17 Aug 2019, Jose E. Marchesi wrote:
> +(define_insn "*branch_on_di"
> + [(set (pc)
> + (if_then_else (match_operator 3 "ordered_comparison_operator"
> + [(match_operand:DI 0 "register_operand" "r")
> + (match_operand:DI 1 "reg_or_imm_operand" "rI")])
> + (label_ref (match_operand 2 "" ""))
> + (pc)))]
> + ""
> +{
> + int code = GET_CODE (operands[3]);
> +
> + switch (code)
> + {
> + case EQ: return "jeq\t%0,%1,%2"; break;
> + case NE: return "jne\t%0,%1,%2"; break;
> + case LT: return "jslt\t%0,%1,%2"; break;
> + case LE: return "jsle\t%0,%1,%2"; break;
> + case GT: return "jsgt\t%0,%1,%2"; break;
> + case GE: return "jsge\t%0,%1,%2"; break;
> + case LTU: return "jlt\t%0,%1,%2"; break;
> + case LEU: return "jle\t%0,%1,%2"; break;
> + case GTU: return "jgt\t%0,%1,%2"; break;
> + case GEU: return "jge\t%0,%1,%2"; break;
> + default:
> + error ("unknown comparison code %d in *branch_on_di\n", code);
This error message isn't written in terms meaningful to users (that is,
saying what is wrong with their source code). Calls to error () should
only be for errors meaningful to users (and shouldn't appear in .md files
at all, because exgettext doesn't extract messages from .md files for
translation, and any error that late in compilation is liable not to have
a very meaningful location either). Internal errors - errors indicating a
bug in the compiler rather than a problem with the user's program - need
to use other functions such as internal_error.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: [PATCH V2 2/8] bpf: new GCC port
2019-08-23 19:19 ` Joseph Myers
@ 2019-08-23 20:37 ` Jose E. Marchesi
0 siblings, 0 replies; 223+ messages in thread
From: Jose E. Marchesi @ 2019-08-23 20:37 UTC (permalink / raw)
To: Joseph Myers; +Cc: Jose E. Marchesi, gcc-patches
> +(define_insn "*branch_on_di"
> + [(set (pc)
> + (if_then_else (match_operator 3 "ordered_comparison_operator"
> + [(match_operand:DI 0 "register_operand" "r")
> + (match_operand:DI 1 "reg_or_imm_operand" "rI")])
> + (label_ref (match_operand 2 "" ""))
> + (pc)))]
> + ""
> +{
> + int code = GET_CODE (operands[3]);
> +
> + switch (code)
> + {
> + case EQ: return "jeq\t%0,%1,%2"; break;
> + case NE: return "jne\t%0,%1,%2"; break;
> + case LT: return "jslt\t%0,%1,%2"; break;
> + case LE: return "jsle\t%0,%1,%2"; break;
> + case GT: return "jsgt\t%0,%1,%2"; break;
> + case GE: return "jsge\t%0,%1,%2"; break;
> + case LTU: return "jlt\t%0,%1,%2"; break;
> + case LEU: return "jle\t%0,%1,%2"; break;
> + case GTU: return "jgt\t%0,%1,%2"; break;
> + case GEU: return "jge\t%0,%1,%2"; break;
> + default:
> + error ("unknown comparison code %d in *branch_on_di\n", code);
This error message isn't written in terms meaningful to users (that is,
saying what is wrong with their source code). Calls to error () should
only be for errors meaningful to users (and shouldn't appear in .md files
at all, because exgettext doesn't extract messages from .md files for
translation, and any error that late in compilation is liable not to have
a very meaningful location either). Internal errors - errors indicating a
bug in the compiler rather than a problem with the user's program - need
to use other functions such as internal_error.
Yeah that's actually a gcc_unreachable, or fatal error.
Thanks for noticing!
^ permalink raw reply [flat|nested] 223+ messages in thread
* Re: Mainline bootstrap failure (Re: libstdc++ execute tests)
@ 2001-04-11 17:14 Peter Schmid
0 siblings, 0 replies; 223+ messages in thread
From: Peter Schmid @ 2001-04-11 17:14 UTC (permalink / raw)
To: gcc-patches
I have nearly the same system setup as Gabriel Dos Reis.
SuSE 7.1 distribution, glibc-2.2-7, gcc-2.95.2-149 and
binutils-2.10.0.33-13. Additionally, I installed hjl binutils version
2.11.90.0.4, dated Mon Apr 2, 2001 .
I can bootstrap the gcc compiler, but only if I employ the system
compiler (gcc-2.95.2) for building the stage one compiler. gcc-2.95.2
from SuSE hardcodes the path for the binutils. Therefore, the binutils
shipped with the SuSE distribution (binutils-2.10.0.33-13) are chosen
for building the stage1 compiler and for configuring the compilers
from the gcc-3.1 collection.
If a gcc-3.1 (e.g. version 2001049) snapshot is used for configuring
and building, I get make compare failures, as reported by Gabriel Dos Reis.
I believe, the make compare failures occured about two weeks ago for
the first time.
Configure options:
gcc -v
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Configured with: ../gcc/configure --enable-shared --disable-nls --enable-threads=posix --enable-long-long --enable-languages=c,c++,f77,objc
gcc version 3.1 20010410 (experimental)
Hope this helps,
Peter Schmid
^ permalink raw reply [flat|nested] 223+ messages in thread
end of thread, other threads:[~2019-08-23 19:23 UTC | newest]
Thread overview: 223+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20010410113028.A12691@redhat.com>
[not found] ` <Pine.SOL.3.91.1010410115340.11658A@cse.cygnus.com>
2001-04-10 15:15 ` libstdc++ execute tests Richard Henderson
2001-04-10 16:45 ` Benjamin Kosnik
2001-04-10 18:55 ` Gabriel Dos Reis
2001-04-10 22:02 ` Benjamin Kosnik
2001-04-11 2:55 ` Gabriel Dos Reis
2001-04-11 10:39 ` Richard Henderson
2001-04-11 11:04 ` Mainline bootstrap failure (Re: libstdc++ execute tests) Gabriel Dos Reis
2001-04-11 11:25 ` Neil Booth
2001-04-11 12:15 ` Richard Henderson
2001-04-11 13:19 ` Gabriel Dos Reis
2001-04-11 13:23 ` Richard Henderson
2001-04-11 13:31 ` Gabriel Dos Reis
2001-04-11 13:33 ` Richard Henderson
2001-04-11 15:24 ` Gabriel Dos Reis
2001-04-11 15:52 ` Richard Henderson
2001-04-11 16:25 ` Zack Weinberg
2001-04-11 16:27 ` Gabriel Dos Reis
2001-04-11 16:31 ` Richard Henderson
2001-04-11 16:40 ` Gabriel Dos Reis
2001-04-11 16:46 ` Richard Henderson
2001-04-11 17:35 ` Gabriel Dos Reis
2001-04-11 23:06 ` Benjamin Kosnik
2001-04-11 23:32 ` Neil Booth
2001-04-11 23:48 ` Gabriel Dos Reis
2001-04-12 0:37 ` Neil Booth
2001-04-12 0:41 ` Gabriel Dos Reis
2001-04-12 0:40 ` Neil Booth
2001-04-12 1:42 ` Gabriel Dos Reis
2001-04-12 2:28 ` Mainline bootstrap failure (Hit) Gabriel Dos Reis
2001-04-12 3:02 ` Gabriel Dos Reis
2001-04-12 11:03 ` Richard Henderson
2001-04-12 11:21 ` Gabriel Dos Reis
2001-04-12 2:44 ` Mainline bootstrap failure (Re: libstdc++ execute tests) Alexandre Oliva
[not found] ` <5.1.0.12.2.20010412170823.026d5540@mail.lauterbach.co!>
2001-04-12 3:04 ` Franz Sirl
2001-04-12 3:23 ` Alexandre Oliva
2001-04-12 7:39 ` DJ Delorie
2001-04-12 3:14 ` Gabriel Dos Reis
2001-04-12 3:34 ` Alexandre Oliva
2001-04-12 5:37 ` Franz Sirl
2001-04-12 5:44 ` Franz Sirl
2001-04-12 6:32 ` Alexandre Oliva
2001-04-12 6:44 ` Franz Sirl
2001-04-12 5:53 ` Alexandre Oliva
2001-04-12 6:03 ` Franz Sirl
2001-04-12 6:26 ` Alexandre Oliva
2001-04-12 6:37 ` Franz Sirl
2001-04-12 7:31 ` Alexandre Oliva
2001-04-12 9:06 ` Franz Sirl
2001-04-12 3:56 ` Franz Sirl
2001-04-12 4:57 ` Alexandre Oliva
2001-04-16 13:36 ` Gary V. Vaughan
[not found] ` <5.1.0.12.2.20010412170823.026d5540@mail.lauterbach.co!m>
2001-04-12 9:39 ` Gabriel Dos Reis
2001-04-12 12:27 ` Alexandre Oliva
2001-04-12 13:49 ` Franz Sirl
2001-04-12 13:56 ` Alexandre Oliva
2001-04-12 14:17 ` Franz Sirl
2001-04-12 14:31 ` Alexandre Oliva
2001-04-12 2:58 ` Franz Sirl
2001-04-12 5:32 ` Gabriel Dos Reis
2001-04-12 15:08 ` Richard Henderson
2001-04-11 13:53 ` Phil Edwards
2001-04-11 13:55 ` Neil Booth
2001-04-11 13:58 ` Richard Henderson
2001-04-12 19:50 ` libstdc++ execute tests Gabriel Dos Reis
2001-04-10 17:53 ` Gabriel Dos Reis
2001-04-10 18:00 ` Gabriel Dos Reis
2001-04-10 18:35 ` Richard Henderson
2001-04-10 18:51 ` Gabriel Dos Reis
2019-08-17 1:00 [PATCH V2 0/8] eBPF support for GCC Jose E. Marchesi
2019-08-17 0:51 ` [PATCH V2 1/8] Update config.sub and config.guess Jose E. Marchesi
2019-08-19 1:26 ` Jeff Law
2019-08-17 0:51 ` [PATCH V2 5/8] bpf: make target-supports.exp aware of eBPF Jose E. Marchesi
2019-08-19 1:36 ` Jeff Law
2019-08-19 14:34 ` Jose E. Marchesi
2019-08-19 12:13 ` Segher Boessenkool
2019-08-19 14:44 ` Jose E. Marchesi
2019-08-17 0:51 ` [PATCH V2 6/8] bpf: adjust GCC testsuite to eBPF limitations Jose E. Marchesi
2019-08-19 3:22 ` Jeff Law
2019-08-19 12:21 ` Segher Boessenkool
2019-08-19 15:11 ` Jose E. Marchesi
2019-08-19 19:57 ` Jeff Law
[not found] ` <(Jeff>
2019-08-17 0:51 ` [PATCH V2 3/8] bpf: new libgcc port Jose E. Marchesi
2019-08-19 1:33 ` Jeff Law
2019-08-19 14:06 ` Jose E. Marchesi
2019-08-17 0:51 ` [PATCH V2 7/8] bpf: manual updates for eBPF Jose E. Marchesi
2019-08-19 6:15 ` Jeff Law
2019-08-17 0:51 ` [PATCH V2 4/8] bpf: gcc.target eBPF testsuite Jose E. Marchesi
2019-08-19 1:36 ` Jeff Law
2019-08-17 0:59 ` [PATCH V2 8/8] bpf: add myself as the maintainer for the eBPF port Jose E. Marchesi
2019-08-19 6:26 ` Jeff Law
2019-08-19 12:45 ` Segher Boessenkool
2019-08-17 2:39 ` [PATCH V2 2/8] bpf: new GCC port Jose E. Marchesi
2019-08-19 20:20 ` Richard Sandiford
2019-08-20 14:56 ` Jose E. Marchesi
2019-08-20 15:50 ` Segher Boessenkool
2019-08-20 18:33 ` Richard Sandiford
2019-08-22 5:46 ` Jose E. Marchesi
2019-08-22 9:25 ` Segher Boessenkool
2019-08-23 14:37 ` Richard Sandiford
2019-08-20 15:13 ` Segher Boessenkool
2019-08-20 15:32 ` Jose E. Marchesi
2019-08-20 15:19 ` Jose E. Marchesi
2019-08-20 20:32 ` Jeff Law
2019-08-20 21:42 ` Jose E. Marchesi
2019-08-21 1:03 ` Jeff Law
2019-08-21 11:47 ` Segher Boessenkool
2019-08-21 11:44 ` Segher Boessenkool
2019-08-21 16:57 ` Jonathan Corbet
2019-08-23 19:19 ` Joseph Myers
2019-08-23 20:37 ` Jose E. Marchesi
[not found] <Gerald>
[not found] ` <Pfeifer's>
[not found] ` <message>
[not found] ` <of>
[not found] ` <"Mon>
[not found] ` <"Mon,>
[not found] ` <25>
[not found] ` <"Wed,>
[not found] ` <03>
[not found] ` <"Tue,>
[not found] ` <18>
[not found] ` <Jan>
[not found] ` <2000>
[not found] ` <00:28:52>
[not found] ` <-0800>
[not found] ` <05:46:33>
[not found] ` <-0200>
[not found] ` <orwvox46na.fsf@garnize.lsd.ic.unicamp.br>
2000-04-10 13:40 ` Bad PIC on Solaris Alexandre Oliva
2000-04-11 16:25 ` Richard Henderson
2000-04-11 18:07 ` Alexandre Oliva
2000-04-11 18:16 ` Richard Henderson
2000-04-12 3:40 ` Franz Sirl
2000-04-12 7:19 ` Alexandre Oliva
2000-04-12 7:56 ` Jeffrey A Law
[not found] ` <14:00:52>
[not found] ` <-0500>
[not found] ` <(EST)>
[not found] ` <200001121900.OAA05918@caip.rutgers.edu>
2000-05-01 16:32 ` Patch Re: warning flags Jason Merrill
2000-05-04 5:56 ` Franz Sirl
2000-05-04 7:53 ` Laurynas Biveinis
[not found] ` <15:25:22>
[not found] ` <-0600>
[not found] ` <87u2c2tpa5.fsf@creche.cygnus.com>
[not found] ` <5.0.0.13.2.20000831143109.01f33ec0@mail.lauterbach.com>
2000-08-31 13:12 ` `$' in identifiers -vs- PPC Linux Franz Sirl
2000-10-15 5:03 ` Franz Sirl
2000-10-16 17:25 ` Geoff Keating
2000-10-17 12:44 ` Franz Sirl
2000-10-17 13:19 ` Geoff Keating
2000-10-17 13:35 ` Joseph S. Myers
2000-10-17 14:08 ` Franz Sirl
2000-10-17 14:20 ` Geoff Keating
2000-10-17 15:54 ` Franz Sirl
2001-01-23 14:38 ` Franz Sirl
2001-01-23 16:34 ` Jeffrey A Law
[not found] ` <your>
[not found] ` <mail>
[not found] ` <address>
2001-05-25 13:08 ` PATCH: Table-ize builtins Mark Mitchell
2001-05-25 13:51 ` Gabriel Dos Reis
2001-05-26 4:42 ` Fergus Henderson
2001-05-26 5:06 ` Fergus Henderson
2001-05-26 6:23 ` Joseph S. Myers
2001-05-26 14:26 ` Richard Henderson
2001-05-27 8:25 ` Gabriel Dos Reis
2001-05-27 9:52 ` Joseph S. Myers
2001-05-27 16:16 ` Richard Henderson
2001-05-27 17:43 ` Gabriel Dos Reis
2001-05-27 18:59 ` Richard Henderson
2001-05-28 1:34 ` Gabriel Dos Reis
2001-06-07 16:50 ` Joseph S. Myers
2001-06-03 22:26 ` Mark Mitchell
2001-07-10 23:26 ` C++ PATCH: Fix PR2626 Mark Mitchell
[not found] ` <"Thu,>
[not found] ` <12>
[not found] ` <Apr>
[not found] ` <2001>
[not found] ` <06:44:18>
[not found] ` <Aug>
[not found] ` <1999>
[not found] ` <13:09:01>
[not found] ` <13:55:29>
[not found] ` <+0200>
[not found] ` <(MET>
2000-09-24 10:54 ` [PATCH] doloop_optimize miscompiles openssl Franz Sirl
2000-09-24 15:07 ` Franz Sirl
2000-09-24 22:25 ` Geoff Keating
2000-09-25 1:58 ` Franz Sirl
2000-09-25 14:59 ` Franz Sirl
2000-09-25 15:35 ` Geoff Keating
2000-09-26 5:24 ` Franz Sirl
[not found] ` <Franz>
2000-09-27 4:57 ` Michael Hayes
2000-09-27 5:32 ` Franz Sirl
2000-09-28 10:43 ` Franz Sirl
2000-09-28 15:21 ` Geoff Keating
2000-09-28 15:41 ` Franz Sirl
2000-09-28 15:52 ` Geoff Keating
2000-09-28 15:56 ` Jeffrey A Law
[not found] ` <01040902015901.12074@enzo.bigblue.local>
[not found] ` <5.1.0.12.2.20010412232819.0475ebc0@mail.lauterbach.com>
2001-04-12 14:44 ` gcc.c-torture/execute/20010114-2.c Geoff Keating
2001-04-12 14:51 ` gcc.c-torture/execute/20010114-2.c Franz Sirl
[not found] ` <2019>
[not found] ` <13:47:01>
[not found] ` <-0600")>
2019-08-19 20:32 ` [PATCH V2 6/8] bpf: adjust GCC testsuite to eBPF limitations jose.marchesi
-- strict thread matches above, loose matches on Subject: below --
2001-04-11 17:14 Mainline bootstrap failure (Re: libstdc++ execute tests) Peter Schmid
2000-12-18 0:13 [g++] find build_headers, toplevel Benjamin Kosnik
2000-12-18 0:24 ` Alexandre Oliva
2000-12-18 0:28 ` Benjamin Kosnik
2000-12-18 0:38 ` Alexandre Oliva
2000-12-18 2:40 ` Franz Sirl
2000-12-22 1:17 ` Alexandre Oliva
1999-12-01 22:12 Loop clean up Michael Hayes
1999-12-31 16:38 ` Michael Hayes
2000-01-04 22:17 ` Jeffrey A Law
2000-01-18 3:15 ` Franz Sirl
2000-01-18 3:35 ` Alexandre Oliva
2000-01-18 8:11 ` Alexandre Oliva
2000-01-18 8:49 ` Alexandre Oliva
2000-02-01 20:31 ` Jeffrey A Law
2000-02-01 21:01 ` Alexandre Oliva
2000-02-01 21:12 ` Jeffrey A Law
2000-02-01 21:17 ` Alexandre Oliva
2000-02-02 14:19 ` Jeffrey A Law
2000-01-18 9:54 ` Franz Sirl
2000-01-18 10:03 ` Clinton Popetz
2000-01-18 14:47 ` Franz Sirl
2000-01-18 21:32 ` Michael Hayes
2000-01-18 15:13 ` Michael Hayes
[not found] <u8so2qxmij.fsf@gromit.rhein-neckar.de>
1999-11-03 4:09 ` Bootstrap failure with enable-checking in current CVS (varasm.c: 3423) Franz Sirl
1999-11-03 5:02 ` Franz Sirl
1999-11-03 10:42 ` Richard Henderson
1999-11-30 23:59 ` Richard Henderson
1999-11-30 23:59 ` Franz Sirl
1999-11-03 23:16 ` Andreas Jaeger
1999-11-04 6:03 ` Franz Sirl
1999-11-30 23:59 ` Franz Sirl
1999-11-30 23:59 ` Andreas Jaeger
1999-11-30 23:59 ` Franz Sirl
1999-08-02 19:21 Patch to linux.h Jason Merrill
1999-08-04 1:55 ` Jeffrey A Law
1999-08-12 4:55 ` Gerald Pfeifer
1999-08-12 9:36 ` Jason Merrill
1999-08-12 9:54 ` Franz Sirl
1999-08-12 12:14 ` Jeffrey A Law
1999-08-12 16:09 ` Franz Sirl
1999-08-13 2:06 ` Philip Blundell
1999-08-13 2:19 ` Franz Sirl
1999-08-13 2:29 ` Philip Blundell
1999-08-31 22:41 ` Philip Blundell
1999-08-31 22:41 ` Franz Sirl
1999-08-31 22:41 ` Philip Blundell
1999-08-31 22:41 ` Franz Sirl
1999-08-12 18:08 ` Jason Merrill
1999-08-13 2:57 ` Gerald Pfeifer
1999-08-31 22:41 ` Gerald Pfeifer
1999-08-31 22:41 ` Jason Merrill
1999-08-31 22:41 ` Jeffrey A Law
1999-08-31 22:41 ` Franz Sirl
1999-08-16 8:57 ` Gerald Pfeifer
1999-08-31 22:41 ` Gerald Pfeifer
1999-08-31 22:41 ` Jason Merrill
1999-08-31 22:41 ` Gerald Pfeifer
1999-08-31 22:41 ` Jeffrey A Law
1999-08-31 22:41 ` Jason Merrill
[not found] <Kaveh>
[not found] ` <R.>
[not found] <Tom>
[not found] <Alexandre>
[not found] <Neil>
[not found] <Benjamin>
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).