GBE: fixed two 'long' related bugs.
authorZhigang Gong <zhigang.gong@intel.com>
Tue, 8 Apr 2014 09:58:15 +0000 (17:58 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Wed, 16 Apr 2014 01:44:26 +0000 (09:44 +0800)
Didn't modify some hard coded number correctly in previous patch.
Now fix them. This could pass the corresponding regressions in
piglit test.

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
backend/src/backend/gen_insn_selection.cpp

index d0e3d0b..961f3af 100644 (file)
@@ -1259,7 +1259,7 @@ namespace gbe
   }
 
   void Selection::Opaque::I64SATADD(Reg dst, Reg src0, Reg src1, GenRegister tmp[5]) {
-    SelectionInstruction *insn = this->appendInsn(SEL_OP_I64SATADD, 7, 2);
+    SelectionInstruction *insn = this->appendInsn(SEL_OP_I64SATADD, 6, 2);
     insn->dst(0) = dst;
     insn->src(0) = src0;
     insn->src(1) = src1;
@@ -1302,12 +1302,12 @@ namespace gbe
       insn->dst(i + 1) = tmp[i];
   }
 
-  void Selection::Opaque::I64_MUL_HI(Reg dst, Reg src0, Reg src1, GenRegister tmp[10]) {
-    SelectionInstruction *insn = this->appendInsn(SEL_OP_I64_MUL_HI, 11, 2);
+  void Selection::Opaque::I64_MUL_HI(Reg dst, Reg src0, Reg src1, GenRegister tmp[9]) {
+    SelectionInstruction *insn = this->appendInsn(SEL_OP_I64_MUL_HI, 10, 2);
     insn->dst(0) = dst;
     insn->src(0) = src0;
     insn->src(1) = src1;
-    for(int i = 0; i < 10; i ++)
+    for(int i = 0; i < 9; i ++)
       insn->dst(i + 1) = tmp[i];
   }