[PATCH 1/3] target/m68k: Rename qregs.def -> qregs.h.inc

Philippe Mathieu-Daudé posted 3 patches 3 years, 3 months ago
Maintainers: Laurent Vivier <laurent@vivier.eu>, Richard Henderson <richard.henderson@linaro.org>, David Hildenbrand <david@redhat.com>, Cornelia Huck <cohuck@redhat.com>, Thomas Huth <thuth@redhat.com>, Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
[PATCH 1/3] target/m68k: Rename qregs.def -> qregs.h.inc
Posted by Philippe Mathieu-Daudé 3 years, 3 months ago
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/m68k/{qregs.def => qregs.h.inc} | 0
 target/m68k/translate.c                | 4 ++--
 2 files changed, 2 insertions(+), 2 deletions(-)
 rename target/m68k/{qregs.def => qregs.h.inc} (100%)

diff --git a/target/m68k/qregs.def b/target/m68k/qregs.h.inc
similarity index 100%
rename from target/m68k/qregs.def
rename to target/m68k/qregs.h.inc
diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index 9df17aa4b2..f018fa9eb0 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -39,7 +39,7 @@
 
 #define DEFO32(name, offset) static TCGv QREG_##name;
 #define DEFO64(name, offset) static TCGv_i64 QREG_##name;
-#include "qregs.def"
+#include "qregs.h.inc"
 #undef DEFO32
 #undef DEFO64
 
@@ -75,7 +75,7 @@ void m68k_tcg_init(void)
 #define DEFO64(name, offset) \
     QREG_##name = tcg_global_mem_new_i64(cpu_env, \
         offsetof(CPUM68KState, offset), #name);
-#include "qregs.def"
+#include "qregs.h.inc"
 #undef DEFO32
 #undef DEFO64
 
-- 
2.37.3


Re: [PATCH 1/3] target/m68k: Rename qregs.def -> qregs.h.inc
Posted by Laurent Vivier 3 years, 3 months ago
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/m68k/{qregs.def => qregs.h.inc} | 0
>   target/m68k/translate.c                | 4 ++--
>   2 files changed, 2 insertions(+), 2 deletions(-)
>   rename target/m68k/{qregs.def => qregs.h.inc} (100%)
> 
> diff --git a/target/m68k/qregs.def b/target/m68k/qregs.h.inc
> similarity index 100%
> rename from target/m68k/qregs.def
> rename to target/m68k/qregs.h.inc
> diff --git a/target/m68k/translate.c b/target/m68k/translate.c
> index 9df17aa4b2..f018fa9eb0 100644
> --- a/target/m68k/translate.c
> +++ b/target/m68k/translate.c
> @@ -39,7 +39,7 @@
>   
>   #define DEFO32(name, offset) static TCGv QREG_##name;
>   #define DEFO64(name, offset) static TCGv_i64 QREG_##name;
> -#include "qregs.def"
> +#include "qregs.h.inc"
>   #undef DEFO32
>   #undef DEFO64
>   
> @@ -75,7 +75,7 @@ void m68k_tcg_init(void)
>   #define DEFO64(name, offset) \
>       QREG_##name = tcg_global_mem_new_i64(cpu_env, \
>           offsetof(CPUM68KState, offset), #name);
> -#include "qregs.def"
> +#include "qregs.h.inc"
>   #undef DEFO32
>   #undef DEFO64
>   

Applied to my trivial-patches branch.

Thanks,
Laurent



Re: [PATCH 1/3] target/m68k: Rename qregs.def -> qregs.h.inc
Posted by Laurent Vivier 3 years, 3 months ago
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/m68k/{qregs.def => qregs.h.inc} | 0
>   target/m68k/translate.c                | 4 ++--
>   2 files changed, 2 insertions(+), 2 deletions(-)
>   rename target/m68k/{qregs.def => qregs.h.inc} (100%)
> 
> diff --git a/target/m68k/qregs.def b/target/m68k/qregs.h.inc
> similarity index 100%
> rename from target/m68k/qregs.def
> rename to target/m68k/qregs.h.inc
> diff --git a/target/m68k/translate.c b/target/m68k/translate.c
> index 9df17aa4b2..f018fa9eb0 100644
> --- a/target/m68k/translate.c
> +++ b/target/m68k/translate.c
> @@ -39,7 +39,7 @@
>   
>   #define DEFO32(name, offset) static TCGv QREG_##name;
>   #define DEFO64(name, offset) static TCGv_i64 QREG_##name;
> -#include "qregs.def"
> +#include "qregs.h.inc"
>   #undef DEFO32
>   #undef DEFO64
>   
> @@ -75,7 +75,7 @@ void m68k_tcg_init(void)
>   #define DEFO64(name, offset) \
>       QREG_##name = tcg_global_mem_new_i64(cpu_env, \
>           offsetof(CPUM68KState, offset), #name);
> -#include "qregs.def"
> +#include "qregs.h.inc"
>   #undef DEFO32
>   #undef DEFO64
>   

Reviewed-by: Laurent Vivier <laurent@vivier.eu>