mirror of
https://github.com/RRZE-HPC/OSACA.git
synced 2026-01-05 02:30:08 +01:00
added fallback search in arch/ISA model for ARM instructions with shape/cc suffixes
This commit is contained in:
@@ -192,11 +192,25 @@ class ArchSemantics(ISASemantics):
|
||||
instruction_data = self._machine_model.get_instruction(
|
||||
instruction_form["instruction"], instruction_form["operands"]
|
||||
)
|
||||
if not instruction_data and instruction_form["instruction"][-1] in self.GAS_SUFFIXES:
|
||||
if (
|
||||
not instruction_data
|
||||
and self._isa == "x86"
|
||||
and instruction_form["instruction"][-1] in self.GAS_SUFFIXES
|
||||
):
|
||||
# check for instruction without GAS suffix
|
||||
instruction_data = self._machine_model.get_instruction(
|
||||
instruction_form["instruction"][:-1], instruction_form["operands"]
|
||||
)
|
||||
if (
|
||||
instruction_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(".")
|
||||
instruction_data = self._machine_model.get_instruction(
|
||||
instruction_form["instruction"][:suffix_start], instruction_form["operands"]
|
||||
)
|
||||
if instruction_data:
|
||||
# instruction form in DB
|
||||
(
|
||||
@@ -223,12 +237,23 @@ class ArchSemantics(ISASemantics):
|
||||
)
|
||||
if (
|
||||
not instruction_data_reg
|
||||
and self._isa == "x86"
|
||||
and instruction_form["instruction"][-1] in self.GAS_SUFFIXES
|
||||
):
|
||||
# check for instruction without GAS suffix
|
||||
instruction_data_reg = self._machine_model.get_instruction(
|
||||
instruction_form["instruction"][:-1], operands
|
||||
)
|
||||
if (
|
||||
instruction_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(".")
|
||||
instruction_data_reg = self._machine_model.get_instruction(
|
||||
instruction_form["instruction"][:suffix_start], operands
|
||||
)
|
||||
if instruction_data_reg:
|
||||
assign_unknown = False
|
||||
reg_type = self._parser.get_reg_type(
|
||||
|
||||
Reference in New Issue
Block a user