PPCTables: Use u64 for instruction flags
We've run out of space :(
This commit is contained in:
parent
75f8ce10f9
commit
901170e299
|
@ -196,8 +196,8 @@ static bool CanSwapAdjacentOps(const CodeOp& a, const CodeOp& b)
|
||||||
{
|
{
|
||||||
const GekkoOPInfo* a_info = a.opinfo;
|
const GekkoOPInfo* a_info = a.opinfo;
|
||||||
const GekkoOPInfo* b_info = b.opinfo;
|
const GekkoOPInfo* b_info = b.opinfo;
|
||||||
int a_flags = a_info->flags;
|
u64 a_flags = a_info->flags;
|
||||||
int b_flags = b_info->flags;
|
u64 b_flags = b_info->flags;
|
||||||
|
|
||||||
// can't reorder around breakpoints
|
// can't reorder around breakpoints
|
||||||
if (SConfig::GetInstance().bEnableDebugging &&
|
if (SConfig::GetInstance().bEnableDebugging &&
|
||||||
|
|
|
@ -7,61 +7,62 @@
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
|
#include "Common/CommonTypes.h"
|
||||||
#include "Core/PowerPC/Gekko.h"
|
#include "Core/PowerPC/Gekko.h"
|
||||||
#include "Core/PowerPC/Interpreter/Interpreter.h"
|
#include "Core/PowerPC/Interpreter/Interpreter.h"
|
||||||
|
|
||||||
// Flags that indicate what an instruction can do.
|
// Flags that indicate what an instruction can do.
|
||||||
enum
|
enum InstructionFlags : u64
|
||||||
{
|
{
|
||||||
FL_SET_CR0 = (1 << 0), // Sets CR0.
|
FL_SET_CR0 = (1ull << 0), // Sets CR0.
|
||||||
FL_SET_CR1 = (1 << 1), // Sets CR1.
|
FL_SET_CR1 = (1ull << 1), // Sets CR1.
|
||||||
FL_SET_CRn = (1 << 2), // Encoding decides which CR can be set.
|
FL_SET_CRn = (1ull << 2), // Encoding decides which CR can be set.
|
||||||
FL_SET_CRx = FL_SET_CR0 | FL_SET_CR1 | FL_SET_CRn,
|
FL_SET_CRx = FL_SET_CR0 | FL_SET_CR1 | FL_SET_CRn,
|
||||||
FL_SET_CA = (1 << 3), // Sets the carry flag.
|
FL_SET_CA = (1ull << 3), // Sets the carry flag.
|
||||||
FL_READ_CA = (1 << 4), // Reads the carry flag.
|
FL_READ_CA = (1ull << 4), // Reads the carry flag.
|
||||||
FL_RC_BIT = (1 << 5), // Sets the record bit.
|
FL_RC_BIT = (1ull << 5), // Sets the record bit.
|
||||||
FL_RC_BIT_F =
|
FL_RC_BIT_F =
|
||||||
(1 << 6), // Sets the record bit. Used for floating point instructions that do this.
|
(1ull << 6), // Sets the record bit. Used for floating point instructions that do this.
|
||||||
FL_ENDBLOCK =
|
FL_ENDBLOCK =
|
||||||
(1 << 7), // Specifies that the instruction can be used as an exit point for a JIT block.
|
(1ull << 7), // Specifies that the instruction can be used as an exit point for a JIT block.
|
||||||
FL_IN_A = (1 << 8), // Uses rA as an input.
|
FL_IN_A = (1ull << 8), // Uses rA as an input.
|
||||||
FL_IN_A0 = (1 << 9), // Uses rA as an input. Indicates that if rA is zero, the value zero is
|
FL_IN_A0 = (1ull << 9), // Uses rA as an input. Indicates that if rA is zero, the value zero is
|
||||||
// used, not the contents of r0.
|
// used, not the contents of r0.
|
||||||
FL_IN_B = (1 << 10), // Uses rB as an input.
|
FL_IN_B = (1ull << 10), // Uses rB as an input.
|
||||||
FL_IN_C = (1 << 11), // Uses rC as an input.
|
FL_IN_C = (1ull << 11), // Uses rC as an input.
|
||||||
FL_IN_S = (1 << 12), // Uses rS as an input.
|
FL_IN_S = (1ull << 12), // Uses rS as an input.
|
||||||
FL_IN_AB = FL_IN_A | FL_IN_B,
|
FL_IN_AB = FL_IN_A | FL_IN_B,
|
||||||
FL_IN_AC = FL_IN_A | FL_IN_C,
|
FL_IN_AC = FL_IN_A | FL_IN_C,
|
||||||
FL_IN_ABC = FL_IN_A | FL_IN_B | FL_IN_C,
|
FL_IN_ABC = FL_IN_A | FL_IN_B | FL_IN_C,
|
||||||
FL_IN_SB = FL_IN_S | FL_IN_B,
|
FL_IN_SB = FL_IN_S | FL_IN_B,
|
||||||
FL_IN_A0B = FL_IN_A0 | FL_IN_B,
|
FL_IN_A0B = FL_IN_A0 | FL_IN_B,
|
||||||
FL_IN_A0BC = FL_IN_A0 | FL_IN_B | FL_IN_C,
|
FL_IN_A0BC = FL_IN_A0 | FL_IN_B | FL_IN_C,
|
||||||
FL_OUT_D = (1 << 13), // rD is used as a destination.
|
FL_OUT_D = (1ull << 13), // rD is used as a destination.
|
||||||
FL_OUT_A = (1 << 14), // rA is used as a destination.
|
FL_OUT_A = (1ull << 14), // rA is used as a destination.
|
||||||
FL_OUT_AD = FL_OUT_A | FL_OUT_D,
|
FL_OUT_AD = FL_OUT_A | FL_OUT_D,
|
||||||
FL_TIMER = (1 << 15), // Used only for mftb.
|
FL_TIMER = (1ull << 15), // Used only for mftb.
|
||||||
FL_CHECKEXCEPTIONS = (1 << 16), // Used with rfi/rfid.
|
FL_CHECKEXCEPTIONS = (1ull << 16), // Used with rfi/rfid.
|
||||||
FL_EVIL =
|
FL_EVIL =
|
||||||
(1 << 17), // Historically used to refer to instructions that messed up Super Monkey Ball.
|
(1ull << 17), // Historically used to refer to instructions that messed up Super Monkey Ball.
|
||||||
FL_USE_FPU = (1 << 18), // Used to indicate a floating point instruction.
|
FL_USE_FPU = (1ull << 18), // Used to indicate a floating point instruction.
|
||||||
FL_LOADSTORE = (1 << 19), // Used to indicate a load/store instruction.
|
FL_LOADSTORE = (1ull << 19), // Used to indicate a load/store instruction.
|
||||||
FL_SET_FPRF = (1 << 20), // Sets bits in the FPRF.
|
FL_SET_FPRF = (1ull << 20), // Sets bits in the FPRF.
|
||||||
FL_READ_FPRF = (1 << 21), // Reads bits from the FPRF.
|
FL_READ_FPRF = (1ull << 21), // Reads bits from the FPRF.
|
||||||
FL_SET_OE = (1 << 22), // Sets the overflow flag.
|
FL_SET_OE = (1ull << 22), // Sets the overflow flag.
|
||||||
FL_IN_FLOAT_A = (1 << 23), // frA is used as an input.
|
FL_IN_FLOAT_A = (1ull << 23), // frA is used as an input.
|
||||||
FL_IN_FLOAT_B = (1 << 24), // frB is used as an input.
|
FL_IN_FLOAT_B = (1ull << 24), // frB is used as an input.
|
||||||
FL_IN_FLOAT_C = (1 << 25), // frC is used as an input.
|
FL_IN_FLOAT_C = (1ull << 25), // frC is used as an input.
|
||||||
FL_IN_FLOAT_S = (1 << 26), // frS is used as an input.
|
FL_IN_FLOAT_S = (1ull << 26), // frS is used as an input.
|
||||||
FL_IN_FLOAT_D = (1 << 27), // frD is used as an input.
|
FL_IN_FLOAT_D = (1ull << 27), // frD is used as an input.
|
||||||
FL_IN_FLOAT_AB = FL_IN_FLOAT_A | FL_IN_FLOAT_B,
|
FL_IN_FLOAT_AB = FL_IN_FLOAT_A | FL_IN_FLOAT_B,
|
||||||
FL_IN_FLOAT_AC = FL_IN_FLOAT_A | FL_IN_FLOAT_C,
|
FL_IN_FLOAT_AC = FL_IN_FLOAT_A | FL_IN_FLOAT_C,
|
||||||
FL_IN_FLOAT_ABC = FL_IN_FLOAT_A | FL_IN_FLOAT_B | FL_IN_FLOAT_C,
|
FL_IN_FLOAT_ABC = FL_IN_FLOAT_A | FL_IN_FLOAT_B | FL_IN_FLOAT_C,
|
||||||
FL_OUT_FLOAT_D = (1 << 28), // frD is used as a destination.
|
FL_OUT_FLOAT_D = (1ull << 28), // frD is used as a destination.
|
||||||
// Used in the case of double ops (they don't modify the top half of the output)
|
// Used in the case of double ops (they don't modify the top half of the output)
|
||||||
FL_INOUT_FLOAT_D = FL_IN_FLOAT_D | FL_OUT_FLOAT_D,
|
FL_INOUT_FLOAT_D = FL_IN_FLOAT_D | FL_OUT_FLOAT_D,
|
||||||
FL_IN_FLOAT_A_BITEXACT = (1 << 29), // The output is based on the exact bits in frA.
|
FL_IN_FLOAT_A_BITEXACT = (1ull << 29), // The output is based on the exact bits in frA.
|
||||||
FL_IN_FLOAT_B_BITEXACT = (1 << 30), // The output is based on the exact bits in frB.
|
FL_IN_FLOAT_B_BITEXACT = (1ull << 30), // The output is based on the exact bits in frB.
|
||||||
FL_IN_FLOAT_C_BITEXACT = (1 << 31), // The output is based on the exact bits in frC.
|
FL_IN_FLOAT_C_BITEXACT = (1ull << 31), // The output is based on the exact bits in frC.
|
||||||
FL_IN_FLOAT_AB_BITEXACT = FL_IN_FLOAT_A_BITEXACT | FL_IN_FLOAT_B_BITEXACT,
|
FL_IN_FLOAT_AB_BITEXACT = FL_IN_FLOAT_A_BITEXACT | FL_IN_FLOAT_B_BITEXACT,
|
||||||
FL_IN_FLOAT_BC_BITEXACT = FL_IN_FLOAT_B_BITEXACT | FL_IN_FLOAT_C_BITEXACT,
|
FL_IN_FLOAT_BC_BITEXACT = FL_IN_FLOAT_B_BITEXACT | FL_IN_FLOAT_C_BITEXACT,
|
||||||
};
|
};
|
||||||
|
@ -94,7 +95,7 @@ struct GekkoOPInfo
|
||||||
{
|
{
|
||||||
const char* opname;
|
const char* opname;
|
||||||
OpType type;
|
OpType type;
|
||||||
int flags;
|
u64 flags;
|
||||||
int numCycles;
|
int numCycles;
|
||||||
u64 runCount;
|
u64 runCount;
|
||||||
int compileCount;
|
int compileCount;
|
||||||
|
|
Loading…
Reference in New Issue