• Mathieu Desnoyers's avatar
    selftests/rseq: Fix ppc32 missing instruction selection "u" and "x" for load/store · 4e9c8fd7
    Mathieu Desnoyers authored
    commit de6b52a2
    
     upstream.
    
    Building the rseq basic test  with
    gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12)
    Target: powerpc-linux-gnu
    
    leads to these errors:
    
    /tmp/ccieEWxU.s: Assembler messages:
    /tmp/ccieEWxU.s:118: Error: syntax error; found `,', expected `('
    /tmp/ccieEWxU.s:118: Error: junk at end of line: `,8'
    /tmp/ccieEWxU.s:121: Error: syntax error; found `,', expected `('
    /tmp/ccieEWxU.s:121: Error: junk at end of line: `,8'
    /tmp/ccieEWxU.s:626: Error: syntax error; found `,', expected `('
    /tmp/ccieEWxU.s:626: Error: junk at end of line: `,8'
    /tmp/ccieEWxU.s:629: Error: syntax error; found `,', expected `('
    /tmp/ccieEWxU.s:629: Error: junk at end of line: `,8'
    /tmp/ccieEWxU.s:735: Error: syntax error; found `,', expected `('
    /tmp/ccieEWxU.s:735: Error: junk at end of line: `,8'
    /tmp/ccieEWxU.s:738: Error: syntax error; found `,', expected `('
    /tmp/ccieEWxU.s:738: Error: junk at end of line: `,8'
    /tmp/ccieEWxU.s:741: Error: syntax error; found `,', expected `('
    /tmp/ccieEWxU.s:741: Error: junk at end of line: `,8'
    Makefile:581: recipe for target 'basic_percpu_ops_test.o' failed
    
    Based on discussion with Linux powerpc maintainers and review of
    the use of the "m" operand in powerpc kernel code, add the missing
    %Un%Xn (where n is operand number) to the lwz, stw, ld, and std
    instructions when used with "m" operands.
    
    Using "WORD" to mean either a 32-bit or 64-bit type depending on
    the architecture is misleading. The term "WORD" really means a
    32-bit type in both 32-bit and 64-bit powerpc assembler. The intent
    here is to wrap load/store to intptr_t into common macros for both
    32-bit and 64-bit.
    
    Rename the macros with a RSEQ_ prefix, and use the terms "INT"
    for always 32-bit type, and "LONG" for architecture bitness-sized
    type.
    Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Link: https://lkml.kernel.org/r/20220124171253.22072-10-mathieu.desnoyers@efficios.com
    
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    4e9c8fd7
rseq-ppc.h 22.5 KB