qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 19/43] bsd-user: start to move target CPU functions to tar


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v2 19/43] bsd-user: start to move target CPU functions to target_arch*
Date: Fri, 27 Aug 2021 06:39:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 8/26/21 11:11 PM, imp@bsdimp.com wrote:
> From: Warner Losh <imp@FreeBSD.org>
> 
> Move the CPU functons into target_arch_cpu.c that are unique to each

Typo "functions"

> CPU. These are defined in target_arch.h.
> 
> Signed-off-by: Stacey Son <sson@FreeBSD.org>
> Signed-off-by: Warner Losh <imp@bsdimp.com>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  bsd-user/i386/target_arch.h       | 31 +++++++++++++
>  bsd-user/i386/target_arch_cpu.c   | 75 +++++++++++++++++++++++++++++++
>  bsd-user/main.c                   | 12 -----
>  bsd-user/x86_64/target_arch.h     | 31 +++++++++++++
>  bsd-user/x86_64/target_arch_cpu.c | 75 +++++++++++++++++++++++++++++++
>  configure                         |  7 +--
>  meson.build                       |  8 +++-
>  7 files changed, 219 insertions(+), 20 deletions(-)
>  create mode 100644 bsd-user/i386/target_arch.h
>  create mode 100644 bsd-user/i386/target_arch_cpu.c
>  create mode 100644 bsd-user/x86_64/target_arch.h
>  create mode 100644 bsd-user/x86_64/target_arch_cpu.c

> diff --git a/bsd-user/main.c b/bsd-user/main.c
> index f7e1df5da5..7b3550898d 100644
> --- a/bsd-user/main.c
> +++ b/bsd-user/main.c
> @@ -72,13 +72,6 @@ void gemu_log(const char *fmt, ...)
>      va_end(ap);
>  }
>  
> -#if defined(TARGET_I386)
> -int cpu_get_pic_interrupt(CPUX86State *env)
> -{
> -    return -1;
> -}
> -#endif

Let's avoid that using a stub.

> diff --git a/meson.build b/meson.build
> index f2e148eaf9..5fe6b4aae6 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -2560,9 +2560,13 @@ foreach target : target_dirs
>      if 'CONFIG_LINUX_USER' in config_target
>        base_dir = 'linux-user'
>        target_inc += include_directories('linux-user/host/' / 
> config_host['ARCH'])
> -    else
> +    endif
> +    if 'CONFIG_BSD_USER' in config_target
>        base_dir = 'bsd-user'
> -      target_inc += include_directories('bsd-user/freebsd')
> +      target_inc += include_directories('bsd-user/' / targetos)
> +#     target_inc += include_directories('bsd-user/host/' / 
> config_host['ARCH'])

Left-over?

> +      dir = base_dir / abi
> +      arch_srcs += files(dir / 'target_arch_cpu.c')
>      endif
>      target_inc += include_directories(
>        base_dir,
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]