[Top][All Lists]

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

Re: [PATCH v7 12/35] Hexagon (target/hexagon) instruction attributes

From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v7 12/35] Hexagon (target/hexagon) instruction attributes
Date: Mon, 25 Jan 2021 17:21:01 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

On 1/22/21 11:01 PM, Taylor Simpson wrote:
>> -----Original Message-----
>> From: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com> On
>> Behalf Of Philippe Mathieu-Daudé
>> Sent: Friday, January 22, 2021 11:54 AM
>> To: Taylor Simpson <tsimpson@quicinc.com>; qemu-devel@nongnu.org
>> Cc: richard.henderson@linaro.org; alex.bennee@linaro.org;
>> laurent@vivier.eu; ale@rev.ng; Brian Cain <bcain@quicinc.com>
>> Subject: Re: [PATCH v7 12/35] Hexagon (target/hexagon) instruction
>> attributes
>> On 1/20/21 4:28 AM, Taylor Simpson wrote:
>>> Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
>>> ---
>>>  target/hexagon/attribs.h     | 30 ++++++++++++++
>>>  target/hexagon/attribs_def.h | 95
>> ++++++++++++++++++++++++++++++++++++++++++++
>>>  2 files changed, 125 insertions(+)
>>>  create mode 100644 target/hexagon/attribs.h
>>>  create mode 100644 target/hexagon/attribs_def.h
>>> diff --git a/target/hexagon/attribs.h b/target/hexagon/attribs.h
>>> new file mode 100644
>>> index 0000000..e88e5eb
>>> --- /dev/null
>>> +++ b/target/hexagon/attribs.h
>>> @@ -0,0 +1,30 @@
>>> +
>>> +enum {
>>> +#define DEF_ATTRIB(NAME, ...) A_##NAME,
>>> +#include "attribs_def.h"
>> Per QEMU conventions, this file has to be named "attribs_def.h.inc".
> Didn't know that.  Which files should end in .inc?

Oh you are right, it is not documented in CODING_STYLE.rst.

You can see the rationale in commits:139c1837db7 and 0979ed017f0:

  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

  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.

>> Otherwise:
>> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Thanks!!

reply via email to

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