summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunyan He <junyan.he@linux.intel.com>2015-01-06 18:01:41 +0800
committerZhigang Gong <zhigang.gong@intel.com>2015-01-20 16:30:46 +0800
commit8e476c48f133acd7aa7cf943cfa7dcfa69e6fe2a (patch)
tree45f8a36509eae35b4f7428f94776b1791d641a66
parent418ac352406ccbaaa34b3e10a9461b0159ea2eb5 (diff)
Overload all the alu1 and alu1withtemp functions.
Signed-off-by: Junyan He <junyan.he@linux.intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
-rw-r--r--backend/src/backend/gen8_context.cpp20
-rw-r--r--backend/src/backend/gen8_context.hpp2
-rw-r--r--backend/src/backend/gen_context.hpp4
3 files changed, 24 insertions, 2 deletions
diff --git a/backend/src/backend/gen8_context.cpp b/backend/src/backend/gen8_context.cpp
index 276b8c51..d9eb6bf8 100644
--- a/backend/src/backend/gen8_context.cpp
+++ b/backend/src/backend/gen8_context.cpp
@@ -51,6 +51,26 @@ namespace gbe
this->sel = GBE_NEW(Selection8, *this);
}
+ void Gen8Context::emitUnaryInstruction(const SelectionInstruction &insn)
+ {
+ switch (insn.opcode) {
+ case SEL_OP_CONVI64_TO_I:
+
+ default:
+ GenContext::emitUnaryInstruction(insn);
+ }
+ }
+
+ void Gen8Context::emitUnaryWithTempInstruction(const SelectionInstruction &insn)
+ {
+ switch (insn.opcode) {
+ case SEL_OP_CONVI_TO_I64:
+
+ default:
+ GenContext::emitUnaryWithTempInstruction(insn);
+ }
+ }
+
void Gen8Context::packLongVec(GenRegister unpacked, GenRegister packed, uint32_t simd)
{
GBE_ASSERT(packed.subnr == 0);
diff --git a/backend/src/backend/gen8_context.hpp b/backend/src/backend/gen8_context.hpp
index d9e547b9..a3c3aff6 100644
--- a/backend/src/backend/gen8_context.hpp
+++ b/backend/src/backend/gen8_context.hpp
@@ -48,6 +48,8 @@ namespace gbe
/*! Get the pointer argument size for curbe alloc */
virtual uint32_t getPointerSize(void) { return 8; }
+ virtual void emitUnaryInstruction(const SelectionInstruction &insn);
+ virtual void emitUnaryWithTempInstruction(const SelectionInstruction &insn);
virtual void emitWrite64Instruction(const SelectionInstruction &insn);
virtual void emitRead64Instruction(const SelectionInstruction &insn);
protected:
diff --git a/backend/src/backend/gen_context.hpp b/backend/src/backend/gen_context.hpp
index 317257bd..43d4e75b 100644
--- a/backend/src/backend/gen_context.hpp
+++ b/backend/src/backend/gen_context.hpp
@@ -124,8 +124,8 @@ namespace gbe
/*! Final Gen ISA emission helper functions */
void emitLabelInstruction(const SelectionInstruction &insn);
- void emitUnaryInstruction(const SelectionInstruction &insn);
- void emitUnaryWithTempInstruction(const SelectionInstruction &insn);
+ virtual void emitUnaryInstruction(const SelectionInstruction &insn);
+ virtual void emitUnaryWithTempInstruction(const SelectionInstruction &insn);
void emitBinaryInstruction(const SelectionInstruction &insn);
void emitBinaryWithTempInstruction(const SelectionInstruction &insn);
void emitTernaryInstruction(const SelectionInstruction &insn);