diff options
author | tjw <tjw@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2006-09-24 02:33:08 +0000 |
---|---|---|
committer | tjw <tjw@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2006-09-24 02:33:08 +0000 |
commit | 8a997566e0137bff146672ec6f627467b4647810 (patch) | |
tree | 945a78ac3982552c26becb6a10e6946d8822d73f /code | |
parent | 23e2d7c93652f7b2d2ecf6c9174bf649a76a186d (diff) | |
download | ioquake3-aero-8a997566e0137bff146672ec6f627467b4647810.tar.gz ioquake3-aero-8a997566e0137bff146672ec6f627467b4647810.zip |
* 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.
git-svn-id: svn://svn.icculus.org/quake3/trunk@916 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code')
-rw-r--r-- | code/qcommon/vm_ppc_new.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/code/qcommon/vm_ppc_new.c b/code/qcommon/vm_ppc_new.c index bab80ce..f6fcc31 100644 --- a/code/qcommon/vm_ppc_new.c +++ b/code/qcommon/vm_ppc_new.c @@ -157,32 +157,38 @@ 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 }; |