]> asedeno.scripts.mit.edu Git - linux.git/commit
MIPS: ptrace: introduce NT_MIPS_MSA regset
authorPaul Burton <paul.burton@mips.com>
Tue, 20 Nov 2018 20:41:05 +0000 (20:41 +0000)
committerPaul Burton <paul.burton@mips.com>
Wed, 21 Nov 2018 05:05:39 +0000 (21:05 -0800)
commit3cd640832894b85b5929d5bda74505452c800421
treebce9c017f2e705f2b6ea2e83bafecb1a287901bf
parentbec0de4cfad21bd284dbddee016ed1767a5d2823
MIPS: ptrace: introduce NT_MIPS_MSA regset

The current methods for obtaining FP context via ptrace only provide
either 32 or 64 bits per data register. With MSA, where vector registers
are aliased with scalar FP data registers, those registers are 128 bits
wide. Thus a new mechanism is required for userland to access those
registers via ptrace. This patch introduces an NT_MIPS_MSA regset which
provides, in this order:

  - The full 128 bits value of each vector register, in native
    endianness saved as though elements are doubles. That is, the format
    of each vector register is as would be obtained by saving it to
    memory using an st.d instruction.

  - The 32 bit scalar FP implementation register (FIR).

  - The 32 bit scalar FP control & status register (FCSR).

  - The 32 bit MSA implementation register (MSAIR).

  - The 32 bit MSA control & status register (MSACSR).

The provision of the FIR & FCSR registers in addition to the MSA
equivalents allows scalar FP context to be retrieved as a subset of
the context available via this regset. Along with the MSA equivalents
they also nicely form the final 128 bit "register" of the regset.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/21180/
Cc: linux-mips@linux-mips.org
arch/mips/kernel/ptrace.c
include/uapi/linux/elf.h