sim: ppc: avoid "PAGE_SIZE" name
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.
This commit is contained in:
parent
336b30e58a
commit
a49dd19e81
3 changed files with 9 additions and 4 deletions
|
@ -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.
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue