From 4d5ccc721652ccb287775e5a1540c661e0a10a81 Mon Sep 17 00:00:00 2001 From: Junghee Lim Date: Tue, 14 May 2024 09:21:09 -0400 Subject: [PATCH] Create a separate dir and makefile for the avx512f test --- examples/asm_examples/ex_aligned_data_in_code/Makefile | 6 ------ .../ex_aligned_data_in_code_avx512f/Makefile | 10 ++++++++++ .../ex_original.s} | 0 tests/misc_test.py | 6 +++--- 4 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 examples/asm_examples/ex_aligned_data_in_code_avx512f/Makefile rename examples/asm_examples/{ex_aligned_data_in_code/ex_original2.s => ex_aligned_data_in_code_avx512f/ex_original.s} (100%) diff --git a/examples/asm_examples/ex_aligned_data_in_code/Makefile b/examples/asm_examples/ex_aligned_data_in_code/Makefile index 8abd91ad3..c3181abdf 100644 --- a/examples/asm_examples/ex_aligned_data_in_code/Makefile +++ b/examples/asm_examples/ex_aligned_data_in_code/Makefile @@ -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 diff --git a/examples/asm_examples/ex_aligned_data_in_code_avx512f/Makefile b/examples/asm_examples/ex_aligned_data_in_code_avx512f/Makefile new file mode 100644 index 000000000..c3181abdf --- /dev/null +++ b/examples/asm_examples/ex_aligned_data_in_code_avx512f/Makefile @@ -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 diff --git a/examples/asm_examples/ex_aligned_data_in_code/ex_original2.s b/examples/asm_examples/ex_aligned_data_in_code_avx512f/ex_original.s similarity index 100% rename from examples/asm_examples/ex_aligned_data_in_code/ex_original2.s rename to examples/asm_examples/ex_aligned_data_in_code_avx512f/ex_original.s diff --git a/tests/misc_test.py b/tests/misc_test.py index ff1f1517a..4440db2d5 100644 --- a/tests/misc_test.py +++ b/tests/misc_test.py @@ -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]