Merge branch 'master' into pr-armcc

This commit is contained in:
JanLJL
2023-03-14 17:50:48 +01:00
8 changed files with 228 additions and 48 deletions

View File

@@ -55,11 +55,21 @@ class ISASemantics(object):
isa_data = self._isa_model.get_instruction(
instruction_form["instruction"], instruction_form["operands"]
)
if isa_data is None and instruction_form["instruction"][-1] in self.GAS_SUFFIXES:
if (
isa_data is None
and self._isa == "x86"
and instruction_form["instruction"][-1] in self.GAS_SUFFIXES
):
# Check for instruction without GAS suffix
isa_data = self._isa_model.get_instruction(
instruction_form["instruction"][:-1], instruction_form["operands"]
)
if isa_data is None and self._isa == "aarch64" and "." in instruction_form["instruction"]:
# Check for instruction without shape/cc suffix
suffix_start = instruction_form["instruction"].index(".")
isa_data = self._isa_model.get_instruction(
instruction_form["instruction"][:suffix_start], instruction_form["operands"]
)
operands = instruction_form["operands"]
op_dict = {}
assign_default = False
@@ -77,12 +87,23 @@ class ISASemantics(object):
)
if (
isa_data_reg is None
and self._isa == "x86"
and instruction_form["instruction"][-1] in self.GAS_SUFFIXES
):
# Check for instruction without GAS suffix
isa_data_reg = self._isa_model.get_instruction(
instruction_form["instruction"][:-1], operands_reg
)
if (
isa_data_reg is None
and self._isa == "aarch64"
and "." in instruction_form["instruction"]
):
# Check for instruction without shape/cc suffix
suffix_start = instruction_form["instruction"].index(".")
isa_data_reg = self._isa_model.get_instruction(
instruction_form["instruction"][:suffix_start], operands_reg
)
if isa_data_reg:
assign_default = False
op_dict = self._apply_found_ISA_data(isa_data_reg, operands)
@@ -158,11 +179,21 @@ class ISASemantics(object):
isa_data = self._isa_model.get_instruction(
instruction_form["instruction"], instruction_form["operands"]
)
if isa_data is None and instruction_form["instruction"][-1] in self.GAS_SUFFIXES:
if (
isa_data is None
and self._isa == "x86"
and instruction_form["instruction"][-1] in self.GAS_SUFFIXES
):
# Check for instruction without GAS suffix
isa_data = self._isa_model.get_instruction(
instruction_form["instruction"][:-1], instruction_form["operands"]
)
if isa_data is None and self._isa == "aarch64" and "." in instruction_form["instruction"]:
# Check for instruction without shape/cc suffix
suffix_start = instruction_form["instruction"].index(".")
isa_data = self._isa_model.get_instruction(
instruction_form["instruction"][:suffix_start], instruction_form["operands"]
)
if only_postindexed:
for o in instruction_form.operands: