diff --git a/lld/test/ELF/bss-start-common.s b/lld/test/ELF/bss-start-common.s index 3bf3d17936bc..94638a2836dc 100644 --- a/lld/test/ELF/bss-start-common.s +++ b/lld/test/ELF/bss-start-common.s @@ -1,4 +1,4 @@ -# REQUIRES: x86 +# REQUIRES: x86, mips # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t # RUN: ld.lld %t -o %t2 # RUN: llvm-objdump -t --section-headers %t2 | FileCheck %s diff --git a/lld/test/ELF/cheri/__cap_relocs/cap-relocs-bsymbolic.s b/lld/test/ELF/cheri/__cap_relocs/cap-relocs-bsymbolic.s index 1b27dfeac528..91a7b5310d01 100644 --- a/lld/test/ELF/cheri/__cap_relocs/cap-relocs-bsymbolic.s +++ b/lld/test/ELF/cheri/__cap_relocs/cap-relocs-bsymbolic.s @@ -2,6 +2,7 @@ # All relocations should be load address plus offset and not preemptible! # This was a problem with __cap_relocs and was found building RTLD +// REQUIRES: mips // RUN: %cheri128_purecap_llvm-mc -filetype=obj -defsym=CHERI=1 %s -o %t-cheri.o // RUN: llvm-readobj -r %t-cheri.o | FileCheck %s --check-prefixes OBJ-RELOCS,CHERI-OBJ-RELOCS // RUN: llvm-mc -triple=mips64-unknown-freebsd -position-independent -filetype=obj %s -o %t-mips.o diff --git a/lld/test/ELF/cheri/__cap_relocs/cap-relocs-dynamic-tag.s b/lld/test/ELF/cheri/__cap_relocs/cap-relocs-dynamic-tag.s index b16d37e8aaf0..dd912e39c537 100644 --- a/lld/test/ELF/cheri/__cap_relocs/cap-relocs-dynamic-tag.s +++ b/lld/test/ELF/cheri/__cap_relocs/cap-relocs-dynamic-tag.s @@ -1,3 +1,4 @@ +# REQUIRES: mips # RUN: %cheri_purecap_llvm-mc %s -filetype=obj -o %t.o # RUN: ld.lld -z now -shared %t.o -o %t.so # RUN: llvm-readelf --program-headers --section-mapping %t.so | FileCheck %s -check-prefix SEGMENTS diff --git a/lld/test/ELF/cheri/__cap_relocs/capreloc-aether.s b/lld/test/ELF/cheri/__cap_relocs/capreloc-aether.s index e80908445df4..4e69a9d7d88a 100644 --- a/lld/test/ELF/cheri/__cap_relocs/capreloc-aether.s +++ b/lld/test/ELF/cheri/__cap_relocs/capreloc-aether.s @@ -1,3 +1,4 @@ +# REQUIRES: mips # RUN: %cheri_purecap_llvm-mc %s -filetype=obj -o %t.o # RUN: ld.lld -T %S/Inputs/capreloc-aether.script %t.o -o %t # RUN: llvm-readobj --cap-relocs %t | FileCheck %s diff --git a/lld/test/ELF/cheri/__cap_relocs/capreloc-local-function-pointer.c b/lld/test/ELF/cheri/__cap_relocs/capreloc-local-function-pointer.c index 7fb7c9b5478b..46f4e5e8e516 100644 --- a/lld/test/ELF/cheri/__cap_relocs/capreloc-local-function-pointer.c +++ b/lld/test/ELF/cheri/__cap_relocs/capreloc-local-function-pointer.c @@ -1,4 +1,4 @@ -// REQUIRES: clang +// REQUIRES: clang, mips // RUN: %cheri_purecap_cc1 -emit-obj -mllvm -cheri-cap-table-abi=pcrel %s -o %t.o // RUN: llvm-readobj -r %t.o | FileCheck --check-prefix OBJ-CAPRELOCS %s diff --git a/lld/test/ELF/cheri/__cap_relocs/capreloc-preemptible.c b/lld/test/ELF/cheri/__cap_relocs/capreloc-preemptible.c index aa7d76699f97..e4f34bd046ef 100644 --- a/lld/test/ELF/cheri/__cap_relocs/capreloc-preemptible.c +++ b/lld/test/ELF/cheri/__cap_relocs/capreloc-preemptible.c @@ -1,4 +1,4 @@ -// REQUIRES: clang +// REQUIRES: clang, mips // RUN: %cheri_purecap_clang %s -c -o %t.o // RUN: llvm-readobj -r %t.o | FileCheck --check-prefix READOBJ %s diff --git a/lld/test/ELF/cheri/__cap_relocs/capreloc-string-constant.c b/lld/test/ELF/cheri/__cap_relocs/capreloc-string-constant.c index f262ac8f6152..30095e4f9923 100644 --- a/lld/test/ELF/cheri/__cap_relocs/capreloc-string-constant.c +++ b/lld/test/ELF/cheri/__cap_relocs/capreloc-string-constant.c @@ -1,4 +1,4 @@ -// REQUIRES: clang +// REQUIRES: clang, mips // RUN: %cheri_purecap_cc1 %s -emit-obj -o %t.o // RUN: llvm-readobj -r %t.o | FileCheck --check-prefix READOBJ %s diff --git a/lld/test/ELF/cheri/__cap_relocs/capreloc-undefined.c b/lld/test/ELF/cheri/__cap_relocs/capreloc-undefined.c index e2fb4e07e0f8..b8a8645a80b2 100644 --- a/lld/test/ELF/cheri/__cap_relocs/capreloc-undefined.c +++ b/lld/test/ELF/cheri/__cap_relocs/capreloc-undefined.c @@ -1,4 +1,4 @@ -// REQUIRES: clang +// REQUIRES: clang, mips // RUN: %cheri_purecap_clang %s -c -o %t.o // RUN: llvm-readobj -r %t.o | FileCheck --check-prefix READOBJ %s diff --git a/lld/test/ELF/cheri/__cap_relocs/sort-cap-relocs.s b/lld/test/ELF/cheri/__cap_relocs/sort-cap-relocs.s index fe18488b53b5..4d1d4c4549a5 100644 --- a/lld/test/ELF/cheri/__cap_relocs/sort-cap-relocs.s +++ b/lld/test/ELF/cheri/__cap_relocs/sort-cap-relocs.s @@ -1,3 +1,4 @@ +// REQUIRES: mips // RUN: %cheri128_purecap_llvm-mc -filetype=obj -defsym=FIRST=1 %s -o %t1.o // RUN: %cheri128_purecap_llvm-mc -filetype=obj %s -o %t2.o // RUN: echo "SECTIONS { \ diff --git a/lld/test/ELF/cheri/__cap_relocs/zutil.c b/lld/test/ELF/cheri/__cap_relocs/zutil.c index cfa444bfccda..f96b282eed20 100644 --- a/lld/test/ELF/cheri/__cap_relocs/zutil.c +++ b/lld/test/ELF/cheri/__cap_relocs/zutil.c @@ -1,4 +1,4 @@ -// REQUIRES: clang +// REQUIRES: clang, mips // Check that when we use R_CHERI_CAPABILITY instead of legacy cap_relocs the zutil.c test works as expected (i.e. bounds on the strings) diff --git a/lld/test/ELF/cheri/abiversion.s b/lld/test/ELF/cheri/abiversion.s index 0e8db894b187..106ddfa77700 100644 --- a/lld/test/ELF/cheri/abiversion.s +++ b/lld/test/ELF/cheri/abiversion.s @@ -1,3 +1,4 @@ +# REQUIRES: mips # RUN: %cheri128_purecap_llvm-mc -filetype=obj %s -o %t.o # RUN: ld.lld -pie %t.o -o %t.exe # RUN: llvm-readobj -h %t.exe | FileCheck %s diff --git a/lld/test/ELF/cheri/building-rtld.s b/lld/test/ELF/cheri/building-rtld.s index df92bf061392..0863045fc739 100644 --- a/lld/test/ELF/cheri/building-rtld.s +++ b/lld/test/ELF/cheri/building-rtld.s @@ -1,3 +1,4 @@ +# REQUIRES: mips # RUN: %cheri128_purecap_llvm-mc -filetype=obj %s -o %t.o # RUN: not ld.lld -shared --building-freebsd-rtld %t.o -o /dev/null 2>&1 | FileCheck %s .text diff --git a/lld/test/ELF/cheri/cap-table-dynamic-tag.s b/lld/test/ELF/cheri/cap-table-dynamic-tag.s index 39a090c4ac1b..0b50e4238d9f 100644 --- a/lld/test/ELF/cheri/cap-table-dynamic-tag.s +++ b/lld/test/ELF/cheri/cap-table-dynamic-tag.s @@ -1,3 +1,4 @@ +# REQUIRES: mips # RUN: %cheri128_llvm-mc -filetype=obj %s -o %t.o # RUN: ld.lld -z lazy -pie %t.o -o %t.exe # RUN: llvm-readelf --program-headers --section-mapping %t.exe | FileCheck %s -check-prefix LAZY-SEGMENTS diff --git a/lld/test/ELF/cheri/cap-table/abs-symbol-shared.s b/lld/test/ELF/cheri/cap-table/abs-symbol-shared.s index 132028861358..24889b9eed59 100644 --- a/lld/test/ELF/cheri/cap-table/abs-symbol-shared.s +++ b/lld/test/ELF/cheri/cap-table/abs-symbol-shared.s @@ -1,3 +1,4 @@ +# REQUIRES: mips # RUN: %cheri_purecap_llvm-mc -filetype=obj %s -o %t.o # RUN: ld.lld --fatal-warnings -pie %t.o -o %t.exe # RUN: llvm-readobj --dyn-relocations %t.exe | FileCheck %s --check-prefix=INTERPOSABLE diff --git a/lld/test/ELF/cheri/cap-table/cap-table-broken-mips-output.c b/lld/test/ELF/cheri/cap-table/cap-table-broken-mips-output.c index 91cce29f2318..2960137423c2 100644 --- a/lld/test/ELF/cheri/cap-table/cap-table-broken-mips-output.c +++ b/lld/test/ELF/cheri/cap-table/cap-table-broken-mips-output.c @@ -3,6 +3,7 @@ // This previously caused the following error in llvm-objdump: index past the end of the symbol table // create a n64 output that doesn't have any cap-table entries +// REQUIRES: mips // RUN: %cheri_cc1 %s -emit-obj -x c -O3 -o %t.o // RUN: llvm-objdump -t %t.o | FileCheck --check-prefix OBJ %s // RUN: ld.lld %t.o -o %t.exe diff --git a/lld/test/ELF/cheri/cap-table/cap-table-global-init.c b/lld/test/ELF/cheri/cap-table/cap-table-global-init.c index ab88ed6b5b63..19683f001161 100644 --- a/lld/test/ELF/cheri/cap-table/cap-table-global-init.c +++ b/lld/test/ELF/cheri/cap-table/cap-table-global-init.c @@ -1,3 +1,4 @@ +// REQUIRES: mips // RUN: %cheri128_purecap_cc1 -pedantic -Wextra %s -emit-obj -mllvm -cheri-cap-table-abi=plt -x c -O0 -o %t.o // RUN: ld.lld %t.o -o %t.exe // RUN: llvm-objdump -t %t.exe | FileCheck %s diff --git a/lld/test/ELF/cheri/cap-table/cap-table-init-relocs.s b/lld/test/ELF/cheri/cap-table/cap-table-init-relocs.s index 8cce6688265d..cfc01029021e 100644 --- a/lld/test/ELF/cheri/cap-table/cap-table-init-relocs.s +++ b/lld/test/ELF/cheri/cap-table/cap-table-init-relocs.s @@ -1,3 +1,4 @@ +# REQUIRES: mips # RUN: %cheri128_purecap_llvm-mc -filetype=obj %s -o %t.o # RUN: ld.lld -z now -shared -o %t %t.o -preemptible-caprelocs=legacy --no-relative-cap-relocs -local-caprelocs=legacy # RUN: llvm-readobj -r %t | FileCheck %s --check-prefix LEGACY-BOTH-ELF-RELOCS diff --git a/lld/test/ELF/cheri/cap-table/cap-table-negative-reloc-offset.c b/lld/test/ELF/cheri/cap-table/cap-table-negative-reloc-offset.c index df17419034f2..0beac1cf4f22 100644 --- a/lld/test/ELF/cheri/cap-table/cap-table-negative-reloc-offset.c +++ b/lld/test/ELF/cheri/cap-table/cap-table-negative-reloc-offset.c @@ -1,3 +1,4 @@ +// REQUIRES: mips // RUN: %cheri128_cc1 -emit-obj -O2 -target-abi purecap -mllvm -cheri-cap-table-abi=plt %s -o %t.o // RUN: llvm-readobj -r %t.o | FileCheck --check-prefix RELOCATIONS %s // RUN: ld.lld -o %t.exe %t.o -verbose 2>&1 | FileCheck %s -check-prefix WARN diff --git a/lld/test/ELF/cheri/cap-table/cap-table-pointer.s b/lld/test/ELF/cheri/cap-table/cap-table-pointer.s index e56b40e0f737..b9ba6458af71 100644 --- a/lld/test/ELF/cheri/cap-table/cap-table-pointer.s +++ b/lld/test/ELF/cheri/cap-table/cap-table-pointer.s @@ -1,3 +1,4 @@ +# REQUIRES: mips # RUN: %cheri_purecap_llvm-mc -filetype=obj %s -o %t.o # RUN: ld.lld --fatal-warnings -pie %t.o -o %t.exe # RUN: llvm-readobj --cap-relocs --cap-table --dyn-relocations --symbols %t.exe | %cheri_FileCheck %s diff --git a/lld/test/ELF/cheri/cap-table/capcall-reloc-against-data-symbol.s b/lld/test/ELF/cheri/cap-table/capcall-reloc-against-data-symbol.s index 0da8e42f96a4..b1330fb58605 100644 --- a/lld/test/ELF/cheri/cap-table/capcall-reloc-against-data-symbol.s +++ b/lld/test/ELF/cheri/cap-table/capcall-reloc-against-data-symbol.s @@ -8,7 +8,7 @@ # CheriBSD crt1.c will now trap during crt_init_globals() if this happens instead # of creating a writable capability for the text segment. - +# REQUIRES: mips # RUN: %cheri128_purecap_llvm-mc -filetype=obj %s -o %t.o # RUN: %cheri128_purecap_llvm-mc -filetype=obj %s -defsym=BUILD_LIBCHERI=1 -o %t-libcheri.o # RUN: llvm-readobj -r %t.o | FileCheck %s --check-prefix RELOCS diff --git a/lld/test/ELF/cheri/cap-table/caprelocs-duplicate-symbol-names.s b/lld/test/ELF/cheri/cap-table/caprelocs-duplicate-symbol-names.s index b750e32bd1c7..20020fc6db86 100644 --- a/lld/test/ELF/cheri/cap-table/caprelocs-duplicate-symbol-names.s +++ b/lld/test/ELF/cheri/cap-table/caprelocs-duplicate-symbol-names.s @@ -1,3 +1,4 @@ +# REQUIRES: mips # RUN: %cheri128_purecap_llvm-mc %s -defsym=FILE=1 -filetype=obj -o %t1.o # RUN: %cheri128_purecap_llvm-mc %s -defsym=FILE=2 -filetype=obj -o %t2.o # RUN: %cheri128_purecap_llvm-mc %s -defsym=FILE=3 -filetype=obj -o %t-duplicate.o diff --git a/lld/test/ELF/cheri/cap-table/experimental/per-file-table.c b/lld/test/ELF/cheri/cap-table/experimental/per-file-table.c index 7a91993695e6..2c84f0ae05ff 100644 --- a/lld/test/ELF/cheri/cap-table/experimental/per-file-table.c +++ b/lld/test/ELF/cheri/cap-table/experimental/per-file-table.c @@ -1,4 +1,4 @@ -// REQUIRES: clang +// REQUIRES: clang, mips // RUN: mkdir -p %t // RUN: %cheri128_purecap_cc1 -mllvm -cheri-cap-table-abi=plt -emit-obj -O2 -DFILE1 %s -o %t/file1.o diff --git a/lld/test/ELF/cheri/cap-table/experimental/per-function-table.c b/lld/test/ELF/cheri/cap-table/experimental/per-function-table.c index 72aeb42ff114..42ded0beff6f 100644 --- a/lld/test/ELF/cheri/cap-table/experimental/per-function-table.c +++ b/lld/test/ELF/cheri/cap-table/experimental/per-function-table.c @@ -1,5 +1,5 @@ -// REQUIRES: clang +// REQUIRES: clang, mips // RUN: %cheri128_purecap_cc1 -mllvm -cheri-cap-table-abi=plt -emit-obj -O2 %s -o %t.o // RUN: ld.lld -z now -shared -o %t.so %t.o -captable-scope=function -z captabledebug diff --git a/lld/test/ELF/cheri/cap-table/experimental/tls-xfail.s b/lld/test/ELF/cheri/cap-table/experimental/tls-xfail.s index 6f6d7e2641f2..3dc2172d7428 100644 --- a/lld/test/ELF/cheri/cap-table/experimental/tls-xfail.s +++ b/lld/test/ELF/cheri/cap-table/experimental/tls-xfail.s @@ -1,3 +1,4 @@ +# REQUIRES: mips # RUN: %cheri128_purecap_llvm-mc -filetype=obj %s -o %t.o # RUN: ld.lld -shared -o %t.so %t.o -captable-scope=all # RUN: llvm-readobj -r --cap-table %t.so diff --git a/lld/test/ELF/cheri/cap-table/fnptr-vs-call.c b/lld/test/ELF/cheri/cap-table/fnptr-vs-call.c index 9e57e45dead7..e4e61c656cec 100644 --- a/lld/test/ELF/cheri/cap-table/fnptr-vs-call.c +++ b/lld/test/ELF/cheri/cap-table/fnptr-vs-call.c @@ -1,4 +1,4 @@ -// REQUIRES: clang +// REQUIRES: clang, mips // RUN: %cheri_purecap_cc1 -mllvm -cheri-cap-table-abi=plt -DFNPTR1 -emit-obj -O2 %s -o %t-fnptr1.o // RUN: %cheri_purecap_cc1 -mllvm -cheri-cap-table-abi=plt -DFNPTR2 -emit-obj -O2 %s -o %t-fnptr2.o diff --git a/lld/test/ELF/cheri/cap-table/global-capabilities.c b/lld/test/ELF/cheri/cap-table/global-capabilities.c index 5a2b23ae3591..42827d66c09d 100644 --- a/lld/test/ELF/cheri/cap-table/global-capabilities.c +++ b/lld/test/ELF/cheri/cap-table/global-capabilities.c @@ -1,4 +1,4 @@ -// REQUIRES: clang +// REQUIRES: clang, mips // RUN: %cheri128_purecap_cc1 -mllvm -mxcaptable -emit-obj -O2 -mllvm -cheri-cap-table-abi=plt %s -o %t-128.o // RUN: llvm-readobj -r %t-128.o | FileCheck %s --check-prefix RELOCS diff --git a/lld/test/ELF/cheri/cap-table/incompatible-abis.s b/lld/test/ELF/cheri/cap-table/incompatible-abis.s index f100ed6d5889..a4540ab1139a 100644 --- a/lld/test/ELF/cheri/cap-table/incompatible-abis.s +++ b/lld/test/ELF/cheri/cap-table/incompatible-abis.s @@ -1,3 +1,4 @@ +# REQUIRES: mips # RUN: %cheri128_purecap_llvm-mc -cheri-cap-table-abi=pcrel -filetype=obj %s -o %t-pcrel.o # RUN: %cheri128_purecap_llvm-mc -cheri-cap-table-abi=plt -filetype=obj %s -o %t-plt.o # RUN: %cheri128_purecap_llvm-mc -cheri-cap-table-abi=fn-desc -filetype=obj %s -o %t-fn-desc.o diff --git a/lld/test/ELF/cheri/cap-table/interposing_table.c b/lld/test/ELF/cheri/cap-table/interposing_table.c index b849ddc3a0ea..f911fd4e42b8 100644 --- a/lld/test/ELF/cheri/cap-table/interposing_table.c +++ b/lld/test/ELF/cheri/cap-table/interposing_table.c @@ -1,4 +1,4 @@ -// REQUIRES: clang +// REQUIRES: clang, mips // RUN: %cheri_cc1 -emit-obj -O2 -cheri-size 256 -target-cpu cheri256 -target-feature +soft-float \ // RUN: -msoft-float -target-abi purecap -mllvm -cheri-cap-table-abi=plt %s -o %t.o // RUN: ld.lld %t.o %S/Inputs/interposing_table.o -o %t.exe diff --git a/lld/test/ELF/cheri/cap-table/jump-table-size.c b/lld/test/ELF/cheri/cap-table/jump-table-size.c index 297b3b6fca93..5ed6074b08ca 100644 --- a/lld/test/ELF/cheri/cap-table/jump-table-size.c +++ b/lld/test/ELF/cheri/cap-table/jump-table-size.c @@ -1,4 +1,4 @@ -// REQUIRES: clang +// REQUIRES: clang, mips // RUN: %cheri_purecap_cc1 -mllvm -mxcaptable -emit-obj -O2 -mllvm -cheri-cap-table-abi=plt %s -o %t.o // RUN: llvm-objdump -d -r -t %t.o | FileCheck %s --check-prefix OBJECT diff --git a/lld/test/ELF/cheri/cap-table/local-fn-ptr-in-plt-abi.c b/lld/test/ELF/cheri/cap-table/local-fn-ptr-in-plt-abi.c index 3f5fc841a0a5..8fd2e1c19b5b 100644 --- a/lld/test/ELF/cheri/cap-table/local-fn-ptr-in-plt-abi.c +++ b/lld/test/ELF/cheri/cap-table/local-fn-ptr-in-plt-abi.c @@ -1,3 +1,4 @@ +// REQUIRES: mips // RUN: %cheri128_purecap_cc1 -mllvm -cheri-cap-table-abi=plt -emit-obj -o %t.o %s // RUN: llvm-objdump -d -r %t.o | FileCheck %s --check-prefix DISAS // Should have a R_MIPS_CHERI_CAPTAB20 relocation against the function pointer and a R_MIPS_CHERI_CAPCALL20 against use_callback diff --git a/lld/test/ELF/cheri/cap-table/non-preemptible-fn-ptr-unique-plt-abi.c b/lld/test/ELF/cheri/cap-table/non-preemptible-fn-ptr-unique-plt-abi.c index e5fea8091e34..cb73f1f14866 100644 --- a/lld/test/ELF/cheri/cap-table/non-preemptible-fn-ptr-unique-plt-abi.c +++ b/lld/test/ELF/cheri/cap-table/non-preemptible-fn-ptr-unique-plt-abi.c @@ -1,3 +1,4 @@ +// REQUIRES: mips // RUN: %cheri128_purecap_cc1 -mllvm -cheri-cap-table-abi=plt -emit-obj -o %t.o %s // RUN: llvm-objdump -d -r %t.o | FileCheck %s --check-prefix DISAS --implicit-check-not R_MIPS_CHERI // Should have a R_MIPS_CHERI_CAPTAB20 relocation against the function pointer and a R_MIPS_CHERI_CAPCALL20 against use_callback diff --git a/lld/test/ELF/cheri/cap-table/relaplt-link.c b/lld/test/ELF/cheri/cap-table/relaplt-link.c index 5b656a866078..ae52cf7d9d67 100644 --- a/lld/test/ELF/cheri/cap-table/relaplt-link.c +++ b/lld/test/ELF/cheri/cap-table/relaplt-link.c @@ -1,4 +1,4 @@ -// REQUIRES: clang, x86 +// REQUIRES: clang, x86, mips // Fix running llvm-strip on CheriABI binaries with a .rel.plt section. // Check that set sh_info correctly for .rel.plt since otherwise llvm-strip will // fail. Since all .rel.plt relocations will affect the captable sh_info should diff --git a/lld/test/ELF/cheri/cap-table/relocatable-output.c b/lld/test/ELF/cheri/cap-table/relocatable-output.c index bfde7ca20f42..de0219a0eebb 100644 --- a/lld/test/ELF/cheri/cap-table/relocatable-output.c +++ b/lld/test/ELF/cheri/cap-table/relocatable-output.c @@ -1,4 +1,4 @@ -// REQUIRES: clang +// REQUIRES: clang, mips // RUN: %cheri_purecap_cc1 -DFIRST -emit-obj -O2 -mllvm -cheri-cap-table-abi=plt %s -o %t1.o // RUN: %cheri_purecap_cc1 -DSECOND -emit-obj -O2 -mllvm -cheri-cap-table-abi=plt %s -o %t2.o diff --git a/lld/test/ELF/cheri/cap-table/simple-global-access.c b/lld/test/ELF/cheri/cap-table/simple-global-access.c index efead3be038c..c480de10b5cf 100644 --- a/lld/test/ELF/cheri/cap-table/simple-global-access.c +++ b/lld/test/ELF/cheri/cap-table/simple-global-access.c @@ -1,4 +1,4 @@ -// REQUIRES: clang +// REQUIRES: clang, mips // FIXME: why is this not an assembly test... // RUN: %cheri128_purecap_cc1 -mllvm -mxcaptable -emit-obj -O0 -mllvm -cheri-cap-table-abi=plt %s -o %t.o diff --git a/lld/test/ELF/cheri/cap-table/unnamed-symbols.c b/lld/test/ELF/cheri/cap-table/unnamed-symbols.c index a93e5c0de863..89b990259efc 100644 --- a/lld/test/ELF/cheri/cap-table/unnamed-symbols.c +++ b/lld/test/ELF/cheri/cap-table/unnamed-symbols.c @@ -1,3 +1,4 @@ +// REQUIRES: mips // RUN: %cheri128_purecap_cc1 -DGET_NUMBER=1 -emit-obj -O0 -mllvm -cheri-cap-table-abi=plt %s -o %t-get_number.o // RUN: %cheri128_purecap_cc1 -DGET_ORDINAL=1 -emit-obj -O0 -mllvm -cheri-cap-table-abi=plt %s -o %t-get_ordinal.o // RUN: %cheri128_purecap_cc1 -DMAIN=1 -emit-obj -O0 -mllvm -cheri-cap-table-abi=plt %s -o %t-main.o diff --git a/lld/test/ELF/cheri/cap-table/weak-symbols-2.s b/lld/test/ELF/cheri/cap-table/weak-symbols-2.s index a6bd7a7c9ac7..5d56ec9e7c53 100644 --- a/lld/test/ELF/cheri/cap-table/weak-symbols-2.s +++ b/lld/test/ELF/cheri/cap-table/weak-symbols-2.s @@ -1,4 +1,5 @@ # Test that weak symbols defined by linker scripts are written correctly +# REQUIRES: mips # RUN: %cheri_purecap_llvm-mc -filetype=obj -defsym=MAIN_FILE=1 %s -o %t.o # RUN: ld.lld --fatal-warnings -o %t.exe %t.o diff --git a/lld/test/ELF/cheri/cap-table/weak-symbols.c b/lld/test/ELF/cheri/cap-table/weak-symbols.c index 30c5962377d7..760089a0960b 100644 --- a/lld/test/ELF/cheri/cap-table/weak-symbols.c +++ b/lld/test/ELF/cheri/cap-table/weak-symbols.c @@ -1,4 +1,4 @@ -// REQUIRES: clang +// REQUIRES: clang, mips // RUN: %cheri128_purecap_cc1 -emit-obj -O2 -mllvm -cheri-cap-table-abi=plt %s -o %t.o // RUNNOT: llvm-objdump -d -r %t.o | FileCheck %s --check-prefix OBJECT diff --git a/lld/test/ELF/cheri/capability-in-rodata.s b/lld/test/ELF/cheri/capability-in-rodata.s index 9e6b5abb678d..6eb3409f1fbe 100644 --- a/lld/test/ELF/cheri/capability-in-rodata.s +++ b/lld/test/ELF/cheri/capability-in-rodata.s @@ -3,6 +3,7 @@ # as dynamic binaries. Currently the kernel just gives us a read-write mapping to # work around this but we really should just make this an error +# REQUIRES: mips # RUN: %cheri_purecap_llvm-mc %s -filetype=obj -o %t.o # RUNNOT: llvm-readobj -r %t.o # RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s diff --git a/lld/test/ELF/cheri/captab-tls-relocations-assert.s b/lld/test/ELF/cheri/captab-tls-relocations-assert.s index cbe48404a6fd..5474a9462208 100644 --- a/lld/test/ELF/cheri/captab-tls-relocations-assert.s +++ b/lld/test/ELF/cheri/captab-tls-relocations-assert.s @@ -2,6 +2,7 @@ # more than 64 members and the fast path using a single 64-bit bitmask no longer works for those values # Check that we no longer trigger this assertion with R_* values >= 64 +# REQUIRES: mips # RUNNOT: %cheri_purecap_llvm-mc %s -filetype=asm -show-encoding -show-inst -show-inst-operands # RUN: %cheri_purecap_llvm-mc %s -filetype=obj -o %t.o # RUN: llvm-readobj -r %t.o | FileCheck %s diff --git a/lld/test/ELF/cheri/cheri-dynamic-flags.s b/lld/test/ELF/cheri/cheri-dynamic-flags.s index 696ce0108294..f3c1f29a68c2 100644 --- a/lld/test/ELF/cheri/cheri-dynamic-flags.s +++ b/lld/test/ELF/cheri/cheri-dynamic-flags.s @@ -1,3 +1,4 @@ +# REQUIRES: mips # RUN: %cheri128_purecap_llvm-mc -cheri-cap-table-abi=pcrel -filetype=obj %s -o %t-pcrel.o # RUN: %cheri128_purecap_llvm-mc -cheri-cap-table-abi=plt -filetype=obj %s -o %t-plt.o # RUN: %cheri128_purecap_llvm-mc -cheri-cap-table-abi=fn-desc -filetype=obj %s -o %t-fn-desc.o diff --git a/lld/test/ELF/cheri/cheri-elf-flags-err.s b/lld/test/ELF/cheri/cheri-elf-flags-err.s index 080565732a42..ab5f77996e9c 100644 --- a/lld/test/ELF/cheri/cheri-elf-flags-err.s +++ b/lld/test/ELF/cheri/cheri-elf-flags-err.s @@ -1,4 +1,5 @@ +# REQUIRES: mips # RUN: llvm-mc -triple=mips64-unknown-freebsd -mcpu=cheri256 -target-abi purecap -position-independent -filetype=obj %s -o %t-cheri256-main.o # RUN: llvm-mc -triple=mips64-unknown-freebsd -mcpu=cheri128 -target-abi purecap -position-independent -filetype=obj %s -o %t-cheri128-main.o # RUN: llvm-mc -triple=mips64-unknown-freebsd -mcpu=cheri256 -target-abi n64 -position-independent -filetype=obj %s -o %t-cheri256-hybrid-main.o diff --git a/lld/test/ELF/cheri/chericap-alignment.s b/lld/test/ELF/cheri/chericap-alignment.s index f9f2a6a6cdb1..2f589f272791 100644 --- a/lld/test/ELF/cheri/chericap-alignment.s +++ b/lld/test/ELF/cheri/chericap-alignment.s @@ -1,3 +1,4 @@ +# REQUIRES: mips # RUN: llvm-mc -triple=mips64-unknown-freebsd -mcpu=cheri256 -target-abi purecap -position-independent -filetype=obj -defsym=FIRST=1 -o %t1.o %s # RUN: llvm-mc -triple=mips64-unknown-freebsd -mcpu=cheri256 -target-abi purecap -position-independent -filetype=obj -defsym=FIRST=0 -o %t2.o %s # RUN: ld.lld %t1.o %t2.o -shared -o %t.so diff --git a/lld/test/ELF/cheri/ctors-dtors-start.c b/lld/test/ELF/cheri/ctors-dtors-start.c index 3fedb9507a62..7d7608991256 100644 --- a/lld/test/ELF/cheri/ctors-dtors-start.c +++ b/lld/test/ELF/cheri/ctors-dtors-start.c @@ -1,3 +1,4 @@ +// REQUIRES: clang, mips // RUN: %cheri_purecap_cc1 %s -emit-obj -o %t.o // RUN: ld.lld %t.o -static -o %t.exe --fatal-warnings // RUN: llvm-objdump -h -r -t --cap-relocs %t.exe | FileCheck --check-prefix WITH-CTORS %s diff --git a/lld/test/ELF/cheri/dyn-relocs-in-exe.s b/lld/test/ELF/cheri/dyn-relocs-in-exe.s index 7d70a81439c0..1ac4776371c6 100644 --- a/lld/test/ELF/cheri/dyn-relocs-in-exe.s +++ b/lld/test/ELF/cheri/dyn-relocs-in-exe.s @@ -1,3 +1,4 @@ +# REQUIRES: mips # RUN: %cheri128_purecap_llvm-mc %s -filetype=obj -defsym=MAIN=1 -o %t.o # Linking with elf relocs should not work for static binaries diff --git a/lld/test/ELF/cheri/dynamic-cap-reloc.s b/lld/test/ELF/cheri/dynamic-cap-reloc.s index 890f50508dc4..f904a6dec7c9 100644 --- a/lld/test/ELF/cheri/dynamic-cap-reloc.s +++ b/lld/test/ELF/cheri/dynamic-cap-reloc.s @@ -1,3 +1,4 @@ +# REQUIRES: mips # RUN: %cheri128_purecap_llvm-mc %s -filetype=obj -o %t.o # NOT: llvm-readobj -r %t.o # RUN: ld.lld -preemptible-caprelocs=elf -shared %t.o -o %t-new.so -verbose -verbose-cap-relocs --relative-cap-relocs diff --git a/lld/test/ELF/cheri/exception-table.cpp b/lld/test/ELF/cheri/exception-table.cpp index a604bb760052..2d450b3a8f51 100644 --- a/lld/test/ELF/cheri/exception-table.cpp +++ b/lld/test/ELF/cheri/exception-table.cpp @@ -1,3 +1,4 @@ +// REQUIRES: clang, mips // RUN: %cheri_purecap_cc1 -O2 -mframe-pointer=none -fcxx-exceptions -fexceptions %s -emit-obj -o %t.o // RUN: llvm-readobj -r %t.o | FileCheck %s --check-prefix=MIPS-OBJ-RELOCS // RUN: %riscv64_cheri_purecap_cc1 -O2 -mframe-pointer=none -fcxx-exceptions -fexceptions %s -emit-obj -o %t-riscv64.o diff --git a/lld/test/ELF/cheri/function-with-offset-reloc.s b/lld/test/ELF/cheri/function-with-offset-reloc.s index 243ea7a24101..2f425405c2eb 100644 --- a/lld/test/ELF/cheri/function-with-offset-reloc.s +++ b/lld/test/ELF/cheri/function-with-offset-reloc.s @@ -2,6 +2,7 @@ ## This may no longer work in the future since it's not ideal when using sentries ## and tightly bounded code capabilities. +# REQUIRES: mips # RUN: %cheri128_purecap_llvm-mc %s -filetype=obj -o %t.o # RUN: %cheri128_purecap_llvm-mc %s -defsym=SHLIB=1 -filetype=obj -o %t-lib.o # RUN: ld.lld %t-lib.o -shared -o %t-lib.so diff --git a/lld/test/ELF/cheri/invalid-captab_rel-reloc.s b/lld/test/ELF/cheri/invalid-captab_rel-reloc.s index 596d1e062903..28b05aa13951 100644 --- a/lld/test/ELF/cheri/invalid-captab_rel-reloc.s +++ b/lld/test/ELF/cheri/invalid-captab_rel-reloc.s @@ -1,3 +1,4 @@ +# REQUIRES: mips # RUN: %cheri128_llvm-mc -filetype=obj %s -o %t.o # RUN: ld.lld -pie %t.o -o %t.exe # RUsN: llvm-readobj --cap-relocs --dynamic-table %t.exe | FileCheck %s diff --git a/lld/test/ELF/cheri/load-_dynamic.s b/lld/test/ELF/cheri/load-_dynamic.s index c44d6dd98a04..86f586f109f3 100644 --- a/lld/test/ELF/cheri/load-_dynamic.s +++ b/lld/test/ELF/cheri/load-_dynamic.s @@ -1,3 +1,4 @@ +# REQUIRES: mips # RUN: %cheri128_llvm-mc -filetype=obj %s -o %t.o # RUN: ld.lld %t.o -o %t.exe # RUN: llvm-objdump -t -d -h -s --section=.data --section=.text %t.exe | FileCheck %s --check-prefix STATIC diff --git a/lld/test/ELF/cheri/mips-libcxxrt-crash-cfi.s b/lld/test/ELF/cheri/mips-libcxxrt-crash-cfi.s index 46ea4ac2869c..10e58975da7b 100644 --- a/lld/test/ELF/cheri/mips-libcxxrt-crash-cfi.s +++ b/lld/test/ELF/cheri/mips-libcxxrt-crash-cfi.s @@ -1,5 +1,5 @@ ## This used to crash ld.lld for CHERI MIPS -# REQUIRES: asserts +# REQUIRES: asserts, mips # RUN: llvm-mc -filetype=obj -triple=mips64-unknown-freebsd --position-independent %s -o %t.o # RUN: ld.lld --eh-frame-hdr --shared -z notext -o %t.so %t.o # RUN: llvm-mc -filetype=obj -triple=mips64-unknown-freebsd %s -o %t-nopic.o diff --git a/lld/test/ELF/cheri/mix-abis-shlib.s b/lld/test/ELF/cheri/mix-abis-shlib.s index ee10a0cdd06e..6bbe0e77d91b 100644 --- a/lld/test/ELF/cheri/mix-abis-shlib.s +++ b/lld/test/ELF/cheri/mix-abis-shlib.s @@ -1,3 +1,4 @@ +# REQUIRES: mips # RUN: %cheri128_purecap_llvm-mc -cheri-cap-table-abi=pcrel -filetype=obj %s -o %t-pcrel.o # RUN: %cheri128_purecap_llvm-mc -cheri-cap-table-abi=plt -filetype=obj %s -o %t-plt.o # RUN: %cheri128_purecap_llvm-mc -cheri-cap-table-abi=fn-desc -filetype=obj %s -o %t-fn-desc.o diff --git a/lld/test/ELF/cheri/out-of-bounds-linker-script-symbol.s b/lld/test/ELF/cheri/out-of-bounds-linker-script-symbol.s index ffae48c7a931..e107b9fdd16b 100644 --- a/lld/test/ELF/cheri/out-of-bounds-linker-script-symbol.s +++ b/lld/test/ELF/cheri/out-of-bounds-linker-script-symbol.s @@ -12,6 +12,7 @@ # RUN: _TLS_Data_size = SIZEOF(.tdata); \ # RUN: }" > %t.ldscript +# REQUIRES: mips # RUN: %cheri128_purecap_llvm-mc -filetype=obj %s -o %t.o # RUN: %cheri128_purecap_llvm-mc -filetype=obj %s --defsym=TDATA=1 -o %t-tdata.o diff --git a/lld/test/ELF/cheri/pcrel-cap-table.s b/lld/test/ELF/cheri/pcrel-cap-table.s index ce39df77a610..b8aa6a0c961a 100644 --- a/lld/test/ELF/cheri/pcrel-cap-table.s +++ b/lld/test/ELF/cheri/pcrel-cap-table.s @@ -1,3 +1,4 @@ +# REQUIRES: mips # RUN: %cheri128_llvm-mc -filetype=obj %s -o %t.o # RUN: ld.lld -z now %t.o -o %t.exe # RUN: llvm-objdump --cap-relocs -t -d -h %t.exe | FileCheck %s diff --git a/lld/test/ELF/cheri/pthread-static-jump-table.c b/lld/test/ELF/cheri/pthread-static-jump-table.c index 961f56f3ee3c..16d8574a1990 100644 --- a/lld/test/ELF/cheri/pthread-static-jump-table.c +++ b/lld/test/ELF/cheri/pthread-static-jump-table.c @@ -1,3 +1,4 @@ +// REQUIRES: clang, mips // RUN: rm -rf %t // RUN: mkdir %t // RUN: %cheri_purecap_cc1 %s -emit-obj -o %t/libc-stubs.o -DLIBC_STUBS diff --git a/lld/test/ELF/cheri/relocation-with-offset.s b/lld/test/ELF/cheri/relocation-with-offset.s index 7ee99166e35a..5eac17731b38 100644 --- a/lld/test/ELF/cheri/relocation-with-offset.s +++ b/lld/test/ELF/cheri/relocation-with-offset.s @@ -1,3 +1,4 @@ +# REQUIRES: mips # RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux %s -o %t-linux.o # RUN: llvm-objdump --section=.data -s %t-linux.o | FileCheck --check-prefix DATA-RELA %s