Skip to content

Commit fd7059e

Browse files
committed
[lld] Mark test which require mips target
1 parent a8ecfcd commit fd7059e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+58
-26
lines changed

lld/test/ELF/bss-start-common.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# REQUIRES: x86
1+
# REQUIRES: x86, mips
22
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
33
# RUN: ld.lld %t -o %t2
44
# RUN: llvm-objdump -t --section-headers %t2 | FileCheck %s

lld/test/ELF/cheri/__cap_relocs/cap-relocs-bsymbolic.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# All relocations should be load address plus offset and not preemptible!
33
# This was a problem with __cap_relocs and was found building RTLD
44

5+
// REQUIRES: mips
56
// RUN: %cheri128_purecap_llvm-mc -filetype=obj -defsym=CHERI=1 %s -o %t-cheri.o
67
// RUN: llvm-readobj -r %t-cheri.o | FileCheck %s --check-prefixes OBJ-RELOCS,CHERI-OBJ-RELOCS
78
// RUN: llvm-mc -triple=mips64-unknown-freebsd -position-independent -filetype=obj %s -o %t-mips.o

lld/test/ELF/cheri/__cap_relocs/cap-relocs-dynamic-tag.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# REQUIRES: mips
12
# RUN: %cheri_purecap_llvm-mc %s -filetype=obj -o %t.o
23
# RUN: ld.lld -z now -shared %t.o -o %t.so
34
# RUN: llvm-readelf --program-headers --section-mapping %t.so | FileCheck %s -check-prefix SEGMENTS

lld/test/ELF/cheri/__cap_relocs/capreloc-aether.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# REQUIRES: mips
12
# RUN: %cheri_purecap_llvm-mc %s -filetype=obj -o %t.o
23
# RUN: ld.lld -T %S/Inputs/capreloc-aether.script %t.o -o %t
34
# RUN: llvm-readobj --cap-relocs %t | FileCheck %s

lld/test/ELF/cheri/__cap_relocs/capreloc-local-function-pointer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: clang
1+
// REQUIRES: clang, mips
22

33
// RUN: %cheri_purecap_cc1 -emit-obj -mllvm -cheri-cap-table-abi=pcrel %s -o %t.o
44
// RUN: llvm-readobj -r %t.o | FileCheck --check-prefix OBJ-CAPRELOCS %s

lld/test/ELF/cheri/__cap_relocs/capreloc-preemptible.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: clang
1+
// REQUIRES: clang, mips
22

33
// RUN: %cheri_purecap_clang %s -c -o %t.o
44
// RUN: llvm-readobj -r %t.o | FileCheck --check-prefix READOBJ %s

lld/test/ELF/cheri/__cap_relocs/capreloc-string-constant.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: clang
1+
// REQUIRES: clang, mips
22

33
// RUN: %cheri_purecap_cc1 %s -emit-obj -o %t.o
44
// RUN: llvm-readobj -r %t.o | FileCheck --check-prefix READOBJ %s

lld/test/ELF/cheri/__cap_relocs/capreloc-undefined.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: clang
1+
// REQUIRES: clang, mips
22

33
// RUN: %cheri_purecap_clang %s -c -o %t.o
44
// RUN: llvm-readobj -r %t.o | FileCheck --check-prefix READOBJ %s

lld/test/ELF/cheri/__cap_relocs/sort-cap-relocs.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// REQUIRES: mips
12
// RUN: %cheri128_purecap_llvm-mc -filetype=obj -defsym=FIRST=1 %s -o %t1.o
23
// RUN: %cheri128_purecap_llvm-mc -filetype=obj %s -o %t2.o
34
// RUN: echo "SECTIONS { \

lld/test/ELF/cheri/__cap_relocs/zutil.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: clang
1+
// REQUIRES: clang, mips
22

33
// 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)
44

lld/test/ELF/cheri/abiversion.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# REQUIRES: mips
12
# RUN: %cheri128_purecap_llvm-mc -filetype=obj %s -o %t.o
23
# RUN: ld.lld -pie %t.o -o %t.exe
34
# RUN: llvm-readobj -h %t.exe | FileCheck %s

