Пример #1
0
    def tests_3d25pt_semi(self):
        with open(self._find_file('3d-25pt_semi.s')) as f:
            assembly_orig = f.readlines()
        assembly = strip_and_uncomment(copy(assembly_orig))
        assembly = strip_unreferenced_labels(assembly)
        blocks = find_asm_blocks(assembly)
        block_idx = select_best_block(blocks)
        best_block = blocks[block_idx][1]

        self.assertEqual(best_block['labels'], ['LBB0_62'])
Пример #2
0
    def tests_3d25pt_semi(self):
        with open(self._find_file('3d-25pt_semi.s')) as f:
            assembly_orig = f.readlines()
        assembly = strip_and_uncomment(copy(assembly_orig))
        assembly = strip_unreferenced_labels(assembly)
        blocks = find_asm_blocks(assembly)
        block_idx = select_best_block(blocks)
        best_block = blocks[block_idx][1]

        self.assertEqual(best_block['labels'], ['LBB0_62'])
Пример #3
0
    def tests_matvec_trans(self):
        with open(self._find_file('matvec_trans.s')) as f:
            assembly_orig = f.readlines()
        assembly = strip_and_uncomment(copy(assembly_orig))
        assembly = strip_unreferenced_labels(assembly)
        blocks = find_asm_blocks(assembly)
        block_idx = select_best_block(blocks)
        best_block = blocks[block_idx][1]

        self.assertEqual(best_block['labels'], ['LBB0_30'])
        self.assertEqual(best_block['pointer_increment'], 64)
Пример #4
0
    def tests_2d5pt_varcoeffs(self):
        with open(self._find_file('2d-5pt-varcoeffs.s')) as f:
            assembly_orig = f.readlines()
        assembly = strip_and_uncomment(copy(assembly_orig))
        assembly = strip_unreferenced_labels(assembly)
        blocks = find_asm_blocks(assembly)
        block_idx = select_best_block(blocks)
        best_block = blocks[block_idx][1]

        self.assertEqual(best_block['labels'], ['.L43'])
        self.assertEqual(best_block['pointer_increment'], 16)
Пример #5
0
    def tests_matvec_trans(self):
        with open(self._find_file('matvec_trans.s')) as f:
            assembly_orig = f.readlines()
        assembly = strip_and_uncomment(copy(assembly_orig))
        assembly = strip_unreferenced_labels(assembly)
        blocks = find_asm_blocks(assembly)
        block_idx = select_best_block(blocks)
        best_block = blocks[block_idx][1]

        self.assertEqual(best_block['labels'], ['LBB0_30'])
        self.assertEqual(best_block['pointer_increment'], 64)
Пример #6
0
    def tests_2d5pt_varcoeffs(self):
        with open(self._find_file('2d-5pt-varcoeffs.s')) as f:
            assembly_orig = f.readlines()
        assembly = strip_and_uncomment(copy(assembly_orig))
        assembly = strip_unreferenced_labels(assembly)
        blocks = find_asm_blocks(assembly)
        block_idx = select_best_block(blocks)
        best_block = blocks[block_idx][1]

        self.assertEqual(best_block['labels'], ['.L43'])
        self.assertEqual(best_block['pointer_increment'], 16)