Re: [PATCH 01/11] Add __builtin_speculation_safe_value

2018-08-01 Thread Richard Earnshaw (lists)
On 01/08/18 09:54, Jakub Jelinek wrote: > On Wed, Aug 01, 2018 at 09:48:50AM +0100, Richard Earnshaw (lists) wrote: >> Sorry about that, I did run a full bootstrap on x86, but I had the x86 >> mitigation patch applied, so it didn't trip this. > > Also, I see > FAIL: c-c++-common/spec-barrier-1.c

Re: [PATCH 01/11] Add __builtin_speculation_safe_value

2018-08-01 Thread Jakub Jelinek
On Wed, Aug 01, 2018 at 09:48:50AM +0100, Richard Earnshaw (lists) wrote: > Sorry about that, I did run a full bootstrap on x86, but I had the x86 > mitigation patch applied, so it didn't trip this. Also, I see FAIL: c-c++-common/spec-barrier-1.c -Wc++-compat (test for excess errors) FAIL: c-c++

Re: [PATCH 01/11] Add __builtin_speculation_safe_value

2018-08-01 Thread Richard Earnshaw (lists)
On 31/07/18 21:51, Ian Lance Taylor via gcc-patches wrote: > On Tue, Jul 31, 2018 at 12:25 PM, H.J. Lu wrote: >> On Mon, Jul 30, 2018 at 6:16 AM, Richard Biener wrote: >>> On Fri, 27 Jul 2018, Richard Earnshaw wrote: >>> This patch defines a new intrinsic function __builtin_specula

Re: [PATCH 01/11] Add __builtin_speculation_safe_value

2018-07-31 Thread Ian Lance Taylor via gcc-patches
On Tue, Jul 31, 2018 at 12:25 PM, H.J. Lu wrote: > On Mon, Jul 30, 2018 at 6:16 AM, Richard Biener wrote: >> On Fri, 27 Jul 2018, Richard Earnshaw wrote: >> >>> >>> This patch defines a new intrinsic function >>> __builtin_speculation_safe_value. A generic default implementation is >>> defined w

Re: [PATCH 01/11] Add __builtin_speculation_safe_value

2018-07-31 Thread H.J. Lu
On Mon, Jul 30, 2018 at 6:16 AM, Richard Biener wrote: > On Fri, 27 Jul 2018, Richard Earnshaw wrote: > >> >> This patch defines a new intrinsic function >> __builtin_speculation_safe_value. A generic default implementation is >> defined which will attempt to use the backend pattern >> "speculati

Re: [PATCH 01/11] Add __builtin_speculation_safe_value

2018-07-30 Thread Richard Biener
On Fri, 27 Jul 2018, Richard Earnshaw wrote: > > This patch defines a new intrinsic function > __builtin_speculation_safe_value. A generic default implementation is > defined which will attempt to use the backend pattern > "speculation_safe_barrier". If this pattern is not defined, or if it > i

Re: [PATCH 01/11] Add __builtin_speculation_safe_value

2018-07-27 Thread Richard Earnshaw (lists)
On 27/07/18 13:11, Nathan Sidwell wrote: > + if (!COMPLETE_TYPE_P (type)) > +goto incompatible; > > Are incomplete integral types a thing? (forward enum extension?) > I don't think so, at least not at the level of having an instance of such a type (as opposed to a pointer to one). Enums,

Re: [PATCH 01/11] Add __builtin_speculation_safe_value

2018-07-27 Thread Nathan Sidwell
On 07/27/2018 08:32 AM, Richard Earnshaw (lists) wrote: The intention is to allow pointer to anything. Oh, the speculation safe fetch is of the pointer itself, not the thing being pointed to. I'd missed that. I'm not sure I understand why that needs special casing down to the expander (why

Re: [PATCH 01/11] Add __builtin_speculation_safe_value

2018-07-27 Thread Richard Earnshaw (lists)
On 27/07/18 13:11, Nathan Sidwell wrote: > On 07/27/2018 05:37 AM, Richard Earnshaw wrote: > > +/* Work out the size of the first argument of a call to > +   __builtin_speculation_safe_value.  Only pointers and integral types > +   are permitted.  Return -1 if the argument type is not supported or

Re: [PATCH 01/11] Add __builtin_speculation_safe_value

2018-07-27 Thread Nathan Sidwell
On 07/27/2018 05:37 AM, Richard Earnshaw wrote: +/* Work out the size of the first argument of a call to + __builtin_speculation_safe_value. Only pointers and integral types + are permitted. Return -1 if the argument type is not supported or + the size is too large; 0 if the argument type

[PATCH 01/11] Add __builtin_speculation_safe_value

2018-07-27 Thread Richard Earnshaw
This patch defines a new intrinsic function __builtin_speculation_safe_value. A generic default implementation is defined which will attempt to use the backend pattern "speculation_safe_barrier". If this pattern is not defined, or if it is not available, then the compiler will emit a warning, bu