lld/test/ELF/cheri/building-rtld.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# REQUIRES: mips
12
# RUN: %cheri128_purecap_llvm-mc -filetype=obj %s -o %t.o
23
# RUN: not ld.lld -shared --building-freebsd-rtld %t.o -o /dev/null 2>&1 | FileCheck %s
34
.text

lld/test/ELF/cheri/cap-table-dynamic-tag.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# REQUIRES: mips
12
# RUN: %cheri128_llvm-mc -filetype=obj %s -o %t.o
23
# RUN: ld.lld -z lazy -pie %t.o -o %t.exe
34
# RUN: llvm-readelf --program-headers --section-mapping %t.exe | FileCheck %s -check-prefix LAZY-SEGMENTS

lld/test/ELF/cheri/cap-table/abs-symbol-shared.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# REQUIRES: mips
12
# RUN: %cheri_purecap_llvm-mc -filetype=obj %s -o %t.o
23
# RUN: ld.lld --fatal-warnings -pie %t.o -o %t.exe
34
# RUN: llvm-readobj --dyn-relocations %t.exe | FileCheck %s --check-prefix=INTERPOSABLE

lld/test/ELF/cheri/cap-table/cap-table-broken-mips-output.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// This previously caused the following error in llvm-objdump: index past the end of the symbol table
44

55
// create a n64 output that doesn't have any cap-table entries
6+
// REQUIRES: mips
67
// RUN: %cheri_cc1 %s -emit-obj -x c -O3 -o %t.o
78
// RUN: llvm-objdump -t %t.o | FileCheck --check-prefix OBJ %s
89
// RUN: ld.lld %t.o -o %t.exe

lld/test/ELF/cheri/cap-table/cap-table-global-init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// REQUIRES: mips
12
// RUN: %cheri128_purecap_cc1 -pedantic -Wextra %s -emit-obj -mllvm -cheri-cap-table-abi=plt -x c -O0 -o %t.o
23
// RUN: ld.lld %t.o -o %t.exe
34
// RUN: llvm-objdump -t %t.exe | FileCheck %s

lld/test/ELF/cheri/cap-table/cap-table-init-relocs.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# REQUIRES: mips
12
# RUN: %cheri128_purecap_llvm-mc -filetype=obj %s -o %t.o
23
# RUN: ld.lld -z now -shared -o %t %t.o -preemptible-caprelocs=legacy --no-relative-cap-relocs -local-caprelocs=legacy
34
# RUN: llvm-readobj -r %t | FileCheck %s --check-prefix LEGACY-BOTH-ELF-RELOCS

lld/test/ELF/cheri/cap-table/cap-table-negative-reloc-offset.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// REQUIRES: mips
12
// RUN: %cheri128_cc1 -emit-obj -O2 -target-abi purecap -mllvm -cheri-cap-table-abi=plt %s -o %t.o
23
// RUN: llvm-readobj -r %t.o | FileCheck --check-prefix RELOCATIONS %s
34
// RUN: ld.lld -o %t.exe %t.o -verbose 2>&1 | FileCheck %s -check-prefix WARN

lld/test/ELF/cheri/cap-table/cap-table-pointer.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# REQUIRES: mips
12
# RUN: %cheri_purecap_llvm-mc -filetype=obj %s -o %t.o
23
# RUN: ld.lld --fatal-warnings -pie %t.o -o %t.exe
34
# RUN: llvm-readobj --cap-relocs --cap-table --dyn-relocations --symbols %t.exe | %cheri_FileCheck %s

lld/test/ELF/cheri/cap-table/capcall-reloc-against-data-symbol.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# CheriBSD crt1.c will now trap during crt_init_globals() if this happens instead
99
# of creating a writable capability for the text segment.
1010

11-
11+
# REQUIRES: mips
1212
# RUN: %cheri128_purecap_llvm-mc -filetype=obj %s -o %t.o
1313
# RUN: %cheri128_purecap_llvm-mc -filetype=obj %s -defsym=BUILD_LIBCHERI=1 -o %t-libcheri.o
1414
# RUN: llvm-readobj -r %t.o | FileCheck %s --check-prefix RELOCS

