2001-03-28 17:17:56 +00:00
|
|
|
/* Copyright (C) 1996-1997 Id Software, Inc.
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2001-03-28 17:17:56 +00:00
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2001-03-28 17:17:56 +00:00
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2001-03-28 17:17:56 +00:00
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2001-03-28 17:17:56 +00:00
|
|
|
See file, 'COPYING', for details.
|
2001-02-19 21:15:25 +00:00
|
|
|
*/
|
|
|
|
|
2001-03-28 17:17:56 +00:00
|
|
|
// this file is shared by QuakeForge and qfcc
|
|
|
|
#ifndef __pr_comp_h
|
|
|
|
#define __pr_comp_h
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2001-03-27 23:36:02 +00:00
|
|
|
#include "QF/qtypes.h"
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2007-04-04 12:30:49 +00:00
|
|
|
typedef int16_t pr_short_t;
|
|
|
|
typedef uint16_t pr_ushort_t;
|
|
|
|
typedef int32_t pr_int_t;
|
|
|
|
typedef uint32_t pr_uint_t;
|
2007-04-06 00:47:41 +00:00
|
|
|
typedef pr_int_t func_t;
|
|
|
|
typedef pr_int_t string_t;
|
|
|
|
typedef pr_int_t pointer_t;
|
2001-03-28 17:17:56 +00:00
|
|
|
|
2001-03-01 21:11:35 +00:00
|
|
|
typedef enum {
|
|
|
|
ev_void,
|
|
|
|
ev_string,
|
|
|
|
ev_float,
|
|
|
|
ev_vector,
|
|
|
|
ev_entity,
|
|
|
|
ev_field,
|
|
|
|
ev_func,
|
2002-06-12 22:37:18 +00:00
|
|
|
ev_pointer, // end of v6 types
|
2004-04-08 00:56:30 +00:00
|
|
|
ev_quat,
|
2001-07-22 06:59:12 +00:00
|
|
|
ev_integer,
|
pr_comp.h:
o add ev_uniteger to the types enum
o add opcodes for ifbe, ifb, ifae, ifa, jump, lt.ui, gt.ui, le.ui, ge.ui
progs.h:
o add uinteger accessors
pr_exec.c:
o implement ifbe, ifb, ifae, ifa, jump, lt.ui, gt.ui, le.ui, ge.ui
pr_opcode.c:
o add opcodes for ifbe, ifb, ifae, ifa, jump, lt.ui, gt.ui, le.ui, ge.ui
expr.h:
o prototype inc_users
qfcc.h:
o add externs for op_ifbe, op_ifb, op_ifae and op_ifa
emit.c:
o don't bother emiting an assignment to a temp def that's only used once
(ie, it's never read, only written to)
o support the new if* instructions
expr.c:
o support the new if* insructions
o dectect expression loops in append_expr
o support unsigned integers
o re-work temp def usage counting
pr_def.c
o debugging for temp def usage counts
pr_opcode.c:
o support the new if* instructions
qc-parse.y:
o provide defines for IFBE IFB IFAE IFA
switch.c:
o do binary searches for strings, floats and ints if there are more than
8 cases in a switch. Strings need more testing.
2001-11-09 00:58:16 +00:00
|
|
|
ev_uinteger,
|
2001-12-07 20:07:38 +00:00
|
|
|
ev_short, // value is embedded in the opcode
|
2001-12-08 08:19:48 +00:00
|
|
|
ev_struct,
|
2002-05-10 23:19:57 +00:00
|
|
|
ev_object,
|
|
|
|
ev_class,
|
|
|
|
ev_sel,
|
2002-06-12 22:37:18 +00:00
|
|
|
ev_array,
|
2001-06-04 17:51:39 +00:00
|
|
|
|
|
|
|
ev_type_count // not a type, gives number of types
|
2001-03-01 21:11:35 +00:00
|
|
|
} etype_t;
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2001-11-12 23:56:46 +00:00
|
|
|
extern int pr_type_size[ev_type_count];
|
2001-12-12 17:15:09 +00:00
|
|
|
extern const char *pr_type_name[ev_type_count];
|
2001-03-28 17:17:56 +00:00
|
|
|
|
2001-02-19 21:15:25 +00:00
|
|
|
#define OFS_NULL 0
|
|
|
|
#define OFS_RETURN 1
|
|
|
|
#define OFS_PARM0 4 // leave 3 ofs for each parm to hold vectors
|
|
|
|
#define OFS_PARM1 7
|
|
|
|
#define OFS_PARM2 10
|
|
|
|
#define OFS_PARM3 13
|
|
|
|
#define OFS_PARM4 16
|
|
|
|
#define OFS_PARM5 19
|
|
|
|
#define OFS_PARM6 22
|
|
|
|
#define OFS_PARM7 25
|
|
|
|
#define RESERVED_OFS 28
|
|
|
|
|
2001-03-28 17:17:56 +00:00
|
|
|
|
2001-06-03 19:32:50 +00:00
|
|
|
typedef enum {
|
2001-02-19 21:15:25 +00:00
|
|
|
OP_DONE,
|
|
|
|
OP_MUL_F,
|
|
|
|
OP_MUL_V,
|
|
|
|
OP_MUL_FV,
|
|
|
|
OP_MUL_VF,
|
|
|
|
OP_DIV_F,
|
|
|
|
OP_ADD_F,
|
|
|
|
OP_ADD_V,
|
|
|
|
OP_SUB_F,
|
|
|
|
OP_SUB_V,
|
|
|
|
|
|
|
|
OP_EQ_F,
|
|
|
|
OP_EQ_V,
|
|
|
|
OP_EQ_S,
|
|
|
|
OP_EQ_E,
|
2004-02-11 06:52:19 +00:00
|
|
|
OP_EQ_FN,
|
2001-02-19 21:15:25 +00:00
|
|
|
|
|
|
|
OP_NE_F,
|
|
|
|
OP_NE_V,
|
|
|
|
OP_NE_S,
|
|
|
|
OP_NE_E,
|
2004-02-11 06:52:19 +00:00
|
|
|
OP_NE_FN,
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2002-01-30 21:20:12 +00:00
|
|
|
OP_LE_F,
|
|
|
|
OP_GE_F,
|
|
|
|
OP_LT_F,
|
|
|
|
OP_GT_F,
|
2001-02-19 21:15:25 +00:00
|
|
|
|
|
|
|
OP_LOAD_F,
|
|
|
|
OP_LOAD_V,
|
|
|
|
OP_LOAD_S,
|
|
|
|
OP_LOAD_ENT,
|
|
|
|
OP_LOAD_FLD,
|
2004-02-11 06:52:19 +00:00
|
|
|
OP_LOAD_FN,
|
2001-02-19 21:15:25 +00:00
|
|
|
|
|
|
|
OP_ADDRESS,
|
|
|
|
|
|
|
|
OP_STORE_F,
|
|
|
|
OP_STORE_V,
|
|
|
|
OP_STORE_S,
|
|
|
|
OP_STORE_ENT,
|
|
|
|
OP_STORE_FLD,
|
2004-02-11 06:52:19 +00:00
|
|
|
OP_STORE_FN,
|
2001-02-19 21:15:25 +00:00
|
|
|
|
|
|
|
OP_STOREP_F,
|
|
|
|
OP_STOREP_V,
|
|
|
|
OP_STOREP_S,
|
|
|
|
OP_STOREP_ENT,
|
|
|
|
OP_STOREP_FLD,
|
2004-02-11 06:52:19 +00:00
|
|
|
OP_STOREP_FN,
|
2001-02-19 21:15:25 +00:00
|
|
|
|
|
|
|
OP_RETURN,
|
|
|
|
OP_NOT_F,
|
|
|
|
OP_NOT_V,
|
|
|
|
OP_NOT_S,
|
|
|
|
OP_NOT_ENT,
|
2004-02-11 06:52:19 +00:00
|
|
|
OP_NOT_FN,
|
2001-02-19 21:15:25 +00:00
|
|
|
OP_IF,
|
|
|
|
OP_IFNOT,
|
|
|
|
OP_CALL0,
|
|
|
|
OP_CALL1,
|
|
|
|
OP_CALL2,
|
|
|
|
OP_CALL3,
|
|
|
|
OP_CALL4,
|
|
|
|
OP_CALL5,
|
|
|
|
OP_CALL6,
|
|
|
|
OP_CALL7,
|
|
|
|
OP_CALL8,
|
|
|
|
OP_STATE,
|
|
|
|
OP_GOTO,
|
|
|
|
OP_AND,
|
|
|
|
OP_OR,
|
|
|
|
|
|
|
|
OP_BITAND,
|
2001-06-03 17:36:49 +00:00
|
|
|
OP_BITOR,
|
|
|
|
|
|
|
|
OP_ADD_S,
|
2001-06-04 03:36:35 +00:00
|
|
|
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D,
|
2004-02-11 06:52:19 +00:00
|
|
|
OP_STOREB_FN,
|
2001-11-02 22:41:11 +00:00
|
|
|
OP_STOREB_I,
|
|
|
|
OP_STOREB_P,
|
|
|
|
|
|
|
|
OP_ADDRESS_F,
|
|
|
|
OP_ADDRESS_V,
|
|
|
|
OP_ADDRESS_S,
|
|
|
|
OP_ADDRESS_ENT,
|
|
|
|
OP_ADDRESS_FLD,
|
2004-02-11 06:52:19 +00:00
|
|
|
OP_ADDRESS_FN,
|
2001-11-02 22:41:11 +00:00
|
|
|
OP_ADDRESS_I,
|
|
|
|
OP_ADDRESS_P,
|
|
|
|
|
|
|
|
OP_LEA,
|
pr_comp.h:
o add ev_uniteger to the types enum
o add opcodes for ifbe, ifb, ifae, ifa, jump, lt.ui, gt.ui, le.ui, ge.ui
progs.h:
o add uinteger accessors
pr_exec.c:
o implement ifbe, ifb, ifae, ifa, jump, lt.ui, gt.ui, le.ui, ge.ui
pr_opcode.c:
o add opcodes for ifbe, ifb, ifae, ifa, jump, lt.ui, gt.ui, le.ui, ge.ui
expr.h:
o prototype inc_users
qfcc.h:
o add externs for op_ifbe, op_ifb, op_ifae and op_ifa
emit.c:
o don't bother emiting an assignment to a temp def that's only used once
(ie, it's never read, only written to)
o support the new if* instructions
expr.c:
o support the new if* insructions
o dectect expression loops in append_expr
o support unsigned integers
o re-work temp def usage counting
pr_def.c
o debugging for temp def usage counts
pr_opcode.c:
o support the new if* instructions
qc-parse.y:
o provide defines for IFBE IFB IFAE IFA
switch.c:
o do binary searches for strings, floats and ints if there are more than
8 cases in a switch. Strings need more testing.
2001-11-09 00:58:16 +00:00
|
|
|
|
|
|
|
OP_IFBE,
|
|
|
|
OP_IFB,
|
|
|
|
OP_IFAE,
|
|
|
|
OP_IFA,
|
|
|
|
|
|
|
|
OP_JUMP,
|
2001-11-13 08:58:54 +00:00
|
|
|
OP_JUMPB,
|
pr_comp.h:
o add ev_uniteger to the types enum
o add opcodes for ifbe, ifb, ifae, ifa, jump, lt.ui, gt.ui, le.ui, ge.ui
progs.h:
o add uinteger accessors
pr_exec.c:
o implement ifbe, ifb, ifae, ifa, jump, lt.ui, gt.ui, le.ui, ge.ui
pr_opcode.c:
o add opcodes for ifbe, ifb, ifae, ifa, jump, lt.ui, gt.ui, le.ui, ge.ui
expr.h:
o prototype inc_users
qfcc.h:
o add externs for op_ifbe, op_ifb, op_ifae and op_ifa
emit.c:
o don't bother emiting an assignment to a temp def that's only used once
(ie, it's never read, only written to)
o support the new if* instructions
expr.c:
o support the new if* insructions
o dectect expression loops in append_expr
o support unsigned integers
o re-work temp def usage counting
pr_def.c
o debugging for temp def usage counts
pr_opcode.c:
o support the new if* instructions
qc-parse.y:
o provide defines for IFBE IFB IFAE IFA
switch.c:
o do binary searches for strings, floats and ints if there are more than
8 cases in a switch. Strings need more testing.
2001-11-09 00:58:16 +00:00
|
|
|
|
2003-07-26 21:07:51 +00:00
|
|
|
OP_LT_U,
|
|
|
|
OP_GT_U,
|
|
|
|
OP_LE_U,
|
|
|
|
OP_GE_U,
|
2001-12-07 20:07:38 +00:00
|
|
|
|
|
|
|
OP_LOADBI_F,
|
|
|
|
OP_LOADBI_V,
|
|
|
|
OP_LOADBI_S,
|
|
|
|
OP_LOADBI_ENT,
|
|
|
|
OP_LOADBI_FLD,
|
2004-02-11 06:52:19 +00:00
|
|
|
OP_LOADBI_FN,
|
2001-12-07 20:07:38 +00:00
|
|
|
OP_LOADBI_I,
|
|
|
|
OP_LOADBI_P,
|
|
|
|
|
|
|
|
OP_STOREBI_F,
|
|
|
|
OP_STOREBI_V,
|
|
|
|
OP_STOREBI_S,
|
|
|
|
OP_STOREBI_ENT,
|
|
|
|
OP_STOREBI_FLD,
|
2004-02-11 06:52:19 +00:00
|
|
|
OP_STOREBI_FN,
|
2001-12-07 20:07:38 +00:00
|
|
|
OP_STOREBI_I,
|
|
|
|
OP_STOREBI_P,
|
2001-12-08 08:19:48 +00:00
|
|
|
|
|
|
|
OP_LEAI,
|
2001-12-08 20:17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Q,
|
2004-04-08 00:56:30 +00:00
|
|
|
OP_NOT_Q,
|
|
|
|
OP_EQ_Q,
|
|
|
|
OP_NE_Q,
|
|
|
|
OP_STORE_Q,
|
|
|
|
OP_STOREB_Q,
|
|
|
|
OP_STOREBI_Q,
|
|
|
|
OP_STOREP_Q,
|
|
|
|
OP_LOAD_Q,
|
|
|
|
OP_LOADB_Q,
|
|
|
|
OP_LOADBI_Q,
|
|
|
|
OP_ADDRESS_Q,
|
2005-06-12 09:54:01 +00:00
|
|
|
|
|
|
|
OP_RCALL0,
|
|
|
|
OP_RCALL1,
|
|
|
|
OP_RCALL2,
|
|
|
|
OP_RCALL3,
|
|
|
|
OP_RCALL4,
|
|
|
|
OP_RCALL5,
|
|
|
|
OP_RCALL6,
|
|
|
|
OP_RCALL7,
|
|
|
|
OP_RCALL8,
|
2001-06-03 19:32:50 +00:00
|
|
|
} pr_opcode_e;
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2002-06-01 06:58:32 +00:00
|
|
|
typedef struct opcode_s {
|
2001-07-14 02:34:16 +00:00
|
|
|
const char *name;
|
|
|
|
const char *opname;
|
|
|
|
pr_opcode_e opcode;
|
|
|
|
qboolean right_associative;
|
|
|
|
etype_t type_a, type_b, type_c;
|
2003-04-17 00:01:48 +00:00
|
|
|
unsigned int min_version;
|
2003-07-30 22:24:16 +00:00
|
|
|
const char *fmt;
|
2001-07-14 02:34:16 +00:00
|
|
|
} opcode_t;
|
|
|
|
|
|
|
|
extern opcode_t pr_opcodes[];
|
2007-04-04 12:30:49 +00:00
|
|
|
opcode_t *PR_Opcode (pr_short_t opcode);
|
2001-07-14 02:34:16 +00:00
|
|
|
void PR_Opcode_Init (void);
|
2001-03-28 17:17:56 +00:00
|
|
|
|
2002-06-01 06:58:32 +00:00
|
|
|
typedef struct statement_s {
|
2007-04-04 12:30:49 +00:00
|
|
|
pr_opcode_e op:16;
|
|
|
|
pr_ushort_t a,b,c;
|
2001-02-19 21:15:25 +00:00
|
|
|
} dstatement_t;
|
|
|
|
|
2002-06-01 06:58:32 +00:00
|
|
|
typedef struct ddef_s {
|
2007-04-04 12:30:49 +00:00
|
|
|
pr_ushort_t type; // if DEF_SAVEGLOBGAL bit is set
|
2001-02-19 21:15:25 +00:00
|
|
|
// the variable needs to be saved in savegames
|
2007-04-04 12:30:49 +00:00
|
|
|
pr_ushort_t ofs;
|
|
|
|
pr_int_t s_name;
|
2001-02-19 21:15:25 +00:00
|
|
|
} ddef_t;
|
|
|
|
|
|
|
|
#define DEF_SAVEGLOBAL (1<<15)
|
|
|
|
|
|
|
|
#define MAX_PARMS 8
|
|
|
|
|
2002-06-01 06:58:32 +00:00
|
|
|
typedef struct dfunction_s {
|
2007-04-04 12:30:49 +00:00
|
|
|
pr_int_t first_statement; // negative numbers are builtins
|
|
|
|
pr_int_t parm_start;
|
|
|
|
pr_int_t locals; // total ints of parms + locals
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2007-04-04 12:30:49 +00:00
|
|
|
pr_int_t profile; // runtime
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2007-04-04 12:30:49 +00:00
|
|
|
pr_int_t s_name;
|
|
|
|
pr_int_t s_file; // source file defined in
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2007-04-04 12:30:49 +00:00
|
|
|
pr_int_t numparms;
|
|
|
|
uint8_t parm_size[MAX_PARMS];
|
2001-02-19 21:15:25 +00:00
|
|
|
} dfunction_t;
|
|
|
|
|
2002-06-07 20:56:54 +00:00
|
|
|
typedef union pr_type_u {
|
2007-04-04 12:30:49 +00:00
|
|
|
float float_var;
|
|
|
|
string_t string_var;
|
|
|
|
func_t func_var;
|
|
|
|
pr_int_t entity_var;
|
|
|
|
float vector_var[1]; // really 3, but this structure must be 32 bits
|
|
|
|
float quat_var[1]; // really 4, but this structure must be 32 bits
|
|
|
|
pr_int_t integer_var;
|
|
|
|
pointer_t pointer_var;
|
|
|
|
pr_uint_t uinteger_var;
|
2002-06-07 20:56:54 +00:00
|
|
|
} pr_type_t;
|
|
|
|
|
2002-10-16 22:17:26 +00:00
|
|
|
typedef struct pr_va_list_s {
|
2007-04-04 12:30:49 +00:00
|
|
|
pr_int_t count;
|
|
|
|
pointer_t list; // pr_type_t
|
2002-10-16 22:17:26 +00:00
|
|
|
} pr_va_list_t;
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2001-06-09 06:25:33 +00:00
|
|
|
#define PROG_ID_VERSION 6
|
2004-11-10 05:37:00 +00:00
|
|
|
#define PROG_VERSION 0x00fff005 // MMmmmRRR 0.fff.005 (hex)
|
2001-06-09 06:25:33 +00:00
|
|
|
|
2002-06-01 06:58:32 +00:00
|
|
|
typedef struct dprograms_s {
|
2007-04-04 12:30:49 +00:00
|
|
|
pr_uint_t version;
|
|
|
|
pr_uint_t crc; // check of header file
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2007-04-04 12:30:49 +00:00
|
|
|
pr_uint_t ofs_statements;
|
|
|
|
pr_uint_t numstatements; // statement 0 is an error
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2007-04-04 12:30:49 +00:00
|
|
|
pr_uint_t ofs_globaldefs;
|
|
|
|
pr_uint_t numglobaldefs;
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2007-04-04 12:30:49 +00:00
|
|
|
pr_uint_t ofs_fielddefs;
|
|
|
|
pr_uint_t numfielddefs;
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2007-04-04 12:30:49 +00:00
|
|
|
pr_uint_t ofs_functions;
|
|
|
|
pr_int_t numfunctions; // function 0 is an empty
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2007-04-04 12:30:49 +00:00
|
|
|
pr_uint_t ofs_strings;
|
|
|
|
pr_int_t numstrings; // first string is a null string
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2007-04-04 12:30:49 +00:00
|
|
|
pr_uint_t ofs_globals;
|
|
|
|
pr_uint_t numglobals;
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2007-04-04 12:30:49 +00:00
|
|
|
pr_uint_t entityfields;
|
2001-02-19 21:15:25 +00:00
|
|
|
} dprograms_t;
|
|
|
|
|
2001-03-28 17:17:56 +00:00
|
|
|
#endif // __pr_comp_h
|