diff mbox series

[2/3] target/s390x: Rename insn-data/format.def -> insn-data/format.h.inc

Message ID 20221025235006.7215-3-philmd@linaro.org
State Superseded
Headers show
Series target: Rename headers using .def extension to .h.inc | expand

Commit Message

Philippe Mathieu-Daudé Oct. 25, 2022, 11:50 p.m. UTC
We use the .h.inc extension to include C headers. To be consistent
with the rest of the codebase, rename the C headers using the .def
extension.

IDE/tools using our .editorconfig / .gitattributes will leverage
this consistency.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/s390x/tcg/{insn-data.def => insn-data.h.inc}    |  2 +-
 .../s390x/tcg/{insn-format.def => insn-format.h.inc}   |  0
 target/s390x/tcg/translate.c                           | 10 +++++-----
 3 files changed, 6 insertions(+), 6 deletions(-)
 rename target/s390x/tcg/{insn-data.def => insn-data.h.inc} (99%)
 rename target/s390x/tcg/{insn-format.def => insn-format.h.inc} (100%)

Comments

Thomas Huth Oct. 27, 2022, 6:45 a.m. UTC | #1
On 26/10/2022 01.50, Philippe Mathieu-Daudé wrote:
> We use the .h.inc extension to include C headers. To be consistent
> with the rest of the codebase, rename the C headers using the .def
> extension.
> 
> IDE/tools using our .editorconfig / .gitattributes will leverage
> this consistency.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/s390x/tcg/{insn-data.def => insn-data.h.inc}    |  2 +-
>   .../s390x/tcg/{insn-format.def => insn-format.h.inc}   |  0
>   target/s390x/tcg/translate.c                           | 10 +++++-----
>   3 files changed, 6 insertions(+), 6 deletions(-)
>   rename target/s390x/tcg/{insn-data.def => insn-data.h.inc} (99%)
>   rename target/s390x/tcg/{insn-format.def => insn-format.h.inc} (100%)