lld/test/ELF/cheri/cap-table/caprelocs-duplicate-symbol-names.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# REQUIRES: mips
12
# RUN: %cheri128_purecap_llvm-mc %s -defsym=FILE=1 -filetype=obj -o %t1.o
23
# RUN: %cheri128_purecap_llvm-mc %s -defsym=FILE=2 -filetype=obj -o %t2.o
34
# RUN: %cheri128_purecap_llvm-mc %s -defsym=FILE=3 -filetype=obj -o %t-duplicate.o

lld/test/ELF/cheri/cap-table/experimental/per-file-table.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: clang
1+
// REQUIRES: clang, mips
22

33
// RUN: mkdir -p %t
44
// RUN: %cheri128_purecap_cc1 -mllvm -cheri-cap-table-abi=plt -emit-obj -O2 -DFILE1 %s -o %t/file1.o

lld/test/ELF/cheri/cap-table/experimental/per-function-table.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
// REQUIRES: clang
2+
// REQUIRES: clang, mips
33

44
// RUN: %cheri128_purecap_cc1 -mllvm -cheri-cap-table-abi=plt -emit-obj -O2 %s -o %t.o
55
// RUN: ld.lld -z now -shared -o %t.so %t.o -captable-scope=function -z captabledebug

lld/test/ELF/cheri/cap-table/experimental/tls-xfail.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# REQUIRES: mips
12
# RUN: %cheri128_purecap_llvm-mc -filetype=obj %s -o %t.o
23
# RUN: ld.lld -shared -o %t.so %t.o -captable-scope=all
34
# RUN: llvm-readobj -r --cap-table %t.so

lld/test/ELF/cheri/cap-table/fnptr-vs-call.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: clang
1+
// REQUIRES: clang, mips
22

33
// RUN: %cheri_purecap_cc1 -mllvm -cheri-cap-table-abi=plt -DFNPTR1 -emit-obj -O2 %s -o %t-fnptr1.o
44
// RUN: %cheri_purecap_cc1 -mllvm -cheri-cap-table-abi=plt -DFNPTR2 -emit-obj -O2 %s -o %t-fnptr2.o

lld/test/ELF/cheri/cap-table/global-capabilities.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: clang
1+
// REQUIRES: clang, mips
22

33
// RUN: %cheri128_purecap_cc1 -mllvm -mxcaptable -emit-obj -O2 -mllvm -cheri-cap-table-abi=plt %s -o %t-128.o
44
// RUN: llvm-readobj -r %t-128.o | FileCheck %s --check-prefix RELOCS

lld/test/ELF/cheri/cap-table/incompatible-abis.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# REQUIRES: mips
12
# RUN: %cheri128_purecap_llvm-mc -cheri-cap-table-abi=pcrel -filetype=obj %s -o %t-pcrel.o
23
# RUN: %cheri128_purecap_llvm-mc -cheri-cap-table-abi=plt -filetype=obj %s -o %t-plt.o
34
# RUN: %cheri128_purecap_llvm-mc -cheri-cap-table-abi=fn-desc -filetype=obj %s -o %t-fn-desc.o

lld/test/ELF/cheri/cap-table/interposing_table.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: clang
1+
// REQUIRES: clang, mips
22
// RUN: %cheri_cc1 -emit-obj -O2 -cheri-size 256 -target-cpu cheri256 -target-feature +soft-float \
33
// RUN: -msoft-float -target-abi purecap -mllvm -cheri-cap-table-abi=plt %s -o %t.o
44
// RUN: ld.lld %t.o %S/Inputs/interposing_table.o -o %t.exe

lld/test/ELF/cheri/cap-table/jump-table-size.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: clang
1+
// REQUIRES: clang, mips
22

33
// RUN: %cheri_purecap_cc1 -mllvm -mxcaptable -emit-obj -O2 -mllvm -cheri-cap-table-abi=plt %s -o %t.o
44
// RUN: llvm-objdump -d -r -t %t.o | FileCheck %s --check-prefix OBJECT

