unaligned.t (140892) | unaligned.t (140920) |
---|---|
1#!/usr/bin/env perl -w 2# 3# Copyright (c) 2005 Marcel Moolenaar 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26# | 1#!/usr/bin/env perl -w 2# 3# Copyright (c) 2005 Marcel Moolenaar 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26# |
27# $FreeBSD: head/tools/regression/ia64/unaligned/unaligned.t 140892 2005-01-27 06:50:05Z marcel $ | 27# $FreeBSD: head/tools/regression/ia64/unaligned/unaligned.t 140920 2005-01-27 23:15:58Z marcel $ |
28 29my $srcdir = `dirname $0`; 30chomp $srcdir; 31 32my @accesses = ("Load", "Store"); 33my @types = ("Integer", "FloatingPoint"); 34my @sizes = ("Small", "Medium", "Large"); 35my @postincs = ("NoPostInc", "MinConstPostInc", "PlusConstPostInc", --- 10 unchanged lines hidden (view full) --- 46 print "not ok $nr $test # compiling $test\n"; 47 } 48 else { 49 $st = system($tmpfile); 50 if ($st == 0) { 51 print "ok $nr $test\n"; 52 } 53 elsif ($st == 256) { | 28 29my $srcdir = `dirname $0`; 30chomp $srcdir; 31 32my @accesses = ("Load", "Store"); 33my @types = ("Integer", "FloatingPoint"); 34my @sizes = ("Small", "Medium", "Large"); 35my @postincs = ("NoPostInc", "MinConstPostInc", "PlusConstPostInc", --- 10 unchanged lines hidden (view full) --- 46 print "not ok $nr $test # compiling $test\n"; 47 } 48 else { 49 $st = system($tmpfile); 50 if ($st == 0) { 51 print "ok $nr $test\n"; 52 } 53 elsif ($st == 256) { |
54 print "ok $nr $test # SKIP nonexistent combination\n"; | 54 print "not ok $nr $test # invalid combination\n"; |
55 } 56 elsif ($st == 512) { 57 print "not ok $nr $test # value mismatch\n"; 58 } 59 elsif ($st == 1024) { 60 print "not ok $nr $test # post increment mismatch\n"; 61 } 62 else { --- 6 unchanged lines hidden (view full) --- 69 70system("sysctl debug.unaligned_test=1"); 71if (`sysctl -n debug.unaligned_test` != "1") { 72 print "1..0 # SKIP The debug.unaligned_test sysctl could not be set\n"; 73 exit 0; 74} 75 76my $count = @accesses * @types * @sizes * @postincs; | 55 } 56 elsif ($st == 512) { 57 print "not ok $nr $test # value mismatch\n"; 58 } 59 elsif ($st == 1024) { 60 print "not ok $nr $test # post increment mismatch\n"; 61 } 62 else { --- 6 unchanged lines hidden (view full) --- 69 70system("sysctl debug.unaligned_test=1"); 71if (`sysctl -n debug.unaligned_test` != "1") { 72 print "1..0 # SKIP The debug.unaligned_test sysctl could not be set\n"; 73 exit 0; 74} 75 76my $count = @accesses * @types * @sizes * @postincs; |
77 78# There's no register based post inc. for stores. 79$count -= 12; 80 |
|
77print "1..$count\n"; 78 79my $nr=0; 80foreach $access (@accesses) { | 81print "1..$count\n"; 82 83my $nr=0; 84foreach $access (@accesses) { |
81 foreach $type (@types) { 82 foreach $size (@sizes) { 83 foreach $postinc (@postincs) { 84 run ++$nr, $access, $type, $size, $postinc; | 85 foreach $postinc (@postincs) { 86 $_ = "$access $postinc"; 87 if (! /Store.+RegPostInc/) { 88 foreach $type (@types) { 89 foreach $size (@sizes) { 90 run ++$nr, $access, $type, $size, $postinc; 91 } |
85 } 86 } 87 } 88} 89 90system("sysctl debug.unaligned_test=0"); 91 92exit 0; | 92 } 93 } 94 } 95} 96 97system("sysctl debug.unaligned_test=0"); 98 99exit 0; |