Skip to contentSkip to conversation

ppc: Rename #include'd .c files to .inc.c

PATCH Superseded Benjamin Herrenschmidt 2 participants 2 messages Jul 29, 2016 – Aug 1, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 ppc: Rename #include'd .c files to .inc.c

Also while at it, group the #include statements in translate.c

---

v3. Stupid typo I corrected locally but din't commit... v2. Rebase on top of ppc-for-2.8
    Use git renames

 target-ppc/translate.c                             | 40 +++++++++++----------- .../translate/{dfp-impl.c => dfp-impl.inc.c}       |  0 target-ppc/translate/{dfp-ops.c => dfp-ops.inc.c}  |  0 target-ppc/translate/{fp-impl.c => fp-impl.inc.c}  |  0 target-ppc/translate/{fp-ops.c => fp-ops.inc.c}    |  0 .../translate/{spe-impl.c => spe-impl.inc.c}       |  0 target-ppc/translate/{spe-ops.c => spe-ops.inc.c}  |  0 .../translate/{vmx-impl.c => vmx-impl.inc.c}       |  0 target-ppc/translate/{vmx-ops.c => vmx-ops.inc.c}  |  0 .../translate/{vsx-impl.c => vsx-impl.inc.c}       |  0 target-ppc/translate/{vsx-ops.c => vsx-ops.inc.c}  |  0

 11 files changed, 20 insertions(+), 20 deletions(-)

 rename target-ppc/translate/{dfp-impl.c => dfp-impl.inc.c} (100%) rename target-ppc/translate/{dfp-ops.c => dfp-ops.inc.c} (100%) rename target-ppc/translate/{fp-impl.c => fp-impl.inc.c} (100%) rename target-ppc/translate/{fp-ops.c => fp-ops.inc.c} (100%) rename target-ppc/translate/{spe-impl.c => spe-impl.inc.c} (100%) rename target-ppc/translate/{spe-ops.c => spe-ops.inc.c} (100%) rename target-ppc/translate/{vmx-impl.c => vmx-impl.inc.c} (100%) rename target-ppc/translate/{vmx-ops.c => vmx-ops.inc.c} (100%) rename target-ppc/translate/{vsx-impl.c => vsx-impl.inc.c} (100%) rename target-ppc/translate/{vsx-ops.c => vsx-ops.inc.c} (100%)

target-ppc/translate.c +0 -0
index fc3d371..d1837f8 100644
@@ -5315,12 +5315,6 @@ static void gen_rfsvc(DisasContext *ctx)

 #endif /* defined(CONFIG_USER_ONLY) */
 }

-#include "translate/fp-impl.c"
-
-#include "translate/vmx-impl.c"
-
-#include "translate/vsx-impl.c"
-
 /* svc is not implemented for now */

 /* BookE specific instructions */
@@ -6107,10 +6101,6 @@ static void gen_maddhd_maddhdu(DisasContext *ctx)
 }
 #endif /* defined(TARGET_PPC64) */

