aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/gcc.target/s390/s390.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/testsuite/gcc.target/s390/s390.exp')
-rw-r--r--gcc-4.8/gcc/testsuite/gcc.target/s390/s390.exp13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/gcc.target/s390/s390.exp b/gcc-4.8/gcc/testsuite/gcc.target/s390/s390.exp
index a4a6609cb..141c0eef2 100644
--- a/gcc-4.8/gcc/testsuite/gcc.target/s390/s390.exp
+++ b/gcc-4.8/gcc/testsuite/gcc.target/s390/s390.exp
@@ -24,6 +24,19 @@ if ![istarget s390*-*-*] then {
# Load support procs.
load_lib gcc-dg.exp
+# Return 1 if htm (etnd - extract nesting depth) instructions are
+# understood by the assembler and can be executed.
+proc check_effective_target_htm { } {
+ if { ![check_runtime s390_check_htm [subst {
+ int main (void)
+ {
+ unsigned int nd;
+ asm ("etnd %0" : "=d" (nd));
+ return nd;
+ }
+ }] "-march=zEC12 -mzarch" ] } { return 0 } else { return 1 }
+}
+
# If a testcase doesn't have special options, use these.
global DEFAULT_CFLAGS
if ![info exists DEFAULT_CFLAGS] then {