*/
struct rc_dst_register dst = try_to_reuse_dst(c, inst);
- emit1(c, inst->Prev, RC_OPCODE_FRC, 0, dst, negate(inst->U.I.SrcReg[0]));
+ emit1(c, inst->Prev, RC_OPCODE_FRC, NULL, dst, negate(inst->U.I.SrcReg[0]));
emit2(c, inst->Prev, RC_OPCODE_ADD, &inst->U.I, inst->U.I.DstReg,
inst->U.I.SrcReg[0], srcreg(RC_FILE_TEMPORARY, dst.Index));
rc_remove_instruction(inst);
struct rc_instruction* inst)
{
struct rc_dst_register dst = try_to_reuse_dst(c, inst);
- emit1(c, inst->Prev, RC_OPCODE_FRC, 0, dst, inst->U.I.SrcReg[0]);
+ emit1(c, inst->Prev, RC_OPCODE_FRC, NULL, dst, inst->U.I.SrcReg[0]);
emit2(c, inst->Prev, RC_OPCODE_ADD, &inst->U.I, inst->U.I.DstReg,
inst->U.I.SrcReg[0], negate(srcreg(RC_FILE_TEMPORARY, dst.Index)));
rc_remove_instruction(inst);
* y * sgn(x) = (x < 0 ? -y : y)
*/
struct rc_dst_register dst = try_to_reuse_dst(c, inst);
- emit1(c, inst->Prev, RC_OPCODE_FRC, 0, dst, absolute(inst->U.I.SrcReg[0]));
- emit2(c, inst->Prev, RC_OPCODE_ADD, 0, dst, absolute(inst->U.I.SrcReg[0]),
+ emit1(c, inst->Prev, RC_OPCODE_FRC, NULL, dst, absolute(inst->U.I.SrcReg[0]));
+ emit2(c, inst->Prev, RC_OPCODE_ADD, NULL, dst, absolute(inst->U.I.SrcReg[0]),
negate(srcreg(RC_FILE_TEMPORARY, dst.Index)));
emit3(c, inst->Prev, RC_OPCODE_CMP, &inst->U.I, inst->U.I.DstReg, inst->U.I.SrcReg[0],
negate(srcreg(RC_FILE_TEMPORARY, dst.Index)), srcreg(RC_FILE_TEMPORARY, dst.Index));
struct rc_instruction * inst_mov;
inst_mov = emit1(c, inst,
- RC_OPCODE_MOV, 0, inst->U.I.DstReg,
+ RC_OPCODE_MOV, NULL, inst->U.I.DstReg,
srcreg(RC_FILE_TEMPORARY, rc_find_free_temporary(c)));
inst->U.I.DstReg.File = RC_FILE_TEMPORARY;
/* tmp.x = max(0.0, Src.x); */
/* tmp.y = max(0.0, Src.y); */
/* tmp.w = clamp(Src.z, -128+eps, 128-eps); */
- emit2(c, inst->Prev, RC_OPCODE_MAX, 0,
+ emit2(c, inst->Prev, RC_OPCODE_MAX, NULL,
dstregtmpmask(temp, RC_MASK_XYW),
inst->U.I.SrcReg[0],
swizzle(srcreg(RC_FILE_CONSTANT, constant),
RC_SWIZZLE_ZERO, RC_SWIZZLE_ZERO, RC_SWIZZLE_ZERO, constant_swizzle&3));
- emit2(c, inst->Prev, RC_OPCODE_MIN, 0,
+ emit2(c, inst->Prev, RC_OPCODE_MIN, NULL,
dstregtmpmask(temp, RC_MASK_Z),
swizzle_wwww(srctemp),
negate(srcregswz(RC_FILE_CONSTANT, constant, constant_swizzle)));
/* tmp.w = Pow(tmp.y, tmp.w) */
- emit1(c, inst->Prev, RC_OPCODE_LG2, 0,
+ emit1(c, inst->Prev, RC_OPCODE_LG2, NULL,
dstregtmpmask(temp, RC_MASK_W),
swizzle_yyyy(srctemp));
- emit2(c, inst->Prev, RC_OPCODE_MUL, 0,
+ emit2(c, inst->Prev, RC_OPCODE_MUL, NULL,
dstregtmpmask(temp, RC_MASK_W),
swizzle_wwww(srctemp),
swizzle_zzzz(srctemp));
- emit1(c, inst->Prev, RC_OPCODE_EX2, 0,
+ emit1(c, inst->Prev, RC_OPCODE_EX2, NULL,
dstregtmpmask(temp, RC_MASK_W),
swizzle_wwww(srctemp));
{
struct rc_dst_register dst = try_to_reuse_dst(c, inst);
- emit3(c, inst->Prev, RC_OPCODE_MAD, 0,
+ emit3(c, inst->Prev, RC_OPCODE_ADD, NULL,
dst,
negate(inst->U.I.SrcReg[0]), inst->U.I.SrcReg[2], inst->U.I.SrcReg[2]);
emit3(c, inst->Prev, RC_OPCODE_MAD, &inst->U.I,
tempdst.WriteMask = RC_MASK_W;
tempsrc.Swizzle = RC_SWIZZLE_WWWW;
- emit1(c, inst->Prev, RC_OPCODE_LG2, 0, tempdst, swizzle_xxxx(inst->U.I.SrcReg[0]));
- emit2(c, inst->Prev, RC_OPCODE_MUL, 0, tempdst, tempsrc, swizzle_xxxx(inst->U.I.SrcReg[1]));
+ emit1(c, inst->Prev, RC_OPCODE_LG2, NULL, tempdst, swizzle_xxxx(inst->U.I.SrcReg[0]));
+ emit2(c, inst->Prev, RC_OPCODE_MUL, NULL, tempdst, tempsrc, swizzle_xxxx(inst->U.I.SrcReg[1]));
emit1(c, inst->Prev, RC_OPCODE_EX2, &inst->U.I, inst->U.I.DstReg, tempsrc);
rc_remove_instruction(inst);
/* add = src + .5 */
add_index = rc_find_free_temporary(c);
add_dst = dstregtmpmask(add_index, mask);
- emit2(c, inst->Prev, RC_OPCODE_ADD, 0, add_dst, inst->U.I.SrcReg[0],
+ emit2(c, inst->Prev, RC_OPCODE_ADD, NULL, add_dst, inst->U.I.SrcReg[0],
builtin_half);
add_src = srcreg(RC_FILE_TEMPORARY, add_dst.Index);
/* frac = FRC(add) */
frac_index = rc_find_free_temporary(c);
frac_dst = dstregtmpmask(frac_index, mask);
- emit1(c, inst->Prev, RC_OPCODE_FRC, 0, frac_dst, add_src);
+ emit1(c, inst->Prev, RC_OPCODE_FRC, NULL, frac_dst, add_src);
frac_src = srcreg(RC_FILE_TEMPORARY, frac_dst.Index);
/* dst = add - frac */
- emit2(c, inst->Prev, RC_OPCODE_ADD, 0, inst->U.I.DstReg,
+ emit2(c, inst->Prev, RC_OPCODE_ADD, NULL, inst->U.I.DstReg,
add_src, negate(frac_src));
rc_remove_instruction(inst);
}
{
struct rc_dst_register dst = try_to_reuse_dst(c, inst);
- emit2(c, inst->Prev, RC_OPCODE_ADD, 0, dst, inst->U.I.SrcReg[0], negate(inst->U.I.SrcReg[1]));
+ emit2(c, inst->Prev, RC_OPCODE_ADD, NULL, dst, inst->U.I.SrcReg[0], negate(inst->U.I.SrcReg[1]));
emit3(c, inst->Prev, RC_OPCODE_CMP, &inst->U.I, inst->U.I.DstReg,
negate(absolute(srcreg(RC_FILE_TEMPORARY, dst.Index))), builtin_zero, builtin_one);
{
struct rc_dst_register dst = try_to_reuse_dst(c, inst);
- emit2(c, inst->Prev, RC_OPCODE_ADD, 0, dst, inst->U.I.SrcReg[0], negate(inst->U.I.SrcReg[1]));
+ emit2(c, inst->Prev, RC_OPCODE_ADD, NULL, dst, inst->U.I.SrcReg[0], negate(inst->U.I.SrcReg[1]));
emit3(c, inst->Prev, RC_OPCODE_CMP, &inst->U.I, inst->U.I.DstReg,
srcreg(RC_FILE_TEMPORARY, dst.Index), builtin_zero, builtin_one);
{
struct rc_dst_register dst = try_to_reuse_dst(c, inst);
- emit2(c, inst->Prev, RC_OPCODE_ADD, 0, dst, negate(inst->U.I.SrcReg[0]), inst->U.I.SrcReg[1]);
+ emit2(c, inst->Prev, RC_OPCODE_ADD, NULL, dst, negate(inst->U.I.SrcReg[0]), inst->U.I.SrcReg[1]);
emit3(c, inst->Prev, RC_OPCODE_CMP, &inst->U.I, inst->U.I.DstReg,
srcreg(RC_FILE_TEMPORARY, dst.Index), builtin_one, builtin_zero);
{
struct rc_dst_register dst = try_to_reuse_dst(c, inst);
- emit2(c, inst->Prev, RC_OPCODE_ADD, 0, dst, negate(inst->U.I.SrcReg[0]), inst->U.I.SrcReg[1]);
+ emit2(c, inst->Prev, RC_OPCODE_ADD, NULL, dst, negate(inst->U.I.SrcReg[0]), inst->U.I.SrcReg[1]);
emit3(c, inst->Prev, RC_OPCODE_CMP, &inst->U.I, inst->U.I.DstReg,
srcreg(RC_FILE_TEMPORARY, dst.Index), builtin_zero, builtin_one);
{
struct rc_dst_register dst = try_to_reuse_dst(c, inst);
- emit2(c, inst->Prev, RC_OPCODE_ADD, 0, dst, inst->U.I.SrcReg[0], negate(inst->U.I.SrcReg[1]));
+ emit2(c, inst->Prev, RC_OPCODE_ADD, NULL, dst, inst->U.I.SrcReg[0], negate(inst->U.I.SrcReg[1]));
emit3(c, inst->Prev, RC_OPCODE_CMP, &inst->U.I, inst->U.I.DstReg,
srcreg(RC_FILE_TEMPORARY, dst.Index), builtin_one, builtin_zero);
{
struct rc_dst_register dst = try_to_reuse_dst(c, inst);
- emit2(c, inst->Prev, RC_OPCODE_ADD, 0, dst, inst->U.I.SrcReg[0], negate(inst->U.I.SrcReg[1]));
+ emit2(c, inst->Prev, RC_OPCODE_ADD, NULL, dst, inst->U.I.SrcReg[0], negate(inst->U.I.SrcReg[1]));
emit3(c, inst->Prev, RC_OPCODE_CMP, &inst->U.I, inst->U.I.DstReg,
negate(absolute(srcreg(RC_FILE_TEMPORARY, dst.Index))), builtin_one, builtin_zero);
/* 0 < x */
dst0 = try_to_reuse_dst(c, inst);
- emit3(c, inst->Prev, RC_OPCODE_CMP, 0,
+ emit3(c, inst->Prev, RC_OPCODE_CMP, NULL,
dst0,
negate(inst->U.I.SrcReg[0]),
builtin_one,
/* x < 0 */
tmp1 = rc_find_free_temporary(c);
- emit3(c, inst->Prev, RC_OPCODE_CMP, 0,
+ emit3(c, inst->Prev, RC_OPCODE_CMP, NULL,
dstregtmpmask(tmp1, inst->U.I.DstReg.WriteMask),
inst->U.I.SrcReg[0],
builtin_one,
/* Either both are zero, or one of them is one and the other is zero. */
/* result = tmp0 - tmp1 */
- emit2(c, inst->Prev, RC_OPCODE_ADD, 0,
+ emit2(c, inst->Prev, RC_OPCODE_ADD, NULL,
inst->U.I.DstReg,
srcreg(RC_FILE_TEMPORARY, dst0.Index),
negate(srcreg(RC_FILE_TEMPORARY, tmp1)));
struct rc_dst_register dst = try_to_reuse_dst(c, inst);
/* SLT tmp0, src0, 0.0 */
- emit2(c, inst->Prev, RC_OPCODE_SLT, 0,
+ emit2(c, inst->Prev, RC_OPCODE_SLT, NULL,
dst,
inst->U.I.SrcReg[0], builtin_zero);
/* LRP dst, tmp0, src1, src2 */
transform_LRP(c,
- emit3(c, inst->Prev, RC_OPCODE_LRP, 0,
+ emit3(c, inst->Prev, RC_OPCODE_LRP, NULL,
inst->U.I.DstReg,
srcreg(RC_FILE_TEMPORARY, dst.Index), inst->U.I.SrcReg[1], inst->U.I.SrcReg[2]));
/* MOV dst, src */
dst.WriteMask = RC_MASK_XYZW;
- emit1(c, inst->Prev, RC_OPCODE_MOV, 0,
+ emit1(c, inst->Prev, RC_OPCODE_MOV, NULL,
dst,
inst->U.I.SrcReg[0]);
/* MAX dst.y, src, 0.00...001 */
- emit2(c, inst->Prev, RC_OPCODE_MAX, 0,
+ emit2(c, inst->Prev, RC_OPCODE_MAX, NULL,
dstregtmpmask(dst.Index, RC_MASK_Y),
srcreg(RC_FILE_TEMPORARY, dst.Index),
srcregswz(RC_FILE_CONSTANT, constant, constant_swizzle));
int tmp = rc_find_free_temporary(c);
/* x <= y */
- emit2(c, inst->Prev, RC_OPCODE_SGE, 0,
+ emit2(c, inst->Prev, RC_OPCODE_SGE, NULL,
dstregtmpmask(tmp, inst->U.I.DstReg.WriteMask),
inst->U.I.SrcReg[0],
inst->U.I.SrcReg[1]);
/* y <= x */
- emit2(c, inst->Prev, RC_OPCODE_SGE, 0,
+ emit2(c, inst->Prev, RC_OPCODE_SGE, NULL,
inst->U.I.DstReg,
inst->U.I.SrcReg[1],
inst->U.I.SrcReg[0]);
/* x && y = x * y */
- emit2(c, inst->Prev, RC_OPCODE_MUL, 0,
+ emit2(c, inst->Prev, RC_OPCODE_MUL, NULL,
inst->U.I.DstReg,
srcreg(RC_FILE_TEMPORARY, tmp),
srcreg(inst->U.I.DstReg.File, inst->U.I.DstReg.Index));
int tmp = rc_find_free_temporary(c);
/* x < y */
- emit2(c, inst->Prev, RC_OPCODE_SLT, 0,
+ emit2(c, inst->Prev, RC_OPCODE_SLT, NULL,
dstregtmpmask(tmp, inst->U.I.DstReg.WriteMask),
inst->U.I.SrcReg[0],
inst->U.I.SrcReg[1]);
/* y < x */
- emit2(c, inst->Prev, RC_OPCODE_SLT, 0,
+ emit2(c, inst->Prev, RC_OPCODE_SLT, NULL,
inst->U.I.DstReg,
inst->U.I.SrcReg[1],
inst->U.I.SrcReg[0]);
/* x || y = max(x, y) */
- emit2(c, inst->Prev, RC_OPCODE_MAX, 0,
+ emit2(c, inst->Prev, RC_OPCODE_MAX, NULL,
inst->U.I.DstReg,
srcreg(RC_FILE_TEMPORARY, tmp),
srcreg(inst->U.I.DstReg.File, inst->U.I.DstReg.Index));
/* 0 < x */
dst0 = try_to_reuse_dst(c, inst);
- emit2(c, inst->Prev, RC_OPCODE_SLT, 0,
+ emit2(c, inst->Prev, RC_OPCODE_SLT, NULL,
dst0,
builtin_zero,
inst->U.I.SrcReg[0]);
/* x < 0 */
tmp1 = rc_find_free_temporary(c);
- emit2(c, inst->Prev, RC_OPCODE_SLT, 0,
+ emit2(c, inst->Prev, RC_OPCODE_SLT, NULL,
dstregtmpmask(tmp1, inst->U.I.DstReg.WriteMask),
inst->U.I.SrcReg[0],
builtin_zero);
/* Either both are zero, or one of them is one and the other is zero. */
/* result = tmp0 - tmp1 */
- emit2(c, inst->Prev, RC_OPCODE_ADD, 0,
+ emit2(c, inst->Prev, RC_OPCODE_ADD, NULL,
inst->U.I.DstReg,
srcreg(RC_FILE_TEMPORARY, dst0.Index),
negate(srcreg(RC_FILE_TEMPORARY, tmp1)));
{
unsigned int tempreg = rc_find_free_temporary(c);
- emit2(c, inst->Prev, RC_OPCODE_MUL, 0, dstregtmpmask(tempreg, RC_MASK_XY),
+ emit2(c, inst->Prev, RC_OPCODE_MUL, NULL, dstregtmpmask(tempreg, RC_MASK_XY),
swizzle_xxxx(src),
srcreg(RC_FILE_CONSTANT, constants[0]));
- emit3(c, inst->Prev, RC_OPCODE_MAD, 0, dstregtmpmask(tempreg, RC_MASK_X),
+ emit3(c, inst->Prev, RC_OPCODE_MAD, NULL, dstregtmpmask(tempreg, RC_MASK_X),
swizzle_yyyy(srcreg(RC_FILE_TEMPORARY, tempreg)),
absolute(swizzle_xxxx(src)),
swizzle_xxxx(srcreg(RC_FILE_TEMPORARY, tempreg)));
- emit3(c, inst->Prev, RC_OPCODE_MAD, 0, dstregtmpmask(tempreg, RC_MASK_Y),
+ emit3(c, inst->Prev, RC_OPCODE_MAD, NULL, dstregtmpmask(tempreg, RC_MASK_Y),
swizzle_xxxx(srcreg(RC_FILE_TEMPORARY, tempreg)),
absolute(swizzle_xxxx(srcreg(RC_FILE_TEMPORARY, tempreg))),
negate(swizzle_xxxx(srcreg(RC_FILE_TEMPORARY, tempreg))));
- emit3(c, inst->Prev, RC_OPCODE_MAD, 0, dst,
+ emit3(c, inst->Prev, RC_OPCODE_MAD, NULL, dst,
swizzle_yyyy(srcreg(RC_FILE_TEMPORARY, tempreg)),
swizzle_wwww(srcreg(RC_FILE_CONSTANT, constants[0])),
swizzle_xxxx(srcreg(RC_FILE_TEMPORARY, tempreg)));
/* MAD tmp.x, src, 1/(2*PI), 0.75 */
/* FRC tmp.x, tmp.x */
/* MAD tmp.z, tmp.x, 2*PI, -PI */
- emit3(c, inst->Prev, RC_OPCODE_MAD, 0, dstregtmpmask(tempreg, RC_MASK_W),
+ emit3(c, inst->Prev, RC_OPCODE_MAD, NULL, dstregtmpmask(tempreg, RC_MASK_W),
swizzle_xxxx(inst->U.I.SrcReg[0]),
swizzle_zzzz(srcreg(RC_FILE_CONSTANT, constants[1])),
swizzle_xxxx(srcreg(RC_FILE_CONSTANT, constants[1])));
- emit1(c, inst->Prev, RC_OPCODE_FRC, 0, dstregtmpmask(tempreg, RC_MASK_W),
+ emit1(c, inst->Prev, RC_OPCODE_FRC, NULL, dstregtmpmask(tempreg, RC_MASK_W),
swizzle_wwww(srcreg(RC_FILE_TEMPORARY, tempreg)));
- emit3(c, inst->Prev, RC_OPCODE_MAD, 0, dstregtmpmask(tempreg, RC_MASK_W),
+ emit3(c, inst->Prev, RC_OPCODE_MAD, NULL, dstregtmpmask(tempreg, RC_MASK_W),
swizzle_wwww(srcreg(RC_FILE_TEMPORARY, tempreg)),
swizzle_wwww(srcreg(RC_FILE_CONSTANT, constants[1])),
negate(swizzle_zzzz(srcreg(RC_FILE_CONSTANT, constants[0]))));
swizzle_wwww(srcreg(RC_FILE_TEMPORARY, tempreg)),
constants);
} else if (inst->U.I.Opcode == RC_OPCODE_SIN) {
- emit3(c, inst->Prev, RC_OPCODE_MAD, 0, dstregtmpmask(tempreg, RC_MASK_W),
+ emit3(c, inst->Prev, RC_OPCODE_MAD, NULL, dstregtmpmask(tempreg, RC_MASK_W),
swizzle_xxxx(inst->U.I.SrcReg[0]),
swizzle_zzzz(srcreg(RC_FILE_CONSTANT, constants[1])),
swizzle_yyyy(srcreg(RC_FILE_CONSTANT, constants[1])));
- emit1(c, inst->Prev, RC_OPCODE_FRC, 0, dstregtmpmask(tempreg, RC_MASK_W),
+ emit1(c, inst->Prev, RC_OPCODE_FRC, NULL, dstregtmpmask(tempreg, RC_MASK_W),
swizzle_wwww(srcreg(RC_FILE_TEMPORARY, tempreg)));
- emit3(c, inst->Prev, RC_OPCODE_MAD, 0, dstregtmpmask(tempreg, RC_MASK_W),
+ emit3(c, inst->Prev, RC_OPCODE_MAD, NULL, dstregtmpmask(tempreg, RC_MASK_W),
swizzle_wwww(srcreg(RC_FILE_TEMPORARY, tempreg)),
swizzle_wwww(srcreg(RC_FILE_CONSTANT, constants[1])),
negate(swizzle_zzzz(srcreg(RC_FILE_CONSTANT, constants[0]))));
} else {
struct rc_dst_register dst;
- emit3(c, inst->Prev, RC_OPCODE_MAD, 0, dstregtmpmask(tempreg, RC_MASK_XY),
+ emit3(c, inst->Prev, RC_OPCODE_MAD, NULL, dstregtmpmask(tempreg, RC_MASK_XY),
swizzle_xxxx(inst->U.I.SrcReg[0]),
swizzle_zzzz(srcreg(RC_FILE_CONSTANT, constants[1])),
swizzle(srcreg(RC_FILE_CONSTANT, constants[1]), RC_SWIZZLE_X, RC_SWIZZLE_Y, RC_SWIZZLE_Z, RC_SWIZZLE_W));
- emit1(c, inst->Prev, RC_OPCODE_FRC, 0, dstregtmpmask(tempreg, RC_MASK_XY),
+ emit1(c, inst->Prev, RC_OPCODE_FRC, NULL, dstregtmpmask(tempreg, RC_MASK_XY),
srcreg(RC_FILE_TEMPORARY, tempreg));
- emit3(c, inst->Prev, RC_OPCODE_MAD, 0, dstregtmpmask(tempreg, RC_MASK_XY),
+ emit3(c, inst->Prev, RC_OPCODE_MAD, NULL, dstregtmpmask(tempreg, RC_MASK_XY),
srcreg(RC_FILE_TEMPORARY, tempreg),
swizzle_wwww(srcreg(RC_FILE_CONSTANT, constants[1])),
negate(swizzle_zzzz(srcreg(RC_FILE_CONSTANT, constants[0]))));
temp = rc_find_free_temporary(c);
constant = rc_constants_add_immediate_scalar(&c->Program.Constants, RCP_2PI, &constant_swizzle);
- emit2(c, inst->Prev, RC_OPCODE_MUL, 0, dstregtmpmask(temp, RC_MASK_W),
+ emit2(c, inst->Prev, RC_OPCODE_MUL, NULL, dstregtmpmask(temp, RC_MASK_W),
swizzle_xxxx(inst->U.I.SrcReg[0]),
srcregswz(RC_FILE_CONSTANT, constant, constant_swizzle));
- emit1(c, inst->Prev, RC_OPCODE_FRC, 0, dstregtmpmask(temp, RC_MASK_W),
+ emit1(c, inst->Prev, RC_OPCODE_FRC, NULL, dstregtmpmask(temp, RC_MASK_W),
srcreg(RC_FILE_TEMPORARY, temp));
r300_transform_SIN_COS(c, inst, temp);
temp = rc_find_free_temporary(c);
constant = rc_constants_add_immediate_vec4(&c->Program.Constants, cons);
- emit3(c, inst->Prev, RC_OPCODE_MAD, 0, dstregtmpmask(temp, RC_MASK_W),
+ emit3(c, inst->Prev, RC_OPCODE_MAD, NULL, dstregtmpmask(temp, RC_MASK_W),
swizzle_xxxx(inst->U.I.SrcReg[0]),
srcregswz(RC_FILE_CONSTANT, constant, RC_SWIZZLE_XXXX),
srcregswz(RC_FILE_CONSTANT, constant, RC_SWIZZLE_YYYY));
- emit1(c, inst->Prev, RC_OPCODE_FRC, 0, dstregtmpmask(temp, RC_MASK_W),
+ emit1(c, inst->Prev, RC_OPCODE_FRC, NULL, dstregtmpmask(temp, RC_MASK_W),
srcreg(RC_FILE_TEMPORARY, temp));
- emit3(c, inst->Prev, RC_OPCODE_MAD, 0, dstregtmpmask(temp, RC_MASK_W),
+ emit3(c, inst->Prev, RC_OPCODE_MAD, NULL, dstregtmpmask(temp, RC_MASK_W),
srcreg(RC_FILE_TEMPORARY, temp),
srcregswz(RC_FILE_CONSTANT, constant, RC_SWIZZLE_ZZZZ),
srcregswz(RC_FILE_CONSTANT, constant, RC_SWIZZLE_WWWW));
tmp = rc_find_free_temporary(c);
/* Insert MOV after inst, set alpha to 1. */
- emit1(c, inst, RC_OPCODE_MOV, 0, inst->U.I.DstReg,
+ emit1(c, inst, RC_OPCODE_MOV, NULL, inst->U.I.DstReg,
srcregswz(RC_FILE_TEMPORARY, tmp, RC_SWIZZLE_XYZ1));
/* Re-route the destination of inst to the source of mov. */