[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: |
Warner Losh |
Subject: |
Re: [PATCH v2 19/43] bsd-user: start to move target CPU functions to target_arch* |
Date: |
Fri, 27 Aug 2021 09:41:07 -0600 |
> On Aug 26, 2021, at 10:39 PM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> 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"
doh! Thanks!
>> 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.
Not sure I understand this comment. I’ve removed this code. And I have i386 and
x86_64
as separate functions because that’s how Stacey broke it up. I have a todo item
to merge
them back together once I’m caught up.
>> 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?
Yea. Future changes will need this line. I’ll delete for now.
>> + dir = base_dir / abi
>> + arch_srcs += files(dir / 'target_arch_cpu.c')
>> endif
>> target_inc += include_directories(
>> base_dir,
signature.asc
Description: Message signed with OpenPGP
- Re: [PATCH v2 12/43] bsd-user: remove a.out support, (continued)
- [PATCH v2 14/43] bsd-user: elfload: simplify bswap a bit., imp, 2021/08/26
- [PATCH v2 15/43] bsd-user: assume pthreads and support of __thread, imp, 2021/08/26
- [PATCH v2 13/43] bsd-user: TARGET_NGROUPS unused in this file, remove, imp, 2021/08/26
- [PATCH v2 17/43] bsd-user: Include host-os.h from main, imp, 2021/08/26
- [PATCH v2 16/43] bsd-user: add host-os.h, imp, 2021/08/26
- [PATCH v2 18/43] bsd-user: save the path to the qemu emulator, imp, 2021/08/26
- [PATCH v2 19/43] bsd-user: start to move target CPU functions to target_arch*, imp, 2021/08/26
- [PATCH v2 22/43] bsd-user: Include more things in qemu.h, imp, 2021/08/26
- [PATCH v2 28/43] bsd-user: Add system independent stack, data and text limiting, imp, 2021/08/26
- [PATCH v2 20/43] bsd-user: Move per-cpu code into target_arch_cpu.h, imp, 2021/08/26
- [PATCH v2 24/43] bsd-user: Create target specific vmparam.h, imp, 2021/08/26
- [PATCH v2 26/43] bsd-user: *BSD specific siginfo defintions, imp, 2021/08/26
- [PATCH v2 21/43] bsd-user: pull in target_arch_thread.h update target_arch_elf.h, imp, 2021/08/26
- [PATCH v2 32/43] bsd-user: Make cpu_model and cpu_type visible to all of main.c, imp, 2021/08/26
- [PATCH v2 33/43] bsd-user: update debugging in mmap.c, imp, 2021/08/26
- [PATCH v2 39/43] bsd-user: move qemu_log to later in the file, imp, 2021/08/26
- [PATCH v2 29/43] bsd-user: elf cleanup, imp, 2021/08/26