Il 04/04/2013 17:46, Peter Maydell ha scritto: > On 4 April 2013 16:41, Paolo Bonzini <pbonz...@redhat.com> wrote: >> Il 04/04/2013 17:32, Peter Maydell ha scritto: >>> This is kind of ugly but it looks like the kernel is kind >>> of ugly too (ie elf_greg_t as a type is not defined the >>> same way necessarily for all targets and ABIs). At some >>> point this type should probably live in a header file >>> in linux-user/$arch/ but for now I guess it can pass. >>> >>> Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> >> >> I'll add abi_reg to abitypes.h and move tswapreg there, so >> that the signal handling structures could use it too. > > I started off thinking that was the right thing, but then > I realised that the signal handling structures vary in what > they use (eg the MIPS ones tend to really use u32 and u64), > so they aren't necessarily the same type as elf_greg_t).
Right, MIPS o32 uses uint64_t. So I'll keep target_elf_greg_t as in v2. > I think the conceptual ideal is that we should have > abi types which match the kernel's user-facing types. > This is a bit messed up here because the kernel doesn't > actually expose elf_greg_t in most archs (and because > MIPS has different types for "what the kernel thinks > long is" vs "what userspace thinks long is", which is > just plain confusing when looking at non-user-facing > struct definitions). Paolo