Skip to content

Commit

Permalink
Merge branch 'junghee/fix-avx512f-test' into 'main'
Browse files Browse the repository at this point in the history
Create a separate dir and makefile for the avx512f test

See merge request rewriting/ddisasm!1205
  • Loading branch information
junghee committed May 15, 2024
2 parents 0c280ea + 4d5ccc7 commit b5b9538
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
6 changes: 0 additions & 6 deletions examples/asm_examples/ex_aligned_data_in_code/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@

all: ex_original.s
gcc ex_original.s -o ex
gcc ex_original2.s -o ex2
@./ex > out.txt
@./ex2 > out2.txt
clean:
rm -f ex out.txt
rm -fr ex.unstripped ex.s *.old* dl_files *.gtirb
rm -f ex2 out2.txt
rm -fr ex2.unstripped ex2.s
check:
./ex > /tmp/res.txt
@ diff out.txt /tmp/res.txt && echo TEST OK
./ex2 > /tmp/res2.txt
@ diff out2.txt /tmp/res2.txt && echo TEST OK
10 changes: 10 additions & 0 deletions examples/asm_examples/ex_aligned_data_in_code_avx512f/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

all: ex_original.s
gcc ex_original.s -o ex
@./ex > out.txt
clean:
rm -f ex out.txt
rm -fr ex.unstripped ex.s *.old* dl_files *.gtirb
check:
./ex > /tmp/res.txt
@ diff out.txt /tmp/res.txt && echo TEST OK
6 changes: 3 additions & 3 deletions tests/misc_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,14 +480,14 @@ def test_aligned_data_in_code(self):
@unittest.skipUnless(
check_avx512f_support(), "This test requires avx512f."
)
def test_aligned_data_in_code512(self):
def test_aligned_data_in_code_avx512f(self):
"""
Test that alignment directives are correctly generated for
data_in_code referenced by instructions that require 64-byte
alignment
"""
binary = "ex2"
with cd(ex_asm_dir / "ex_aligned_data_in_code"):
binary = "ex"
with cd(ex_asm_dir / "ex_aligned_data_in_code_avx512f"):
self.assertTrue(compile("gcc", "g++", "-O0", []))
ir = disassemble(Path(binary)).ir()
m = ir.modules[0]
Expand Down

0 comments on commit b5b9538

Please sign in to comment.