[lkml]   [2021]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC PATCH] LKMM: Add ctrl_dep() macro for control dependency
* Segher Boessenkool:

> Hi!
> On Wed, Sep 29, 2021 at 02:28:37PM +0200, Florian Weimer wrote:
>> If you need a specific instruction emitted, you need a compiler
>> intrinsic or inline assembly.
> Not an intrinsic. Builtins (like almost all other code) do not say
> "generate this particular machine code", they say "generate code that
> does <this>". That is one reason why builtins are more powerful than
> inline assembler (another related reason is that they tell the compiler
> exactly what behaviour is expected).

I meant that if the object code has to contain a specific instruction
sequence involving a conditional, it needs some form of compiler
support. Adding some volatile here and some form of a compiler barrier
there is very brittle.

>> I don't think it's possible to piggy-back this on something else.
> Unless we get a description of what this does in term of language
> semantics (instead of generated machine code), there is no hope, even.

True. For example, if the argument contains a sequence point, what does
that even mean?


 \ /
  Last update: 2021-09-29 21:47    [W:0.160 / U:0.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site