From 8e6b39d80e9f8db8389bd2a8106d0f64b91c19e9 Mon Sep 17 00:00:00 2001 From: Axel Souchet <0vercl0k@tuxfamily.org> Date: Sun, 9 Sep 2018 06:11:00 -0700 Subject: Adds Windows support and AppVeyor CI (#835) * Get miasm to work on Windows, also add AppVeyor CI * Fix gcc jitter on Linux * Make the dse_crackme tests work on Windows * calling build and then install is less confusing than install twice * fix os.rename race condition on Windows * clean it up * Clean up after the unused cl.exe's artifacts * Use is_win instead of an additional check * Fix issue on Windows where 'w' and 'wb' modes are different * Address review feedback * setuptools is actually not required, so reverting --- miasm2/jitter/op_semantics.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'miasm2/jitter/op_semantics.c') diff --git a/miasm2/jitter/op_semantics.c b/miasm2/jitter/op_semantics.c index a0c2316e..33a07054 100644 --- a/miasm2/jitter/op_semantics.c +++ b/miasm2/jitter/op_semantics.c @@ -140,21 +140,21 @@ int imul_hi_op_08(char a, char b) { int64_t res = 0; res = a*b; - return res>>8; + return (int)(res>>8); } int imul_hi_op_16(short a, short b) { int64_t res = 0; res = a*b; - return res>>16; + return (int)(res>>16); } int imul_hi_op_32(int a, int b) { int64_t res = 0; res = (int64_t)a*(int64_t)b; - return res>>32ULL; + return (int)(res>>32ULL); } unsigned int umul16_lo(unsigned short a, unsigned short b) @@ -259,9 +259,9 @@ unsigned int cntleadzeros(uint64_t size, uint64_t src) for (i=(int64_t)size-1; i>=0; i--){ if (src & (1ull << i)) - return size - (i + 1); + return (unsigned int)(size - (i + 1)); } - return size; + return (unsigned int)size; } /* @@ -277,9 +277,9 @@ unsigned int cnttrailzeros(uint64_t size, uint64_t src) uint64_t i; for (i=0; i