lkml.org 
[lkml]   [2022]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: mainline build failure of powerpc allmodconfig for prom_init_check
    Date
    Linus Torvalds <torvalds@linux-foundation.org> writes:
    > On Sun, Jul 17, 2022 at 9:41 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
    >>
    >> > li 4,254 #,
    >>
    >> Here we load 254 into r4, which is the 2nd parameter to memset (c).
    >
    > I love how even powerpc people know that "4" is bogus, and have to
    > make it clear that it means "r4".

    I wouldn't say it's bogus, I was just translating from asm to English :)

    But I agree it's preferable to use a proper register name rather than a
    bare integer. I never write asm using bare integers, I always use r4 or
    %r4, because as you say it's too easy to get mixed up otherwise.

    When looking at generated code I usually use objdump -d output, which
    uses the "r4" syntax.

    > It's not even an IBM thing. S390 uses perfectly sane register syntax,
    > and calls things '%r4" etc.

    as accepts that syntax if you tell it to.

    We use that syntax in some of our newer inline asm blocks.

    > The human-written asm files have those #define's in headers just to
    > make things slightly more legible, because apparently the assembler
    > doesn't even *accept* the sane names.

    I would like to switch to using %rX everywhere and get rid of those
    defines, but it's never seemed like it's worth the churn. We have ~48K
    lines of asm in arch/powerpc.

    cheers

    \
     
     \ /
      Last update: 2022-07-19 16:13    [W:2.205 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site