[PATCH V3 08/11] bpf: make target-supports.exp aware of eBPF
Jose E. Marchesi
jose.marchesi@oracle.com
Mon Aug 26 17:33:00 GMT 2019
This patch makes the several effective target checks in
target-supports.exp to be aware of eBPF targets.
gcc/testsuite/ChangeLog:
* lib/target-supports.exp
(check_effective_target_trampolines): Adapt to eBPF.
(check_effective_target_stack_size): Likewise.
(dg-effective-target-value): Likewise.
(check_effective_target_indirect_jumps): Likewise.
(check_effective_target_nonlocal_goto): Likewise.
(check_effective_target_global_constructor): Likewise.
(check_effective_target_return_address): Likewise.
---
gcc/testsuite/ChangeLog | 9 +++++++++
gcc/testsuite/lib/target-supports.exp | 18 +++++++++++-------
2 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index f457a46a02b..ce08a2f8421 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -526,7 +526,8 @@ proc check_effective_target_trampolines { } {
|| [istarget nvptx-*-*]
|| [istarget hppa2.0w-hp-hpux11.23]
|| [istarget hppa64-hp-hpux11.23]
- || [istarget pru-*-*] } {
+ || [istarget pru-*-*]
+ || [istarget bpf-*-*] } {
return 0;
}
return 1
@@ -781,7 +782,7 @@ proc add_options_for_tls { flags } {
# Return 1 if indirect jumps are supported, 0 otherwise.
proc check_effective_target_indirect_jumps {} {
- if { [istarget nvptx-*-*] } {
+ if { [istarget nvptx-*-*] || [istarget bpf-*-*] } {
return 0
}
return 1
@@ -790,7 +791,7 @@ proc check_effective_target_indirect_jumps {} {
# Return 1 if nonlocal goto is supported, 0 otherwise.
proc check_effective_target_nonlocal_goto {} {
- if { [istarget nvptx-*-*] } {
+ if { [istarget nvptx-*-*] || [istarget bpf-*-*] } {
return 0
}
return 1
@@ -799,10 +800,9 @@ proc check_effective_target_nonlocal_goto {} {
# Return 1 if global constructors are supported, 0 otherwise.
proc check_effective_target_global_constructor {} {
- if { [istarget nvptx-*-*] } {
- return 0
- }
- if { [istarget amdgcn-*-*] } {
+ if { [istarget nvptx-*-*]
+ || [istarget amdgcn-*-*]
+ || [istarget bpf-*-*] } {
return 0
}
return 1
@@ -825,6 +825,10 @@ proc check_effective_target_return_address {} {
if { [istarget nvptx-*-*] } {
return 0
}
+ # No notion of return address in eBPF.
+ if { [istarget bpf-*-*] } {
+ return 0
+ }
# It could be supported on amdgcn, but isn't yet.
if { [istarget amdgcn*-*-*] } {
return 0
--
2.11.0
More information about the Gcc-patches
mailing list