lld/test/ELF/cheri/cap-table/local-fn-ptr-in-plt-abi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// REQUIRES: mips
12
// RUN: %cheri128_purecap_cc1 -mllvm -cheri-cap-table-abi=plt -emit-obj -o %t.o %s
23
// RUN: llvm-objdump -d -r %t.o | FileCheck %s --check-prefix DISAS
34
// Should have a R_MIPS_CHERI_CAPTAB20 relocation against the function pointer and a R_MIPS_CHERI_CAPCALL20 against use_callback

lld/test/ELF/cheri/cap-table/non-preemptible-fn-ptr-unique-plt-abi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// REQUIRES: mips
12
// RUN: %cheri128_purecap_cc1 -mllvm -cheri-cap-table-abi=plt -emit-obj -o %t.o %s
23
// RUN: llvm-objdump -d -r %t.o | FileCheck %s --check-prefix DISAS --implicit-check-not R_MIPS_CHERI
34
// Should have a R_MIPS_CHERI_CAPTAB20 relocation against the function pointer and a R_MIPS_CHERI_CAPCALL20 against use_callback

lld/test/ELF/cheri/cap-table/relaplt-link.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: clang, x86
1+
// REQUIRES: clang, x86, mips
22
// Fix running llvm-strip on CheriABI binaries with a .rel.plt section.
33
// Check that set sh_info correctly for .rel.plt since otherwise llvm-strip will
44
// fail. Since all .rel.plt relocations will affect the captable sh_info should

lld/test/ELF/cheri/cap-table/relocatable-output.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: clang
1+
// REQUIRES: clang, mips
22

33
// RUN: %cheri_purecap_cc1 -DFIRST -emit-obj -O2 -mllvm -cheri-cap-table-abi=plt %s -o %t1.o
44
// RUN: %cheri_purecap_cc1 -DSECOND -emit-obj -O2 -mllvm -cheri-cap-table-abi=plt %s -o %t2.o

lld/test/ELF/cheri/cap-table/simple-global-access.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: clang
1+
// REQUIRES: clang, mips
22
// FIXME: why is this not an assembly test...
33

44
// RUN: %cheri128_purecap_cc1 -mllvm -mxcaptable -emit-obj -O0 -mllvm -cheri-cap-table-abi=plt %s -o %t.o

lld/test/ELF/cheri/cap-table/unnamed-symbols.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// REQUIRES: mips
12
// RUN: %cheri128_purecap_cc1 -DGET_NUMBER=1 -emit-obj -O0 -mllvm -cheri-cap-table-abi=plt %s -o %t-get_number.o
23
// RUN: %cheri128_purecap_cc1 -DGET_ORDINAL=1 -emit-obj -O0 -mllvm -cheri-cap-table-abi=plt %s -o %t-get_ordinal.o
34
// RUN: %cheri128_purecap_cc1 -DMAIN=1 -emit-obj -O0 -mllvm -cheri-cap-table-abi=plt %s -o %t-main.o

lld/test/ELF/cheri/cap-table/weak-symbols-2.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Test that weak symbols defined by linker scripts are written correctly
2+
# REQUIRES: mips
23
# RUN: %cheri_purecap_llvm-mc -filetype=obj -defsym=MAIN_FILE=1 %s -o %t.o
34

45
# RUN: ld.lld --fatal-warnings -o %t.exe %t.o

lld/test/ELF/cheri/cap-table/weak-symbols.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: clang
1+
// REQUIRES: clang, mips
22

33
// RUN: %cheri128_purecap_cc1 -emit-obj -O2 -mllvm -cheri-cap-table-abi=plt %s -o %t.o
44
// RUNNOT: llvm-objdump -d -r %t.o | FileCheck %s --check-prefix OBJECT

lld/test/ELF/cheri/capability-in-rodata.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# as dynamic binaries. Currently the kernel just gives us a read-write mapping to
44
# work around this but we really should just make this an error
55

