lkml.org 
[lkml]   [2021]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC PATCH] LKMM: Add ctrl_dep() macro for control dependency
Date
* Linus Torvalds:

> On Fri, Oct 1, 2021 at 9:26 AM Florian Weimer <fweimer@redhat.com> wrote:
>>
>> Will any conditional branch do, or is it necessary that it depends in
>> some way on the data read?
>
> The condition needs to be dependent on the read.
>
> (Easy way to see it: if the read isn't related to the conditional or
> write data/address, the read could just be delayed to after the
> condition and the store had been done).

That entirely depends on how the hardware is specified to work. And
the hardware could recognize certain patterns as always producing the
same condition codes, e.g., AND with zero. Do such tests still count?
It depends on what the specification says.

What I really dislike about this: Operators like & and < now have side
effects, and is no longer possible to reason about arithmetic
expressions in isolation.

\
 
 \ /
  Last update: 2021-10-10 16:08    [W:0.116 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site