[llvm] abab0db - [llvm-jitlink] Add -slab-page-size to tests that need it.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 28 13:16:00 PDT 2021
Author: Lang Hames
Date: 2021-09-28T13:15:54-07:00
New Revision: abab0dbde233d33af5f815e04a8313e7593797a3
URL: https://github.com/llvm/llvm-project/commit/abab0dbde233d33af5f815e04a8313e7593797a3
DIFF: https://github.com/llvm/llvm-project/commit/abab0dbde233d33af5f815e04a8313e7593797a3.diff
LOG: [llvm-jitlink] Add -slab-page-size to tests that need it.
Also fixes 80-column rule violations.
Added:
Modified:
llvm/test/ExecutionEngine/JITLink/RISCV/ELF_abs_reloc.s
llvm/test/ExecutionEngine/JITLink/RISCV/ELF_pc_indirect.s
llvm/test/ExecutionEngine/JITLink/RISCV/ELF_riscv32_got_plt_reloc.s
llvm/test/ExecutionEngine/JITLink/RISCV/ELF_riscv64_got_plt_reloc.s
llvm/test/ExecutionEngine/JITLink/X86/ELF_x86-64_got_plt_optimizations.s
llvm/test/ExecutionEngine/JITLink/X86/ELF_x86-64_large_pic_relocations.s
llvm/test/ExecutionEngine/JITLink/X86/ELF_x86-64_small_pic_relocations.s
llvm/test/ExecutionEngine/JITLink/X86/ELF_x86_64_absolute_relocations.s
llvm/test/ExecutionEngine/JITLink/X86/MachO_GOTAndStubsOptimization.s
llvm/test/ExecutionEngine/JITLink/X86/MachO_x86-64_relocations.s
Removed:
################################################################################
diff --git a/llvm/test/ExecutionEngine/JITLink/RISCV/ELF_abs_reloc.s b/llvm/test/ExecutionEngine/JITLink/RISCV/ELF_abs_reloc.s
index a70a8b8cbc6fd..148764d14fb1e 100644
--- a/llvm/test/ExecutionEngine/JITLink/RISCV/ELF_abs_reloc.s
+++ b/llvm/test/ExecutionEngine/JITLink/RISCV/ELF_abs_reloc.s
@@ -1,10 +1,16 @@
# RUN: rm -rf %t && mkdir -p %t
-# RUN: llvm-mc -triple=riscv64 -filetype=obj -o %t/elf_riscv64_non_pc_indirect_reloc.o %s
-# RUN: llvm-mc -triple=riscv32 -filetype=obj -o %t/elf_riscv32_non_pc_indirect_reloc.o %s
-# RUN: llvm-jitlink -noexec -slab-allocate 100Kb -slab-address 0xfff00000 -define-abs external_data=0xfff10000\
-# RUN: -check %s %t/elf_riscv64_non_pc_indirect_reloc.o
-# RUN: llvm-jitlink -noexec -slab-allocate 100Kb -slab-address 0xfff00000 -define-abs external_data=0xfff10000\
-# RUN: -check %s %t/elf_riscv32_non_pc_indirect_reloc.o
+# RUN: llvm-mc -triple=riscv64 -filetype=obj \
+# RUN: -o %t/elf_riscv64_non_pc_indirect_reloc.o %s
+# RUN: llvm-mc -triple=riscv32 -filetype=obj \
+# RUN: -o %t/elf_riscv32_non_pc_indirect_reloc.o %s
+# RUN: llvm-jitlink -noexec \
+# RUN: -slab-allocate 100Kb -slab-address 0xfff00000 -slab-page-size 4096 \
+# RUN: -define-abs external_data=0xfff10000 \
+# RUN: -check %s %t/elf_riscv64_non_pc_indirect_reloc.o
+# RUN: llvm-jitlink -noexec \
+# RUN: -slab-allocate 100Kb -slab-address 0xfff00000 -slab-page-size 4096 \
+# RUN: -define-abs external_data=0xfff10000 \
+# RUN: -check %s %t/elf_riscv32_non_pc_indirect_reloc.o
#
.text
diff --git a/llvm/test/ExecutionEngine/JITLink/RISCV/ELF_pc_indirect.s b/llvm/test/ExecutionEngine/JITLink/RISCV/ELF_pc_indirect.s
index 25ae81fcd2f13..539da2b1e81dc 100644
--- a/llvm/test/ExecutionEngine/JITLink/RISCV/ELF_pc_indirect.s
+++ b/llvm/test/ExecutionEngine/JITLink/RISCV/ELF_pc_indirect.s
@@ -1,12 +1,16 @@
# RUN: rm -rf %t && mkdir -p %t
-# RUN: llvm-mc -triple=riscv64 -position-independent -filetype=obj -o %t/elf_riscv64_sm_pic_reloc.o %s
-# RUN: llvm-mc -triple=riscv32 -position-independent -filetype=obj -o %t/elf_riscv32_sm_pic_reloc.o %s
-# RUN: llvm-jitlink -noexec -slab-allocate 100Kb -slab-address 0xfff00000 \
-# RUN: -define-abs external_func=0x1 -define-abs external_data=0x2 \
-# RUN: -check %s %t/elf_riscv64_sm_pic_reloc.o
-# RUN: llvm-jitlink -noexec -slab-allocate 100Kb -slab-address 0xfff00000\
-# RUN: -define-abs external_func=0x1 -define-abs external_data=0x2 \
-# RUN: -check %s %t/elf_riscv32_sm_pic_reloc.o
+# RUN: llvm-mc -triple=riscv64 -position-independent -filetype=obj \
+# RUN: -o %t/elf_riscv64_sm_pic_reloc.o %s
+# RUN: llvm-mc -triple=riscv32 -position-independent -filetype=obj \
+# RUN: -o %t/elf_riscv32_sm_pic_reloc.o %s
+# RUN: llvm-jitlink -noexec \
+# RUN: -slab-allocate 100Kb -slab-address 0xfff00000 -slab-page-size 4096 \
+# RUN: -define-abs external_func=0x1 -define-abs external_data=0x2 \
+# RUN: -check %s %t/elf_riscv64_sm_pic_reloc.o
+# RUN: llvm-jitlink -noexec \
+# RUN: -slab-allocate 100Kb -slab-address 0xfff00000 -slab-page-size 4096 \
+# RUN: -define-abs external_func=0x1 -define-abs external_data=0x2 \
+# RUN: -check %s %t/elf_riscv32_sm_pic_reloc.o
#
# Test ELF small/PIC relocations
diff --git a/llvm/test/ExecutionEngine/JITLink/RISCV/ELF_riscv32_got_plt_reloc.s b/llvm/test/ExecutionEngine/JITLink/RISCV/ELF_riscv32_got_plt_reloc.s
index d9c71426cd3d4..c8df4856ca698 100644
--- a/llvm/test/ExecutionEngine/JITLink/RISCV/ELF_riscv32_got_plt_reloc.s
+++ b/llvm/test/ExecutionEngine/JITLink/RISCV/ELF_riscv32_got_plt_reloc.s
@@ -1,9 +1,10 @@
# RUN: rm -rf %t && mkdir -p %t
-# RUN: llvm-mc -triple=riscv32 -position-independent -filetype=obj -o %t/elf_riscv32_got_plt_reloc.o %s
-# RUN: llvm-jitlink -noexec -slab-allocate 100Kb -slab-address 0xfff00000 \
-# RUN: -define-abs external_func=0x1 -define-abs external_data=0x2 \
-# RUN: -check %s %t/elf_riscv32_got_plt_reloc.o
-
+# RUN: llvm-mc -triple=riscv32 -position-independent -filetype=obj \
+# RUN: -o %t/elf_riscv32_got_plt_reloc.o %s
+# RUN: llvm-jitlink -noexec \
+# RUN: -slab-allocate 100Kb -slab-address 0xfff00000 -slab-page-size 4096 \
+# RUN: -define-abs external_func=0x1 -define-abs external_data=0x2 \
+# RUN: -check %s %t/elf_riscv32_got_plt_reloc.o
.text
.file "testcase.c"
diff --git a/llvm/test/ExecutionEngine/JITLink/RISCV/ELF_riscv64_got_plt_reloc.s b/llvm/test/ExecutionEngine/JITLink/RISCV/ELF_riscv64_got_plt_reloc.s
index 141ef9f360cbf..e5b789d03160a 100644
--- a/llvm/test/ExecutionEngine/JITLink/RISCV/ELF_riscv64_got_plt_reloc.s
+++ b/llvm/test/ExecutionEngine/JITLink/RISCV/ELF_riscv64_got_plt_reloc.s
@@ -1,8 +1,10 @@
# RUN: rm -rf %t && mkdir -p %t
-# RUN: llvm-mc -triple=riscv64 -position-independent -filetype=obj -o %t/elf_riscv64_got_plt_reloc.o %s
-# RUN: llvm-jitlink -noexec -slab-allocate 100Kb -slab-address 0xfff00000 \
-# RUN: -define-abs external_func=0x1 -define-abs external_data=0x2 \
-# RUN: -check %s %t/elf_riscv64_got_plt_reloc.o
+# RUN: llvm-mc -triple=riscv64 -position-independent -filetype=obj \
+# RUN: -o %t/elf_riscv64_got_plt_reloc.o %s
+# RUN: llvm-jitlink -noexec \
+# RUN: -slab-allocate 100Kb -slab-address 0xfff00000 -slab-page-size 4096 \
+# RUN: -define-abs external_func=0x1 -define-abs external_data=0x2 \
+# RUN: -check %s %t/elf_riscv64_got_plt_reloc.o
.text
diff --git a/llvm/test/ExecutionEngine/JITLink/X86/ELF_x86-64_got_plt_optimizations.s b/llvm/test/ExecutionEngine/JITLink/X86/ELF_x86-64_got_plt_optimizations.s
index d74c56a533af1..6090cc960eb04 100644
--- a/llvm/test/ExecutionEngine/JITLink/X86/ELF_x86-64_got_plt_optimizations.s
+++ b/llvm/test/ExecutionEngine/JITLink/X86/ELF_x86-64_got_plt_optimizations.s
@@ -1,9 +1,10 @@
# RUN: rm -rf %t && mkdir -p %t
-# RUN: llvm-mc -triple=x86_64-unknown-linux -position-independent -filetype=obj \
-# RUN: -o %t/elf_sm_pic_reloc.o %s
-# RUN: llvm-jitlink -noexec -slab-allocate 100Kb -slab-address 0xfff00000 \
-# RUN: -define-abs extern_in_range32=0xffe00000 \
-# RUN: -check %s %t/elf_sm_pic_reloc.o
+# RUN: llvm-mc -triple=x86_64-unknown-linux -position-independent \
+# RUN: -filetype=obj -o %t/elf_sm_pic_reloc.o %s
+# RUN: llvm-jitlink -noexec \
+# RUN: -slab-allocate 100Kb -slab-address 0xfff00000 -slab-page-size 4096 \
+# RUN: -define-abs extern_in_range32=0xffe00000 \
+# RUN: -check %s %t/elf_sm_pic_reloc.o
#
diff --git a/llvm/test/ExecutionEngine/JITLink/X86/ELF_x86-64_large_pic_relocations.s b/llvm/test/ExecutionEngine/JITLink/X86/ELF_x86-64_large_pic_relocations.s
index b70debd8565ba..5db85b6bf122e 100644
--- a/llvm/test/ExecutionEngine/JITLink/X86/ELF_x86-64_large_pic_relocations.s
+++ b/llvm/test/ExecutionEngine/JITLink/X86/ELF_x86-64_large_pic_relocations.s
@@ -1,8 +1,9 @@
# RUN: rm -rf %t && mkdir -p %t
-# RUN: llvm-mc -triple=x86_64-unknown-linux -position-independent -filetype=obj \
-# RUN: -large-code-model -o %t/elf_lg_pic_reloc.o %s
-# RUN: llvm-jitlink -noexec -slab-allocate 100Kb -slab-address 0xfff00000 \
-# RUN: -check %s %t/elf_lg_pic_reloc.o
+# RUN: llvm-mc -triple=x86_64-unknown-linux -position-independent \
+# RUN: -filetype=obj -large-code-model -o %t/elf_lg_pic_reloc.o %s
+# RUN: llvm-jitlink -noexec \
+# RUN: -slab-allocate 100Kb -slab-address 0xfff00000 -slab-page-size 4096 \
+# RUN: -check %s %t/elf_lg_pic_reloc.o
#
# Test ELF large/PIC relocations.
diff --git a/llvm/test/ExecutionEngine/JITLink/X86/ELF_x86-64_small_pic_relocations.s b/llvm/test/ExecutionEngine/JITLink/X86/ELF_x86-64_small_pic_relocations.s
index b195693049340..00c888be1d8f2 100644
--- a/llvm/test/ExecutionEngine/JITLink/X86/ELF_x86-64_small_pic_relocations.s
+++ b/llvm/test/ExecutionEngine/JITLink/X86/ELF_x86-64_small_pic_relocations.s
@@ -1,10 +1,11 @@
# RUN: rm -rf %t && mkdir -p %t
-# RUN: llvm-mc -triple=x86_64-unknown-linux -position-independent -filetype=obj \
-# RUN: -o %t/elf_sm_pic_reloc.o %s
-# RUN: llvm-jitlink -noexec -slab-allocate 100Kb -slab-address 0xfff00000 \
-# RUN: -define-abs external_data=0x1 \
-# RUN: -define-abs extern_out_of_range32=0x7fff00000000 \
-# RUN: -check %s %t/elf_sm_pic_reloc.o
+# RUN: llvm-mc -triple=x86_64-unknown-linux -position-independent \
+# RUN: -filetype=obj -o %t/elf_sm_pic_reloc.o %s
+# RUN: llvm-jitlink -noexec \
+# RUN: -slab-allocate 100Kb -slab-address 0xfff00000 -slab-page-size 4096 \
+# RUN: -define-abs external_data=0x1 \
+# RUN: -define-abs extern_out_of_range32=0x7fff00000000 \
+# RUN: -check %s %t/elf_sm_pic_reloc.o
#
# Test ELF small/PIC relocations.
diff --git a/llvm/test/ExecutionEngine/JITLink/X86/ELF_x86_64_absolute_relocations.s b/llvm/test/ExecutionEngine/JITLink/X86/ELF_x86_64_absolute_relocations.s
index 56dc1e0eca200..caaaeee87ed40 100644
--- a/llvm/test/ExecutionEngine/JITLink/X86/ELF_x86_64_absolute_relocations.s
+++ b/llvm/test/ExecutionEngine/JITLink/X86/ELF_x86_64_absolute_relocations.s
@@ -1,10 +1,11 @@
# RUN: rm -rf %t && mkdir -p %t
-# RUN: llvm-mc -triple=x86_64-unknown-linux -position-independent -filetype=obj \
-# RUN: -o %t/elf_abs_reloc.o %s
-# RUN: llvm-jitlink -noexec -slab-allocate 100Kb -slab-address 0xfff00000 \
-# RUN: -define-abs external_data_low=0x1 \
-# RUN: -define-abs external_data_high=0xffffffff80000000 \
-# RUN: -check %s %t/elf_abs_reloc.o
+# RUN: llvm-mc -triple=x86_64-unknown-linux -position-independent \
+# RUN: -filetype=obj -o %t/elf_abs_reloc.o %s
+# RUN: llvm-jitlink -noexec \
+# RUN: -slab-allocate 100Kb -slab-address 0xfff00000 -slab-page-size 4096 \
+# RUN: -define-abs external_data_low=0x1 \
+# RUN: -define-abs external_data_high=0xffffffff80000000 \
+# RUN: -check %s %t/elf_abs_reloc.o
#
# Test ELF absolute relocations.
diff --git a/llvm/test/ExecutionEngine/JITLink/X86/MachO_GOTAndStubsOptimization.s b/llvm/test/ExecutionEngine/JITLink/X86/MachO_GOTAndStubsOptimization.s
index 98df053c9e592..caeae4fa441f7 100644
--- a/llvm/test/ExecutionEngine/JITLink/X86/MachO_GOTAndStubsOptimization.s
+++ b/llvm/test/ExecutionEngine/JITLink/X86/MachO_GOTAndStubsOptimization.s
@@ -1,10 +1,10 @@
# RUN: rm -rf %t && mkdir -p %t
# RUN: llvm-mc -triple=x86_64-apple-macos10.9 -filetype=obj \
-# RUN: -o %t/helper.o %S/Inputs/MachO_GOTAndStubsOptimizationHelper.s
+# RUN: -o %t/helper.o %S/Inputs/MachO_GOTAndStubsOptimizationHelper.s
# RUN: llvm-mc -triple=x86_64-apple-macos10.9 -filetype=obj \
-# RUN: -o %t/testcase.o %s
-# RUN: llvm-jitlink -noexec -slab-allocate 64Kb -entry=bypass_stub -check %s \
-# RUN: %t/testcase.o %t/helper.o
+# RUN: -o %t/testcase.o %s
+# RUN: llvm-jitlink -noexec -slab-allocate 64Kb -slab-page-size 4096 \
+# RUN: -entry=bypass_stub -check %s %t/testcase.o %t/helper.o
#
# Test that references to in-range GOT and stub targets can be bypassed.
# The helper file contains a function that uses the GOT for _x, and this file
diff --git a/llvm/test/ExecutionEngine/JITLink/X86/MachO_x86-64_relocations.s b/llvm/test/ExecutionEngine/JITLink/X86/MachO_x86-64_relocations.s
index 3e82336429406..7efef9c52f6b1 100644
--- a/llvm/test/ExecutionEngine/JITLink/X86/MachO_x86-64_relocations.s
+++ b/llvm/test/ExecutionEngine/JITLink/X86/MachO_x86-64_relocations.s
@@ -1,6 +1,7 @@
# RUN: rm -rf %t && mkdir -p %t
# RUN: llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj -o %t/macho_reloc.o %s
-# RUN: llvm-jitlink -noexec -slab-allocate 100Kb -slab-address 0xfff00000 \
+# RUN: llvm-jitlink -noexec \
+# RUN: -slab-allocate 100Kb -slab-address 0xfff00000 -slab-page-size 4096 \
# RUN: -define-abs external_data=0x1 -define-abs external_func=0x2 \
# RUN: -check=%s %t/macho_reloc.o
#
More information about the llvm-commits
mailing list