6+
# REQUIRES: mips
67
# RUN: %cheri_purecap_llvm-mc %s -filetype=obj -o %t.o
78
# RUNNOT: llvm-readobj -r %t.o
89
# RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s

lld/test/ELF/cheri/captab-tls-relocations-assert.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# more than 64 members and the fast path using a single 64-bit bitmask no longer works for those values
33
# Check that we no longer trigger this assertion with R_* values >= 64
44

5+
# REQUIRES: mips
56
# RUNNOT: %cheri_purecap_llvm-mc %s -filetype=asm -show-encoding -show-inst -show-inst-operands
67
# RUN: %cheri_purecap_llvm-mc %s -filetype=obj -o %t.o
78
# RUN: llvm-readobj -r %t.o | FileCheck %s

lld/test/ELF/cheri/cheri-dynamic-flags.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# REQUIRES: mips
12
# RUN: %cheri128_purecap_llvm-mc -cheri-cap-table-abi=pcrel -filetype=obj %s -o %t-pcrel.o
23
# RUN: %cheri128_purecap_llvm-mc -cheri-cap-table-abi=plt -filetype=obj %s -o %t-plt.o
34
# RUN: %cheri128_purecap_llvm-mc -cheri-cap-table-abi=fn-desc -filetype=obj %s -o %t-fn-desc.o

lld/test/ELF/cheri/cheri-elf-flags-err.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
# REQUIRES: mips
23
# RUN: llvm-mc -triple=mips64-unknown-freebsd -mcpu=cheri256 -target-abi purecap -position-independent -filetype=obj %s -o %t-cheri256-main.o
34
# RUN: llvm-mc -triple=mips64-unknown-freebsd -mcpu=cheri128 -target-abi purecap -position-independent -filetype=obj %s -o %t-cheri128-main.o
45
# RUN: llvm-mc -triple=mips64-unknown-freebsd -mcpu=cheri256 -target-abi n64 -position-independent -filetype=obj %s -o %t-cheri256-hybrid-main.o

lld/test/ELF/cheri/chericap-alignment.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# REQUIRES: mips
12
# RUN: llvm-mc -triple=mips64-unknown-freebsd -mcpu=cheri256 -target-abi purecap -position-independent -filetype=obj -defsym=FIRST=1 -o %t1.o %s
23
# RUN: llvm-mc -triple=mips64-unknown-freebsd -mcpu=cheri256 -target-abi purecap -position-independent -filetype=obj -defsym=FIRST=0 -o %t2.o %s
34
# RUN: ld.lld %t1.o %t2.o -shared -o %t.so

lld/test/ELF/cheri/ctors-dtors-start.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// REQUIRES: clang, mips
12
// RUN: %cheri_purecap_cc1 %s -emit-obj -o %t.o
23
// RUN: ld.lld %t.o -static -o %t.exe --fatal-warnings
34
// RUN: llvm-objdump -h -r -t --cap-relocs %t.exe | FileCheck --check-prefix WITH-CTORS %s

lld/test/ELF/cheri/dyn-relocs-in-exe.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# REQUIRES: mips
12
# RUN: %cheri128_purecap_llvm-mc %s -filetype=obj -defsym=MAIN=1 -o %t.o
23

34
# Linking with elf relocs should not work for static binaries

lld/test/ELF/cheri/dynamic-cap-reloc.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# REQUIRES: mips
12
# RUN: %cheri128_purecap_llvm-mc %s -filetype=obj -o %t.o
23
# NOT: llvm-readobj -r %t.o
34
# RUN: ld.lld -preemptible-caprelocs=elf -shared %t.o -o %t-new.so -verbose -verbose-cap-relocs --relative-cap-relocs

lld/test/ELF/cheri/exception-table.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// REQUIRES: clang, mips
12
// RUN: %cheri_purecap_cc1 -O2 -mframe-pointer=none -fcxx-exceptions -fexceptions %s -emit-obj -o %t.o
23
// RUN: llvm-readobj -r %t.o | FileCheck %s --check-prefix=MIPS-OBJ-RELOCS
34
// RUN: %riscv64_cheri_purecap_cc1 -O2 -mframe-pointer=none -fcxx-exceptions -fexceptions %s -emit-obj -o %t-riscv64.o

