-# Copyright 2015-2019 Free Software Foundation, Inc.
+# Copyright 2015-2021 Free Software Foundation, Inc.
#
# Contributed by Intel Corp. <walfred.tedeschi@intel.com>,
# <mircea.gherzan@intel.com>
standard_testfile
+if { ![supports_mpx_check_pointer_bounds] } {
+ return -1
+}
+
+if { ![have_mpx] } {
+ unsupported "processor does not support MPX"
+ return -1
+}
+
set comp_flags "-mmpx -fcheck-pointer-bounds -I${srcdir}/../nat/"
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
return -1
}
-set supports_mpx 0
-set test "probe MPX support"
-
-gdb_test_multiple "print have_mpx()" $test {
- -re ".. = 1\r\n$gdb_prompt $" {
- pass $test
- set supports_mpx 1
- }
- -re ".. = 0\r\n$gdb_prompt $" {
- pass $test
- }
-}
-
-if { !$supports_mpx } {
- unsupported "processor does not support MPX"
- return
-}
-
gdb_breakpoint [ gdb_get_line_number "after-decl" ]
gdb_breakpoint [ gdb_get_line_number "after-alloc" ]
gdb_breakpoint [ gdb_get_line_number "after-assign" ]