qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v8 00/29] Add LoongArch linux-user emulation support


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v8 00/29] Add LoongArch linux-user emulation support
Date: Tue, 2 Nov 2021 09:31:49 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0

Hi,

On 11/1/21 10:51, Song Gao wrote:
> 
> This series only support linux-user emulation.
> More about LoongArch at: https://github.com/loongson/
> 
> The latest kernel:
>   * https://github.com/loongson/linux/tree/loongarch-next

>  create mode 100644 target/loongarch/insn_trans/trans_arith.c
>  create mode 100644 target/loongarch/insn_trans/trans_atomic.c
>  create mode 100644 target/loongarch/insn_trans/trans_bit.c
>  create mode 100644 target/loongarch/insn_trans/trans_branch.c
>  create mode 100644 target/loongarch/insn_trans/trans_extra.c
>  create mode 100644 target/loongarch/insn_trans/trans_farith.c
>  create mode 100644 target/loongarch/insn_trans/trans_fcmp.c
>  create mode 100644 target/loongarch/insn_trans/trans_fcnv.c
>  create mode 100644 target/loongarch/insn_trans/trans_fmemory.c
>  create mode 100644 target/loongarch/insn_trans/trans_fmov.c
>  create mode 100644 target/loongarch/insn_trans/trans_memory.c
>  create mode 100644 target/loongarch/insn_trans/trans_shift.c

I was expecting the QEMU coding style to mention "included C source
files must be named .c.inc" but I can see it. However, see:

commit 139c1837db7eaee53e1c441629b5bcc159e1deb0
Author: Paolo Bonzini <pbonzini@redhat.com>
Date:   Tue Feb 4 12:41:01 2020 +0100

    meson: rename included C source files to .c.inc

    With Makefiles that have automatically generated dependencies, you
    generated includes are set as dependencies of the Makefile, so that
    they are built before everything else and they are available when
    first building the .c files.

    Alternatively you can use a fine-grained dependency, e.g.

            target/arm/translate.o: target/arm/decode-neon-shared.inc.c

    With Meson you have only one choice and it is a third option, namely
    "build at the beginning of the corresponding target"; the way you
    express it is to list the includes in the sources of that target.

    The problem is that Meson decides if something is a source vs. a
    generated include by looking at the extension: '.c', '.cc', '.m',
    '.C' are sources, while everything else is considered an include---
    including '.inc.c'.

    Use '.c.inc' to avoid this, as it is consistent with our other
    convention of using '.rst.inc' for included reStructuredText files.
    The editorconfig file is adjusted.

So IMO since these C files are included, they should be renamed
accordingly.

Regards,

Phil.



reply via email to

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