lld/test/ELF/cheri/function-with-offset-reloc.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
## This may no longer work in the future since it's not ideal when using sentries
33
## and tightly bounded code capabilities.
44

5+
# REQUIRES: mips
56
# RUN: %cheri128_purecap_llvm-mc %s -filetype=obj -o %t.o
67
# RUN: %cheri128_purecap_llvm-mc %s -defsym=SHLIB=1 -filetype=obj -o %t-lib.o
78
# RUN: ld.lld %t-lib.o -shared -o %t-lib.so

lld/test/ELF/cheri/invalid-captab_rel-reloc.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# REQUIRES: mips
12
# RUN: %cheri128_llvm-mc -filetype=obj %s -o %t.o
23
# RUN: ld.lld -pie %t.o -o %t.exe
34
# RUsN: llvm-readobj --cap-relocs --dynamic-table %t.exe | FileCheck %s

lld/test/ELF/cheri/load-_dynamic.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# REQUIRES: mips
12
# RUN: %cheri128_llvm-mc -filetype=obj %s -o %t.o
23
# RUN: ld.lld %t.o -o %t.exe
34
# RUN: llvm-objdump -t -d -h -s --section=.data --section=.text %t.exe | FileCheck %s --check-prefix STATIC

lld/test/ELF/cheri/mips-libcxxrt-crash-cfi.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## This used to crash ld.lld for CHERI MIPS
2-
# REQUIRES: asserts
2+
# REQUIRES: asserts, mips
33
# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-freebsd --position-independent %s -o %t.o
44
# RUN: ld.lld --eh-frame-hdr --shared -z notext -o %t.so %t.o
55
# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-freebsd %s -o %t-nopic.o

lld/test/ELF/cheri/mix-abis-shlib.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# REQUIRES: mips
12
# RUN: %cheri128_purecap_llvm-mc -cheri-cap-table-abi=pcrel -filetype=obj %s -o %t-pcrel.o
23
# RUN: %cheri128_purecap_llvm-mc -cheri-cap-table-abi=plt -filetype=obj %s -o %t-plt.o
34
# RUN: %cheri128_purecap_llvm-mc -cheri-cap-table-abi=fn-desc -filetype=obj %s -o %t-fn-desc.o

lld/test/ELF/cheri/out-of-bounds-linker-script-symbol.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# RUN: _TLS_Data_size = SIZEOF(.tdata); \
1313
# RUN: }" > %t.ldscript
1414

15+
# REQUIRES: mips
1516
# RUN: %cheri128_purecap_llvm-mc -filetype=obj %s -o %t.o
1617
# RUN: %cheri128_purecap_llvm-mc -filetype=obj %s --defsym=TDATA=1 -o %t-tdata.o
1718

lld/test/ELF/cheri/pcrel-cap-table.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# REQUIRES: mips
12
# RUN: %cheri128_llvm-mc -filetype=obj %s -o %t.o
23
# RUN: ld.lld -z now %t.o -o %t.exe
34
# RUN: llvm-objdump --cap-relocs -t -d -h %t.exe | FileCheck %s

lld/test/ELF/cheri/pthread-static-jump-table.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// REQUIRES: clang, mips
12
// RUN: rm -rf %t
23
// RUN: mkdir %t
34
// RUN: %cheri_purecap_cc1 %s -emit-obj -o %t/libc-stubs.o -DLIBC_STUBS

lld/test/ELF/cheri/relocation-with-offset.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# REQUIRES: mips
12
# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux %s -o %t-linux.o
23
# RUN: llvm-objdump --section=.data -s %t-linux.o | FileCheck --check-prefix DATA-RELA %s
34

