On 3/2/21 5:24 AM, Richard Henderson wrote:
> On 3/1/21 8:49 AM, Claudio Fontana wrote:
>> vfp_get_fpsr and vfp_set_fpsr are needed also for KVM.
>>
>> Signed-off-by: Claudio Fontana<[email protected]>
>> ---
>> target/arm/cpu-vfp.h | 29 +++++
>> target/arm/cpu-vfp.c | 92 +++++++++++++++
>> target/arm/kvm/helper-stubs.c | 10 ++
>> target/arm/tcg/cpu-vfp.c | 146 +++++++++++++++++++++++
>> target/arm/tcg/vfp_helper.c | 210 +---------------------------------
>> target/arm/meson.build | 1 +
>> target/arm/tcg/meson.build | 1 +
>> 7 files changed, 281 insertions(+), 208 deletions(-)
>> create mode 100644 target/arm/cpu-vfp.h
>> create mode 100644 target/arm/cpu-vfp.c
>> create mode 100644 target/arm/tcg/cpu-vfp.c
>
> kvm/helper-stubs.c should be for all !tcg.
>
>
> r~
>
Can you explain more what you mean?
In this patch kvm/helper-stubs.c is updated to include two stubs:
uint32_t vfp_get_fpscr_from_host(CPUARMState *env)
{
return 0;
}
void vfp_set_fpscr_to_host(CPUARMState *env, uint32_t val)
{
}
The corresponding tcg code instead is in tcg/arm/cpu-vtp.c.
For the non-stub code that comprises
vfp_get_fpscr
vfp_set_fpscr
the code is moved to target/arm/cpu-vfp.c,
to be shared by tcg and kvm.
Thanks,
C