Skip to content

Commit

Permalink
Create a separate dir and makefile for the avx512f test
Browse files Browse the repository at this point in the history
  • Loading branch information
junghee committed May 14, 2024
1 parent 0c280ea commit 4d5ccc7
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 4d5ccc7

Please sign in to comment.