llvm/test/CodeGen/CHERI-Generic/regenerate-all.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@ def __init__(self):
8181
parser = argparse.ArgumentParser()
8282
parser.add_argument("--llvm-bindir", type=Path, required=True)
8383
parser.add_argument("--verbose", action="store_true")
84-
parser.add_argument("--arch", default='all',
85-
choices=[a.name for a in ALL_ARCHITECTURES]+['all'],
86-
help="Architecture for which to generate tests: defaults to 'all'")
8784
parser.add_argument("tests", default=[], nargs=argparse.ZERO_OR_MORE)
8885
self.args = parser.parse_args()
8986
print(self.args)
@@ -233,8 +230,6 @@ def update_one_test(test_name: str, input_file: typing.BinaryIO,
233230
def main():
234231
options = CmdArgs()
235232
architectures = ALL_ARCHITECTURES
236-
if options.args.arch != 'all':
237-
architectures = [arch for arch in architectures if arch.name == options.args.arch]
238233
# TODO: add command line flag to select subsets
239234
# TODO: add option to delete all files that don't exist in Inputs/ to handle renaming
240235
if options.args.tests:

llvm/test/Transforms/CheriBoundAllocas/pg_lzcompress-stack-bounds-crash.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; RUN: %cheri_purecap_opt -cheri-bound-allocas %s -o - -S -debug-only="cheri-bound-allocas" 2>&1 | %cheri_FileCheck %s -check-prefix DBG
22
; RUN: %riscv64_cheri_purecap_opt -cheri-bound-allocas %s -o - -S -debug-only="cheri-bound-allocas" 2>&1 | %cheri_FileCheck %s -check-prefix DBG
3-
; REQUIRES: asserts,mips-registered-target,riscv-registered-target
3+
; REQUIRES: asserts, mips-registered-target, riscv-registered-target
44
; This crash was found compiling postgres (due to a missing depth limitation in CheriPurecapABI.cpp)
55

66
target datalayout = "E-m:e-pf200:128:128:128:64-i8:8:32-i16:16:32-i64:64-n32:64-S128-A200-P200-G200"

llvm/test/Transforms/CheriBoundAllocas/stack-bounds-pass-load-store.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
; is a single trivially rematerizable instruction so it can freely move it around to avoid stack spills.
44
; we were moving the allocation of the register that is only used later to the beginning
55

6-
; REQUIRES: asserts,mips-registered-target,riscv-registered-target
6+
; REQUIRES: asserts, mips-registered-target
77
; RUN: %cheri_purecap_opt -cheri-bound-allocas %s -o - -S -cheri-stack-bounds=if-needed -debug-only=cheri-bound-allocas 2>%t.dbg | FileCheck %s
88
; RUN: FileCheck %s -input-file=%t.dbg --check-prefixes=DBG,DBG-TYPED
99
; RUN: %cheri_purecap_opt -opaque-pointers=1 -instsimplify -cheri-bound-allocas %s -o - -S -cheri-stack-bounds=if-needed -debug-only=cheri-bound-allocas 2>%t.dbg | FileCheck %s --check-prefix=OPAQUE

llvm/test/Transforms/CheriBoundAllocas/stack-bounds-pass.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
; is a single trivially rematerizable instruction so it can freely move it around to avoid stack spills.
44
; we were moving the allocation of the register that is only used later to the beginning
55

6-
; REQUIRES: asserts,mips-registered-target,riscv-registered-target
6+
; REQUIRES: asserts, mips-registered-target
77
; RUN: %cheri_purecap_opt -opaque-pointers=0 -cheri-bound-allocas %s -o - -S | FileCheck %s -check-prefix DEFAULT
88
; RUN: %cheri_purecap_opt -opaque-pointers=0 -cheri-bound-allocas %s -o - -S -cheri-stack-bounds-single-intrinsic-threshold=0 -cheri-stack-bounds=if-needed | FileCheck %s -check-prefix IF-NEEDED-SINGLE
99
; RUN: %cheri_purecap_opt -opaque-pointers=0 -cheri-bound-allocas %s -o - -S -cheri-stack-bounds-single-intrinsic-threshold=10 -cheri-stack-bounds=if-needed | FileCheck %s -check-prefix IF-NEEDED-PER-USE

0 commit comments

Comments
 (0)