summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuiling Song <ruiling.song@intel.com>2015-04-30 11:49:47 +0800
committerZhigang Gong <zhigang.gong@intel.com>2015-05-15 13:13:41 +0800
commitffc54c74fcbab60a8022958e442b4f3c333a427d (patch)
tree5b13107674794c7a78f87ec861099243c0204ec3
parent030cc96a3a0f94dbf99b8fb441bd0108ad027c79 (diff)
GBE: Fix the immediate data type
Signed-off-by: Ruiling Song <ruiling.song@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@intel.com>
-rw-r--r--backend/src/ir/immediate.hpp12
-rw-r--r--backend/src/llvm/llvm_gen_backend.cpp2
2 files changed, 7 insertions, 7 deletions
diff --git a/backend/src/ir/immediate.hpp b/backend/src/ir/immediate.hpp
index 6b27e8b3..ff37a299 100644
--- a/backend/src/ir/immediate.hpp
+++ b/backend/src/ir/immediate.hpp
@@ -130,11 +130,11 @@ namespace ir {
DECL_CONSTRUCTOR(int8_t, s8, TYPE_S8)
DECL_CONSTRUCTOR(uint8_t, u8, TYPE_U8)
DECL_CONSTRUCTOR(int16_t, s16, TYPE_S16)
- DECL_CONSTRUCTOR(uint16_t, u16, TYPE_S16)
+ DECL_CONSTRUCTOR(uint16_t, u16, TYPE_U16)
DECL_CONSTRUCTOR(int32_t, s32, TYPE_S32)
- DECL_CONSTRUCTOR(uint32_t, u32, TYPE_S32)
+ DECL_CONSTRUCTOR(uint32_t, u32, TYPE_U32)
DECL_CONSTRUCTOR(int64_t, s64, TYPE_S64)
- DECL_CONSTRUCTOR(uint64_t, u64, TYPE_S64)
+ DECL_CONSTRUCTOR(uint64_t, u64, TYPE_U64)
DECL_CONSTRUCTOR(float, f32, TYPE_FLOAT)
DECL_CONSTRUCTOR(double, f64, TYPE_DOUBLE)
#undef DECL_CONSTRUCTOR
@@ -155,11 +155,11 @@ namespace ir {
DECL_CONSTRUCTOR(int8_t, s8, TYPE_S8, elemNum)
DECL_CONSTRUCTOR(uint8_t, u8, TYPE_U8, elemNum)
DECL_CONSTRUCTOR(int16_t, s16, TYPE_S16, elemNum)
- DECL_CONSTRUCTOR(uint16_t, u16, TYPE_S16, elemNum)
+ DECL_CONSTRUCTOR(uint16_t, u16, TYPE_U16, elemNum)
DECL_CONSTRUCTOR(int32_t, s32, TYPE_S32, elemNum)
- DECL_CONSTRUCTOR(uint32_t, u32, TYPE_S32, elemNum)
+ DECL_CONSTRUCTOR(uint32_t, u32, TYPE_U32, elemNum)
DECL_CONSTRUCTOR(int64_t, s64, TYPE_S64, elemNum)
- DECL_CONSTRUCTOR(uint64_t, u64, TYPE_S64, elemNum)
+ DECL_CONSTRUCTOR(uint64_t, u64, TYPE_U64, elemNum)
DECL_CONSTRUCTOR(float, f32, TYPE_FLOAT, elemNum)
DECL_CONSTRUCTOR(double, f64, TYPE_DOUBLE, elemNum)
#undef DECL_CONSTRUCTOR
diff --git a/backend/src/llvm/llvm_gen_backend.cpp b/backend/src/llvm/llvm_gen_backend.cpp
index fadc97be..61b66b66 100644
--- a/backend/src/llvm/llvm_gen_backend.cpp
+++ b/backend/src/llvm/llvm_gen_backend.cpp
@@ -3528,7 +3528,7 @@ namespace gbe
if (step != 0) {
ir::ImmediateIndex stepImm = ctx.newIntegerImmediate(step, ir::TYPE_U32);
ir::Register stepReg = ctx.reg(ctx.getPointerFamily());
- ctx.LOADI(ir::TYPE_S32, stepReg, stepImm);
+ ctx.LOADI(ir::TYPE_U32, stepReg, stepImm);
ctx.ADD(ir::TYPE_U32, stack, stack, stepReg);
ctx.getFunction().pushStackSize(step);
}