From fbf09d64c5733b67842d754d6af2f148e3b9fc62 Mon Sep 17 00:00:00 2001 From: "Tony J. White =" Date: Sun, 24 Sep 2006 02:33:08 +0000 Subject: [PATCH] * 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. --- code/qcommon/vm_ppc_new.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/code/qcommon/vm_ppc_new.c b/code/qcommon/vm_ppc_new.c index bab80ce6..f6fcc315 100644 --- a/code/qcommon/vm_ppc_new.c +++ b/code/qcommon/vm_ppc_new.c @@ -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