From 7b15b7da4d84d09c2647cd2170b9a8aa28017bb0 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 11 Feb 2021 09:28:45 +0300 Subject: [PATCH 1/2] lang/llvmir/parser: Fix typo in parse_arithmetic() (was "arithmatic"). Signed-off-by: Paul Sokolovsky --- ppci/lang/llvmir/parser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ppci/lang/llvmir/parser.py b/ppci/lang/llvmir/parser.py index 47fbc316..111ab6ad 100644 --- a/ppci/lang/llvmir/parser.py +++ b/ppci/lang/llvmir/parser.py @@ -527,9 +527,9 @@ def parse_instruction(self): "lshr", "ashr", ]: - instruction = self.parse_arithmatic() + instruction = self.parse_arithmetic() elif self.peek in ["and", "or"]: - instruction = self.parse_arithmatic() + instruction = self.parse_arithmetic() elif self.peek in [ "sext", "zext", @@ -553,7 +553,7 @@ def parse_instruction(self): self.not_impl() return instruction - def parse_arithmatic(self): + def parse_arithmetic(self): op = self.consume().val lhs = self.parse_type_and_value() self.consume(",") From f6412aef6ff660792745fba8e41c3d3acf2d405d Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 11 Feb 2021 09:30:26 +0300 Subject: [PATCH 2/2] ppci/lang/llvmir/codegenerator: Fix typo in comment ("arithmatic"). Signed-off-by: Paul Sokolovsky --- ppci/lang/llvmir/codegenerator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppci/lang/llvmir/codegenerator.py b/ppci/lang/llvmir/codegenerator.py index 6c1494d4..f79cacd5 100644 --- a/ppci/lang/llvmir/codegenerator.py +++ b/ppci/lang/llvmir/codegenerator.py @@ -67,7 +67,7 @@ def gen_instruction(self, instruction): ir_ins = self.emit(ir.Alloc(name, amount)) self.val_map[instruction] = ir_ins elif isinstance(instruction, nodes.GetElementPtrInst): - # Implement arithmatic here! + # Implement arithmetic here! ir_ins = self.get_val(instruction.ptr) print(instruction.indices) # raise NotImplementedError(str(instruction))