* Increased the number of registers used for the opStack in the PPC vm from

12 to 16.  This is cannot be increased any further without major changes
  (there only 32 General Purporse Registers).  Anyway, his change allows the
  cgame.qvm from the excessiveplus mod to work with ioquake3 on a PPC.
This commit is contained in:
Tony J. White = 2006-09-24 02:33:08 +00:00
parent 90e611cea3
commit fbf09d64c5
1 changed files with 11 additions and 5 deletions

View File

@ -157,30 +157,36 @@ typedef enum {
#define RG_EA r14
// The deepest value I saw in the Quake3 games was 9.
#define OP_STACK_MAX_DEPTH 12
#define OP_STACK_MAX_DEPTH 16
// These are all volatile and thus must be saved
// upon entry to the VM code.
// These are all volatile and thus must be saved upon entry to the VM code.
// NOTE: These are General Purpose Registers (GPR) numbers like the
// R_ definitions in the regNums_t enum above (31 is the max)
static int opStackIntRegisters[OP_STACK_MAX_DEPTH] =
{
16, 17, 18, 19,
20, 21, 22, 23,
24, 25, 26, 27
24, 25, 26, 27,
28, 29, 30, 31
};
static unsigned int *opStackLoadInstructionAddr[OP_STACK_MAX_DEPTH];
// We use different registers for the floating point
// operand stack (these are volatile in the PPC ABI)
// NOTE: these are Floating Point Register (FPR) numbers, not
// General Purpose Register (GPR) numbers
static int opStackFloatRegisters[OP_STACK_MAX_DEPTH] =
{
0, 1, 2, 3,
4, 5, 6, 7,
8, 9, 10, 11
8, 9, 10, 11,
12, 13, 14, 15
};
static int opStackRegType[OP_STACK_MAX_DEPTH] =
{
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0