mirror of
https://github.com/RRZE-HPC/OSACA.git
synced 2025-07-21 12:41:05 +02:00
Compare commits
2 Commits
3e7a6c8cf0
...
143503aa0c
Author | SHA1 | Date | |
---|---|---|---|
|
143503aa0c | ||
|
9766756c45 |
@@ -10,9 +10,7 @@ from collections import OrderedDict
|
||||
import ruamel.yaml
|
||||
|
||||
from osaca.semantics import MachineModel
|
||||
from osaca.parser.memory import MemoryOperand
|
||||
from osaca.parser.register import RegisterOperand
|
||||
from osaca.parser.immediate import ImmediateOperand
|
||||
from osaca.parser.instruction_form import InstructionForm
|
||||
|
||||
|
||||
|
@@ -36,7 +36,7 @@ class ImmediateOperand(Operand):
|
||||
return self._imd_type
|
||||
|
||||
@imd_type.setter
|
||||
def imd_type(self, type):
|
||||
def imd_type(self, imd_type):
|
||||
self._imd_type = imd_type
|
||||
|
||||
@identifier.setter
|
||||
|
@@ -12,7 +12,6 @@ from osaca.parser.register import RegisterOperand
|
||||
from osaca.parser.identifier import IdentifierOperand
|
||||
from osaca.parser.immediate import ImmediateOperand
|
||||
from osaca.parser.condition import ConditionOperand
|
||||
from osaca.parser.flag import FlagOperand
|
||||
from osaca.parser.prefetch import PrefetchOperand
|
||||
|
||||
|
||||
|
@@ -7,14 +7,12 @@ import pyparsing as pp
|
||||
|
||||
from osaca.parser import BaseParser
|
||||
from osaca.parser.instruction_form import InstructionForm
|
||||
from osaca.parser.operand import Operand
|
||||
from osaca.parser.directive import DirectiveOperand
|
||||
from osaca.parser.memory import MemoryOperand
|
||||
from osaca.parser.label import LabelOperand
|
||||
from osaca.parser.register import RegisterOperand
|
||||
from osaca.parser.identifier import IdentifierOperand
|
||||
from osaca.parser.immediate import ImmediateOperand
|
||||
from osaca.parser.flag import FlagOperand
|
||||
|
||||
|
||||
class ParserX86ATT(BaseParser):
|
||||
|
@@ -11,7 +11,6 @@ from pathlib import Path
|
||||
|
||||
import ruamel.yaml
|
||||
from osaca import __version__, utils
|
||||
from copy import deepcopy
|
||||
from osaca.parser import ParserX86ATT
|
||||
from osaca.parser.instruction_form import InstructionForm
|
||||
from osaca.parser.operand import Operand
|
||||
@@ -261,10 +260,10 @@ class MachineModel(object):
|
||||
elif o["class"] == "prfop":
|
||||
new_operands.append(
|
||||
PrefetchOperand(
|
||||
type_id=o["type"] if "type" in o else None,
|
||||
target=o["target"] if "target" in o else None,
|
||||
policy=o["policy"] if "policy" in o else None,
|
||||
)
|
||||
type_id=o["type"] if "type" in o else None,
|
||||
target=o["target"] if "target" in o else None,
|
||||
policy=o["policy"] if "policy" in o else None,
|
||||
)
|
||||
)
|
||||
else:
|
||||
new_operands.append(o)
|
||||
|
@@ -12,7 +12,6 @@ from osaca.semantics import INSTR_FLAGS, ArchSemantics, MachineModel
|
||||
from osaca.parser.memory import MemoryOperand
|
||||
from osaca.parser.register import RegisterOperand
|
||||
from osaca.parser.immediate import ImmediateOperand
|
||||
from osaca.parser.operand import Operand
|
||||
from osaca.parser.flag import FlagOperand
|
||||
|
||||
|
||||
|
@@ -7,7 +7,7 @@ import unittest
|
||||
from io import StringIO
|
||||
|
||||
import osaca.db_interface as dbi
|
||||
from osaca.db_interface import sanity_check, _get_full_instruction_name
|
||||
from osaca.db_interface import sanity_check
|
||||
from osaca.semantics import MachineModel
|
||||
from osaca.parser import InstructionForm
|
||||
from osaca.parser.memory import MemoryOperand
|
||||
|
@@ -234,7 +234,7 @@ class TestParserAArch64(unittest.TestCase):
|
||||
instruction_form_5 = InstructionForm(
|
||||
mnemonic="prfm",
|
||||
operands=[
|
||||
PrefetchOperand(type_id=["PLD"],target=["L1"],policy=["KEEP"]),
|
||||
PrefetchOperand(type_id=["PLD"], target=["L1"], policy=["KEEP"]),
|
||||
MemoryOperand(
|
||||
offset=ImmediateOperand(value=2048),
|
||||
base=RegisterOperand(prefix="x", name="26"),
|
||||
|
Reference in New Issue
Block a user