mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 05:00:35 +00:00
Add a movepi instruction to support indirect moves of fixed size.
This commit is contained in:
parent
18005cc80d
commit
90de6b0499
3 changed files with 15 additions and 0 deletions
|
@ -257,6 +257,7 @@ typedef enum {
|
|||
|
||||
OP_MOVEI,
|
||||
OP_MOVEP,
|
||||
OP_MOVEPI,
|
||||
|
||||
OP_SHL_U,
|
||||
OP_SHR_U,
|
||||
|
|
|
@ -1055,6 +1055,15 @@ op_call:
|
|||
pr->pr_globals + OPA.integer_var,
|
||||
OPB.uinteger_var * 4);
|
||||
break;
|
||||
case OP_MOVEPI:
|
||||
if (pr_boundscheck->int_val) {
|
||||
PR_BoundsCheckSize (pr, OPC.integer_var, st->b);
|
||||
PR_BoundsCheckSize (pr, OPA.integer_var, st->b);
|
||||
}
|
||||
memmove (pr->pr_globals + OPC.integer_var,
|
||||
pr->pr_globals + OPA.integer_var,
|
||||
st->b * 4);
|
||||
break;
|
||||
|
||||
// LordHavoc: to be enabled when Progs version 7 (or whatever it will be numbered) is finalized
|
||||
/*
|
||||
|
|
|
@ -1030,6 +1030,11 @@ VISIBLE opcode_t pr_opcodes[] = {
|
|||
PROG_VERSION,
|
||||
"%Ga, %Gb, %Gc",
|
||||
},
|
||||
{"<MOVEP>", "movepi", OP_MOVEPI, true,
|
||||
ev_pointer, ev_short, ev_pointer,
|
||||
PROG_VERSION,
|
||||
"%Ga, %Gb, %Gc",
|
||||
},
|
||||
|
||||
// end of table
|
||||
{0},
|
||||
|
|
Loading…
Reference in a new issue