On 01/04/2018 11:20 AM, Joseph Myers wrote: > On Thu, 4 Jan 2018, Richard Earnshaw wrote: > >> 1 - generic modifications to GCC providing the builtin function for all >> architectures and expanding to an implementation that gives the >> logical behaviour of the builtin only. A warning is generated if >> this expansion path is used that code will execute correctly but >> without providing protection against speculative use. > > Presumably it would make sense to have a standard way for architectures > with no speculative execution to just use the generic version, but without > the warning? E.g., split up default_inhibit_load_speculation so that it > generates the warning then calls another function with the same prototype, > so such architectures can just define the hook to use that other function? > Seems wise. There's still architectures that don't speculate or don't speculate enough to trigger these problems.
Jeff