about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--miasm2/arch/x86/sem.py2
-rw-r--r--miasm2/jitter/jitcore_gcc.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py
index e843cd2b..eb067c55 100644
--- a/miasm2/arch/x86/sem.py
+++ b/miasm2/arch/x86/sem.py
@@ -1448,7 +1448,7 @@ def idiv(ir, instr, a):
 
     if size == 8:
         b = mRAX[instr.mode][:16]
-    elif size in [16, 32]:
+    elif size in [16, 32, 64]:
         s1, s2 = mRDX[size], mRAX[size]
         b = m2_expr.ExprCompose([(s2, 0, size),
                                  (s1, size, size * 2)])
diff --git a/miasm2/jitter/jitcore_gcc.py b/miasm2/jitter/jitcore_gcc.py
index f001cb5c..c703c661 100644
--- a/miasm2/jitter/jitcore_gcc.py
+++ b/miasm2/jitter/jitcore_gcc.py
@@ -102,7 +102,8 @@ class JitCore_Gcc(jitcore.JitCore):
             os.close(fdesc)
 
             # Create unique SO file
-            _, fname_tmp = tempfile.mkstemp(suffix=".so")
+            fdesc, fname_tmp = tempfile.mkstemp(suffix=".so")
+            os.close(fdesc)
 
             inc_dir = ["-I%s" % inc for inc in self.include_files]
             libs = ["%s" % lib for lib in self.libs]