45 rs_trace(
"emit DELTA magic");
53 int param_len = rs_int_len(len);
56 cmd = RS_OP_LITERAL_N1;
57 else if (param_len == 2)
58 cmd = RS_OP_LITERAL_N2;
60 assert(param_len == 4);
61 cmd = RS_OP_LITERAL_N4;
64 rs_trace(
"emit LITERAL_N%d(len=%d), cmd_byte=%#04x", param_len, len, cmd);
81 const int where_bytes = rs_int_len(where);
82 const int len_bytes = rs_int_len(len);
86 cmd = RS_OP_COPY_N8_N1;
87 else if (where_bytes == 4)
88 cmd = RS_OP_COPY_N4_N1;
89 else if (where_bytes == 2)
90 cmd = RS_OP_COPY_N2_N1;
92 assert(where_bytes == 1);
93 cmd = RS_OP_COPY_N1_N1;
97 else if (len_bytes == 2)
99 else if (len_bytes == 4)
102 assert(len_bytes == 8);
106 rs_trace(
"emit COPY_N%d_N%d(where=" FMT_LONG
", len=" FMT_LONG
107 "), cmd_byte=%#04x", where_bytes, len_bytes, where, len, cmd);
113 stats->copy_bytes += len;
114 stats->copy_cmdbytes += 1 + where_bytes + len_bytes;
124 rs_trace(
"emit END, cmd_byte=%#04x", cmd);