[llvm-jitlink] Add -slab-page-size to tests that need it.
authorLang Hames <lhames@gmail.com>
Tue, 28 Sep 2021 20:13:57 +0000 (13:13 -0700)
committerLang Hames <lhames@gmail.com>
Tue, 28 Sep 2021 20:15:54 +0000 (13:15 -0700)
Also fixes 80-column rule violations.

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

index a70a8b8..148764d 100644 (file)
@@ -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
index 25ae81f..539da2b 100644 (file)
@@ -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
 
index d9c7142..c8df485 100644 (file)
@@ -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"
index 141ef9f..e5b789d 100644 (file)
@@ -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
index d74c56a..6090cc9 100644 (file)
@@ -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
 #
 
 
index b70debd..5db85b6 100644 (file)
@@ -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.
 
index b195693..00c888b 100644 (file)
@@ -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.
 
index 56dc1e0..caaaeee 100644 (file)
@@ -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.
 
index 98df053..caeae4f 100644 (file)
@@ -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
index 3e82336..7efef9c 100644 (file)
@@ -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
 #