Reviewed-by: Thomas Huth <thuth@redhat.com>
Laurent Vivier Nov. 2, 2022, 6:30 p.m. UTC | #2
Le 26/10/2022 à 01:50, Philippe Mathieu-Daudé a écrit :
> We use the .h.inc extension to include C headers. To be consistent
> with the rest of the codebase, rename the C headers using the .def
> extension.
> 
> IDE/tools using our .editorconfig / .gitattributes will leverage
> this consistency.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/s390x/tcg/{insn-data.def => insn-data.h.inc}    |  2 +-
>   .../s390x/tcg/{insn-format.def => insn-format.h.inc}   |  0
>   target/s390x/tcg/translate.c                           | 10 +++++-----
>   3 files changed, 6 insertions(+), 6 deletions(-)
>   rename target/s390x/tcg/{insn-data.def => insn-data.h.inc} (99%)
>   rename target/s390x/tcg/{insn-format.def => insn-format.h.inc} (100%)
> 
> diff --git a/target/s390x/tcg/insn-data.def b/target/s390x/tcg/insn-data.h.inc
> similarity index 99%
> rename from target/s390x/tcg/insn-data.def
> rename to target/s390x/tcg/insn-data.h.inc
> index 6382ceabfc..7e952bdfc8 100644
> --- a/target/s390x/tcg/insn-data.def
> +++ b/target/s390x/tcg/insn-data.h.inc
> @@ -8,7 +8,7 @@
>    *
>    *  OPC  = (op << 8) | op2 where op is the major, op2 the minor opcode
>    *  NAME = name of the opcode, used internally
> - *  FMT  = format of the opcode (defined in insn-format.def)
> + *  FMT  = format of the opcode (defined in insn-format.h.inc)
>    *  FAC  = facility the opcode is available in (defined in DisasFacility)
>    *  I1   = func in1_xx fills o->in1
>    *  I2   = func in2_xx fills o->in2
> diff --git a/target/s390x/tcg/insn-format.def b/target/s390x/tcg/insn-format.h.inc
> similarity index 100%
> rename from target/s390x/tcg/insn-format.def
> rename to target/s390x/tcg/insn-format.h.inc
> diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
> index 1d2dddab1c..f378e1a633 100644
> --- a/target/s390x/tcg/translate.c
> +++ b/target/s390x/tcg/translate.c
> @@ -1011,7 +1011,7 @@ static void free_compare(DisasCompare *c)
>   #define F6(N, X1, X2, X3, X4, X5, X6) F0(N)
>   
>   typedef enum {
> -#include "insn-format.def"
> +#include "insn-format.h.inc"
>   } DisasFormat;
>   
>   #undef F0
> @@ -1076,7 +1076,7 @@ typedef struct DisasFormatInfo {
>   #define F6(N, X1, X2, X3, X4, X5, X6)       { { X1, X2, X3, X4, X5, X6 } },
>   
>   static const DisasFormatInfo format_info[] = {
> -#include "insn-format.def"
> +#include "insn-format.h.inc"
>   };
>   
>   #undef F0
> @@ -6143,7 +6143,7 @@ static void in2_insn(DisasContext *s, DisasOps *o)
>   #define E(OPC, NM, FT, FC, I1, I2, P, W, OP, CC, D, FL) insn_ ## NM,
>   
>   enum DisasInsnEnum {
> -#include "insn-data.def"
> +#include "insn-data.h.inc"
>   };
>   
>   #undef E
> @@ -6223,7 +6223,7 @@ enum DisasInsnEnum {
>   #define FAC_MIE3        S390_FEAT_MISC_INSTRUCTION_EXT3 /* miscellaneous-instruction-extensions facility 3 */
>   
>   static const DisasInsn insn_info[] = {
> -#include "insn-data.def"
> +#include "insn-data.h.inc"
>   };
>   
>   #undef E
> @@ -6233,7 +6233,7 @@ static const DisasInsn insn_info[] = {
>   static const DisasInsn *lookup_opc(uint16_t opc)
>   {
>       switch (opc) {
> -#include "insn-data.def"
> +#include "insn-data.h.inc"
>       default:
>           return NULL;
>       }

Applied to my trivial-patches branch.

Thanks,
Laurent
diff mbox series

Patch

diff --git a/target/s390x/tcg/insn-data.def b/target/s390x/tcg/insn-data.h.inc
similarity index 99%
rename from target/s390x/tcg/insn-data.def
rename to target/s390x/tcg/insn-data.h.inc
index 6382ceabfc..7e952bdfc8 100644
--- a/target/s390x/tcg/insn-data.def
+++ b/target/s390x/tcg/insn-data.h.inc
@@ -8,7 +8,7 @@ 
  *
  *  OPC  = (op << 8) | op2 where op is the major, op2 the minor opcode
  *  NAME = name of the opcode, used internally
- *  FMT  = format of the opcode (defined in insn-format.def)
+ *  FMT  = format of the opcode (defined in insn-format.h.inc)
  *  FAC  = facility the opcode is available in (defined in DisasFacility)
  *  I1   = func in1_xx fills o->in1
  *  I2   = func in2_xx fills o->in2
diff --git a/target/s390x/tcg/insn-format.def b/target/s390x/tcg/insn-format.h.inc
similarity index 100%
rename from target/s390x/tcg/insn-format.def
rename to target/s390x/tcg/insn-format.h.inc
diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index 1d2dddab1c..f378e1a633 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -1011,7 +1011,7 @@  static void free_compare(DisasCompare *c)
 #define F6(N, X1, X2, X3, X4, X5, X6) F0(N)
 
 typedef enum {
-#include "insn-format.def"
+#include "insn-format.h.inc"
 } DisasFormat;
 
 #undef F0
@@ -1076,7 +1076,7 @@  typedef struct DisasFormatInfo {
 #define F6(N, X1, X2, X3, X4, X5, X6)       { { X1, X2, X3, X4, X5, X6 } },
 
 static const DisasFormatInfo format_info[] = {
-#include "insn-format.def"
+#include "insn-format.h.inc"
 };
 
 #undef F0
@@ -6143,7 +6143,7 @@  static void in2_insn(DisasContext *s, DisasOps *o)
 #define E(OPC, NM, FT, FC, I1, I2, P, W, OP, CC, D, FL) insn_ ## NM,
 
 enum DisasInsnEnum {
-#include "insn-data.def"
+#include "insn-data.h.inc"
 };
 
 #undef E
@@ -6223,7 +6223,7 @@  enum DisasInsnEnum {
 #define FAC_MIE3        S390_FEAT_MISC_INSTRUCTION_EXT3 /* miscellaneous-instruction-extensions facility 3 */
 
 static const DisasInsn insn_info[] = {
-#include "insn-data.def"
+#include "insn-data.h.inc"
 };
 
 #undef E
@@ -6233,7 +6233,7 @@  static const DisasInsn insn_info[] = {
 static const DisasInsn *lookup_opc(uint16_t opc)
 {
     switch (opc) {
-#include "insn-data.def"
+#include "insn-data.h.inc"
     default:
         return NULL;
     }