lkml.org 
[lkml]   [2021]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC] LKMM: Add volatile_if()
    On Fri, Jun 04, 2021 at 01:31:48PM +0200, Peter Zijlstra wrote:
    > On Fri, Jun 04, 2021 at 11:44:00AM +0100, Will Deacon wrote:
    > > > +{
    > > > + asm_volatile_goto("cbnz %0, %l[l_yes]"
    > > > + : : "r" (cond) : "cc", "memory" : l_yes);
    > > > + return 0;
    > > > +l_yes:
    > > > + return 1;
    > > > +}
    > >
    > > nit: you don't need the "cc" clobber here.
    >
    > Yeah I know, "cc" is implied.

    It isn't needed at all here. cbnz does not write to the condition
    register. Neither does it change or access memory, but the "memory"
    clobber is to force a false dependency. Writing "cc" as well looks a
    bit confusing, given that.


    Segher

    \
     
     \ /
      Last update: 2021-06-04 17:52    [W:5.242 / U:0.268 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site