]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: ppc: avoid "PAGE_SIZE" name
authorMike Frysinger <vapier@gentoo.org>
Thu, 17 Jun 2021 23:03:32 +0000 (19:03 -0400)
committerMike Frysinger <vapier@gentoo.org>
Thu, 17 Jun 2021 23:05:59 +0000 (19:05 -0400)
This define is used for a particular target and depends on the
simulated CPU hardware.  It has no relation to the host CPU that
the sim is running on.  So rename the common "PAGE_SIZE" here to
better reflect its usage and avoid conflicts with system headers.

sim/ppc/ChangeLog
sim/ppc/igen.c
sim/ppc/ppc-instructions

index 05178aa427b5a4d9d5a2172e3aae413c80648242..280234af869ea947f95c5f5e50a28a004ea332df 100644 (file)
@@ -1,3 +1,8 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * igen.c (gen_semantics_h): Rename PAGE_SIZE to MPC860C0_PAGE_SIZE.
+       * ppc-instructions: Likewise.
+
 2021-06-16  Mike Frysinger  <vapier@gentoo.org>
 
        * configure.ac: Delete AC_EXEEXT call.
index 0bf3b58ca26d4b3e3dae66656b239c1f88f2926a..f0ff06b31c413e653b3a792cdd7b1f6445f10b0c 100644 (file)
@@ -182,7 +182,7 @@ gen_semantics_h(insn_table *table,
   lf_printf(file, "\n");
   if ((code & generate_calls)) {
     lf_printf(file, "extern int option_mpc860c0;\n");
-    lf_printf(file, "#define PAGE_SIZE 0x1000\n");
+    lf_printf(file, "#define MPC860C0_PAGE_SIZE 0x1000\n");
     lf_printf(file, "\n");
     lf_printf(file, "PSIM_EXTERN_SEMANTICS(void)\n");
     lf_printf(file, "semantic_init(device* root);\n");
index 70aa04e2210ee17fcf80905d1b2767de81f6c13b..2278b626376585d017d2aa4df106ab36e05ad21d 100644 (file)
@@ -1537,7 +1537,7 @@ void::function::invalid_zero_divide_operation:cpu *processor, unsigned_word cia,
          If this is a forward branch and it is near the end of a page,
          we've detected a problematic branch. */
          if (succeed && NIA > CIA) {
-           if (PAGE_SIZE - (CIA & (PAGE_SIZE-1)) <= option_mpc860c0)
+           if (MPC860C0_PAGE_SIZE - (CIA & (MPC860C0_PAGE_SIZE-1)) <= option_mpc860c0)
              program_interrupt(processor, cia, mpc860c0_instruction_program_interrupt);
          }
        }
@@ -1579,7 +1579,7 @@ void::function::invalid_zero_divide_operation:cpu *processor, unsigned_word cia,
          If this is a forward branch and it is near the end of a page,
          we've detected a problematic branch. */
          if (succeed && NIA > CIA) {
-           if (PAGE_SIZE - (CIA & (PAGE_SIZE-1)) <= option_mpc860c0)
+           if (MPC860C0_PAGE_SIZE - (CIA & (MPC860C0_PAGE_SIZE-1)) <= option_mpc860c0)
              program_interrupt(processor, cia, mpc860c0_instruction_program_interrupt);
          }
        }
@@ -1610,7 +1610,7 @@ void::function::invalid_zero_divide_operation:cpu *processor, unsigned_word cia,
          If this is a forward branch and it is near the end of a page,
          we've detected a problematic branch. */
          if (succeed && NIA > CIA) {
-           if (PAGE_SIZE - (CIA & (PAGE_SIZE-1)) <= option_mpc860c0)
+           if (MPC860C0_PAGE_SIZE - (CIA & (MPC860C0_PAGE_SIZE-1)) <= option_mpc860c0)
              program_interrupt(processor, cia, mpc860c0_instruction_program_interrupt);
          }
        }