Skip to content

Commit

Permalink
[lld] Mark test which require mips target
Browse files Browse the repository at this point in the history
  • Loading branch information
veselypeta committed May 20, 2024
1 parent a8ecfcd commit fd7059e
Show file tree
Hide file tree
Showing 59 changed files with 58 additions and 26 deletions.
2 changes: 1 addition & 1 deletion lld/test/ELF/bss-start-common.s
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/__cap_relocs/cap-relocs-bsymbolic.s
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/__cap_relocs/cap-relocs-dynamic-tag.s
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/__cap_relocs/capreloc-aether.s
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lld/test/ELF/cheri/__cap_relocs/capreloc-preemptible.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lld/test/ELF/cheri/__cap_relocs/capreloc-string-constant.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lld/test/ELF/cheri/__cap_relocs/capreloc-undefined.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/__cap_relocs/sort-cap-relocs.s
Original file line number Diff line number Diff line change
@@ -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 { \
Expand Down
2 changes: 1 addition & 1 deletion lld/test/ELF/cheri/__cap_relocs/zutil.c
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/abiversion.s
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/building-rtld.s
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/cap-table-dynamic-tag.s
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/cap-table/abs-symbol-shared.s
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/cap-table/cap-table-global-init.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/cap-table/cap-table-init-relocs.s
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/cap-table/cap-table-pointer.s
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lld/test/ELF/cheri/cap-table/experimental/per-file-table.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/cap-table/experimental/tls-xfail.s
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lld/test/ELF/cheri/cap-table/fnptr-vs-call.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lld/test/ELF/cheri/cap-table/global-capabilities.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/cap-table/incompatible-abis.s
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lld/test/ELF/cheri/cap-table/interposing_table.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lld/test/ELF/cheri/cap-table/jump-table-size.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/cap-table/local-fn-ptr-in-plt-abi.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lld/test/ELF/cheri/cap-table/relaplt-link.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lld/test/ELF/cheri/cap-table/relocatable-output.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lld/test/ELF/cheri/cap-table/simple-global-access.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/cap-table/unnamed-symbols.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/cap-table/weak-symbols-2.s
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lld/test/ELF/cheri/cap-table/weak-symbols.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/capability-in-rodata.s
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/captab-tls-relocations-assert.s
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/cheri-dynamic-flags.s
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/cheri-elf-flags-err.s
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/chericap-alignment.s
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/ctors-dtors-start.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/dyn-relocs-in-exe.s
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/dynamic-cap-reloc.s
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/exception-table.cpp
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/function-with-offset-reloc.s
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/invalid-captab_rel-reloc.s
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/load-_dynamic.s
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lld/test/ELF/cheri/mips-libcxxrt-crash-cfi.s
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/mix-abis-shlib.s
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/out-of-bounds-linker-script-symbol.s
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/pcrel-cap-table.s
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/pthread-static-jump-table.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lld/test/ELF/cheri/relocation-with-offset.s
Original file line number Diff line number Diff line change
@@ -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

Expand Down
5 changes: 0 additions & 5 deletions llvm/test/CodeGen/CHERI-Generic/regenerate-all.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ def __init__(self):
parser = argparse.ArgumentParser()
parser.add_argument("--llvm-bindir", type=Path, required=True)
parser.add_argument("--verbose", action="store_true")
parser.add_argument("--arch", default='all',
choices=[a.name for a in ALL_ARCHITECTURES]+['all'],
help="Architecture for which to generate tests: defaults to 'all'")
parser.add_argument("tests", default=[], nargs=argparse.ZERO_OR_MORE)
self.args = parser.parse_args()
print(self.args)
Expand Down Expand Up @@ -233,8 +230,6 @@ def update_one_test(test_name: str, input_file: typing.BinaryIO,
def main():
options = CmdArgs()
architectures = ALL_ARCHITECTURES
if options.args.arch != 'all':
architectures = [arch for arch in architectures if arch.name == options.args.arch]
# TODO: add command line flag to select subsets
# TODO: add option to delete all files that don't exist in Inputs/ to handle renaming
if options.args.tests:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; RUN: %cheri_purecap_opt -cheri-bound-allocas %s -o - -S -debug-only="cheri-bound-allocas" 2>&1 | %cheri_FileCheck %s -check-prefix DBG
; RUN: %riscv64_cheri_purecap_opt -cheri-bound-allocas %s -o - -S -debug-only="cheri-bound-allocas" 2>&1 | %cheri_FileCheck %s -check-prefix DBG
; REQUIRES: asserts,mips-registered-target,riscv-registered-target
; REQUIRES: asserts, mips-registered-target, riscv-registered-target
; This crash was found compiling postgres (due to a missing depth limitation in CheriPurecapABI.cpp)

target datalayout = "E-m:e-pf200:128:128:128:64-i8:8:32-i16:16:32-i64:64-n32:64-S128-A200-P200-G200"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
; is a single trivially rematerizable instruction so it can freely move it around to avoid stack spills.
; we were moving the allocation of the register that is only used later to the beginning

; REQUIRES: asserts,mips-registered-target,riscv-registered-target
; REQUIRES: asserts, mips-registered-target
; 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
; RUN: FileCheck %s -input-file=%t.dbg --check-prefixes=DBG,DBG-TYPED
; 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
; is a single trivially rematerizable instruction so it can freely move it around to avoid stack spills.
; we were moving the allocation of the register that is only used later to the beginning

; REQUIRES: asserts,mips-registered-target,riscv-registered-target
; REQUIRES: asserts, mips-registered-target
; RUN: %cheri_purecap_opt -opaque-pointers=0 -cheri-bound-allocas %s -o - -S | FileCheck %s -check-prefix DEFAULT
; 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
; 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
Expand Down

0 comments on commit fd7059e

Please sign in to comment.