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-19 11:55:00 +0800
commitae59e9fd4d2777eb5a2990060d70870597f7ce05 (patch)
treec9adcfddcbbb2f696f01f480cd9ba3742cc857ef
parent347116ef2855e73c25dc09c0a8ee1c7f58c46099 (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 0487bcb8..c2c016ca 100644
--- a/backend/src/llvm/llvm_gen_backend.cpp
+++ b/backend/src/llvm/llvm_gen_backend.cpp
@@ -3546,7 +3546,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);
}