i965/fs: Add and use an fs_inst copy constructor.

Will get more complicated when fs_reg src becomes a pointer.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Matt Turner 2014-02-20 09:40:02 -08:00
parent bfcf6a665b
commit 6d3a15223a
2 changed files with 6 additions and 0 deletions

View file

@ -139,6 +139,11 @@ fs_inst::fs_inst(enum opcode opcode, fs_reg dst,
assert(src[2].reg_offset >= 0);
}
fs_inst::fs_inst(const fs_inst &that)
{
memcpy(this, &that, sizeof(that));
}
#define ALU1(op) \
fs_inst * \
fs_visitor::op(fs_reg dst, fs_reg src0) \

View file

@ -197,6 +197,7 @@ public:
fs_inst(enum opcode opcode, fs_reg dst, fs_reg src0, fs_reg src1);
fs_inst(enum opcode opcode, fs_reg dst,
fs_reg src0, fs_reg src1,fs_reg src2);
fs_inst(const fs_inst &that);
bool equals(fs_inst *inst) const;
bool overwrites_reg(const fs_reg &reg) const;