diff --git a/osaca/data/isa/aarch64.yml b/osaca/data/isa/aarch64.yml index 601c033..c4c2c18 100644 --- a/osaca/data/isa/aarch64.yml +++ b/osaca/data/isa/aarch64.yml @@ -197,13 +197,57 @@ instruction_forms: prefix: "*" source: true destination: false - - class: "memory" - prefix: "*" - base: "*" - offset: "*" - index: "*" - scale: "*" - pre-indexed: "*" - post-indexed: "*" + - class: "immediate" + imd: "int" + source: true + destination: false + - name: cmn + operands: + - class: "register" + prefix: "*" + source: true + destination: false + - class: "register" + prefix: "*" + source: true + destination: false + - name: cmn + operands: + - class: "register" + prefix: "*" + source: true + destination: false + - class: "immediate" + imd: "int" + source: true + destination: false + - name: fcmp + operands: + - class: "register" + prefix: "*" + source: true + destination: false + - class: "register" + prefix: "*" + source: true + destination: false + - name: fcmp + operands: + - class: "register" + prefix: "*" + source: true + destination: false + - class: "immediate" + imd: "double" + source: true + destination: false + - name: fcmp + operands: + - class: "register" + prefix: "*" + source: true + destination: false + - class: "immediate" + imd: "float" source: true destination: false diff --git a/osaca/semantics/hw_model.py b/osaca/semantics/hw_model.py index d7a6cb3..170e69b 100755 --- a/osaca/semantics/hw_model.py +++ b/osaca/semantics/hw_model.py @@ -493,6 +493,7 @@ class MachineModel(object): if 'class' in operand: # compare two DB entries return self._compare_db_entries(i_operand, operand) + # TODO support class wildcards # register if 'register' in operand: if i_operand['class'] != 'register': @@ -504,12 +505,14 @@ class MachineModel(object): return False return self._is_AArch64_mem_type(i_operand, operand['memory']) # immediate + # TODO support wildcards if 'value' in operand or ('immediate' in operand and 'value' in operand['immediate']): return i_operand['class'] == 'immediate' and i_operand['imd'] == 'int' if 'float' in operand or ('immediate' in operand and 'float' in operand['immediate']): return i_operand['class'] == 'immediate' and i_operand['imd'] == 'float' if 'double' in operand or ('immediate' in operand and 'double' in operand['immediate']): return i_operand['class'] == 'immediate' and i_operand['imd'] == 'double' + # identifier if 'identifier' in operand or ( 'immediate' in operand and 'identifier' in operand['immediate'] ):