This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: RISCV NFPREG?
On Thu, Oct 10, 2019 at 7:41 AM Maciej W. Rozycki <macro@wdc.com> wrote:
> Please observe however that for ELF we actually have 33 uniform FPR slots
> in the NT_PRFPREG core file note, because this is how Linux regsets work,
> even though the FCSR slot is only partially occupied; consequently this
> also applies to PTRACE_GETREGSET/PTRACE_SETREGSET ptrace(2) requests.
I wrote this linux kernel ptrace support. I did it this way because I
didn't see a better way to do it. But if you look at riscv_fpr_get
and riscv_fpr_set, you will see that I'm using two copyout/copyin
calls to copy the two different types of registers. I'm not making
any assumptions about the number of registers there. We probably do
have to accept that we have 33 FP registers, but we need to be careful
about what exactly this means, which is why I suggested adding
comments to document that this is really 32 FP regs and 1 FCSR which
is not the same thing as 33 FP regs. I'm not an expert with the linux
kernel/glibc interface, so I don't understand all the implications
here. I'm not objecting to your changes. I'm just trying to provide
a little history.
Jim