about summary refs log tree commit diff stats
path: root/miasm2/jitter/llvmconvert.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2019-01-17 07:30:56 +0100
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2019-01-17 08:57:31 +0100
commit5fcbef659dd5d27d2953e8f35ebe004655b3f183 (patch)
tree79093188e4172955d310bff9f2c26998e5aac42f /miasm2/jitter/llvmconvert.py
parent04f2665bdc67dc350f469841c748542c70ea9747 (diff)
downloadmiasm-5fcbef659dd5d27d2953e8f35ebe004655b3f183.tar.gz
miasm-5fcbef659dd5d27d2953e8f35ebe004655b3f183.zip
Fix bad english
Diffstat (limited to 'miasm2/jitter/llvmconvert.py')
-rw-r--r--miasm2/jitter/llvmconvert.py36
1 files changed, 18 insertions, 18 deletions
diff --git a/miasm2/jitter/llvmconvert.py b/miasm2/jitter/llvmconvert.py
index 41461c3a..a31348cf 100644
--- a/miasm2/jitter/llvmconvert.py
+++ b/miasm2/jitter/llvmconvert.py
@@ -668,8 +668,8 @@ class LLVMFunction(object):
 
     # Effective constructors
 
-    def affect(self, src, dst):
-        "Affect from LLVM src to M2 dst"
+    def assign(self, src, dst):
+        "Assign from LLVM src to M2 dst"
 
         # Destination
         builder = self.builder
@@ -682,7 +682,7 @@ class LLVMFunction(object):
             addr = self.add_ir(dst.ptr)
             self.llvm_context.memory_write(self, addr, dst.size, src)
         else:
-            raise Exception("UnknownAffectationType")
+            raise Exception("UnknownAssignmentType")
 
     def init_fc(self):
         "Init the function"
@@ -1231,8 +1231,8 @@ class LLVMFunction(object):
         PC = self.llvm_context.PC
         if isinstance(offset, (int, long)):
             offset = self.add_ir(ExprInt(offset, PC.size))
-        self.affect(offset, PC)
-        self.affect(self.add_ir(ExprInt(1, 8)), ExprId("status", 32))
+        self.assign(offset, PC)
+        self.assign(self.add_ir(ExprInt(1, 8)), ExprId("status", 32))
         self.set_ret(offset)
 
         builder.position_at_end(merge_block)
@@ -1278,8 +1278,8 @@ class LLVMFunction(object):
         PC = self.llvm_context.PC
         if isinstance(offset, (int, long)):
             offset = self.add_ir(ExprInt(offset, PC.size))
-        self.affect(offset, PC)
-        self.affect(self.add_ir(ExprInt(1, 8)), ExprId("status", 32))
+        self.assign(offset, PC)
+        self.assign(self.add_ir(ExprInt(1, 8)), ExprId("status", 32))
         self.set_ret(offset)
 
         builder.position_at_end(merge_block)
@@ -1298,7 +1298,7 @@ class LLVMFunction(object):
             PC = self.llvm_context.PC
             t_size = LLVMType.IntType(PC.size)
             dst = self.builder.zext(t_size(pc_value), t_size)
-            self.affect(dst, PC)
+            self.assign(dst, PC)
 
             fc_ptr = self.mod.get_global(self.llvm_context.logging_func)
             self.builder.call(fc_ptr, [self.local_vars["vmcpu"]])
@@ -1398,9 +1398,9 @@ class LLVMFunction(object):
             dst = self.builder.zext(dst, LLVMType.IntType(PC.size))
 
         self.gen_post_code(attrib, offset)
-        self.affect(dst, PC)
+        self.assign(dst, PC)
         self.gen_post_instr_checks(attrib, dst)
-        self.affect(self.add_ir(ExprInt(0, 8)), ExprId("status", 32))
+        self.assign(self.add_ir(ExprInt(0, 8)), ExprId("status", 32))
         self.set_ret(dst)
 
 
@@ -1443,7 +1443,7 @@ class LLVMFunction(object):
             # Update the memory
             for dst, src in values.iteritems():
                 if isinstance(dst, ExprMem):
-                    self.affect(src, dst)
+                    self.assign(src, dst)
 
             # Check memory write exception
             if attributes[index].mem_write:
@@ -1453,7 +1453,7 @@ class LLVMFunction(object):
             # Update registers values
             for dst, src in values.iteritems():
                 if not isinstance(dst, ExprMem):
-                    self.affect(src, dst)
+                    self.assign(src, dst)
 
             # Check post assignblk exception flags
             if attributes[index].set_exception:
@@ -1493,9 +1493,9 @@ class LLVMFunction(object):
         builder = self.builder
         m2_exception_flag = self.llvm_context.ir_arch.arch.regs.exception_flags
         t_size = LLVMType.IntType(m2_exception_flag.size)
-        self.affect(self.add_ir(ExprInt(1, 8)),
+        self.assign(self.add_ir(ExprInt(1, 8)),
                     ExprId("status", 32))
-        self.affect(t_size(m2_csts.EXCEPT_UNK_MNEMO),
+        self.assign(t_size(m2_csts.EXCEPT_UNK_MNEMO),
                     m2_exception_flag)
         offset = self.llvm_context.ir_arch.loc_db.get_location_offset(asmblock.loc_key)
         self.set_ret(LLVMType.IntType(64)(offset))
@@ -1512,7 +1512,7 @@ class LLVMFunction(object):
             builder.position_at_end(self.get_basic_block_by_loc_key(next_label))
 
             # Common code
-            self.affect(self.add_ir(ExprInt(0, 8)),
+            self.assign(self.add_ir(ExprInt(0, 8)),
                         ExprId("status", 32))
 
             # Check if IRDst has been set
@@ -1535,8 +1535,8 @@ class LLVMFunction(object):
             builder.position_at_end(then_block)
             PC = self.llvm_context.PC
             to_ret = self.add_ir(codegen.delay_slot_dst)
-            self.affect(to_ret, PC)
-            self.affect(self.add_ir(ExprInt(0, 8)),
+            self.assign(to_ret, PC)
+            self.assign(self.add_ir(ExprInt(0, 8)),
                         ExprId("status", 32))
             self.set_ret(to_ret)
 
@@ -1545,7 +1545,7 @@ class LLVMFunction(object):
             PC = self.llvm_context.PC
             next_label_offset = self.llvm_context.ir_arch.loc_db.get_location_offset(next_label)
             to_ret = LLVMType.IntType(PC.size)(next_label_offset)
-            self.affect(to_ret, PC)
+            self.assign(to_ret, PC)
             self.set_ret(to_ret)
 
     def from_asmblock(self, asmblock):