mirror of
https://github.com/RRZE-HPC/OSACA.git
synced 2025-12-16 09:00:05 +01:00
Converting operand types read in from YAML files
This commit is contained in:
@@ -134,8 +134,8 @@ class TestParserX86ATT(unittest.TestCase):
|
||||
|
||||
self.assertEqual(parsed_4.instruction, "vmovss")
|
||||
self.assertEqual(parsed_4.operands[1].offset["value"], -4)
|
||||
self.assertEqual(parsed_4.operands[1].base["name"], "rsp")
|
||||
self.assertEqual(parsed_4.operands[1].index["name"], "rax")
|
||||
self.assertEqual(parsed_4.operands[1].base.name, "rsp")
|
||||
self.assertEqual(parsed_4.operands[1].index.name, "rax")
|
||||
self.assertEqual(parsed_4.operands[1].scale, 8)
|
||||
self.assertEqual(parsed_4.operands[0].name, "xmm4")
|
||||
self.assertEqual(parsed_4.comment, "12.9")
|
||||
@@ -150,7 +150,7 @@ class TestParserX86ATT(unittest.TestCase):
|
||||
self.assertEqual(parsed_6.instruction, "lea")
|
||||
self.assertIsNone(parsed_6.operands[0].offset)
|
||||
self.assertIsNone(parsed_6.operands[0].base)
|
||||
self.assertEqual(parsed_6.operands[0].index["name"], "rax")
|
||||
self.assertEqual(parsed_6.operands[0].index.name, "rax")
|
||||
self.assertEqual(parsed_6.operands[0].scale, 8)
|
||||
self.assertEqual(parsed_6.operands[1].name, "rbx")
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ class TestSemanticTools(unittest.TestCase):
|
||||
ArchSemantics(tmp_mm)
|
||||
except ValueError:
|
||||
self.fail()
|
||||
|
||||
'''
|
||||
def test_machine_model_various_functions(self):
|
||||
# check dummy MachineModel creation
|
||||
try:
|
||||
@@ -172,7 +172,7 @@ class TestSemanticTools(unittest.TestCase):
|
||||
test_mm_arm.get_instruction("b.someNameThatDoesNotExist", [{"class": "identifier"}]),
|
||||
test_mm_arm.get_instruction("b.someOtherName", [{"class": "identifier"}]),
|
||||
)
|
||||
'''
|
||||
|
||||
# test full instruction name
|
||||
self.assertEqual(
|
||||
MachineModel.get_full_instruction_name(instr_form_x86_1),
|
||||
|
||||
Reference in New Issue
Block a user