i965/fs: Add fs_inst constructor that takes a list of sources.
Also add an emit() function that calls it. Reviewed-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
521f9b9a48
commit
84e0a5c406
|
@ -101,6 +101,11 @@ fs_inst::fs_inst(enum opcode opcode, const fs_reg &dst, const fs_reg &src0,
|
||||||
init(opcode, dst, src, 3);
|
init(opcode, dst, src, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fs_inst::fs_inst(enum opcode opcode, const fs_reg &dst, fs_reg src[], int sources)
|
||||||
|
{
|
||||||
|
init(opcode, dst, src, sources);
|
||||||
|
}
|
||||||
|
|
||||||
fs_inst::fs_inst(const fs_inst &that)
|
fs_inst::fs_inst(const fs_inst &that)
|
||||||
{
|
{
|
||||||
memcpy(this, &that, sizeof(that));
|
memcpy(this, &that, sizeof(that));
|
||||||
|
@ -740,6 +745,13 @@ fs_visitor::emit(enum opcode opcode, fs_reg dst,
|
||||||
return emit(new(mem_ctx) fs_inst(opcode, dst, src0, src1, src2));
|
return emit(new(mem_ctx) fs_inst(opcode, dst, src0, src1, src2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fs_inst *
|
||||||
|
fs_visitor::emit(enum opcode opcode, fs_reg dst,
|
||||||
|
fs_reg src[], int sources)
|
||||||
|
{
|
||||||
|
return emit(new(mem_ctx) fs_inst(opcode, dst, src, sources));
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
fs_visitor::push_force_uncompressed()
|
fs_visitor::push_force_uncompressed()
|
||||||
{
|
{
|
||||||
|
|
|
@ -198,6 +198,7 @@ public:
|
||||||
const fs_reg &src1);
|
const fs_reg &src1);
|
||||||
fs_inst(enum opcode opcode, const fs_reg &dst, const fs_reg &src0,
|
fs_inst(enum opcode opcode, const fs_reg &dst, const fs_reg &src0,
|
||||||
const fs_reg &src1, const fs_reg &src2);
|
const fs_reg &src1, const fs_reg &src2);
|
||||||
|
fs_inst(enum opcode opcode, const fs_reg &dst, fs_reg src[], int sources);
|
||||||
fs_inst(const fs_inst &that);
|
fs_inst(const fs_inst &that);
|
||||||
|
|
||||||
void resize_sources(uint8_t num_sources);
|
void resize_sources(uint8_t num_sources);
|
||||||
|
@ -295,6 +296,8 @@ public:
|
||||||
fs_inst *emit(enum opcode opcode, fs_reg dst, fs_reg src0, fs_reg src1);
|
fs_inst *emit(enum opcode opcode, fs_reg dst, fs_reg src0, fs_reg src1);
|
||||||
fs_inst *emit(enum opcode opcode, fs_reg dst,
|
fs_inst *emit(enum opcode opcode, fs_reg dst,
|
||||||
fs_reg src0, fs_reg src1, fs_reg src2);
|
fs_reg src0, fs_reg src1, fs_reg src2);
|
||||||
|
fs_inst *emit(enum opcode opcode, fs_reg dst,
|
||||||
|
fs_reg src[], int sources);
|
||||||
|
|
||||||
fs_inst *MOV(fs_reg dst, fs_reg src);
|
fs_inst *MOV(fs_reg dst, fs_reg src);
|
||||||
fs_inst *NOT(fs_reg dst, fs_reg src);
|
fs_inst *NOT(fs_reg dst, fs_reg src);
|
||||||
|
|
Loading…
Reference in New Issue