From 26c8f70fd837baec98bcf2aac89ae658c5590013 Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Wed, 3 May 2017 23:37:30 -0400 Subject: Adding IL instruction for truncating result to smaller value --- lowlevelil.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'lowlevelil.cpp') diff --git a/lowlevelil.cpp b/lowlevelil.cpp index d266c2c9..0b2837f1 100644 --- a/lowlevelil.cpp +++ b/lowlevelil.cpp @@ -326,15 +326,21 @@ ExprId LowLevelILFunction::Not(size_t size, ExprId a, uint32_t flags) } -ExprId LowLevelILFunction::SignExtend(size_t size, ExprId a) +ExprId LowLevelILFunction::SignExtend(size_t size, ExprId a, uint32_t flags) { - return AddExpr(LLIL_SX, size, 0, a); + return AddExpr(LLIL_SX, size, flags, a); } -ExprId LowLevelILFunction::ZeroExtend(size_t size, ExprId a) +ExprId LowLevelILFunction::ZeroExtend(size_t size, ExprId a, uint32_t flags) { - return AddExpr(LLIL_ZX, size, 0, a); + return AddExpr(LLIL_ZX, size, flags, a); +} + + +ExprId LowLevelILFunction::LowPart(size_t size, ExprId a, uint32_t flags) +{ + return AddExpr(LLIL_LOW_PART, size, flags, a); } -- cgit v1.3.1