diff --git a/osaca/data/isa/aarch64.yml b/osaca/data/isa/aarch64.yml index 73c6223..7cd82a3 100644 --- a/osaca/data/isa/aarch64.yml +++ b/osaca/data/isa/aarch64.yml @@ -850,7 +850,7 @@ instruction_forms: shape: "*" source: true destination: false - - name: ldp + - name: [ldp, ldnp] operands: - class: register prefix: "*" @@ -895,7 +895,7 @@ instruction_forms: source: true destination: false operation: "op1['name'] = op2['name']; op1['value'] = op2['value']" - - name: stp + - name: [stp, stnp] operands: - class: register prefix: "*" diff --git a/osaca/parser/parser_AArch64.py b/osaca/parser/parser_AArch64.py index 30dd9d6..9464443 100755 --- a/osaca/parser/parser_AArch64.py +++ b/osaca/parser/parser_AArch64.py @@ -382,7 +382,7 @@ class ParserAArch64(BaseParser): ): # resolve ranges and lists return self.resolve_range_list(self.process_register_list(operand[self.REGISTER_ID])) - if self.REGISTER_ID in operand and operand[self.REGISTER_ID]["name"] == "sp": + if self.REGISTER_ID in operand and operand[self.REGISTER_ID]["name"].lower() == "sp": return self.process_sp_register(operand[self.REGISTER_ID]) # add value attribute to floating point immediates without exponent if self.IMMEDIATE_ID in operand: @@ -404,9 +404,13 @@ class ParserAArch64(BaseParser): base = memory_address.get("base", None) index = memory_address.get("index", None) scale = 1 - if base is not None and "name" in base and base["name"] == "sp": + if base is not None and "name" in base and base["name"].lower() == "sp": base["prefix"] = "x" - if index is not None and "name" in index and index["name"] == "sp": + if index is not None and "name" in index and index["name"].lower() == "sp": + index["prefix"] = "x" + if base is not None and "name" in base and base["name"].lower() == "zr": + base["prefix"] = "x" + if index is not None and "name" in index and index["name"].lower() == "zr": index["prefix"] = "x" valid_shift_ops = ["lsl", "uxtw", "uxtb", "sxtw"] if "index" in memory_address: diff --git a/osaca/semantics/hw_model.py b/osaca/semantics/hw_model.py index 6b84538..e03db3c 100755 --- a/osaca/semantics/hw_model.py +++ b/osaca/semantics/hw_model.py @@ -589,7 +589,7 @@ class MachineModel(object): return i_operand["class"] == "prfop" # condition if "condition" in operand: - if i_operand["ccode"] == self.WILDCARD: + if i_operand["class"] == "condition" and i_operand["ccode"] == self.WILDCARD: return True return i_operand["class"] == "condition" and ( operand.get("condition", None) == i_operand.get("ccode", None).upper()