-#include "translate/dfp-impl.c"
-
-#include "translate/spe-impl.c"
-
 static void gen_tbegin(DisasContext *ctx)
 {
     if (unlikely(!ctx->tm_enabled)) {
@@ -6190,6 +6180,16 @@ static inline void gen_##name(DisasContext *ctx)               \
 GEN_TM_PRIV_NOOP(treclaim);
 GEN_TM_PRIV_NOOP(trechkpt);

+#include "translate/fp-impl.inc.c"
+
+#include "translate/vmx-impl.inc.c"
+
+#include "translate/vsx-impl.inc.c"
+
+#include "translate/dfp-impl.inc.c"
+
+#include "translate/spe-impl.inc.c"
+
 static opcode_t opcodes[] = {
 GEN_HANDLER(invalid, 0x00, 0x00, 0x00, 0xFFFFFFFF, PPC_NONE), GEN_HANDLER(cmp, 0x1F, 0x00, 0x00, 0x00400000, PPC_INTEGER),
@@ -6714,16 +6714,6 @@ GEN_MAC_HANDLER(mulhhwu, 0x08, 0x00), GEN_MAC_HANDLER(mullhw, 0x08, 0x0D),
 GEN_MAC_HANDLER(mullhwu, 0x08, 0x0C),

-#include "translate/fp-ops.c"
-
-#include "translate/vmx-ops.c"
-
-#include "translate/vsx-ops.c"
-
-#include "translate/dfp-ops.c"
-
-#include "translate/spe-ops.c"
-
 GEN_HANDLER2_E(tbegin, "tbegin", 0x1F, 0x0E, 0x14, 0x01DFF800, \
                PPC_NONE, PPC2_TM),
 GEN_HANDLER2_E(tend,   "tend",   0x1F, 0x0E, 0x15, 0x01FFF800, \
@@ -6746,6 +6736,16 @@ GEN_HANDLER2_E(treclaim, "treclaim", 0x1F, 0x0E, 0x1D, 0x03E0F800, \
                PPC_NONE, PPC2_TM),
 GEN_HANDLER2_E(trechkpt, "trechkpt", 0x1F, 0x0E, 0x1F, 0x03FFF800, \
                PPC_NONE, PPC2_TM),
+
+#include "translate/fp-ops.inc.c"
+
+#include "translate/vmx-ops.inc.c"
+
+#include "translate/vsx-ops.inc.c"
+
+#include "translate/dfp-ops.inc.c"
+
+#include "translate/spe-ops.inc.c"
 };

 #include "helper_regs.h"

target-ppc/translate/dfp-impl.inc.c renamed from target-ppc/translate/dfp-impl.c +0 -0
similarity index 100%
rename from target-ppc/translate/dfp-impl.c
rename to target-ppc/translate/dfp-impl.inc.c
target-ppc/translate/dfp-ops.inc.c renamed from target-ppc/translate/dfp-ops.c +0 -0
similarity index 100%
rename from target-ppc/translate/dfp-ops.c
rename to target-ppc/translate/dfp-ops.inc.c
target-ppc/translate/fp-impl.inc.c renamed from target-ppc/translate/fp-impl.c +0 -0
similarity index 100%
rename from target-ppc/translate/fp-impl.c
rename to target-ppc/translate/fp-impl.inc.c
target-ppc/translate/fp-ops.inc.c renamed from target-ppc/translate/fp-ops.c +0 -0
similarity index 100%
rename from target-ppc/translate/fp-ops.c
rename to target-ppc/translate/fp-ops.inc.c
target-ppc/translate/spe-impl.inc.c renamed from target-ppc/translate/spe-impl.c +0 -0
similarity index 100%
rename from target-ppc/translate/spe-impl.c
rename to target-ppc/translate/spe-impl.inc.c
target-ppc/translate/spe-ops.inc.c renamed from target-ppc/translate/spe-ops.c +0 -0
similarity index 100%
rename from target-ppc/translate/spe-ops.c
rename to target-ppc/translate/spe-ops.inc.c
target-ppc/translate/vmx-impl.inc.c renamed from target-ppc/translate/vmx-impl.c +0 -0
similarity index 100%
rename from target-ppc/translate/vmx-impl.c
rename to target-ppc/translate/vmx-impl.inc.c
target-ppc/translate/vmx-ops.inc.c renamed from target-ppc/translate/vmx-ops.c +0 -0
similarity index 100%
rename from target-ppc/translate/vmx-ops.c
rename to target-ppc/translate/vmx-ops.inc.c
target-ppc/translate/vsx-impl.inc.c renamed from target-ppc/translate/vsx-impl.c +0 -0
similarity index 100%
rename from target-ppc/translate/vsx-impl.c
rename to target-ppc/translate/vsx-impl.inc.c
target-ppc/translate/vsx-ops.inc.c renamed from target-ppc/translate/vsx-ops.c +0 -0
similarity index 100%
rename from target-ppc/translate/vsx-ops.c
rename to target-ppc/translate/vsx-ops.inc.c
#1 lore raw
Quoted 3 lines · Benjamin Herrenschmidt

Also while at it, group the #include statements in translate.c

Urgh.. now I'm getting a:
fatal: corrupt patch at line 35

Quoted 149 lines

---

v3. Stupid typo I corrected locally but din't commit... v2. Rebase on top of ppc-for-2.8
    Use git renames

 target-ppc/translate.c                             | 40 +++++++++++----------- .../translate/{dfp-impl.c => dfp-impl.inc.c}       |  0 target-ppc/translate/{dfp-ops.c => dfp-ops.inc.c}  |  0 target-ppc/translate/{fp-impl.c => fp-impl.inc.c}  |  0 target-ppc/translate/{fp-ops.c => fp-ops.inc.c}    |  0 .../translate/{spe-impl.c => spe-impl.inc.c}       |  0 target-ppc/translate/{spe-ops.c => spe-ops.inc.c}  |  0 .../translate/{vmx-impl.c => vmx-impl.inc.c}       |  0 target-ppc/translate/{vmx-ops.c => vmx-ops.inc.c}  |  0 .../translate/{vsx-impl.c => vsx-impl.inc.c}       |  0 target-ppc/translate/{vsx-ops.c => vsx-ops.inc.c}  |  0

 11 files changed, 20 insertions(+), 20 deletions(-)

 rename target-ppc/translate/{dfp-impl.c => dfp-impl.inc.c} (100%) rename target-ppc/translate/{dfp-ops.c => dfp-ops.inc.c} (100%) rename target-ppc/translate/{fp-impl.c => fp-impl.inc.c} (100%) rename target-ppc/translate/{fp-ops.c => fp-ops.inc.c} (100%) rename target-ppc/translate/{spe-impl.c => spe-impl.inc.c} (100%) rename target-ppc/translate/{spe-ops.c => spe-ops.inc.c} (100%) rename target-ppc/translate/{vmx-impl.c => vmx-impl.inc.c} (100%) rename target-ppc/translate/{vmx-ops.c => vmx-ops.inc.c} (100%) rename target-ppc/translate/{vsx-impl.c => vsx-impl.inc.c} (100%) rename target-ppc/translate/{vsx-ops.c => vsx-ops.inc.c} (100%)

target-ppc/translate.c +0 -0
index fc3d371..d1837f8 100644
@@ -5315,12 +5315,6 @@ static void gen_rfsvc(DisasContext *ctx)
  #endif /* defined(CONFIG_USER_ONLY) */
  }

target-ppc/translate.c +0 -6
-#include "translate/fp-impl.c"
-
-#include "translate/vmx-impl.c"
-
-#include "translate/vsx-impl.c"
-

 /* svc is not implemented for now */

 /* BookE specific instructions */

target-ppc/translate.c +0 -0
@@ -6107,10 +6101,6 @@ static void gen_maddhd_maddhdu(DisasContext *ctx)
  }
  #endif /* defined(TARGET_PPC64) */

target-ppc/translate.c +0 -4
-#include "translate/dfp-impl.c"
-
-#include "translate/spe-impl.c"
-

 static void gen_tbegin(DisasContext *ctx)
 {
     if (unlikely(!ctx->tm_enabled)) {

target-ppc/translate.c +0 -0
@@ -6190,6 +6180,16 @@ static inline void gen_##name(DisasContext *ctx)               \
  GEN_TM_PRIV_NOOP(treclaim);
  GEN_TM_PRIV_NOOP(trechkpt);

target-ppc/translate.c +10 -0
+#include "translate/fp-impl.inc.c"
+
+#include "translate/vmx-impl.inc.c"
+
+#include "translate/vsx-impl.inc.c"
+
+#include "translate/dfp-impl.inc.c"
+
+#include "translate/spe-impl.inc.c"
+

 static opcode_t opcodes[] = {
 GEN_HANDLER(invalid, 0x00, 0x00, 0x00, 0xFFFFFFFF, PPC_NONE), GEN_HANDLER(cmp, 0x1F, 0x00, 0x00, 0x00400000, PPC_INTEGER),

target-ppc/translate.c +0 -0
@@ -6714,16 +6714,6 @@ GEN_MAC_HANDLER(mulhhwu, 0x08, 0x00),
  GEN_MAC_HANDLER(mullhw, 0x08, 0x0D),
  GEN_MAC_HANDLER(mullhwu, 0x08, 0x0C),

target-ppc/translate.c +0 -10
-#include "translate/fp-ops.c"
-
-#include "translate/vmx-ops.c"
-
-#include "translate/vsx-ops.c"
-
-#include "translate/dfp-ops.c"
-
-#include "translate/spe-ops.c"
-

 GEN_HANDLER2_E(tbegin, "tbegin", 0x1F, 0x0E, 0x14, 0x01DFF800, \
                PPC_NONE, PPC2_TM), GEN_HANDLER2_E(tend,   "tend",   0x1F, 0x0E, 0x15, 0x01FFF800, \

target-ppc/translate.c +10 -0
@@ -6746,6 +6736,16 @@ GEN_HANDLER2_E(treclaim, "treclaim", 0x1F, 0x0E, 0x1D, 0x03E0F800, \
                 PPC_NONE, PPC2_TM),
  GEN_HANDLER2_E(trechkpt, "trechkpt", 0x1F, 0x0E, 0x1F, 0x03FFF800, \
                 PPC_NONE, PPC2_TM),
+
+#include "translate/fp-ops.inc.c"
+
+#include "translate/vmx-ops.inc.c"
+
+#include "translate/vsx-ops.inc.c"
+
+#include "translate/dfp-ops.inc.c"
+
+#include "translate/spe-ops.inc.c"
  };


 #include "helper_regs.h"

target-ppc/translate/dfp-impl.inc.c renamed from target-ppc/translate/dfp-impl.c +0 -0
similarity index 100%
rename from target-ppc/translate/dfp-impl.c
rename to target-ppc/translate/dfp-impl.inc.c
target-ppc/translate/dfp-ops.inc.c renamed from target-ppc/translate/dfp-ops.c +0 -0
similarity index 100%
rename from target-ppc/translate/dfp-ops.c
rename to target-ppc/translate/dfp-ops.inc.c
target-ppc/translate/fp-impl.inc.c renamed from target-ppc/translate/fp-impl.c +0 -0
similarity index 100%
rename from target-ppc/translate/fp-impl.c
rename to target-ppc/translate/fp-impl.inc.c
target-ppc/translate/fp-ops.inc.c renamed from target-ppc/translate/fp-ops.c +0 -0
similarity index 100%
rename from target-ppc/translate/fp-ops.c
rename to target-ppc/translate/fp-ops.inc.c
target-ppc/translate/spe-impl.inc.c renamed from target-ppc/translate/spe-impl.c +0 -0
similarity index 100%
rename from target-ppc/translate/spe-impl.c
rename to target-ppc/translate/spe-impl.inc.c
target-ppc/translate/spe-ops.inc.c renamed from target-ppc/translate/spe-ops.c +0 -0
similarity index 100%
rename from target-ppc/translate/spe-ops.c
rename to target-ppc/translate/spe-ops.inc.c
target-ppc/translate/vmx-impl.inc.c renamed from target-ppc/translate/vmx-impl.c +0 -0
similarity index 100%
rename from target-ppc/translate/vmx-impl.c
rename to target-ppc/translate/vmx-impl.inc.c
target-ppc/translate/vmx-ops.inc.c renamed from target-ppc/translate/vmx-ops.c +0 -0
similarity index 100%
rename from target-ppc/translate/vmx-ops.c
rename to target-ppc/translate/vmx-ops.inc.c
target-ppc/translate/vsx-impl.inc.c renamed from target-ppc/translate/vsx-impl.c +0 -0
similarity index 100%
rename from target-ppc/translate/vsx-impl.c
rename to target-ppc/translate/vsx-impl.inc.c
target-ppc/translate/vsx-ops.inc.c renamed from target-ppc/translate/vsx-ops.c +0 -0
similarity index 100%
rename from target-ppc/translate/vsx-ops.c
rename to target-ppc/translate/vsx-ops.inc.c
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson