Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip tests which rely on Mips backend. #733

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions clang/test/CodeGen/cheri/cap-table-abi-flags.S
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// REQUIRES: mips-registered-target
# RUN: %cheri_purecap_clang -cheri-cap-table-abi=plt -c %s -o - -### 2>&1 | FileCheck %s -check-prefix CMDLINE

# Preprocess first then run as (make sure both contain the cap-table-abi flag
Expand Down
1 change: 1 addition & 0 deletions clang/test/CodeGen/cheri/cap-table-abi-flags.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// REQUIRES: mips-registered-target
// RUN: %cheri_purecap_clang -cheri-cap-table-abi=plt -c %s -o - | llvm-readobj --arch-specific - | FileCheck %s -check-prefix PLT
// PLT: ISA Extension: CHERI purecap (PLT based) (0xC2)

Expand Down
1 change: 1 addition & 0 deletions clang/test/CodeGen/cheri/cheri-inregs-param-info.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature
// REQUIRES: mips-registered-target
// RUN: %cheri_purecap_cc1 -emit-llvm -O2 %s -o - | FileCheck %s
// RUN: %cheri_purecap_cc1 -S -O2 %s -o - | FileCheck %s --check-prefix ASM
// This used to crash with an assertion:
Expand Down
1 change: 1 addition & 0 deletions clang/test/CodeGen/cheri/stack-bounds-pass.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: asserts
// REQUIRES: mips-registered-target
// RUN: %cheri_purecap_clang -mcpu=cheri128 -cheri=128 -xc -O0 -fsanitize-address-use-after-scope -g0 %s -o %t.ll -c -S -emit-llvm -Xclang -disable-O0-optnone -Wno-array-bounds -Wno-return-stack-address
// RUN: %cheri_purecap_opt -cheri-bound-allocas %t.ll -o /dev/null -S -cheri-stack-bounds-single-intrinsic-threshold=10 \
// RUN: -cheri-stack-bounds=if-needed -debug-only="cheri-bound-allocas" 2>&1 | FileCheck -check-prefix DBG %s
Expand Down
6 changes: 4 additions & 2 deletions clang/test/CodeGenCXX/cheri/csetbounds-stats-all.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// REQUIRES: mips-registered-target
// RUN: rm -f %t-hybrid.csv %t-purecap.csv
// RUN: %cheri128_purecap_cc1 %s -mllvm -cheri-cap-table-abi=pcrel -cheri-bounds=aggressive \
// RUN: -mllvm -collect-csetbounds-stats=csv -cheri-stats-file=%t-purecap.csv -S -o /dev/null -O1
Expand Down Expand Up @@ -42,7 +43,8 @@ void test_onstack_int_overaligned(struct Foo *s) {

void test__stack_array(void) {
char buf[333];
do_stuff_with_buf(buf); // CSV-NEXT: 0,333,?,"{{.+}}/csetbounds-stats-all.cpp:45:21","Add subobject bounds","array decay for char[333]"
do_stuff_with_buf(buf);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave these alone

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The thing here is that the line number 45 is hard coded, by adding the // REQUIRES: cause causes this test to fail. All the other assertions use the [[@LINE]] directive to get the line making this clause an outlier. Is there a specific reason why this assertion needs to be this way?

// CSV-NEXT: 0,333,?,"{{.+}}/csetbounds-stats-all.cpp:[[@LINE-1]]:21","Add subobject bounds","array decay for char[333]"
}

void test_alloca(int n) {
Expand All @@ -53,7 +55,7 @@ void test_alloca(int n) {
void test_varlen_stack_array(int n) {
char varlenbuf[n];
do_stuff_with_buf(varlenbuf);
// CSV-NEXT: 0,<unknown>,?,"{{.+}}/csetbounds-stats-all.cpp:55:21","Add subobject bounds","array decay for char[n]"
// CSV-NEXT: 0,<unknown>,?,"{{.+}}/csetbounds-stats-all.cpp:[[@LINE-1]]:21","Add subobject bounds","array decay for char[n]"
}

struct Foo global_foo;
Expand Down
1 change: 1 addition & 0 deletions clang/test/CodeGenCXX/cheri/debug-info-return-register.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// REQUIRES: mips-registered-target
// RUN: %cheri_purecap_cc1 %s -emit-obj -o - -fcxx-exceptions -fexceptions -debug-info-kind=standalone \
// RUN: | llvm-dwarfdump -debug-frame - | FileCheck %s -check-prefixes CHECK,DWARF4
// Also try assembling with integrated as and verify that the return and stack registers are correct
Expand Down
17 changes: 0 additions & 17 deletions clang/test/CodeGenCXX/cheri/frame_layout_floating_point.cpp

This file was deleted.

4 changes: 0 additions & 4 deletions clang/test/CodeGenCXX/cheri/frame_layout_hardfloat.cpp

This file was deleted.

1 change: 1 addition & 0 deletions clang/test/Driver/cheri/bounds-mode.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// REQUIRES: mips-registered-target
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't need a registered target?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as below with -mxcaptable

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm this may be slightly annoying to fix properly, so just adding this requires seems fine to me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, this test isn't really a Driver test, as it's using -emit-llvm

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fair, ideally -emit-llvm should be removed. Maybe the flag validation only happens in the backend but it's been a long time since I looked at that code. I wonder if -E also verifies it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could be wrong here. But the tests here invoke clang directly, which invokes the driver too. If we're just testing frontend code I think these tests should be modified to only invoke clang -cc1

// Check that we accept all the values for -cheri-bounds= (CC1 option)

// RUN: %cheri_purecap_cc1 -cheri-bounds=conservative -emit-llvm %s -o /dev/null
Expand Down
1 change: 1 addition & 0 deletions clang/test/Driver/cheri/cheri-cc1as.S
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// REQUIRES: mips-registered-target
veselypeta marked this conversation as resolved.
Show resolved Hide resolved
// Check that the ABI is forwarded to the assembler
// RUN: %plain_clang_cheri_triple_allowed -target cheri-unknown-freebsd -### -c %s -mabi=n64 2>&1 \
// RUN: | FileCheck -check-prefix=CHERI-ABI-N64 %s
Expand Down
1 change: 1 addition & 0 deletions clang/test/Driver/cheri/cheri-fnopic.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// REQUIRES: mips-registered-target
// RUN: %cheri_clang -### -target cheri-unknown-freebsd11 -cheri -mabi=purecap -fno-pic \
// RUN: -c %s 2>&1 | FileCheck --check-prefix=PURECAP_FNOPIC %s
// RUN: %cheri_clang -c -### -target cheri-unknown-freebsd11 -cheri -mabi=purecap -fno-pic \
Expand Down
1 change: 1 addition & 0 deletions clang/test/Driver/cheri/purecap-triple-n64-abi.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// REQUIRES: mips-registered-target
// There was a bug where CheriBSD would invoke hybrid clang with a -purecap triple suffix.
// This should result in an error instead of nonsense output (it broke the debug info by emitting C17 as the return register!)

Expand Down
1 change: 1 addition & 0 deletions clang/test/Preprocessor/cheri-cap-sizes.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// REQUIRES: mips-registered-target
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not be needed for Driver tests. I wonder which line fails?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That shouldn't matter...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah and if that file is not built then the flag is not accepted. Should probably just modify the test to not actually consume the flag but just check the generated command line.

// CHERI triple without any flags should set 128 defines
// RUN: %plain_clang_cheri_triple_allowed -target cheri-unknown-freebsd11 \
// RUN: -mabi=purecap -E -dM -xc /dev/null 2>&1 | FileCheck --check-prefixes=PURECAP,PURECAP-128,CHERI128 %s
Expand Down
1 change: 1 addition & 0 deletions clang/test/Preprocessor/cheri-exceptions-defines.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// REQUIRES: mips-registered-target
// RUN: %clang -fgnuc-version=4.2.1 -x c++ -target cheri -mabi=purecap -fno-rtti -fno-exceptions -E -dM %s | FileCheck -check-prefixes=CHECK-CHERI-SANDBOX-NOEXCEPTIONS %s
// RUN: %clang_cc1 -fgnuc-version=4.2.1 -x c++ -triple cheri -target-abi purecap -fno-rtti -E -dM %s | FileCheck -check-prefix=CHECK-CHERI-SANDBOX-NOEXCEPTIONS %s
// CHECK-CHERI-SANDBOX-NOEXCEPTIONS-NOT: #define OBJC_ZEROCOST_EXCEPTIONS 1
Expand Down
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
Loading