diff options
author | marcel <marcel@FreeBSD.org> | 2014-07-07 00:27:09 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2014-07-07 00:27:09 +0000 |
commit | 9f28abd980752efcf77578cd494f1015083c2a2b (patch) | |
tree | 98db2559cee662a9de7212211dd5c69176b58254 /tools/regression | |
parent | 43f783bfcf60b349841acd57895767177114e4ae (diff) | |
download | FreeBSD-src-9f28abd980752efcf77578cd494f1015083c2a2b.zip FreeBSD-src-9f28abd980752efcf77578cd494f1015083c2a2b.tar.gz |
Remove ia64.
This includes:
o All directories named *ia64*
o All files named *ia64*
o All ia64-specific code guarded by __ia64__
o All ia64-specific makefile logic
o Mention of ia64 in comments and documentation
This excludes:
o Everything under contrib/
o Everything under crypto/
o sys/xen/interface
o sys/sys/elf_common.h
Discussed at: BSDcan
Diffstat (limited to 'tools/regression')
-rw-r--r-- | tools/regression/README | 1 | ||||
-rw-r--r-- | tools/regression/filemon/Makefile | 2 | ||||
-rw-r--r-- | tools/regression/ia64/emulated/brl.t | 99 | ||||
-rw-r--r-- | tools/regression/ia64/emulated/test.c | 172 | ||||
-rw-r--r-- | tools/regression/ia64/unaligned/test.c | 204 | ||||
-rw-r--r-- | tools/regression/ia64/unaligned/unaligned.t | 99 |
6 files changed, 1 insertions, 576 deletions
diff --git a/tools/regression/README b/tools/regression/README index 87e4ab3..a2de372 100644 --- a/tools/regression/README +++ b/tools/regression/README @@ -77,7 +77,6 @@ this file. acct Exercise the integer to float conversion used in acct(5) geom Some tests and an out-of-kernel simulator for the GEOM code -ia64 ia64 specific regression tests nfsmmap Some tests to exercise some tricky cases in NFS and mmap p1003_1b Exercise 1003.1B scheduler pipe Pipe code regression test diff --git a/tools/regression/filemon/Makefile b/tools/regression/filemon/Makefile index 6ee88f4..3911d33 100644 --- a/tools/regression/filemon/Makefile +++ b/tools/regression/filemon/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" +.if ${MACHINE_ARCH} == "amd64" BI_BITS= .endif diff --git a/tools/regression/ia64/emulated/brl.t b/tools/regression/ia64/emulated/brl.t deleted file mode 100644 index c47989c..0000000 --- a/tools/regression/ia64/emulated/brl.t +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/env perl -w -# -# Copyright (c) 2006 Marcel Moolenaar -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# $FreeBSD$ - -my $srcdir = `dirname $0`; -chomp $srcdir; - -my @types = ("Call", "Cond"); -my @preds = ("False", "True"); -my %variant_mapping = ( - "Call" => "", - "Cond" => "Backward Forward" -); - -sub run ($$$$) { - local ($nr, $type, $pred, $var) = @_; - local $test = "${type}_${pred}_${var}"; - local $tmpfile = "/tmp/" . $$ . "_$test"; - local $st; - - $st = system("cc -o $tmpfile -DTYPE=$type -DPRED=$pred -DVAR=$var -Wall -O1 -g $srcdir/test.c"); - if ($st != 0) { - print "not ok $nr $test # compiling $test\n"; - } - else { - $st = system($tmpfile); - if ($st == 0) { - print "ok $nr $test\n"; - } - elsif ($st == 256) { - print "not ok $nr $test # invalid combination\n"; - } - elsif ($st == 512) { - print "not ok $nr $test # long branch failure\n"; - } - else { - print "not ok $nr $test # signalled (exit status $st)\n"; - return; # Preserve the executable - } - } - unlink $tmpfile; -} - -# -# We can only test the long brach emulation on the Merced processor. -# Check for that and skip these tests if it's not... -# -$_ = `sysctl -n hw.model`; -if (! /^Merced$/) { - print "1..0 # SKIP This test can only be run on the Merced\n"; - exit 0; -} - -# -# Get the total number of tests we're going to perform. -# -my $count = 0; -foreach $type (@types) { - my @variants = split(/ /, $variant_mapping{$type}); - $count += @preds * @variants; -} - -print "1..$count\n"; - -my $nr=0; -foreach $type (@types) { - my @variants = split(/ /, $variant_mapping{$type}); - foreach $pred (@preds) { - foreach $var (@variants) { - run ++$nr, $type, $pred, $var; - } - } -} - -exit 0; diff --git a/tools/regression/ia64/emulated/test.c b/tools/regression/ia64/emulated/test.c deleted file mode 100644 index 35d4b05..0000000 --- a/tools/regression/ia64/emulated/test.c +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright (c) 2006 Marcel Moolenaar - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $FreeBSD$ - */ - -#include <sys/mman.h> -#include <stdio.h> -#include <string.h> - -/* Supported long branch types */ -#define Call 1 -#define Cond 2 - -/* Supported predicates */ -#define False 1 -#define True 2 - -/* Supported variations */ -#define Backward 1 -#define Forward 2 - -#if TYPE == 0 || PRED == 0 || VAR == 0 -#error Define TYPE, PRED and/or VAR -#endif - -union bundle { - unsigned char bytes[16]; - long double _align; -}; - -/* - * Machine code of a bundle containing a long branch. The predicate of the - * long branch is the result of the compare in the first slot. - * The assembly of the bundle is: - * { .mlx - * cmp.eq p0,p15= <PREDICATE>,r0 - * (p15) brl.few <TARGET> ;; - * } - * the predicate is written to bit 18:1 - * The branch target is written to bits 100:20, 48:39 and 123:1 - */ -unsigned char mc_brl_cond[16] = { - 0x05, 0x00, 0x00, 0x00, 0x0f, 0x39, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, - 0x00, 0x00, 0x00, 0xc0 -}; - -/* - * Machine code of the epilogue of a typical function returning an integer. - * The assembly of the epilogue is: - * { .mib - * nop.m 0 - * addl r8 = <RETVAL>, r0 - * br.ret.sptk.few b0 ;; - * } - * The return value is written to bits 59:7, 73:9, 68:5, and 82:1. - */ -unsigned char mc_epilogue[16] = { - 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x48, 0x80, - 0x00, 0x00, 0x84, 0x00 -}; - -void -mc_patch(union bundle *b, unsigned long val, int start, int len) -{ - unsigned long mask; - int bit, byte, run; - - byte = start >> 3; - bit = start & 7; - while (len) { - run = ((len > (8 - bit)) ? (8 - bit) : len); - mask = (1UL << run) - 1UL; - b->bytes[byte] |= (val & mask) << bit; - val >>= run; - len -= run; - byte++; - bit = 0; - } -} - -void -assemble_brl_cond(union bundle *b, int pred, unsigned long tgt) -{ - unsigned long iprel; - - iprel = tgt - (unsigned long)b; - memcpy(b->bytes, mc_brl_cond, sizeof(mc_brl_cond)); - mc_patch(b, pred ? 1 : 0, 18, 1); - mc_patch(b, iprel >> 4, 100, 20); - mc_patch(b, iprel >> 24, 48, 39); - mc_patch(b, iprel >> 63, 123, 1); -} - -void -assemble_epilogue(union bundle *b, int retval) -{ - memcpy(b->bytes, mc_epilogue, sizeof(mc_epilogue)); - mc_patch(b, retval, 59, 7); - mc_patch(b, retval >> 7, 73, 9); - mc_patch(b, retval >> 16, 68, 5); - mc_patch(b, retval >> 21, 82, 1); -} - -int -doit(void *addr) -{ - asm("mov b6 = %0; br.sptk b6;;" :: "r"(addr)); - return 1; -} - -int -test_cond(int pred, union bundle *src, union bundle *dst) -{ - assemble_epilogue(dst, pred ? 0 : 2); - assemble_brl_cond(src, pred ? 1 : 0, (unsigned long)dst); - assemble_epilogue(src + 1, !pred ? 0 : 2); - return doit(src); -} - -int -main() -{ - static union bundle blob_low[2]; - union bundle *blob_high; - void *addr; - - addr = (void *)0x7FFFFFFF00000000L; - blob_high = mmap(addr, 32, PROT_EXEC | PROT_READ | PROT_WRITE, - MAP_ANON, -1, 0L); - if (blob_high != addr) - printf("NOTICE: blob_high is at %p, not at %p\n", blob_high, - addr); - -#if TYPE == Call - return (test_call(blob_high, blob_low)); -#elif TYPE == Cond - #if VAR == Forward - return (test_cond(PRED - 1, blob_low, blob_high)); - #elif VAR == Backward - return (test_cond(PRED - 1, blob_high, blob_low)); - #else - return (1); - #endif -#else - return (1); -#endif -} diff --git a/tools/regression/ia64/unaligned/test.c b/tools/regression/ia64/unaligned/test.c deleted file mode 100644 index 869c864..0000000 --- a/tools/regression/ia64/unaligned/test.c +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Copyright (c) 2005 Marcel Moolenaar - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $FreeBSD$ - */ - -#include <machine/float.h> -#include <string.h> - -/* Memory accesses. */ -#define Load 0x01 -#define Store 0x02 - -/* Data type. */ -#define Integer 0x11 -#define FloatingPoint 0x12 - -/* Data size. */ -#define Small 0x21 -#define Medium 0x22 -#define Large 0x23 - -/* Post increment. */ -#define NoPostInc 0x31 -#define MinConstPostInc 0x32 -#define PlusConstPostInc 0x33 -#define ScratchRegPostInc 0x34 -#define PreservedRegPostInc 0x35 - -#if ACCESS == 0 || TYPE == 0 || SIZE == 0 || POSTINC == 0 -#error define ACCESS, TYPE, SIZE and/or POSTINC -#endif - -#if TYPE == Integer -# define REG "r8" -# if SIZE == Small -# define DATA_TYPE short -# define DATA_VALUE 0x1234 -# define LD "ld2" -# define ST "st2" -# elif SIZE == Medium -# define DATA_TYPE int -# define DATA_VALUE 0x12345678 -# define LD "ld4" -# define ST "st4" -# elif SIZE == Large -# define DATA_TYPE long -# define DATA_VALUE 0x1234567890ABCDEF -# define LD "ld8" -# define ST "st8" -# endif -#elif TYPE == FloatingPoint -# define REG "f6" -# if SIZE == Small -# define DATA_TYPE float -# define DATA_VALUE FLT_MIN -# define LD "ldfs" -# define ST "stfs" -# elif SIZE == Medium -# define DATA_TYPE double -# define DATA_VALUE DBL_MIN -# define LD "ldfd" -# define ST "stfd" -# elif SIZE == Large -# define DATA_TYPE long double -# define DATA_VALUE LDBL_MIN -# define LD "ldfe" -# define ST "stfe" -# endif -#endif - -struct { - DATA_TYPE aligned; - char _; - char misaligned[sizeof(DATA_TYPE)]; -} data; - -DATA_TYPE *aligned = &data.aligned; -DATA_TYPE *misaligned = (DATA_TYPE *)data.misaligned; -DATA_TYPE value = DATA_VALUE; - -void -block_copy(void *dst, void *src, size_t sz) -{ - - memcpy(dst, src, sz); -} - -int -main() -{ - - /* Set PSR.ac. */ - asm volatile("sum 8"); - -#if ACCESS == Load - /* - * LOAD - */ - block_copy(misaligned, &value, sizeof(DATA_TYPE)); - -# if POSTINC == NoPostInc - /* Misaligned load. */ - *aligned = *misaligned; -# elif POSTINC == MinConstPostInc - asm volatile( - "ld8 r2=%0;;" - LD " " REG "=[r2],%2;;" - "st8 %0=r2;" ST " %1=" REG ";;" - : "=m"(misaligned), "=m"(*aligned) - : "i"(-sizeof(DATA_TYPE)) - : REG, "r2", "memory"); -# elif POSTINC == PlusConstPostInc - asm volatile( - "ld8 r2=%0;;" - LD " " REG "=[r2],%2;;" - "st8 %0=r2;" ST " %1=" REG ";;" - : "=m"(misaligned), "=m"(*aligned) - : "i"(sizeof(DATA_TYPE)) - : REG, "r2", "memory"); -# elif POSTINC == ScratchRegPostInc - asm volatile( - "ld8 r2=%0; mov r3=%2;;" - LD " " REG "=[r2],r3;;" - "st8 %0=r2;" ST " %1=" REG ";;" - : "=m"(misaligned), "=m"(*aligned) - : "i"(sizeof(DATA_TYPE)) - : REG, "r2", "r3", "memory"); -# elif POSTINC == PreservedRegPostInc - asm volatile( - "ld8 r2=%0; mov r4=%2;;" - LD " " REG "=[r2],r4;;" - "st8 %0=r2;" ST " %1=" REG ";;" - : "=m"(misaligned), "=m"(*aligned) - : "i"(sizeof(DATA_TYPE)) - : REG, "r2", "r4", "memory"); -# endif - -#elif ACCESS == Store - /* - * STORE - */ - -# if POSTINC == NoPostInc - /* Misaligned store. */ - *misaligned = value; -# elif POSTINC == MinConstPostInc - asm volatile( - "ld8 r2=%0;" LD " " REG "=%1;;" - ST " [r2]=" REG ",%2;;" - "st8 %0=r2;;" - : "=m"(misaligned) - : "m"(value), "i"(-sizeof(DATA_TYPE)) - : REG, "r2", "memory"); -# elif POSTINC == PlusConstPostInc - asm volatile( - "ld8 r2=%0;" LD " " REG "=%1;;" - ST " [r2]=" REG ",%2;;" - "st8 %0=r2;;" - : "=m"(misaligned) - : "m"(value), "i"(sizeof(DATA_TYPE)) - : REG, "r2", "memory"); -# elif POSTINC == ScratchRegPostInc || POSTINC == PreservedRegPostInc - return (1); -# endif - - block_copy(aligned, data.misaligned, sizeof(DATA_TYPE)); -#endif - - if (*aligned != value) - return (2); - -#if POSTINC == NoPostInc - return (0); -#elif POSTINC == MinConstPostInc - return (((char *)misaligned == data.misaligned - sizeof(DATA_TYPE)) - ? 0 : 4); -#else - return (((char *)misaligned == data.misaligned + sizeof(DATA_TYPE)) - ? 0 : 4); -#endif -} diff --git a/tools/regression/ia64/unaligned/unaligned.t b/tools/regression/ia64/unaligned/unaligned.t deleted file mode 100644 index 5d061bd..0000000 --- a/tools/regression/ia64/unaligned/unaligned.t +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/env perl -w -# -# Copyright (c) 2005 Marcel Moolenaar -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# $FreeBSD$ - -my $srcdir = `dirname $0`; -chomp $srcdir; - -my @accesses = ("Load", "Store"); -my @types = ("Integer", "FloatingPoint"); -my @sizes = ("Small", "Medium", "Large"); -my @postincs = ("NoPostInc", "MinConstPostInc", "PlusConstPostInc", - "ScratchRegPostInc", "PreservedRegPostInc"); - -sub run ($$$$$) { - local ($nr, $access, $type, $size, $postinc) = @_; - local $test = "${access}_${type}_${size}_${postinc}"; - local $tmpfile = "/tmp/" . $$ . "_$test"; - local $st; - - $st = system("cc -o $tmpfile -DACCESS=$access -DTYPE=$type -DSIZE=$size -DPOSTINC=$postinc -Wall -O -g $srcdir/test.c"); - if ($st != 0) { - print "not ok $nr $test # compiling $test\n"; - } - else { - $st = system($tmpfile); - if ($st == 0) { - print "ok $nr $test\n"; - } - elsif ($st == 256) { - print "not ok $nr $test # invalid combination\n"; - } - elsif ($st == 512) { - print "not ok $nr $test # value mismatch\n"; - } - elsif ($st == 1024) { - print "not ok $nr $test # post increment mismatch\n"; - } - else { - print "not ok $nr $test # signalled (exit status $st)\n"; - return; # Preserve the executable - } - } - unlink $tmpfile; -} - -system("sysctl debug.unaligned_test=1"); -if (`sysctl -n debug.unaligned_test` != "1") { - print "1..0 # SKIP The debug.unaligned_test sysctl could not be set\n"; - exit 0; -} - -my $count = @accesses * @types * @sizes * @postincs; - -# There's no register based post inc. for stores. -$count -= 12; - -print "1..$count\n"; - -my $nr=0; -foreach $access (@accesses) { - foreach $postinc (@postincs) { - $_ = "$access $postinc"; - if (! /Store.+RegPostInc/) { - foreach $type (@types) { - foreach $size (@sizes) { - run ++$nr, $access, $type, $size, $postinc; - } - } - } - } -} - -system("sysctl debug.unaligned_test=0"); - -exit 0; |