Re: [PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

2018-03-16 Thread Björn Weber
I ran a number of tests against this patch on non-ARM platforms and noticed something weird. The default_speculation_safe_load seems to have a logic twist. When cmpptr is greater or equal to the upper_bound the call is considered in-range. In: gcc/targhooks.c [..]

Re: [PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

2018-01-12 Thread Bill Schmidt
Hi Richard and Jeff, Sorry I missed this earlier today, it somehow ended up in my spam folder... > On Jan 12, 2018, at 10:08 AM, Richard Earnshaw (lists) > wrote: > > On 10/01/18 23:26, Jeff Law wrote: >> On 01/08/2018 09:01 AM, Bill Schmidt wrote: >>> On Jan 8,

Re: [PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

2018-01-12 Thread Richard Earnshaw (lists)
On 10/01/18 23:26, Jeff Law wrote: > On 01/08/2018 09:01 AM, Bill Schmidt wrote: >> On Jan 8, 2018, at 8:06 AM, Richard Earnshaw (lists) >> wrote: >>> >>> On 08/01/18 02:20, Bill Schmidt wrote: Hi Richard, Unfortunately, I don't see any way that this will

Re: [PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

2018-01-10 Thread Jeff Law
On 01/08/2018 02:03 PM, Bill Schmidt wrote: > > I agree 100% with this approach. I just wanted to raise the point in case > other architectures have different needs. Power can work around this > by just ignoring 4 of the 5 arguments. As long as nobody else needs > *additional* arguments, this

Re: [PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

2018-01-10 Thread Jeff Law
On 01/09/2018 10:11 AM, Bill Schmidt wrote: > On Jan 9, 2018, at 4:21 AM, Richard Earnshaw (lists) > wrote: >> >> On 08/01/18 16:01, Bill Schmidt wrote: >>> On Jan 8, 2018, at 8:06 AM, Richard Earnshaw (lists) >>> wrote: On 08/01/18

Re: [PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

2018-01-10 Thread Jeff Law
On 01/08/2018 09:01 AM, Bill Schmidt wrote: > On Jan 8, 2018, at 8:06 AM, Richard Earnshaw (lists) > wrote: >> >> On 08/01/18 02:20, Bill Schmidt wrote: >>> Hi Richard, >>> >>> Unfortunately, I don't see any way that this will be useful for the ppc >>> targets. We

Re: [PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

2018-01-09 Thread Bill Schmidt
On Jan 9, 2018, at 4:21 AM, Richard Earnshaw (lists) wrote: > > On 08/01/18 16:01, Bill Schmidt wrote: >> On Jan 8, 2018, at 8:06 AM, Richard Earnshaw (lists) >> wrote: >>> >>> On 08/01/18 02:20, Bill Schmidt wrote: Hi Richard,

Re: [PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

2018-01-09 Thread Richard Earnshaw (lists)
On 08/01/18 16:01, Bill Schmidt wrote: > On Jan 8, 2018, at 8:06 AM, Richard Earnshaw (lists) > wrote: >> >> On 08/01/18 02:20, Bill Schmidt wrote: >>> Hi Richard, >>> >>> Unfortunately, I don't see any way that this will be useful for the ppc >>> targets. We don't

Re: [PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

2018-01-08 Thread Bill Schmidt
On Jan 8, 2018, at 1:40 PM, Jeff Law wrote: > > On 01/08/2018 07:19 AM, Bill Schmidt wrote: >> >>> On Jan 7, 2018, at 10:47 PM, Jeff Law wrote: >>> >>> On 01/07/2018 07:20 PM, Bill Schmidt wrote: Hi Richard, Unfortunately, I don't see any way

Re: [PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

2018-01-08 Thread Jeff Law
On 01/08/2018 07:19 AM, Bill Schmidt wrote: > >> On Jan 7, 2018, at 10:47 PM, Jeff Law wrote: >> >> On 01/07/2018 07:20 PM, Bill Schmidt wrote: >>> Hi Richard, >>> >>> Unfortunately, I don't see any way that this will be useful for the ppc >>> targets. We don't >>> have a way

Re: [PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

2018-01-08 Thread Bill Schmidt
On Jan 8, 2018, at 9:23 AM, Richard Earnshaw (lists) wrote: > > On 08/01/18 14:19, Bill Schmidt wrote: >> >>> On Jan 7, 2018, at 10:47 PM, Jeff Law wrote: >>> >>> On 01/07/2018 07:20 PM, Bill Schmidt wrote: Hi Richard, Unfortunately,

Re: [PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

2018-01-08 Thread Bill Schmidt
On Jan 8, 2018, at 8:06 AM, Richard Earnshaw (lists) wrote: > > On 08/01/18 02:20, Bill Schmidt wrote: >> Hi Richard, >> >> Unfortunately, I don't see any way that this will be useful for the ppc >> targets. We don't >> have a way to force resolution of a condition

Re: [PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

2018-01-08 Thread Richard Earnshaw (lists)
On 08/01/18 14:19, Bill Schmidt wrote: > >> On Jan 7, 2018, at 10:47 PM, Jeff Law wrote: >> >> On 01/07/2018 07:20 PM, Bill Schmidt wrote: >>> Hi Richard, >>> >>> Unfortunately, I don't see any way that this will be useful for the ppc >>> targets. We don't >>> have a way to

Re: [PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

2018-01-08 Thread Bill Schmidt
> On Jan 7, 2018, at 10:47 PM, Jeff Law wrote: > > On 01/07/2018 07:20 PM, Bill Schmidt wrote: >> Hi Richard, >> >> Unfortunately, I don't see any way that this will be useful for the ppc >> targets. We don't >> have a way to force resolution of a condition prior to

Re: [PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

2018-01-08 Thread Richard Earnshaw (lists)
On 08/01/18 02:20, Bill Schmidt wrote: > Hi Richard, > > Unfortunately, I don't see any way that this will be useful for the ppc > targets. We don't > have a way to force resolution of a condition prior to continuing > speculation, so this > will just introduce another comparison that we would

Re: [PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

2018-01-08 Thread Richard Biener
On Mon, Jan 8, 2018 at 5:47 AM, Jeff Law wrote: > On 01/07/2018 07:20 PM, Bill Schmidt wrote: >> Hi Richard, >> >> Unfortunately, I don't see any way that this will be useful for the ppc >> targets. We don't >> have a way to force resolution of a condition prior to continuing

Re: [PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

2018-01-07 Thread Jeff Law
On 01/07/2018 07:20 PM, Bill Schmidt wrote: > Hi Richard, > > Unfortunately, I don't see any way that this will be useful for the ppc > targets. We don't > have a way to force resolution of a condition prior to continuing > speculation, so this > will just introduce another comparison that we

Re: [PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

2018-01-07 Thread Bill Schmidt
Hi Richard, Unfortunately, I don't see any way that this will be useful for the ppc targets. We don't have a way to force resolution of a condition prior to continuing speculation, so this will just introduce another comparison that we would speculate past. For our mitigation we will have to

[PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

2018-01-04 Thread Richard Earnshaw
This patch adds generic support for the new builtin __builtin_load_no_speculate. It provides the overloading of the different access sizes and a default fall-back expansion for targets that do not support a mechanism for inhibiting speculation. * builtin_types.def