From 8401cce1e885832f666f0131d928b84b20b6e009 Mon Sep 17 00:00:00 2001 From: Ruiling Song Date: Tue, 12 Nov 2013 09:10:01 +0800 Subject: [PATCH] GBE: handle half type size Signed-off-by: Ruiling Song Tested-by: "Sun, Yi" --- backend/src/llvm/llvm_passes.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/src/llvm/llvm_passes.cpp b/backend/src/llvm/llvm_passes.cpp index 6097f80..d31f07e 100644 --- a/backend/src/llvm/llvm_passes.cpp +++ b/backend/src/llvm/llvm_passes.cpp @@ -141,6 +141,7 @@ namespace gbe case Type::IntegerTyID: case Type::FloatTyID: case Type::DoubleTyID: + case Type::HalfTyID: return getTypeBitSize(unit, Ty)/8; case Type::ArrayTyID: return getAlignmentByte(unit, cast(Ty)->getElementType()); @@ -165,6 +166,7 @@ namespace gbe case Type::VoidTyID: NOT_SUPPORTED; case Type::PointerTyID: return unit.getPointerSize(); case Type::IntegerTyID: return cast(Ty)->getBitWidth(); + case Type::HalfTyID: return 16; case Type::FloatTyID: return 32; case Type::DoubleTyID: return 64; case Type::VectorTyID: -- 2.7.4