URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
Compare Revisions
- This comparison shows the changes necessary to convert path
/or1k/tags/stable_0_2_0_rc1/or1ksim/testbench
- from Rev 1572 to Rev 1765
- ↔ Reverse comparison
Rev 1572 → Rev 1765
/default.cfg
0,0 → 1,154
/* default.cfg -- Simulator testbench default configuration script file |
Copyright (C) 2001, Marko Mlinar, markom@opencores.org |
|
This file is part of OpenRISC 1000 Architectural Simulator. |
|
This program is free software; you can redistribute it and/or modify |
it under the terms of the GNU General Public License as published by |
the Free Software Foundation; either version 2 of the License, or |
(at your option) any later version. |
|
This program is distributed in the hope that it will be useful, |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
GNU General Public License for more details. |
|
You should have received a copy of the GNU General Public License |
along with this program; if not, write to the Free Software |
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ |
|
section memory |
/*random_seed = 12345 |
type = random*/ |
pattern = 0x00 |
type = unknown /* Fastest */ |
|
name = "FLASH" |
ce = 0 |
mc = 0 |
baseaddr = 0xf0000000 |
size = 0x00200000 |
delayr = 10 |
delayw = -1 |
end |
|
section memory |
/*random_seed = 12345 |
type = random*/ |
pattern = 0x00 |
type = unknown /* Fastest */ |
|
name = "RAM" |
ce = 1 |
mc = 0 |
baseaddr = 0x00000000 |
size = 0x00200000 |
delayr = 2 |
delayw = 4 |
end |
|
section immu |
enabled = 1 |
nsets = 64 |
nways = 1 |
ustates = 2 |
pagesize = 8192 |
end |
|
section dmmu |
enabled = 1 |
nsets = 64 |
nways = 1 |
ustates = 2 |
pagesize = 8192 |
end |
|
section ic |
enabled = 1 |
nsets = 256 |
nways = 1 |
ustates = 2 |
blocksize = 16 |
end |
|
section dc |
enabled = 1 |
nsets = 256 |
nways = 1 |
ustates = 2 |
blocksize = 16 |
end |
|
section cpu |
ver = 0x1200 |
rev = 0x0001 |
/* upr = */ |
superscalar = 0 |
hazards = 0 |
dependstats = 0 |
end |
|
section bpb |
enabled = 0 |
btic = 0 |
end |
|
section debug |
/*enabled = 0 |
gdb_enabled = 0*/ |
server_port = 9999 |
end |
|
section sim |
debug = 0 |
profile = 0 |
prof_fn = "sim.profile" |
|
exe_log = 0 |
exe_log_type = software |
exe_log_fn = "executed.log" |
end |
|
section mc |
enabled = 1 |
baseaddr = 0x93000000 |
POC = 0x00000008 /* Power on configuration register */ |
index = 0 |
end |
|
section dma |
baseaddr = 0xB8000000 |
irq = 4 |
end |
|
section ethernet |
baseaddr = 0x92000000 |
dma = 0 |
irq = 4 |
rtx_type = 0 |
tx_channel = 0 |
rx_channel = 1 |
rxfile = "eth0.tx" |
txfile = "eth0.tx" |
sockif = "eth0" |
end |
|
section VAPI |
enabled = 0 |
server_port = 9998 |
end |
|
section fb |
enabled = 1 |
baseaddr = 0x97000000 |
refresh_rate = 10000 |
filename = "primary" |
end |
|
section kbd |
enabled = 1 |
irq = 5 |
baseaddr = 0x94000000 |
rxfile = "./kbdtest.rx" |
end |
|
default.cfg
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: acv_gpio.cfg
===================================================================
--- acv_gpio.cfg (nonexistent)
+++ acv_gpio.cfg (revision 1765)
@@ -0,0 +1,63 @@
+section memory
+ /*random_seed = 12345
+ type = random*/
+ pattern = 0x00
+ type = unknown /* Fastest */
+
+ name = "RAM"
+ ce = 1
+ baseaddr = 0x00000000
+ size = 0x00200000
+ delayr = 1
+ delayw = 1
+end
+
+section memory
+ /*random_seed = 12345
+ type = random*/
+ pattern = 0x00
+ type = unknown /* Fastest */
+
+ name = "FLASH"
+ ce = 0
+ baseaddr = 0xf0000000
+ size = 0x00200000
+ delayr = 1
+ delayw = -1
+end
+
+section mc
+ enabled = 1
+ baseaddr = 0x93000000
+ POC = 0x00000008 /* Power on configuration register */
+end
+
+section cpu
+ ver = 0x1200
+ rev = 0x0001
+ /* upr = */
+ superscalar = 0
+ hazards = 0
+ dependstats = 0
+end
+
+section sim
+ debug = 3
+ verbose = 1
+ exe_log = 1
+ exe_log_fn = "executed.log"
+end
+
+section gpio
+ baseaddr = 0xB0000000
+ irq = 23
+ base_vapi_id = 0x0200 /* GPIO uses 8 VAPI IDs */
+end
+
+section VAPI
+ enabled = 1
+ log_enabled = 1
+ hide_device_id = 1
+ vapi_log_fn = "vapi.log"
+ server_port = 9100
+end
Index: tick.c
===================================================================
--- tick.c (nonexistent)
+++ tick.c (revision 1765)
@@ -0,0 +1,279 @@
+/* tick.c -- Tests all aspects of the tick timer
+ Copyright (C) 2005 György `nog' Jeney, nog@sdf.lonestar.org
+
+This file is part of OpenRISC 1000 Architectural Simulator.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#include "spr_defs.h"
+#include "support.h"
+
+#define ASSERT(x) ((x)? printf(" Test succeeded %s:%i\n", __FILE__, __LINE__) : fail (__FILE__, __LINE__))
+
+void fail (char *func, int line)
+{
+#ifndef __FUNCTION__
+#define __FUNCTION__ "?"
+#endif
+ printf ("Test failed in %s:%i\n", func, line);
+ report(0xeeeeeeee);
+ exit (1);
+}
+
+static volatile int tick_cnt = 0;
+static int clear_ip = 1;
+
+void tick_int(void)
+{
+ int ttcr = mfspr(SPR_TTCR);
+ int ttmr = mfspr(SPR_TTMR);
+
+ /* Make sure that the tick timer interrupt pending bit is set */
+ ASSERT(mfspr(SPR_TTMR) & SPR_TTMR_IP);
+
+ tick_cnt++;
+
+ /* Clear interrupt (Write a 0 to SPR_TTMR_IP) */
+ /* If we programmed a one-shot timer, make sure to disable the interrupts,
+ * else we'd get a spurious interrupt */
+ if((ttmr & SPR_TTMR_M) != 0x80000000)
+ mtspr(SPR_TTMR, mfspr(SPR_TTMR) & ~SPR_TTMR_IP);
+ else
+ mtspr(SPR_TTMR, mfspr(SPR_TTMR) & ~(SPR_TTMR_IP | SPR_TTMR_IE));
+}
+
+void tick_int_spurious(void)
+{
+ /* Make sure that the tick timer interrupt pending bit is set */
+ ASSERT(mfspr(SPR_TTMR) & SPR_TTMR_IP);
+
+ /* Clear interrupt (Write a 0 to SPR_TTMR_IP) */
+ if(clear_ip)
+ mtspr(SPR_TTMR, mfspr(SPR_TTMR) & ~SPR_TTMR_IP);
+
+ /* Make sure we actually get a spurious interrupt */
+ if(++tick_cnt == 5)
+ /* We should get spurious tick interrupts so disable it */
+ mtspr(SPR_TTMR, 0);
+}
+
+/* Does nothing for a small amount of time (waiting for TTCR to increment) */
+void waste_time(void)
+{
+ int i;
+ volatile int x;
+
+ for(i = 0; i < 50; i++)
+ x = i;
+}
+
+/* Waits for a tick timer exception */
+void wait_match(void)
+{
+ while(!tick_cnt);
+ tick_cnt = 0;
+}
+
+int main()
+{
+ int ttcr;
+
+ excpt_tick = (unsigned long)tick_int;
+
+ /* Enable tick interrupt */
+ mtspr(SPR_SR, mfspr(SPR_SR) | SPR_SR_TEE);
+
+ /* Disable timer */
+ mtspr(SPR_TTMR, 0);
+
+ mtspr(SPR_TTCR, 0);
+
+ /* Waste some time to check if the timer is really disabled */
+ waste_time();
+
+ /* Timer is disabled and shouldn't count, TTCR should still be 0 */
+ ASSERT(mfspr(SPR_TTCR) == 0);
+
+ /* Start timer in continous timeing mode. Enable timer interrupt and set the
+ * value to match */
+ mtspr(SPR_TTMR, (3 << 30) | SPR_TTMR_IE | 0x100);
+
+ /* Wait for the timer to count up to the match value */
+ wait_match();
+
+ ttcr = mfspr(SPR_TTCR);
+
+ waste_time();
+
+ /* The timer should have kept counting and our saved ttcr should not be the
+ * same as SPR_TTCR */
+ ASSERT(ttcr < mfspr(SPR_TTCR));
+
+ mtspr(SPR_TTMR, 0);
+ ttcr = mfspr(SPR_TTCR);
+ /* Restart the timer */
+ mtspr(SPR_TTMR, (3 << 30));
+ waste_time();
+ /* The timer should have carried on from what was SPR_TTCR when we started it.
+ */
+ ASSERT(ttcr < mfspr(SPR_TTCR));
+
+ mtspr(SPR_TTMR, 0);
+ ttcr = mfspr(SPR_TTCR);
+ waste_time();
+ /* Timer should be disabled and should not have counted */
+ ASSERT(ttcr == mfspr(SPR_TTCR));
+
+ /* Stop the timer when a match occured */
+ mtspr(SPR_TTCR, 0);
+ mtspr(SPR_TTMR, (2 << 30) | SPR_TTMR_IE | 0x100);
+
+ wait_match();
+ ttcr = mfspr(SPR_TTCR);
+ waste_time();
+ /* The timer should have stoped and thus SPR_TTCR sould = ttcr */
+ ASSERT(ttcr == mfspr(SPR_TTCR));
+
+ /* The counter should still indicate one-shot mode */
+ ASSERT((mfspr(SPR_TTMR) >> 30) == 2);
+
+ /* Set auto-restarting timer */
+ mtspr(SPR_TTMR, 0);
+ mtspr(SPR_TTCR, 0);
+ mtspr(SPR_TTMR, (1 << 30) | SPR_TTMR_IE | 0x1000);
+ wait_match();
+ ttcr = mfspr(SPR_TTCR);
+ wait_match();
+
+ /* Disable timer */
+ mtspr(SPR_TTMR, 0);
+
+ /* Start a one-shot counter but keep interrupts disabled */
+ mtspr(SPR_TTCR, 0);
+ mtspr(SPR_TTMR, (2 << 30) | 0x100);
+
+ /* Wait for the counter to stop */
+ while(mfspr(SPR_TTCR) != 0x100);
+ /* Make sure the counter has actually stopped */
+ waste_time();
+ ASSERT(mfspr(SPR_TTCR) == 0x100);
+ ASSERT(tick_cnt == 0);
+
+ /* SPR_TTMR_IP should not be set */
+ ASSERT(!(mfspr(SPR_TTMR) & SPR_TTMR_IP));
+
+ /* Start a perpetual counter (makeing sure that no interrupts occur while it's
+ * counting) */
+ mtspr(SPR_TTMR, 0);
+ mtspr(SPR_TTCR, 0);
+ mtspr(SPR_TTMR, (3 << 30) | 0x100);
+ while(mfspr(SPR_TTCR) < 0x100);
+ waste_time();
+ ASSERT(mfspr(SPR_TTCR) > 0x100);
+ ASSERT(tick_cnt == 0);
+ ASSERT(!(mfspr(SPR_TTMR) & SPR_TTMR_IP));
+
+ /* Disable the timer interrupt */
+ mtspr(SPR_SR, mfspr(SPR_SR) & ~SPR_SR_TEE);
+
+ /* Set one-shot timer */
+ mtspr(SPR_TTCR, 0);
+ mtspr(SPR_TTMR, (2 << 30) | SPR_TTMR_IE | 0x100);
+ while(!(mfspr(SPR_TTMR) & SPR_TTMR_IP));
+ /* Give some time for a potential interrupt to occur */
+ waste_time();
+ /* No interrupt should have occured */
+ ASSERT(tick_cnt == 0);
+
+ /* Enable tick interrupt */
+ mtspr(SPR_SR, mfspr(SPR_SR) | SPR_SR_TEE);
+
+ /* Test Setting TTCR while counting */
+ mtspr(SPR_TTMR, 0);
+ mtspr(SPR_TTCR, 0);
+ mtspr(SPR_TTMR, (3 << 30) | 0x3000);
+ while(mfspr(SPR_TTCR) < 0x30000);
+ waste_time();
+ mtspr(SPR_TTCR, 0x50);
+ waste_time();
+ ttcr = mfspr(SPR_TTCR);
+ ASSERT(ttcr > 0x50 && ttcr < 0x30000);
+ mtspr(SPR_TTMR, 0);
+
+ /* Set ttcr to a high value */
+ mtspr(SPR_TTCR, 0x20000);
+ /* Now, start timer in one-shot mode */
+ mtspr(SPR_TTMR, (2 << 30) | SPR_TTMR_IE | 0x100);
+
+ /* The counter should start counting from 0x20000 and wrap around to 0x100
+ * causeing an interrupt */
+ waste_time();
+ ASSERT(mfspr(SPR_TTCR) > 0x20000);
+ wait_match();
+
+ ASSERT(1);
+
+ /* If TTCR is greater than TTMR_PERIOD then the interrupt gets delivered after
+ * TTCR wraps around to 0 and counts to SPR_TTMR_PERIOD */
+ mtspr(SPR_TTMR, 0);
+ mtspr(SPR_TTCR, 0xffffc00);
+ mtspr(SPR_TTMR, (1 << 30) | SPR_TTMR_IE | 0x10000);
+ wait_match();
+
+ ASSERT(1);
+
+ /* test continuous mode */
+ mtspr(SPR_TTMR, 0);
+ mtspr(SPR_TTCR, 0xffffc00);
+ mtspr(SPR_TTMR, (3 << 30) | SPR_TTMR_IE | 0x10000);
+ wait_match();
+ mtspr(SPR_TTMR, 0);
+
+ ASSERT(1);
+
+ excpt_tick = (unsigned long)tick_int_spurious;
+
+ /* Make sure sure that TTMR_PERIOD is not 0!! */
+ mtspr(SPR_TTMR, 1);
+ /* Set SPR_TTMR_PERIOD to some value, while keeping the timer disabled */
+ mtspr(SPR_TTCR, 0);
+ mtspr(SPR_TTMR, SPR_TTMR_IE | 0x100);
+
+ /* Set SPR_TTCR with the same value */
+ mtspr(SPR_TTCR, 0x100);
+
+ while(tick_cnt != 5);
+ tick_cnt = 0;
+ ASSERT(mfspr(SPR_TTCR) == 0x100);
+
+ /* Test setting TTCR first then TTMR */
+ mtspr(SPR_TTCR, 0x101);
+ mtspr(SPR_TTMR, SPR_TTMR_IE | 0x101);
+
+ while(tick_cnt != 5);
+ tick_cnt = 0;
+ ASSERT(mfspr(SPR_TTCR) == 0x101);
+
+ /* Set countinous counter, but make sure we never clear the TTMR_IP bit */
+ clear_ip = 0;
+ mtspr(SPR_TTCR, 0);
+ mtspr(SPR_TTMR, (3 << 30) | SPR_TTMR_IE | 0x100);
+
+ while(tick_cnt != 5);
+
+ report(0xdeaddead);
+ return 0;
+}
+
Index: test
===================================================================
--- test (nonexistent)
+++ test (revision 1765)
@@ -0,0 +1,75 @@
+#! /bin/sh
+#
+# Usage:
+# test simulator_binary file_to_test
+echo -n "Testing $2... "
+
+# clean . and / characters
+fn=`echo $2 | sed 's/[\/\.]//g'`
+default_cfg_fn="default.cfg"
+pre_sh_file="$2.pre.sh"
+post_sh_file="$2.post.sh"
+temp1="/tmp/${fn}_output_ok"
+temp2="/tmp/${fn}_output"
+temp3="/tmp/${fn}_output_tail"
+temp4="/tmp/${fn}_error"
+
+# run pre-execution script file
+test -f $pre_sh_file
+if test $? -eq 0; then
+ echo -n "(pre-exec $pre_sh_file) "
+ source $pre_sh_file
+fi
+
+# prepare simulator parameters
+sim_param=
+cfg_file="$2.cfg"
+test -f $cfg_file
+if test $? -eq 0; then
+ echo -n "(using $cfg_file) "
+ # load .cfg file
+ sim_param="-f $cfg_file";
+else
+ sim_param="-f $default_cfg_fn";
+fi
+
+#if simulator not specified, no flags needed
+if test -z $1; then
+ sim_param=;
+fi
+
+# Last two lines should look like:
+echo "report(0xdeaddead);" >$temp1
+echo "exit(0)" >>$temp1
+
+# run the simulator
+$1 $2 $sim_param 2>$temp4 >$temp2
+simerr=$?
+if test $simerr -eq 0; then
+ tail $temp2 -n 2 >$temp3
+ if cmp -s $temp1 $temp3; then
+ echo "OK";
+ rm $temp2
+ rm $temp4
+ else
+ simerr=$?
+ echo -e "FAILED\nSee: '$temp2' and '$temp4'";
+ fi;
+else
+ echo "Cannot run: '$1 $2 $sim_param 2>$temp4 >$temp2'"
+ cat $temp4;
+fi
+
+# run post-execution script file
+test -f $post_sh_file
+if test $? -eq 0; then
+ echo "(post-exec $post_sh_file)"
+ source $post_sh_file
+fi
+
+# cleanup
+rm $temp1
+rm $temp3
+
+# exit the test
+exit $simerr
test
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: config.sub
===================================================================
--- config.sub (nonexistent)
+++ config.sub (revision 1765)
@@ -0,0 +1,1579 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+timestamp='2005-07-08'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to . Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to ."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
+ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray)
+ os=
+ basic_machine=$1
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64vr | mips64vrel \
+ | mips64orion | mips64orionel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | ms1 \
+ | msp430 \
+ | ns16k | ns32k \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b \
+ | strongarm \
+ | tahoe | thumb | tic4x | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | z8k)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m32c)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | ms1-* \
+ | msp430-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa-* \
+ | ymp-* \
+ | z8k-*)
+ ;;
+ m32c-*)
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16c)
+ basic_machine=cr16c-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
config.sub
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: acv_uart.c
===================================================================
--- acv_uart.c (nonexistent)
+++ acv_uart.c (revision 1765)
@@ -0,0 +1,828 @@
+/* UART test using ACV */
+
+#include "spr_defs.h"
+#include "support.h"
+
+/* use this macro to comment out nonworking parts */
+#define COMPLETE 0
+
+/* Whether to do test in more detail */
+#define DETAILED 0
+
+#define UART_ADDR (0x9c000000)
+#define UART_RBR (UART_ADDR + 0)
+#define UART_THR (UART_ADDR + 0)
+#define UART_IER (UART_ADDR + 1)
+#define UART_IIR (UART_ADDR + 2)
+#define UART_FCR (UART_ADDR + 2)
+#define UART_LCR (UART_ADDR + 3)
+#define UART_MCR (UART_ADDR + 4)
+#define UART_LSR (UART_ADDR + 5)
+#define UART_MSR (UART_ADDR + 6)
+#define UART_SCR (UART_ADDR + 7)
+
+#define UART_DLL (UART_ADDR + 0)
+#define UART_DLH (UART_ADDR + 1)
+
+#define LCR_DIVL (0x80)
+#define LCR_BREAK (0x40)
+#define LCR_STICK (0x20)
+#define LCR_EVENP (0x10)
+#define LCR_PAREN (0x08)
+#define LCR_NSTOP (0x04)
+#define LCR_NBITS (0x03)
+
+#define LSR_DR (0x01)
+#define LSR_OE (0x02)
+#define LSR_PE (0x04)
+#define LSR_FE (0x08)
+#define LSR_BREAK (0x10)
+#define LSR_TXFE (0x20)
+#define LSR_TXE (0x40)
+#define LSR_ERR (0x80)
+
+#define UART_INT_LINE 19 /* To which interrupt is uart connected */
+
+/* fails if x is false */
+#define ASSERT(x) ((x)?1: fail (__FUNCTION__, __LINE__))
+/* Waits a few cycles that uart can prepare its data */
+#define WAIT() {asm ("l.nop");asm ("l.nop");asm ("l.nop");asm ("l.nop");}
+/* fails if there is an error */
+#define NO_ERROR() { unsigned x = getreg (UART_LSR); if ((x & (LSR_BREAK|LSR_FE|LSR_PE|LSR_OE)) && !(x & LSR_ERR)) \
+printf ("LSR7 (0x%02x) ERR @ %i\n", x, __LINE__); ASSERT(!(x & LSR_ERR) && ((x & 0x60) != 0x40));}
+#define MARK() printf ("Passed line %i\n", __LINE__)
+
+#ifndef __LINE__
+#define __LINE__ 0
+#endif
+
+void fail (char *func, int line)
+{
+#ifndef __FUNCTION__
+#define __FUNCTION__ "?"
+#endif
+ printf ("Test failed in %s:%i\n", func, line);
+ report(0xeeeeeeee);
+ exit (1);
+}
+
+inline void setreg (unsigned long addr, unsigned char value)
+{
+ *((volatile unsigned char *)addr) = value;
+}
+
+inline unsigned long getreg (unsigned long addr)
+{
+ return *((volatile unsigned char *)addr);
+}
+
+static volatile int int_cnt;
+static volatile unsigned int_iir;
+static volatile unsigned int_lsr;
+static int int_rbr;
+
+void interrupt_handler ()
+{
+ unsigned x;
+ printf ("Int\n");
+ report(0xdeaddead);
+ report(int_iir = getreg (UART_IIR));
+ report(int_lsr = getreg (UART_LSR));
+ int_cnt++;
+ ASSERT (int_iir != 1);
+ switch (int_iir & 0xf) {
+ case 0x6: printf ("Receiver LS int.\n"); break;
+ case 0x4: printf ("Received Data available. Expecting %02x, received %02x\n",
+ int_rbr, x = getreg(UART_RBR));
+ ASSERT (x == int_rbr);
+ report (x);
+ report (int_rbr);
+ break;
+ case 0xc: printf ("Character timeout. Expecting %02x, received %02x\n",
+ int_rbr, x = getreg(UART_RBR));
+ ASSERT (x == int_rbr);
+ report (x);
+ report (int_rbr);
+ break;
+ case 0x2: printf ("THR empty.\n"); break;
+ case 0x0: printf ("Modem Status.\n"); break;
+ default:
+ printf ("Invalid iir %x @ %i\n", int_iir, __LINE__);
+ exit (1);
+ }
+ mtspr(SPR_PICSR, 0);
+}
+
+/* Receives a char and checks for errors */
+
+void recv_char (int ch)
+{
+ unsigned x;
+ char r;
+ report (ch);
+ /* Wait for rx fifo to be */
+ while (!((x = getreg (UART_LSR)) & LSR_DR));
+ if ((x & (LSR_BREAK|LSR_FE|LSR_PE|LSR_OE)) && !(x & LSR_ERR)) printf ("LSR7 (0x%02x) ERR @ recv_char\n", x);
+ ASSERT(!(x & LSR_ERR));
+
+ printf ("expected %02x, read %02x\n", ch, r = getreg (UART_RBR));
+ ASSERT (r == ch); /* compare character */
+}
+
+/* Sends a char and checks for errors */
+
+void send_char_no_wait (int ch)
+{
+ report (ch);
+ setreg (UART_THR, ch); /* send character */
+}
+
+void send_char (int ch)
+{
+ report (ch);
+ while (!(getreg (UART_LSR) & LSR_TXFE));
+ NO_ERROR();
+ setreg (UART_THR, ch); /* send character */
+ NO_ERROR();
+}
+
+void init_8n1 ()
+{
+ setreg (UART_IER, 0x00); /* disable interrupts */
+ WAIT();
+ ASSERT(getreg (UART_IIR) == 0xc1); /* nothing should be happening */
+ setreg (UART_FCR, 0x07); /* clear RX and TX FIFOs */
+ setreg (UART_LCR, LCR_DIVL);
+ setreg (UART_DLH, 2 >> 8);
+ setreg (UART_DLL, 2 & 0xff);
+ setreg (UART_LCR, 0x03); /* 8N1 @ 2 */
+ ASSERT(getreg (UART_LCR) == 0x03);
+ ASSERT (!(getreg (UART_LSR) & 0x1f));
+}
+
+/* Test reset values and r/w properties of some registers */
+
+void register_test ()
+{
+ printf ("register test\n");
+ MARK();
+ { /* test reset values */
+ ASSERT(getreg (UART_RBR) == 0x00); //0
+ ASSERT(getreg (UART_IER) == 0x00); //1
+ ASSERT(getreg (UART_IIR) == 0xc1); //2
+ ASSERT(getreg (UART_LCR) == 0x03); //3
+ ASSERT(getreg (UART_MCR) == 0x00); //4
+ ASSERT(getreg (UART_LSR) == 0x60); //5
+ ASSERT(getreg (UART_MSR) == 0x00); //6
+ ASSERT(getreg (UART_SCR) == 0x00); //7
+
+ setreg(UART_LCR, LCR_DIVL); //enable latches
+ ASSERT(getreg (UART_DLL) == 0x00); //0
+ ASSERT(getreg (UART_DLH) == 0x00); //1
+ setreg(UART_LCR, 0x00); //disable latches
+ }
+ setreg(UART_LCR, 0x00); //disable latches igor
+ setreg(UART_LCR, 0x00); //disable latches
+ setreg(UART_LCR, 0x00); //disable latches
+ setreg(UART_LCR, 0x00); //disable latches
+ setreg(UART_LCR, 0x00); //disable latches
+
+ MARK();
+ { /* test if status registers are read only */
+ unsigned long tmp;
+ int i;
+ tmp = getreg (UART_LSR);
+ setreg (UART_LSR, ~tmp);
+ ASSERT(getreg (UART_LSR) == tmp);
+
+ for (i = 0; i < 9; i++) {
+ setreg (UART_LSR, 1 << i);
+ ASSERT(getreg (UART_LSR) == tmp);
+ }
+
+ tmp = getreg (UART_MSR);
+ setreg (UART_MSR, ~tmp);
+ ASSERT(getreg (UART_MSR) == tmp);
+
+ for (i = 0; i < 9; i++) {
+ setreg (UART_MSR, 1 << i);
+ ASSERT(getreg (UART_MSR) == tmp);
+ }
+ }
+
+ MARK();
+ { /* test whether MCR is write only, be careful not to set the loopback bit */
+ ASSERT(getreg (UART_MCR) == 0x00);
+ setreg (UART_MCR, 0x45);
+ ASSERT(getreg (UART_MCR) == 0x00);
+ setreg (UART_MCR, 0xaa);
+ ASSERT(getreg (UART_MCR) == 0x00);
+ }
+ ASSERT (!(getreg (UART_LSR) & 0x1f));
+ MARK();
+ { /* Test if Divisor latch byte holds the data */
+ int i;
+ setreg(UART_LCR, LCR_DIVL); //enable latches
+ ASSERT(getreg (UART_LCR) == LCR_DIVL);
+ for (i = 0; i < 16; i++) {
+ unsigned short tmp = 0xdead << i;
+ setreg (UART_DLH, tmp >> 8);
+ setreg (UART_DLL, tmp & 0xff);
+ ASSERT(getreg (UART_DLL) == (tmp & 0xff)); //0
+ ASSERT(getreg (UART_DLH) == (tmp >> 8)); //1
+ }
+ setreg (UART_DLH, 0xa1); //igor
+ setreg (UART_DLH, 0xa1); //igor
+ setreg (UART_DLH, 0xa1); //igor
+ setreg (UART_DLH, 0xa1); //igor
+ setreg (UART_DLH, 0xa1); //igor
+
+ ASSERT (!(getreg (UART_LSR) & 0x1f));
+ for (i = 0; i < 16; i++) {
+ unsigned short tmp = 0xdead << i;
+ setreg (UART_DLL, tmp >> 8);
+ setreg (UART_DLH, tmp & 0xff);
+ ASSERT(getreg (UART_DLL) == (tmp >> 8)); //1
+ ASSERT(getreg (UART_DLH) == (tmp & 0xff)); //0
+ }
+ setreg (UART_DLH, 0xa2); //igor
+ setreg (UART_DLH, 0xa2); //igor
+ setreg (UART_DLH, 0xa2); //igor
+ setreg (UART_DLH, 0xa2); //igor
+ setreg (UART_DLH, 0xa2); //igor
+
+ setreg(UART_LCR, 0x00); //disable latches
+ ASSERT(getreg (UART_LCR) == 0x00);
+ ASSERT (!(getreg (UART_LSR) & 0x1f));
+ }
+ MARK();
+ { /* Test LCR, if it holds our data */
+ int i;
+ for (i = 0; i < 6; i++) {
+ unsigned short tmp = (0xde << i) & 0x3f;
+ setreg (UART_LCR, tmp);
+ ASSERT(getreg (UART_LCR) == tmp);
+ }
+ ASSERT (!(getreg (UART_LSR) & 0x1f));
+ }
+ setreg (UART_LCR, 0xa3); //igor
+ setreg (UART_LCR, 0xa3); //igor
+ setreg (UART_LCR, 0xa3); //igor
+ setreg (UART_LCR, 0xa3); //igor
+ setreg (UART_LCR, 0xa3); //igor
+
+ MARK ();
+
+ { /* SCR Test :))) */
+ int i;
+ setreg (UART_SCR, 0);
+ ASSERT (getreg (UART_SCR) == 0);
+ setreg (UART_SCR, 0xff);
+ ASSERT (getreg (UART_SCR) == 0xff);
+ for (i = 0; i < 16; i++) {
+ unsigned char tmp = 0xdead << i;
+ setreg (UART_SCR, tmp);
+ ASSERT (getreg (UART_SCR) == tmp);
+ }
+ }
+ setreg (UART_SCR, 0xa5);//igor
+ setreg (UART_SCR, 0xa5);//igor
+ setreg (UART_SCR, 0xa5);//igor
+ setreg (UART_SCR, 0xa5);//igor
+ setreg (UART_SCR, 0xa5);//igor
+
+ MARK();
+ /* Other registers will be tested later, if they function correctly,
+ since we cannot test them now, without destroying anything. */
+}
+
+/* Initializes uart and sends a few bytes to VAPI. It is then activated and send something back. */
+
+void send_recv_test ()
+{
+ char *s;
+ printf ("send_recv_test\n");
+ /* Init */
+ MARK();
+
+ //printf ("basic\n");
+ ASSERT (!(getreg (UART_LSR) & LSR_DR));
+ MARK();
+
+ /* Send a string */
+ s = "send_";
+ while (*s) {
+ /* Wait for tx fifo to be empty */
+ send_char (*s);
+ report((unsigned long)*s);
+ s++;
+ }
+ ASSERT (!(getreg (UART_LSR) & LSR_DR));
+ s = "test_";
+ while (*s) {
+ /* Wait for tx fifo and tx to be empty */
+ while (!(getreg (UART_LSR) & LSR_TXE));
+ NO_ERROR();
+ setreg (UART_THR, *s); /* send character */
+ NO_ERROR();
+ s++;
+ }
+ ASSERT (!(getreg (UART_LSR) & LSR_DR));
+ MARK();
+
+ /* Send characters with delay inbetween */
+ s = "is_running";
+ while (*s) {
+ int i;
+ send_char (*s);
+// igor for (i = 0; i < 1600; i++) /* wait at least ten chars before sending next one */
+ for (i = 0; i < 16; i++) /* wait at few chars before sending next one */
+ asm volatile ("l.nop");
+ s++;
+ }
+
+ send_char (0); /* send terminate char */
+ MARK();
+
+ /* Receives and compares the string */
+ s = "recv";
+ while (*s) recv_char (*s++);
+ MARK();
+ printf ("OK\n");
+}
+
+/* sends break in both directions */
+
+void break_test ()
+{
+ unsigned x;
+ char *s;
+ printf ("break_test\n");
+
+ MARK();
+ /* Send a break */
+ NO_ERROR();
+ MARK();
+ setreg (UART_LCR, 0x03 | LCR_BREAK); /* 8N1 */
+ MARK();
+ send_char ('b'); /* make sure it is recognised as a break */
+ MARK();
+ recv_char ('*');
+ setreg (UART_LCR, 0x03); /* deleting break bit, 8N1 */
+ MARK();
+
+ /* Receive a break */
+ send_char ('!');
+ MARK();
+ while (!((x = getreg (UART_LSR)) & LSR_DR));
+ /* we should receive zero character with broken frame and break bit should be set */
+ printf("[%x]\n", (LSR_DR | LSR_BREAK | LSR_ERR | LSR_TXFE | LSR_TXE));
+ ASSERT (x == (LSR_DR | LSR_BREAK | LSR_ERR | LSR_TXFE | LSR_TXE));
+ ASSERT (getreg (UART_RBR) == 0);
+ MARK();
+
+ /* Send a # to release break */
+ setreg (UART_THR, '#');
+ while (!(getreg (UART_LSR) & LSR_DR));
+ NO_ERROR(); /* BREAK bit should be cleared now */
+ ASSERT (getreg (UART_RBR) == '$');
+ MARK();
+
+ /* Break while sending characters */
+ s = "ns";
+ while (*s) send_char (*s++);
+ ASSERT (!(getreg (UART_LSR) & LSR_DR));
+ while (!(getreg (UART_LSR) & LSR_TXE)); /* Wait till we send everything */
+ /* this should break the * char, so it should not be received */
+ setreg (UART_THR, '*');
+ setreg (UART_LCR, 0x3 | LCR_BREAK);
+ MARK();
+
+ /* Drop the break, when we get acknowledge */
+ recv_char ('?');
+ setreg (UART_LCR, 0x3);
+ NO_ERROR();
+ MARK();
+
+ /* Receive a break */
+ send_char ('#');
+ while (!((x = getreg (UART_LSR)) & LSR_DR));
+ /* we should receive zero character with broken frame and break bit
+ should not be set, because we cleared it */
+ printf("[%x:%x]\n", x, (LSR_DR | LSR_BREAK |LSR_ERR | LSR_TXFE | LSR_TXE));
+ ASSERT (x == (LSR_DR | LSR_BREAK |LSR_ERR | LSR_TXFE | LSR_TXE));
+ ASSERT (getreg (UART_RBR) == 0);
+ MARK();
+ send_char ('?');
+ MARK();
+ while (!(getreg (UART_LSR) & LSR_DR));
+ recv_char ('!');
+ printf ("OK\n");
+}
+
+/* Tries to send data in different modes in both directions */
+
+/* Utility function, that tests current configuration */
+void test_mode (int nbits)
+{
+ unsigned mask = (1 << nbits) - 1;
+ send_char (0x55);
+#if DETAILED
+ send_char (0x55);
+ recv_char (0x55 & mask);
+#endif
+ recv_char (0x55 & mask);
+ send_char ('a'); // 0x61
+#if DETAILED
+ send_char ('a'); // 0x61
+ recv_char ('a' & mask);
+#endif
+ recv_char ('a' & mask);
+}
+
+void different_modes_test ()
+{
+ int speed, parity, length;
+ printf ("different modes test\n");
+ init_8n1();
+
+ /* Init */
+ MARK();
+ ASSERT(getreg (UART_IIR) == 0xc1); /* nothing should be happening */
+ MARK();
+
+ /* Test different speeds */
+ for (speed = 1; speed < 5; speed++) {
+ setreg (UART_LCR, LCR_DIVL);
+ setreg (UART_DLH, speed >> 8);
+ setreg (UART_DLL, speed & 0xff);
+ setreg (UART_LCR, 0x03); /* 8N1 @ 10 => 160 instructions for one cycle */
+ test_mode (8);
+ MARK();
+ }
+ MARK();
+
+ setreg (UART_LCR, LCR_DIVL);
+ setreg (UART_DLH, 1 >> 8);
+ setreg (UART_DLL, 1 & 0xff);
+ MARK();
+
+ /* Test all parity modes with different char lengths */
+ for (parity = 0; parity < 8; parity++)
+ for (length = 0; length < 4; length++) {
+ setreg (UART_LCR, length | (0 << 2) | (parity << 3));
+ test_mode (5 + length);
+ MARK();
+ }
+ MARK();
+
+ /* Test configuration, if we have >1 stop bits */
+ for (length = 0; length < 4; length++) {
+ setreg (UART_LCR, length | (1 << 2) | (0 << 3));
+ test_mode (5 + length);
+ MARK();
+ }
+ MARK();
+
+ /* Restore normal mode */
+ send_char ('T');
+ while (getreg (UART_LSR) != 0x60); /* Wait for THR to be empty */
+ setreg (UART_LCR, LCR_DIVL);
+ setreg (UART_DLH, 2 >> 8);
+ setreg (UART_DLL, 2 & 0xff);
+ setreg (UART_LCR, 0x03); /* 8N1 @ 2 */
+ MARK();
+ while (!(getreg (UART_LSR) & 1)); /* Receive 'x' char */
+ getreg (UART_RBR);
+ MARK();
+
+ send_char ('T');
+ while (getreg (UART_LSR) != 0x60); /* Wait for THR to be empty */
+ MARK();
+ printf ("OK\n");
+}
+
+/* Test various FIFO levels, break and framing error interrupt, etc */
+
+void interrupt_test ()
+{
+ int i;
+ printf ("interrupt_test\n");
+ /* Configure UART for interrupt mode */
+ ASSERT(getreg (UART_IIR) == 0xc1); /* nothing should be happening */
+ setreg (UART_LCR, LCR_DIVL);
+ setreg (UART_DLH, 12 >> 8); /* Set relatively slow speed, so we can hanlde interrupts properly */
+ setreg (UART_DLL, 6 & 0xff);
+ setreg (UART_LCR, 0x03); /* 8N1 @ 6 */
+
+ ASSERT (int_cnt == 0); /* We should not have got any interrupts before this test */
+ setreg (UART_FCR, 0x01); /* Set trigger level = 1 char, fifo should not be reset */
+ setreg (UART_IER, 0x07); /* Enable interrupts: line status, THR empty, data ready */
+
+ while (!int_cnt); /* Clear previous THR interrupt */
+ ASSERT (--int_cnt == 0);
+ ASSERT (int_iir == 0xc2);
+ ASSERT ((int_lsr & 0xbe) == 0x20);
+ MARK();
+
+ /* I am configured - start interrupt test */
+ send_char ('I');
+ while (!int_cnt); /* Wait for THR to be empty */
+ ASSERT (--int_cnt == 0);
+ ASSERT (int_iir == 0xc2);
+ ASSERT ((int_lsr & 0xbe) == 0x20);
+ MARK();
+
+ int_rbr = '0';
+ while (!int_cnt); /* Wait for DR */
+ ASSERT (--int_cnt == 0);
+ ASSERT (int_iir == 0xc4);
+ ASSERT (int_lsr == 0x61);
+ ASSERT (int_cnt == 0); /* no interrupts should be pending */
+ MARK();
+
+ setreg (UART_FCR, 0x41); /* Set trigger level = 4 chars, fifo should not be reset */
+
+ /* Everything ok here, send me 4 more */
+ send_char ('I');
+ while (!int_cnt); /* Wait for THR to be empty */
+ ASSERT (--int_cnt == 0);
+ ASSERT (int_iir == 0xc2);
+ ASSERT ((int_lsr & 0xbe) == 0x20);
+ MARK();
+
+ int_rbr = '1';
+ while (!int_cnt); /* Wait for DR */
+ ASSERT (--int_cnt == 0);
+ ASSERT (int_iir == 0xc4);
+ ASSERT (int_lsr == 0x61);
+ MARK();
+
+ setreg (UART_FCR, 0x81); /* Set trigger level = 8 chars, fifo should not be reset */
+
+ /* Everything ok here, send me 5 more */
+ send_char ('I');
+ while (!int_cnt); /* Wait for THR to be empty */
+ ASSERT (--int_cnt == 0);
+ ASSERT (int_iir == 0xc2);
+ ASSERT ((int_lsr & 0xbe) == 0x20);
+ MARK();
+
+ int_rbr = '2';
+ while (!int_cnt); /* Wait for DR */
+ ASSERT (--int_cnt == 0);
+ ASSERT (int_iir == 0xc4);
+ ASSERT (int_lsr == 0x61);
+ MARK();
+
+ setreg (UART_FCR, 0xc1); /* Set trigger level = 14 chars, fifo should not be reset */
+
+ /* Everything ok here, send me 7 more */
+ send_char ('I');
+ while (!int_cnt); /* Wait for THR to be empty */
+ ASSERT (--int_cnt == 0);
+ ASSERT (int_iir == 0xc2);
+ ASSERT ((int_lsr & 0xbe) == 0x20);
+ MARK();
+
+ int_rbr = '3';
+ while (!int_cnt); /* Wait for DR */
+ ASSERT (--int_cnt == 0);
+ ASSERT (int_iir == 0xc4);
+ ASSERT (int_lsr == 0x61);
+ MARK();
+
+ /* Everything ok here, send me 4 more - fifo should be full OE should occur */
+ setreg (UART_IER, 0x06); /* Enable interrupts: line status, THR empty */
+ send_char ('I');
+ while (!int_cnt); /* Wait for THR to be empty */
+ ASSERT (--int_cnt == 0);
+ ASSERT (int_iir == 0xc2);
+ ASSERT ((int_lsr & 0xbe) == 0x20);
+ MARK();
+
+ while (!int_cnt); /* Wait for OE */
+ ASSERT (--int_cnt == 0);
+ ASSERT (int_iir == 0xc6);
+ ASSERT (int_lsr == 0xe3); /* OE flag should be set */
+ ASSERT (getreg (UART_LSR) == 0x61); /* LSR should be cleared by previous read */
+ ASSERT (getreg (UART_IIR) == 0xc1); /* No interrupts should be pending */
+ MARK();
+
+ /* Check if we got everything */
+ ASSERT (int_cnt == 0); /* no interrupts should be pending */
+ for (i = 0; i < 3; i++) {
+ recv_char ("456"[i]); /* WARNING: read should not cause interrupt even if we step over trigger */
+ MARK ();
+ }
+ /* It is now safe to enable data ready interrupt */
+ setreg (UART_IER, 0x07); /* Enable interrupts: line status, THR empty, data ready */
+
+ /* Check if we got everything */
+ for (i = 0; i < 13; i++) {
+ recv_char ("789abcdefghij"[i]); /* WARNING: read should not cause interrupt even if we step over trigger */
+ MARK ();
+ }
+
+ ASSERT (int_cnt == 0); /* no interrupts should be pending */
+ ASSERT (getreg (UART_LSR) == 0x60); /* FIFO should be empty */
+
+ getreg (UART_RBR); /* check for FIFO counter overflow - fifo must still be empty */
+ ASSERT (getreg (UART_LSR) == 0x60); /* FIFO should be empty */
+
+ /* check for break interrupt */
+ send_char ('I');
+ while (!int_cnt); /* Wait for THR to be empty */
+ ASSERT (--int_cnt == 0);
+ ASSERT (int_iir == 0xc2);
+ ASSERT ((int_lsr & 0xbe) == 0x20);
+ MARK();
+
+ while (!int_cnt); /* Wait for break interrupt */
+ ASSERT (--int_cnt == 0);
+ ASSERT (int_iir == 0xc6);
+ ASSERT (int_lsr == 0xf1); /* BE flag should be set */
+ ASSERT (getreg (UART_LSR) == 0x61); /* BE flag should be cleared by previous read */
+ MARK();
+ recv_char (0);
+ MARK();
+
+ send_char ('B'); /* Release break */
+ while (!int_cnt); /* Wait for THR to be empty */
+ ASSERT (--int_cnt == 0);
+ ASSERT (int_iir == 0xc2);
+ ASSERT ((int_lsr & 0xbe) == 0x20);
+ MARK();
+ /* Wait for acknowledge */
+ int_rbr = '$';
+ while (!int_cnt); /* Wait for timeout */
+ ASSERT (--int_cnt == 0);
+ ASSERT (int_iir == 0xcc);
+ ASSERT (int_lsr == 0x61);
+ MARK();
+
+ /* TODO: Check for parity error */
+ /* TODO: Check for frame error */
+
+ /* Check for timeout */
+ send_char ('I');
+ while (!int_cnt); /* Wait for THR to be empty */
+ ASSERT (--int_cnt == 0);
+ ASSERT (int_iir == 0xc2);
+ ASSERT ((int_lsr & 0xbe) == 0x20);
+ MARK();
+
+ int_rbr = 'T';
+ while (!int_cnt); /* Wait for timeout */
+ ASSERT (--int_cnt == 0);
+ ASSERT (int_iir == 0xcc); /* timeout interrupt occured */
+ ASSERT (int_lsr == 0x61); /* DR flag should be set */
+ ASSERT (getreg (UART_LSR) == 0x60); /* DR flag should be cleared - timeout occurred */
+ MARK();
+
+ send_char ('T');
+ while (!int_cnt); /* Wait for THR to be empty */
+ ASSERT (--int_cnt == 0);
+ ASSERT (int_iir == 0xc2);
+ ASSERT ((int_lsr & 0xbe) == 0x20);
+ MARK();
+
+ setreg (UART_IER, 0x00); /* Disable interrupts */
+ ASSERT (int_cnt == 0); /* no interrupts should be pending */
+ NO_ERROR ();
+
+ while (getreg (UART_LSR) != 0x60); /* wait till we sent everynthing and then change mode */
+ setreg (UART_LCR, LCR_DIVL);
+ setreg (UART_DLH, 2 >> 8); /* Set relatively slow speed, so we can hanlde interrupts properly */
+ setreg (UART_DLL, 2 & 0xff);
+ setreg (UART_LCR, 0x03); /* 8N1 @ 2 */
+ send_char ('T');
+
+ MARK ();
+ printf ("OK\n");
+}
+
+/* Test if all control bits are set correctly. Lot of this was already tested
+ elsewhere and tests are not duplicated. */
+
+void control_register_test ()
+{
+ /* RBR already tested in send_recv_test() */
+ /* THR already tested in send_recv_test() */
+ /* IER already tested in interrupt_test() */
+ /* IIR already tested in interrupt_test() */
+ /* FCR0 - uart 16450 specific, not tested */
+
+ /* FCR1 - reset rx FIFO */
+ send_char ('*');
+ NO_ERROR ();
+ while (!(getreg (UART_LSR) & 0x01)); /* Wait for data ready */
+ setreg (UART_FCR, 2); /* Clears rx fifo */
+ ASSERT (getreg (UART_LSR) == 0x60); /* nothing happening */
+ send_char ('!');
+ recv_char ('!');
+ MARK ();
+
+ /* Make sure the TX fifo and the TX serial reg. are empty */
+ ASSERT (getreg (UART_LSR) & LSR_TXFE);
+ ASSERT (getreg (UART_LSR) & LSR_TXE);
+
+ /* FCR2 - reset tx FIFO */
+send_char_no_wait ('1');
+send_char_no_wait ('2');
+// send_char ('1');
+// send_char ('2');
+ setreg (UART_FCR, 4); /* Should clear '2' from fifo, but '1' should be sent OK */
+ ASSERT (getreg (UART_LSR) == 0x20); /* we should still be sending '1' */
+ NO_ERROR();
+ send_char ('*');
+ recv_char ('*');
+ MARK ();
+
+ /* LCR already tested in different_modes_test () */
+ /* TODO: MSR */
+ /* LSR already tested in different_modes_test () and interrupt_test() */
+ /* SCR already tested in register_test () */
+
+ MARK ();
+ printf ("OK\n");
+}
+
+/* Tests parity error and frame error behaviour */
+
+void line_error_test ()
+{
+ printf ("line_error_test\n");
+
+ /* Test framing error if we change speed */
+ setreg (UART_LCR, LCR_DIVL);
+ setreg (UART_DLH, 12 >> 8);
+ setreg (UART_DLL, 12 & 0xff);
+ setreg (UART_LCR, 0x03); /* 8N1 @ 3 */
+ MARK();
+
+ send_char ('c');
+ ASSERT (int_cnt == 0);
+ setreg (UART_IER, 0x04); /* Enable interrupts: line status */
+ while (!int_cnt); /* Wait for THR to be empty */
+ ASSERT (--int_cnt == 0);
+ ASSERT (int_iir == 0xc6);
+ ASSERT (int_lsr == 0xe9); /* Framing error and FIFO error */
+ getreg (UART_RBR); /* Ignore the data */
+ MARK ();
+ recv_char ('b');
+ MARK ();
+
+#if COMPLETE
+ /* Test framing error if we change stop bits */
+ send_char ('*');
+ while (getreg (UART_LSR)); /* wait till we sent everynthing and then change mode */
+ setreg (UART_LCR, 0x07); /* 8N2 */
+ send_char ('*');
+ MARK ();
+
+ ASSERT (int_cnt == 0);
+ setreg (UART_IER, 0x04); /* Enable interrupts: line status */
+ while (!int_cnt); /* Wait for THR to be empty */
+ ASSERT (--int_cnt == 0);
+ ASSERT (int_iir == 0xc6);
+ ASSERT (int_lsr == 0xe9); /* Framing error and FIFO error */
+ getreg (UART_RBR); /* Ignore the data */
+ recv_char ('b');
+ MARK();
+#endif
+
+ MARK ();
+ printf ("OK\n");
+}
+
+int main ()
+{
+ /* Use our low priority interrupt handler */
+ excpt_int = (unsigned long)interrupt_handler;
+
+ /* Enable interrupts */
+ mtspr (SPR_SR, mfspr(SPR_SR) | SPR_SR_IEE);
+ mtspr (SPR_PICMR, mfspr(SPR_PICMR) | (0x00000001L << UART_INT_LINE));
+
+ int_cnt = 0;
+ int_iir = 0;
+ int_lsr = 0;
+ int_rbr = 0;
+
+ register_test ();
+ init_8n1 ();
+ send_recv_test ();
+ break_test ();
+ different_modes_test ();
+ interrupt_test ();
+ control_register_test ();
+ line_error_test ();
+
+ /* loopback_test ();
+ modem_test ();
+ modem_error_test ();*/
+ recv_char ('@');
+ printf ("ALL TESTS PASSED\n");
+ return 0;
+}
acv_uart.c
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: Makefile.am
===================================================================
--- Makefile.am (nonexistent)
+++ Makefile.am (revision 1765)
@@ -0,0 +1,145 @@
+## Makefile for or1ksim testsuite
+## (c) Marko Mlinar, 2001
+## To add new test, edit between marked areas only
+#
+# This file is part of OpenRISC 1000 Architectural Simulator.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+################### Tests #####################
+# tests in this directory
+OR1K_TESTS = basic cache cfg dmatest eth mmu except_test int_test flag fbtest kbdtest tick
+IND_TESTS = exit cbasic local_global mul mycompress dhry functest mem_test
+# inst_set_test
+ACV_TESTS = acv_uart acv_gpio
+MC_TESTS = mc_dram mc_ssram mc_async mc_sync
+# Subdirectory tests
+SUB_TESTS =
+OR1K_SUB_TESTS = uos
+###############################################
+
+ALL_TESTS = $(IND_TESTS) $(OR1K_TESTS) $(ACV_TESTS) $(MC_TESTS)
+TESTS = $(IND_TESTS) $(OR1K_TESTS)
+bin_PROGRAMS = $(ALL_TESTS)
+
+######### Platform Independent Tests ##########
+exit_SOURCES = $(OR1K_SUPPORT_S) support.h exit.c
+cbasic_SOURCES = $(OR1K_SUPPORT_S) support.h cbasic.c
+local_global_SOURCES = $(OR1K_SUPPORT_S) support.h local_global.c
+mul_SOURCES = $(OR1K_SUPPORT_S) support.h mul.c
+dhry_SOURCES = $(OR1K_SUPPORT_S) support.h dhry.h dhry.c
+mycompress_SOURCES = $(OR1K_SUPPORT_S) support.h mycompress.c
+functest_SOURCES = $(OR1K_SUPPORT_S) support.h functest.c
+mem_test_SOURCES = $(OR1K_SUPPORT_S) support.h mem_test.c
+inst_set_test_SOURCES = $(OR1K_SUPPORT_S) support.h inst_set_test.c
+tick_SOURCES = $(OR1K_SUPPORT_S) support.h tick.c
+###############################################
+
+if OR1K_EXCEPT
+
+exit_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+cbasic_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+local_global_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+mul_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+dhry_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+mycompress_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+functest_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+mem_test_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+inst_set_test_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+tick_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+
+######### MC Tests ############################
+mc_dram_SOURCES = except_mc.S mc_common.h mc_common.c mc_dram.h mc_dram.c
+mc_dram_LDFLAGS = -T$(OR1K_SRCDIR)except_mc.ld
+mc_ssram_SOURCES = except_mc.S mc_common.h mc_common.c mc_ssramh mc_ssram.c
+mc_ssram_LDFLAGS = -T$(OR1K_SRCDIR)except_mc.ld
+mc_async_SOURCES = except_mc.S mc_common.h mc_common.c mc_async.h mc_async.c
+mc_async_LDFLAGS = -T$(OR1K_SRCDIR)except_mc.ld
+mc_sync_SOURCES = except_mc.S mc_common.h mc_common.c mc_sync.h mc_sync.c
+mc_sync_LDFLAGS = -T$(OR1K_SRCDIR)except_mc.ld
+###############################################
+
+####### Platform Dependent Tests - OR1K ########
+basic_SOURCES = basic.S spr_defs.h
+basic_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+basic_LDADD =
+flag_SOURCES = flag.S spr_defs.h
+flag_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+flag_LDADD =
+cache_SOURCES = support.h cache.c cache_asm.S
+cache_LDFLAGS = -T$(OR1K_SRCDIR)/cache.ld
+cfg_SOURCES = cfg.S spr_defs.h
+cfg_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+cfg_LDADD =
+dmatest_SOURCES = $(OR1K_SUPPORT_S) support.h dmatest.c
+dmatest_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+eth_SOURCES = $(OR1K_SUPPORT_S) support.h eth.c
+eth_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+acv_uart_SOURCES = $(OR1K_SUPPORT_S) support.h acv_uart.c
+acv_uart_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+acv_gpio_SOURCES = $(OR1K_SUPPORT_S) support.h acv_gpio.c
+acv_gpio_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+mmu_SOURCES = $(OR1K_SUPPORT_S) support.h mmu.c mmu_asm.S
+mmu_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+except_test_SOURCES = except_test_s.S except_test.c spr_defs.h
+except_test_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+int_test_SOURCES = spr_defs.h int_test.S
+int_test_LDFLAGS = -T$(OR1K_SRCDIR)/int_test.ld
+fbtest_SOURCES = $(OR1K_SUPPORT_S) support.h fbtest.c
+fbtest_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+kbdtest_SOURCES = $(OR1K_SUPPORT_S) support.h kbdtest.c
+kbdtest_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+################################################
+
+else
+
+##### Platform Dependent Tests - not OR1K #####
+basic_SOURCES =
+flag_SOURCES =
+cache_SOURCES =
+cfg_SOURCES =
+dmatest_SOURCES =
+eth_SOURCES =
+acv_uart_SOURCES =
+acv_gpio_SOURCES =
+mmu_SOURCES =
+except_test_SOURCES =
+int_test_SOURCES =
+fbtest_SOURCES =
+kbdtest_SOURCES =
+###############################################
+
+endif
+
+## Neccessary stuff
+
+if OR1K_EXCEPT
+SUBDIRS = support $(SUB_TESTS) $(OR1K_SUB_TESTS)
+else
+SUBDIRS = support $(SUB_TESTS)
+endif
+
+if OR1K_EXCEPT
+OR1K_SUPPORT_S = except.S
+else
+OR1K_SUPPORT_S =
+endif
+
+LDADD = support/libsupport.a
+LDFLAGS =
+TESTS_ENVIRONMENT = $(SHELL) ${top_srcdir}/test $(TESTS_ENV)
+
+again: clean all
Makefile.am
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mmu.cfg
===================================================================
--- mmu.cfg (nonexistent)
+++ mmu.cfg (revision 1765)
@@ -0,0 +1,79 @@
+section memory
+ /*random_seed = 12345
+ type = random*/
+ pattern = 0x00
+ type = unknown /* Fastest */
+
+ name = "RAM"
+ ce = 1
+ baseaddr = 0x00000000
+ size = 0x00200000
+ delayr = 1
+ delayw = 2
+end
+
+section memory
+ /*random_seed = 12345
+ type = random*/
+ pattern = 0x00
+ type = unknown /* Fastest */
+
+ name = "FLASH"
+ ce = 0
+ baseaddr = 0xf0000000
+ size = 0x00200000
+ delayr = 10
+ delayw = -1
+end
+
+section immu
+ enabled = 1
+ nsets = 64
+ nways = 1
+ ustates = 2
+ pagesize = 8192
+end
+
+section dmmu
+ enabled = 1
+ nsets = 64
+ nways = 1
+ ustates = 2
+ pagesize = 8192
+end
+
+section ic
+ enabled = 1
+ nsets = 256
+ nways = 1
+ ustates = 2
+ blocksize = 16
+end
+
+section dc
+ enabled = 1
+ nsets = 256
+ nways = 1
+ ustates = 2
+ blocksize = 16
+end
+
+section sim
+ /* verbose = 1 */
+ debug = 0
+ profile = 0
+ prof_fn = "sim.profile"
+
+ history = 1
+ /* iprompt = 0 */
+ exe_log = 0
+ exe_log_fn = "executed.log"
+end
+
+section mc
+ enabled = 1
+ baseaddr = 0x93000000
+ POC = 0x00000008 /* Power on configuration register */
+end
+
+
Index: acv_uart.cfg
===================================================================
--- acv_uart.cfg (nonexistent)
+++ acv_uart.cfg (revision 1765)
@@ -0,0 +1,65 @@
+section memory
+ /*random_seed = 12345
+ type = random*/
+ pattern = 0x00
+ type = unknown /* Fastest */
+
+ name = "FLASH"
+ ce = 0
+ baseaddr = 0xf0000000
+ size = 0x00200000
+ delayr = 1
+ delayw = -1
+end
+
+section memory
+ /*random_seed = 12345
+ type = random*/
+ pattern = 0x00
+ type = unknown /* Fastest */
+
+ name = "RAM"
+ ce = 1
+ baseaddr = 0x00000000
+ size = 0x00200000
+ delayr = 1
+ delayw = 1
+end
+
+section mc
+ enabled = 1
+ baseaddr = 0x93000000
+ POC = 0x00000008 /* Power on configuration register */
+end
+
+section cpu
+ ver = 0x1200
+ rev = 0x0001
+ /* upr = */
+ superscalar = 0
+ hazards = 0
+ dependstats = 0
+end
+
+section sim
+ debug = 4
+ verbose = 1
+ exe_log = 1
+ exe_log_fn = "executed.log"
+end
+
+section uart
+ baseaddr = 0x9c000000
+ jitter = -1 /* async behaviour */
+ 16550 = 1
+ irq = 19
+ vapi_id = 0x100
+end
+
+section VAPI
+ enabled = 1
+ log_enabled = 1
+ hide_device_id = 1
+ vapi_log_fn = "vapi.log"
+ server_port = 9100
+end
acv_uart.cfg
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mmu.c
===================================================================
--- mmu.c (nonexistent)
+++ mmu.c (revision 1765)
@@ -0,0 +1,1291 @@
+/* This is MMU test for OpenRISC 1200 */
+
+#include "spr_defs.h"
+#include "support.h"
+
+/* For shorter simulation run */
+#define RTL_SIM 1
+
+/* Define RAM physical location and size
+ Bottom half will be used for this program, the rest
+ will be used for testing */
+#define FLASH_START 0xf0000000
+#define FLASH_SIZE 0x00200000
+#define RAM_START 0x00000000
+#define RAM_SIZE 0x00200000
+
+/* What is the last address in ram that is used by this program */
+#define TEXT_END_ADD (FLASH_START + (FLASH_SIZE / 2))
+#define DATA_END_ADD (RAM_START + (RAM_SIZE / 2))
+
+#define TLB_TEXT_SET_NB 8
+#define TLB_DATA_SET_NB 4
+
+/* MMU page size */
+#define PAGE_SIZE 8192
+
+/* Number of DTLB sets used (power of 2, max is 256) */
+#define DTLB_SETS 64
+
+/* Number of DTLB ways (1, 2, 3 etc., max is 4). */
+#define DTLB_WAYS 1
+
+/* Number of ITLB sets used (power of 2, max is 256) */
+#define ITLB_SETS 64
+
+/* Number of ITLB ways (1, 2, 3 etc., max is 4). */
+#define ITLB_WAYS 1
+
+/* TLB mode codes */
+#define TLB_CODE_ONE_TO_ONE 0x00000000
+#define TLB_CODE_PLUS_ONE_PAGE 0x10000000
+#define TLB_CODE_MINUS_ONE_PAGE 0x20000000
+
+#define TLB_CODE_MASK 0xfffff000
+#define TLB_PR_MASK 0x00000fff
+#define DTLB_PR_NOLIMIT ( SPR_DTLBTR_CI | \
+ SPR_DTLBTR_URE | \
+ SPR_DTLBTR_UWE | \
+ SPR_DTLBTR_SRE | \
+ SPR_DTLBTR_SWE )
+
+#define ITLB_PR_NOLIMIT ( SPR_ITLBTR_CI | \
+ SPR_ITLBTR_SXE | \
+ SPR_ITLBTR_UXE )
+
+#if 1
+#define debug printf
+#else
+#define debug
+#endif
+
+/* fails if x is false */
+#define ASSERT(x) ((x)?1: fail (__FUNCTION__, __LINE__))
+
+//#define TEST_JUMP(x) testjump( ((x) & (RAM_SIZE/2 - 1)) + DATA_END_ADD, (x))
+#define TEST_JUMP(x) copy_jump (((x) & (RAM_SIZE/2 - 1)) + DATA_END_ADD); call (x)
+
+/* Extern functions */
+extern void lo_dmmu_en (void);
+extern void lo_immu_en (void);
+extern int lo_dtlb_ci_test (unsigned long, unsigned long);
+extern int lo_itlb_ci_test(unsigned long, unsigned long);
+extern void testjump(unsigned long phy_addr, unsigned long virt_addr);
+extern void (*jr)(void);
+
+/* Local functions prototypes */
+void dmmu_disable (void);
+void immu_disable (void);
+
+/* Global variables */
+extern unsigned long ram_end;
+
+/* DTLB mode status */
+volatile unsigned long dtlb_val;
+
+/* ITLB mode status */
+volatile unsigned long itlb_val;
+
+/* DTLB miss counter */
+volatile int dtlb_miss_count;
+
+/* Data page fault counter */
+volatile int dpage_fault_count;
+
+/* ITLB miss counter */
+volatile int itlb_miss_count;
+
+/* Instruction page fault counter */
+volatile int ipage_fault_count;
+
+/* EA of last DTLB miss exception */
+unsigned long dtlb_miss_ea;
+
+/* EA of last data page fault exception */
+unsigned long dpage_fault_ea;
+
+/* EA of last ITLB miss exception */
+unsigned long itlb_miss_ea;
+
+/* EA of last insn page fault exception */
+unsigned long ipage_fault_ea;
+
+void sys_call (void)
+{
+ asm("l.sys\t0");
+}
+
+void fail (char *func, int line)
+{
+#ifndef __FUNCTION__
+#define __FUNCTION__ "?"
+#endif
+
+ /* Trigger sys call exception to enable supervisor mode again */
+ sys_call ();
+
+ immu_disable ();
+ dmmu_disable ();
+
+ debug("Test failed in %s:%i\n", func, line);
+ report (0xeeeeeeee);
+ exit (1);
+}
+
+void call(unsigned long add)
+{
+ asm("l.jalr\t\t%0" : : "r" (add) : "r9", "r11");
+ asm("l.nop" : :);
+}
+
+void jump(void)
+{
+ asm("_jr:");
+ asm("l.jr\t\tr9") ;
+ asm("l.nop" : :);
+}
+
+void copy_jump(unsigned long phy_add)
+{
+ memcpy((void *)phy_add, (void *)&jr, 8);
+}
+
+/* Bus error exception handler */
+void bus_err_handler (void)
+{
+ /* This shouldn't happend */
+ debug("Test failed: Bus error\n");
+ report (0xeeeeeeee);
+ exit (1);
+}
+
+/* Illegal insn exception handler */
+void ill_insn_handler (void)
+{
+ /* This shouldn't happend */
+ debug("Test failed: Illegal insn\n");
+ report (0xeeeeeeee);
+ exit (1);
+}
+
+/* Sys call exception handler */
+void sys_call_handler (void)
+{
+ /* Set supervisor mode */
+ mtspr (SPR_ESR_BASE, mfspr (SPR_ESR_BASE) | SPR_SR_SM);
+}
+
+/* DTLB miss exception handler */
+void dtlb_miss_handler (void)
+{
+ unsigned long ea, ta, tlbtr;
+ int set, way = 0;
+ int i;
+
+ /* Get EA that cause the exception */
+ ea = mfspr (SPR_EEAR_BASE);
+
+ /* Find TLB set and LRU way */
+ set = (ea / PAGE_SIZE) % DTLB_SETS;
+ for (i = 0; i < DTLB_WAYS; i++) {
+ if ((mfspr (SPR_DTLBMR_BASE(i) + set) & SPR_DTLBMR_LRU) == 0) {
+ way = i;
+ break;
+ }
+ }
+
+ debug("ea = %.8lx set = %d way = %d\n", ea, set, way);
+
+ if (((RAM_START <= ea) && (ea < DATA_END_ADD) ) || ((FLASH_START <= ea) && (ea < TEXT_END_ADD))) {
+ /* If this is acces to data of this program set one to one translation */
+ mtspr (SPR_DTLBMR_BASE(way) + set, (ea & SPR_DTLBMR_VPN) | SPR_DTLBMR_V);
+ mtspr (SPR_DTLBTR_BASE(way) + set, (ea & SPR_DTLBTR_PPN) | DTLB_PR_NOLIMIT);
+ return;
+ }
+
+ /* Update DTLB miss counter and EA */
+ dtlb_miss_count++;
+ dtlb_miss_ea = ea;
+
+ /* Whatever access is in progress, translated address have to point to physical RAM */
+ ta = (ea & ((RAM_SIZE/2) - 1)) + RAM_START + (RAM_SIZE/2);
+ tlbtr = (ta & SPR_DTLBTR_PPN) | (dtlb_val & TLB_PR_MASK);
+ debug("tlbtr = %.8lx dtlb_val = %.8lx\n", tlbtr, dtlb_val);
+
+ /* Set DTLB entry */
+ mtspr (SPR_DTLBMR_BASE(way) + set, (ea & SPR_DTLBMR_VPN) | SPR_DTLBMR_V);
+ mtspr (SPR_DTLBTR_BASE(way) + set, tlbtr);
+}
+
+/* Data page fault exception handler */
+void dpage_fault_handler (void)
+{
+ unsigned long ea;
+ int set, way = 0;
+ int i;
+
+ /* Get EA that cause the exception */
+ ea = mfspr (SPR_EEAR_BASE);
+
+ /* Find TLB set and way */
+ set = (ea / PAGE_SIZE) % DTLB_SETS;
+ for (i = 0; i < DTLB_WAYS; i++) {
+ if ((mfspr (SPR_DTLBMR_BASE(i) + set) & SPR_DTLBMR_VPN) == (ea & SPR_DTLBMR_VPN)) {
+ way = i;
+ break;
+ }
+ }
+
+ debug("ea = %.8lx set = %d way = %d\n", ea, set, way);
+
+ if (((RAM_START <= ea) && (ea < DATA_END_ADD) ) || ((FLASH_START <= ea) && (ea < TEXT_END_ADD))) {
+ /* If this is acces to data of this program set one to one translation */
+ mtspr (SPR_DTLBTR_BASE(way) + set, (ea & SPR_DTLBTR_PPN) | DTLB_PR_NOLIMIT);
+ return;
+ }
+
+ /* Update data page fault counter and EA */
+ dpage_fault_count++;
+ dpage_fault_ea = ea;
+
+ /* Give permission */
+ mtspr (SPR_DTLBTR_BASE(way) + set, (mfspr (SPR_DTLBTR_BASE(way) + set) & ~DTLB_PR_NOLIMIT) | dtlb_val);
+}
+
+
+/* ITLB miss exception handler */
+void itlb_miss_handler (void)
+{
+ unsigned long ea, ta, tlbtr;
+ int set, way = 0;
+ int i;
+
+ /* Get EA that cause the exception */
+ ea = mfspr (SPR_EEAR_BASE);
+
+ /* Find TLB set and LRU way */
+ set = (ea / PAGE_SIZE) % ITLB_SETS;
+ for (i = 0; i < ITLB_WAYS; i++) {
+ if ((mfspr (SPR_ITLBMR_BASE(i) + set) & SPR_ITLBMR_LRU) == 0) {
+ way = i;
+ break;
+ }
+ }
+
+ debug("ea = %.8lx set = %d way = %d\n", ea, set, way);
+
+ if ((FLASH_START <= ea) && (ea < TEXT_END_ADD)) {
+ /* If this is acces to data of this program set one to one translation */
+ mtspr (SPR_ITLBMR_BASE(way) + set, (ea & SPR_ITLBMR_VPN) | SPR_ITLBMR_V);
+ mtspr (SPR_ITLBTR_BASE(way) + set, (ea & SPR_ITLBTR_PPN) | ITLB_PR_NOLIMIT);
+ return;
+ }
+
+ /* Update ITLB miss counter and EA */
+ itlb_miss_count++;
+ itlb_miss_ea = ea;
+
+ /* Whatever access is in progress, translated address have to point to physical RAM */
+ ta = (ea & ((RAM_SIZE/2) - 1)) + DATA_END_ADD;
+ tlbtr = (ta & SPR_ITLBTR_PPN) | (itlb_val & TLB_PR_MASK);
+
+ debug("ta = %.8lx\n", ta);
+
+ /* Set ITLB entry */
+ mtspr (SPR_ITLBMR_BASE(way) + set, (ea & SPR_ITLBMR_VPN) | SPR_ITLBMR_V);
+ mtspr (SPR_ITLBTR_BASE(way) + set, tlbtr);
+}
+
+/* Intstruction page fault exception handler */
+void ipage_fault_handler (void)
+{
+ unsigned long ea;
+ int set, way = 0;
+ int i;
+
+ /* Get EA that cause the exception */
+ ea = mfspr (SPR_EEAR_BASE);
+
+ /* Find TLB set and way */
+ set = (ea / PAGE_SIZE) % ITLB_SETS;
+ for (i = 0; i < ITLB_WAYS; i++) {
+ if ((mfspr (SPR_ITLBMR_BASE(i) + set) & SPR_ITLBMR_VPN) == (ea & SPR_ITLBMR_VPN)) {
+ way = i;
+ break;
+ }
+ }
+
+ debug("ea = %.8lx set = %d way = %d\n", ea, set, way);
+
+ if ((FLASH_START <= ea) && (ea < TEXT_END_ADD)) {
+ /* If this is acces to data of this program set one to one translation */
+ mtspr (SPR_DTLBTR_BASE(way) + set, (ea & SPR_DTLBTR_PPN) | ITLB_PR_NOLIMIT);
+ return;
+ }
+
+ /* Update instruction page fault counter and EA */
+ ipage_fault_count++;
+ ipage_fault_ea = ea;
+
+ /* Give permission */
+ mtspr (SPR_ITLBTR_BASE(way) + set, (mfspr (SPR_ITLBTR_BASE(way) + set) & ~ITLB_PR_NOLIMIT) | itlb_val);
+}
+
+/* Invalidate all entries in DTLB and enable DMMU */
+void dmmu_enable (void)
+{
+ /* Register DTLB miss handler */
+ excpt_dtlbmiss = (unsigned long)dtlb_miss_handler;
+
+ /* Register data page fault handler */
+ excpt_dpfault = (unsigned long)dpage_fault_handler;
+
+ /* Enable DMMU */
+ lo_dmmu_en ();
+}
+
+/* Disable DMMU */
+void dmmu_disable (void)
+{
+ mtspr (SPR_SR, mfspr (SPR_SR) & ~SPR_SR_DME);
+}
+
+/* Invalidate all entries in ITLB and enable IMMU */
+void immu_enable (void)
+{
+ /* Register ITLB miss handler */
+ excpt_itlbmiss = (unsigned long)itlb_miss_handler;
+
+ /* Register instruction page fault handler */
+ excpt_ipfault = (unsigned long)ipage_fault_handler;
+
+ /* Enable IMMU */
+ lo_immu_en ();
+}
+
+/* Disable IMMU */
+void immu_disable (void)
+{
+ mtspr (SPR_SR, mfspr (SPR_SR) & ~SPR_SR_IME);
+}
+
+void write_pattern(unsigned long start, unsigned long end)
+{
+ unsigned long add;
+
+ add = start;
+ while (add < end) {
+ REG32(add) = add;
+ add += PAGE_SIZE;
+ }
+
+}
+
+/* Translation address register test
+ Set various translation and check the pattern */
+int dtlb_translation_test (void)
+{
+ int i, j;
+ unsigned long ea, ta;
+
+ /* Disable DMMU */
+ dmmu_disable();
+
+ /* Invalidate all entries in DTLB */
+ for (i = 0; i < DTLB_WAYS; i++) {
+ for (j = 0; j < DTLB_SETS; j++) {
+ mtspr (SPR_DTLBMR_BASE(i) + j, 0);
+ mtspr (SPR_DTLBTR_BASE(i) + j, 0);
+ }
+ }
+
+ /* Set one to one translation for the use of this program */
+ for (i = 0; i < TLB_DATA_SET_NB; i++) {
+ ea = RAM_START + (i*PAGE_SIZE);
+ ta = RAM_START + (i*PAGE_SIZE);
+ mtspr (SPR_DTLBMR_BASE(0) + i, ea | SPR_DTLBMR_V);
+ mtspr (SPR_DTLBTR_BASE(0) + i, ta | DTLB_PR_NOLIMIT);
+ }
+
+ /* Set dtlb permisions */
+ dtlb_val = DTLB_PR_NOLIMIT;
+
+ /* Write test pattern */
+ for (i = 0; i < DTLB_SETS; i++) {
+ REG32(RAM_START + (RAM_SIZE/2) + (i*PAGE_SIZE)) = i;
+ REG32(RAM_START + (RAM_SIZE/2) + ((i + 1)*PAGE_SIZE) - 4) = 0xffffffff - i;
+ }
+
+ /* Set one to one translation of the last way of DTLB */
+ for (i = TLB_DATA_SET_NB; i < DTLB_SETS; i++) {
+ ea = RAM_START + (RAM_SIZE/2) + (i*PAGE_SIZE);
+ ta = RAM_START + (RAM_SIZE/2) + (i*PAGE_SIZE);
+ mtspr (SPR_DTLBMR_BASE(DTLB_WAYS - 1) + i, ea | SPR_DTLBMR_V);
+ mtspr (SPR_DTLBTR_BASE(DTLB_WAYS - 1) + i, ta | DTLB_PR_NOLIMIT);
+ }
+
+ /* Enable DMMU */
+ dmmu_enable();
+
+ /* Check the pattern */
+ for (i = TLB_DATA_SET_NB; i < DTLB_SETS; i++) {
+ ea = RAM_START + (RAM_SIZE/2) + (i*PAGE_SIZE);
+ ASSERT(REG32(ea) == i);
+ ea = RAM_START + (RAM_SIZE/2) + ((i + 1)*PAGE_SIZE) - 4;
+ ASSERT(REG32(ea) == (0xffffffff - i));
+ }
+
+ /* Write new pattern */
+ for (i = TLB_DATA_SET_NB; i < DTLB_SETS; i++) {
+ REG32(RAM_START + (RAM_SIZE/2) + (i*PAGE_SIZE)) = 0xffffffff - i;
+ REG32(RAM_START + (RAM_SIZE/2) + ((i + 1)*PAGE_SIZE) - 4) = i;
+ }
+
+ /* Set 0 -> RAM_START + (RAM_SIZE/2) translation */
+ for (i = TLB_DATA_SET_NB; i < DTLB_SETS; i++) {
+ ea = i*PAGE_SIZE;
+ ta = RAM_START + (RAM_SIZE/2) + (i*PAGE_SIZE);
+ mtspr (SPR_DTLBMR_BASE(DTLB_WAYS - 1) + i, ea | SPR_DTLBMR_V);
+ mtspr (SPR_DTLBTR_BASE(DTLB_WAYS - 1) + i, ta | DTLB_PR_NOLIMIT);
+ }
+
+ /* Check the pattern */
+ for (i = TLB_DATA_SET_NB; i < DTLB_SETS; i++) {
+ ea = i*PAGE_SIZE;
+ ASSERT(REG32(ea) == (0xffffffff - i));
+ ea = ((i + 1)*PAGE_SIZE) - 4;
+ ASSERT(REG32(ea) == i);
+ }
+
+ /* Write new pattern */
+ for (i = TLB_DATA_SET_NB; i < DTLB_SETS; i++) {
+ REG32(i*PAGE_SIZE) = i;
+ REG32(((i + 1)*PAGE_SIZE) - 4) = 0xffffffff - i;
+ }
+
+ /* Set hi -> lo, lo -> hi translation */
+ for (i = TLB_DATA_SET_NB; i < DTLB_SETS; i++) {
+ ea = RAM_START + (RAM_SIZE/2) + (i*PAGE_SIZE);
+ ta = RAM_START + (RAM_SIZE/2) + ((DTLB_SETS - i - 1 + TLB_DATA_SET_NB)*PAGE_SIZE);
+ mtspr (SPR_DTLBMR_BASE(DTLB_WAYS - 1) + i, ea | SPR_DTLBMR_V);
+ mtspr (SPR_DTLBTR_BASE(DTLB_WAYS - 1) + i, ta | DTLB_PR_NOLIMIT);
+ }
+
+ /* Check the pattern */
+ for (i = TLB_DATA_SET_NB; i < DTLB_SETS; i++) {
+ ea = RAM_START + (RAM_SIZE/2) + (i*PAGE_SIZE);
+ ASSERT(REG32(ea) == (DTLB_SETS - i - 1 + TLB_DATA_SET_NB));
+ ea = RAM_START + (RAM_SIZE/2) + ((i + 1)*PAGE_SIZE) - 4;
+ ASSERT(REG32(ea) == (0xffffffff - DTLB_SETS + i + 1 - TLB_DATA_SET_NB));
+ }
+
+ /* Write new pattern */
+ for (i = TLB_DATA_SET_NB; i < DTLB_SETS; i++) {
+ REG32(RAM_START + (RAM_SIZE/2) + (i*PAGE_SIZE)) = 0xffffffff - i;
+ REG32(RAM_START + (RAM_SIZE/2) + ((i + 1)*PAGE_SIZE) - 4) = i;
+ }
+
+ /* Disable DMMU */
+ dmmu_disable();
+
+ /* Check the pattern */
+ for (i = TLB_DATA_SET_NB; i < DTLB_SETS; i++) {
+ ea = RAM_START + (RAM_SIZE/2) + (i*PAGE_SIZE);
+ ASSERT(REG32(ea) == (0xffffffff - DTLB_SETS + i + 1 - TLB_DATA_SET_NB));
+ ea = RAM_START + (RAM_SIZE/2) + ((i + 1)*PAGE_SIZE) - 4;
+ ASSERT(REG32(ea) == (DTLB_SETS - i - 1 + TLB_DATA_SET_NB));
+ }
+
+ return 0;
+}
+
+/* EA match register test
+ Shifting one in DTLBMR and performing accesses to boundaries
+ of the page, checking the triggering of exceptions */
+int dtlb_match_test (int way, int set)
+{
+ int i, j, tmp;
+ unsigned long add, t_add;
+ unsigned long ea, ta;
+
+ /* Disable DMMU */
+ dmmu_disable();
+
+ /* Invalidate all entries in DTLB */
+ for (i = 0; i < DTLB_WAYS; i++) {
+ for (j = 0; j < DTLB_SETS; j++) {
+ mtspr (SPR_DTLBMR_BASE(i) + j, 0);
+ mtspr (SPR_DTLBTR_BASE(i) + j, 0);
+ }
+ }
+
+ /* Set one to one translation for the use of this program */
+ for (i = 0; i < TLB_DATA_SET_NB; i++) {
+ ea = RAM_START + (i*PAGE_SIZE);
+ ta = RAM_START + (i*PAGE_SIZE);
+ mtspr (SPR_DTLBMR_BASE(0) + i, ea | SPR_DTLBMR_V);
+ mtspr (SPR_DTLBTR_BASE(0) + i, ta | DTLB_PR_NOLIMIT);
+ }
+
+ /* Set dtlb permisions */
+ dtlb_val = DTLB_PR_NOLIMIT;
+
+ /* Set pattern */
+ REG32(RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE) - 4) = 0x00112233;
+ REG32(RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE)) = 0x44556677;
+ REG32(RAM_START + (RAM_SIZE/2) + (set + 1)*PAGE_SIZE - 4) = 0x8899aabb;
+ REG32(RAM_START + (RAM_SIZE/2) + (set + 1)*PAGE_SIZE) = 0xccddeeff;
+
+ /* Enable DMMU */
+ dmmu_enable();
+
+ /* Shifting one in DTLBMR */
+ i = 0;
+ add = (PAGE_SIZE*DTLB_SETS);
+ t_add = add + (set*PAGE_SIZE);
+ while (add != 0x00000000) {
+ mtspr (SPR_DTLBMR_BASE(way) + set, t_add | SPR_DTLBMR_V);
+ mtspr (SPR_DTLBTR_BASE(way) + set, (RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE)) | DTLB_PR_NOLIMIT);
+
+ /* Reset DTLB miss counter and EA */
+ dtlb_miss_count = 0;
+ dtlb_miss_ea = 0;
+
+ if (((t_add < RAM_START) || (t_add >= DATA_END_ADD)) && ((t_add < FLASH_START) || (t_add >= TEXT_END_ADD))) {
+
+ /* Read last address of previous page */
+ tmp = REG32(t_add - 4);
+ ASSERT(tmp == 0x00112233);
+ ASSERT(dtlb_miss_count == 1);
+
+ /* Read first address of the page */
+ tmp = REG32(t_add);
+ ASSERT(tmp == 0x44556677);
+ ASSERT(dtlb_miss_count == 1);
+
+ /* Read last address of the page */
+ tmp = REG32(t_add + PAGE_SIZE - 4);
+ ASSERT(tmp == 0x8899aabb);
+ ASSERT(dtlb_miss_count == 1);
+
+ /* Read first address of next page */
+ tmp = REG32(t_add + PAGE_SIZE);
+ ASSERT(tmp == 0xccddeeff);
+ ASSERT(dtlb_miss_count == 2);
+ }
+
+ i++;
+ add = (PAGE_SIZE*DTLB_SETS) << i;
+ t_add = add + (set*PAGE_SIZE);
+
+ for (j = 0; j < DTLB_WAYS; j++) {
+ mtspr (SPR_DTLBMR_BASE(j) + ((set - 1) & (DTLB_SETS - 1)), 0);
+ mtspr (SPR_DTLBMR_BASE(j) + ((set + 1) & (DTLB_SETS - 1)), 0);
+ }
+ }
+
+ /* Disable DMMU */
+ dmmu_disable();
+
+ return 0;
+}
+
+/* Valid bit test
+ Set all ways of one set to be invalid, perform
+ access so miss handler will set them to valid,
+ try access again - there should be no miss exceptions */
+int dtlb_valid_bit_test (int set)
+{
+ int i, j;
+ unsigned long ea, ta;
+
+ /* Disable DMMU */
+ dmmu_disable();
+
+ /* Invalidate all entries in DTLB */
+ for (i = 0; i < DTLB_WAYS; i++) {
+ for (j = 0; j < DTLB_SETS; j++) {
+ mtspr (SPR_DTLBMR_BASE(i) + j, 0);
+ mtspr (SPR_DTLBTR_BASE(i) + j, 0);
+ }
+ }
+
+ /* Set one to one translation for the use of this program */
+ for (i = 0; i < TLB_DATA_SET_NB; i++) {
+ ea = RAM_START + (i*PAGE_SIZE);
+ ta = RAM_START + (i*PAGE_SIZE);
+ mtspr (SPR_DTLBMR_BASE(0) + i, ea | SPR_DTLBMR_V);
+ mtspr (SPR_DTLBTR_BASE(0) + i, ta | DTLB_PR_NOLIMIT);
+ }
+
+ /* Reset DTLB miss counter and EA */
+ dtlb_miss_count = 0;
+ dtlb_miss_ea = 0;
+
+ /* Set dtlb permisions */
+ dtlb_val = DTLB_PR_NOLIMIT;
+
+ /* Resetv DTLBMR for every way */
+ for (i = 0; i < DTLB_WAYS; i++) {
+ mtspr (SPR_DTLBMR_BASE(i) + set, 0);
+ }
+
+ /* Enable DMMU */
+ dmmu_enable();
+
+ /* Perform writes to address, that is not in DTLB */
+ for (i = 0; i < DTLB_WAYS; i++) {
+ REG32(RAM_START + RAM_SIZE + (i*DTLB_SETS*PAGE_SIZE) + (set*PAGE_SIZE)) = i;
+
+ /* Check if there was DTLB miss */
+ ASSERT(dtlb_miss_count == (i + 1));
+ ASSERT(dtlb_miss_ea == (RAM_START + RAM_SIZE + (i*DTLB_SETS*PAGE_SIZE) + (set*PAGE_SIZE)));
+ }
+
+ /* Reset DTLB miss counter and EA */
+ dtlb_miss_count = 0;
+ dtlb_miss_ea = 0;
+
+ /* Perform reads to address, that is now in DTLB */
+ for (i = 0; i < DTLB_WAYS; i++) {
+ ASSERT(REG32(RAM_START + RAM_SIZE + (i*DTLB_SETS*PAGE_SIZE) + (set*PAGE_SIZE)) == i);
+
+ /* Check if there was DTLB miss */
+ ASSERT(dtlb_miss_count == 0);
+ }
+
+ /* Reset valid bits */
+ for (i = 0; i < DTLB_WAYS; i++) {
+ mtspr (SPR_DTLBMR_BASE(i) + set, mfspr (SPR_DTLBMR_BASE(i) + set) & ~SPR_DTLBMR_V);
+ }
+
+ /* Perform reads to address, that is now in DTLB but is invalid */
+ for (i = 0; i < DTLB_WAYS; i++) {
+ ASSERT(REG32(RAM_START + RAM_SIZE + (i*DTLB_SETS*PAGE_SIZE) + (set*PAGE_SIZE)) == i);
+
+ /* Check if there was DTLB miss */
+ ASSERT(dtlb_miss_count == (i + 1));
+ ASSERT(dtlb_miss_ea == (RAM_START + RAM_SIZE + (i*DTLB_SETS*PAGE_SIZE) + (set*PAGE_SIZE)));
+ }
+
+ /* Disable DMMU */
+ dmmu_disable();
+
+ return 0;
+}
+
+/* Permission test
+ Set various permissions, perform r/w access
+ in user and supervisor mode and chack triggering
+ of page fault exceptions */
+int dtlb_premission_test (int set)
+{
+ int i, j;
+ unsigned long ea, ta, tmp;
+
+ /* Disable DMMU */
+ dmmu_disable();
+
+ /* Invalidate all entries in DTLB */
+ for (i = 0; i < DTLB_WAYS; i++) {
+ for (j = 0; j < DTLB_SETS; j++) {
+ mtspr (SPR_DTLBMR_BASE(i) + j, 0);
+ mtspr (SPR_DTLBTR_BASE(i) + j, 0);
+ }
+ }
+
+ /* Set one to one translation for the use of this program */
+ for (i = 0; i < TLB_DATA_SET_NB; i++) {
+ ea = RAM_START + (i*PAGE_SIZE);
+ ta = RAM_START + (i*PAGE_SIZE);
+ mtspr (SPR_DTLBMR_BASE(0) + i, ea | SPR_DTLBMR_V);
+ mtspr (SPR_DTLBTR_BASE(0) + i, ta | DTLB_PR_NOLIMIT);
+ }
+
+ /* Testing page */
+ ea = RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE);
+
+ /* Set match register */
+ mtspr (SPR_DTLBMR_BASE(DTLB_WAYS - 1) + set, ea | SPR_DTLBMR_V);
+
+ /* Reset page fault counter and EA */
+ dpage_fault_count = 0;
+ dpage_fault_ea = 0;
+
+ /* Enable DMMU */
+ dmmu_enable();
+
+ /* Write supervisor */
+ dtlb_val = DTLB_PR_NOLIMIT | SPR_DTLBTR_SWE;
+ mtspr (SPR_DTLBTR_BASE(DTLB_WAYS - 1) + set, ea | (DTLB_PR_NOLIMIT & ~SPR_DTLBTR_SWE));
+ REG32(RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE) + 0) = 0x00112233;
+ ASSERT(dpage_fault_count == 1);
+ REG32(RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE) + 4) = 0x44556677;
+ ASSERT(dpage_fault_count == 1);
+ REG32(RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE) + 8) = 0x8899aabb;
+ ASSERT(dpage_fault_count == 1);
+ REG32(RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE) + 12) = 0xccddeeff;
+ ASSERT(dpage_fault_count == 1);
+
+ /* Read supervisor */
+ dtlb_val = DTLB_PR_NOLIMIT | SPR_DTLBTR_SRE;
+ mtspr (SPR_DTLBTR_BASE(DTLB_WAYS - 1) + set, ea | (DTLB_PR_NOLIMIT & ~SPR_DTLBTR_SRE));
+ tmp = REG32(RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE) + 0);
+ ASSERT(dpage_fault_count == 2);
+ ASSERT(tmp == 0x00112233);
+ tmp = REG32(RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE) + 4);
+ ASSERT(dpage_fault_count == 2);
+ ASSERT(tmp == 0x44556677);
+ tmp = REG32(RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE) + 8);
+ ASSERT(dpage_fault_count == 2);
+ ASSERT(tmp == 0x8899aabb);
+ tmp = REG32(RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE) + 12);
+ ASSERT(dpage_fault_count == 2);
+ ASSERT(tmp == 0xccddeeff);
+
+ /* Write user */
+ dtlb_val = DTLB_PR_NOLIMIT | SPR_DTLBTR_UWE;
+ mtspr (SPR_DTLBTR_BASE(DTLB_WAYS - 1) + set, ea | (DTLB_PR_NOLIMIT & ~SPR_DTLBTR_UWE));
+
+ /* Set user mode */
+ mtspr (SPR_SR, mfspr (SPR_SR) & ~SPR_SR_SM);
+
+ REG32(RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE) + 0) = 0xffeeddcc;
+ ASSERT(dpage_fault_count == 3);
+ REG32(RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE) + 4) = 0xbbaa9988;
+ ASSERT(dpage_fault_count == 3);
+ REG32(RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE) + 8) = 0x77665544;
+ ASSERT(dpage_fault_count == 3);
+ REG32(RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE) + 12) = 0x33221100;
+ ASSERT(dpage_fault_count == 3);
+
+ /* Trigger sys call exception to enable supervisor mode again */
+ sys_call ();
+
+ /* Read user mode */
+ dtlb_val = DTLB_PR_NOLIMIT | SPR_DTLBTR_URE;
+ mtspr (SPR_DTLBTR_BASE(DTLB_WAYS - 1) + set, ea | (DTLB_PR_NOLIMIT & ~SPR_DTLBTR_URE));
+
+ /* Set user mode */
+ mtspr (SPR_SR, mfspr (SPR_SR) & ~SPR_SR_SM);
+
+ tmp = REG32(RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE) + 0);
+ ASSERT(dpage_fault_count == 4);
+ ASSERT(tmp == 0xffeeddcc);
+ tmp = REG32(RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE) + 4);
+ ASSERT(dpage_fault_count == 4);
+ ASSERT(tmp == 0xbbaa9988);
+ tmp = REG32(RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE) + 8);
+ ASSERT(dpage_fault_count == 4);
+ ASSERT(tmp == 0x77665544);
+ tmp = REG32(RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE) + 12);
+ ASSERT(dpage_fault_count == 4);
+ ASSERT(tmp == 0x33221100);
+
+ /* Trigger sys call exception to enable supervisor mode again */
+ sys_call ();
+
+ /* Disable DMMU */
+ dmmu_disable();
+
+ return 0;
+}
+
+/* Data cache inhibit bit test
+ Set and clear CI bit and check the pattern. */
+int dtlb_ci_test (void)
+{
+ int i, j;
+ unsigned long ea, ta, ret;
+
+ /* Disable DMMU */
+ dmmu_disable();
+
+ /* Invalidate all entries in DTLB */
+ for (i = 0; i < DTLB_WAYS; i++) {
+ for (j = 0; j < DTLB_SETS; j++) {
+ mtspr (SPR_DTLBMR_BASE(i) + j, 0);
+ mtspr (SPR_DTLBTR_BASE(i) + j, 0);
+ }
+ }
+
+ /* Set one to one translation for the use of this program */
+ for (i = 0; i < TLB_DATA_SET_NB; i++) {
+ ea = RAM_START + (i*PAGE_SIZE);
+ ta = RAM_START + (i*PAGE_SIZE);
+ mtspr (SPR_DTLBMR_BASE(0) + i, ea | SPR_DTLBMR_V);
+ mtspr (SPR_DTLBTR_BASE(0) + i, ta | DTLB_PR_NOLIMIT | SPR_DTLBTR_CI);
+ }
+
+ /* Testing page */
+ ea = RAM_START + (RAM_SIZE/2) + (TLB_DATA_SET_NB*PAGE_SIZE);
+ ta = RAM_START + (RAM_SIZE/2) + (TLB_DATA_SET_NB*PAGE_SIZE);
+
+ /* Write test pattern */
+ REG32(ea) = 0x01234567;
+ REG32(ea + PAGE_SIZE - 4) = 0x9abcdef;
+
+ /* Set one to one translation with CI bit for testing area */
+ mtspr (SPR_DTLBMR_BASE(0) + TLB_DATA_SET_NB, ea | SPR_DTLBMR_V);
+ mtspr (SPR_DTLBTR_BASE(0) + TLB_DATA_SET_NB, ta | DTLB_PR_NOLIMIT | SPR_DTLBTR_CI);
+
+ ret = lo_dtlb_ci_test(ea, TLB_DATA_SET_NB);
+ ASSERT(ret == 0);
+
+ return 0;
+}
+
+/* Translation address register test
+ Set various translation and check the pattern */
+int itlb_translation_test (void)
+{
+ int i, j;
+ unsigned long ea, ta;
+
+ /* Disable IMMU */
+ immu_disable();
+
+ /* Invalidate all entries in ITLB */
+ for (i = 0; i < ITLB_WAYS; i++) {
+ for (j = 0; j < ITLB_SETS; j++) {
+ mtspr (SPR_ITLBMR_BASE(i) + j, 0);
+ mtspr (SPR_ITLBTR_BASE(i) + j, 0);
+ }
+ }
+
+ /* Set one to one translation for the use of this program */
+ for (i = 0; i < TLB_TEXT_SET_NB; i++) {
+ ea = FLASH_START + (i*PAGE_SIZE);
+ ta = FLASH_START + (i*PAGE_SIZE);
+ mtspr (SPR_ITLBMR_BASE(0) + i, ea | SPR_ITLBMR_V);
+ mtspr (SPR_ITLBTR_BASE(0) + i, ta | ITLB_PR_NOLIMIT);
+ }
+
+ /* Set itlb permisions */
+ itlb_val = ITLB_PR_NOLIMIT;
+
+ /* Write test program */
+ for (i = TLB_TEXT_SET_NB; i < ITLB_SETS; i++) {
+ copy_jump (RAM_START + (RAM_SIZE/2) + (i*PAGE_SIZE) + (i*0x10));
+ }
+
+ /* Set one to one translation of the last way of ITLB */
+ for (i = TLB_TEXT_SET_NB; i < ITLB_SETS; i++) {
+ ea = RAM_START + (RAM_SIZE/2) + (i*PAGE_SIZE);
+ ta = RAM_START + (RAM_SIZE/2) + (i*PAGE_SIZE);
+ mtspr (SPR_ITLBMR_BASE(ITLB_WAYS - 1) + i, ea | SPR_ITLBMR_V);
+ mtspr (SPR_ITLBTR_BASE(ITLB_WAYS - 1) + i, ta | ITLB_PR_NOLIMIT);
+ }
+
+ /* Enable IMMU */
+ immu_enable();
+
+ /* Check the pattern */
+ for (i = TLB_TEXT_SET_NB; i < ITLB_SETS; i++) {
+ call (RAM_START + (RAM_SIZE/2) + (i*PAGE_SIZE) + (i*0x10));
+ }
+
+ /* Set FLASH_END -> RAM_START + (RAM_SIZE/2) translation */
+ for (i = TLB_TEXT_SET_NB; i < ITLB_SETS; i++) {
+ ea = FLASH_START + FLASH_SIZE + i*PAGE_SIZE;
+ ta = RAM_START + (RAM_SIZE/2) + (i*PAGE_SIZE);
+ mtspr (SPR_ITLBMR_BASE(ITLB_WAYS - 1) + i, ea | SPR_ITLBMR_V);
+ mtspr (SPR_ITLBTR_BASE(ITLB_WAYS - 1) + i, ta | ITLB_PR_NOLIMIT);
+ }
+
+ /* Check the pattern */
+ for (i = TLB_TEXT_SET_NB; i < ITLB_SETS; i++) {
+ call (FLASH_START + FLASH_SIZE + (i*PAGE_SIZE) + (i*0x10));
+ }
+
+ /* Set hi -> lo, lo -> hi translation */
+ for (i = TLB_TEXT_SET_NB; i < ITLB_SETS; i++) {
+ ea = RAM_START + (RAM_SIZE/2) + (i*PAGE_SIZE);
+ ta = RAM_START + (RAM_SIZE/2) + ((ITLB_SETS - i - 1 + TLB_TEXT_SET_NB)*PAGE_SIZE);
+ mtspr (SPR_ITLBMR_BASE(ITLB_WAYS - 1) + i, ea | SPR_ITLBMR_V);
+ mtspr (SPR_ITLBTR_BASE(ITLB_WAYS - 1) + i, ta | ITLB_PR_NOLIMIT);
+ }
+
+ /* Check the pattern */
+ for (i = TLB_TEXT_SET_NB; i < ITLB_SETS; i++) {
+ call (RAM_START + (RAM_SIZE/2) + (i*PAGE_SIZE) + ((ITLB_SETS - i - 1 + TLB_TEXT_SET_NB)*0x10));
+ }
+
+ /* Disable IMMU */
+ immu_disable ();
+
+ /* Check the pattern */
+ for (i = TLB_TEXT_SET_NB; i < ITLB_SETS; i++) {
+ call (RAM_START + (RAM_SIZE/2) + (i*PAGE_SIZE) + (i*0x10));
+ }
+
+ return 0;
+}
+
+/* EA match register test
+ Shifting one in ITLBMR and performing accesses to boundaries
+ of the page, checking the triggering of exceptions */
+int itlb_match_test (int way, int set)
+{
+ int i, j;
+ unsigned long add, t_add;
+ unsigned long ea, ta;
+
+ /* Disable IMMU */
+ immu_disable();
+
+ /* Invalidate all entries in ITLB */
+ for (i = 0; i < ITLB_WAYS; i++) {
+ for (j = 0; j < ITLB_SETS; j++) {
+ mtspr (SPR_ITLBMR_BASE(i) + j, 0);
+ mtspr (SPR_ITLBTR_BASE(i) + j, 0);
+ }
+ }
+
+ /* Set one to one translation for the use of this program */
+ for (i = 0; i < TLB_TEXT_SET_NB; i++) {
+ ea = FLASH_START + (i*PAGE_SIZE);
+ ta = FLASH_START + (i*PAGE_SIZE);
+ mtspr (SPR_ITLBMR_BASE(0) + i, ea | SPR_ITLBMR_V);
+ mtspr (SPR_ITLBTR_BASE(0) + i, ta | ITLB_PR_NOLIMIT);
+ }
+
+ /* Set dtlb permisions */
+ itlb_val = ITLB_PR_NOLIMIT;
+
+ /* Set pattern */
+ copy_jump (RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE) - 8);
+ copy_jump (RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE));
+ copy_jump (RAM_START + (RAM_SIZE/2) + (set + 1)*PAGE_SIZE - 8);
+ copy_jump (RAM_START + (RAM_SIZE/2) + (set + 1)*PAGE_SIZE);
+
+ /* Enable IMMU */
+ immu_enable();
+
+ /* Shifting one in ITLBMR */
+ i = 0;
+ add = (PAGE_SIZE*ITLB_SETS);
+ t_add = add + (set*PAGE_SIZE);
+ while (add != 0x00000000) {
+ mtspr (SPR_ITLBMR_BASE(way) + set, t_add | SPR_ITLBMR_V);
+ mtspr (SPR_ITLBTR_BASE(way) + set, (RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE)) | ITLB_PR_NOLIMIT);
+
+ /* Reset ITLB miss counter and EA */
+ itlb_miss_count = 0;
+ itlb_miss_ea = 0;
+
+ if (((t_add < RAM_START) || (t_add >= DATA_END_ADD)) && ((t_add < FLASH_START) || (t_add >= TEXT_END_ADD))) {
+
+ /* Jump on last address of previous page */
+ call (t_add - 8);
+ ASSERT(itlb_miss_count == 1);
+
+ /* Jump on first address of the page */
+ call (t_add);
+ ASSERT(itlb_miss_count == 1);
+
+ /* Jump on last address of the page */
+ call (t_add + PAGE_SIZE - 8);
+ ASSERT(itlb_miss_count == 1);
+
+ /* Jump on first address of next page */
+ call (t_add + PAGE_SIZE);
+ ASSERT(itlb_miss_count == 2);
+ }
+
+ i++;
+ add = (PAGE_SIZE*ITLB_SETS) << i;
+ t_add = add + (set*PAGE_SIZE);
+
+ for (j = 0; j < ITLB_WAYS; j++) {
+ mtspr (SPR_ITLBMR_BASE(j) + ((set - 1) & (ITLB_SETS - 1)), 0);
+ mtspr (SPR_ITLBMR_BASE(j) + ((set + 1) & (ITLB_SETS - 1)), 0);
+ }
+ }
+
+ /* Disable IMMU */
+ immu_disable();
+
+ return 0;
+}
+
+/* Valid bit test
+ Set all ways of one set to be invalid, perform
+ access so miss handler will set them to valid,
+ try access again - there should be no miss exceptions */
+int itlb_valid_bit_test (int set)
+{
+ int i, j;
+ unsigned long ea, ta;
+
+ /* Disable IMMU */
+ immu_disable();
+
+ /* Invalidate all entries in ITLB */
+ for (i = 0; i < ITLB_WAYS; i++) {
+ for (j = 0; j < ITLB_SETS; j++) {
+ mtspr (SPR_ITLBMR_BASE(i) + j, 0);
+ mtspr (SPR_ITLBTR_BASE(i) + j, 0);
+ }
+ }
+
+ /* Set one to one translation for the use of this program */
+ for (i = 0; i < TLB_TEXT_SET_NB; i++) {
+ ea = FLASH_START + (i*PAGE_SIZE);
+ ta = FLASH_START + (i*PAGE_SIZE);
+ mtspr (SPR_ITLBMR_BASE(0) + i, ea | SPR_ITLBMR_V);
+ mtspr (SPR_ITLBTR_BASE(0) + i, ta | ITLB_PR_NOLIMIT);
+ }
+
+ /* Reset ITLB miss counter and EA */
+ itlb_miss_count = 0;
+ itlb_miss_ea = 0;
+
+ /* Set itlb permisions */
+ itlb_val = ITLB_PR_NOLIMIT;
+
+ /* Resetv ITLBMR for every way */
+ for (i = 0; i < ITLB_WAYS; i++) {
+ mtspr (SPR_ITLBMR_BASE(i) + set, 0);
+ }
+
+ /* Enable IMMU */
+ immu_enable();
+
+ /* Perform jumps to address, that is not in ITLB */
+ for (i = 0; i < ITLB_WAYS; i++) {
+ TEST_JUMP(RAM_START + RAM_SIZE + (i*ITLB_SETS*PAGE_SIZE) + (set*PAGE_SIZE));
+
+ /* Check if there was ITLB miss */
+ ASSERT(itlb_miss_count == (i + 1));
+ ASSERT(itlb_miss_ea == (RAM_START + RAM_SIZE + (i*ITLB_SETS*PAGE_SIZE) + (set*PAGE_SIZE)));
+ }
+
+ /* Reset ITLB miss counter and EA */
+ itlb_miss_count = 0;
+ itlb_miss_ea = 0;
+
+ /* Perform jumps to address, that is now in ITLB */
+ for (i = 0; i < ITLB_WAYS; i++) {
+ TEST_JUMP(RAM_START + RAM_SIZE + (i*ITLB_SETS*PAGE_SIZE) + (set*PAGE_SIZE));
+
+ /* Check if there was ITLB miss */
+ ASSERT(itlb_miss_count == 0);
+ }
+
+ /* Reset valid bits */
+ for (i = 0; i < ITLB_WAYS; i++) {
+ mtspr (SPR_ITLBMR_BASE(i) + set, mfspr (SPR_ITLBMR_BASE(i) + set) & ~SPR_ITLBMR_V);
+ }
+
+ /* Perform jumps to address, that is now in ITLB but is invalid */
+ for (i = 0; i < ITLB_WAYS; i++) {
+ TEST_JUMP(RAM_START + RAM_SIZE + (i*ITLB_SETS*PAGE_SIZE) + (set*PAGE_SIZE));
+
+ /* Check if there was ITLB miss */
+ ASSERT(itlb_miss_count == (i + 1));
+ ASSERT(itlb_miss_ea == (RAM_START + RAM_SIZE + (i*ITLB_SETS*PAGE_SIZE) + (set*PAGE_SIZE)));
+ }
+
+ /* Disable IMMU */
+ immu_disable ();
+
+ return 0;
+}
+
+/* Permission test
+ Set various permissions, perform r/w access
+ in user and supervisor mode and check triggering
+ of page fault exceptions */
+int itlb_premission_test (int set)
+{
+ int i, j;
+ unsigned long ea, ta;
+
+ /* Disable IMMU */
+ immu_disable();
+
+ /* Invalidate all entries in ITLB */
+ for (i = 0; i < ITLB_WAYS; i++) {
+ for (j = 0; j < ITLB_SETS; j++) {
+ mtspr (SPR_ITLBMR_BASE(i) + j, 0);
+ mtspr (SPR_ITLBTR_BASE(i) + j, 0);
+ }
+ }
+
+ /* Set one to one translation for the use of this program */
+ for (i = 0; i < TLB_TEXT_SET_NB; i++) {
+ ea = FLASH_START + (i*PAGE_SIZE);
+ ta = FLASH_START + (i*PAGE_SIZE);
+ mtspr (SPR_ITLBMR_BASE(0) + i, ea | SPR_ITLBMR_V);
+ mtspr (SPR_ITLBTR_BASE(0) + i, ta | ITLB_PR_NOLIMIT);
+ }
+
+ /* Testing page */
+ ea = RAM_START + (RAM_SIZE/2) + (set*PAGE_SIZE);
+
+ /* Set match register */
+ mtspr (SPR_ITLBMR_BASE(ITLB_WAYS - 1) + set, ea | SPR_ITLBMR_V);
+
+ /* Reset page fault counter and EA */
+ ipage_fault_count = 0;
+ ipage_fault_ea = 0;
+
+ /* Copy the code */
+ copy_jump (ea);
+ copy_jump (ea + 8);
+
+ /* Enable IMMU */
+ immu_enable ();
+
+ /* Execute supervisor */
+ itlb_val = SPR_ITLBTR_CI | SPR_ITLBTR_SXE;
+ mtspr (SPR_ITLBTR_BASE(ITLB_WAYS - 1) + set, ea | (ITLB_PR_NOLIMIT & ~SPR_ITLBTR_SXE));
+
+ call (ea);
+ ASSERT(ipage_fault_count == 1);
+ call (ea + 8);
+ ASSERT(ipage_fault_count == 1);
+
+ /* Execute user */
+ itlb_val = SPR_ITLBTR_CI | SPR_ITLBTR_UXE;
+ mtspr (SPR_ITLBTR_BASE(ITLB_WAYS - 1) + set, ea | (ITLB_PR_NOLIMIT & ~SPR_ITLBTR_UXE));
+
+ /* Set user mode */
+ mtspr (SPR_SR, mfspr (SPR_SR) & ~SPR_SR_SM);
+
+ call (ea);
+ ASSERT(ipage_fault_count == 2);
+ call (ea + 8);
+ ASSERT(ipage_fault_count == 2);
+
+ /* Trigger sys call exception to enable supervisor mode again */
+ sys_call ();
+
+ /* Disable IMMU */
+ immu_disable ();
+
+ return 0;
+}
+
+/* Instruction cache inhibit bit test
+ Set and clear CI bit and check the pattern. */
+int itlb_ci_test(void)
+{
+ int i, j;
+ unsigned long ea, ta, ret;
+
+ /* Disable IMMU */
+ immu_disable();
+
+ /* Invalidate all entries in DTLB */
+ for (i = 0; i < ITLB_WAYS; i++) {
+ for (j = 0; j < ITLB_SETS; j++) {
+ mtspr (SPR_ITLBMR_BASE(i) + j, 0);
+ mtspr (SPR_ITLBTR_BASE(i) + j, 0);
+ }
+ }
+
+ /* Set one to one translation for the use of this program */
+ for (i = 0; i < TLB_TEXT_SET_NB; i++) {
+ ea = FLASH_START + (i*PAGE_SIZE);
+ ta = FLASH_START + (i*PAGE_SIZE);
+ mtspr (SPR_ITLBMR_BASE(0) + i, ea | SPR_ITLBMR_V);
+ mtspr (SPR_ITLBTR_BASE(0) + i, ta | ITLB_PR_NOLIMIT);
+ }
+
+ /* Testing page */
+ ea = RAM_START + (RAM_SIZE/2) + (TLB_TEXT_SET_NB*PAGE_SIZE);
+
+ ret = lo_itlb_ci_test (ea, TLB_TEXT_SET_NB);
+ ASSERT(ret == 0);
+
+ return 0;
+}
+
+int main (void)
+{
+ int i, j;
+
+ i = j = 0; /* Get rid of warnings */
+
+ /* Register bus error handler */
+ excpt_buserr = (unsigned long)bus_err_handler;
+
+ /* Register illegal insn handler */
+ excpt_illinsn = (unsigned long)ill_insn_handler;
+
+ /* Register illegal insn handler */
+ excpt_syscall = (unsigned long)sys_call_handler;
+
+#if 1
+ /* Translation test */
+ dtlb_translation_test ();
+
+ /* Virtual address match test */
+#ifndef RTL_SIM
+ for (j = 0; j < DTLB_WAYS; j++) {
+ for (i = TLB_DATA_SET_NB; i < (DTLB_SETS - 1); i++)
+ dtlb_match_test (j, i);
+ }
+#else
+ dtlb_match_test (0, DTLB_SETS - 2);
+#endif
+
+ /* Valid bit testing */
+#ifndef RTL_SIM
+ for (i = TLB_DATA_SET_NB; i < (DTLB_SETS - 1); i++)
+ dtlb_valid_bit_test (i);
+#else
+ dtlb_valid_bit_test (DTLB_SETS - 2);
+#endif
+
+ /* Permission test */
+#ifndef RTL_SIM
+ for (i = TLB_DATA_SET_NB; i < (DTLB_SETS - 1); i++)
+ dtlb_premission_test (i);
+#else
+ dtlb_premission_test (DTLB_SETS - 2);
+#endif
+
+ dtlb_ci_test();
+#endif
+
+#if 1
+ /* Translation test */
+ itlb_translation_test ();
+
+ /* Virtual address match test */
+#ifndef RTL_SIM
+ for (j = 0; j < DTLB_WAYS; j++) {
+ for (i = TLB_TEXT_SET_NB + 1; i < (DTLB_SETS - 1); i++)
+ itlb_match_test (j, i);
+ }
+#else
+ itlb_match_test (0, DTLB_SETS - 2);
+#endif
+
+ /* Valid bit testing */
+#ifndef RTL_SIM
+ for (i = TLB_TEXT_SET_NB; i < (ITLB_SETS); i++)
+ itlb_valid_bit_test (i);
+#else
+ itlb_valid_bit_test (ITLB_SETS-1);
+#endif
+
+ /* Permission test */
+#ifndef RTL_SIM
+ for (i = TLB_TEXT_SET_NB; i < (ITLB_SETS - 1); i++)
+ itlb_premission_test (i);
+#else
+ itlb_premission_test (ITLB_SETS - 2);
+#endif
+
+ itlb_ci_test();
+#endif
+
+ report (0xdeaddead);
+ exit (0);
+ return 0;
+}
+
Index: support/support.c
===================================================================
--- support/support.c (nonexistent)
+++ support/support.c (revision 1765)
@@ -0,0 +1,130 @@
+/* Support */
+
+#include "spr_defs.h"
+#include "support.h"
+#include "int.h"
+
+#if OR1K
+void excpt_dummy();
+void int_main();
+
+unsigned long excpt_buserr = (unsigned long) excpt_dummy;
+unsigned long excpt_dpfault = (unsigned long) excpt_dummy;
+unsigned long excpt_ipfault = (unsigned long) excpt_dummy;
+unsigned long excpt_tick = (unsigned long) excpt_dummy;
+unsigned long excpt_align = (unsigned long) excpt_dummy;
+unsigned long excpt_illinsn = (unsigned long) excpt_dummy;
+unsigned long excpt_int = (unsigned long) int_main;
+unsigned long excpt_dtlbmiss = (unsigned long) excpt_dummy;
+unsigned long excpt_itlbmiss = (unsigned long) excpt_dummy;
+unsigned long excpt_range = (unsigned long) excpt_dummy;
+unsigned long excpt_syscall = (unsigned long) excpt_dummy;
+unsigned long excpt_break = (unsigned long) excpt_dummy;
+unsigned long excpt_trap = (unsigned long) excpt_dummy;
+
+
+/* Start function, called by reset exception handler. */
+void reset ()
+{
+ int i = main();
+ exit (i);
+}
+
+/* return value by making a syscall */
+void exit (int i)
+{
+ asm("l.add r3,r0,%0": : "r" (i));
+ asm("l.nop %0": :"K" (NOP_EXIT));
+ while (1);
+}
+
+/* activate printf support in simulator */
+void printf(const char *fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+ __asm__ __volatile__ (" l.addi\tr3,%0,0\n": : "r" (fmt) : "r3", "r4");
+ __asm__ __volatile__ (" l.addi\tr4,%0,0\n": : "r" (args): "r3", "r4");
+ __asm__ __volatile__ (" l.nop %0": : "K" (NOP_PRINTF));
+}
+
+/* print long */
+void report(unsigned long value)
+{
+ asm("l.addi\tr3,%0,0": :"r" (value));
+ asm("l.nop %0": :"K" (NOP_REPORT));
+}
+
+/* just to satisfy linker */
+void __main()
+{
+}
+
+/* start_TIMER */
+void start_timer(int x)
+{
+}
+
+/* read_TIMER */
+/* Returns a value since started in uS */
+unsigned int read_timer(int x)
+{
+ unsigned long count = 0;
+
+ /* Read the Time Stamp Counter */
+/* asm("simrdtsc %0" :"=r" (count)); */
+ /*asm("l.sys 201"); */
+ return count;
+}
+
+/* For writing into SPR. */
+void mtspr(unsigned long spr, unsigned long value)
+{
+ asm("l.mtspr\t\t%0,%1,0": : "r" (spr), "r" (value));
+}
+
+/* For reading SPR. */
+unsigned long mfspr(unsigned long spr)
+{
+ unsigned long value;
+ asm("l.mfspr\t\t%0,%1,0" : "=r" (value) : "r" (spr));
+ return value;
+}
+
+#else
+void report(unsigned long value)
+{
+ printf("report(0x%x);\n", (unsigned) value);
+}
+
+/* start_TIMER */
+void start_timer(int tmrnum)
+{
+}
+
+/* read_TIMER */
+/* Returns a value since started in uS */
+unsigned int read_timer(int tmrnum)
+{
+ struct timeval tv;
+ struct timezone tz;
+
+ gettimeofday(&tv, &tz);
+
+ return(tv.tv_sec*1000000+tv.tv_usec);
+}
+
+#endif
+
+void *memcpy (void *__restrict dstvoid,
+ __const void *__restrict srcvoid, size_t length)
+{
+ char *dst = dstvoid;
+ const char *src = (const char *) srcvoid;
+
+ while (length--)
+ *dst++ = *src++;
+ return dst;
+}
+
+void excpt_dummy() {}
support/support.c
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: support/Makefile.in
===================================================================
--- support/Makefile.in (nonexistent)
+++ support/Makefile.in (revision 1765)
@@ -0,0 +1,324 @@
+# Makefile.in generated by automake 1.6.3 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Makefile -- Makefile for cpu architecture independent simulation
+# Copyright (C) 1999 Damjan Lampret, lampret@opencores.org
+#
+# This file is part of OpenRISC 1000 Architectural Simulator.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+
+EXEEXT = @EXEEXT@
+OBJEXT = @OBJEXT@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+AMTAR = @AMTAR@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASFLAGS = @CCASFLAGS@
+DEPDIR = @DEPDIR@
+INCLUDES = @INCLUDES@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+MAKE_SHELL = @MAKE_SHELL@
+OR1K_SRCDIR = @OR1K_SRCDIR@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+SIM = @SIM@
+STRIP = @STRIP@
+TESTS_ENV = @TESTS_ENV@
+VERSION = @VERSION@
+am__include = @am__include@
+am__quote = @am__quote@
+install_sh = @install_sh@
+
+noinst_LIBRARIES = libsupport.a
+libsupport_a_SOURCES = support.c support.h int.c int.h
+subdir = support
+mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+
+libsupport_a_AR = $(AR) cru
+libsupport_a_LIBADD =
+am_libsupport_a_OBJECTS = support.$(OBJEXT) int.$(OBJEXT)
+libsupport_a_OBJECTS = $(am_libsupport_a_OBJECTS)
+
+DEFS = @DEFS@
+DEFAULT_INCLUDES = -I. -I$(srcdir)
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+depcomp = $(SHELL) $(top_srcdir)/../depcomp
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/int.Po ./$(DEPDIR)/support.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+CFLAGS = @CFLAGS@
+DIST_SOURCES = $(libsupport_a_SOURCES)
+DIST_COMMON = Makefile.am Makefile.in
+SOURCES = $(libsupport_a_SOURCES)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu support/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+
+AR = ar
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+libsupport.a: $(libsupport_a_OBJECTS) $(libsupport_a_DEPENDENCIES)
+ -rm -f libsupport.a
+ $(libsupport_a_AR) libsupport.a $(libsupport_a_OBJECTS) $(libsupport_a_LIBADD)
+ $(RANLIB) libsupport.a
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/int.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/support.Po@am__quote@
+
+distclean-depend:
+ -rm -rf ./$(DEPDIR)
+
+.c.o:
+@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
+
+.c.obj:
+@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(COMPILE) -c `cygpath -w $<`
+CCDEPMODE = @CCDEPMODE@
+uninstall-info-am:
+
+ETAGS = etags
+ETAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+ @list='$(DISTFILES)'; for file in $$list; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LIBRARIES)
+
+installdirs:
+
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+
+distclean-am: clean-am distclean-compile distclean-depend \
+ distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+uninstall-am: uninstall-info-am
+
+.PHONY: GTAGS all all-am check check-am clean clean-generic \
+ clean-noinstLIBRARIES distclean distclean-compile \
+ distclean-depend distclean-generic distclean-tags distdir dvi \
+ dvi-am info info-am install install-am install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-info-am install-man install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic tags uninstall uninstall-am \
+ uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: support/support.h
===================================================================
--- support/support.h (nonexistent)
+++ support/support.h (revision 1765)
@@ -0,0 +1,65 @@
+/* Support file for or32 tests. This file should is included
+ in each test. It calls main() function and add support for
+ basic functions */
+
+#ifndef SUPPORT_H
+#define SUPPORT_H
+
+#include
+#include
+#include
+
+#if OR1K
+//#include <_ansi.h>
+
+/* Register access macros */
+#define REG8(add) *((volatile unsigned char *)(add))
+#define REG16(add) *((volatile unsigned short *)(add))
+#define REG32(add) *((volatile unsigned long *)(add))
+
+void printf(const char *fmt, ...);
+
+/* For writing into SPR. */
+void mtspr(unsigned long spr, unsigned long value);
+
+/* For reading SPR. */
+unsigned long mfspr(unsigned long spr);
+
+#else /* OR1K */
+
+#include
+
+#endif /* OR1K */
+
+/* Function to be called at entry point - not defined here. */
+int main ();
+
+/* Prints out a value */
+void report(unsigned long value);
+
+/* return value by making a syscall */
+extern void exit (int i) __attribute__ ((__noreturn__));
+
+/* memcpy clone */
+extern void *memcpy (void *__restrict __dest,
+ __const void *__restrict __src, size_t __n);
+
+/* Timer functions */
+extern void start_timer(int);
+extern unsigned int read_timer(int);
+
+extern unsigned long excpt_buserr;
+extern unsigned long excpt_dpfault;
+extern unsigned long excpt_ipfault;
+extern unsigned long excpt_tick;
+extern unsigned long excpt_align;
+extern unsigned long excpt_illinsn;
+extern unsigned long excpt_int;
+extern unsigned long excpt_dtlbmiss;
+extern unsigned long excpt_itlbmiss;
+extern unsigned long excpt_range;
+extern unsigned long excpt_syscall;
+extern unsigned long excpt_break;
+extern unsigned long excpt_trap;
+
+#endif
support/support.h
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: support/int.h
===================================================================
--- support/int.h (nonexistent)
+++ support/int.h (revision 1765)
@@ -0,0 +1,15 @@
+
+/* Number of interrupt handlers */
+#define MAX_INT_HANDLERS 32
+
+/* Handler entry */
+struct ihnd {
+ void (*handler)(void *);
+ void *arg;
+};
+
+/* Add interrupt handler */
+int int_add(unsigned long vect, void (* handler)(void *), void *arg);
+
+/* Initialize routine */
+int int_init();
Index: support/int.c
===================================================================
--- support/int.c (nonexistent)
+++ support/int.c (revision 1765)
@@ -0,0 +1,79 @@
+/* This file is part of test microkernel for OpenRISC 1000. */
+/* (C) 2001 Simon Srot, srot@opencores.org */
+
+#include "support.h"
+#include "spr_defs.h"
+#include "int.h"
+
+#ifdef OR1K
+
+/* Interrupt handlers table */
+struct ihnd int_handlers[MAX_INT_HANDLERS];
+
+/* Initialize routine */
+int int_init()
+{
+ int i;
+
+ for(i = 0; i < MAX_INT_HANDLERS; i++) {
+ int_handlers[i].handler = 0;
+ int_handlers[i].arg = 0;
+ }
+
+ return 0;
+}
+
+/* Add interrupt handler */
+int int_add(unsigned long vect, void (* handler)(void *), void *arg)
+{
+ if(vect >= MAX_INT_HANDLERS)
+ return -1;
+
+ int_handlers[vect].handler = handler;
+ int_handlers[vect].arg = arg;
+
+ mtspr(SPR_PICMR, mfspr(SPR_PICMR) | (0x00000001L << vect));
+
+ return 0;
+}
+
+/* Disable interrupt */
+int int_disable(unsigned long vect)
+{
+ if(vect >= MAX_INT_HANDLERS)
+ return -1;
+
+ mtspr(SPR_PICMR, mfspr(SPR_PICMR) & ~(0x00000001L << vect));
+
+ return 0;
+}
+
+/* Enable interrupt */
+int int_enable(unsigned long vect)
+{
+ if(vect >= MAX_INT_HANDLERS)
+ return -1;
+
+ mtspr(SPR_PICMR, mfspr(SPR_PICMR) | (0x00000001L << vect));
+
+ return 0;
+}
+
+/* Main interrupt handler */
+void int_main()
+{
+ unsigned long picsr = mfspr(SPR_PICSR);
+ unsigned long i = 0;
+
+ mtspr(SPR_PICSR, 0);
+
+ while(i < 32) {
+ if((picsr & (0x01L << i)) && (int_handlers[i].handler != 0)) {
+ (*int_handlers[i].handler)(int_handlers[i].arg);
+ mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(0x00000001L << i));
+ }
+ i++;
+ }
+}
+
+#endif
Index: support/Makefile.am
===================================================================
--- support/Makefile.am (nonexistent)
+++ support/Makefile.am (revision 1765)
@@ -0,0 +1,29 @@
+# Makefile -- Makefile for cpu architecture independent simulation
+# Copyright (C) 1999 Damjan Lampret, lampret@opencores.org
+#
+# This file is part of OpenRISC 1000 Architectural Simulator.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+##if OR1K_EXCEPT
+##OR1K_SUPPORT_S = except.S
+##else
+##OR1K_SUPPORT_S =
+##endif
+
+noinst_LIBRARIES = libsupport.a
+libsupport_a_SOURCES = support.c support.h int.c int.h
+## EXTRA_libsupport_a_SOURCES = except.S
support/Makefile.am
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: support
===================================================================
--- support (nonexistent)
+++ support (revision 1765)
support
Property changes :
Added: svn:ignore
## -0,0 +1,2 ##
+Makefile
+.deps
Index: dmatest.c
===================================================================
--- dmatest.c (nonexistent)
+++ dmatest.c (revision 1765)
@@ -0,0 +1,172 @@
+/* DMA test */
+
+#include "support.h"
+#include "board.h"
+#include "../peripheral/fields.h"
+#include "../peripheral/dma_defs.h"
+
+typedef volatile unsigned long *DMA_REG;
+
+DMA_REG csr = (unsigned long *)(DMA_BASE + DMA_CSR),
+ int_msk_a = (unsigned long *)(DMA_BASE + DMA_INT_MSK_A),
+ int_msk_b = (unsigned long *)(DMA_BASE + DMA_INT_MSK_B),
+ int_src_a = (unsigned long *)(DMA_BASE + DMA_INT_SRC_A),
+ int_src_b = (unsigned long *)(DMA_BASE + DMA_INT_SRC_B),
+ ch0_csr = (unsigned long *)(DMA_BASE + DMA_CH_BASE + DMA_CH_CSR),
+ ch0_sz = (unsigned long *)(DMA_BASE + DMA_CH_BASE + DMA_CH_SZ),
+ ch0_a0 = (unsigned long *)(DMA_BASE + DMA_CH_BASE + DMA_CH_A0),
+ ch0_am0 = (unsigned long *)(DMA_BASE + DMA_CH_BASE + DMA_CH_AM0),
+ ch0_a1 = (unsigned long *)(DMA_BASE + DMA_CH_BASE + DMA_CH_A1),
+ ch0_am1 = (unsigned long *)(DMA_BASE + DMA_CH_BASE + DMA_CH_AM1),
+ ch0_desc = (unsigned long *)(DMA_BASE + DMA_CH_BASE + DMA_CH_DESC);
+
+struct DMA_DESCRIPTOR
+{
+ unsigned long csr;
+ unsigned long adr0;
+ unsigned long adr1;
+ unsigned long next;
+};
+
+
+/* Test simplest DMA operation */
+int simple( void )
+{
+ int ok;
+ unsigned long src[2], dst[2];
+
+ /* Set transfer Size */
+ *ch0_sz = 0x00000002;
+
+ /* Set addresses */
+ *ch0_a0 = (unsigned long)src;
+ *ch0_a1 = (unsigned long)dst;
+
+ /* Fill source */
+ src[0] = 0x01234567LU;
+ src[1] = 0x89ABCDEFLU;
+
+ /* Now set channel CSR */
+ *ch0_csr = FLAG_MASK( DMA_CH_CSR, CH_EN ) | FLAG_MASK( DMA_CH_CSR, INC_SRC ) | FLAG_MASK( DMA_CH_CSR, INC_DST );
+
+ /* Wait till the channel finishes */
+ while ( TEST_FLAG( *ch0_csr, DMA_CH_CSR, BUSY ) )
+ ;
+
+ /* Dump contents of memory */
+ ok = (dst[0] == src[0] && dst[1] == src[1]);
+ report( ok );
+
+ return ok;
+}
+
+
+/* Test simple transfer with chunks */
+int chunks( void )
+{
+ unsigned i, ok;
+ unsigned long src[6], dst[6];
+
+ /* Set transfer size */
+ *ch0_sz = 6LU | (3LU << DMA_CH_SZ_CHK_SZ_OFFSET);
+
+ /* Set addresses */
+ *ch0_a0 = (unsigned long)src;
+ *ch0_a1 = (unsigned long)dst;
+
+ /* Fill source */
+ for ( i = 0; i < 6; ++ i )
+ src[i] = 0xA63F879CLU + i;
+
+ /* Now set channel CSR */
+ *ch0_csr = FLAG_MASK( DMA_CH_CSR, CH_EN ) | FLAG_MASK( DMA_CH_CSR, INC_SRC ) | FLAG_MASK( DMA_CH_CSR, INC_DST );
+
+ /* Wait till the channel finishes */
+ while ( TEST_FLAG( *ch0_csr, DMA_CH_CSR, BUSY ) )
+ ;
+
+ /* Dump contents of memory */
+ ok = 1;
+ for ( i = 0; i < 6 && ok; ++ i )
+ if ( dst[i] != src[i] )
+ ok = 0;
+ report( i );
+
+ return ok;
+}
+
+/* Test transfer using linked list */
+int list( void )
+{
+ struct DMA_DESCRIPTOR desc[2];
+ unsigned long src[10], dst[10];
+ unsigned i, ok;
+
+ /* Set transfer size for each list element */
+ desc[0].csr = 6;
+ desc[1].csr = 4;
+
+ /* Set chunk size */
+ *ch0_sz = 2UL << DMA_CH_SZ_CHK_SZ_OFFSET;
+
+ /* Set addresses */
+ desc[0].adr0 = (unsigned long)src;
+ desc[0].adr1 = (unsigned long)dst;
+ desc[1].adr0 = (unsigned long)(src + 6);
+ desc[1].adr1 = (unsigned long)(dst + 6);
+
+ /* Fill source */
+ for ( i = 0; i < 10; ++ i )
+ src[i] = 0x110BD540FLU + i;
+
+ /* Set descriptor CSR */
+ desc[0].csr |= FLAG_MASK( DMA_DESC_CSR, INC_SRC ) | FLAG_MASK( DMA_DESC_CSR, INC_DST );
+ desc[1].csr |= FLAG_MASK( DMA_DESC_CSR, EOL ) | FLAG_MASK( DMA_DESC_CSR, INC_SRC ) | FLAG_MASK( DMA_DESC_CSR, INC_DST );
+
+ /* Point channel to descriptor */
+ *ch0_desc = (unsigned)desc;
+
+ /* Link the list */
+ desc[0].next = (unsigned)&(desc[1]);
+ desc[1].next = 0xDEADDEADUL;
+
+ /* Set channel CSR */
+ *ch0_csr = FLAG_MASK( DMA_CH_CSR, CH_EN ) | FLAG_MASK( DMA_CH_CSR, USE_ED );
+
+ /* Wait till the channel finishes */
+ while ( TEST_FLAG( *ch0_csr, DMA_CH_CSR, BUSY ) )
+ ;
+
+ ok = TEST_FLAG( *ch0_csr, DMA_CH_CSR, DONE );
+
+ /* Dump contents of memory */
+ for ( i = 0; i < 10 && ok; ++ i )
+ if ( dst[i] != src[i] )
+ ok = 0;
+ report( i );
+
+ return ok;
+}
+
+
+int main()
+{
+ int pass_simple, pass_chunks, pass_list;
+ printf( "Starting DMA test\n" );
+
+ printf( " Simple DMA: " );
+ printf( (pass_simple = simple()) ? "Passed\n" : "Failed\n" );
+ printf( " Chunks DMA: " );
+ printf( (pass_chunks = chunks()) ? "Passed\n" : "Failed\n" );
+ printf( " List DMA: " );
+ printf( (pass_list = list()) ? "Passed\n" : "Failed\n" );
+
+ printf( "Ending DMA test\n" );
+ if (pass_simple && pass_chunks && pass_list) {
+ report (0xdeaddead);
+ return 0;
+ } else
+ return 3 - pass_simple - pass_chunks - pass_list;
+}
+
+
Index: configure
===================================================================
--- configure (nonexistent)
+++ configure (revision 1765)
@@ -0,0 +1,5021 @@
+#! /bin/sh
+# From configure.in for or1ksim-1.2, version 2.14, from autoconf version AC_ACVERSION.
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.57.
+#
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+#
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="support/support.h"
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC ac_ct_CC RANLIB ac_ct_RANLIB LD ac_ct_LD SIM ac_ct_SIM CFLAGS LDFLAGS CPPFLAGS EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE CPP EGREP CCAS CCASFLAGS MAKE_SHELL TESTS_ENV OR1K_SRCDIR OR1K_EXCEPT_TRUE OR1K_EXCEPT_FALSE INCLUDES LIBOBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_$ac_feature='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-dependency-tracking Speeds up one-time builds
+ --enable-dependency-tracking Do not reject slow dependency extractors
+ --enable-opt enable optimizations
+ --enable-opt=level same as gcc -O switch
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L if you have libraries in a
+ nonstandard directory
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have
+ headers in a nonstandard directory
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.57. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core core.* *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+am__api_version="1.6"
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+all:
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SET_MAKE=
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+ # test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# Define the identity of the package.
+ PACKAGE=or1ksimtest
+ VERSION=1.3
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ STRIP=$ac_ct_STRIP
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+
+
+
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+all:
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SET_MAKE=
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}$target-gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}$target-gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}$target-gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "$target-gcc", so it can be a program name with args.
+set dummy $target-gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$target-gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_CC" && ac_cv_prog_ac_ct_CC="cc"
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}$target-ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}$target-ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}$target-ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "$target-ranlib", so it can be a program name with args.
+set dummy $target-ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="$target-ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="ranlib"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ RANLIB=$ac_ct_RANLIB
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}$target-ld", so it can be a program name with args.
+set dummy ${ac_tool_prefix}$target-ld; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$LD"; then
+ ac_cv_prog_LD="$LD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LD="${ac_tool_prefix}$target-ld"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+LD=$ac_cv_prog_LD
+if test -n "$LD"; then
+ echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_LD"; then
+ ac_ct_LD=$LD
+ # Extract the first word of "$target-ld", so it can be a program name with args.
+set dummy $target-ld; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_LD"; then
+ ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_LD="$target-ld"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
+fi
+fi
+ac_ct_LD=$ac_cv_prog_ac_ct_LD
+if test -n "$ac_ct_LD"; then
+ echo "$as_me:$LINENO: result: $ac_ct_LD" >&5
+echo "${ECHO_T}$ac_ct_LD" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ LD=$ac_ct_LD
+else
+ LD="$ac_cv_prog_LD"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}$target-sim", so it can be a program name with args.
+set dummy ${ac_tool_prefix}$target-sim; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_SIM+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$SIM"; then
+ ac_cv_prog_SIM="$SIM" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_SIM="${ac_tool_prefix}$target-sim"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+SIM=$ac_cv_prog_SIM
+if test -n "$SIM"; then
+ echo "$as_me:$LINENO: result: $SIM" >&5
+echo "${ECHO_T}$SIM" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_SIM"; then
+ ac_ct_SIM=$SIM
+ # Extract the first word of "$target-sim", so it can be a program name with args.
+set dummy $target-sim; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_SIM+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_SIM"; then
+ ac_cv_prog_ac_ct_SIM="$ac_ct_SIM" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_SIM="$target-sim"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_SIM" && ac_cv_prog_ac_ct_SIM="sim"
+fi
+fi
+ac_ct_SIM=$ac_cv_prog_ac_ct_SIM
+if test -n "$ac_ct_SIM"; then
+ echo "$as_me:$LINENO: result: $ac_ct_SIM" >&5
+echo "${ECHO_T}$ac_ct_SIM" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ SIM=$ac_ct_SIM
+else
+ SIM="$ac_cv_prog_SIM"
+fi
+
+rm -f .deps 2>/dev/null
+mkdir .deps 2>/dev/null
+if test -d .deps; then
+ DEPDIR=.deps
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ DEPDIR=_deps
+fi
+rmdir .deps 2>/dev/null
+
+
+ ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+doit:
+ @echo done
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+
+
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+ enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CC" && break
+done
+
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5
+ (eval $ac_compiler --version &5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5
+ (eval $ac_compiler -v &5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5
+ (eval $ac_compiler -V &5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output" >&5
+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+#include
+#include
+#include
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ ''\
+ '#include ' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC" am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ echo '#include "conftest.h"' > conftest.c
+ echo 'int i;' > conftest.h
+ echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=conftest.c object=conftest.o \
+ depfile=conftest.Po tmpdepfile=conftest.TPo \
+ $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
+ grep conftest.h conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+
+
+ echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5
+echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6
+if test "${ac_cv_lib_cposix_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcposix $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_cposix_strerror=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_cposix_strerror=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5
+echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6
+if test $ac_cv_lib_cposix_strerror = yes; then
+ LIBS="$LIBS -lcposix"
+fi
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer to if __STDC__ is defined, since
+ # exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer to if __STDC__ is defined, since
+ # exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+#include
+#include
+#include
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+
+# By default we simply use the C compiler to build assembly code.
+
+: ${CCAS='$(CC)'}
+# Set ASFLAGS if not already set.
+: ${CCASFLAGS='$(CFLAGS)'}
+
+
+
+MAKE_SHELL=/bin/sh
+
+
+if test $ac_cv_c_compiler_gnu = yes; then
+ echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5
+echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
+if test "${ac_cv_prog_gcc_traditional+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_pattern="Autoconf.*'x'"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+Autoconf TIOCGETP
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "$ac_pattern" >/dev/null 2>&1; then
+ ac_cv_prog_gcc_traditional=yes
+else
+ ac_cv_prog_gcc_traditional=no
+fi
+rm -f conftest*
+
+
+ if test $ac_cv_prog_gcc_traditional = no; then
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+Autoconf TCGETA
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "$ac_pattern" >/dev/null 2>&1; then
+ ac_cv_prog_gcc_traditional=yes
+fi
+rm -f conftest*
+
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5
+echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
+ if test $ac_cv_prog_gcc_traditional = yes; then
+ CC="$CC -traditional"
+ fi
+fi
+
+CFLAGS="-Wall -g"
+
+COMPILE_OR1K=unknown
+
+
+TESTS_ENV=
+
+OR1K_SRCDIR="./${top_srcdir}"
+case $target in
+ or1k*|or32*)
+ CFLAGS="$CFLAGS -nostdlib -mhard-div"
+ COMPILE=or1k
+ TESTS_ENV="$SIM"
+ ;;
+esac
+
+
+if test x$COMPILE = xor1k; then
+ OR1K_EXCEPT_TRUE=
+ OR1K_EXCEPT_FALSE='#'
+else
+ OR1K_EXCEPT_TRUE='#'
+ OR1K_EXCEPT_FALSE=
+fi
+
+
+
+echo "$as_me:$LINENO: checking whether to enable optimizations" >&5
+echo $ECHO_N "checking whether to enable optimizations... $ECHO_C" >&6
+# Check whether --enable-opt or --disable-opt was given.
+if test "${enable_opt+set}" = set; then
+ enableval="$enable_opt"
+
+ case "$enableval" in
+ yes)
+ CFLAGS="$CFLAGS -O"
+ ;;
+ *)
+ CFLAGS="$CFLAGS -O$enableval"
+ ;;
+ esac
+
+fi;
+echo "$as_me:$LINENO: result: ${enable_opt-default}" >&5
+echo "${ECHO_T}${enable_opt-default}" >&6
+
+case "$enable_debugging" in
+ yes)
+echo "$as_me:$LINENO: checking for malloc in -lefence" >&5
+echo $ECHO_N "checking for malloc in -lefence... $ECHO_C" >&6
+if test "${ac_cv_lib_efence_malloc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lefence $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char malloc ();
+int
+main ()
+{
+malloc ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_efence_malloc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_efence_malloc=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_efence_malloc" >&5
+echo "${ECHO_T}$ac_cv_lib_efence_malloc" >&6
+if test $ac_cv_lib_efence_malloc = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBEFENCE 1
+_ACEOF
+
+ LIBS="-lefence $LIBS"
+
+fi
+ ;;
+esac
+
+
+INCLUDES="-I\${top_srcdir}/support"
+CCASFLAGS="${CFLAGS} ${INCLUDES}"
+
+echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+if test "${ac_cv_c_const+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+ const charset x;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *ccp;
+ char **p;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ ccp = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++ccp;
+ p = (char**) ccp;
+ ccp = (char const *const *) p;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ }
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_const=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_const=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6
+if test $ac_cv_c_const = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define const
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for inline" >&5
+echo $ECHO_N "checking for inline... $ECHO_C" >&6
+if test "${ac_cv_c_inline+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_inline=$ac_kw; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+echo "${ECHO_T}$ac_cv_c_inline" >&6
+case $ac_cv_c_inline in
+ inline | yes) ;;
+ no)
+cat >>confdefs.h <<\_ACEOF
+#define inline
+_ACEOF
+ ;;
+ *) cat >>confdefs.h <<_ACEOF
+#define inline $ac_cv_c_inline
+_ACEOF
+ ;;
+esac
+
+
+ ac_config_files="$ac_config_files Makefile support/Makefile uos/Makefile"
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+t quote
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${OR1K_EXCEPT_TRUE}" && test -z "${OR1K_EXCEPT_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"OR1K_EXCEPT\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"OR1K_EXCEPT\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.57. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to ."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.57,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "support/Makefile" ) CONFIG_FILES="$CONFIG_FILES support/Makefile" ;;
+ "uos/Makefile" ) CONFIG_FILES="$CONFIG_FILES uos/Makefile" ;;
+ "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@install_sh@,$install_sh,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@AWK@,$AWK,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@CC@,$CC,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@LD@,$LD,;t t
+s,@ac_ct_LD@,$ac_ct_LD,;t t
+s,@SIM@,$SIM,;t t
+s,@ac_ct_SIM@,$ac_ct_SIM,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@DEPDIR@,$DEPDIR,;t t
+s,@am__include@,$am__include,;t t
+s,@am__quote@,$am__quote,;t t
+s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
+s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+s,@CCDEPMODE@,$CCDEPMODE,;t t
+s,@CPP@,$CPP,;t t
+s,@EGREP@,$EGREP,;t t
+s,@CCAS@,$CCAS,;t t
+s,@CCASFLAGS@,$CCASFLAGS,;t t
+s,@MAKE_SHELL@,$MAKE_SHELL,;t t
+s,@TESTS_ENV@,$TESTS_ENV,;t t
+s,@OR1K_SRCDIR@,$OR1K_SRCDIR,;t t
+s,@OR1K_EXCEPT_TRUE@,$OR1K_EXCEPT_TRUE,;t t
+s,@OR1K_EXCEPT_FALSE@,$OR1K_EXCEPT_FALSE,;t t
+s,@INCLUDES@,$INCLUDES,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ esac
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_dest" : 'X\(//\)[^/]' \| \
+ X"$ac_dest" : 'X\(//\)$' \| \
+ X"$ac_dest" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+ case $ac_dest in
+ depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`(dirname "$mf") 2>/dev/null ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
+ # Extract the definition of DEP_FILES from the Makefile without
+ # running `make'.
+ DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n -e '/^U = / s///p' < "$mf"`
+ test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+ # We invoke sed twice because it is the simplest approach to
+ # changing $(DEPDIR) to its actual value in the expansion.
+ for file in `sed -n -e '
+ /^DEP_FILES = .*\\\\$/ {
+ s/^DEP_FILES = //
+ :loop
+ s/\\\\$//
+ p
+ n
+ /\\\\$/ b loop
+ p
+ }
+ /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`(dirname "$file") 2>/dev/null ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p $dirpart/$fdir
+ else
+ as_dir=$dirpart/$fdir
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+ ;;
+ esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
configure
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: Makefile.in
===================================================================
--- Makefile.in (nonexistent)
+++ Makefile.in (revision 1765)
@@ -0,0 +1,914 @@
+# Makefile.in generated by automake 1.6.3 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ # PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+#
+# This file is part of OpenRISC 1000 Architectural Simulator.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+
+EXEEXT = @EXEEXT@
+OBJEXT = @OBJEXT@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+AMTAR = @AMTAR@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASFLAGS = @CCASFLAGS@
+DEPDIR = @DEPDIR@
+INCLUDES = @INCLUDES@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+MAKE_SHELL = @MAKE_SHELL@
+OR1K_SRCDIR = @OR1K_SRCDIR@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+SIM = @SIM@
+STRIP = @STRIP@
+TESTS_ENV = @TESTS_ENV@
+VERSION = @VERSION@
+am__include = @am__include@
+am__quote = @am__quote@
+install_sh = @install_sh@
+
+################### Tests #####################
+# tests in this directory
+OR1K_TESTS = basic cache cfg dmatest eth mmu except_test int_test flag fbtest kbdtest
+IND_TESTS = exit cbasic local_global mul mycompress dhry functest mem_test
+# inst_set_test
+ACV_TESTS = acv_uart acv_gpio
+MC_TESTS = mc_dram mc_ssram mc_async mc_sync
+# Subdirectory tests
+SUB_TESTS =
+OR1K_SUB_TESTS = uos
+
+###############################################
+ALL_TESTS = $(IND_TESTS) $(OR1K_TESTS) $(ACV_TESTS) $(MC_TESTS)
+TESTS = $(IND_TESTS) $(OR1K_TESTS)
+bin_PROGRAMS = $(ALL_TESTS)
+
+######### Platform Independent Tests ##########
+exit_SOURCES = $(OR1K_SUPPORT_S) support.h exit.c
+cbasic_SOURCES = $(OR1K_SUPPORT_S) support.h cbasic.c
+local_global_SOURCES = $(OR1K_SUPPORT_S) support.h local_global.c
+mul_SOURCES = $(OR1K_SUPPORT_S) support.h mul.c
+dhry_SOURCES = $(OR1K_SUPPORT_S) support.h dhry.h dhry.c
+mycompress_SOURCES = $(OR1K_SUPPORT_S) support.h mycompress.c
+functest_SOURCES = $(OR1K_SUPPORT_S) support.h functest.c
+mem_test_SOURCES = $(OR1K_SUPPORT_S) support.h mem_test.c
+inst_set_test_SOURCES = $(OR1K_SUPPORT_S) support.h inst_set_test.c
+
+###############################################
+@OR1K_EXCEPT_TRUE@exit_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+@OR1K_EXCEPT_TRUE@cbasic_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+@OR1K_EXCEPT_TRUE@local_global_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+@OR1K_EXCEPT_TRUE@mul_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+@OR1K_EXCEPT_TRUE@dhry_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+@OR1K_EXCEPT_TRUE@mycompress_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+@OR1K_EXCEPT_TRUE@functest_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+@OR1K_EXCEPT_TRUE@mem_test_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+@OR1K_EXCEPT_TRUE@inst_set_test_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+
+######### MC Tests ############################
+@OR1K_EXCEPT_TRUE@mc_dram_SOURCES = except_mc.S mc_common.h mc_common.c mc_dram.h mc_dram.c
+@OR1K_EXCEPT_TRUE@mc_dram_LDFLAGS = -T$(OR1K_SRCDIR)except_mc.ld
+@OR1K_EXCEPT_TRUE@mc_ssram_SOURCES = except_mc.S mc_common.h mc_common.c mc_ssramh mc_ssram.c
+@OR1K_EXCEPT_TRUE@mc_ssram_LDFLAGS = -T$(OR1K_SRCDIR)except_mc.ld
+@OR1K_EXCEPT_TRUE@mc_async_SOURCES = except_mc.S mc_common.h mc_common.c mc_async.h mc_async.c
+@OR1K_EXCEPT_TRUE@mc_async_LDFLAGS = -T$(OR1K_SRCDIR)except_mc.ld
+@OR1K_EXCEPT_TRUE@mc_sync_SOURCES = except_mc.S mc_common.h mc_common.c mc_sync.h mc_sync.c
+@OR1K_EXCEPT_TRUE@mc_sync_LDFLAGS = -T$(OR1K_SRCDIR)except_mc.ld
+###############################################
+
+####### Platform Dependent Tests - OR1K ########
+################################################
+
+##### Platform Dependent Tests - not OR1K #####
+@OR1K_EXCEPT_TRUE@basic_SOURCES = basic.S spr_defs.h
+@OR1K_EXCEPT_FALSE@basic_SOURCES =
+@OR1K_EXCEPT_TRUE@basic_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+@OR1K_EXCEPT_TRUE@basic_LDADD =
+@OR1K_EXCEPT_TRUE@flag_SOURCES = flag.S spr_defs.h
+@OR1K_EXCEPT_FALSE@flag_SOURCES =
+@OR1K_EXCEPT_TRUE@flag_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+@OR1K_EXCEPT_TRUE@flag_LDADD =
+@OR1K_EXCEPT_TRUE@cache_SOURCES = support.h cache.c cache_asm.S
+@OR1K_EXCEPT_FALSE@cache_SOURCES =
+@OR1K_EXCEPT_TRUE@cache_LDFLAGS = -T$(OR1K_SRCDIR)/cache.ld
+@OR1K_EXCEPT_TRUE@cfg_SOURCES = cfg.S spr_defs.h
+@OR1K_EXCEPT_FALSE@cfg_SOURCES =
+@OR1K_EXCEPT_TRUE@cfg_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+@OR1K_EXCEPT_TRUE@cfg_LDADD =
+@OR1K_EXCEPT_TRUE@dmatest_SOURCES = $(OR1K_SUPPORT_S) support.h dmatest.c
+@OR1K_EXCEPT_FALSE@dmatest_SOURCES =
+@OR1K_EXCEPT_TRUE@dmatest_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+@OR1K_EXCEPT_TRUE@eth_SOURCES = $(OR1K_SUPPORT_S) support.h eth.c
+@OR1K_EXCEPT_FALSE@eth_SOURCES =
+@OR1K_EXCEPT_TRUE@eth_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+@OR1K_EXCEPT_TRUE@acv_uart_SOURCES = $(OR1K_SUPPORT_S) support.h acv_uart.c
+@OR1K_EXCEPT_FALSE@acv_uart_SOURCES =
+@OR1K_EXCEPT_TRUE@acv_uart_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+@OR1K_EXCEPT_TRUE@acv_gpio_SOURCES = $(OR1K_SUPPORT_S) support.h acv_gpio.c
+@OR1K_EXCEPT_FALSE@acv_gpio_SOURCES =
+@OR1K_EXCEPT_TRUE@acv_gpio_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+@OR1K_EXCEPT_TRUE@mmu_SOURCES = $(OR1K_SUPPORT_S) support.h mmu.c mmu_asm.S
+@OR1K_EXCEPT_FALSE@mmu_SOURCES =
+@OR1K_EXCEPT_TRUE@mmu_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+@OR1K_EXCEPT_TRUE@except_test_SOURCES = except_test_s.S except_test.c spr_defs.h
+@OR1K_EXCEPT_FALSE@except_test_SOURCES =
+@OR1K_EXCEPT_TRUE@except_test_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+@OR1K_EXCEPT_TRUE@int_test_SOURCES = spr_defs.h int_test.S
+@OR1K_EXCEPT_FALSE@int_test_SOURCES =
+@OR1K_EXCEPT_TRUE@int_test_LDFLAGS = -T$(OR1K_SRCDIR)/int_test.ld
+@OR1K_EXCEPT_TRUE@fbtest_SOURCES = $(OR1K_SUPPORT_S) support.h fbtest.c
+@OR1K_EXCEPT_FALSE@fbtest_SOURCES =
+@OR1K_EXCEPT_TRUE@fbtest_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+@OR1K_EXCEPT_TRUE@kbdtest_SOURCES = $(OR1K_SUPPORT_S) support.h kbdtest.c
+@OR1K_EXCEPT_FALSE@kbdtest_SOURCES =
+@OR1K_EXCEPT_TRUE@kbdtest_LDFLAGS = -T$(OR1K_SRCDIR)/default.ld
+
+###############################################
+@OR1K_EXCEPT_TRUE@SUBDIRS = support $(SUB_TESTS) $(OR1K_SUB_TESTS)
+@OR1K_EXCEPT_FALSE@SUBDIRS = support $(SUB_TESTS)
+
+@OR1K_EXCEPT_TRUE@OR1K_SUPPORT_S = except.S
+@OR1K_EXCEPT_FALSE@OR1K_SUPPORT_S =
+
+LDADD = support/libsupport.a
+LDFLAGS =
+TESTS_ENVIRONMENT = $(SHELL) ${top_srcdir}/test $(TESTS_ENV)
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
+CONFIG_CLEAN_FILES =
+bin_PROGRAMS = exit$(EXEEXT) cbasic$(EXEEXT) local_global$(EXEEXT) \
+ mul$(EXEEXT) mycompress$(EXEEXT) dhry$(EXEEXT) \
+ functest$(EXEEXT) mem_test$(EXEEXT) basic$(EXEEXT) \
+ cache$(EXEEXT) cfg$(EXEEXT) dmatest$(EXEEXT) eth$(EXEEXT) \
+ mmu$(EXEEXT) except_test$(EXEEXT) int_test$(EXEEXT) \
+ flag$(EXEEXT) fbtest$(EXEEXT) kbdtest$(EXEEXT) \
+ acv_uart$(EXEEXT) acv_gpio$(EXEEXT) mc_dram$(EXEEXT) \
+ mc_ssram$(EXEEXT) mc_async$(EXEEXT) mc_sync$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
+
+@OR1K_EXCEPT_TRUE@am__objects_1 = except.$(OBJEXT)
+@OR1K_EXCEPT_FALSE@am__objects_1 =
+@OR1K_EXCEPT_TRUE@am_acv_gpio_OBJECTS = $(am__objects_1) \
+@OR1K_EXCEPT_TRUE@ acv_gpio.$(OBJEXT)
+@OR1K_EXCEPT_FALSE@am_acv_gpio_OBJECTS =
+acv_gpio_OBJECTS = $(am_acv_gpio_OBJECTS)
+acv_gpio_LDADD = $(LDADD)
+acv_gpio_DEPENDENCIES = support/libsupport.a
+@OR1K_EXCEPT_TRUE@am_acv_uart_OBJECTS = $(am__objects_1) \
+@OR1K_EXCEPT_TRUE@ acv_uart.$(OBJEXT)
+@OR1K_EXCEPT_FALSE@am_acv_uart_OBJECTS =
+acv_uart_OBJECTS = $(am_acv_uart_OBJECTS)
+acv_uart_LDADD = $(LDADD)
+acv_uart_DEPENDENCIES = support/libsupport.a
+@OR1K_EXCEPT_TRUE@am_basic_OBJECTS = basic.$(OBJEXT)
+@OR1K_EXCEPT_FALSE@am_basic_OBJECTS =
+basic_OBJECTS = $(am_basic_OBJECTS)
+@OR1K_EXCEPT_TRUE@basic_DEPENDENCIES =
+@OR1K_EXCEPT_FALSE@basic_DEPENDENCIES =
+@OR1K_EXCEPT_TRUE@am_cache_OBJECTS = cache.$(OBJEXT) cache_asm.$(OBJEXT)
+@OR1K_EXCEPT_FALSE@am_cache_OBJECTS =
+cache_OBJECTS = $(am_cache_OBJECTS)
+cache_LDADD = $(LDADD)
+cache_DEPENDENCIES = support/libsupport.a
+am_cbasic_OBJECTS = $(am__objects_1) cbasic.$(OBJEXT)
+cbasic_OBJECTS = $(am_cbasic_OBJECTS)
+cbasic_LDADD = $(LDADD)
+cbasic_DEPENDENCIES = support/libsupport.a
+@OR1K_EXCEPT_TRUE@am_cfg_OBJECTS = cfg.$(OBJEXT)
+@OR1K_EXCEPT_FALSE@am_cfg_OBJECTS =
+cfg_OBJECTS = $(am_cfg_OBJECTS)
+@OR1K_EXCEPT_TRUE@cfg_DEPENDENCIES =
+@OR1K_EXCEPT_FALSE@cfg_DEPENDENCIES =
+am_dhry_OBJECTS = $(am__objects_1) dhry.$(OBJEXT)
+dhry_OBJECTS = $(am_dhry_OBJECTS)
+dhry_LDADD = $(LDADD)
+dhry_DEPENDENCIES = support/libsupport.a
+@OR1K_EXCEPT_TRUE@am_dmatest_OBJECTS = $(am__objects_1) \
+@OR1K_EXCEPT_TRUE@ dmatest.$(OBJEXT)
+@OR1K_EXCEPT_FALSE@am_dmatest_OBJECTS =
+dmatest_OBJECTS = $(am_dmatest_OBJECTS)
+dmatest_LDADD = $(LDADD)
+dmatest_DEPENDENCIES = support/libsupport.a
+@OR1K_EXCEPT_TRUE@am_eth_OBJECTS = $(am__objects_1) eth.$(OBJEXT)
+@OR1K_EXCEPT_FALSE@am_eth_OBJECTS =
+eth_OBJECTS = $(am_eth_OBJECTS)
+eth_LDADD = $(LDADD)
+eth_DEPENDENCIES = support/libsupport.a
+@OR1K_EXCEPT_TRUE@am_except_test_OBJECTS = except_test_s.$(OBJEXT) \
+@OR1K_EXCEPT_TRUE@ except_test.$(OBJEXT)
+@OR1K_EXCEPT_FALSE@am_except_test_OBJECTS =
+except_test_OBJECTS = $(am_except_test_OBJECTS)
+except_test_LDADD = $(LDADD)
+except_test_DEPENDENCIES = support/libsupport.a
+am_exit_OBJECTS = $(am__objects_1) exit.$(OBJEXT)
+exit_OBJECTS = $(am_exit_OBJECTS)
+exit_LDADD = $(LDADD)
+exit_DEPENDENCIES = support/libsupport.a
+@OR1K_EXCEPT_TRUE@am_fbtest_OBJECTS = $(am__objects_1) fbtest.$(OBJEXT)
+@OR1K_EXCEPT_FALSE@am_fbtest_OBJECTS =
+fbtest_OBJECTS = $(am_fbtest_OBJECTS)
+fbtest_LDADD = $(LDADD)
+fbtest_DEPENDENCIES = support/libsupport.a
+@OR1K_EXCEPT_TRUE@am_flag_OBJECTS = flag.$(OBJEXT)
+@OR1K_EXCEPT_FALSE@am_flag_OBJECTS =
+flag_OBJECTS = $(am_flag_OBJECTS)
+@OR1K_EXCEPT_TRUE@flag_DEPENDENCIES =
+@OR1K_EXCEPT_FALSE@flag_DEPENDENCIES =
+am_functest_OBJECTS = $(am__objects_1) functest.$(OBJEXT)
+functest_OBJECTS = $(am_functest_OBJECTS)
+functest_LDADD = $(LDADD)
+functest_DEPENDENCIES = support/libsupport.a
+@OR1K_EXCEPT_TRUE@am_int_test_OBJECTS = int_test.$(OBJEXT)
+@OR1K_EXCEPT_FALSE@am_int_test_OBJECTS =
+int_test_OBJECTS = $(am_int_test_OBJECTS)
+int_test_LDADD = $(LDADD)
+int_test_DEPENDENCIES = support/libsupport.a
+@OR1K_EXCEPT_TRUE@am_kbdtest_OBJECTS = $(am__objects_1) \
+@OR1K_EXCEPT_TRUE@ kbdtest.$(OBJEXT)
+@OR1K_EXCEPT_FALSE@am_kbdtest_OBJECTS =
+kbdtest_OBJECTS = $(am_kbdtest_OBJECTS)
+kbdtest_LDADD = $(LDADD)
+kbdtest_DEPENDENCIES = support/libsupport.a
+am_local_global_OBJECTS = $(am__objects_1) local_global.$(OBJEXT)
+local_global_OBJECTS = $(am_local_global_OBJECTS)
+local_global_LDADD = $(LDADD)
+local_global_DEPENDENCIES = support/libsupport.a
+@OR1K_EXCEPT_TRUE@am_mc_async_OBJECTS = except_mc.$(OBJEXT) \
+@OR1K_EXCEPT_TRUE@ mc_common.$(OBJEXT) mc_async.$(OBJEXT)
+mc_async_OBJECTS = $(am_mc_async_OBJECTS)
+mc_async_LDADD = $(LDADD)
+mc_async_DEPENDENCIES = support/libsupport.a
+@OR1K_EXCEPT_TRUE@am_mc_dram_OBJECTS = except_mc.$(OBJEXT) \
+@OR1K_EXCEPT_TRUE@ mc_common.$(OBJEXT) mc_dram.$(OBJEXT)
+mc_dram_OBJECTS = $(am_mc_dram_OBJECTS)
+mc_dram_LDADD = $(LDADD)
+mc_dram_DEPENDENCIES = support/libsupport.a
+@OR1K_EXCEPT_TRUE@am_mc_ssram_OBJECTS = except_mc.$(OBJEXT) \
+@OR1K_EXCEPT_TRUE@ mc_common.$(OBJEXT) mc_ssram.$(OBJEXT)
+mc_ssram_OBJECTS = $(am_mc_ssram_OBJECTS)
+mc_ssram_LDADD = $(LDADD)
+mc_ssram_DEPENDENCIES = support/libsupport.a
+@OR1K_EXCEPT_TRUE@am_mc_sync_OBJECTS = except_mc.$(OBJEXT) \
+@OR1K_EXCEPT_TRUE@ mc_common.$(OBJEXT) mc_sync.$(OBJEXT)
+mc_sync_OBJECTS = $(am_mc_sync_OBJECTS)
+mc_sync_LDADD = $(LDADD)
+mc_sync_DEPENDENCIES = support/libsupport.a
+am_mem_test_OBJECTS = $(am__objects_1) mem_test.$(OBJEXT)
+mem_test_OBJECTS = $(am_mem_test_OBJECTS)
+mem_test_LDADD = $(LDADD)
+mem_test_DEPENDENCIES = support/libsupport.a
+@OR1K_EXCEPT_TRUE@am_mmu_OBJECTS = $(am__objects_1) mmu.$(OBJEXT) \
+@OR1K_EXCEPT_TRUE@ mmu_asm.$(OBJEXT)
+@OR1K_EXCEPT_FALSE@am_mmu_OBJECTS =
+mmu_OBJECTS = $(am_mmu_OBJECTS)
+mmu_LDADD = $(LDADD)
+mmu_DEPENDENCIES = support/libsupport.a
+am_mul_OBJECTS = $(am__objects_1) mul.$(OBJEXT)
+mul_OBJECTS = $(am_mul_OBJECTS)
+mul_LDADD = $(LDADD)
+mul_DEPENDENCIES = support/libsupport.a
+am_mycompress_OBJECTS = $(am__objects_1) mycompress.$(OBJEXT)
+mycompress_OBJECTS = $(am_mycompress_OBJECTS)
+mycompress_LDADD = $(LDADD)
+mycompress_DEPENDENCIES = support/libsupport.a
+
+DEFS = @DEFS@
+DEFAULT_INCLUDES = -I. -I$(srcdir)
+CPPFLAGS = @CPPFLAGS@
+LIBS = @LIBS@
+depcomp = $(SHELL) $(top_srcdir)/../depcomp
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/acv_gpio.Po ./$(DEPDIR)/acv_uart.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/cache.Po ./$(DEPDIR)/cbasic.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/dhry.Po ./$(DEPDIR)/dmatest.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/eth.Po ./$(DEPDIR)/except_test.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/exit.Po ./$(DEPDIR)/fbtest.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/functest.Po ./$(DEPDIR)/kbdtest.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/local_global.Po ./$(DEPDIR)/mc_async.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mc_common.Po ./$(DEPDIR)/mc_dram.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mc_ssram.Po ./$(DEPDIR)/mc_sync.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mem_test.Po ./$(DEPDIR)/mmu.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/mul.Po ./$(DEPDIR)/mycompress.Po
+CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+CFLAGS = @CFLAGS@
+DIST_SOURCES = $(acv_gpio_SOURCES) $(acv_uart_SOURCES) $(basic_SOURCES) \
+ $(cache_SOURCES) $(cbasic_SOURCES) $(cfg_SOURCES) \
+ $(dhry_SOURCES) $(dmatest_SOURCES) $(eth_SOURCES) \
+ $(except_test_SOURCES) $(exit_SOURCES) $(fbtest_SOURCES) \
+ $(flag_SOURCES) $(functest_SOURCES) $(int_test_SOURCES) \
+ $(kbdtest_SOURCES) $(local_global_SOURCES) $(mc_async_SOURCES) \
+ $(mc_dram_SOURCES) $(mc_ssram_SOURCES) $(mc_sync_SOURCES) \
+ $(mem_test_SOURCES) $(mmu_SOURCES) $(mul_SOURCES) \
+ $(mycompress_SOURCES)
+
+RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
+ uninstall-info-recursive all-recursive install-data-recursive \
+ install-exec-recursive installdirs-recursive install-recursive \
+ uninstall-recursive check-recursive installcheck-recursive
+DIST_COMMON = README ../config.guess ../config.sub ../depcomp \
+ ../install-sh ../missing ../mkinstalldirs COPYING Makefile.am \
+ Makefile.in TODO aclocal.m4 config.sub configure configure.in
+DIST_SUBDIRS = support uos
+SOURCES = $(acv_gpio_SOURCES) $(acv_uart_SOURCES) $(basic_SOURCES) $(cache_SOURCES) $(cbasic_SOURCES) $(cfg_SOURCES) $(dhry_SOURCES) $(dmatest_SOURCES) $(eth_SOURCES) $(except_test_SOURCES) $(exit_SOURCES) $(fbtest_SOURCES) $(flag_SOURCES) $(functest_SOURCES) $(int_test_SOURCES) $(kbdtest_SOURCES) $(local_global_SOURCES) $(mc_async_SOURCES) $(mc_dram_SOURCES) $(mc_ssram_SOURCES) $(mc_sync_SOURCES) $(mem_test_SOURCES) $(mmu_SOURCES) $(mul_SOURCES) $(mycompress_SOURCES)
+
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .S .c .o .obj
+
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
+
+$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
+
+$(ACLOCAL_M4): configure.in
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ ; then \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
+ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+ rm -f $(DESTDIR)$(bindir)/$$f; \
+ done
+
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+acv_gpio$(EXEEXT): $(acv_gpio_OBJECTS) $(acv_gpio_DEPENDENCIES)
+ @rm -f acv_gpio$(EXEEXT)
+ $(LINK) $(acv_gpio_LDFLAGS) $(acv_gpio_OBJECTS) $(acv_gpio_LDADD) $(LIBS)
+acv_uart$(EXEEXT): $(acv_uart_OBJECTS) $(acv_uart_DEPENDENCIES)
+ @rm -f acv_uart$(EXEEXT)
+ $(LINK) $(acv_uart_LDFLAGS) $(acv_uart_OBJECTS) $(acv_uart_LDADD) $(LIBS)
+basic$(EXEEXT): $(basic_OBJECTS) $(basic_DEPENDENCIES)
+ @rm -f basic$(EXEEXT)
+ $(LINK) $(basic_LDFLAGS) $(basic_OBJECTS) $(basic_LDADD) $(LIBS)
+cache$(EXEEXT): $(cache_OBJECTS) $(cache_DEPENDENCIES)
+ @rm -f cache$(EXEEXT)
+ $(LINK) $(cache_LDFLAGS) $(cache_OBJECTS) $(cache_LDADD) $(LIBS)
+cbasic$(EXEEXT): $(cbasic_OBJECTS) $(cbasic_DEPENDENCIES)
+ @rm -f cbasic$(EXEEXT)
+ $(LINK) $(cbasic_LDFLAGS) $(cbasic_OBJECTS) $(cbasic_LDADD) $(LIBS)
+cfg$(EXEEXT): $(cfg_OBJECTS) $(cfg_DEPENDENCIES)
+ @rm -f cfg$(EXEEXT)
+ $(LINK) $(cfg_LDFLAGS) $(cfg_OBJECTS) $(cfg_LDADD) $(LIBS)
+dhry$(EXEEXT): $(dhry_OBJECTS) $(dhry_DEPENDENCIES)
+ @rm -f dhry$(EXEEXT)
+ $(LINK) $(dhry_LDFLAGS) $(dhry_OBJECTS) $(dhry_LDADD) $(LIBS)
+dmatest$(EXEEXT): $(dmatest_OBJECTS) $(dmatest_DEPENDENCIES)
+ @rm -f dmatest$(EXEEXT)
+ $(LINK) $(dmatest_LDFLAGS) $(dmatest_OBJECTS) $(dmatest_LDADD) $(LIBS)
+eth$(EXEEXT): $(eth_OBJECTS) $(eth_DEPENDENCIES)
+ @rm -f eth$(EXEEXT)
+ $(LINK) $(eth_LDFLAGS) $(eth_OBJECTS) $(eth_LDADD) $(LIBS)
+except_test$(EXEEXT): $(except_test_OBJECTS) $(except_test_DEPENDENCIES)
+ @rm -f except_test$(EXEEXT)
+ $(LINK) $(except_test_LDFLAGS) $(except_test_OBJECTS) $(except_test_LDADD) $(LIBS)
+exit$(EXEEXT): $(exit_OBJECTS) $(exit_DEPENDENCIES)
+ @rm -f exit$(EXEEXT)
+ $(LINK) $(exit_LDFLAGS) $(exit_OBJECTS) $(exit_LDADD) $(LIBS)
+fbtest$(EXEEXT): $(fbtest_OBJECTS) $(fbtest_DEPENDENCIES)
+ @rm -f fbtest$(EXEEXT)
+ $(LINK) $(fbtest_LDFLAGS) $(fbtest_OBJECTS) $(fbtest_LDADD) $(LIBS)
+flag$(EXEEXT): $(flag_OBJECTS) $(flag_DEPENDENCIES)
+ @rm -f flag$(EXEEXT)
+ $(LINK) $(flag_LDFLAGS) $(flag_OBJECTS) $(flag_LDADD) $(LIBS)
+functest$(EXEEXT): $(functest_OBJECTS) $(functest_DEPENDENCIES)
+ @rm -f functest$(EXEEXT)
+ $(LINK) $(functest_LDFLAGS) $(functest_OBJECTS) $(functest_LDADD) $(LIBS)
+int_test$(EXEEXT): $(int_test_OBJECTS) $(int_test_DEPENDENCIES)
+ @rm -f int_test$(EXEEXT)
+ $(LINK) $(int_test_LDFLAGS) $(int_test_OBJECTS) $(int_test_LDADD) $(LIBS)
+kbdtest$(EXEEXT): $(kbdtest_OBJECTS) $(kbdtest_DEPENDENCIES)
+ @rm -f kbdtest$(EXEEXT)
+ $(LINK) $(kbdtest_LDFLAGS) $(kbdtest_OBJECTS) $(kbdtest_LDADD) $(LIBS)
+local_global$(EXEEXT): $(local_global_OBJECTS) $(local_global_DEPENDENCIES)
+ @rm -f local_global$(EXEEXT)
+ $(LINK) $(local_global_LDFLAGS) $(local_global_OBJECTS) $(local_global_LDADD) $(LIBS)
+mc_async$(EXEEXT): $(mc_async_OBJECTS) $(mc_async_DEPENDENCIES)
+ @rm -f mc_async$(EXEEXT)
+ $(LINK) $(mc_async_LDFLAGS) $(mc_async_OBJECTS) $(mc_async_LDADD) $(LIBS)
+mc_dram$(EXEEXT): $(mc_dram_OBJECTS) $(mc_dram_DEPENDENCIES)
+ @rm -f mc_dram$(EXEEXT)
+ $(LINK) $(mc_dram_LDFLAGS) $(mc_dram_OBJECTS) $(mc_dram_LDADD) $(LIBS)
+mc_ssram$(EXEEXT): $(mc_ssram_OBJECTS) $(mc_ssram_DEPENDENCIES)
+ @rm -f mc_ssram$(EXEEXT)
+ $(LINK) $(mc_ssram_LDFLAGS) $(mc_ssram_OBJECTS) $(mc_ssram_LDADD) $(LIBS)
+mc_sync$(EXEEXT): $(mc_sync_OBJECTS) $(mc_sync_DEPENDENCIES)
+ @rm -f mc_sync$(EXEEXT)
+ $(LINK) $(mc_sync_LDFLAGS) $(mc_sync_OBJECTS) $(mc_sync_LDADD) $(LIBS)
+mem_test$(EXEEXT): $(mem_test_OBJECTS) $(mem_test_DEPENDENCIES)
+ @rm -f mem_test$(EXEEXT)
+ $(LINK) $(mem_test_LDFLAGS) $(mem_test_OBJECTS) $(mem_test_LDADD) $(LIBS)
+mmu$(EXEEXT): $(mmu_OBJECTS) $(mmu_DEPENDENCIES)
+ @rm -f mmu$(EXEEXT)
+ $(LINK) $(mmu_LDFLAGS) $(mmu_OBJECTS) $(mmu_LDADD) $(LIBS)
+mul$(EXEEXT): $(mul_OBJECTS) $(mul_DEPENDENCIES)
+ @rm -f mul$(EXEEXT)
+ $(LINK) $(mul_LDFLAGS) $(mul_OBJECTS) $(mul_LDADD) $(LIBS)
+mycompress$(EXEEXT): $(mycompress_OBJECTS) $(mycompress_DEPENDENCIES)
+ @rm -f mycompress$(EXEEXT)
+ $(LINK) $(mycompress_LDFLAGS) $(mycompress_OBJECTS) $(mycompress_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acv_gpio.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acv_uart.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cache.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cbasic.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dhry.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmatest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eth.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/except_test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbtest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/functest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kbdtest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/local_global.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mc_async.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mc_common.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mc_dram.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mc_ssram.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mc_sync.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mem_test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmu.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mul.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mycompress.Po@am__quote@
+
+distclean-depend:
+ -rm -rf ./$(DEPDIR)
+
+.S.o:
+ $(CCASCOMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
+
+.S.obj:
+ $(CCASCOMPILE) -c `cygpath -w $<`
+
+.c.o:
+@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
+
+.c.obj:
+@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(COMPILE) -c `cygpath -w $<`
+CCDEPMODE = @CCDEPMODE@
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @set fnord $$MAKEFLAGS; amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $$MAKEFLAGS; amf=$$2; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+
+ETAGS = etags
+ETAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list='$(TESTS)'; \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *" $$tst "*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ echo "XPASS: $$tst"; \
+ ;; \
+ *) \
+ echo "PASS: $$tst"; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *" $$tst "*) \
+ xfail=`expr $$xfail + 1`; \
+ echo "XFAIL: $$tst"; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ echo "FAIL: $$tst"; \
+ ;; \
+ esac; \
+ fi; \
+ done; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="All $$all tests passed"; \
+ else \
+ banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all tests failed"; \
+ else \
+ banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
+ fi; \
+ fi; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ echo "$$dashes"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = .
+distdir = $(PACKAGE)-$(VERSION)
+
+am__remove_distdir = \
+ { test ! -d $(distdir) \
+ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr $(distdir); }; }
+
+GZIP_ENV = --best
+distcleancheck_listfiles = find . -type f -print
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ mkdir $(distdir)
+ $(mkinstalldirs) $(distdir)/..
+ @list='$(DISTFILES)'; for file in $$list; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" \
+ distdir=../$(distdir)/$$subdir \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r $(distdir)
+dist-gzip: distdir
+ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ $(am__remove_distdir)
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/=build
+ mkdir $(distdir)/=inst
+ chmod a-w $(distdir)
+ dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \
+ && cd $(distdir)/=build \
+ && ../configure --srcdir=.. --prefix=$$dc_install_base \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ find $$dc_install_base -type f -print ; \
+ exit 1; } >&2 ) \
+ && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
+ && rm -f $(distdir).tar.gz \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+ $(am__remove_distdir)
+ @echo "$(distdir).tar.gz is ready for distribution" | \
+ sed 'h;s/./=/g;p;x;p;x'
+distcleancheck: distclean
+ if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-recursive
+all-am: Makefile $(PROGRAMS)
+installdirs: installdirs-recursive
+installdirs-am:
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+distclean-am: clean-am distclean-compile distclean-depend \
+ distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf autom4te.cache
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-TESTS check-am \
+ clean clean-binPROGRAMS clean-generic clean-recursive dist \
+ dist-all dist-gzip distcheck distclean distclean-compile \
+ distclean-depend distclean-generic distclean-recursive \
+ distclean-tags distcleancheck distdir dvi dvi-am dvi-recursive \
+ info info-am info-recursive install install-am \
+ install-binPROGRAMS install-data install-data-am \
+ install-data-recursive install-exec install-exec-am \
+ install-exec-recursive install-info install-info-am \
+ install-info-recursive install-man install-recursive \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am installdirs-recursive maintainer-clean \
+ maintainer-clean-generic maintainer-clean-recursive mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-recursive \
+ tags tags-recursive uninstall uninstall-am \
+ uninstall-binPROGRAMS uninstall-info-am \
+ uninstall-info-recursive uninstall-recursive
+
+
+again: clean all
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Makefile.in
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: uos/Makefile.in
===================================================================
--- uos/Makefile.in (nonexistent)
+++ uos/Makefile.in (revision 1765)
@@ -0,0 +1,357 @@
+# Makefile.in generated by automake 1.6.3 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+#
+# This file is part of OpenRISC 1000 Architectural Simulator.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+
+EXEEXT = @EXEEXT@
+OBJEXT = @OBJEXT@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+AMTAR = @AMTAR@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASFLAGS = @CCASFLAGS@
+DEPDIR = @DEPDIR@
+INCLUDES = @INCLUDES@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+MAKE_SHELL = @MAKE_SHELL@
+OR1K_SRCDIR = @OR1K_SRCDIR@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+SIM = @SIM@
+STRIP = @STRIP@
+TESTS_ENV = @TESTS_ENV@
+VERSION = @VERSION@
+am__include = @am__include@
+am__quote = @am__quote@
+install_sh = @install_sh@
+
+LDADD = ../support/libsupport.a
+LDFLAGS = -T${top_srcdir}/default.ld
+
+bin_PROGRAMS = uos
+uos_SOURCES = except_or32.S support.h spr_defs.h task.c int.h ipc.h tick.c uos.h uos.c
+subdir = uos
+mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
+CONFIG_CLEAN_FILES =
+bin_PROGRAMS = uos$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
+
+am_uos_OBJECTS = except_or32.$(OBJEXT) task.$(OBJEXT) tick.$(OBJEXT) \
+ uos.$(OBJEXT)
+uos_OBJECTS = $(am_uos_OBJECTS)
+uos_LDADD = $(LDADD)
+uos_DEPENDENCIES = ../support/libsupport.a
+uos_LDFLAGS =
+
+DEFS = @DEFS@
+DEFAULT_INCLUDES = -I. -I$(srcdir)
+CPPFLAGS = @CPPFLAGS@
+LIBS = @LIBS@
+depcomp = $(SHELL) $(top_srcdir)/../depcomp
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/task.Po ./$(DEPDIR)/tick.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/uos.Po
+CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+CFLAGS = @CFLAGS@
+DIST_SOURCES = $(uos_SOURCES)
+DIST_COMMON = README Makefile.am Makefile.in
+SOURCES = $(uos_SOURCES)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .S .c .o .obj
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu uos/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ ; then \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
+ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+ rm -f $(DESTDIR)$(bindir)/$$f; \
+ done
+
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+uos$(EXEEXT): $(uos_OBJECTS) $(uos_DEPENDENCIES)
+ @rm -f uos$(EXEEXT)
+ $(LINK) $(uos_LDFLAGS) $(uos_OBJECTS) $(uos_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/task.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tick.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uos.Po@am__quote@
+
+distclean-depend:
+ -rm -rf ./$(DEPDIR)
+
+.S.o:
+ $(CCASCOMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
+
+.S.obj:
+ $(CCASCOMPILE) -c `cygpath -w $<`
+
+.c.o:
+@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
+
+.c.obj:
+@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(COMPILE) -c `cygpath -w $<`
+CCDEPMODE = @CCDEPMODE@
+uninstall-info-am:
+
+ETAGS = etags
+ETAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+ @list='$(DISTFILES)'; for file in $$list; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-am
+
+distclean-am: clean-am distclean-compile distclean-depend \
+ distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+
+.PHONY: GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic distclean distclean-compile distclean-depend \
+ distclean-generic distclean-tags distdir dvi dvi-am info \
+ info-am install install-am install-binPROGRAMS install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-info-am install-man install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic tags uninstall uninstall-am \
+ uninstall-binPROGRAMS uninstall-info-am
+
+
+again: clean all
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: uos/task.c
===================================================================
--- uos/task.c (nonexistent)
+++ uos/task.c (revision 1765)
@@ -0,0 +1,54 @@
+/* This file is part of test microkernel for OpenRISC 1000. */
+/* (C) 2000 Damjan Lampret, lampret@opencores.org */
+
+#include "support.h"
+#include "uos.h"
+#include "ipc.h"
+#include "int.h"
+
+extern struct tcb tasks[MAX_TASKS+1];
+
+int task(int id)
+{
+ int rc;
+ struct _msg {
+ char id;
+ unsigned long count;
+ } msg;
+
+ printf("Task %d started\n", id);
+
+ if(id == 1) {
+ msg.id = 1;
+ msg.count = 0;
+ uos_msgsnd(2, (char *)&msg, sizeof(msg));
+ }
+
+ for(;;) {
+ rc = uos_msgrcv(0, (char *)&msg, sizeof(msg));
+
+ if(rc != 0) {
+ printf("Task %d: Waiting for massage\n", id);
+ } else {
+ printf("Task %d: Got massage from task %d: 0x%.8x. Sending message to task %d: 0x%.8x \n", id, msg.id, (int)msg.count, (id == 3 ? 1 : (id + 1)), (int)(msg.count + 1));
+ msg.id = id;
+
+ if((id == 1) && (msg.count > 15)) {
+ report(msg.count + 0xdeadde9c);
+ exit(0);
+ }
+
+ msg.count += 1;
+ uos_msgsnd((id == 3 ? 1 : (id + 1)), (char *)&msg, sizeof(msg));
+ }
+ }
+}
+
+/* Called by kernel_init to collect all tasks entries. */
+void tasks_entries()
+{
+ tasks[1].regs.pc = (unsigned long)task;
+ tasks[2].regs.pc = (unsigned long)task;
+ tasks[3].regs.pc = (unsigned long)task;
+}
+
Index: uos/uos.c
===================================================================
--- uos/uos.c (nonexistent)
+++ uos/uos.c (revision 1765)
@@ -0,0 +1,314 @@
+/* This file is part of test microkernel for OpenRISC 1000. */
+/* (C) 2000 Damjan Lampret, lampret@opencores.org */
+
+#include "support.h"
+#include "spr_defs.h"
+#include "uos.h"
+#include "ipc.h"
+#include "int.h"
+
+/* External functions prototypes */
+int tick_init(unsigned long period, void (* inf)(void));
+
+/* Pointers to contexts used by except_or32.S routines */
+unsigned long *task_context;
+unsigned long *kernel_context;
+
+/* TCBs for all tasks in the system */
+struct tcb tasks[MAX_TASKS+1];
+
+/* Stacks for the tasks (stacks[0] is kernel stack) */
+unsigned char stacks[MAX_TASKS+1][STACK_SIZE];
+
+/* MCBs for IPC messages */
+struct mcb msgs[MAX_MSGS];
+
+/* Pointer to linked list of free MCBs. */
+struct mcb *free_mcbs;
+
+/* TID of the current user task */
+tid_t curtask = 0;
+
+/* Statistics */
+int kernel_sched_cnt = 0;
+int kernel_syscall_cnt = 0;
+
+/* Timestamp via or1ksim (CPU cycle number). */
+unsigned long timestamp()
+{
+ register unsigned long cycles asm("r3");
+ asm("l.sys 201");
+ return cycles;
+}
+
+/* Standard function for filling memory with a constant byte. */
+void *memset(void *dst, int c, size_t size)
+{
+ char *tmp = dst;
+
+ for(;tmp && (tmp < (char *)dst + size); tmp++)
+ *(char *)tmp = (char)c;
+
+ return dst;
+}
+
+/* Traverse linked list of MCBs and show individual messages. */
+void kernel_show_mcbs(struct mcb *mcb)
+{
+ for(;mcb; mcb = mcb->next) {
+ printf("MCB len=%u origintask=%u ", mcb->length, mcb->origin);
+ printf("msg:%s\n", mcb->msg);
+ }
+}
+
+/* Show all contexts. */
+void kernel_show_contexts()
+{
+ int i;
+ tid_t t;
+
+ for(t = 1; t <= MAX_TASKS; t++) {
+ printf("\ntask TID=%d: PC=0x%x ", t, (unsigned)tasks[t].regs.pc & ~0x3);
+ printf("SP(r1)=0x%x ", (unsigned)tasks[t].regs.sp);
+ printf("SR[IEE]=%d\n", (unsigned)tasks[t].regs.sr & SPR_SR_IEE);
+ printf("SR[TEE]=%d\n", (unsigned)tasks[t].regs.sr & SPR_SR_TEE);
+ printf("SR[SM]=%d\n", (unsigned)tasks[t].regs.sr & SPR_SR_SM);
+ for(i = 1; i < GPRS; i++) {
+ if (i % 4 == 0)
+ printf("\n");
+ printf("r%d=0x%.8x ", i, (unsigned)tasks[t].regs.gprs[i]);
+ }
+ printf("\n");
+ kernel_show_mcbs(tasks[t].waiting_msgs);
+ }
+ printf("\n");
+}
+
+/* Simple round-robin scheduler that directly calls dispatcher. It is
+ called by low level external interrupt exception handler or by
+ kernel_syscall if KERNEL_SYSCALL_SCHED is defined. */
+void kernel_sched()
+{
+ if ((++curtask > MAX_TASKS) || !(tasks[curtask].regs.pc & ~0x3))
+ curtask = 1;
+ task_context = (unsigned long *)&tasks[curtask].regs;
+
+#if KERNEL_OUTPUT
+ printf("kernel_sched(): entry number %d, ", ++kernel_sched_cnt);
+ printf("dispatching task TID=%d, time %u cycles", curtask, timestamp());
+
+ kernel_show_contexts();
+#endif
+
+ dispatch();
+}
+
+/* System call uos_msgsnd. */
+int uos_msgsnd(tid_t desttask, char *buf, int len)
+{
+ asm("l.sys 1");
+ asm("l.nop");
+}
+
+/* System call uos_msgrcv. */
+int uos_msgrcv(tid_t origintask, char *buf, int len)
+{
+ asm("l.sys 2");
+ asm("l.nop");
+}
+
+/* Handles system call uos_msgsnd. */
+void kernel_msgsnd(tid_t tid)
+{
+ struct mcb *mcb;
+ struct mcb **dstmq;
+ struct tcb *task;
+
+ task = &tasks[tid];
+
+ /* Sanity checks. */
+
+ /* Does destination task exist? */
+ if (!task->regs.gprs[1] || (task->regs.gprs[1] > MAX_TASKS)) {
+ task->regs.gprs[9] = IPC_ENOTASK;
+ return;
+ }
+
+ /* Are there any free MCBs? */
+ if (!free_mcbs) {
+ task->regs.gprs[9] = IPC_EOUTOFMCBS;
+ return;
+ }
+
+ /* Is message too big to fit into MCB's message buffer? */
+ if (task->regs.gprs[3] > MAX_MSGLEN) {
+ task->regs.gprs[9] = IPC_ETOOBIG;
+ return;
+ }
+
+ /* OK, send the message. */
+
+ /* First, allocate MCB. */
+ mcb = free_mcbs;
+ free_mcbs = mcb->next;
+
+ /* Second, copy message to the MCB. */
+ memcpy(mcb->msg, (void *)task->regs.gprs[2], task->regs.gprs[3]);
+ mcb->origin = tid;
+ mcb->length = task->regs.gprs[3];
+ mcb->next = NULL;
+
+ /* Insert MCB into destination task's message queue at
+ the end. */
+ dstmq = &tasks[task->regs.gprs[1]].waiting_msgs;
+ for(;*dstmq;)
+ dstmq = &((*dstmq)->next);
+ *dstmq = mcb;
+
+ task->regs.gprs[9] = IPC_NOERR;
+ return;
+}
+
+/* Handles system call uos_msgrcv. */
+void kernel_msgrcv(tid_t tid)
+{
+ struct mcb *mcb;
+ struct mcb *curmsg, **linkp;
+ struct tcb *task;
+
+ task = &tasks[tid];
+
+ /* Sanity checks. */
+
+ /* Does origin task exist? */
+ if (task->regs.gprs[1] > MAX_TASKS) {
+ task->regs.gprs[9] = IPC_ENOTASK;
+ return;
+ }
+
+ /* Are there any messages waiting for reception? */
+ if (!task->waiting_msgs) {
+ task->regs.gprs[9] = IPC_ENOMSGS;
+ return;
+ }
+
+ /* OK, receive the message. */
+
+ /* Search waiting messages for one coming from origintask. If
+ origintask is zero then grab the first message. */
+ curmsg = task->waiting_msgs;
+ linkp = &task->waiting_msgs;
+ for(;task->regs.gprs[1] && curmsg->next && curmsg->origin != task->regs.gprs[1];) {
+ linkp = &curmsg->next;
+ curmsg = curmsg->next;
+ }
+
+ /* Is receive buffer too small for receiving message? */
+ if (task->regs.gprs[3] < curmsg->length) {
+ task->regs.gprs[9] = IPC_ETOOBIG;
+ return;
+ }
+
+ /* Now copy the message from the MCB. */
+ memcpy((void *)task->regs.gprs[2], curmsg->msg, task->regs.gprs[3]);
+
+ /* Remove MCB from task's waiting queue and place it
+ back into free MCBs queue. */
+ *linkp = curmsg->next;
+ curmsg->next = free_mcbs;
+ free_mcbs = curmsg;
+
+ task->regs.gprs[9] = IPC_NOERR;
+ return;
+}
+
+/* Handles all uOS system calls. It is called by low level system call
+ exception handler. */
+void kernel_syscall()
+{
+ unsigned short syscall_num;
+
+#if KERNEL_OUTPUT
+ printf("kernel_syscall(): entry number %d, ", ++kernel_syscall_cnt);
+ printf("current TID=%d, time %u cycles", curtask, timestamp());
+
+ kernel_show_contexts();
+#endif
+ syscall_num = *(unsigned short *)((tasks[curtask].regs.pc & ~0x3) - 6);
+
+ switch(syscall_num) {
+ case IPC_MSGSND:
+ kernel_msgsnd(curtask);
+ break;
+ case IPC_MSGRCV:
+ kernel_msgrcv(curtask);
+ break;
+ default:
+ printf("kernel_syscall(): unknown syscall (%u)\n", syscall_num);
+ }
+
+#if KERNEL_SYSCALL_SCHED
+ kernel_sched();
+#endif
+ dispatch();
+}
+
+/* Called by reset exception handler to initialize the kernel and start
+ rolling first task. */
+int kernel_init()
+{
+ tid_t t;
+ int i;
+
+ printf("Initializing kernel:\n");
+
+ printf(" Clearing kernel structures...\n");
+ memset(tasks, 0, sizeof(tasks));
+ memset(stacks, 0, sizeof(stacks));
+ memset(msgs, 0, sizeof(msgs));
+
+ printf(" Initializing MCBs... %d MCB(s)\n", MAX_MSGS);
+ for(i = 0; i < (MAX_MSGS - 1); i++)
+ msgs[i].next = &msgs[i+1];
+ free_mcbs = &msgs[0];
+
+ printf(" Initializing TCBs... %d user task(s)\n", MAX_TASKS);
+
+ tasks_entries();
+
+ for(t = 0; t <= MAX_TASKS; t++) {
+ tasks[t].regs.sp = (unsigned long)stacks[t] + STACK_SIZE - 4;
+ /* Disable EXR for kernel context */
+ tasks[t].regs.sr |= (t == 0 ? SPR_SR_SM : SPR_SR_TEE | SPR_SR_IEE);
+ tasks[t].regs.gprs[1] = t;
+ }
+
+ /* First task runs in seprvisor mode */
+ tasks[1].regs.sr |= SPR_SR_SM;
+
+ /* TID=0 is reserved for kernel use */
+ kernel_context = (unsigned long *)&tasks[0].regs;
+
+ /* First task to be scheduled is task TID=1 */
+ task_context = (unsigned long *)&tasks[1].regs;
+
+ /* Initialize initrrupt controller */
+ int_init();
+
+ printf(" Exceptions will be enabled when first task is dispatched.\n");
+ printf("Kernel initalized. Starting first user task.\n");
+
+#if KERNEL_SYSCALL_SCHED
+ kernel_sched(); /* Lets schedule and dispatch our first task */
+#else
+ tick_init(TICK_PERIOD, kernel_sched);
+ kernel_sched(); /* Lets schedule and dispatch our first task */
+#endif
+ /* ... */ /* We never get here */
+}
+
+int main ()
+{
+ kernel_init();
+ return 0;
+}
Index: uos/spr_defs.h
===================================================================
--- uos/spr_defs.h (nonexistent)
+++ uos/spr_defs.h (revision 1765)
@@ -0,0 +1,428 @@
+/* spr_defs.h -- Defines OR1K architecture specific special-purpose registers
+ Copyright (C) 1999 Damjan Lampret, lampret@opencores.org
+
+This file is part of OpenRISC 1000 Architectural Simulator.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+/* This file is also used by microkernel test bench. Among
+others it is also used in assembly file(s). */
+
+/* Definition of special-purpose registers (SPRs) */
+
+#define MAX_GRPS (32)
+#define MAX_SPRS_PER_GRP_BITS (11)
+#define MAX_SPRS_PER_GRP (1 << MAX_SPRS_PER_GRP_BITS)
+#define MAX_SPRS (0x10000)
+
+/* Base addresses for the groups */
+#define SPRGROUP_SYS (0<< MAX_SPRS_PER_GRP_BITS)
+#define SPRGROUP_DMMU (1<< MAX_SPRS_PER_GRP_BITS)
+#define SPRGROUP_IMMU (2<< MAX_SPRS_PER_GRP_BITS)
+#define SPRGROUP_DC (3<< MAX_SPRS_PER_GRP_BITS)
+#define SPRGROUP_IC (4<< MAX_SPRS_PER_GRP_BITS)
+#define SPRGROUP_MAC (5<< MAX_SPRS_PER_GRP_BITS)
+#define SPRGROUP_D (6<< MAX_SPRS_PER_GRP_BITS)
+#define SPRGROUP_PC (7<< MAX_SPRS_PER_GRP_BITS)
+#define SPRGROUP_PM (8<< MAX_SPRS_PER_GRP_BITS)
+#define SPRGROUP_PIC (9<< MAX_SPRS_PER_GRP_BITS)
+#define SPRGROUP_TT (10<< MAX_SPRS_PER_GRP_BITS)
+
+/* System control and status group */
+#define SPR_VR (SPRGROUP_SYS + 0)
+#define SPR_UPR (SPRGROUP_SYS + 1)
+#define SPR_CPUCFGR (SPRGROUP_SYS + 2)
+#define SPR_DMMUCFGR (SPRGROUP_SYS + 3)
+#define SPR_IMMUCFGR (SPRGROUP_SYS + 4)
+#define SPR_DCCFGR (SPRGROUP_SYS + 5)
+#define SPR_ICCFGR (SPRGROUP_SYS + 6)
+#define SPR_DCFGR (SPRGROUP_SYS + 7)
+#define SPR_PCCFGR (SPRGROUP_SYS + 8)
+#define SPR_NPC (SPRGROUP_SYS + 16) /* CZ 21/06/01 */
+#define SPR_SR (SPRGROUP_SYS + 17) /* CZ 21/06/01 */
+#define SPR_PPC (SPRGROUP_SYS + 18) /* CZ 21/06/01 */
+#define SPR_EPCR_BASE (SPRGROUP_SYS + 32) /* CZ 21/06/01 */
+#define SPR_EPCR_LAST (SPRGROUP_SYS + 47) /* CZ 21/06/01 */
+#define SPR_EEAR_BASE (SPRGROUP_SYS + 48)
+#define SPR_EEAR_LAST (SPRGROUP_SYS + 63)
+#define SPR_ESR_BASE (SPRGROUP_SYS + 64)
+#define SPR_ESR_LAST (SPRGROUP_SYS + 79)
+
+/* Data MMU group */
+#define SPR_DMMUCR (SPRGROUP_DMMU + 0)
+#define SPR_DTLBMR_BASE(WAY) (SPRGROUP_DMMU + 0x200 + (WAY) * 0x200)
+#define SPR_DTLBMR_LAST(WAY) (SPRGROUP_DMMU + 0x2ff + (WAY) * 0x200)
+#define SPR_DTLBTR_BASE(WAY) (SPRGROUP_DMMU + 0x300 + (WAY) * 0x200)
+#define SPR_DTLBTR_LAST(WAY) (SPRGROUP_DMMU + 0x3ff + (WAY) * 0x200)
+
+/* Instruction MMU group */
+#define SPR_IMMUCR (SPRGROUP_IMMU + 0)
+#define SPR_ITLBMR_BASE(WAY) (SPRGROUP_IMMU + 0x200 + (WAY) * 0x200)
+#define SPR_ITLBMR_LAST(WAY) (SPRGROUP_IMMU + 0x2ff + (WAY) * 0x200)
+#define SPR_ITLBTR_BASE(WAY) (SPRGROUP_IMMU + 0x300 + (WAY) * 0x200)
+#define SPR_ITLBTR_LAST(WAY) (SPRGROUP_IMMU + 0x3ff + (WAY) * 0x200)
+
+/* Data cache group */
+#define SPR_DCCR (SPRGROUP_DC + 0)
+#define SPR_DCBPR (SPRGROUP_DC + 1)
+#define SPR_DCBFR (SPRGROUP_DC + 2)
+#define SPR_DCBIR (SPRGROUP_DC + 3)
+#define SPR_DCBWR (SPRGROUP_DC + 4)
+#define SPR_DCBLR (SPRGROUP_DC + 5)
+#define SPR_DCR_BASE(WAY) (SPRGROUP_DC + 0x200 + (WAY) * 0x200)
+#define SPR_DCR_LAST(WAY) (SPRGROUP_DC + 0x3ff + (WAY) * 0x200)
+
+/* Instruction cache group */
+#define SPR_ICCR (SPRGROUP_IC + 0)
+#define SPR_ICBPR (SPRGROUP_IC + 1)
+#define SPR_ICBIR (SPRGROUP_IC + 2)
+#define SPR_ICBLR (SPRGROUP_IC + 3)
+#define SPR_ICR_BASE(WAY) (SPRGROUP_IC + 0x200 + (WAY) * 0x200)
+#define SPR_ICR_LAST(WAY) (SPRGROUP_IC + 0x3ff + (WAY) * 0x200)
+
+/* MAC group */
+#define SPR_MACLO (SPRGROUP_MAC + 1)
+#define SPR_MACHI (SPRGROUP_MAC + 2)
+
+/* Debug group */
+#define SPR_DVR(N) (SPRGROUP_D + (N))
+#define SPR_DCR(N) (SPRGROUP_D + 8 + (N))
+#define SPR_DMR1 (SPRGROUP_D + 16)
+#define SPR_DMR2 (SPRGROUP_D + 17)
+#define SPR_DWCR0 (SPRGROUP_D + 18)
+#define SPR_DWCR1 (SPRGROUP_D + 19)
+#define SPR_DSR (SPRGROUP_D + 20)
+#define SPR_DRR (SPRGROUP_D + 21)
+
+/* Performance counters group */
+#define SPR_PCCR(N) (SPRGROUP_PC + (N))
+#define SPR_PCMR(N) (SPRGROUP_PC + 8 + (N))
+
+/* Power management group */
+#define SPR_PMR (SPRGROUP_PM + 0)
+
+/* PIC group */
+#define SPR_PICMR (SPRGROUP_PIC + 0)
+#define SPR_PICPR (SPRGROUP_PIC + 1)
+#define SPR_PICSR (SPRGROUP_PIC + 2)
+
+/* Tick Timer group */
+#define SPR_TTMR (SPRGROUP_TT + 0)
+#define SPR_TTCR (SPRGROUP_TT + 1)
+
+/*
+ * Bit definitions for the Version Register
+ *
+ */
+#define SPR_VR_VER 0xffff0000 /* Processor version */
+#define SPR_VR_REV 0x0000003f /* Processor revision */
+
+/*
+ * Bit definitions for the Unit Present Register
+ *
+ */
+#define SPR_UPR_UP 0x00000001 /* UPR present */
+#define SPR_UPR_DCP 0x00000002 /* Data cache present */
+#define SPR_UPR_ICP 0x00000004 /* Instruction cache present */
+#define SPR_UPR_DMP 0x00000008 /* Data MMU present */
+#define SPR_UPR_IMP 0x00000010 /* Instruction MMU present */
+#define SPR_UPR_OB32P 0x00000020 /* ORBIS32 present */
+#define SPR_UPR_OB64P 0x00000040 /* ORBIS64 present */
+#define SPR_UPR_OF32P 0x00000080 /* ORFPX32 present */
+#define SPR_UPR_OF64P 0x00000100 /* ORFPX64 present */
+#define SPR_UPR_OV32P 0x00000200 /* ORVDX32 present */
+#define SPR_UPR_OV64P 0x00000400 /* ORVDX64 present */
+#define SPR_UPR_DUP 0x00000800 /* Debug unit present */
+#define SPR_UPR_PCUP 0x00001000 /* Performance counters unit present */
+#define SPR_UPR_PMP 0x00002000 /* Power management present */
+#define SPR_UPR_PICP 0x00004000 /* PIC present */
+#define SPR_UPR_TTP 0x00008000 /* Tick timer present */
+#define SPR_UPR_SRP 0x00010000 /* Shadow registers present */
+#define SPR_UPR_RES 0x00fe0000 /* ORVDX32 present */
+#define SPR_UPR_CUST 0xff000000 /* Custom units */
+
+/*
+ * Bit definitions for the Supervision Register
+ *
+ */
+#define SPR_SR_CID 0xf0000000 /* Context ID */
+#define SPR_SR_FO 0x00008000 /* Fixed one */
+#define SPR_SR_EPH 0x00004000 /* Exception Prefixi High */
+#define SPR_SR_DSX 0x00002000 /* Delay Slot Exception */
+#define SPR_SR_OVE 0x00001000 /* Overflow flag Exception */
+#define SPR_SR_OV 0x00000800 /* Overflow flag */
+#define SPR_SR_CY 0x00000400 /* Carry flag */
+#define SPR_SR_F 0x00000200 /* Condition Flag */
+#define SPR_SR_CE 0x00000100 /* CID Enable */
+#define SPR_SR_LEE 0x00000080 /* Little Endian Enable */
+#define SPR_SR_IME 0x00000040 /* Instruction MMU Enable */
+#define SPR_SR_DME 0x00000020 /* Data MMU Enable */
+#define SPR_SR_ICE 0x00000010 /* Instruction Cache Enable */
+#define SPR_SR_DCE 0x00000008 /* Data Cache Enable */
+#define SPR_SR_IEE 0x00000004 /* Interrupt Exception Enable */
+#define SPR_SR_TEE 0x00000002 /* Tick timer Exception Enable */
+#define SPR_SR_SM 0x00000001 /* Supervisor Mode */
+
+/*
+ * Bit definitions for the Data MMU Control Register
+ *
+ */
+#define SPR_DMMUCR_P2S 0x0000003e /* Level 2 Page Size */
+#define SPR_DMMUCR_P1S 0x000007c0 /* Level 1 Page Size */
+#define SPR_DMMUCR_VADDR_WIDTH 0x0000f800 /* Virtual ADDR Width */
+#define SPR_DMMUCR_PADDR_WIDTH 0x000f0000 /* Physical ADDR Width */
+
+/*
+ * Bit definitions for the Instruction MMU Control Register
+ *
+ */
+#define SPR_IMMUCR_P2S 0x0000003e /* Level 2 Page Size */
+#define SPR_IMMUCR_P1S 0x000007c0 /* Level 1 Page Size */
+#define SPR_IMMUCR_VADDR_WIDTH 0x0000f800 /* Virtual ADDR Width */
+#define SPR_IMMUCR_PADDR_WIDTH 0x000f0000 /* Physical ADDR Width */
+
+/*
+ * Bit definitions for the Data TLB Match Register
+ *
+ */
+#define SPR_DTLBMR_V 0x00000001 /* Valid */
+#define SPR_DTLBMR_PL1 0x00000002 /* Page Level 1 (if 0 then PL2) */
+#define SPR_DTLBMR_CID 0x0000003c /* Context ID */
+#define SPR_DTLBMR_LRU 0x000000c0 /* Least Recently Used */
+#define SPR_DTLBMR_VPN 0xfffff000 /* Virtual Page Number */
+
+/*
+ * Bit definitions for the Data TLB Translate Register
+ *
+ */
+#define SPR_DTLBTR_CC 0x00000001 /* Cache Coherency */
+#define SPR_DTLBTR_CI 0x00000002 /* Cache Inhibit */
+#define SPR_DTLBTR_WBC 0x00000004 /* Write-Back Cache */
+#define SPR_DTLBTR_WOM 0x00000008 /* Weakly-Ordered Memory */
+#define SPR_DTLBTR_A 0x00000010 /* Accessed */
+#define SPR_DTLBTR_D 0x00000020 /* Dirty */
+#define SPR_DTLBTR_URE 0x00000040 /* User Read Enable */
+#define SPR_DTLBTR_UWE 0x00000080 /* User Write Enable */
+#define SPR_DTLBTR_SRE 0x00000100 /* Supervisor Read Enable */
+#define SPR_DTLBTR_SWE 0x00000200 /* Supervisor Write Enable */
+#define SPR_DTLBTR_PPN 0xfffff000 /* Physical Page Number */
+
+/*
+ * Bit definitions for the Instruction TLB Match Register
+ *
+ */
+#define SPR_ITLBMR_V 0x00000001 /* Valid */
+#define SPR_ITLBMR_PL1 0x00000002 /* Page Level 1 (if 0 then PL2) */
+#define SPR_ITLBMR_CID 0x0000003c /* Context ID */
+#define SPR_ITLBMR_LRU 0x000000c0 /* Least Recently Used */
+#define SPR_ITLBMR_VPN 0xfffff000 /* Virtual Page Number */
+
+/*
+ * Bit definitions for the Instruction TLB Translate Register
+ *
+ */
+#define SPR_ITLBTR_CC 0x00000001 /* Cache Coherency */
+#define SPR_ITLBTR_CI 0x00000002 /* Cache Inhibit */
+#define SPR_ITLBTR_WBC 0x00000004 /* Write-Back Cache */
+#define SPR_ITLBTR_WOM 0x00000008 /* Weakly-Ordered Memory */
+#define SPR_ITLBTR_A 0x00000010 /* Accessed */
+#define SPR_ITLBTR_D 0x00000020 /* Dirty */
+#define SPR_ITLBTR_SXE 0x00000040 /* User Read Enable */
+#define SPR_ITLBTR_UXE 0x00000080 /* User Write Enable */
+#define SPR_ITLBTR_PPN 0xfffff000 /* Physical Page Number */
+
+/*
+ * Bit definitions for Data Cache Control register
+ *
+ */
+#define SPR_DCCR_EW 0x000000ff /* Enable ways */
+
+/*
+ * Bit definitions for Insn Cache Control register
+ *
+ */
+#define SPR_ICCR_EW 0x000000ff /* Enable ways */
+
+/*
+ * Bit definitions for Debug Control registers
+ *
+ */
+#define SPR_DCR_DP 0x00000001 /* DVR/DCR present */
+#define SPR_DCR_CC 0x0000000e /* Compare condition */
+#define SPR_DCR_SC 0x00000010 /* Signed compare */
+#define SPR_DCR_CT 0x000000e0 /* Compare to */
+
+/* Bit results with SPR_DCR_CC mask */
+#define SPR_DCR_CC_MASKED 0x00000000
+#define SPR_DCR_CC_EQUAL 0x00000001
+#define SPR_DCR_CC_LESS 0x00000002
+#define SPR_DCR_CC_LESSE 0x00000003
+#define SPR_DCR_CC_GREAT 0x00000004
+#define SPR_DCR_CC_GREATE 0x00000005
+#define SPR_DCR_CC_NEQUAL 0x00000006
+
+/* Bit results with SPR_DCR_CT mask */
+#define SPR_DCR_CT_DISABLED 0x00000000
+#define SPR_DCR_CT_IFEA 0x00000020
+#define SPR_DCR_CT_LEA 0x00000040
+#define SPR_DCR_CT_SEA 0x00000060
+#define SPR_DCR_CT_LD 0x00000080
+#define SPR_DCR_CT_SD 0x000000a0
+#define SPR_DCR_CT_LSEA 0x000000c0
+
+/*
+ * Bit definitions for Debug Mode 1 register
+ *
+ */
+#define SPR_DMR1_CW0 0x00000003 /* Chain watchpoint 0 */
+#define SPR_DMR1_CW1 0x0000000c /* Chain watchpoint 1 */
+#define SPR_DMR1_CW2 0x00000030 /* Chain watchpoint 2 */
+#define SPR_DMR1_CW3 0x000000c0 /* Chain watchpoint 3 */
+#define SPR_DMR1_CW4 0x00000300 /* Chain watchpoint 4 */
+#define SPR_DMR1_CW5 0x00000c00 /* Chain watchpoint 5 */
+#define SPR_DMR1_CW6 0x00003000 /* Chain watchpoint 6 */
+#define SPR_DMR1_CW7 0x0000c000 /* Chain watchpoint 7 */
+#define SPR_DMR1_CW8 0x00030000 /* Chain watchpoint 8 */
+#define SPR_DMR1_CW9 0x000c0000 /* Chain watchpoint 9 */
+#define SPR_DMR1_CW10 0x00300000 /* Chain watchpoint 10 */
+#define SPR_DMR1_ST 0x00400000 /* Single-step trace*/
+#define SPR_DMR1_BT 0x00800000 /* Branch trace */
+#define SPR_DMR1_DXFW 0x01000000 /* Disable external force watchpoint */
+
+/*
+ * Bit definitions for Debug Mode 2 register
+ *
+ */
+#define SPR_DMR2_WCE0 0x00000001 /* Watchpoint counter 0 enable */
+#define SPR_DMR2_WCE1 0x00000002 /* Watchpoint counter 0 enable */
+#define SPR_DMR2_AWTC 0x00001ffc /* Assign watchpoints to counters */
+#define SPR_DMR2_WGB 0x00ffe000 /* Watchpoints generating breakpoint */
+
+/*
+ * Bit definitions for Debug watchpoint counter registers
+ *
+ */
+#define SPR_DWCR_COUNT 0x0000ffff /* Count */
+#define SPR_DWCR_MATCH 0xffff0000 /* Match */
+
+/*
+ * Bit definitions for Debug stop register
+ *
+ */
+#define SPR_DSR_RSTE 0x00000001 /* Reset exception */
+#define SPR_DSR_BUSEE 0x00000002 /* Bus error exception */
+#define SPR_DSR_DPFE 0x00000004 /* Data Page Fault exception */
+#define SPR_DSR_IPFE 0x00000008 /* Insn Page Fault exception */
+#define SPR_DSR_TTE 0x00000010 /* iTick Timer exception */
+#define SPR_DSR_AE 0x00000020 /* Alignment exception */
+#define SPR_DSR_IIE 0x00000040 /* Illegal Instruction exception */
+#define SPR_DSR_IE 0x00000080 /* Interrupt exception */
+#define SPR_DSR_DME 0x00000100 /* DTLB miss exception */
+#define SPR_DSR_IME 0x00000200 /* ITLB miss exception */
+#define SPR_DSR_RE 0x00000400 /* Range exception */
+#define SPR_DSR_SCE 0x00000800 /* System call exception */
+#define SPR_DSR_SSE 0x00001000 /* Single Step Exception */
+#define SPR_DSR_TE 0x00002000 /* Trap exception */
+
+/*
+ * Bit definitions for Debug reason register
+ *
+ */
+#define SPR_DRR_RSTE 0x00000001 /* Reset exception */
+#define SPR_DRR_BUSEE 0x00000002 /* Bus error exception */
+#define SPR_DRR_DPFE 0x00000004 /* Data Page Fault exception */
+#define SPR_DRR_IPFE 0x00000008 /* Insn Page Fault exception */
+#define SPR_DRR_TTE 0x00000010 /* Tick Timer exception */
+#define SPR_DRR_AE 0x00000020 /* Alignment exception */
+#define SPR_DRR_IIE 0x00000040 /* Illegal Instruction exception */
+#define SPR_DRR_IE 0x00000080 /* Interrupt exception */
+#define SPR_DRR_DME 0x00000100 /* DTLB miss exception */
+#define SPR_DRR_IME 0x00000200 /* ITLB miss exception */
+#define SPR_DRR_RE 0x00000400 /* Range exception */
+#define SPR_DRR_SCE 0x00000800 /* System call exception */
+#define SPR_DRR_TE 0x00001000 /* Trap exception */
+
+/*
+ * Bit definitions for Performance counters mode registers
+ *
+ */
+#define SPR_PCMR_CP 0x00000001 /* Counter present */
+#define SPR_PCMR_UMRA 0x00000002 /* User mode read access */
+#define SPR_PCMR_CISM 0x00000004 /* Count in supervisor mode */
+#define SPR_PCMR_CIUM 0x00000008 /* Count in user mode */
+#define SPR_PCMR_LA 0x00000010 /* Load access event */
+#define SPR_PCMR_SA 0x00000020 /* Store access event */
+#define SPR_PCMR_IF 0x00000040 /* Instruction fetch event*/
+#define SPR_PCMR_DCM 0x00000080 /* Data cache miss event */
+#define SPR_PCMR_ICM 0x00000100 /* Insn cache miss event */
+#define SPR_PCMR_IFS 0x00000200 /* Insn fetch stall event */
+#define SPR_PCMR_LSUS 0x00000400 /* LSU stall event */
+#define SPR_PCMR_BS 0x00000800 /* Branch stall event */
+#define SPR_PCMR_DTLBM 0x00001000 /* DTLB miss event */
+#define SPR_PCMR_ITLBM 0x00002000 /* ITLB miss event */
+#define SPR_PCMR_DDS 0x00004000 /* Data dependency stall event */
+#define SPR_PCMR_WPE 0x03ff8000 /* Watchpoint events */
+
+/*
+ * Bit definitions for the Power management register
+ *
+ */
+#define SPR_PMR_SDF 0x0000000f /* Slow down factor */
+#define SPR_PMR_DME 0x00000010 /* Doze mode enable */
+#define SPR_PMR_SME 0x00000020 /* Sleep mode enable */
+#define SPR_PMR_DCGE 0x00000040 /* Dynamic clock gating enable */
+#define SPR_PMR_SUME 0x00000080 /* Suspend mode enable */
+
+/*
+ * Bit definitions for PICMR
+ *
+ */
+#define SPR_PICMR_IUM 0xfffffffc /* Interrupt unmask */
+
+/*
+ * Bit definitions for PICPR
+ *
+ */
+#define SPR_PICPR_IPRIO 0xfffffffc /* Interrupt priority */
+
+/*
+ * Bit definitions for PICSR
+ *
+ */
+#define SPR_PICSR_IS 0xffffffff /* Interrupt status */
+
+/*
+ * Bit definitions for Tick Timer Control Register
+ *
+ */
+#define SPR_TTCR_PERIOD 0x0fffffff /* Time Period */
+#define SPR_TTMR_PERIOD SPR_TTCR_PERIOD
+#define SPR_TTMR_IP 0x10000000 /* Interrupt Pending */
+#define SPR_TTMR_IE 0x20000000 /* Interrupt Enable */
+#define SPR_TTMR_RT 0x40000000 /* Restart tick */
+#define SPR_TTMR_SR 0x80000000 /* Single run */
+#define SPR_TTMR_CR 0xc0000000 /* Continuous run */
+#define SPR_TTMR_M 0xc0000000 /* Tick mode */
+
+/*
+ * l.nop constants
+ *
+ */
+#define NOP_NOP 0x0000 /* Normal nop instruction */
+#define NOP_EXIT 0x0001 /* End of simulation */
+#define NOP_REPORT 0x0002 /* Simple report */
+#define NOP_printf 0x0003 /* Simprintf instruction */
+#define NOP_REPORT_FIRST 0x0400 /* Report with number */
+#define NOP_REPORT_LAST 0x03ff /* Report with number */
uos/spr_defs.h
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: uos/except_or32.S
===================================================================
--- uos/except_or32.S (nonexistent)
+++ uos/except_or32.S (revision 1765)
@@ -0,0 +1,351 @@
+/* This file is part of test microkernel for OpenRISC 1000. */
+/* (C) 2000 Damjan Lampret, lampret@opencores.org */
+
+#include "spr_defs.h"
+#include "../board.h"
+
+#define MC_CSR (0x00)
+#define MC_POC (0x04)
+#define MC_BA_MASK (0x08)
+#define MC_CSC(i) (0x10 + (i) * 8)
+#define MC_TMS(i) (0x14 + (i) * 8)
+
+
+/*
+ * Context is saved to area pointed by pointer in R3. Original
+ * R3 is at memory location 0 and task's PC is at memory location 4.
+ */
+#define SAVEREGS \
+ l.lwz r3,0(r3); \
+ l.sw 4(r3),r1; \
+ l.sw 8(r3),r2; \
+ l.lwz r2,0(r0); /* saving original r3*/ \
+ l.sw 12(r3),r2; \
+ l.sw 16(r3),r4; \
+ l.sw 20(r3),r5; \
+ l.sw 24(r3),r6; \
+ l.sw 28(r3),r7; \
+ l.sw 32(r3),r8; \
+ l.sw 36(r3),r9; \
+ l.sw 40(r3),r10; \
+ l.sw 44(r3),r11; \
+ l.sw 48(r3),r12; \
+ l.sw 52(r3),r13; \
+ l.sw 56(r3),r14; \
+ l.sw 60(r3),r15; \
+ l.sw 64(r3),r16; \
+ l.sw 68(r3),r17; \
+ l.sw 72(r3),r18; \
+ l.sw 76(r3),r19; \
+ l.sw 80(r3),r20; \
+ l.sw 84(r3),r21; \
+ l.sw 88(r3),r22; \
+ l.sw 92(r3),r23; \
+ l.sw 96(r3),r24; \
+ l.sw 100(r3),r25; \
+ l.sw 104(r3),r26; \
+ l.sw 108(r3),r27; \
+ l.sw 112(r3),r28; \
+ l.sw 116(r3),r29; \
+ l.sw 120(r3),r30; \
+ l.sw 124(r3),r31; \
+ l.lwz r2,4(r0); /* saving original PC*/ \
+ l.sw 0(r3),r2; \
+ \
+ l.mfspr r2,r0,SPR_ESR_BASE; \
+ l.sw 128(r3),r2 /* saving SR */
+
+/*
+ * Pointer to context is in R3. All registers are loaded and execution is
+ * transfered to the loaded context's task
+ */
+#define LOADREGS_N_GO \
+ l.lwz r3,0(r3); \
+ l.lwz r2,0(r3); /* prepare PC*/ \
+ l.mtspr r0,r2,SPR_EPCR_BASE; \
+ \
+ l.lwz r2,128(r3); /* prepare SR*/ \
+ l.mtspr r0,r2,SPR_ESR_BASE; \
+ \
+ l.lwz r1,4(r3); \
+ l.lwz r2,8(r3); \
+ l.lwz r4,16(r3); \
+ l.lwz r5,20(r3); \
+ l.lwz r6,24(r3); \
+ l.lwz r7,28(r3); \
+ l.lwz r8,32(r3); \
+ l.lwz r9,36(r3); \
+ l.lwz r10,40(r3); \
+ l.lwz r11,44(r3); \
+ l.lwz r12,48(r3); \
+ l.lwz r13,52(r3); \
+ l.lwz r14,56(r3); \
+ l.lwz r15,60(r3); \
+ l.lwz r16,64(r3); \
+ l.lwz r17,68(r3); \
+ l.lwz r18,72(r3); \
+ l.lwz r19,76(r3); \
+ l.lwz r20,80(r3); \
+ l.lwz r21,84(r3); \
+ l.lwz r22,88(r3); \
+ l.lwz r23,92(r3); \
+ l.lwz r24,96(r3); \
+ l.lwz r25,100(r3); \
+ l.lwz r26,104(r3); \
+ l.lwz r27,108(r3); \
+ l.lwz r28,112(r3); \
+ l.lwz r29,116(r3); \
+ l.lwz r30,120(r3); \
+ l.lwz r31,124(r3); \
+ \
+ l.lwz r3,12(r3); /* prepare r3*/ \
+ \
+ l.rfe; /* Call task */ \
+ l.nop
+
+/*
+ * All registers are loaded from save area.
+ */
+#define LOADREGS \
+ l.lwz r3,0(r3); \
+ l.lwz r2,0(r3); /* prepare PC*/ \
+ l.mtspr r0,r2,SPR_EPCR_BASE; \
+ \
+ l.lwz r2,128(r3); /* prepare SR*/ \
+ l.mtspr r0,r2,SPR_ESR_BASE; \
+ \
+ l.lwz r1,4(r3); \
+ l.lwz r2,8(r3); \
+ l.lwz r4,16(r3); \
+ l.lwz r5,20(r3); \
+ l.lwz r6,24(r3); \
+ l.lwz r7,28(r3); \
+ l.lwz r8,32(r3); \
+ l.lwz r9,36(r3); \
+ l.lwz r10,40(r3); \
+ l.lwz r11,44(r3); \
+ l.lwz r12,48(r3); \
+ l.lwz r13,52(r3); \
+ l.lwz r14,56(r3); \
+ l.lwz r15,60(r3); \
+ l.lwz r16,64(r3); \
+ l.lwz r17,68(r3); \
+ l.lwz r18,72(r3); \
+ l.lwz r19,76(r3); \
+ l.lwz r20,80(r3); \
+ l.lwz r21,84(r3); \
+ l.lwz r22,88(r3); \
+ l.lwz r23,92(r3); \
+ l.lwz r24,96(r3); \
+ l.lwz r25,100(r3); \
+ l.lwz r26,104(r3); \
+ l.lwz r27,108(r3); \
+ l.lwz r28,112(r3); \
+ l.lwz r29,116(r3); \
+ l.lwz r30,120(r3); \
+ l.lwz r31,124(r3); \
+ \
+ l.lwz r3,12(r3); /* prepare r3*/
+
+/*
+ * Set new PC in saved context
+ */
+#define SET_CONTEXTPC(AREA,SUBROUTINE,TMPREG) \
+ l.lwz AREA,0(AREA); \
+ l.movhi TMPREG,hi(SUBROUTINE); \
+ l.addi TMPREG,r0,lo(SUBROUTINE); \
+ l.sw 0(AREA),TMPREG;
+
+/*
+ * Printf via or1ksim hook
+ */
+#if KERNEL_OUTPUT
+#define PRINTF(REG,STR) \
+ l.movhi REG,hi(STR); \
+ l.addi REG,r0,lo(STR); \
+ l.nop NOP_PRINTF
+#else
+#define PRINTF(REG,STR)
+#endif
+
+/*
+ * Reset Exception handler
+ */
+.org 0x100
+_reset_vector:
+
+ l.movhi r3,hi(MC_BASE_ADDR)
+ l.ori r3,r3,lo(MC_BASE_ADDR)
+
+ l.addi r4,r3,MC_CSC(0)
+ l.movhi r5,hi(FLASH_BASE_ADDR)
+ l.srai r5,r5,6
+ l.ori r5,r5,0x0025
+ l.sw 0(r4),r5
+
+ l.addi r4,r3,MC_TMS(0)
+ l.movhi r5,hi(FLASH_TMS_VAL)
+ l.ori r5,r5,lo(FLASH_TMS_VAL)
+ l.sw 0(r4),r5
+
+ l.addi r4,r3,MC_BA_MASK
+ l.addi r5,r0,MC_MASK_VAL
+ l.sw 0(r4),r5
+
+ l.addi r4,r3,MC_CSR
+ l.movhi r5,hi(MC_CSR_VAL)
+ l.ori r5,r5,lo(MC_CSR_VAL)
+ l.sw 0(r4),r5
+
+ l.addi r4,r3,MC_TMS(1)
+ l.movhi r5,hi(SDRAM_TMS_VAL)
+ l.ori r5,r5,lo(SDRAM_TMS_VAL)
+ l.sw 0(r4),r5
+
+ l.addi r4,r3,MC_CSC(1)
+ l.movhi r5,hi(SDRAM_BASE_ADDR)
+ l.srai r5,r5,6
+ l.ori r5,r5,0x0411
+ l.sw 0(r4),r5
+
+ l.jr r9
+ l.nop
+
+ /* Copy data section */
+ l.movhi r3,hi(_src_beg)
+ l.ori r3,r3,lo(_src_beg)
+ l.addi r4,r0,0x200
+ l.movhi r5,hi(_except_end)
+ l.ori r5,r5,lo(_except_end)
+ l.movhi r6,hi(_except_beg)
+ l.ori r6,r6,lo(_except_beg)
+ l.sub r5,r6,r5
+1:
+ l.lwz r6,0(r3)
+ l.sw 0(r4),r6
+ l.addi r3,r3,4
+ l.addi r4,r4,4
+ l.addi r5,r5,-4
+ l.sfgtsi r5,0
+ l.bf 1b
+ l.nop
+
+ l.movhi r4,hi(_dst_beg)
+ l.ori r4,r4,lo(_dst_beg)
+ l.movhi r5,hi(_dst_end)
+ l.ori r5,r5,lo(_dst_end)
+ l.sub r5,r5,r4
+ l.sfeqi r5,0
+ l.bf 2f
+ l.nop
+1:
+ l.lwz r6,0(r3)
+ l.sw 0(r4),r6
+ l.addi r3,r3,4
+ l.addi r4,r4,4
+ l.addi r5,r5,-4
+ l.sfgtsi r5,0
+ l.bf 1b
+ l.nop
+
+2:
+
+
+ l.movhi r2,hi(_reset)
+ l.ori r2,r2,lo(_reset)
+ l.jr r2
+ l.nop
+
+/*
+ * Switch to a new context pointed by _task_context
+ */
+.global _dispatch
+.align 4
+_dispatch:
+ /* load user task GPRs and PC */
+ l.movhi r3,hi(_task_context)
+ l.addi r3,r0,lo(_task_context)
+ LOADREGS_N_GO
+
+.section .except, "ax"
+
+/*
+ * Bus Error Exception handler
+ */
+.org 0x0200
+_buserr:
+ l.nop
+ l.sw 0(r0),r3 /* Save r3 */
+ PRINTF(r3, _buserr_str)
+_hang:
+ l.j _hang
+ l.nop
+
+_buserr_str:
+ .ascii "Bus error exception.\n\000"
+
+/*
+ * External Interrupt Exception handler
+ */
+.org 0x800
+_extint:
+ l.nop
+ l.sw 0(r0),r3 /* Save r3 */
+ PRINTF(r3,_extint_str)
+ l.mfspr r3,r0,SPR_EPCR_BASE /* Get EPCR */
+ l.sw 4(r0),r3 /* and save it */
+
+ /* now save user task context */
+ l.movhi r3,hi(_task_context)
+ l.addi r3,r0,lo(_task_context)
+ SAVEREGS
+
+ /* set kernel context's PC to kernel's scheduler */
+ l.movhi r3,hi(_kernel_context)
+ l.addi r3,r0,lo(_kernel_context)
+ SET_CONTEXTPC(r3,_int_main,r4)
+
+ /* load kernel context */
+ l.movhi r3,hi(_kernel_context)
+ l.addi r3,r0,lo(_kernel_context)
+ LOADREGS
+
+ l.movhi r3,hi(_int_main)
+ l.addi r3,r0,lo(_int_main)
+ l.jr r3
+ l.nop
+
+_extint_str:
+ .ascii "External interrupt exception.\n\000"
+
+/*
+ * System Call Exception handler
+ */
+.org 0x0c00
+_syscall:
+ l.nop
+ l.sw 0(r0),r3 /* Save r3 */
+ PRINTF(r3,_syscall_str)
+ l.mfspr r3,r0,SPR_EPCR_BASE /* Get EPCR */
+ l.addi r3,r3,4 /* increment because EPCR instruction was already executed */
+ l.sw 4(r0),r3 /* and save it */
+
+ /* now save user task context */
+ l.movhi r3,hi(_task_context)
+ l.addi r3,r0,lo(_task_context)
+ SAVEREGS
+
+ /* set kernel context's PC to kernel's syscall entry */
+ l.movhi r3,hi(_kernel_context)
+ l.addi r3,r0,lo(_kernel_context)
+ SET_CONTEXTPC(r3,_kernel_syscall,r4)
+
+ /* load kernel context */
+ l.movhi r3,hi(_kernel_context)
+ l.addi r3,r0,lo(_kernel_context)
+ LOADREGS_N_GO
+
+_syscall_str:
+ .ascii "System call exception.\n\000"
+
+
Index: uos/tick.c
===================================================================
--- uos/tick.c (nonexistent)
+++ uos/tick.c (revision 1765)
@@ -0,0 +1,34 @@
+/* This file is part of test microkernel for OpenRISC 1000. */
+/* (C) 2001 Simon Srot, srot@opencores.org */
+
+#include "spr_defs.h"
+#include "support.h"
+
+/* Tick timer period */
+unsigned long tick_period;
+
+/* Inform of tick interrupt */
+void (*tick_inf)();
+
+/* Tick interrupt routine */
+void tick_int()
+{
+ /* Call inf routine */
+ (*tick_inf)();
+
+ /* Set new counter period iand clear inet pending bit */
+ mtspr(SPR_TTMR, SPR_TTMR_IE | SPR_TTMR_RT | (tick_period & SPR_TTMR_PERIOD));
+}
+
+/* Initialize routine */
+int tick_init(unsigned long period, void (* inf)())
+{
+ /* Save tick timer period and inform routine */
+ tick_period = period;
+ tick_inf = inf;
+
+ /* Set counter period, enable timer and interrupt */
+ mtspr(SPR_TTMR, SPR_TTMR_IE | SPR_TTMR_RT | (period & SPR_TTMR_PERIOD));
+
+ return 0;
+}
Index: uos/Makefile.am
===================================================================
--- uos/Makefile.am (nonexistent)
+++ uos/Makefile.am (revision 1765)
@@ -0,0 +1,28 @@
+## Makefile for or1ksim subdirectory test
+## (c) Marko Mlinar, 2001
+## To add new test, edit between marked areas only
+#
+# This file is part of OpenRISC 1000 Architectural Simulator.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+LDADD = ../support/libsupport.a
+LDFLAGS = -T${top_srcdir}/default.ld
+
+bin_PROGRAMS = uos
+uos_SOURCES = except_or32.S support.h spr_defs.h task.c int.h ipc.h tick.c uos.h uos.c
+
+again: clean all
uos/Makefile.am
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: uos/ipc.h
===================================================================
--- uos/ipc.h (nonexistent)
+++ uos/ipc.h (revision 1765)
@@ -0,0 +1,27 @@
+/* This file is part of test microkernel for OpenRISC 1000. */
+/* (C) 2000 Damjan Lampret, lampret@opencores.org */
+
+/* Operation completed sucessfully. */
+#define IPC_NOERR 0
+
+/* Can't send any messages due to lack of free MCBs. */
+#define IPC_EOUTOFMCBS 1
+
+/* Sending message: No such destination task.
+ Receiving message: No such origin task. */
+#define IPC_ENOTASK 2
+
+/* Message to big to be sent or receive buffer is to small for
+ receiving message. If receiving then try again with bigger buffer. */
+#define IPC_ETOOBIG 3
+
+/* No messages waiting to be received. */
+#define IPC_ENOMSGS 4
+
+/* Send message in buffer buf of size len to task desttask. */
+int uos_msgsnd(tid_t desttask, char *buf, int len);
+
+/* Receive message of max size len from task origintask and put it
+ into buffer buf. If origintask is zero then get the first message
+ from the message queue. */
+int uos_msgrcv(tid_t origintask, char *buf, int len);
Index: uos/uos.h
===================================================================
--- uos/uos.h (nonexistent)
+++ uos/uos.h (revision 1765)
@@ -0,0 +1,58 @@
+/* This file is part of test microkernel for OpenRISC 1000. */
+/* (C) 2000 Damjan Lampret, lampret@opencores.org */
+
+/* Length of the IPC message's useful data. */
+#define MAX_MSGLEN 100
+
+/* Number of user tasks in the system. */
+#define MAX_TASKS 8
+
+/* Number of IPC messages in the system. */
+#define MAX_MSGS 16
+
+/* Number of general purpose registers (not counting r0 and r1). */
+#define GPRS 30
+
+/* Size of kernel and user task stacks. Size for individual task. */
+#define STACK_SIZE 2048
+
+/* Define this if you want kernel debug output. Note that you must
+ assemble except_or32.S with KERNEL_OUTPUT defined in Makefile. This
+ definition is only for main uos.c. */
+#define KERNEL_OUTPUT 0
+
+/* Define this if you want task switch at every system call. */
+#define KERNEL_SYSCALL_SCHED 0
+
+/* System tick timer period */
+#define TICK_PERIOD 0x500
+
+/* Task ID type (if we would have processes then we would call it PID) */
+typedef int tid_t;
+
+/* System call numbers */
+#define IPC_MSGSND 1
+#define IPC_MSGRCV 2
+
+/* Message Control Block structure */
+struct mcb {
+ char msg[MAX_MSGLEN]; /* Message's data */
+ int length; /* Message's length */
+ tid_t origin; /* TID of message's origin task */
+ struct mcb *next; /* Next message in linked list */
+};
+
+/* Task Control Block structure */
+struct tcb {
+ struct regs {
+ unsigned long pc; /* Task's PC */
+ unsigned long sp; /* Task's stack (r1)*/
+ unsigned long gprs[GPRS]; /* Task's GPRs r2-r15 */
+ unsigned long sr; /* Task's supervision register */
+ } regs;
+ struct mcb *waiting_msgs; /* Waiting messages */
+};
+
+extern void dispatch();
+/* Called by kernel_init to collect all tasks entries. */
+extern void tasks_entries();
Index: uos/README
===================================================================
--- uos/README (nonexistent)
+++ uos/README (revision 1765)
@@ -0,0 +1,18 @@
+
+This is the Micro OS (uOS) for testing operating system features of
+OpenRISC 1000 architecture. Specifically non reentrant, preemptive
+multitasking microkernel. Purpose of this code is not to be a true
+operating system but merely a testbench for testing the architecture,
+or1ksim and software development tools (GCC, Binutils, ...).
+
+This test OS has all necessary exception handlers to handle exceptions. There
+are two tasks: one task generates data and passes that data via IPC to the
+second task. Second task outputs the data via or1ksim syscall to the simulator.
+
+Currently only OR32 is supported (exception handlers are written in
+assembly). Tools required to compile sources are the latest
+or32-coff-gcc, or32-coff-as and or32-coff-ld. Also make sure you undefine
+VIRTUAL_MACHINE_ONLY when compiling or1ksim.
+
+--
+10/Jun/2000, Damjan Lampret, lampret@opencores.org
Index: uos
===================================================================
--- uos (nonexistent)
+++ uos (revision 1765)
uos
Property changes :
Added: svn:ignore
## -0,0 +1,3 ##
+Makefile
+uos
+.deps
Index: aclocal.m4
===================================================================
--- aclocal.m4 (nonexistent)
+++ aclocal.m4 (revision 1765)
@@ -0,0 +1,817 @@
+# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
+
+# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# This macro actually does too much some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 8
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+AC_PREREQ([2.52])
+
+# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
+# the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
+ AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG(AMTAR, tar)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_][CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_][CC],
+ defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_][CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_][CXX],
+ defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+# Copyright 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+ [AM_AUTOMAKE_VERSION([1.6.3])])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright 2001, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# -*- Autoconf -*-
+
+
+# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# AM_AUX_DIR_EXPAND
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+# Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_AUX_DIR_EXPAND], [
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# AM_PROG_INSTALL_STRIP
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# serial 4 -*- Autoconf -*-
+
+# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ echo '#include "conftest.h"' > conftest.c
+ echo 'int i;' > conftest.h
+ echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=conftest.c object=conftest.o \
+ depfile=conftest.Po tmpdepfile=conftest.TPo \
+ $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
+ grep conftest.h conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[rm -f .deps 2>/dev/null
+mkdir .deps 2>/dev/null
+if test -d .deps; then
+ DEPDIR=.deps
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ DEPDIR=_deps
+fi
+rmdir .deps 2>/dev/null
+AC_SUBST([DEPDIR])
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking Speeds up one-time builds
+ --enable-dependency-tracking Do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+#serial 2
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
+ # Extract the definition of DEP_FILES from the Makefile without
+ # running `make'.
+ DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n -e '/^U = / s///p' < "$mf"`
+ test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+ # We invoke sed twice because it is the simplest approach to
+ # changing $(DEPDIR) to its actual value in the expansion.
+ for file in `sed -n -e '
+ /^DEP_FILES = .*\\\\$/ {
+ s/^DEP_FILES = //
+ :loop
+ s/\\\\$//
+ p
+ n
+ /\\\\$/ b loop
+ p
+ }
+ /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+doit:
+ @echo done
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+AC_SUBST(am__include)
+AC_SUBST(am__quote)
+AC_MSG_RESULT($_am_result)
+rm -f confinc confmf
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 5
+
+AC_PREREQ(2.52)
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([conditional \"$1\" was never defined.
+Usually this means the macro was only invoked conditionally.])
+fi])])
+
+# isc-posix.m4 serial 2 (gettext-0.11.2)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
+
+# This test replaces the one in autoconf.
+# Currently this macro should have the same name as the autoconf macro
+# because gettext's gettext.m4 (distributed in the automake package)
+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
+# give these diagnostics:
+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
+
+undefine([AC_ISC_POSIX])
+
+AC_DEFUN([AC_ISC_POSIX],
+ [
+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
+ ]
+)
+
+# Figure out how to run the assembler. -*- Autoconf -*-
+
+# serial 2
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# AM_PROG_AS
+# ----------
+AC_DEFUN([AM_PROG_AS],
+[# By default we simply use the C compiler to build assembly code.
+AC_REQUIRE([AC_PROG_CC])
+: ${CCAS='$(CC)'}
+# Set ASFLAGS if not already set.
+: ${CCASFLAGS='$(CFLAGS)'}
+AC_SUBST(CCAS)
+AC_SUBST(CCASFLAGS)])
+
aclocal.m4
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: configure.in
===================================================================
--- configure.in (nonexistent)
+++ configure.in (revision 1765)
@@ -0,0 +1,99 @@
+dnl or32 test suite - top level
+dnl
+dnl Copyright (C) 2001 Marko Mlinar
+dnl
+dnl This file is part of OpenRISC 1000 Architectural Simulator.
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+dnl
+dnl Process this file with autoconf to produce a configure script.
+
+dnl disable cache, since it causes troubles when changing hosts
+dnl define([AC_CACHE_LOAD], )dnl
+dnl define([AC_CACHE_SAVE], )dnl
+
+AC_REVISION([for or1ksim-1.2, version 2.14, from autoconf version] AC_ACVERSION)
+AC_PREREQ(2.10)
+AC_INIT(support/support.h)
+AC_CANONICAL_HOST
+AM_INIT_AUTOMAKE(or1ksimtest, 1.3)
+
+dnl Checks for programs.
+AC_PROG_MAKE_SET
+AC_PROG_INSTALL
+AC_CHECK_TOOL(CC, $target-gcc, cc)
+AC_CHECK_TOOL(RANLIB, $target-ranlib, ranlib)
+AC_CHECK_TOOL(LD, $target-ld, ld)
+AC_CHECK_TOOL(SIM, $target-sim, sim)
+AC_ISC_POSIX
+AC_HEADER_STDC
+
+AM_PROG_AS
+
+MAKE_SHELL=/bin/sh
+AC_SUBST(MAKE_SHELL)
+
+dnl Compiler options.
+AC_PROG_GCC_TRADITIONAL
+dnl set -- $CFLAGS
+CFLAGS="-Wall -g"
+
+COMPILE_OR1K=unknown
+
+AC_SUBST(TESTS_ENV)
+TESTS_ENV=
+AC_SUBST(OR1K_SRCDIR)
+OR1K_SRCDIR="./${top_srcdir}"
+case $target in
+ or1k*|or32*)
+ CFLAGS="$CFLAGS -nostdlib -mhard-div"
+ COMPILE=or1k
+ TESTS_ENV="$SIM"
+ ;;
+esac
+dnl echo $TESTS_ENV
+AM_CONDITIONAL(OR1K_EXCEPT, test x$COMPILE = xor1k)
+
+
+dnl optimizations level
+AC_MSG_CHECKING(whether to enable optimizations)
+AC_ARG_ENABLE(opt,
+ [ --enable-opt enable optimizations
+ --enable-opt=level same as gcc -O switch ], [
+ case "$enableval" in
+ yes)
+ CFLAGS="$CFLAGS -O"
+ ;;
+ *)
+ CFLAGS="$CFLAGS -O$enableval"
+ ;;
+ esac
+])
+AC_MSG_RESULT(${enable_opt-default})
+
+case "$enable_debugging" in
+ yes) AC_CHECK_LIB(efence, malloc) ;;
+esac
+
+AC_SUBST(INCLUDES)
+INCLUDES="-I\${top_srcdir}/support"
+CCASFLAGS="${CFLAGS} ${INCLUDES}"
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_C_INLINE
+
+dnl Create output files.
+AC_OUTPUT([Makefile support/Makefile uos/Makefile])
configure.in
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: README
===================================================================
--- README (nonexistent)
+++ README (revision 1765)
@@ -0,0 +1,28 @@
+This directory includes some test case programs that should be used to verify correct operation
+of the or1ksim, OR32 GCC and OR32 GNU Binutils.
+
+All programs are built and checked by:
+
+./configure --target=or32-uclinux
+make all check
+
+You need to have all GNU OR32 tools installed and in the path.
+
+!!! For all test cases, or1ksim should be built with ONLY_VIRTUAL_MACHINE undefined in
+cpu/or1k/except.h !!!
+
+All tests should exit with:
+MTSPR(0x1234, deaddead);
+syscall exit(0)
+
+If the test fails, it should print as much output as possible about the failure.
+
+dhry: Dhrystone 2.1: a benchmark modified to use simulator's timing facility.
+basic: a test for all instructions and all GPRs.
+test1: a test for "all" instructions and their combinations.
+pic: a test for PIC and TICK timer. All three modes of TICK timer are tested and interrupt is enabled and disabled in PIC.
+excpt: a test of l.sys instruction. Checks all the delay slot issues ind other things.
+cfg: a test of SPRs (SPR_VR, SPR_CPUCFGR, SPR_DMMUCFGR, SPR_IMMUCFGR, SPR_DCCFGR, SPR_ICCFGR, SPR_DCFGR, SPR_PCCFGR).
+dma: a test of DMA in normal (software) mode.
+compress: UNIX compressed modified not to use libc calls.
+mul: Test l.mul, l.mac and l.macrc instructions.
Index: dhry.c
===================================================================
--- dhry.c (nonexistent)
+++ dhry.c (revision 1765)
@@ -0,0 +1,726 @@
+/*
+ ****************************************************************************
+ *
+ * "DHRYSTONE" Benchmark Program
+ * -----------------------------
+ *
+ * Version: C, Version 2.1
+ *
+ * File: dhry_1.c (part 2 of 3)
+ *
+ * Date: May 25, 1988
+ *
+ * Author: Reinhold P. Weicker
+ *
+ ****************************************************************************
+ */
+#include "support.h"
+#include "dhry.h"
+
+#define NUM_RUNS (20)
+#define DLX_FREQ 200 /* in MHz */
+#define PROC_6 0
+
+#ifndef strcpy
+char *strcpy (char *dst0, char *src0)
+{
+ char *s = dst0;
+
+ while ((*dst0++ = *src0++));
+
+ return s;
+}
+#endif
+
+#ifndef strcmp
+int strcmp (const char *s1, const char *s2)
+{
+ while (*s1 && *s2 && *s1 == *s2) {
+ s1++;
+ s2++;
+ }
+ return (*(unsigned char *) s1) - (*(unsigned char *) s2);
+}
+#endif
+
+#define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080)
+#define UNALIGNED(X, Y) \
+ (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
+
+
+/* Global Variables: */
+
+Rec_Pointer Ptr_Glob,
+ Next_Ptr_Glob;
+int Int_Glob;
+Boolean Bool_Glob;
+char Ch_1_Glob,
+ Ch_2_Glob;
+int Arr_1_Glob [50];
+int Arr_2_Glob [50] [50];
+
+
+ /* forward declaration necessary since Enumeration may not simply be int */
+
+#ifndef REG
+ Boolean Reg = false;
+#define REG
+ /* REG becomes defined as empty */
+ /* i.e. no register variables */
+#else
+ Boolean Reg = true;
+#endif
+
+/* variables for time measurement: */
+
+#if DLX || OR1K
+#define Too_Small_Time DLX_FREQ
+#else
+#define Too_Small_Time 1
+#endif
+
+#define TIMER0 0
+#define TIMER1 1
+
+
+
+
+
+unsigned int Begin_Time,
+ End_Time,
+ User_Time,
+ Microseconds,
+ Dhrystones_Per_Second;
+
+/* end of variables for time measurement */
+
+
+void Proc_1(REG Rec_Pointer Ptr_Val_Par);
+void Proc_2(One_Fifty *Int_Par_Ref);
+void Proc_3(Rec_Pointer *Ptr_Ref_Par);
+void Proc_4();
+void Proc_5();
+void Proc_6(
+ Enumeration Enum_Val_Par,
+ Enumeration *Enum_Ref_Par);
+void Proc_7(
+ One_Fifty Int_1_Par_Val,
+ One_Fifty Int_2_Par_Val,
+ One_Fifty *Int_Par_Ref);
+void Proc_8(
+ Arr_1_Dim Arr_1_Par_Ref,
+ Arr_2_Dim Arr_2_Par_Ref,
+ int Int_1_Par_Val,
+ int Int_2_Par_Val);
+Enumeration Func_1(Capital_Letter Ch_1_Par_Val,
+ Capital_Letter Ch_2_Par_Val);
+Boolean Func_2(Str_30 Str_1_Par_Ref, Str_30 Str_2_Par_Ref);
+Boolean Func_3(Enumeration Enum_Par_Val);
+
+int main ()
+/*****/
+
+ /* main program, corresponds to procedures */
+ /* Main and Proc_0 in the Ada version */
+{
+ One_Fifty Int_1_Loc;
+ REG One_Fifty Int_2_Loc;
+ One_Fifty Int_3_Loc;
+ REG char Ch_Index;
+ Enumeration Enum_Loc;
+ Str_30 Str_1_Loc;
+ Str_30 Str_2_Loc;
+ REG int Run_Index;
+ REG int Number_Of_Runs;
+ Rec_Type x, y;
+
+ /* Initializations */
+
+ Next_Ptr_Glob = (Rec_Pointer) &x;
+ Ptr_Glob = (Rec_Pointer) &y;
+
+ Ptr_Glob->Ptr_Comp = Next_Ptr_Glob;
+ Ptr_Glob->Discr = Ident_1;
+ Ptr_Glob->variant.var_1.Enum_Comp = Ident_3;
+ Ptr_Glob->variant.var_1.Int_Comp = 40;
+ strcpy (Ptr_Glob->variant.var_1.Str_Comp,
+ "DHRYSTONE PROGRAM, SOME STRING");
+ strcpy (Str_1_Loc, "DHRYSTONE PROGRAM, 1'ST STRING");
+
+ Arr_2_Glob [8][7] = 10;
+ /* Was missing in published program. Without this statement, */
+ /* Arr_2_Glob [8][7] would have an undefined value. */
+ /* Warning: With 16-Bit processors and Number_Of_Runs > 32000, */
+ /* overflow may occur for this array element. */
+
+/* Initalize Data and Instruction Cache */
+
+
+/* printf ("\n");
+ printf ("Dhrystone Benchmark, Version 2.1 (Language: C)\n");
+ printf ("\n");
+ if (Reg)
+ {
+ printf ("Program compiled with 'register' attribute\n");
+ printf ("\n");
+ }
+ else
+ {
+ printf ("Program compiled without 'register' attribute\n");
+ printf ("\n");
+ }
+ printf ("Please give the number of runs through the benchmark: ");
+ */
+ {
+ int n;
+ /* scanf ("%d", &n);
+ */
+ n = NUM_RUNS;
+ Number_Of_Runs = n;
+ }
+ printf ("\n");
+
+ printf ("Execution starts, %d runs through Dhrystone\n", Number_Of_Runs);
+
+
+ /***************/
+ /* Start timer */
+ /***************/
+
+/* printf("%d", my_test2(Number_Of_Runs));*/
+ start_timer(TIMER0);
+ Begin_Time = read_timer(TIMER0);
+
+ for (Run_Index = 1; Run_Index <= Number_Of_Runs; ++Run_Index)
+ {
+
+ report(1);
+ report(Run_Index);
+ Proc_5();
+ report(2);
+ Proc_4();
+ report(3);
+ /* Ch_1_Glob == 'A', Ch_2_Glob == 'B', Bool_Glob == true */
+ Int_1_Loc = 2;
+ Int_2_Loc = 3;
+ strcpy (Str_2_Loc, "DHRYSTONE PROGRAM, 2'ND STRING");
+ Enum_Loc = Ident_2;
+ report(0x31);
+ report((unsigned long)Str_1_Loc);
+ report((unsigned long)Str_2_Loc);
+
+ Bool_Glob = ! Func_2 (Str_1_Loc, Str_2_Loc);
+ /* Bool_Glob == 1 */
+ report(4);
+ while (Int_1_Loc < Int_2_Loc) /* loop body executed once */
+ {
+ Int_3_Loc = 5 * Int_1_Loc - Int_2_Loc;
+ /* Int_3_Loc == 7 */
+ Proc_7 (Int_1_Loc, Int_2_Loc, &Int_3_Loc);
+ /* Int_3_Loc == 7 */
+ Int_1_Loc += 1;
+ } /* while */
+ report(5);
+ /* Int_1_Loc == 3, Int_2_Loc == 3, Int_3_Loc == 7 */
+#if DBG
+ printf("a) Int_1_Loc: %x\n", Int_1_Loc);
+ printf("a) Int_2_Loc: %x\n", Int_2_Loc);
+ printf("a) Int_3_Loc: %x\n\n", Int_3_Loc);
+#endif
+ Proc_8 (Arr_1_Glob, Arr_2_Glob, Int_1_Loc, Int_3_Loc);
+ /* Int_Glob == 5 */
+#if DBG
+ printf("b) Int_1_Loc: %x\n", Int_1_Loc);
+ printf("b) Int_2_Loc: %x\n", Int_2_Loc);
+ printf("b) Int_3_Loc: %x\n\n", Int_3_Loc);
+#endif
+ report(6);
+
+ Proc_1 (Ptr_Glob);
+#if DBG
+ printf("c) Int_1_Loc: %x\n", Int_1_Loc);
+ printf("c) Int_2_Loc: %x\n", Int_2_Loc);
+ printf("c) Int_3_Loc: %x\n\n", Int_3_Loc);
+#endif
+ report(7);
+
+ for (Ch_Index = 'A'; Ch_Index <= Ch_2_Glob; ++Ch_Index)
+ /* loop body executed twice */
+ {
+ if (Enum_Loc == Func_1 (Ch_Index, 'C'))
+ /* then, not executed */
+ {
+ Proc_6 (Ident_1, &Enum_Loc);
+ strcpy (Str_2_Loc, "DHRYSTONE PROGRAM, 3'RD STRING");
+ Int_2_Loc = Run_Index;
+ Int_Glob = Run_Index;
+#if DBG
+ printf("d) Int_1_Loc: %x\n", Int_1_Loc);
+ printf("d) Int_2_Loc: %x\n", Int_2_Loc);
+ printf("d) Int_3_Loc: %x\n\n", Int_3_Loc);
+#endif
+ }
+ }
+ report(8);
+
+ /* Int_1_Loc == 3, Int_2_Loc == 3, Int_3_Loc == 7 */
+#if DBG
+ printf("e) Int_1_Loc: %x\n", Int_1_Loc);
+ printf("e) Int_2_Loc: %x\n", Int_2_Loc);
+ printf("e) Int_3_Loc: %x\n", Int_3_Loc);
+ printf("e) Ch_1_Glob: %c\n\n", Ch_1_Glob);
+#endif
+ Int_2_Loc = Int_2_Loc * Int_1_Loc;
+ Int_1_Loc = Int_2_Loc / Int_3_Loc;
+ Int_2_Loc = 7 * (Int_2_Loc - Int_3_Loc) - Int_1_Loc;
+ /* Int_1_Loc == 1, Int_2_Loc == 13, Int_3_Loc == 7 */
+ Proc_2 (&Int_1_Loc);
+ report(9);
+
+ /* Int_1_Loc == 5 */
+#if DBG
+ printf("f) Int_1_Loc: %x\n", Int_1_Loc);
+ printf("f) Int_2_Loc: %x\n", Int_2_Loc);
+ printf("f) Int_3_Loc: %x\n\n", Int_3_Loc);
+#endif
+
+ } /* loop "for Run_Index" */
+
+ /**************/
+ /* Stop timer */
+ /**************/
+
+ End_Time = read_timer(TIMER0);
+
+/* printf ("Execution ends\n");
+ printf ("\n");
+ printf ("Final values of the variables used in the benchmark:\n");
+ printf ("\n");
+ printf ("Int_Glob: %d\n", Int_Glob);
+ printf (" should be: %d\n", 5);
+ printf ("Bool_Glob: %d\n", Bool_Glob);
+ printf (" should be: %d\n", 1);
+ printf ("Ch_1_Glob: %c\n", Ch_1_Glob);
+ printf (" should be: %c\n", 'A');
+ printf ("Ch_2_Glob: %c\n", Ch_2_Glob);
+ printf (" should be: %c\n", 'B');
+ printf ("Arr_1_Glob[8]: %d\n", Arr_1_Glob[8]);
+ printf (" should be: %d\n", 7);
+ printf ("Arr_2_Glob[8][7]: %d\n", Arr_2_Glob[8][7]);
+ printf (" should be: Number_Of_Runs + 10\n");
+ printf ("Ptr_Glob->\n");
+ printf (" Ptr_Comp: %d\n", (int) Ptr_Glob->Ptr_Comp);
+ printf (" should be: (implementation-dependent)\n");
+ printf (" Discr: %d\n", Ptr_Glob->Discr);
+ printf (" should be: %d\n", 0);
+ printf (" Enum_Comp: %d\n", Ptr_Glob->variant.var_1.Enum_Comp);
+ printf (" should be: %d\n", 2);
+ printf (" Int_Comp: %d\n", Ptr_Glob->variant.var_1.Int_Comp);
+ printf (" should be: %d\n", 17);
+ printf (" Str_Comp: %s\n", Ptr_Glob->variant.var_1.Str_Comp);
+ printf (" should be: DHRYSTONE PROGRAM, SOME STRING\n");
+ printf ("Next_Ptr_Glob->\n");
+ printf (" Ptr_Comp: %d\n", (int) Next_Ptr_Glob->Ptr_Comp);
+ printf (" should be: (implementation-dependent), same as above\n");
+ printf (" Discr: %d\n", Next_Ptr_Glob->Discr);
+ printf (" should be: %d\n", 0);
+ printf (" Enum_Comp: %d\n", Next_Ptr_Glob->variant.var_1.Enum_Comp);
+ printf (" should be: %d\n", 1);
+ printf (" Int_Comp: %d\n", Next_Ptr_Glob->variant.var_1.Int_Comp);
+ printf (" should be: %d\n", 18);
+ printf (" Str_Comp: %s\n",
+ Next_Ptr_Glob->variant.var_1.Str_Comp);
+ printf (" should be: DHRYSTONE PROGRAM, SOME STRING\n");
+ printf ("Int_1_Loc: %d\n", Int_1_Loc);
+ printf (" should be: %d\n", 5);
+ printf ("Int_2_Loc: %d\n", Int_2_Loc);
+ printf (" should be: %d\n", 13);
+ printf ("Int_3_Loc: %d\n", Int_3_Loc);
+ printf (" should be: %d\n", 7);
+ printf ("Enum_Loc: %d\n", Enum_Loc);
+ printf (" should be: %d\n", 1);
+ printf ("Str_1_Loc: %s\n", Str_1_Loc);
+ printf (" should be: DHRYSTONE PROGRAM, 1'ST STRING\n");
+ printf ("Str_2_Loc: %s\n", Str_2_Loc);
+ printf (" should be: DHRYSTONE PROGRAM, 2'ND STRING\n");
+
+*/
+
+
+ User_Time = End_Time - Begin_Time;
+ /* microseconds */
+
+ printf("Begin Time = %d\n",Begin_Time);
+ printf("End Time = %d\n",End_Time);
+
+
+ if (User_Time < Too_Small_Time)
+ {
+ printf ("Measured time too small to obtain meaningful results\n");
+ printf ("Please increase number of runs\n");
+ printf ("\n");
+ }
+ else
+ {
+#if DLX || OR1K
+ User_Time /= DLX_FREQ;
+#if DLX
+ printf("DLX ");
+#else
+#if OR1K
+ printf("OR1K ");
+#else
+ printf("Unknown CPU ");
+#endif
+#endif
+ printf("at %u MHz ", DLX_FREQ);
+ if (PROC_6)
+ printf("(+PROC_6)");
+ printf("\n");
+#endif
+ Microseconds = User_Time / Number_Of_Runs;
+ Dhrystones_Per_Second = Number_Of_Runs * 1000 / User_Time;
+ printf ("Microseconds for one run through Dhrystone: ");
+ printf ("%d us / %d runs\n", User_Time,Number_Of_Runs);
+ printf ("Dhrystones per Second: ");
+ printf ("%d \n", Dhrystones_Per_Second);
+ }
+ report (0xdeaddead);
+ return 0;
+}
+
+
+void Proc_1(Ptr_Val_Par)
+/******************/
+
+ REG Rec_Pointer Ptr_Val_Par;
+ /* executed once */
+{
+ REG Rec_Pointer Next_Record = Ptr_Val_Par->Ptr_Comp;
+ /* == Ptr_Glob_Next */
+ /* Local variable, initialized with Ptr_Val_Par->Ptr_Comp, */
+ /* corresponds to "rename" in Ada, "with" in Pascal */
+
+ report(0x20010);
+
+ structassign(*Ptr_Val_Par->Ptr_Comp, *Ptr_Glob);
+ Ptr_Val_Par->variant.var_1.Int_Comp = 5;
+ Next_Record->variant.var_1.Int_Comp
+ = Ptr_Val_Par->variant.var_1.Int_Comp;
+ Next_Record->Ptr_Comp = Ptr_Val_Par->Ptr_Comp;
+ Proc_3(&Next_Record->Ptr_Comp);
+ report(0x20011);
+ /*
+ * Ptr_Val_Par->Ptr_Comp->Ptr_Comp == Ptr_Glob->Ptr_Comp
+ */
+ if (Next_Record->Discr == Ident_1)
+ /* then, executed */
+ {
+ Next_Record->variant.var_1.Int_Comp = 6;
+ Proc_6(Ptr_Val_Par->variant.var_1.Enum_Comp,
+ &Next_Record->variant.var_1.Enum_Comp);
+ report(0x20012);
+ Next_Record->Ptr_Comp = Ptr_Glob->Ptr_Comp;
+ Proc_7(Next_Record->variant.var_1.Int_Comp, 10,
+ &Next_Record->variant.var_1.Int_Comp);
+ } else /* not executed */
+ structassign(*Ptr_Val_Par, *Ptr_Val_Par->Ptr_Comp);
+ report(0x20013);
+
+} /* Proc_1 */
+
+
+void
+ Proc_2(Int_Par_Ref)
+/******************/
+ /* executed once */
+ /* *Int_Par_Ref == 1, becomes 4 */
+
+ One_Fifty *Int_Par_Ref;
+{
+ One_Fifty Int_Loc;
+ Enumeration Enum_Loc = 0;
+
+ report(0x20020);
+
+ Int_Loc = *Int_Par_Ref + 10;
+ do /* executed once */
+ if (Ch_1_Glob == 'A')
+ /* then, executed */
+ {
+ Int_Loc -= 1;
+ *Int_Par_Ref = Int_Loc - Int_Glob;
+ Enum_Loc = Ident_1;
+ } /* if */
+ while (Enum_Loc != Ident_1);/* true */
+} /* Proc_2 */
+
+
+void
+ Proc_3(Ptr_Ref_Par)
+/******************/
+ /* executed once */
+ /* Ptr_Ref_Par becomes Ptr_Glob */
+
+ Rec_Pointer *Ptr_Ref_Par;
+
+{
+ report(0x20030);
+
+ if (Ptr_Glob != Null)
+ /* then, executed */
+ *Ptr_Ref_Par = Ptr_Glob->Ptr_Comp;
+ Proc_7(10, Int_Glob, &Ptr_Glob->variant.var_1.Int_Comp);
+} /* Proc_3 */
+
+
+void
+ Proc_4()
+{ /* without parameters */
+ /*******/
+ /* executed once */
+ Boolean Bool_Loc;
+
+ report(0x20040);
+
+ Bool_Loc = Ch_1_Glob == 'A';
+ Bool_Glob = Bool_Loc | Bool_Glob;
+ Ch_2_Glob = 'B';
+} /* Proc_4 */
+
+
+void
+ Proc_5()
+{ /* without parameters */
+ /*******/
+ /* executed once */
+ report(0x20050);
+
+ Ch_1_Glob = 'A';
+ Bool_Glob = false;
+} /* Proc_5 */
+
+/* @(#)dhry_2.c 1.2 92/05/28 14:44:54, AMD */
+/*
+ ****************************************************************************
+ *
+ * "DHRYSTONE" Benchmark Program
+ * -----------------------------
+ *
+ * Version: C, Version 2.1
+ *
+ * File: dhry_2.c (part 3 of 3)
+ *
+ * Date: May 25, 1988
+ *
+ * Author: Reinhold P. Weicker
+ *
+ ****************************************************************************
+ */
+
+#ifndef REG
+#define REG
+ /* REG becomes defined as empty */
+ /* i.e. no register variables */
+#ifdef _AM29K
+#undef REG
+#define REG register /* Define REG; saves room on 127-char MS-DOS cmd line */
+#endif
+#endif
+
+
+void
+ Proc_6(Enum_Val_Par, Enum_Ref_Par)
+/*********************************/
+ /* executed once */
+ /* Enum_Val_Par == Ident_3, Enum_Ref_Par becomes Ident_2 */
+
+ Enumeration Enum_Val_Par;
+ Enumeration *Enum_Ref_Par;
+{
+#if PROC_6
+ report(0x20060);
+
+ *Enum_Ref_Par = Enum_Val_Par;
+ if (!Func_3(Enum_Val_Par))
+ /* then, not executed */
+ *Enum_Ref_Par = Ident_4;
+ switch (Enum_Val_Par) {
+ case Ident_1:
+ *Enum_Ref_Par = Ident_1;
+ break;
+ case Ident_2:
+ if (Int_Glob > 100)
+ /* then */
+ *Enum_Ref_Par = Ident_1;
+ else
+ *Enum_Ref_Par = Ident_4;
+ break;
+ case Ident_3: /* executed */
+ *Enum_Ref_Par = Ident_2;
+ break;
+ case Ident_4:
+ break;
+ case Ident_5:
+ *Enum_Ref_Par = Ident_3;
+ break;
+ } /* switch */
+#endif
+ return;
+} /* Proc_6 */
+
+
+void
+ Proc_7(Int_1_Par_Val, Int_2_Par_Val, Int_Par_Ref)
+/**********************************************/
+ /* executed three times */
+ /* first call: Int_1_Par_Val == 2, Int_2_Par_Val == 3, */
+ /* Int_Par_Ref becomes 7 */
+ /* second call: Int_1_Par_Val == 10, Int_2_Par_Val == 5, */
+ /* Int_Par_Ref becomes 17 */
+ /* third call: Int_1_Par_Val == 6, Int_2_Par_Val == 10, */
+ /* Int_Par_Ref becomes 18 */
+ One_Fifty Int_1_Par_Val;
+ One_Fifty Int_2_Par_Val;
+ One_Fifty *Int_Par_Ref;
+{
+ One_Fifty Int_Loc;
+
+ report(0x20070);
+
+ Int_Loc = Int_1_Par_Val + 2;
+ *Int_Par_Ref = Int_2_Par_Val + Int_Loc;
+} /* Proc_7 */
+
+
+void
+ Proc_8(Arr_1_Par_Ref, Arr_2_Par_Ref, Int_1_Par_Val, Int_2_Par_Val)
+/*********************************************************************/
+ /* executed once */
+ /* Int_Par_Val_1 == 3 */
+ /* Int_Par_Val_2 == 7 */
+ Arr_1_Dim Arr_1_Par_Ref;
+ Arr_2_Dim Arr_2_Par_Ref;
+ int Int_1_Par_Val;
+ int Int_2_Par_Val;
+{
+ REG One_Fifty Int_Index;
+ REG One_Fifty Int_Loc;
+
+#if DBG
+ printf("X) Int_1_Par_Val: %x\n", Int_1_Par_Val);
+ printf("X) Int_2_Par_Val: %x\n", Int_2_Par_Val);
+#endif
+
+ report(0x20080);
+
+ Int_Loc = Int_1_Par_Val + 5;
+ Arr_1_Par_Ref[Int_Loc] = Int_2_Par_Val;
+ Arr_1_Par_Ref[Int_Loc + 1] = Arr_1_Par_Ref[Int_Loc];
+ Arr_1_Par_Ref[Int_Loc + 30] = Int_Loc;
+ for (Int_Index = Int_Loc; Int_Index <= Int_Loc + 1; ++Int_Index)
+ Arr_2_Par_Ref[Int_Loc][Int_Index] = Int_Loc;
+ Arr_2_Par_Ref[Int_Loc][Int_Loc - 1] += 1;
+ Arr_2_Par_Ref[Int_Loc + 20][Int_Loc] = Arr_1_Par_Ref[Int_Loc];
+ Int_Glob = 5;
+
+#if DBG
+ printf("Y) Int_1_Par_Val: %x\n", Int_1_Par_Val);
+ printf("Y) Int_2_Par_Val: %x\n", Int_2_Par_Val);
+#endif
+
+} /* Proc_8 */
+
+
+Enumeration
+ Func_1(Ch_1_Par_Val, Ch_2_Par_Val)
+/*************************************************/
+ /* executed three times */
+ /* first call: Ch_1_Par_Val == 'H', Ch_2_Par_Val == 'R' */
+ /* second call: Ch_1_Par_Val == 'A', Ch_2_Par_Val == 'C' */
+ /* third call: Ch_1_Par_Val == 'B', Ch_2_Par_Val == 'C' */
+
+ Capital_Letter Ch_1_Par_Val;
+ Capital_Letter Ch_2_Par_Val;
+{
+ Capital_Letter Ch_1_Loc;
+ Capital_Letter Ch_2_Loc;
+
+ report(0x30010);
+
+ Ch_1_Loc = Ch_1_Par_Val;
+ Ch_2_Loc = Ch_1_Loc;
+ if (Ch_2_Loc != Ch_2_Par_Val)
+ /* then, executed */
+ return (Ident_1);
+ else { /* not executed */
+ Ch_1_Glob = Ch_1_Loc;
+ return (Ident_2);
+ }
+} /* Func_1 */
+
+
+Boolean
+ Func_2(Str_1_Par_Ref, Str_2_Par_Ref)
+/*************************************************/
+ /* executed once */
+ /* Str_1_Par_Ref == "DHRYSTONE PROGRAM, 1'ST STRING" */
+ /* Str_2_Par_Ref == "DHRYSTONE PROGRAM, 2'ND STRING" */
+
+ Str_30 Str_1_Par_Ref;
+ Str_30 Str_2_Par_Ref;
+{
+ REG One_Thirty Int_Loc;
+ Capital_Letter Ch_Loc = 0;
+
+ report(0x30020);
+
+ Int_Loc = 2;
+ while (Int_Loc <= 2) /* loop body executed once */
+ if (Func_1(Str_1_Par_Ref[Int_Loc],
+ Str_2_Par_Ref[Int_Loc + 1]) == Ident_1)
+ /* then, executed */
+ {
+ Ch_Loc = 'A';
+ Int_Loc += 1;
+ } /* if, while */
+ report(0x30021);
+
+ if (Ch_Loc >= 'W' && Ch_Loc < 'Z')
+ /* then, not executed */
+ Int_Loc = 7;
+ report(0x30022);
+ if (Ch_Loc == 'R')
+ /* then, not executed */
+ return (true);
+ else { /* executed */
+ report(0x30023);
+ if (strcmp(Str_1_Par_Ref, Str_2_Par_Ref) > 0)
+ /* then, not executed */
+ {
+ Int_Loc += 7;
+ Int_Glob = Int_Loc;
+ return (true);
+ } else /* executed */
+ return (false);
+ } /* if Ch_Loc */
+} /* Func_2 */
+
+
+Boolean
+ Func_3(Enum_Par_Val)
+/***************************/
+ /* executed once */
+ /* Enum_Par_Val == Ident_3 */
+ Enumeration Enum_Par_Val;
+{
+ Enumeration Enum_Loc;
+
+ Enum_Loc = Enum_Par_Val;
+ report(0x30030);
+ if (Enum_Loc == Ident_3)
+ /* then, executed */
+ return (true);
+ else /* not executed */
+ return (false);
+} /* Func_3 */
dhry.c
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mc_common.c
===================================================================
--- mc_common.c (nonexistent)
+++ mc_common.c (revision 1765)
@@ -0,0 +1,431 @@
+/* mc_common.c -- Memory Controller testbenck common routines
+ Copyright (C) 2001 by Ivan Guzvinec, ivang@opencores.org
+
+ This file is part of OpenRISC 1000 Architectural Simulator.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "support.h"
+#include "mc_common.h"
+
+static int r_Xn;
+static int r_mod;
+
+void randomin(unsigned long seed)
+{
+ r_Xn = seed;
+ r_mod = 33554431; /* 2^25 - 1*/
+}
+
+unsigned long random(unsigned long max)
+{
+ r_Xn = ((r_Xn * (r_Xn + 1))%r_mod);
+ if (r_Xn == 0) r_Xn = 42+1;
+ return r_Xn%max;
+}
+
+void mc_clear_row(unsigned long nFrom, unsigned long nTo)
+{
+ MEMLOC32 mem32 = 0;
+ unsigned long i;
+
+ for(i=nFrom; i