mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
[gamecode] Add an enum for the different branch types
While it doesn't cover the addressing modes, it does match the bit pattern used in the Ruamoko instruction set. It will make selecting branch instructions easier (especially for Ruamoko).
This commit is contained in:
parent
86e81ba250
commit
09002c17e6
1 changed files with 14 additions and 0 deletions
|
@ -430,6 +430,20 @@ typedef enum {
|
|||
#include "QF/progs/pr_opcode.hinc"
|
||||
} pr_opcode_e;
|
||||
|
||||
// Used for both branch and comparison, with jump and call being ignored for
|
||||
// comparison. For branches, the test is against zero, while for comparison,
|
||||
// it's a cmp b (where cmp takes the place of "branch" in the enum names).
|
||||
typedef enum {
|
||||
pr_branch_eq,
|
||||
pr_branch_lt,
|
||||
pr_branch_gt,
|
||||
pr_branch_jump,
|
||||
pr_branch_ne,
|
||||
pr_branch_ge,
|
||||
pr_branch_le,
|
||||
pr_branch_call,
|
||||
} pr_branch_e;
|
||||
|
||||
#define OP_A_SHIFT (9)
|
||||
#define OP_B_SHIFT (11)
|
||||
#define OP_C_SHIFT (13)
|
||||
|
|
Loading…
Reference in a new issue