OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /or1k/tags/nog_patch_70/or1ksim/testbench
    from Rev 1466 to Rev 1765
    Reverse comparison

Rev 1466 → Rev 1765

/mmu.c
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;
}
 
/default.cfg
0,0 → 1,155
/* 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 */
nmemories = 2
device 0
name = "FLASH"
ce = 0
baseaddr = 0xf0000000
size = 0x00200000
delayr = 10
delayw = -1
enddevice
device 1
name = "RAM"
ce = 1
baseaddr = 0x00000000
size = 0x00200000
delayr = 2
delayw = 4
enddevice
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 */
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
 
section test
enabled = 1
baseaddr = 0xa5000000
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,55 @@ +section memory + /*random_seed = 12345 + type = random*/ + pattern = 0x00 + type = unknown /* Fastest */ + + nmemories = 2 + device 0 + name = "RAM" + ce = 0 + baseaddr = 0x00000000 + size = 0x00200000 + delayr = 10 + delayw = -1 + enddevice + + device 1 + name = "FLASH" + ce = 1 + baseaddr = 0x40000000 + size = 0x00200000 + delayr = 2 + delayw = 4 + enddevice +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 + log_device_id = 0 + vapi_log_fn = "vapi.log" + server_port = 9100 +end Index: acv_uart.cfg =================================================================== --- acv_uart.cfg (nonexistent) +++ acv_uart.cfg (revision 1765) @@ -0,0 +1,63 @@ +section memory + /*random_seed = 12345 + type = random*/ + pattern = 0x00 + type = unknown /* Fastest */ + + nmemories = 2 + device 0 + name = "FLASH" + ce = 0 + baseaddr = 0xf0000000 + size = 0x00200000 + delayr = 1 + delayw = -1 + enddevice + + device 1 + name = "RAM" + ce = 1 + baseaddr = 0x00000000 + size = 0x00200000 + delayr = 1 + delayw = 1 + enddevice +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: 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: 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(00000000)" >>$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: 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: acv_uart.c =================================================================== --- acv_uart.c (nonexistent) +++ acv_uart.c (revision 1765) @@ -0,0 +1,824 @@ +/* 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 @ %i\n", __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, 12 & 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 (); + + /* 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) == 0x00); /* 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 frane 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: 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?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêë + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéê \ No newline at end of file Index: dhry.h =================================================================== --- dhry.h (nonexistent) +++ dhry.h (revision 1765) @@ -0,0 +1,412 @@ +/* + **************************************************************************** + * + * "DHRYSTONE" Benchmark Program + * ----------------------------- + * + * Version: C, Version 2.1 + * + * File: dhry.h (part 1 of 3) + * + * Date: May 25, 1988 + * + * Author: Reinhold P. Weicker + * Siemens AG, AUT E 51 + * Postfach 3220 + * 8520 Erlangen + * Germany (West) + * Phone: [+49]-9131-7-20330 + * (8-17 Central European Time) + * Usenet: ..!mcsun!unido!estevax!weicker + * + * Original Version (in Ada) published in + * "Communications of the ACM" vol. 27., no. 10 (Oct. 1984), + * pp. 1013 - 1030, together with the statistics + * on which the distribution of statements etc. is based. + * + * In this C version, the following C library functions are used: + * - strcpy, strcmp (inside the measurement loop) + * - printf, scanf (outside the measurement loop) + * In addition, Berkeley UNIX system calls "times ()" or "time ()" + * are used for execution time measurement. For measurements + * on other systems, these calls have to be changed. + * + * Updated January, 1997 Rick Cramer, Galileo(R) to work with + * the i960jx and Galileo-5 Reference Design. + * + * + * Collection of Results: + * Reinhold Weicker (address see above) and + * + * Rick Richardson + * PC Research. Inc. + * 94 Apple Orchard Drive + * Tinton Falls, NJ 07724 + * Phone: (201) 389-8963 (9-17 EST) + * Usenet: ...!uunet!pcrat!rick + * + * Please send results to Rick Richardson and/or Reinhold Weicker. + * Complete information should be given on hardware and software used. + * Hardware information includes: Machine type, CPU, type and size + * of caches; for microprocessors: clock frequency, memory speed + * (number of wait states). + * Software information includes: Compiler (and runtime library) + * manufacturer and version, compilation switches, OS version. + * The Operating System version may give an indication about the + * compiler; Dhrystone itself performs no OS calls in the measurement loop. + * + * The complete output generated by the program should be mailed + * such that at least some checks for correctness can be made. + * + *************************************************************************** + * + * History: This version C/2.1 has been made for two reasons: + * + * 1) There is an obvious need for a common C version of + * Dhrystone, since C is at present the most popular system + * programming language for the class of processors + * (microcomputers, minicomputers) where Dhrystone is used most. + * There should be, as far as possible, only one C version of + * Dhrystone such that results can be compared without + * restrictions. In the past, the C versions distributed + * by Rick Richardson (Version 1.1) and by Reinhold Weicker + * had small (though not significant) differences. + * + * 2) As far as it is possible without changes to the Dhrystone + * statistics, optimizing compilers should be prevented from + * removing significant statements. + * + * This C version has been developed in cooperation with + * Rick Richardson (Tinton Falls, NJ), it incorporates many + * ideas from the "Version 1.1" distributed previously by + * him over the UNIX network Usenet. + * I also thank Chaim Benedelac (National Semiconductor), + * David Ditzel (SUN), Earl Killian and John Mashey (MIPS), + * Alan Smith and Rafael Saavedra-Barrera (UC at Berkeley) + * for their help with comments on earlier versions of the + * benchmark. + * + * Changes: In the initialization part, this version follows mostly + * Rick Richardson's version distributed via Usenet, not the + * version distributed earlier via floppy disk by Reinhold Weicker. + * As a concession to older compilers, names have been made + * unique within the first 8 characters. + * Inside the measurement loop, this version follows the + * version previously distributed by Reinhold Weicker. + * + * At several places in the benchmark, code has been added, + * but within the measurement loop only in branches that + * are not executed. The intention is that optimizing compilers + * should be prevented from moving code out of the measurement + * loop, or from removing code altogether. Since the statements + * that are executed within the measurement loop have NOT been + * changed, the numbers defining the "Dhrystone distribution" + * (distribution of statements, operand types and locality) + * still hold. Except for sophisticated optimizing compilers, + * execution times for this version should be the same as + * for previous versions. + * + * Since it has proven difficult to subtract the time for the + * measurement loop overhead in a correct way, the loop check + * has been made a part of the benchmark. This does have + * an impact - though a very minor one - on the distribution + * statistics which have been updated for this version. + * + * All changes within the measurement loop are described + * and discussed in the companion paper "Rationale for + * Dhrystone version 2". + * + * Because of the self-imposed limitation that the order and + * distribution of the executed statements should not be + * changed, there are still cases where optimizing compilers + * may not generate code for some statements. To a certain + * degree, this is unavoidable for small synthetic benchmarks. + * Users of the benchmark are advised to check code listings + * whether code is generated for all statements of Dhrystone. + * + * Version 2.1 is identical to version 2.0 distributed via + * the UNIX network Usenet in March 1988 except that it corrects + * some minor deficiencies that were found by users of version 2.0. + * The only change within the measurement loop is that a + * non-executed "else" part was added to the "if" statement in + * Func_3, and a non-executed "else" part removed from Proc_3. + * + *************************************************************************** + * + * Defines: The following "Defines" are possible: + * -DREG=register (default: Not defined) + * As an approximation to what an average C programmer + * might do, the "register" storage class is applied + * (if enabled by -DREG=register) + * - for local variables, if they are used (dynamically) + * five or more times + * - for parameters if they are used (dynamically) + * six or more times + * Note that an optimal "register" strategy is + * compiler-dependent, and that "register" declarations + * do not necessarily lead to faster execution. + * -DNOSTRUCTASSIGN (default: Not defined) + * Define if the C compiler does not support + * assignment of structures. + * -DNOENUMS (default: Not defined) + * Define if the C compiler does not support + * enumeration types. + * -DICACHEON (default: Not defined) + * Adjust performace by conditionally compiling + * these i960jx CACHE paramaters. + * -DICACHEOFF + * -DDCACHEON (default: Not defined) + * -DDCACHEOFF + * + * NOTE: Galileo-5 Board Frequency is set to 33Mhz in the + * file jx-timer.c. If the operating frequency is + * changed by replacing the crystal, then this #define + * must also be changed. + * + *************************************************************************** + * + * Compilation model and measurement (IMPORTANT): + * + * This C version of Dhrystone consists of four files: + * - dhry.h (this file, containing global definitions and comments) + * - dhry_1.c (containing the code corresponding to Ada package Pack_1) + * - dhry_2.c (containing the code corresponding to Ada package Pack_2) + * - jx-timer.c (containing the code to access the i960jx timer) + * + * The following "ground rules" apply for measurements: + * - No procedure merging + * - Otherwise, compiler optimizations are allowed but should be indicated + * - Default results are those without register declarations + * See the companion paper "Rationale for Dhrystone Version 2" for a more + * detailed discussion of these ground rules. + * + * For 16-Bit processors (e.g. 80186, 80286), times for all compilation + * models ("small", "medium", "large" etc.) should be given if possible, + * together with a definition of these models for the compiler system used. + * + * Example Intel 960jx compile syntax for Galileo-5. + * + * ic960 -AJA -Tgal5 -O2 -DREG=register dhry_1.c dhry_2.c jx-timer.c + * + ************************************************************************** + * + * Dhrystone (C version) statistics: + * + * [Comment from the first distribution, updated for version 2. + * Note that because of language differences, the numbers are slightly + * different from the Ada version.] + * + * The following program contains statements of a high level programming + * language (here: C) in a distribution considered representative: + * + * assignments 52 (51.0 %) + * control statements 33 (32.4 %) + * procedure, function calls 17 (16.7 %) + * + * 103 statements are dynamically executed. The program is balanced with + * respect to the three aspects: + * + * - statement type + * - operand type + * - operand locality + * operand global, local, parameter, or constant. + * + * The combination of these three aspects is balanced only approximately. + * + * 1. Statement Type: + * ----------------- number + * + * V1 = V2 9 + * (incl. V1 = F(..) + * V = Constant 12 + * Assignment, 7 + * with array element + * Assignment, 6 + * with record component + * -- + * 34 34 + * + * X = Y +|-|"&&"|"|" Z 5 + * X = Y +|-|"==" Constant 6 + * X = X +|- 1 3 + * X = Y *|/ Z 2 + * X = Expression, 1 + * two operators + * X = Expression, 1 + * three operators + * -- + * 18 18 + * + * if .... 14 + * with "else" 7 + * without "else" 7 + * executed 3 + * not executed 4 + * for ... 7 | counted every time + * while ... 4 | the loop condition + * do ... while 1 | is evaluated + * switch ... 1 + * break 1 + * declaration with 1 + * initialization + * -- + * 34 34 + * + * P (...) procedure call 11 + * user procedure 10 + * library procedure 1 + * X = F (...) + * function call 6 + * user function 5 + * library function 1 + * -- + * 17 17 + * --- + * 103 + * + * The average number of parameters in procedure or function calls + * is 1.82 (not counting the function values as implicit parameters). + * + * + * 2. Operators + * ------------ + * number approximate + * percentage + * + * Arithmetic 32 50.8 + * + * + 21 33.3 + * - 7 11.1 + * * 3 4.8 + * / (int div) 1 1.6 + * + * Comparison 27 42.8 + * + * == 9 14.3 + * /= 4 6.3 + * > 1 1.6 + * < 3 4.8 + * >= 1 1.6 + * <= 9 14.3 + * + * Logic 4 6.3 + * + * && (AND-THEN) 1 1.6 + * | (OR) 1 1.6 + * ! (NOT) 2 3.2 + * + * -- ----- + * 63 100.1 + * + * + * 3. Operand Type (counted once per operand reference): + * --------------- + * number approximate + * percentage + * + * Integer 175 72.3 % + * Character 45 18.6 % + * Pointer 12 5.0 % + * String30 6 2.5 % + * Array 2 0.8 % + * Record 2 0.8 % + * --- ------- + * 242 100.0 % + * + * When there is an access path leading to the final operand (e.g. a record + * component), only the final data type on the access path is counted. + * + * + * 4. Operand Locality: + * ------------------- + * number approximate + * percentage + * + * local variable 114 47.1 % + * global variable 22 9.1 % + * parameter 45 18.6 % + * value 23 9.5 % + * reference 22 9.1 % + * function result 6 2.5 % + * constant 55 22.7 % + * --- ------- + * 242 100.0 % + * + * + * The program does not compute anything meaningful, but it is syntactically + * and semantically correct. All variables have a value assigned to them + * before they are used as a source operand. + * + * There has been no explicit effort to account for the effects of a + * cache, or to balance the use of long or short displacements for code or + * data. + * + *************************************************************************** + */ + +/* Compiler and system dependent definitions: */ + + +#define Mic_secs_Per_Second 1000000.0 + /* Berkeley UNIX C returns process times in seconds/HZ */ + +#ifdef NOSTRUCTASSIGN +#define structassign(d, s) memcpy(&(d), &(s), sizeof(d)) +#else +#define structassign(d, s) d = s +#endif + +#ifdef NOENUM +#define Ident_1 0 +#define Ident_2 1 +#define Ident_3 2 +#define Ident_4 3 +#define Ident_5 4 + typedef int Enumeration; +#else + typedef enum {Ident_1, Ident_2, Ident_3, Ident_4, Ident_5} + Enumeration; +#endif + /* for boolean and enumeration types in Ada, Pascal */ + +/* General definitions: */ + +/* #include + */ + /* for strcpy, strcmp */ + +#define Null 0 + /* Value of a Null pointer */ +#define true 1 +#define false 0 + +typedef int One_Thirty; +typedef int One_Fifty; +typedef char Capital_Letter; +typedef int Boolean; +typedef char Str_30 [31]; +typedef int Arr_1_Dim [50]; +typedef int Arr_2_Dim [50] [50]; + +typedef struct record + { + struct record *Ptr_Comp; + Enumeration Discr; + union { + struct { + Enumeration Enum_Comp; + int Int_Comp; + char Str_Comp [31]; + } var_1; + struct { + Enumeration E_Comp_2; + char Str_2_Comp [31]; + } var_2; + struct { + char Ch_1_Comp; + char Ch_2_Comp; + } var_3; + } variant; + } Rec_Type, *Rec_Pointer; + +
dhry.h Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: eth.c =================================================================== --- eth.c (nonexistent) +++ eth.c (revision 1765) @@ -0,0 +1,227 @@ +/* Ethernet test */ + +#include "spr_defs.h" +#include "support.h" +#include "board.h" + +typedef long off_t; + +#include "../peripheral/fields.h" +#include "../peripheral/ethernet.h" + +typedef volatile unsigned long *REGISTER; + +REGISTER + eth_moder = (unsigned long *)(ETH_BASE + ETH_MODER), + eth_int_source = (unsigned long *)(ETH_BASE + ETH_INT_SOURCE), + eth_int_mask = (unsigned long *)(ETH_BASE + ETH_INT_MASK), + eth_ipgt = (unsigned long *)(ETH_BASE + ETH_IPGT), + eth_ipgr1 = (unsigned long *)(ETH_BASE + ETH_IPGR1), + eth_ipgr2 = (unsigned long *)(ETH_BASE + ETH_IPGR2), + eth_packetlen = (unsigned long *)(ETH_BASE + ETH_PACKETLEN), + eth_collconf = (unsigned long *)(ETH_BASE + ETH_COLLCONF), + eth_tx_bd_num = (unsigned long *)(ETH_BASE + ETH_TX_BD_NUM), + eth_controlmoder = (unsigned long *)(ETH_BASE + ETH_CTRLMODER), + eth_miimoder = (unsigned long *)(ETH_BASE + ETH_MIIMODER), + eth_miicommand = (unsigned long *)(ETH_BASE + ETH_MIICOMMAND), + eth_miiaddress = (unsigned long *)(ETH_BASE + ETH_MIIADDRESS), + eth_miitx_data = (unsigned long *)(ETH_BASE + ETH_MIITX_DATA), + eth_miirx_data = (unsigned long *)(ETH_BASE + ETH_MIIRX_DATA), + eth_miistatus = (unsigned long *)(ETH_BASE + ETH_MIISTATUS), + eth_mac_addr0 = (unsigned long *)(ETH_BASE + ETH_MAC_ADDR0), + eth_mac_addr1 = (unsigned long *)(ETH_BASE + ETH_MAC_ADDR1), + eth_bd_base = (unsigned long *)(ETH_BASE + ETH_BD_BASE); + +volatile unsigned int_happend; +unsigned char r_packet[2000]; +unsigned char s_packet[1003]; +unsigned tx_bindex; +unsigned rx_bindex; + +void interrupt_handler() +{ + unsigned i,len; + + printf ("Int\n"); + switch (*eth_int_source & 0x7f) { + case 0x2 : + printf ("Transmit Error.\n"); + *eth_int_source = 0x2; + break; + case 0x8 : + printf ("Receive Error\n"); + *eth_int_source = 0x8; + break; + case 0x4 : + printf ("Receive Frame\n"); + *eth_int_source = 0x4; + + CLEAR_FLAG(*eth_moder, ETH_MODER, RXEN); + + len = GET_FIELD(eth_bd_base[(*eth_tx_bd_num << 1) + 2], ETH_RX_BD, LENGTH); + for (i=0; i 2) /* normaly i == 3 */ + i += 1; + else + i -=10; + + if (i >= 4) /* normaly i == 4 */ + i += 1; + else + i -= 10; + + if (i <= 5) /* normaly i == 5 */ + i += 1; + else + i -= 10; + + if (i < 7) /* normaly i == 6 */ + i += 1; + else + i -= 10; + + if (i != 666) /* normaly i == 7 */ + i += 1; + else + i -= 10; + + return i; /* with initial i == 1 return 8 */ +} + +signed long test_loops(int i) +{ + int j = 0; + + for(; i < 10; i++) + j += 2; + + do { + i -= 3; + } while (j--); + + return i; +} + +signed long test_arith(int i) +{ + int mul = 0, div = 0; + int j; + + for(j = i; j < 40; j++) { + + mul += j*j*i; +#if 0 + report(mul); +#endif + div += mul / (j+5); +#if 0 + report(div); +#endif + } + + report (mul+div); + return (mul + div); +} + +signed long test_bitop(int i) +{ + int shl = 0, shr = 0, bit = 0; + int j; + + for(j = i; j < 35; j++) { + shl += 1 << j; +#if 0 + printf("%u. shl:%.8lx", j, shl); + report(shl); +#endif + shr += 0x80000000 >> j; +#if 0 + printf(" shr:%.8lx", shr); + report(shr); +#endif + bit += ((~j ^ 0x11223344) & 0x33557788) + (j | 0x11223344); +#if 0 + printf(" bit:%.8lx\n", bit); + report(bit); +#endif + } + + return (shl + shr + bit); +} + +signed long test_types(int i) +{ + unsigned char uc; + signed char sc; + unsigned short us; + signed short ss; + unsigned long ul; + signed long sl; + + int j; + + i ^= 0x10203040; + + for(j = 0; j < 10; j++) { + uc = i; + sc = i; + us = i; + ss = i; + ul = i; + sl = i; +#if 0 + printf("%u. i:%.8lx ", j, i); + printf("uc:%.8lx sc:%.8lx ", uc, sc); + report(uc); + report(sc); + printf("us:%.8lx ss:%.8lx ", us, ss); + report(us); + report(ss); + printf("ul:%.8lx sl:%.8lx\n", ul, sl); + report(ul); + report(sl); +#endif + i = uc + sc + us + ss + ul + sl; + } + + return i; +} + +signed long test_array(int i) +{ + char a1[] = "This test string MUST NOT be modified..."; + char a2[100]; + + report(a1[5]); + memcpy(a2, a1, 40); + report(a1[5]); + report(a2[5]); + report(i); + /* register reload test */ + i += a2[0] + a2[1] + a2[2] + a2[3] + a2[4] + a2[5] + a2[6] + a2[7] + + a2[8] + a2[9] + a2[10] + a2[11] + a2[12] + a2[13] + a2[14] + a2[15] + + a2[16] + a2[17] + a2[18] + a2[19] + a2[20] + a2[21] + a2[22] + a2[23] + + a2[24] + a2[25] + a2[26] + a2[27] + a2[28] + a2[29] + a2[30] + a2[31] + + a2[32] + a2[33] + a2[34] + a2[35] + a2[36] + a2[37] + a2[38] + a2[39]; + report(i); + + return i; +} + +int main() +{ + signed long result1 = 0; + signed long result2 = 0; + signed long result3 = 0; + +#if DEBUG + printf("Start...\n"); +#endif + result1 = test_cond(1); + result2 = test_cond(-1); + result3 -= result1 + result2; + report(result2); +#if DEBUG + printf("After test_cond: 0x%.8lx 0x%.8lx\n", result1, result2); +#endif + + result1 = test_loops(1); + result2 = test_loops(-1); + result3 -= result1 + result2; + report(result2); +#if DEBUG + printf("After test_loops: 0x%.8lx 0x%.8lx\n", result1, result2); +#endif + + result1 = test_arith(1); + result2 = test_arith(-1); + result3 -= result1 + result2; + report(result2); +#if DEBUG + printf("After test_arith: 0x%.8lx 0x%.8lx\n", result1, result2); +#endif + + result1 = test_bitop(1); + result2 = test_bitop(-1); + result3 -= result1 + result2; + report(result2); +#if DEBUG + printf("After test_bitop: 0x%.8lx 0x%.8lx\n", result1, result2); +#endif + + result1 = test_types(1); + result2 = test_types(-1); + result3 -= result1 + result2; + report(result2); +#if DEBUG + printf("After test_types: 0x%.8lx 0x%.8lx\n", result1, result2); +#endif + result1 = test_array(1); + result2 = test_array(-1); + result3 -= result1 + result2; + report(result2); +#if DEBUG + printf("After test_array: 0x%.8lx 0x%.8lx\n", result1, result2); +#endif + +#ifdef XXX +#warning xxx +#endif + + printf("RESULT: %.8lx\n", result3 ^ 0x4bad2569 ^ 0xdeaddead); + report(result3 ^ 0x4bad2569 ^ 0xdeaddead); + + exit(0); +}
cbasic.c Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: functest.c =================================================================== --- functest.c (nonexistent) +++ functest.c (revision 1765) @@ -0,0 +1,37 @@ +/* Simple test, that test function parameters */ +#include "support.h" + +int gk = 0; +int c = 0; +int fun1 (int a, int b, int c, int d, int e, int f, int g) +{ + int j = 0; + volatile char x[50]; + &x; + + while(j < 2) { + a++; + j++; + } + + return a; +} + +int main(void) +{ + int i, j, k; + i = j = k = 0; + + while (c++ < 10) { + j = fun1(gk, k + 1, k + 2, k + 3, k + 4, k + 5, k + 6); + printf ("%i\n", gk); + if(j > 40) + gk = j - 20; + else + gk = j; + } + report (gk); + if (gk == 20) + report(0xdeaddead); + return (gk != 20); +}
functest.c Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: kbdtest.c =================================================================== --- kbdtest.c (nonexistent) +++ kbdtest.c (revision 1765) @@ -0,0 +1,91 @@ +/* Simple keyboard test. Outputs scan codes. */ +#include "support.h" +#include "spr_defs.h" +#include "board.h" + +/* Whether this test should be run in interactive mode; scan codes are not check against real ones */ +#define INTERACTIVE 0 + +/* 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");} +#define MARK() printf ("Passed line %i\n", __LINE__) + +#ifndef __LINE__ +#define __LINE__ 0 +#endif + +#if !INTERACTIVE +static const unsigned char incoming_scan[] = { + 0x2a, 0x14, 0x94, 0xaa, 0x12, 0x92, 0x04, 0x84, 0x2a, 0x0d, + 0x8d, 0xaa, 0x0d, 0x8d, 0x0c, 0x8c, 0x2a, 0x33, 0xb3, 0xaa, + 0x35, 0xb5, 0x34, 0xb4, 0x2b, 0xab, 0x2a, 0x2b, 0xab, 0xaa, + 0x2a, 0x28, 0xa8, 0xaa, 0x28, 0xa8, 0x29, 0xa9, 0x2a, 0x1b, + 0x9b, 0xaa, 0x1b, 0x9b, 0x0f, 0x8f, 0x39, 0xb9, 0x2a, 0x02, + 0x82, 0xaa, 0x2a, 0x06, 0x86, 0xaa, 0x2a, 0x07, 0x87, 0xaa, + 0x2a, 0x08, 0x88, 0xaa, 0x2a, 0x0b, 0x8b, 0xaa, 0x2a, 0x09, + 0x89, 0xaa, 0x1c, 0x9c, 0x39, 0xb9, 0x00}; +static int current_scan = 0; +#endif + +static volatile int done; + +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); +} + +void interrupt_handler () +{ + unsigned x; + printf ("Int\n"); + do { + x = getreg (KBD_BASE_ADD); + if (x) printf ("0x%02x, ", x); + report(x); + if (x == 1) done = 1; +#if !INTERACTIVE + printf ("expecting (0x%02x), ", incoming_scan[current_scan]); + if (x) { + ASSERT (incoming_scan[current_scan++] == x); + } + if ((current_scan + 1) >= sizeof (incoming_scan) / sizeof (char)) done = 1; +#endif + } while (x); + printf ("%i", done); + mtspr(SPR_PICSR, 0); +} + +int main () +{ + /* Use our low priority interrupt handler */ + excpt_int = (unsigned long)interrupt_handler; + + printf ("Reading from keyboard.\n"); + printf ("Enabling interrupts.\n"); + done = 0; + + /* Enable interrupts */ + mtspr (SPR_SR, mfspr(SPR_SR) | SPR_SR_IEE); + mtspr (SPR_PICMR, mfspr(SPR_PICMR) | (0x00000001L << KBD_IRQ)); + + while (!done) printf ("[%i]", done); + report (0xdeaddead); + return 0; +}
kbdtest.c Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: mycompress.c =================================================================== --- mycompress.c (nonexistent) +++ mycompress.c (revision 1765) @@ -0,0 +1,735 @@ +#include +#include "support.h" + +#define BYTES_TO_COMPRESS 1000 + +/* + * Compress - data compression program + */ +#define min(a,b) ((a>b) ? b : a) + +/* + * machine variants which require cc -Dmachine: pdp11, z8000, pcxt + */ + +/* + * Set USERMEM to the maximum amount of physical user memory available + * in bytes. USERMEM is used to determine the maximum BITS that can be used + * for compression. + * + * SACREDMEM is the amount of physical memory saved for others; compress + * will hog the rest. + */ +#ifndef SACREDMEM +#define SACREDMEM 0 +#endif + +/* #ifndef USERMEM */ +#define USERMEM 60000 /* default user memory */ +/* #endif */ + +#ifdef interdata /* (Perkin-Elmer) */ +#define SIGNED_COMPARE_SLOW /* signed compare is slower than unsigned */ +#endif + +#ifdef USERMEM +# if USERMEM >= (433484+SACREDMEM) +# define PBITS 16 +# else +# if USERMEM >= (229600+SACREDMEM) +# define PBITS 15 +# else +# if USERMEM >= (127536+SACREDMEM) +# define PBITS 14 +# else +# if USERMEM >= (73464+SACREDMEM) +# define PBITS 13 +# else +# define PBITS 12 +# endif +# endif +# endif +# endif +# undef USERMEM +#endif /* USERMEM */ + +#ifdef PBITS /* Preferred BITS for this memory size */ +# ifndef BITS +# define BITS PBITS +# endif /* BITS */ +#endif /* PBITS */ + +#if BITS == 16 +# define HSIZE 69001 /* 95% occupancy */ +#endif +#if BITS == 15 +# define HSIZE 35023 /* 94% occupancy */ +#endif +#if BITS == 14 +# define HSIZE 18013 /* 91% occupancy */ +#endif +#if BITS == 13 +# define HSIZE 9001 /* 91% occupancy */ +#endif +#if BITS <= 12 +# define HSIZE 5003 /* 80% occupancy */ +#endif + +/* + * a code_int must be able to hold 2**BITS values of type int, and also -1 + */ +#if BITS > 15 +typedef long int code_int; +#else +typedef int code_int; +#endif + +#ifdef SIGNED_COMPARE_SLOW +typedef unsigned long int count_int; +typedef unsigned short int count_short; +#else +typedef long int count_int; +#endif + +#ifdef NO_UCHAR + typedef char char_type; +#else + typedef unsigned char char_type; +#endif /* UCHAR */ +char_type magic_header[] = { "\037\235" }; /* 1F 9D */ + +/* Defines for third byte of header */ +#define BIT_MASK 0x1f +#define BLOCK_MASK 0x80 +/* Masks 0x40 and 0x20 are free. I think 0x20 should mean that there is + a fourth header byte (for expansion). +*/ +#define INIT_BITS 9 /* initial number of bits/code */ + +/* + * compress.c - File compression ala IEEE Computer, June 1984. + * + * Authors: Spencer W. Thomas (decvax!harpo!utah-cs!utah-gr!thomas) + * Jim McKie (decvax!mcvax!jim) + * Steve Davies (decvax!vax135!petsd!peora!srd) + * Ken Turkowski (decvax!decwrl!turtlevax!ken) + * James A. Woods (decvax!ihnp4!ames!jaw) + * Joe Orost (decvax!vax135!petsd!joe) + * + */ + +#if i386 +#include +#include +#include +#include +#include +#include +#endif + +#define ARGVAL() (*++(*argv) || (--argc && *++argv)) + +int n_bits; /* number of bits/code */ +int maxbits = BITS; /* user settable max # bits/code */ +code_int maxcode; /* maximum code, given n_bits */ +code_int maxmaxcode = 1L << BITS; /* should NEVER generate this code */ +#ifdef COMPATIBLE /* But wrong! */ +# define MAXCODE(n_bits) (1L << (n_bits) - 1) +#else +# define MAXCODE(n_bits) ((1L << (n_bits)) - 1) +#endif /* COMPATIBLE */ + +# ifdef sel +/* support gould base register problems */ +/*NOBASE*/ +count_int htab [HSIZE]; +unsigned short codetab [HSIZE]; +/*NOBASE*/ +# else /* !gould */ +count_int htab [HSIZE]; +unsigned short codetab [HSIZE]; +# endif /* !gould */ +#define htabof(i) htab[i] +#define codetabof(i) codetab[i] +code_int hsize = HSIZE; /* for dynamic table sizing */ +count_int fsize; + +/* + * To save much memory, we overlay the table used by compress() with those + * used by decompress(). The tab_prefix table is the same size and type + * as the codetab. The tab_suffix table needs 2**BITS characters. We + * get this from the beginning of htab. The output stack uses the rest + * of htab, and contains characters. There is plenty of room for any + * possible stack (stack used to be 8000 characters). + */ + +#define tab_prefixof(i) codetabof(i) +#ifdef XENIX_16 +# define tab_suffixof(i) ((char_type *)htab[(i)>>15])[(i) & 0x7fff] +# define de_stack ((char_type *)(htab2)) +#else /* Normal machine */ +# define tab_suffixof(i) ((char_type *)(htab))[i] +# define de_stack ((char_type *)&tab_suffixof(1< 0 ) + goto probe; +nomatch: + output ( (code_int) ent ); + out_count++; + ent = c; +#ifdef SIGNED_COMPARE_SLOW + if ( (unsigned) free_ent < (unsigned) maxmaxcode) { +#else + if ( free_ent < maxmaxcode ) { +#endif + codetabof (i) = free_ent++; /* code -> hashtable */ + htabof (i) = fcode; + } + else if ( (count_int)in_count >= checkpoint && block_compress ) + cl_block (); + } + /* + * Put out the final code. + */ + printf("main: output...\n"); + output( (code_int)ent ); + out_count++; + output( (code_int)-1 ); + + if(bytes_out > in_count) /* exit(2) if no savings */ + exit_stat = 2; + printf("main: end...\n"); + report (0xdeaddead); + return 0; +} + +/***************************************************************** + * TAG( output ) + * + * Output the given code. + * Inputs: + * code: A n_bits-bit integer. If == -1, then EOF. This assumes + * that n_bits =< (long)wordsize - 1. + * Outputs: + * Outputs code to the file. + * Assumptions: + * Chars are 8 bits long. + * Algorithm: + * Maintain a BITS character long buffer (so that 8 codes will + * fit in it exactly). Use the VAX insv instruction to insert each + * code in turn. When the buffer fills up empty it and start over. + */ + +static char buf[BITS]; + +#ifndef vax +char_type lmask[9] = {0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00}; +char_type rmask[9] = {0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff}; +#endif /* vax */ + +void output( code ) +code_int code; +{ + + /* + * On the VAX, it is important to have the register declarations + * in exactly the order given, or the asm will break. + */ + register int r_off = offset, bits= n_bits; + register char * bp = buf; + + if ( code >= 0 ) { +#ifdef vax + /* VAX DEPENDENT!! Implementation on other machines is below. + * + * Translation: Insert BITS bits from the argument starting at + * offset bits from the beginning of buf. + */ + 0; /* Work around for pcc -O bug with asm and if stmt */ + asm( "insv 4(ap),r11,r10,(r9)" ); +#else /* not a vax */ +/* + * byte/bit numbering on the VAX is simulated by the following code + */ + /* + * Get to the first byte. + */ + bp += (r_off >> 3); + r_off &= 7; + /* + * Since code is always >= 8 bits, only need to mask the first + * hunk on the left. + */ + *bp = (*bp & rmask[r_off]) | ((code << r_off) & lmask[r_off]); + bp++; + bits -= (8 - r_off); + code >>= 8 - r_off; + /* Get any 8 bit parts in the middle (<=1 for up to 16 bits). */ + if ( bits >= 8 ) { + *bp++ = code; + code >>= 8; + bits -= 8; + } + /* Last bits. */ + if(bits) + *bp = code; +#endif /* vax */ + offset += n_bits; + if ( offset == (n_bits << 3) ) { + bp = buf; + bits = n_bits; + bytes_out += bits; + /* do + putchar(*bp++); */ + while(--bits); + offset = 0; + } + + /* + * If the next entry is going to be too big for the code size, + * then increase it, if possible. + */ + if ( free_ent > maxcode || (clear_flg > 0)) + { + /* + * Write the whole buffer, because the input side won't + * discover the size increase until after it has read it. + */ + if ( offset > 0 ) { + /* if( fwrite( buf, 1, n_bits, stdout ) != n_bits) + writeerr(); */ + bytes_out += n_bits; + } + offset = 0; + + if ( clear_flg ) { + maxcode = MAXCODE (n_bits = INIT_BITS); + clear_flg = 0; + } + else { + n_bits++; + if ( n_bits == maxbits ) + maxcode = maxmaxcode; + else + maxcode = MAXCODE(n_bits); + } + } + } else { + /* + * At EOF, write the rest of the buffer. + */ + /* if ( offset > 0 ) + fwrite( buf, 1, (offset + 7) / 8, stdout ); */ + bytes_out += (offset + 7) / 8; + offset = 0; + /* fflush( stdout ); */ + /* if( ferror( stdout ) ) + writeerr(); */ + } +} + +/* + * Decompress stdin to stdout. This routine adapts to the codes in the + * file building the "string" table on-the-fly; requiring no table to + * be stored in the compressed file. The tables used herein are shared + * with those of the compress() routine. See the definitions above. + */ + +void decompress() { + register char_type *stackp; + register int finchar; + register code_int code, oldcode, incode; + + /* + * As above, initialize the first 256 entries in the table. + */ + maxcode = MAXCODE(n_bits = INIT_BITS); + for ( code = 255; code >= 0; code-- ) { + tab_prefixof(code) = 0; + tab_suffixof(code) = (char_type)code; + } + free_ent = ((block_compress) ? FIRST : 256 ); + + finchar = oldcode = getcode(); + if(oldcode == -1) /* EOF already? */ + return; /* Get out of here */ + /* putchar( (char)finchar ); */ /* first code must be 8 bits = char */ + /* if(ferror(stdout)) + writeerr(); */ + stackp = de_stack; + + while ( (code = getcode()) > -1 ) { + + if ( (code == CLEAR) && block_compress ) { + for ( code = 255; code >= 0; code-- ) + tab_prefixof(code) = 0; + clear_flg = 1; + free_ent = FIRST - 1; + if ( (code = getcode ()) == -1 ) /* O, untimely death! */ + break; + } + incode = code; + /* + * Special case for KwKwK string. + */ + if ( code >= free_ent ) { + *stackp++ = finchar; + code = oldcode; + } + + /* + * Generate output characters in reverse order + */ +#ifdef SIGNED_COMPARE_SLOW + while ( ((unsigned long)code) >= ((unsigned long)256) ) { +#else + while ( code >= 256 ) { +#endif + *stackp++ = tab_suffixof(code); + code = tab_prefixof(code); + } + *stackp++ = finchar = tab_suffixof(code); + + /* + * And put them out in forward order + */ + /* do + putchar ( *--stackp ); + while ( stackp > de_stack );*/ + + /* + * Generate the new entry. + */ + if ( (code=free_ent) < maxmaxcode ) { + tab_prefixof(code) = (unsigned short)oldcode; + tab_suffixof(code) = finchar; + free_ent = code+1; + } + /* + * Remember previous code. + */ + oldcode = incode; + } + /* fflush( stdout ); */ + /* if(ferror(stdout)) + writeerr(); */ +} + +/***************************************************************** + * TAG( getcode ) + * + * Read one code from the standard input. If EOF, return -1. + * Inputs: + * stdin + * Outputs: + * code or -1 is returned. + */ + +code_int +getcode() { + /* + * On the VAX, it is important to have the register declarations + * in exactly the order given, or the asm will break. + */ + register code_int code; + static int offset = 0, size = 0; + static char_type buf[BITS]; + register int r_off, bits; + register char_type *bp = buf; + + if ( clear_flg > 0 || offset >= size || free_ent > maxcode ) { + /* + * If the next entry will be too big for the current code + * size, then we must increase the size. This implies reading + * a new buffer full, too. + */ + if ( free_ent > maxcode ) { + n_bits++; + if ( n_bits == maxbits ) + maxcode = maxmaxcode; /* won't get any bigger now */ + else + maxcode = MAXCODE(n_bits); + } + if ( clear_flg > 0) { + maxcode = MAXCODE (n_bits = INIT_BITS); + clear_flg = 0; + } + /* size = fread( buf, 1, n_bits, stdin ); */ + if ( size <= 0 ) + return -1; /* end of file */ + offset = 0; + /* Round size down to integral number of codes */ + size = (size << 3) - (n_bits - 1); + } + r_off = offset; + bits = n_bits; +#ifdef vax + asm( "extzv r10,r9,(r8),r11" ); +#else /* not a vax */ + /* + * Get to the first byte. + */ + bp += (r_off >> 3); + r_off &= 7; + /* Get first part (low order bits) */ +#ifdef NO_UCHAR + code = ((*bp++ >> r_off) & rmask[8 - r_off]) & 0xff; +#else + code = (*bp++ >> r_off); +#endif /* NO_UCHAR */ + bits -= (8 - r_off); + r_off = 8 - r_off; /* now, offset into code word */ + /* Get any 8 bit parts in the middle (<=1 for up to 16 bits). */ + if ( bits >= 8 ) { +#ifdef NO_UCHAR + code |= (*bp++ & 0xff) << r_off; +#else + code |= *bp++ << r_off; +#endif /* NO_UCHAR */ + r_off += 8; + bits -= 8; + } + /* high order bits. */ + code |= (*bp & rmask[bits]) << r_off; +#endif /* vax */ + offset += n_bits; + + return code; +} + +char * +rindex(s, c) /* For those who don't have it in libc.a */ +register char *s, c; +{ + char *p; + for (p = NULL; *s; s++) + if (*s == c) + p = s; + return(p); +} + +/* +writeerr() +{ + perror ( ofname ); + unlink ( ofname ); + exit ( 1 ); +} +*/ +void cl_block () /* table clear for block compress */ +{ + register long int rat; + + checkpoint = in_count + CHECK_GAP; + + if(in_count > 0x007fffff) { /* shift will overflow */ + rat = bytes_out >> 8; + if(rat == 0) { /* Don't divide by zero */ + rat = 0x7fffffff; + } else { + rat = in_count / rat; + } + } else { + rat = (in_count << 8) / bytes_out; /* 8 fractional bits */ + } + if ( rat > ratio ) { + ratio = rat; + } else { + ratio = 0; + cl_hash ( (count_int) hsize ); + free_ent = FIRST; + clear_flg = 1; + output ( (code_int) CLEAR ); + } +} + +void cl_hash(hsize) /* reset code table */ + register count_int hsize; +{ +#ifndef XENIX_16 /* Normal machine */ + register count_int *htab_p = htab+hsize; +#else + register j; + register long k = hsize; + register count_int *htab_p; +#endif + register long i; + register long m1 = -1; + +#ifdef XENIX_16 + for(j=0; j<=8 && k>=0; j++,k-=8192) { + i = 8192; + if(k < 8192) { + i = k; + } + htab_p = &(htab[j][i]); + i -= 16; + if(i > 0) { +#else + i = hsize - 16; +#endif + do { /* might use Sys V memset(3) here */ + *(htab_p-16) = m1; + *(htab_p-15) = m1; + *(htab_p-14) = m1; + *(htab_p-13) = m1; + *(htab_p-12) = m1; + *(htab_p-11) = m1; + *(htab_p-10) = m1; + *(htab_p-9) = m1; + *(htab_p-8) = m1; + *(htab_p-7) = m1; + *(htab_p-6) = m1; + *(htab_p-5) = m1; + *(htab_p-4) = m1; + *(htab_p-3) = m1; + *(htab_p-2) = m1; + *(htab_p-1) = m1; + htab_p -= 16; + } while ((i -= 16) >= 0); +#ifdef XENIX_16 + } + } +#endif + for ( i += 16; i > 0; i-- ) + *--htab_p = m1; +} +
mycompress.c Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: mc_dram.c =================================================================== --- mc_dram.c (nonexistent) +++ mc_dram.c (revision 1765) @@ -0,0 +1,400 @@ +/* mc_dram.c - Memory Controller testbench dram test + 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" +#include "mc_dram.h" +#include "../peripheral/mc.h" +#include "../peripheral/gpio.h" +#include "../peripheral/fields.h" + +#define T_ROW_SIZE 8 +#define T_ROW_OFF 5 +#define T_ROWS 25 +#define T_GROUPS 3 + +typedef volatile unsigned long *REGISTER; + +/* +unsigned long nRowSize = 0; +unsigned long nColumns = 0; +*/ +REGISTER mc_poc = (unsigned long*)(MC_BASE + MC_POC); +REGISTER mc_csr = (unsigned long*)(MC_BASE + MC_CSR); +REGISTER mc_ba_mask = (unsigned long*)(MC_BASE + MC_BA_MASK); + +REGISTER rgpio_out = (unsigned long*)(GPIO_BASE + RGPIO_OUT); +REGISTER rgpio_in = (unsigned long*)(GPIO_BASE + RGPIO_IN); + +unsigned long lpoc; +unsigned char mc_cs; + +unsigned long set_config() +{ + REGISTER mc_csc; + unsigned char ch; + + for (ch=0; ch<8; ch++) { + if (MC_SDRAM_CSMASK & (0x01 << ch) ) { + mc_csc = (unsigned long*)(MC_BASE + MC_CSC(ch)); + SET_FIELD(*mc_csc, MC_CSC, MS, mc_sdram_cs[ch].MS); + SET_FIELD(*mc_csc, MC_CSC, BW, mc_sdram_cs[ch].BW); + SET_FIELD(*mc_csc, MC_CSC, SEL, mc_sdram_cs[ch].M); + SET_FLAG(*mc_csc, MC_CSC, EN); + printf ("Channel Config %d - CSC = 0x%08lX\n", ch, *mc_csc); + } + } + + return 0; +} + +unsigned long get_config() +{ + REGISTER mc_csc; + REGISTER mc_tms; + unsigned char ch; + + mc_cs = 0; + for (ch=0; ch<8; ch++) { + mc_csc = (unsigned long*)(MC_BASE + MC_CSC(ch)); + mc_tms = (unsigned long*)(MC_BASE + MC_TMS(ch)); + if ( (GET_FIELD(*mc_csc, MC_CSC, MEMTYPE) == 0) && + (TEST_FLAG(*mc_csc, MC_CSC, EN) == 1 ) ) { + mc_sdram_cs[ch].MS = GET_FIELD(*mc_csc, MC_CSC, MS); + mc_sdram_cs[ch].BW = GET_FIELD(*mc_csc, MC_CSC, BW); + mc_sdram_cs[ch].M = GET_FIELD(*mc_csc, MC_CSC, SEL); + mc_cs |= (1 << ch); + + printf("get_config(%d) : MS=0x%0lx, BW=0x%0lx, M=0x%0lx\n", ch, + mc_sdram_cs[ch].MS, + mc_sdram_cs[ch].BW, + mc_sdram_cs[ch].M); + } + } + printf("get_config() : cs=0x%0x\n", mc_cs); + return 0; +} + +int main() +{ + unsigned long ret; + unsigned char ch; + + unsigned long j, i; + unsigned long test; + unsigned long gpio_pat = 0; + + unsigned long nRowSize = 0; + unsigned long nRows = 0; + unsigned long nRowSh = 0; + unsigned long nRowGrp = 0; + + unsigned long nAddress; + unsigned long mc_sel; + REGISTER mc_tms; + REGISTER mc_csc; + + *rgpio_out = 0xFFFFFFFF; + + /* set configuration */ + randomin(7435); + lpoc = *mc_poc; + +#ifdef MC_READ_CONF + if (get_config()) { + printf("Error reading MC configuration\n"); + report(0x00000001); + return(1); + } +#else + mc_cs = MC_SDRAM_CSMASK; +#endif + + for (ch=0; ch<8; ch++) { + if (mc_cs & (0x01 << ch) ) { + printf ("--- Begin Test on CS%d ---\n", ch); + + mc_csc = (unsigned long*)(MC_BASE + MC_CSC(ch)); + mc_tms = (unsigned long*)(MC_BASE + MC_TMS(ch)); + mc_sel = GET_FIELD(*mc_csc, MC_CSC, SEL); + + SET_FIELD(*mc_tms, MC_TMS_SDRAM, OM, 0); /*normal op*/ + SET_FIELD(*mc_tms, MC_TMS_SDRAM, CL, 3); /*CAS*/ + + switch ( mc_sdram_cs[ch].BW + (3 * mc_sdram_cs[ch].MS) ) { + case 0: + case 4: + nRowSize = MC_SDRAM_ROWSIZE_0; + nRows = MC_SDRAM_ROWS_0; + nRowSh = MC_SDRAM_ROWSH_0; break; + case 1: + case 5: + nRowSize = MC_SDRAM_ROWSIZE_1; + nRows = MC_SDRAM_ROWS_1; + nRowSh = MC_SDRAM_ROWSH_1; break; + case 2: + nRowSize = MC_SDRAM_ROWSIZE_2; + nRows = MC_SDRAM_ROWS_2; + nRowSh = MC_SDRAM_ROWSH_2; break; + case 3: + nRowSize = MC_SDRAM_ROWSIZE_3; + nRows = MC_SDRAM_ROWS_3; + nRowSh = MC_SDRAM_ROWSH_3; break; + case 6: + nRowSize = MC_SDRAM_ROWSIZE_6; + nRows = MC_SDRAM_ROWS_6; + nRowSh = MC_SDRAM_ROWSH_6; break; + case 7: + nRowSize = MC_SDRAM_ROWSIZE_7; + nRows = MC_SDRAM_ROWS_7; + nRowSh = MC_SDRAM_ROWSH_7; break; + case 8: + nRowSize = MC_SDRAM_ROWSIZE_8; + nRows = MC_SDRAM_ROWS_8; + nRowSh = MC_SDRAM_ROWSH_8; break; + } + + printf ("CS configuration : CSC - 0x%08lX, TMS - 0x%08lX, rs = %lu, nr = %lu, sh = %lu, sel = %lu\n", + *mc_csc, *mc_tms, nRowSize, nRows, nRowSh, mc_sel); + + /*nRows -= MC_SDRAM_ROW_OFF;*/ + for (test=0; test<16; test++) { + /* configure MC*/ + CLEAR_FLAG(*mc_csc, MC_CSC, PEN); /* no parity */ + CLEAR_FLAG(*mc_csc, MC_CSC, KRO); /* close row */ + CLEAR_FLAG(*mc_csc, MC_CSC, BAS); /* bank after column */ + CLEAR_FLAG(*mc_csc, MC_CSC, WP); /* write enable */ + SET_FLAG(*mc_tms, MC_TMS_SDRAM, WBL); /* single loc access */ + CLEAR_FLAG(*mc_tms, MC_TMS_SDRAM, BT); /* sequential burst */ + SET_FIELD(*mc_tms, MC_TMS_SDRAM, BL, 0); /* 1 */ + switch (test) { + case 0: + if ((MC_SDRAM_TESTS & MC_SDRAM_TEST0) != MC_SDRAM_TEST0) + continue; + break; + case 1: + if ((MC_SDRAM_TESTS & MC_SDRAM_TEST1) != MC_SDRAM_TEST1) + continue; + SET_FLAG(*mc_csc, MC_CSC, PEN); /* parity */ + break; + case 2: + if ((MC_SDRAM_TESTS & MC_SDRAM_TEST2) != MC_SDRAM_TEST2) + continue; + SET_FLAG(*mc_csc, MC_CSC, KRO); /* keep row */ + break; + case 3: + if ((MC_SDRAM_TESTS & MC_SDRAM_TEST3) != MC_SDRAM_TEST3) + continue; + SET_FLAG(*mc_csc, MC_CSC, BAS); /* bank after row*/ + break; + case 4: + if ((MC_SDRAM_TESTS & MC_SDRAM_TEST4) != MC_SDRAM_TEST4) + continue; + SET_FLAG(*mc_csc, MC_CSC, WP); /* RO */ + break; + case 5: + if ((MC_SDRAM_TESTS & MC_SDRAM_TEST5) != MC_SDRAM_TEST5) + continue; + CLEAR_FLAG(*mc_tms, MC_TMS_SDRAM, WBL); /* burst */ + break; + case 6: + if ((MC_SDRAM_TESTS & MC_SDRAM_TEST6) != MC_SDRAM_TEST6) + continue; + CLEAR_FLAG(*mc_tms, MC_TMS_SDRAM, WBL); /* burst */ + SET_FIELD(*mc_tms, MC_TMS_SDRAM, BL, 1); /* 2 */ + break; + case 7: + if ((MC_SDRAM_TESTS & MC_SDRAM_TEST7) != MC_SDRAM_TEST7) + continue; + CLEAR_FLAG(*mc_tms, MC_TMS_SDRAM, WBL); /* burst */ + SET_FIELD(*mc_tms, MC_TMS_SDRAM, BL, 2); /* 4 */ + break; + case 8: + if ((MC_SDRAM_TESTS & MC_SDRAM_TEST8) != MC_SDRAM_TEST8) + continue; + CLEAR_FLAG(*mc_tms, MC_TMS_SDRAM, WBL); /* burst */ + SET_FIELD(*mc_tms, MC_TMS_SDRAM, BL, 3); /* 8 */ + break; + case 9: + if ((MC_SDRAM_TESTS & MC_SDRAM_TEST9) != MC_SDRAM_TEST9) + continue; + CLEAR_FLAG(*mc_tms, MC_TMS_SDRAM, WBL); /* burst */ + SET_FIELD(*mc_tms, MC_TMS_SDRAM, BL, 7); /* full page */ + break; + case 10: + if ((MC_SDRAM_TESTS & MC_SDRAM_TEST10) != MC_SDRAM_TEST10) + continue; + CLEAR_FLAG(*mc_tms, MC_TMS_SDRAM, WBL); /* burst */ + SET_FLAG(*mc_tms, MC_TMS_SDRAM, BT); /* interleaved burst */ + break; + case 11: + if ((MC_SDRAM_TESTS & MC_SDRAM_TEST11) != MC_SDRAM_TEST11) + continue; + CLEAR_FLAG(*mc_tms, MC_TMS_SDRAM, WBL); /* burst */ + SET_FLAG(*mc_tms, MC_TMS_SDRAM, BT); /* interleaved burst */ + SET_FIELD(*mc_tms, MC_TMS_SDRAM, BL, 1); /* 2 */ + break; + case 12: + if ((MC_SDRAM_TESTS & MC_SDRAM_TEST12) != MC_SDRAM_TEST12) + continue; + CLEAR_FLAG(*mc_tms, MC_TMS_SDRAM, WBL); /* burst */ + SET_FLAG(*mc_tms, MC_TMS_SDRAM, BT); /* interleaved burst */ + SET_FIELD(*mc_tms, MC_TMS_SDRAM, BL, 2); /* 4 */ + break; + case 13: + if ((MC_SDRAM_TESTS & MC_SDRAM_TEST13) != MC_SDRAM_TEST13) + continue; + CLEAR_FLAG(*mc_tms, MC_TMS_SDRAM, WBL); /* burst */ + SET_FLAG(*mc_tms, MC_TMS_SDRAM, BT); /* interleaved burst */ + SET_FIELD(*mc_tms, MC_TMS_SDRAM, BL, 3); /* 8 */ + break; + case 14: + if ((MC_SDRAM_TESTS & MC_SDRAM_TEST14) != MC_SDRAM_TEST14) + continue; + CLEAR_FLAG(*mc_tms, MC_TMS_SDRAM, WBL); /* burst */ + SET_FLAG(*mc_tms, MC_TMS_SDRAM, BT); /* interleaved burst */ + SET_FIELD(*mc_tms, MC_TMS_SDRAM, BL, 7); /* fullrow */ + break; + case 15: + if ((MC_SDRAM_TESTS & MC_SDRAM_TEST15) != MC_SDRAM_TEST15) + continue; + SET_FLAG(*mc_csc, MC_CSC, KRO); /* keep row */ + CLEAR_FLAG(*mc_tms, MC_TMS_SDRAM, WBL); /* burst */ + SET_FLAG(*mc_tms, MC_TMS_SDRAM, BT); /* interleaved burst */ + SET_FIELD(*mc_tms, MC_TMS_SDRAM, BL, 1); /* 2 */ + break; + } /*switch test*/ + + printf ("Begin TEST %lu : CSC - 0x%08lX, TMS - 0x%08lX\n", test, *mc_csc, *mc_tms); + + if (MC_SDRAM_ACC & MC_SDRAM_SROW) { + /* perform sequential row access */ + printf("Seuential Row\n"); + for (j=0; j +#define LONGEST long long + +LONGEST acc = 0; +#define MAC(x,y) {\ + printf ("[%08x,%08x]\t", (unsigned long)(x), (unsigned long)(y));\ + acc += (LONGEST)(x) * (LONGEST)(y);\ + printf ("(%08x,%08x)\n", (unsigned long)(acc >> 32), (unsigned long)(acc & 0xffffffff));\ +} +#define MACRC (macrc()) +static inline long macrc() { + long result = acc >> 28; + //printf ("<%08x>\n", (unsigned long)result); + acc = 0; + return result; +} +#else /* OR1K */ + +#define MAC(x,y) asm volatile ("l.mac\t%0,%1" : : "r" (x), "r" (y)) +#define MACRC macrc() +static inline long macrc() { + long x; + asm volatile ("l.macrc\t%0" : "=r" (x)); + return x; +} + +#endif /* SIM */ + +long test_mul (long a, long b) { + long t; + int i; + for (i = 0; i < 100; i++) { + t = a * b; + t += 153; + a = t - a * 17; + b = t + b * 13333; + + /*printf ("(%08x,%08x)", a, b);*/ + } + return a; +} + +long test_mac (long a, long b) { + long t = 1234567; + int i; + for (i = 0; i < 100; i++) { + MAC (a, b); + if (i & 3) { + a = t - a; + b = t + a; + } else { + a = MACRC; + } + MAC (a, 3); + MAC (a, 5); + MAC (a, 7); + //printf ("(%08x,%08x)", a, b); + } + return a; +} + +long test_mul_mac (long a, long b) { + long t = 1; + int i; + for (i = 0; i < 100; i++) { + a = a * 119; + MAC (a, b); + MAC (b, 423490431); + MAC (b, 113); + MAC (a, 997); + b = 87 * a * t; + if (i & 3) { + t = a * b; + a = t - a; + b = t + a; + } else { + a = MACRC; + } + // printf ("(%08x,%08x)", a, b); + } + return a; +} + +int main () { + unsigned t1; + unsigned t2; + unsigned t3; + printf ("%08x\n", MACRC); + MAC (888888887, 0x87654321); + printf ("%08x\n", MACRC); + t1 = test_mul (888888887, 0x87654321); + t2 = test_mac (888888887, 0x87654321); + t3 = test_mul_mac (888888887, 0x87654321); + printf ("%08x, expected %08x\n", t1, T1); + printf ("%08x, expected %08x\n", t2, T2); + printf ("%08x, expected %08x\n", t3, T3); + report (t1 ^ t2 ^ t3 ^ T1 ^ T2 ^ T3 ^ 0xdeaddead); + if (t1 != T1 || t2 != T2 || t3 != T3) { + printf ("Test failed!\n"); + if (t1 != T1) exit (1); + if (t2 != T2) exit (2); + if (t3 != T3) exit (3); + } else { + printf ("Test succesful.\n"); + exit (0); + } + exit (0); +}
mul.c Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: board.h =================================================================== --- board.h (nonexistent) +++ board.h (revision 1765) @@ -0,0 +1,21 @@ +#ifndef _BOARD_H_ +#define _BOARD_H_ + +#define MC_CSR_VAL 0x0B000300 +#define MC_MASK_VAL 0x000003f0 +#define FLASH_BASE_ADDR 0xf0000000 +#define FLASH_TMS_VAL 0x00000103 +#define SDRAM_BASE_ADDR 0x00000000 +#define SDRAM_TMS_VAL 0x19220057 + + +#define UART_BASE 0x90000000 +#define UART_IRQ 2 +#define ETH_BASE 0x92000000 +#define ETH_IRQ 4 +#define KBD_BASE_ADD 0x94000000 +#define KBD_IRQ 5 +#define MC_BASE_ADDR 0x93000000 +#define DMA_BASE 0xb8000000 + +#endif Index: kbdtest.rx =================================================================== --- kbdtest.rx (nonexistent) +++ kbdtest.rx (revision 1765) @@ -0,0 +1,2 @@ +Te3+=-
kbdtest.rx Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: basic.S =================================================================== --- basic.S (nonexistent) +++ basic.S (revision 1765) @@ -0,0 +1,503 @@ +/* Basic instruction set test */ +#include "spr_defs.h" +#include "board.h" + +#define MEM_RAM 0x00000000 + +#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) + + .section .except, "ax" + l.addi r1,r0,0 + + .section .text + + .org 0x100 +_reset: + l.movhi r1,hi(_init_mc) + l.ori r1,r1,lo(_init_mc) + l.jr r1 + l.nop + + +_init_mc: + + 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 + + +_regs: + l.addi r1,r0,0x1 + l.addi r2,r1,0x2 + l.addi r3,r2,0x4 + l.addi r4,r3,0x8 + l.addi r5,r4,0x10 + l.addi r6,r5,0x20 + l.addi r7,r6,0x40 + l.addi r8,r7,0x80 + l.addi r9,r8,0x100 + l.addi r10,r9,0x200 + l.addi r11,r10,0x400 + l.addi r12,r11,0x800 + l.addi r13,r12,0x1000 + l.addi r14,r13,0x2000 + l.addi r15,r14,0x4000 + l.addi r16,r15,0x8000 + + l.sub r31,r0,r1 + l.sub r30,r31,r2 + l.sub r29,r30,r3 + l.sub r28,r29,r4 + l.sub r27,r28,r5 + l.sub r26,r27,r6 + l.sub r25,r26,r7 + l.sub r24,r25,r8 + l.sub r23,r24,r9 + l.sub r22,r23,r10 + l.sub r21,r22,r11 + l.sub r20,r21,r12 + l.sub r19,r20,r13 + l.sub r18,r19,r14 + l.sub r17,r18,r15 + l.sub r16,r17,r16 + + l.or r3,r0,r16 + l.nop NOP_REPORT /* Should be 0xffff0012 */ + + l.movhi r31, hi(MEM_RAM) + l.ori r31,r31, lo(MEM_RAM) + l.sw 0(r31),r16 + +_mem: l.movhi r3,0x1234 + l.ori r3,r3,0x5678 + + l.sw 4(r31),r3 + + l.lbz r4,4(r31) + l.add r8,r8,r4 + l.sb 11(r31),r4 + l.lbz r4,5(r31) + l.add r8,r8,r4 + l.sb 10(r31),r4 + l.lbz r4,6(r31) + l.add r8,r8,r4 + l.sb 9(r31),r4 + l.lbz r4,7(r31) + l.add r8,r8,r4 + l.sb 8(r31),r4 + + l.lbs r4,8(r31) + l.add r8,r8,r4 + l.sb 7(r31),r4 + l.lbs r4,9(r31) + l.add r8,r8,r4 + l.sb 6(r31),r4 + l.lbs r4,10(r31) + l.add r8,r8,r4 + l.sb 5(r31),r4 + l.lbs r4,11(r31) + l.add r8,r8,r4 + l.sb 4(r31),r4 + + l.lhz r4,4(r31) + l.add r8,r8,r4 + l.sh 10(r31),r4 + l.lhz r4,6(r31) + l.add r8,r8,r4 + l.sh 8(r31),r4 + + l.lhs r4,8(r31) + l.add r8,r8,r4 + l.sh 6(r31),r4 + l.lhs r4,10(r31) + l.add r8,r8,r4 + l.sh 4(r31),r4 + + l.lwz r4,4(r31) + l.add r8,r8,r4 + + l.or r3,r0,r8 + l.nop NOP_REPORT /* Should be 0x12352af7 */ + + l.lwz r9,0(r31) + l.add r8,r9,r8 + l.sw 0(r31),r8 + +_arith: + l.addi r3,r0,1 + l.addi r4,r0,2 + l.addi r5,r0,-1 + l.addi r6,r0,-1 + l.addi r8,r0,0 + + l.sub r7,r5,r3 + l.sub r8,r3,r5 + l.add r8,r8,r7 + + l.div r7,r7,r4 + l.add r9,r3,r4 + l.mul r7,r9,r7 + l.divu r7,r7,r4 + l.add r8,r8,r7 + + l.or r3,r0,r8 + l.nop NOP_REPORT /* Should be 0x7ffffffe */ + + l.lwz r9,0(r31) + l.add r8,r9,r8 + l.sw 0(r31),r8 + +_log: + l.addi r3,r0,1 + l.addi r4,r0,2 + l.addi r5,r0,-1 + l.addi r6,r0,-1 + l.addi r8,r0,0 + + l.andi r8,r8,1 + l.and r8,r8,r3 + + l.xori r8,r5,0xa5a5 + l.xor r8,r8,r5 + + l.ori r8,r8,2 + l.or r8,r8,r4 + + l.or r3,r0,r8 + l.nop NOP_REPORT /* Should be 0xffffa5a7 */ + + l.lwz r9,0(r31) + l.add r8,r9,r8 + l.sw 0(r31),r8 + +_shift: + l.addi r3,r0,1 + l.addi r4,r0,2 + l.addi r5,r0,-1 + l.addi r6,r0,-1 + l.addi r8,r0,0 + + l.slli r8,r5,6 + l.sll r8,r8,r4 + + l.srli r8,r8,6 + l.srl r8,r8,r4 + + l.srai r8,r8,2 + l.sra r8,r8,r4 + + l.or r3,r0,r8 + l.nop NOP_REPORT /* Should be 0x000fffff */ + + l.lwz r9,0(r31) + l.add r8,r9,r8 + l.sw 0(r31),r8 + +_flag: + l.addi r3,r0,1 + l.addi r4,r0,-2 + l.addi r8,r0,0 + + l.sfeq r3,r3 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfeq r3,r4 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfeqi r3,1 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfeqi r3,-2 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfne r3,r3 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfne r3,r4 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfnei r3,1 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfnei r3,-2 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfgtu r3,r3 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfgtu r3,r4 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfgtui r3,1 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfgtui r3,-2 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfgeu r3,r3 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfgeu r3,r4 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfgeui r3,1 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfgeui r3,-2 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfltu r3,r3 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfltu r3,r4 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfltui r3,1 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfltui r3,-2 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfleu r3,r3 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfleu r3,r4 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfleui r3,1 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfleui r3,-2 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfgts r3,r3 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfgts r3,r4 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfgtsi r3,1 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfgtsi r3,-2 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfges r3,r3 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfges r3,r4 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfgesi r3,1 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfgesi r3,-2 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sflts r3,r3 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sflts r3,r4 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfltsi r3,1 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfltsi r3,-2 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfles r3,r3 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sfles r3,r4 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sflesi r3,1 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.sflesi r3,-2 + l.mfspr r5,r0,17 + l.andi r4,r5,0x200 + l.add r8,r8,r4 + + l.or r3,r0,r8 + l.nop NOP_REPORT /* Should be 0x00002800 */ + + l.lwz r9,0(r31) + l.add r8,r9,r8 + l.sw 0(r31),r8 + +_jump: + l.addi r8,r0,0 + + l.j _T1 + l.addi r8,r8,1 + +_T2: l.jr r9 + l.addi r8,r8,1 + +_T1: l.jal _T2 + l.addi r8,r8,1 + + l.sfeqi r0,0 + l.bf _T3 + l.addi r8,r8,1 + +_T3: l.sfeqi r0,1 + l.bf _T4 + l.addi r8,r8,1 + + l.addi r8,r8,1 + +_T4: l.sfeqi r0,0 + l.bnf _T5 + l.addi r8,r8,1 + + l.addi r8,r8,1 + +_T5: l.sfeqi r0,1 + l.bnf _T6 + l.addi r8,r8,1 + + l.addi r8,r8,1 + +_T6: l.movhi r3,hi(_T7) + l.ori r3,r3,lo(_T7) + l.mtspr r0,r3,32 + l.mfspr r5,r0,17 + l.mtspr r0,r5,64 + l.rfe + l.addi r8,r8,1 /* l.rfe should not have a delay slot */ + + l.addi r8,r8,1 + +_T7: l.or r3,r0,r8 + l.nop NOP_REPORT /* Should be 0x000000009 */ + + l.lwz r9,0(r31) + l.add r8,r9,r8 + l.sw 0(r31),r8 + + l.lwz r9,0(r31) + l.movhi r3,0x4c69 + l.ori r3,r3,0xe5f7 + l.add r8,r8,r3 + + l.or r3,r0,r8 + l.nop NOP_REPORT /* Should be 0xdeaddead */ + + l.addi r3,r0,0 + l.nop NOP_EXIT +
basic.S Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: default.ld =================================================================== --- default.ld (nonexistent) +++ default.ld (revision 1765) @@ -0,0 +1,43 @@ +MEMORY + { + except : ORIGIN = 0x00000000, LENGTH = 0x00002000 + flash : ORIGIN = 0xf0000000, LENGTH = 0x00200000 + ram : ORIGIN = 0x00002000, LENGTH = 0x001fe000 + } + +SECTIONS +{ + .text : + { + *(.text) + *(.rodata) + _src_beg = .; + } > flash + .dummy ALIGN(0x4): + { + _src_beg = .; + } > flash + .except : + AT ( ADDR (.dummy)) + { + _except_beg = .; + *(.except) + _except_end = .; + } > except + .data : + AT ( ADDR (.dummy) + SIZEOF (.except)) + { + _dst_beg = .; + *(.data) + _dst_end = .; + } > ram + .bss : + { + *(.bss) + } > ram + .stack ALIGN(0x10) (NOLOAD): + { + *(.stack) + _ram_end = .; + } > ram +}
default.ld Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: except.S =================================================================== --- except.S (nonexistent) +++ except.S (revision 1765) @@ -0,0 +1,392 @@ +/* Support file for c based tests */ +#include "spr_defs.h" +#include "board.h" + +#define reset _reset + +#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) + + .section .stack + .space 0x1000 +_stack: + + .extern _reset_support + .extern _c_reset + .extern _excpt_buserr + .extern _excpt_dpfault + .extern _excpt_ipfault + .extern _excpt_tick + .extern _excpt_align + .extern _excpt_illinsn + .extern _excpt_int + .extern _excpt_dtlbmiss + .extern _excpt_itlbmiss + .extern _excpt_range + .extern _excpt_syscall + .extern _excpt_break + .extern _excpt_trap + + + .section .except, "ax" +_buserr_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_buserr) + l.ori r10,r10,lo(_excpt_buserr) + l.jr r9 + l.nop +_buserr_vector_end: + +_dpfault_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_dpfault) + l.ori r10,r10,lo(_excpt_dpfault) + l.jr r9 + l.nop +_dpfault_vector_end: + +_ipfault_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_ipfault) + l.ori r10,r10,lo(_excpt_ipfault) + l.jr r9 + l.nop +_ipfault_vector_end: + +_lpint_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_tick) + l.ori r10,r10,lo(_excpt_tick) + l.jr r9 + l.nop +_lpint_vector_end: + +_align_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_align) + l.ori r10,r10,lo(_excpt_align) + l.jr r9 + l.nop +_align_vector_end: + +_illinsn_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_illinsn) + l.ori r10,r10,lo(_excpt_illinsn) + l.jr r9 + l.nop +_illinsn_vector_end: + +_hpint_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_int) + l.ori r10,r10,lo(_excpt_int) + l.jr r9 + l.nop +_hpint_vector_end: + +_dtlbmiss_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_dtlbmiss) + l.ori r10,r10,lo(_excpt_dtlbmiss) + l.jr r9 + l.nop +_dtlbmiss_vector_end: + +_itlbmiss_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_itlbmiss) + l.ori r10,r10,lo(_excpt_itlbmiss) + l.jr r9 + l.nop +_itlbmiss_vector_end: + +_range_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_range) + l.ori r10,r10,lo(_excpt_range) + l.jr r9 + l.nop +_range_vector_end: + +_syscall_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_syscall) + l.ori r10,r10,lo(_excpt_syscall) + l.jr r9 + l.nop +_syscall_vector_end: + +_break_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_break) + l.ori r10,r10,lo(_excpt_break) + l.jr r9 + l.nop +_break_vector_end: + +_trap_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_trap) + l.ori r10,r10,lo(_excpt_trap) + l.jr r9 + l.nop +_trap_vector_end: + + .section .text + + .org 0x100 +_reset_vector: + l.addi r2,r0,0x0 + l.addi r3,r0,0x0 + l.addi r4,r0,0x0 + l.addi r5,r0,0x0 + l.addi r6,r0,0x0 + l.addi r7,r0,0x0 + l.addi r8,r0,0x0 + l.addi r9,r0,0x0 + l.addi r10,r0,0x0 + l.addi r11,r0,0x0 + l.addi r12,r0,0x0 + l.addi r13,r0,0x0 + l.addi r14,r0,0x0 + l.addi r15,r0,0x0 + l.addi r16,r0,0x0 + l.addi r17,r0,0x0 + l.addi r18,r0,0x0 + l.addi r19,r0,0x0 + l.addi r20,r0,0x0 + l.addi r21,r0,0x0 + l.addi r22,r0,0x0 + l.addi r23,r0,0x0 + l.addi r24,r0,0x0 + l.addi r25,r0,0x0 + l.addi r26,r0,0x0 + l.addi r27,r0,0x0 + l.addi r28,r0,0x0 + l.addi r29,r0,0x0 + l.addi r30,r0,0x0 + l.addi r31,r0,0x0 + + l.movhi r3,hi(start) + l.ori r3,r3,lo(start) + l.jr r3 + l.nop +start: + l.jal _init_mc + l.nop + + l.movhi r1,hi(_stack) + l.ori r1,r1,lo(_stack) + + /* Setup exception wrappers */ + l.movhi r3,hi(_src_beg) + l.ori r3,r3,lo(_src_beg) + l.addi r7,r0,0x100 + +1: l.addi r7,r7,0x100 + l.sfeqi r7,0xf00 + l.bf 1f + l.nop + l.addi r4,r7,0 + l.addi r5,r0,0 +2: + l.lwz r6,0(r3) + l.sw 0(r4),r6 + l.addi r3,r3,4 + l.addi r4,r4,4 + l.addi r5,r5,1 + l.sfeqi r5,9 + l.bf 1b + l.nop + l.j 2b + l.nop +1: + /* Copy data section */ + 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 + +_init_mc: + + 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 + +store_regs: + l.sw 0x00(r1),r2 + l.sw 0x04(r1),r3 + l.sw 0x08(r1),r4 + l.sw 0x0c(r1),r5 + l.sw 0x10(r1),r6 + l.sw 0x14(r1),r7 + l.sw 0x18(r1),r8 + l.sw 0x24(r1),r11 + l.sw 0x28(r1),r12 + l.sw 0x2c(r1),r13 + l.sw 0x30(r1),r14 + l.sw 0x34(r1),r15 + l.sw 0x38(r1),r16 + l.sw 0x3c(r1),r17 + l.sw 0x40(r1),r18 + l.sw 0x44(r1),r19 + l.sw 0x48(r1),r20 + l.sw 0x4c(r1),r21 + l.sw 0x50(r1),r22 + l.sw 0x54(r1),r23 + l.sw 0x58(r1),r24 + l.sw 0x5c(r1),r25 + l.sw 0x60(r1),r26 + l.sw 0x64(r1),r27 + l.sw 0x68(r1),r28 + l.sw 0x6c(r1),r29 + l.sw 0x70(r1),r30 + l.sw 0x74(r1),r31 + l.movhi r9,hi(end_except) + l.ori r9,r9,lo(end_except) + l.lwz r10,0(r10) + l.jr r10 + l.nop + +end_except: + l.lwz r2,0x00(r1) + l.lwz r3,0x04(r1) + l.lwz r4,0x08(r1) + l.lwz r5,0x0c(r1) + l.lwz r6,0x10(r1) + l.lwz r7,0x14(r1) + l.lwz r8,0x18(r1) + l.lwz r9,0x1c(r1) + l.lwz r10,0x20(r1) + l.lwz r11,0x24(r1) + l.lwz r12,0x28(r1) + l.lwz r13,0x2c(r1) + l.lwz r14,0x30(r1) + l.lwz r15,0x34(r1) + l.lwz r16,0x38(r1) + l.lwz r17,0x3c(r1) + l.lwz r18,0x40(r1) + l.lwz r19,0x44(r1) + l.lwz r20,0x48(r1) + l.lwz r21,0x4c(r1) + l.lwz r22,0x50(r1) + l.lwz r23,0x54(r1) + l.lwz r24,0x58(r1) + l.lwz r25,0x5c(r1) + l.lwz r26,0x60(r1) + l.lwz r27,0x64(r1) + l.lwz r28,0x68(r1) + l.lwz r29,0x6c(r1) + l.lwz r30,0x70(r1) + l.lwz r31,0x74(r1) + l.addi r1,r1,120 + l.rfe + l.nop
except.S 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,77 @@ +section memory + /*random_seed = 12345 + type = random*/ + pattern = 0x00 + type = unknown /* Fastest */ + + nmemories = 2 + device 0 + name = "RAM" + ce = 1 + baseaddr = 0x00000000 + size = 0x00200000 + delayr = 1 + delayw = 2 + enddevice + + device 1 + name = "FLASH" + ce = 0 + baseaddr = 0xf0000000 + size = 0x00200000 + delayr = 10 + delayw = -1 + enddevice +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: cache.ld =================================================================== --- cache.ld (nonexistent) +++ cache.ld (revision 1765) @@ -0,0 +1,37 @@ +MEMORY + { + except : ORIGIN = 0x00000000, LENGTH = 0x00002000 + flash : ORIGIN = 0xf0000000, LENGTH = 0x00200000 + ram : ORIGIN = 0x00002000, LENGTH = 0x001fe000 + } + +SECTIONS +{ + .reset : + { + *(.reset) + _src_beg = .; + } > flash + .text : + AT ( ADDR (.reset) + SIZEOF (.reset) ) + { + _dst_beg = .; + *(.text) + } > ram + .data : + AT ( ADDR (.reset) + SIZEOF (.reset) + SIZEOF (.text) ) + { + *(.data) + *(.rodata) + _dst_end = .; + } > ram + .bss : + { + *(.bss) + } > ram + .stack ALIGN(0x10) (NOLOAD): + { + *(.stack) + _ram_end = .; + } > ram +}
cache.ld Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: except_test_s.S =================================================================== --- except_test_s.S (nonexistent) +++ except_test_s.S (revision 1765) @@ -0,0 +1,644 @@ +/* Support file for c based tests */ + +#include "spr_defs.h" +#include "board.h" + +#define reset _main + +#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) + + .global _except_basic + .global _lo_dmmu_en + .global _lo_immu_en + .global _call + .global _call_with_int + .global _load_acc_32 + .global _load_acc_16 + .global _store_acc_32 + .global _store_acc_16 + .global _load_b_acc_32 + .global _trap + .global _b_trap + .global _range + .global _b_range + .global _int_trigger + .global _int_loop + .global _jump_back + + .section .stack + .space 0x1000 +_stack: + + .extern _reset_support + .extern _c_reset + .extern _excpt_buserr + .extern _excpt_dpfault + .extern _excpt_ipfault + .extern _excpt_tick + .extern _excpt_align + .extern _excpt_illinsn + .extern _excpt_int + .extern _excpt_dtlbmiss + .extern _excpt_itlbmiss + .extern _excpt_range + .extern _excpt_syscall + .extern _excpt_break + .extern _excpt_trap + + .section .except, "ax" + +_buserr_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_buserr) + l.ori r10,r10,lo(_excpt_buserr) + l.jr r9 + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + +_dpfault_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_dpfault) + l.ori r10,r10,lo(_excpt_dpfault) + l.jr r9 + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + +_ipfault_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_ipfault) + l.ori r10,r10,lo(_excpt_ipfault) + l.jr r9 + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + +_tick_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_tick) + l.ori r10,r10,lo(_excpt_tick) + l.jr r9 + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + +_align_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_align) + l.ori r10,r10,lo(_excpt_align) + l.jr r9 + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + +_illinsn_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_illinsn) + l.ori r10,r10,lo(_excpt_illinsn) + l.jr r9 + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + +_int_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_int) + l.ori r10,r10,lo(_excpt_int) + l.jr r9 + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + +_dtlbmiss_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_dtlbmiss) + l.ori r10,r10,lo(_excpt_dtlbmiss) + l.jr r9 + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + +_itlbmiss_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_itlbmiss) + l.ori r10,r10,lo(_excpt_itlbmiss) + l.jr r9 + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + +_range_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_range) + l.ori r10,r10,lo(_excpt_range) + l.jr r9 + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + +_syscall_vector: + l.addi r3,r3,4 + + l.mfspr r4,r0,SPR_SR + l.andi r4,r4,7 + l.add r6,r0,r4 + + l.mfspr r4,r0,SPR_EPCR_BASE + l.movhi r5,hi(_sys1) + l.ori r5,r5,lo(_sys1) + l.sub r5,r4,r5 + + l.mfspr r4,r0,SPR_ESR_BASE /* ESR - set supvisor mode */ + l.ori r4,r4,SPR_SR_SM + l.mtspr r0,r4,SPR_ESR_BASE + + l.movhi r4,hi(_sys2) + l.ori r4,r4,lo(_sys2) + l.mtspr r0,r4,SPR_EPCR_BASE + + l.rfe + l.addi r3,r3,8 + +_break_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_break) + l.ori r10,r10,lo(_excpt_break) + l.jr r9 + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + +_trap_vector: + l.addi r1,r1,-120 + l.sw 0x1c(r1),r9 + l.sw 0x20(r1),r10 + l.movhi r9,hi(store_regs) + l.ori r9,r9,lo(store_regs) + l.movhi r10,hi(_excpt_trap) + l.ori r10,r10,lo(_excpt_trap) + l.jr r9 + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + l.nop + + .section .text + + .org 0x100 +_reset_vector: + l.nop + l.nop + l.addi r2,r0,0x0 + l.addi r3,r0,0x0 + l.addi r4,r0,0x0 + l.addi r5,r0,0x0 + l.addi r6,r0,0x0 + l.addi r7,r0,0x0 + l.addi r8,r0,0x0 + l.addi r9,r0,0x0 + l.addi r10,r0,0x0 + l.addi r11,r0,0x0 + l.addi r12,r0,0x0 + l.addi r13,r0,0x0 + l.addi r14,r0,0x0 + l.addi r15,r0,0x0 + l.addi r16,r0,0x0 + l.addi r17,r0,0x0 + l.addi r18,r0,0x0 + l.addi r19,r0,0x0 + l.addi r20,r0,0x0 + l.addi r21,r0,0x0 + l.addi r22,r0,0x0 + l.addi r23,r0,0x0 + l.addi r24,r0,0x0 + l.addi r25,r0,0x0 + l.addi r26,r0,0x0 + l.addi r27,r0,0x0 + l.addi r28,r0,0x0 + l.addi r29,r0,0x0 + l.addi r30,r0,0x0 + l.addi r31,r0,0x0 + + l.movhi r3,hi(start) + l.ori r3,r3,lo(start) + l.jr r3 + l.nop +start: + l.jal _init_mc + l.nop + + l.movhi r1,hi(_stack) + l.ori r1,r1,lo(_stack) + + /* Setup exception wrappers */ + l.movhi r3,hi(_src_beg) + l.ori r3,r3,lo(_src_beg) + l.addi r7,r0,0x100 + +1: l.addi r7,r7,0x100 + l.sfeqi r7,0xf00 + l.bf 1f + l.nop + l.addi r4,r7,0 + l.addi r5,r0,0 +2: + l.lwz r6,0(r3) + l.sw 0(r4),r6 + l.addi r3,r3,4 + l.addi r4,r4,4 + l.addi r5,r5,1 + l.sfeqi r5,16 + l.bf 1b + l.nop + l.j 2b + l.nop +1: + /* Copy data section */ + 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 + +_init_mc: + + 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 + +store_regs: + l.sw 0x00(r1),r2 + l.sw 0x04(r1),r3 + l.sw 0x08(r1),r4 + l.sw 0x0c(r1),r5 + l.sw 0x10(r1),r6 + l.sw 0x14(r1),r7 + l.sw 0x18(r1),r8 + l.sw 0x24(r1),r11 + l.sw 0x28(r1),r12 + l.sw 0x2c(r1),r13 + l.sw 0x30(r1),r14 + l.sw 0x34(r1),r15 + l.sw 0x38(r1),r16 + l.sw 0x3c(r1),r17 + l.sw 0x40(r1),r18 + l.sw 0x44(r1),r19 + l.sw 0x48(r1),r20 + l.sw 0x4c(r1),r21 + l.sw 0x50(r1),r22 + l.sw 0x54(r1),r23 + l.sw 0x58(r1),r24 + l.sw 0x5c(r1),r25 + l.sw 0x60(r1),r26 + l.sw 0x64(r1),r27 + l.sw 0x68(r1),r28 + l.sw 0x6c(r1),r29 + l.sw 0x70(r1),r30 + l.sw 0x74(r1),r31 + + l.mfspr r3,r0,SPR_EPCR_BASE + l.movhi r4,hi(_except_pc) + l.ori r4,r4,lo(_except_pc) + l.sw 0(r4),r3 + + l.mfspr r3,r0,SPR_EEAR_BASE + l.movhi r4,hi(_except_ea) + l.ori r4,r4,lo(_except_ea) + l.sw 0(r4),r3 + + l.movhi r9,hi(end_except) + l.ori r9,r9,lo(end_except) + + l.lwz r10,0(r10) + l.jr r10 + l.nop + +end_except: + l.lwz r2,0x00(r1) + l.lwz r3,0x04(r1) + l.lwz r4,0x08(r1) + l.lwz r5,0x0c(r1) + l.lwz r6,0x10(r1) + l.lwz r7,0x14(r1) + l.lwz r8,0x18(r1) + l.lwz r9,0x1c(r1) + l.lwz r10,0x20(r1) + l.lwz r11,0x24(r1) + l.lwz r12,0x28(r1) + l.lwz r13,0x2c(r1) + l.lwz r14,0x30(r1) + l.lwz r15,0x34(r1) + l.lwz r16,0x38(r1) + l.lwz r17,0x3c(r1) + l.lwz r18,0x40(r1) + l.lwz r19,0x44(r1) + l.lwz r20,0x48(r1) + l.lwz r21,0x4c(r1) + l.lwz r22,0x50(r1) + l.lwz r23,0x54(r1) + l.lwz r24,0x58(r1) + l.lwz r25,0x5c(r1) + l.lwz r26,0x60(r1) + l.lwz r27,0x64(r1) + l.lwz r28,0x68(r1) + l.lwz r29,0x6c(r1) + l.lwz r30,0x70(r1) + l.lwz r31,0x74(r1) + l.addi r1,r1,120 + l.mtspr r0,r9,SPR_EPCR_BASE + l.rfe + l.nop + + .section .text + +_except_basic: +_sys1: + l.addi r3,r0,-2 /* Enable exceptiom recognition and external interrupt,set user mode */ + l.mfspr r4,r0,SPR_SR + l.and r4,r4,r3 + l.ori r4,r4,(SPR_SR_IEE|SPR_SR_TEE) + l.mtspr r0,r4,SPR_SR + + l.addi r3,r0,0 + l.sys 1 + l.addi r3,r3,2 + +_sys2: + l.addi r11,r0,0 + + l.mfspr r4,r0,SPR_SR /* Check SR */ + l.andi r4,r4,(SPR_SR_IEE|SPR_SR_TEE|SPR_SR_SM) + l.sfeqi r4,(SPR_SR_IEE|SPR_SR_TEE|SPR_SR_SM) + l.bf 1f + l.nop + l.addi r11,r11,1 +1: + l.sfeqi r3,4 /* Check if l.sys or l.rfe has delay slot */ + l.bf 1f + l.nop + l.addi r11,r11,2 +1: + l.sfeqi r5,0x1c /* Check the EPCR */ + l.bf 1f + l.nop + l.addi r11,r11,4 +1: + l.sfeqi r6,SPR_SR_SM /* Check the SR when exception is taken */ + l.bf 1f + l.nop + l.addi r11,r11,8 +1: + l.jr r9 + l.nop + +_lo_dmmu_en: + l.mfspr r3,r0,SPR_SR + l.ori r3,r3,SPR_SR_DME + l.mtspr r0,r3,SPR_ESR_BASE + l.mtspr r0,r9,SPR_EPCR_BASE + l.rfe + l.nop + +_lo_immu_en: + l.mfspr r3,r0,SPR_SR + l.ori r3,r3,SPR_SR_IME + l.mtspr r0,r3,SPR_ESR_BASE + l.mtspr r0,r9,SPR_EPCR_BASE + l.rfe + l.nop + +_call: + l.addi r11,r0,0 + l.jr r3 + l.nop + +_call_with_int: + l.mfspr r8,r0,SPR_SR + l.ori r8,r8,SPR_SR_TEE + l.mtspr r0,r8,SPR_ESR_BASE + l.mtspr r0,r3,SPR_EPCR_BASE + l.rfe + +_load_acc_32: + l.movhi r11,hi(0x12345678) + l.ori r11,r11,lo(0x12345678) + l.lwz r11,0(r4) + l.jr r9 + l.nop + +_load_acc_16: + l.movhi r11,hi(0x12345678) + l.ori r11,r11,lo(0x12345678) + l.lhz r11,0(r4) + l.jr r9 + l.nop + +_store_acc_32: + l.movhi r3,hi(0x12345678) + l.ori r3,r3,lo(0x12345678) + l.sw 0(r4),r3 + l.jr r9 + l.nop + +_store_acc_16: + l.movhi r3,hi(0x12345678) + l.ori r3,r3,lo(0x12345678) + l.sh 0(r4),r3 + l.jr r9 + l.nop + +_load_b_acc_32: + l.movhi r11,hi(0x12345678) + l.ori r11,r11,lo(0x12345678) + l.jr r9 + l.lwz r11,0(r4) + +_b_trap: + l.jr r9 +_trap: + l.trap 1 + l.jr r9 + l.nop + +_b_range: + l.jr r9 +_range: + l.addi r3,r0,-1 + l.jr r9 + l.nop + +_int_trigger: + l.addi r11,r0,0 + l.mfspr r3,r0,SPR_SR + l.ori r3,r3,SPR_SR_TEE + l.mtspr r0,r3,SPR_SR + l.addi r11,r11,1 + +_int_loop: + l.j _int_loop + l.lwz r5,0(r4); + +_jump_back: + l.addi r11,r0,0 + l.jr r9 + l.addi r11,r11,1 +
except_test_s.S Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: int_test.ld =================================================================== --- int_test.ld (nonexistent) +++ int_test.ld (revision 1765) @@ -0,0 +1,31 @@ +MEMORY + { + flash : ORIGIN = 0xf0000000, LENGTH = 0x00200000 + ram : ORIGIN = 0x00000500, LENGTH = 0x001fb000 + } + +SECTIONS +{ + .reset : + { + *(.reset) + _src_beg = .; + } > flash + .text : + AT ( ADDR (.reset) + SIZEOF (.reset) ) + { + _dst_beg = .; + *(.text) + } > ram + .data : + AT ( ADDR (.reset) + SIZEOF (.reset) + SIZEOF (.text) ) + { + *(.data) + *(.rodata) + _dst_end = .; + } > ram + .bss : + { + *(.bss) + } > ram +}
int_test.ld Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: int_test.S =================================================================== --- int_test.S (nonexistent) +++ int_test.S (revision 1765) @@ -0,0 +1,427 @@ +/* Within the test we'll use following global variables: + + r16 interrupt counter + r17 current tick timer comparison counter + r18 sanity counter + r19 loop counter + r20 temp value of SR reg + r21 temp value of TTMR reg. + r23 RAM_START + + r25-r31 used by int handler + + The test do the following: + We set up the tick timer to trigger once and then we trigger interrupts incrementally + on every cycle in the specified test program; on interrupt handler we check if data computed + so far exactly matches precalculated values. If interrupt has returned incorreclty, we can + detect this using assertion routine at the end. +*/ + +#include "spr_defs.h" +#include "board.h" + +#define RAM_START 0x00000000 + +#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) + +.section .reset, "ax" + +.org 0x100 + +_reset_vector: + l.addi r2,r0,0x0 + l.addi r3,r0,0x0 + l.addi r4,r0,0x0 + l.addi r5,r0,0x0 + l.addi r6,r0,0x0 + l.addi r7,r0,0x0 + l.addi r8,r0,0x0 + l.addi r9,r0,0x0 + l.addi r10,r0,0x0 + l.addi r11,r0,0x0 + l.addi r12,r0,0x0 + l.addi r13,r0,0x0 + l.addi r14,r0,0x0 + l.addi r15,r0,0x0 + l.addi r16,r0,0x0 + l.addi r17,r0,0x0 + l.addi r18,r0,0x0 + l.addi r19,r0,0x0 + l.addi r20,r0,0x0 + l.addi r21,r0,0x0 + l.addi r22,r0,0x0 + l.addi r23,r0,0x0 + l.addi r24,r0,0x0 + l.addi r25,r0,0x0 + l.addi r26,r0,0x0 + l.addi r27,r0,0x0 + l.addi r28,r0,0x0 + l.addi r29,r0,0x0 + l.addi r30,r0,0x0 + l.addi r31,r0,0x0 + + l.movhi r3,hi(start) + l.ori r3,r3,lo(start) + l.jr r3 + l.nop +start: + l.jal _init_mc + l.nop + + /* Setup exception wrapper */ + l.movhi r3,hi(_src_beg) + l.ori r3,r3,lo(_src_beg) + 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(_main) + l.ori r2,r2,lo(_main) + l.jr r2 + l.nop + +_init_mc: + + 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 + +.section .text + +# +# Tick timer exception handler +# + + l.addi r31,r3,0 +# get interrupted program pc + l.mfspr r25,r0,SPR_EPCR_BASE + +# calculate instruction address + l.movhi r26,hi(_ie_start) + l.ori r26,r26,lo(_ie_start) + l.addi r3,r25,0 #print insn index + l.nop 2 + l.sub r25,r25,r26 + l.addi r3,r25,0 #print insn index + l.nop 2 + + l.addi r3,r31,0 # restore r3 + l.sfeqi r25, 0x00 + l.bf _i00 + l.sfeqi r25, 0x04 + l.bf _i04 + l.sfeqi r25, 0x08 + l.bf _i08 + l.sfeqi r25, 0x0c + l.bf _i0c + l.sfeqi r25, 0x10 + l.bf _i10 + l.sfeqi r25, 0x14 + l.bf _i14 + l.sfeqi r25, 0x18 + l.bf _i18 + l.sfeqi r25, 0x1c + l.bf _i1c + l.sfeqi r25, 0x20 + l.bf _i20 + l.sfeqi r25, 0x24 + l.bf _i24 + l.sfeqi r25, 0x28 + l.bf _i28 + l.sfeqi r25, 0x2c + l.bf _i2c + l.sfeqi r25, 0x30 + l.bf _i30 + l.sfeqi r25, 0x34 + l.bf _i34 + l.sfeqi r25, 0x38 + l.bf _i38 + l.nop + +# value not defined +_die: + l.nop 2 #print r3 + + l.addi r3,r0,0xeeee + l.nop 2 + l.addi r3,r0,1 + l.nop 1 +1: + l.j 1b + l.nop + + +_main: + l.nop + l.addi r3,r0,SPR_SR_SM + l.mtspr r0,r3,SPR_SR + l.nop + +# +# set tick counter to initial 3 cycles +# + l.addi r16,r0,0 + l.addi r17,r0,1 + l.addi r18,r0,0 + l.addi r19,r0,0 + l.addi r22,r0,0 + + l.movhi r23,hi(RAM_START) + l.ori r23,r23,lo(RAM_START) + +# Set r20 to hold enable tick exception + l.mfspr r20,r0,SPR_SR + l.ori r20,r20,SPR_SR_SM|SPR_SR_TEE|SPR_SR_F + +# Set r21 to hold value of TTMR + l.movhi r5,hi(SPR_TTMR_SR | SPR_TTMR_IE) + l.add r21,r5,r17 + +# +# MAIN LOOP +# +_main_loop: +# reinitialize memory and registers + l.addi r3,r0,0xaaaa + l.addi r9,r0,0xbbbb + l.sw 0(r23),r3 + l.sw 4(r23),r9 + l.sw 8(r23),r3 + +# Reinitializes tick timer + l.addi r17,r17,1 + l.mtspr r0,r0,SPR_TTCR # set TTCR + l.mtspr r0,r21,SPR_TTMR # set TTMR + l.mtspr r0,r0,SPR_TTCR # set TTCR + l.addi r21,r21,1 + +# Enable exceptions and interrupts + l.mtspr r0,r20,SPR_SR # set SR + +##### TEST CODE ##### +_ie_start: + l.movhi r3,0x1234 #00 + l.sw 0(r23),r3 #04 + l.movhi r3,hi(RAM_START) #08 + l.lwz r3,0(r3) #0c + l.movhi r3,hi(RAM_START) #10 + l.addi r3,r3,4 #14 + l.j 1f #18 + l.lwz r3,0(r3) #1c + l.addi r3,r3,1 #20 +1: + l.sfeqi r3,0xdead #24 + l.jal 2f #28 + l.addi r3,r0,0x5678 #2c + +_return_addr: +2: + l.bf _die #30 + l.sw 8(r23),r3 #34 +_ie_end: + l.nop #38 +##### END OF TEST CODE ##### + +# do some testing + + l.j _main_loop + l.nop + +_i00: + l.sfeqi r3,0xaaaa + l.bnf _die + l.nop + l.j _resume + l.nop +_i04: + l.movhi r26,0x1234 + l.sfeq r3,r26 + l.bnf _die + l.nop + l.lwz r26,0(r23) + l.sfeqi r26,0xaaaa + l.bnf _die + l.nop + l.j _resume + l.nop +_i08: + l.movhi r26,0x1234 + l.sfeq r3,r26 + l.bnf _die + l.nop + l.lwz r27,0(r23) + l.sfeq r27,r26 + l.bnf _die + l.nop + l.j _resume + l.nop +_i0c: + l.sfeq r3,r23 + l.bnf _die + l.nop + l.j _resume + l.nop +_i10: + l.movhi r26,0x1234 + l.sfeq r26,r3 + l.bnf _die + l.nop + l.j _resume + l.nop +_i14: + l.sfeq r3,r23 + l.bnf _die + l.nop + l.j _resume + l.nop +_i18: + l.addi r26,r23,4 + l.sfeq r3,r26 + l.bnf _die + l.nop + l.j _resume + l.nop +_i1c: + l.j _die + l.nop +_i20: + l.j _die + l.nop +_i24: + l.mfspr r26,r0,SPR_ESR_BASE + l.addi r30,r3,0 + l.addi r3,r26,0 + l.nop 2 + l.addi r3,r30,0 + l.andi r26,r26,SPR_SR_F + l.sfeq r26,r0 +/* l.bnf _die */ + l.nop + l.sfeqi r3,0xbbbb + l.bnf _die + l.nop + l.j _resume + l.nop +_i28: + l.mfspr r26,r0,SPR_ESR_BASE + l.addi r30,r3,0 + l.addi r3,r26,0 + l.nop 2 + l.addi r3,r30,0 + l.andi r26,r26,SPR_SR_F + l.sfeq r26,r0 + l.bnf _die + l.nop + l.sfeqi r22,1 + l.bf _resume + l.addi r22,r0,1 + l.sfeqi r9,0xbbbb + l.bnf _die + l.nop + l.j _resume + l.nop +_i2c: + l.movhi r26,hi(_return_addr) + l.ori r26,r26,lo(_return_addr) + l.sfeq r9,r26 + l.bnf _die + l.nop + l.sfeqi r3,0xbbbb + l.bnf _die + l.nop + l.j _resume + l.nop +_i30: + l.sfeqi r3,0x5678 + l.bnf _die + l.nop + l.j _resume + l.nop +_i34: + l.sfeqi r3,0x5678 + l.bnf _die + l.nop + l.lwz r26,8(r23) + l.sfeqi r26,0xaaaa + l.bnf _die + l.nop + l.j _resume + l.nop +_i38: + l.lwz r26,8(r23) + l.sfeqi r26,0x5678 + l.bnf _die + l.nop +# +# mark finished ok +# + l.movhi r3,hi(0xdeaddead) + l.ori r3,r3,lo(0xdeaddead) + l.nop 2 + l.addi r3,r0,0 + l.nop 1 +_ok: + l.j _ok + l.nop + +_resume: + l.mfspr r27,r0,SPR_ESR_BASE + l.addi r26,r0,SPR_SR_TEE + l.addi r28,r0,-1 + l.xor r26,r26,r28 + l.and r26,r26,r27 + l.mtspr r0,r26,SPR_ESR_BASE + + l.rfe + l.addi r3,r3,5 # should not be executed
int_test.S Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: cfg.S =================================================================== --- cfg.S (nonexistent) +++ cfg.S (revision 1765) @@ -0,0 +1,83 @@ +/* Configuration tester */ +#include "spr_defs.h" + + .section .except, "ax" + l.addi r2,r0,0 + + .section .text + .org 0x100 +_reset: + l.addi r1,r0,0x7f00 + l.movhi r2,hi(_main) + l.ori r2,r2,lo(_main) + l.jr r2 + l.nop + + +_main: + l.addi r2,r0,0 + + l.mfspr r3,r0,SPR_VR /* Version */ + l.nop NOP_REPORT + l.add r2,r2,r3 + + l.mfspr r3,r0,SPR_UPR /* Unit Present */ + l.nop NOP_REPORT + l.add r2,r2,r3 + + l.mfspr r4,r0,SPR_PMR /* Power Management */ + l.addi r3,r0,0 + l.mtspr r0,r3,SPR_PMR + l.mfspr r3,r0,SPR_PMR + l.andi r3,r3,0xff + l.nop NOP_REPORT + l.add r2,r2,r3 + + l.addi r3,r0,5 + l.mtspr r0,r3,SPR_PMR + l.mfspr r3,r0,SPR_PMR + l.andi r3,r3,0xff + l.nop NOP_REPORT + l.add r2,r2,r3 + + l.mtspr r0,r4,SPR_PMR + + l.mfspr r3,r0,SPR_CPUCFGR + l.nop NOP_REPORT + l.add r2,r2,r3 + + l.mfspr r3,r0,SPR_DMMUCFGR + l.nop NOP_REPORT + l.add r2,r2,r3 + + l.mfspr r3,r0,SPR_IMMUCFGR + l.nop NOP_REPORT + l.add r2,r2,r3 + + l.mfspr r3,r0,SPR_DCCFGR + l.nop NOP_REPORT + l.add r2,r2,r3 + + l.mfspr r3,r0,SPR_ICCFGR + l.nop NOP_REPORT + l.add r2,r2,r3 + + l.mfspr r3,r0,SPR_DCFGR + l.nop NOP_REPORT + l.add r2,r2,r3 + + l.mfspr r3,r0,SPR_PCCFGR + l.nop NOP_REPORT + l.add r2,r2,r3 + + /* Configurations may differ, so we will insert another report*/ + l.movhi r3,hi(0xdeacf5cc) + l.ori r3,r3,lo(0xdeacf5cc) + l.add r3,r2,r3 + l.nop NOP_REPORT + + l.movhi r3,hi(0xdeaddead) + l.ori r3,r3,lo(0xdeaddead) + l.nop NOP_REPORT + l.addi r3,r0,0 + l.nop NOP_EXIT
cfg.S Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: cache_asm.S =================================================================== --- cache_asm.S (nonexistent) +++ cache_asm.S (revision 1765) @@ -0,0 +1,323 @@ +#include "spr_defs.h" +#include "board.h" + +#define IC_ENABLE 0 +#define DC_ENABLE 0 + +#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) + + + .extern _main + + .global _ic_enable + .global _ic_disable + .global _dc_enable + .global _dc_disable + .global _dc_inv + .global _ic_inv_test + .global _dc_inv_test + + .section .stack + .space 0x1000 +_stack: + + .section .reset, "ax" + + .org 0x100 +_reset_vector: + l.addi r2,r0,0x0 + l.addi r3,r0,0x0 + l.addi r4,r0,0x0 + l.addi r5,r0,0x0 + l.addi r6,r0,0x0 + l.addi r7,r0,0x0 + l.addi r8,r0,0x0 + l.addi r9,r0,0x0 + l.addi r10,r0,0x0 + l.addi r11,r0,0x0 + l.addi r12,r0,0x0 + l.addi r13,r0,0x0 + l.addi r14,r0,0x0 + l.addi r15,r0,0x0 + l.addi r16,r0,0x0 + l.addi r17,r0,0x0 + l.addi r18,r0,0x0 + l.addi r19,r0,0x0 + l.addi r20,r0,0x0 + l.addi r21,r0,0x0 + l.addi r22,r0,0x0 + l.addi r23,r0,0x0 + l.addi r24,r0,0x0 + l.addi r25,r0,0x0 + l.addi r26,r0,0x0 + l.addi r27,r0,0x0 + l.addi r28,r0,0x0 + l.addi r29,r0,0x0 + l.addi r30,r0,0x0 + l.addi r31,r0,0x0 + + l.movhi r3,hi(start) + l.ori r3,r3,lo(start) + l.jr r3 + l.nop +start: + l.jal _init_mc + l.nop + + l.movhi r1,hi(_stack) + l.ori r1,r1,lo(_stack) + + /* Copy data section */ + l.movhi r3,hi(_src_beg) + l.ori r3,r3,lo(_src_beg) + 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(_main) + l.ori r2,r2,lo(_main) + l.jr r2 + l.nop + +_init_mc: + + 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 + + + .section .text + +_ic_enable: + /* Disable IC */ + l.mfspr r13,r0,SPR_SR + l.addi r11,r0,-1 + l.xori r11,r11,SPR_SR_ICE + l.and r11,r13,r11 + l.mtspr r0,r11,SPR_SR + + /* Invalidate IC */ + l.addi r13,r0,0 + l.addi r11,r0,8192 +1: + l.mtspr r0,r13,SPR_ICBIR + l.sfne r13,r11 + l.bf 1b + l.addi r13,r13,16 + + /* Enable IC */ + l.mfspr r13,r0,SPR_SR + l.ori r13,r13,SPR_SR_ICE + l.mtspr r0,r13,SPR_SR + l.nop + l.nop + l.nop + l.nop + l.nop + + l.jr r9 + l.nop + +_ic_disable: + /* Disable IC */ + l.mfspr r13,r0,SPR_SR + l.addi r11,r0,-1 + l.xori r11,r11,SPR_SR_ICE + l.and r11,r13,r11 + l.mtspr r0,r11,SPR_SR + + l.jr r9 + l.nop + +_dc_enable: + /* Disable DC */ + l.mfspr r13,r0,SPR_SR + l.addi r11,r0,-1 + l.xori r11,r11,SPR_SR_DCE + l.and r11,r13,r11 + l.mtspr r0,r11,SPR_SR + + /* Flush DC */ + l.addi r13,r0,0 + l.addi r11,r0,8192 +1: + l.mtspr r0,r13,SPR_DCBIR + l.sfne r13,r11 + l.bf 1b + l.addi r13,r13,16 + + /* Enable DC */ + l.mfspr r13,r0,SPR_SR + l.ori r13,r13,SPR_SR_DCE + l.mtspr r0,r13,SPR_SR + + l.jr r9 + l.nop + +_dc_disable: + /* Disable DC */ + l.mfspr r13,r0,SPR_SR + l.addi r11,r0,-1 + l.xori r11,r11,SPR_SR_DCE + l.and r11,r13,r11 + l.mtspr r0,r11,SPR_SR + + l.jr r9 + l.nop + +_dc_inv: + l.mfspr r4,r0,SPR_SR + l.addi r5,r0,-1 + l.xori r5,r5,SPR_SR_DCE + l.and r5,r4,r5 + l.mtspr r0,r5,SPR_SR + l.mtspr r0,r3,SPR_DCBIR + l.mtspr r0,r4,SPR_SR + l.jr r9 + l.nop + + .align 0x10 +_ic_inv_test: + l.movhi r7,hi(_ic_test_1) + l.ori r7,r7,lo(_ic_test_1) + l.addi r3,r0,0 + l.addi r4,r0,0 + l.addi r5,r0,0 + l.nop + l.nop + l.nop + +_ic_test_1: +3: l.addi r3,r3,1 + + l.sfeqi r4,0x01 + l.bnf 1f + l.nop + + l.mfspr r8,r0,SPR_SR + l.addi r11,r0,-1 + l.xori r11,r11,SPR_SR_ICE + l.and r11,r8,r11 + l.mtspr r0,r11,SPR_SR + l.mtspr r0,r7,SPR_ICBIR + l.mtspr r0,r8,SPR_SR + l.bf 2f + l.nop + +1: l.lwz r6,0(r7) + l.addi r6,r6,1 + l.sw 0(r7),r6 + +2: l.addi r5,r5,1 + l.sfeqi r5,10 + l.bnf 3b + l.xori r4,r4,0x01 + + l.addi r11,r3,0 + l.jr r9 + l.nop + +_dc_inv_test: + l.movhi r4,hi(0x08040201) + l.ori r4,r4,lo(0x08040201) + l.sw 0x00(r3),r4 + l.slli r4,r4,1 + l.sw 0x14(r3),r4 + l.slli r4,r4,1 + l.sw 0x28(r3),r4 + + l.addi r8,r9,0 + l.jal _dc_enable + l.nop + l.addi r9,r8,0 + + l.lbz r4,0x03(r3) + l.lhz r5,0x16(r3) + l.add r4,r4,r5 + l.lwz r5,0x28(r3) + l.add r4,r4,r5 + + l.mfspr r6,r0,SPR_SR + l.addi r5,r0,-1 + l.xori r5,r5,SPR_SR_DCE + l.and r5,r6,r5 + l.mtspr r0,r5,SPR_SR + l.addi r7,r3,0x10 + l.mtspr r0,r7,SPR_DCBIR + + l.lwz r5,0(r3) + l.slli r5,r5,3 + l.sw 0x00(r3),r5 + l.slli r5,r5,1 + l.sw 0x14(r3),r5 + l.slli r5,r5,1 + l.sw 0x28(r3),r5 + + l.mtspr r0,r6,SPR_SR + + l.lbz r5,0x03(r3) + l.add r4,r4,r5 + l.lhz r5,0x16(r3) + l.add r4,r4,r5 + l.lwz r5,0x28(r3) + l.add r4,r4,r5 + + l.addi r5,r0,-1 + l.xori r5,r5,SPR_SR_DCE + l.and r5,r6,r5 + l.mtspr r0,r5,SPR_SR + + l.addi r11,r4,0x0 +1: + l.jr r9 + l.nop Index: fbtest.c =================================================================== --- fbtest.c (nonexistent) +++ fbtest.c (revision 1765) @@ -0,0 +1,40 @@ +/* Simple frame buffer test. Draws some horizontal with different colors. */ +#include "support.h" + +#define BUFADDR 0x00100000 +#define BASEADDR 0x97000000 +#define BUF_PTR ((unsigned char *)BUFADDR) +#define PAL_PTR ((unsigned long *)(BASEADDR + 0x400)) +#define SIZEX 640 +#define SIZEY 480 + +#define putxy(x,y) *(BUF_PTR + (x) + (y) * SIZEX) +#define setpal(i,r,g,b) *(PAL_PTR + (i)) = (((unsigned long)(r) & 0xff) << 16) | (((unsigned long)(g) & 0xff) << 8) | (((unsigned long)(b) & 0xff) << 0) + +void hline (int y, int x1, int x2, unsigned char c) +{ + int x; + for (x = x1; x < x2; x++) + putxy(x, y) = c; +} + +int main(void) +{ + unsigned i; + + /* Set address of buffer at predefined location */ + *((unsigned long *)(BASEADDR) + 0x1) = BUFADDR; + for (i = 0; i < 256; i++) + setpal (i, 256 - i, i, 128 ^ i); + + /* Turn display on */ + *((unsigned long *)(BASEADDR) + 0x0) = 0xffffffff; + + for (i = 0; i < 16; i++) { + hline (i, 0, i, i); + hline (256 - i, 256 - i, 256 + i, i); + } + + report (0xdeaddead); + return 0; +}
fbtest.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,143 @@ +## 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 +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 +############################################### + +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 + +######### 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: flag.S =================================================================== --- flag.S (nonexistent) +++ flag.S (revision 1765) @@ -0,0 +1,102 @@ +/* Basic SR flag test */ +#include "spr_defs.h" + +#define SET_ARITH_FLAG 0 /* If this is not set this test has no meaning */ + + .section .except, "ax" + l.movhi r10,0x8000 + + .section .text + .org 0x100 +_reset: + l.nop + + l.movhi r10,0x8000 + l.addi r11,r0,-1 + l.addi r12,r0,2 + l.addi r13,r0,0x5678 + l.movhi r14,0xdead + l.ori r14,r14,0xdead + l.addi r15,r0,0xdead + + /* Test start */ + +#if SET_ARITH_FLAG + /* Simple zero test */ + l.addi r1,r0,1 /* f = 0 */ + l.addi r1, r0, 0 + l.bnf _err + l.bf _err + l.addi r1,r0,1 /* f = 0 */ + l.add r1, r0, r0 + l.bnf _err + l.addi r1,r0,1 /* f = 0 */ + l.andi r1, r0, 0 + l.bnf _err + l.addi r1,r0,1 /* f = 0 */ + l.and r1, r0, r0 + l.bnf _err + + l.addi r1,r0,1 /* f = 0 */ + l.sub r1, r0, r0 + l.bf _err + l.or r1, r0, r0 + l.bf _err + l.ori r1, r0, 0 + l.bf _err + l.xor r1, r0, r0 + l.bf _err + l.xori r1, r0, 0 + l.bf _err + + l.addi r1,r0,0 /* f = 1 */ + l.sub r1, r0, r0 + l.bnf _err + l.or r1, r0, r0 + l.bnf _err + l.ori r1, r0, 0 + l.bnf _err + l.xor r1, r0, r0 + l.bnf _err + l.xori r1, r0, 0 + l.bnf _err + + l.addi r1,r0,0 /* f = 1 */ + l.addi r1, r0, 0xdead + l.bf _err + l.addi r1,r0,0 /* f = 1 */ + l.add r1, r0, r15 + l.bf _err + l.addi r1,r0,0 /* f = 1 */ + l.andi r1, r11, 0xdead + l.bf _err + l.addi r1,r0,0 /* f = 1 */ + l.and r1, r11, r15 + l.bf _err + + l.addi r1,r0,0 /* f = 1 */ + l.addi r1, r11, 0 + l.bf _err + l.addi r1,r0,0 /* f = 1 */ + l.add r1, r11, r0 + l.bf _err + l.addi r1,r0,0 /* f = 1 */ + l.andi r1, r11, 0x1234 + l.bf _err + l.addi r1,r0,0 /* f = 1 */ + l.and r1, r11, r10 + l.bf _err +#endif + + l.movhi r3,0xdead + l.ori r3,r3,0xdead + l.nop NOP_REPORT + l.ori r3,r0,0 + l.nop NOP_EXIT + +_err: + l.ori r3,r1,0 + l.nop NOP_REPORT + l.mfspr r3,r0,SPR_SR + l.nop NOP_REPORT + l.nop NOP_EXIT
flag.S Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: except_mc.ld =================================================================== --- except_mc.ld (nonexistent) +++ except_mc.ld (revision 1765) @@ -0,0 +1,37 @@ +MEMORY + { + except : ORIGIN = 0x00000000, LENGTH = 0x00002000 + flash : ORIGIN = 0x00002000, LENGTH = 0x001fe000 + ram : ORIGIN = 0x40000000, LENGTH = 0x00200000 + } + +SECTIONS +{ + .except : + { + *(.except) + _src_beg = .; + } > except + .text : + AT ( ADDR (.except) + SIZEOF (.except) ) + { + _dst_beg = .; + *(.text) + *(.rodata) + } > ram + .data : + AT ( ADDR (.except) + SIZEOF (.except) + SIZEOF (.text)) + { + *(.data) + _dst_end = .; + } > ram + .bss : + { + *(.bss) + } > ram + .stack ALIGN(0x10) (NOLOAD): + { + *(.stack) + _ram_end = .; + } > ram +} Index: config.sub =================================================================== --- config.sub (nonexistent) +++ config.sub (revision 1765) @@ -0,0 +1,1257 @@ +#! /bin/sh +# Configuration validation subroutine script, version 1.1. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 +# Free Software Foundation, Inc. +# +# 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., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, 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. + +# Written by Per Bothner . +# Please send patches to . +# +# 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. + +if [ x$1 = x ] +then + echo Configuration name missing. 1>&2 + echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 + echo "or $0 ALIAS" 1>&2 + echo where ALIAS is a recognized configuration type. 1>&2 + exit 1 +fi + +# First pass through any local machine types. +case $1 in + *local*) + echo $1 + exit 0 + ;; + *) + ;; +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 + linux-gnu*) + 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) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + 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. + tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ + | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ + | 580 | i960 | h8300 \ + | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ + | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ + | alphaev6[78] \ + | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ + | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ + | mips64orion | mips64orionel | mipstx39 | mipstx39el \ + | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ + | mips64vr5000 | miprs64vr5000el | mcore \ + | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ + | thumb | d10v | fr30 | avr) + basic_machine=$basic_machine-unknown + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl) + ;; + + # 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[34567]86) + 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. + # FIXME: clean up the formatting here. + vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ + | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ + | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ + | xmp-* | ymp-* \ + | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ + | alphaev6[78]-* \ + | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ + | clipper-* | orion-* \ + | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ + | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ + | mipstx39-* | mipstx39el-* | mcore-* \ + | f301-* | armv*-* | s390-* | sv1-* | t3e-* \ + | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ + | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* ) + ;; + # 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 + ;; + 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 + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-cbm + ;; + amigaos | amigados) + basic_machine=m68k-cbm + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-cbm + 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 + ;; + 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 | ymp) + basic_machine=ymp-cray + os=-unicos + ;; + cray2) + basic_machine=cray2-cray + os=-unicos + ;; + [ctj]90-cray) + basic_machine=c90-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + 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 + ;; + 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[34567]86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i[34567]86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i[34567]86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i[34567]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 + ;; + i386-go32 | go32) + basic_machine=i386-unknown + os=-go32 + ;; + i386-mingw32 | mingw32) + basic_machine=i386-unknown + os=-mingw32 + ;; + i386-qnx | qnx) + basic_machine=i386-qnx + ;; + 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 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mipsel*-linux*) + basic_machine=mipsel-unknown + os=-linux-gnu + ;; + mips*-linux*) + basic_machine=mips-unknown + os=-linux-gnu + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + msdos) + basic_machine=i386-unknown + 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 + ;; + np1) + basic_machine=np1-gould + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + or32 | or32-*) + basic_machine=or32 + os=-rtems + ;; + 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 | nexen) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86) + basic_machine=i686-pc + ;; + pentiumii | pentium2) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexen-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=rs6000-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/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sparclite-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=t3e-cray + os=-unicos + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + 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 + ;; + xmp) + basic_machine=xmp-cray + os=-unicos + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + 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 + ;; + mips) + if [ x$os = x-linux-gnu ]; then + basic_machine=mips-unknown + else + basic_machine=mips-mips + fi + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sparc | sparcv9) + 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 + ;; + c4x*) + basic_machine=c4x-none + os=-coff + ;; + *) + 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* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -*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 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -ns2 ) + os=-nextstep2 + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -qnx) + os=-qnx4 + ;; + -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) + os=-mint + ;; + -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 + ;; + 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=-rtems + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-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 + ;; + f301-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 + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -*MiNT) + vendor=atari + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine $vendor $os
config.sub Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: mmu_asm.S =================================================================== --- mmu_asm.S (nonexistent) +++ mmu_asm.S (revision 1765) @@ -0,0 +1,511 @@ +#include "spr_defs.h" + +#define PAGE_SIZE 8192 +#define DTLB_PR_NOLIMIT (SPR_DTLBTR_URE | \ + SPR_DTLBTR_UWE | \ + SPR_DTLBTR_SRE | \ + SPR_DTLBTR_SWE ) +#define ITLB_PR_NOLIMIT (SPR_ITLBTR_SXE | \ + SPR_ITLBTR_UXE ) + .global _lo_dmmu_en + .global _lo_immu_en + .global _lo_dtlb_ci_test + .global _lo_itlb_ci_test + .global _testjump + .global _ic_enable + .global _ic_disable + .global _dc_enable + .global _dc_disable + +_lo_dmmu_en: + l.mfspr r11,r0,SPR_SR + l.ori r11,r11,SPR_SR_DME + l.mtspr r0,r11,SPR_ESR_BASE + l.mtspr r0,r9,SPR_EPCR_BASE + l.rfe + l.nop + +_lo_dmmu_dis: + l.addi r13,r0,-1 + l.xori r13,r13,SPR_SR_DME + l.mfspr r11,r0,SPR_SR + l.and r11,r11,r13 + l.mtspr r0,r11,SPR_SR + l.jr r9 + l.nop + +_lo_immu_en: + l.mfspr r11,r0,SPR_SR + l.ori r11,r11,SPR_SR_IME + l.mtspr r0,r11,SPR_ESR_BASE + l.mtspr r0,r9,SPR_EPCR_BASE + l.rfe + l.nop + +_lo_immu_dis: + l.addi r13,r0,-1 + l.xori r13,r13,SPR_SR_IME + l.mfspr r11,r0,SPR_SR + l.and r11,r11,r13 + l.mtspr r0,r11,SPR_SR + l.jr r9 + l.nop + +_testjump: + l.movhi r5,0x4800 + l.ori r5,r5,0x4800 + l.sw 0x0(r3),r5 + l.movhi r5,0x1500 + l.ori r5,r5,0x0000 + l.sw 0x4(r3),r5 + l.or r5,r0,r9 + l.jalr r4 + l.nop + l.or r9,r0,r5 + l.jr r9 + l.nop + +_ic_enable: + /* Disable IC */ + l.mfspr r13,r0,SPR_SR + l.addi r11,r0,-1 + l.xori r11,r11,SPR_SR_ICE + l.and r11,r13,r11 + l.mtspr r0,r11,SPR_SR + + /* Invalidate IC */ + l.addi r13,r0,0 + l.addi r11,r0,8192 +1: + l.mtspr r0,r13,SPR_ICBIR + l.sfne r13,r11 + l.bf 1b + l.addi r13,r13,16 + + /* Enable IC */ + l.mfspr r13,r0,SPR_SR + l.ori r13,r13,SPR_SR_ICE + l.mtspr r0,r13,SPR_SR + l.nop + l.nop + l.nop + l.nop + l.nop + + l.jr r9 + l.nop + +_ic_disable: + /* Disable IC */ + l.mfspr r13,r0,SPR_SR + l.addi r11,r0,-1 + l.xori r11,r11,SPR_SR_ICE + l.and r11,r13,r11 + l.mtspr r0,r11,SPR_SR + + l.jr r9 + l.nop + +_dc_enable: + /* Disable DC */ + l.mfspr r13,r0,SPR_SR + l.addi r11,r0,-1 + l.xori r11,r11,SPR_SR_DCE + l.and r11,r13,r11 + l.mtspr r0,r11,SPR_SR + + /* Flush DC */ + l.addi r13,r0,0 + l.addi r11,r0,8192 +1: + l.mtspr r0,r13,SPR_DCBIR + l.sfne r13,r11 + l.bf 1b + l.addi r13,r13,16 + + /* Enable DC */ + l.mfspr r13,r0,SPR_SR + l.ori r13,r13,SPR_SR_DCE + l.mtspr r0,r13,SPR_SR + + l.jr r9 + l.nop + +_dc_disable: + /* Disable DC */ + l.mfspr r13,r0,SPR_SR + l.addi r11,r0,-1 + l.xori r11,r11,SPR_SR_DCE + l.and r11,r13,r11 + l.mtspr r0,r11,SPR_SR + + l.jr r9 + l.nop + + /* dtlb_ic_test(unsigned long add, unsigned long set) */ +_lo_dtlb_ci_test: + l.addi r1,r1,-4 + l.sw 0(r1),r9 + + l.addi r8,r0,0 + + l.movhi r5,hi(0x01234567) + l.ori r5,r5,lo(0x01234567) + l.sw 0(r3),r5 + l.movhi r5,hi(0x89abcdef) + l.ori r5,r5,lo(0x89abcdef) + l.sw (PAGE_SIZE - 4)(r3),r5 + + l.ori r5,r3,SPR_DTLBMR_V + l.mtspr r4,r5,SPR_DTLBMR_BASE(0) + + l.ori r5,r3,(DTLB_PR_NOLIMIT | SPR_DTLBTR_CI) + l.mtspr r4,r5,SPR_DTLBTR_BASE(0) + + l.addi r5,r3,PAGE_SIZE + l.ori r5,r5,SPR_DTLBMR_V + l.addi r6,r4,1 + l.mtspr r6,r5,SPR_DTLBMR_BASE(0) + + l.addi r5,r3,PAGE_SIZE + l.ori r5,r5,(DTLB_PR_NOLIMIT | SPR_DTLBTR_CI) + l.addi r6,r4,1 + l.mtspr r6,r5,SPR_DTLBTR_BASE(0) + + l.jal _lo_dmmu_en + l.nop + l.jal _dc_enable + l.nop + + l.movhi r6,hi(0x01234567) + l.ori r6,r6,lo(0x01234567) + l.lwz r5,0(r3) + l.sfeq r6,r5 + l.bnf 11f + l.nop + l.movhi r6,hi(0x89abcdef) + l.ori r6,r6,lo(0x89abcdef) + l.lwz r5,(PAGE_SIZE - 4)(r3) + l.sfeq r6,r5 + l.bnf 12f + l.nop + + l.movhi r5,hi(0x76543210) + l.ori r5,r5,lo(0x76543210) + l.sw 0(r3),r5 + l.movhi r5,hi(0xfedcba9) + l.ori r5,r5,lo(0xfedcba9) + l.sw (PAGE_SIZE - 4)(r3),r5 + + l.jal _lo_dmmu_dis + l.nop + l.ori r5,r3,(DTLB_PR_NOLIMIT) + l.mtspr r4,r5,SPR_DTLBTR_BASE(0) + l.jal _lo_dmmu_en + l.nop + + l.movhi r6,hi(0x76543210) + l.ori r6,r6,lo(0x76543210) + l.lwz r5,0(r3) + l.sfeq r6,r5 + l.bnf 13f + l.nop + l.movhi r6,hi(0xfedcba9) + l.ori r6,r6,lo(0xfedcba9) + l.lwz r5,(PAGE_SIZE - 4)(r3) + l.sfeq r6,r5 + l.bnf 14f + l.nop + + l.jal _lo_dmmu_dis + l.nop + l.ori r5,r3,(DTLB_PR_NOLIMIT | SPR_DTLBTR_CI) + l.mtspr r4,r5,SPR_DTLBTR_BASE(0) + l.jal _lo_dmmu_en + l.nop + + l.movhi r5,hi(0x00112233) + l.ori r5,r5,lo(0x00112233) + l.sw 0(r3),r5 +#if 1 + l.movhi r5,hi(0x44556677) + l.ori r5,r5,lo(0x44556677) + l.sw 4(r3),r5 + l.movhi r5,hi(0x8899aabb) + l.ori r5,r5,lo(0x8899aabb) + l.sw 8(r3),r5 + l.movhi r5,hi(0xccddeeff) + l.ori r5,r5,lo(0xccddeeff) + l.sw 12(r3),r5 +#endif + l.movhi r5,hi(0x44556677) + l.ori r5,r5,lo(0x44556677) + l.sw (PAGE_SIZE - 4)(r3),r5 + + l.movhi r6,hi(0x00112233) + l.ori r6,r6,lo(0x00112233) + l.lwz r5,0(r3) + l.sfeq r6,r5 + l.bnf 15f + l.nop + l.movhi r6,hi(0x44556677) + l.ori r6,r6,lo(0x44556677) + l.lwz r5,(PAGE_SIZE - 4)(r3) + l.sfeq r6,r5 + l.bnf 16f + l.nop + + l.jal _lo_dmmu_dis + l.nop + l.ori r5,r3,(DTLB_PR_NOLIMIT) + l.mtspr r4,r5,SPR_DTLBTR_BASE(0) + l.jal _lo_dmmu_en + l.nop + + l.movhi r6,hi(0x76543210) + l.ori r6,r6,lo(0x76543210) + l.lwz r5,0(r3) + l.sfeq r6,r5 + l.bnf 17f + l.nop + + l.movhi r6,hi(0xfedcba9) + l.ori r6,r6,lo(0xfedcba9) + l.lwz r5,(PAGE_SIZE - 4)(r3) + l.sfeq r6,r5 + l.bnf 18f + l.nop + + /* Invalidate cache */ + l.jal _dc_disable + l.nop + + l.movhi r5,hi(0x00112233) + l.ori r5,r5,lo(0x00112233) + l.sw 12(r3),r5 + l.movhi r5,hi(0x44556677) + l.ori r5,r5,lo(0x44556677) + l.sw 8(r3),r5 + l.movhi r5,hi(0x8899aabb) + l.ori r5,r5,lo(0x8899aabb) + l.sw 4(r3),r5 + l.movhi r5,hi(0xccddeeff) + l.ori r5,r5,lo(0xccddeeff) + l.sw 0(r3),r5 + l.movhi r5,hi(0x44556677) + l.ori r5,r5,lo(0x44556677) + l.sw (PAGE_SIZE - 4)(r3),r5 + + l.jal _dc_enable + l.nop + + /* I want this part to execute as fast as possible */ + l.jal _ic_enable + l.nop + + l.addi r5,r3,PAGE_SIZE + + /* This jump is just to be shure that the following + instructions will get into IC */ + l.j 1f + l.nop + /* This shuld trigger cahe line refill */ +2: l.lwz r6,0(r3) + l.j 2f + /* This load is from non cached area and may cause some problems + in previuos refill, which is probably still in progress */ + l.lwz r6,0(r5) +1: l.j 2b + l.nop +2: + /* Check the line that was previosly refilled */ + l.movhi r6,hi(0x00112233) + l.ori r6,r6,lo(0x00112233) + l.lwz r5,12(r3) + l.sfeq r6,r5 + l.bnf 19f + l.nop + l.movhi r6,hi(0x44556677) + l.ori r6,r6,lo(0x44556677) + l.lwz r5,8(r3) + l.sfeq r6,r5 + l.bnf 19f + l.nop + l.movhi r6,hi(0x8899aabb) + l.ori r6,r6,lo(0x8899aabb) + l.lwz r5,4(r3) + l.sfeq r6,r5 + l.bnf 19f + l.nop + l.movhi r6,hi(0xccddeeff) + l.ori r6,r6,lo(0xccddeeff) + l.lwz r5,0(r3) + l.sfeq r6,r5 + l.bnf 19f + l.nop + + l.jal _dc_disable + l.nop + + l.jal _lo_dmmu_dis + l.nop + + l.j 10f + l.nop + +19: l.addi r8,r8,1 +18: l.addi r8,r8,1 +17: l.addi r8,r8,1 +16: l.addi r8,r8,1 +15: l.addi r8,r8,1 +14: l.addi r8,r8,1 +13: l.addi r8,r8,1 +12: l.addi r8,r8,1 +11: l.addi r8,r8,1 + +10: l.jal _dc_disable + l.nop + + l.jal _ic_disable + l.nop + + l.jal _lo_dmmu_dis + l.nop + + l.addi r11,r8,0 + l.sw 0(r0),r8 + l.sw 4(r0),r5 + + l.lwz r9,0(r1) + l.jr r9 + l.addi r1,r1,4 + + /* itlb_ic_test(unsigned long add, unsigned long set) */ +_lo_itlb_ci_test: + l.addi r1,r1,-4 + l.sw 0(r1),r9 + + l.addi r8,r0,0 + + /* Copy the code to the prepeared location */ + l.addi r7,r0,88 + l.movhi r5,hi(_ci_test) + l.ori r5,r5,lo(_ci_test) + l.addi r6,r3,0 +1: l.lwz r11,0(r5) + l.sw 0(r6),r11 + l.addi r5,r5,4 + l.addi r6,r6,4 + l.addi r7,r7,-4 + l.sfeqi r7,0 + l.bnf 1b + l.nop + + l.ori r5,r3,SPR_ITLBMR_V + l.mtspr r4,r5,SPR_ITLBMR_BASE(0) + + l.ori r5,r3,ITLB_PR_NOLIMIT + l.mtspr r4,r5,SPR_ITLBTR_BASE(0) + + l.jal _lo_immu_en + l.nop + l.jal _ic_enable + l.nop + + l.addi r5,r0,0 + l.addi r6,r0,0 + l.jalr r3 + l.nop + + l.sfeqi r5,5 + l.bnf 11f + l.nop + + /* Copy the code to the prepeared location */ + l.addi r7,r0,20 + l.movhi r5,hi(_ic_refill_test) + l.ori r5,r5,lo(_ic_refill_test) + l.addi r6,r3,12 +1: l.lwz r11,0(r5) + l.sw 0(r6),r11 + l.addi r5,r5,4 + l.addi r6,r6,4 + l.addi r7,r7,-4 + l.sfeqi r7,0 + l.bnf 1b + l.nop + + l.jal _ic_disable + l.nop + l.jal _ic_enable + l.nop + + l.addi r5,r0,0 + l.addi r6,r3,12 + l.jalr r6 + l.nop + l.addi r6,r3,16 + l.jalr r6 + l.nop + + l.sfeqi r5,4 + l.bnf 12f + l.nop + + l.j 10f + l.nop + +12: l.addi r8,r8,1 +11: l.addi r8,r8,1 + +10: l.jal _ic_disable + l.nop + + l.jal _lo_dmmu_dis + l.nop + + l.addi r11,r8,0 + l.sw 0(r0),r11 + l.sw 4(r0),r5 + + l.lwz r9,0(r1) + l.jr r9 + l.addi r1,r1,4 + +_ci_test: +3: l.addi r5,r5,1 + + l.sfeqi r6,0x01 + l.bnf 1f + l.nop + + l.addi r13,r0,-1 + l.xori r13,r13,SPR_SR_IME + l.mfspr r11,r0,SPR_SR + l.and r13,r11,r13 + l.mtspr r0,r13,SPR_SR + + l.ori r7,r3,(ITLB_PR_NOLIMIT | SPR_ITLBTR_CI) + l.mtspr r4,r7,SPR_ITLBTR_BASE(0) + + l.mtspr r0,r11,SPR_SR + +1: l.lwz r7,0(r3) + l.addi r7,r7,1 + l.sw 0(r3),r7 + +2: l.addi r6,r6,1 + l.sfeqi r6,3 + l.bnf 3b + l.nop + + l.jr r9 + l.nop + + +_ic_refill_test: + l.jr r9 + l.addi r5,r5,1 + l.addi r5,r5,1 + l.jr r9 + l.addi r5,r5,1 Index: cache.c =================================================================== --- cache.c (nonexistent) +++ cache.c (revision 1765) @@ -0,0 +1,411 @@ +/* Cache test */ +#include "support.h" +#include "spr_defs.h" + + +#undef UART + +#define MEM_RAM 0x00100000 + +/* Number of IC sets (power of 2) */ +#define IC_SETS 256 +#define DC_SETS 256 + +/* Block size in bytes (1, 2, 4, 8, 16, 32 etc.) */ +#define IC_BLOCK_SIZE 16 +#define DC_BLOCK_SIZE 16 + +/* Number of IC ways (1, 2, 3 etc.). */ +#define IC_WAYS 1 +#define DC_WAYS 1 + +/* Cache size */ +#define IC_SIZE (IC_WAYS*IC_SETS*IC_BLOCK_SIZE) +#define DC_SIZE (DC_WAYS*DC_SETS*DC_BLOCK_SIZE) + +/* Memory access macros */ +#define REG8(add) *((volatile unsigned char *)(add)) +#define REG16(add) *((volatile unsigned short *)(add)) +#define REG32(add) *((volatile unsigned long *)(add)) + +#if UART +#include "uart.h" +#define IN_CLK 20000000 +#define UART_BASE 0x9c000000 +#define UART_BAUD_RATE 9600 + +#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) + +#define WAIT_FOR_XMITR \ + do { \ + lsr = REG8(UART_BASE + UART_LSR); \ + } while ((lsr & BOTH_EMPTY) != BOTH_EMPTY) + +#define WAIT_FOR_THRE \ + do { \ + lsr = REG8(UART_BASE + UART_LSR); \ + } while ((lsr & UART_LSR_THRE) != UART_LSR_THRE) + +#define CHECK_FOR_CHAR \ + (REG8(UART_BASE + UART_LSR) & UART_LSR_DR) + +#define WAIT_FOR_CHAR \ + do { \ + lsr = REG8(UART_BASE + UART_LSR); \ + } while ((lsr & UART_LSR_DR) != UART_LSR_DR) + +#define UART_TX_BUFF_LEN 32 +#define UART_TX_BUFF_MASK (UART_TX_BUFF_LEN -1) + +#define print_n(x) \ + { \ + uart_putc(s[((x) >> 28) & 0x0f]); \ + uart_putc(s[((x) >> 24) & 0x0f]); \ + uart_putc(s[((x) >> 20) & 0x0f]); \ + uart_putc(s[((x) >> 16) & 0x0f]); \ + uart_putc(s[((x) >> 12) & 0x0f]); \ + uart_putc(s[((x) >> 8) & 0x0f]); \ + uart_putc(s[((x) >> 4) & 0x0f]); \ + uart_putc(s[((x) >> 0) & 0x0f]); \ + } + +const char s[] = "0123456789abcdef"; + +void uart_init(void) +{ + int devisor; + + /* Reset receiver and transmiter */ + REG8(UART_BASE + UART_FCR) = UART_FCR_ENABLE_FIFO | UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT | UART_FCR_TRIGGER_14; + + /* Disable all interrupts */ + REG8(UART_BASE + UART_IER) = 0x00; + + /* Set 8 bit char, 1 stop bit, no parity */ + REG8(UART_BASE + UART_LCR) = UART_LCR_WLEN8 & ~(UART_LCR_STOP | UART_LCR_PARITY); + + /* Set baud rate */ + devisor = IN_CLK/(16 * UART_BAUD_RATE); + REG8(UART_BASE + UART_LCR) |= UART_LCR_DLAB; + REG8(UART_BASE + UART_DLL) = devisor & 0x000000ff; + REG8(UART_BASE + UART_DLM) = (devisor >> 8) & 0x000000ff; + REG8(UART_BASE + UART_LCR) &= ~(UART_LCR_DLAB); + + return; +} + +static inline void uart_putc(char c) +{ + unsigned char lsr; + + WAIT_FOR_THRE; + REG8(UART_BASE + UART_TX) = c; + if(c == '\n') { + WAIT_FOR_THRE; + REG8(UART_BASE + UART_TX) = '\r'; + } + WAIT_FOR_XMITR; +} + +static inline void print_str(char *str) +{ + while(*str != 0) { + uart_putc(*str); + str++; + } +} + +static inline char uart_getc() +{ + unsigned char lsr; + char c; + + WAIT_FOR_CHAR; + c = REG8(UART_BASE + UART_RX); + return c; +} +#endif + +extern void ic_enable(void); +extern void ic_disable(void); +extern void dc_enable(void); +extern void dc_disable(void); +extern void dc_inv(void); +extern unsigned long ic_inv_test(void); +extern unsigned long dc_inv_test(unsigned long); + +extern void (*jalr)(void); +extern void (*jr)(void); + +/* Index on jump table */ +unsigned long jump_indx; + +/* Jump address table */ +unsigned long jump_add[15*IC_WAYS]; + +void dummy(); + +void jump_and_link(void) +{ + asm("_jalr:"); + asm("l.jr\tr9"); + asm("l.nop"); +} + +void jump(void) +{ + asm("_jr:"); + /* Read and increment index */ + asm("l.lwz\t\tr3,0(r11)"); + asm("l.addi\t\tr3,r3,4"); + asm("l.sw\t\t0(r11),r3"); + /* Load next executin address from table */ + asm("l.lwz\t\tr3,0(r3)"); + /* Jump to that address */ + asm("l.jr\t\tr3") ; + /* Report that we succeeded */ + asm("l.nop\t0"); +} + +void copy_jr(unsigned long add) +{ + memcpy((void *)add, (void *)&jr, 24); +} + +void call(unsigned long add) +{ + asm("l.movhi\tr11,hi(_jump_indx)" : :); + asm("l.ori\tr11,r11,lo(_jump_indx)" : :); + asm("l.jalr\t\t%0" : : "r" (add) : "r11", "r9"); + asm("l.nop" : :); +} + +int dc_test(void) +{ + int i; + unsigned long base, add, ul; + + base = (((unsigned long)MEM_RAM / (IC_SETS*IC_BLOCK_SIZE)) * IC_SETS*IC_BLOCK_SIZE) + IC_SETS*IC_BLOCK_SIZE; + + dc_enable(); + + /* Cache miss r */ + add = base; + for(i = 0; i < DC_WAYS; i++) { + ul = REG32(add); + ul = REG32(add + DC_BLOCK_SIZE + 4); + ul = REG32(add + 2*DC_BLOCK_SIZE + 8); + ul = REG32(add + 3*DC_BLOCK_SIZE + 12); + add += DC_SETS*DC_BLOCK_SIZE; + } + + /* Cache hit w */ + add = base; + for(i = 0; i < DC_WAYS; i++) { + REG32(add + 0) = 0x00000001; + REG32(add + 4) = 0x00000000; + REG32(add + 8) = 0x00000000; + REG32(add + 12) = 0x00000000; + REG32(add + DC_BLOCK_SIZE + 0) = 0x00000000; + REG32(add + DC_BLOCK_SIZE + 4) = 0x00000002; + REG32(add + DC_BLOCK_SIZE + 8) = 0x00000000; + REG32(add + DC_BLOCK_SIZE + 12) = 0x00000000; + REG32(add + 2*DC_BLOCK_SIZE + 0) = 0x00000000; + REG32(add + 2*DC_BLOCK_SIZE + 4) = 0x00000000; + REG32(add + 2*DC_BLOCK_SIZE + 8) = 0x00000003; + REG32(add + 2*DC_BLOCK_SIZE + 12) = 0x00000000; + REG32(add + 3*DC_BLOCK_SIZE + 0) = 0x00000000; + REG32(add + 3*DC_BLOCK_SIZE + 4) = 0x00000000; + REG32(add + 3*DC_BLOCK_SIZE + 8) = 0x00000000; + REG32(add + 3*DC_BLOCK_SIZE + 12) = 0x00000004; + add += DC_SETS*DC_BLOCK_SIZE; + } + + /* Cache hit r/w */ + add = base; + for(i = 0; i < DC_WAYS; i++) { + REG8(add + DC_BLOCK_SIZE - 4) = REG8(add + 3); + REG8(add + 2*DC_BLOCK_SIZE - 8) = REG8(add + DC_BLOCK_SIZE + 7); + REG8(add + 3*DC_BLOCK_SIZE - 12) = REG8(add + 2*DC_BLOCK_SIZE + 11); + REG8(add + 4*DC_BLOCK_SIZE - 16) = REG8(add + 3*DC_BLOCK_SIZE + 15); + add += DC_SETS*DC_BLOCK_SIZE; + } + + /* Cache hit/miss r/w */ + add = base; + for(i = 0; i < DC_WAYS; i++) { + REG16(add + (IC_SETS - 1)*IC_BLOCK_SIZE) = REG16(add + DC_BLOCK_SIZE - 4) + REG16(add + 2); + REG16(add + (IC_SETS - 1)*IC_BLOCK_SIZE + 2) = REG16(add + DC_BLOCK_SIZE - 8) + REG16(add + DC_BLOCK_SIZE + 6); + REG16(add + (IC_SETS - 1)*IC_BLOCK_SIZE + 4) = REG16(add + DC_BLOCK_SIZE - 12) + REG16(add + 2*DC_BLOCK_SIZE + 10); + REG16(add + (IC_SETS - 1)*IC_BLOCK_SIZE + 6) = REG16(add+ DC_BLOCK_SIZE - 16) + REG16(add + 2*DC_BLOCK_SIZE + 14); + add += DC_SETS*DC_BLOCK_SIZE; + } + + /* Fill cache with unused data */ + add = base + DC_WAYS*DC_SETS*DC_BLOCK_SIZE; + for(i = 0; i < DC_WAYS; i++) { + ul = REG32(add); + ul = REG32(add + DC_BLOCK_SIZE); + ul = REG32(add + 2*DC_BLOCK_SIZE); + ul = REG32(add + 3*DC_BLOCK_SIZE); + add += DC_SETS*DC_BLOCK_SIZE; + } + + /* Cache hit/miss r */ + ul = 0; + add = base; + for(i = 0; i < DC_WAYS; i++) { + ul += REG16(add + (IC_SETS - 1)*IC_BLOCK_SIZE) + + REG16(add + DC_BLOCK_SIZE - 4) + + REG16(add + 2); + ul += REG16(add + (IC_SETS - 1)*IC_BLOCK_SIZE + 2) + + REG16(add + DC_BLOCK_SIZE - 8) + + REG16(add + DC_BLOCK_SIZE + 6); + ul += REG16(add + (IC_SETS - 1)*IC_BLOCK_SIZE + 4) + + REG16(add + DC_BLOCK_SIZE - 12) + + REG16(add + 2*DC_BLOCK_SIZE + 10); + ul += REG16(add + (IC_SETS - 1)*IC_BLOCK_SIZE + 6) + + REG16(add+ DC_BLOCK_SIZE - 16) + + REG16(add + 2*DC_BLOCK_SIZE + 14); + add += DC_SETS*DC_BLOCK_SIZE; + } + + dc_disable(); + + return ul; +} + +int ic_test(void) +{ + int i; + unsigned long base, add; + + base = (((unsigned long)MEM_RAM / (IC_SETS*IC_BLOCK_SIZE)) * IC_SETS*IC_BLOCK_SIZE) + IC_SETS*IC_BLOCK_SIZE; + + /* Copy jr to various location */ + add = base; + for(i = 0; i < IC_WAYS; i++) { + copy_jr(add); + copy_jr(add + 2*IC_BLOCK_SIZE + 4); + copy_jr(add + 4*IC_BLOCK_SIZE + 8); + copy_jr(add + 6*IC_BLOCK_SIZE + 12); + + copy_jr(add + (IC_SETS - 2)*IC_BLOCK_SIZE + 0); + copy_jr(add + (IC_SETS - 4)*IC_BLOCK_SIZE + 4); + copy_jr(add + (IC_SETS - 6)*IC_BLOCK_SIZE + 8); + copy_jr(add + (IC_SETS - 8)*IC_BLOCK_SIZE + 12); + add += IC_SETS*IC_BLOCK_SIZE; + } + + /* Load execution table which starts at address 4 (at address 0 is table index) */ + add = base; + for(i = 0; i < IC_WAYS; i++) { + /* Cache miss */ + jump_add[15*i + 0] = add + 2*IC_BLOCK_SIZE + 4; + jump_add[15*i + 1] = add + 4*IC_BLOCK_SIZE + 8; + jump_add[15*i + 2] = add + 6*IC_BLOCK_SIZE + 12; + /* Cache hit/miss */ + jump_add[15*i + 3] = add; + jump_add[15*i + 4] = add + (IC_SETS - 2)*IC_BLOCK_SIZE + 0; + jump_add[15*i + 5] = add + 2*IC_BLOCK_SIZE + 4; + jump_add[15*i + 6] = add + (IC_SETS - 4)*IC_BLOCK_SIZE + 4; + jump_add[15*i + 7] = add + 4*IC_BLOCK_SIZE + 8; + jump_add[15*i + 8] = add + (IC_SETS - 6)*IC_BLOCK_SIZE + 8; + jump_add[15*i + 9] = add + 6*IC_BLOCK_SIZE + 12; + jump_add[15*i + 10] = add + (IC_SETS - 8)*IC_BLOCK_SIZE + 12; + /* Cache hit */ + jump_add[15*i + 11] = add + (IC_SETS - 2)*IC_BLOCK_SIZE + 0; + jump_add[15*i + 12] = add + (IC_SETS - 4)*IC_BLOCK_SIZE + 4; + jump_add[15*i + 13] = add + (IC_SETS - 6)*IC_BLOCK_SIZE + 8; + jump_add[15*i + 14] = add + (IC_SETS - 8)*IC_BLOCK_SIZE + 12; + + add += IC_SETS*IC_BLOCK_SIZE; + } + + /* Go home */ + jump_add[15*i] = (unsigned long)&jalr; + + /* Initilalize table index */ + jump_indx = (unsigned long)&jump_add[0]; + + ic_enable(); + + /* Go */ + call(base); + + ic_disable(); + + return 0; +} + +int main(void) +{ + unsigned long rc, ret = 0; + +#ifdef UART + /* Initialize controller */ + uart_init(); +#endif + +#ifdef UART + print_str("DC test : "); +#endif + rc = dc_test(); + ret += rc; +#ifdef UART + print_n(rc+0xdeaddca1); + print_str("\n"); +#else + report(rc + 0xdeaddca1); +#endif + +#ifdef UART + print_str("DC invalidate test : "); +#endif + rc = dc_inv_test(MEM_RAM); + ret += rc; +#ifdef UART + print_n(rc + 0x9e8daa91); + print_str("\n"); +#else + report(rc + 0x9e8daa91); +#endif + +#ifdef UART + print_str("IC test : "); +#endif + rc = ic_test(); + ret += rc; +#ifdef UART + print_n(rc + 0xdeaddead); + print_str("\n"); +#else + report(rc + 0xdeaddead); +#endif + + +#ifdef UART + print_str("IC invalidate test : "); +#endif + ic_enable(); + rc = ic_inv_test(); + ret += rc; +#ifdef UART + print_n(rc + 0xdeadde8f); + print_str("\n"); + while(1); +#else + report(rc + 0xdeadde8f); +#endif + + + report(ret + 0x9e8da867); + exit(0); + + return 0; +} + +/* just for size calculation */ +void dummy() +{ +}
cache.c Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: except_mc.S =================================================================== --- except_mc.S (nonexistent) +++ except_mc.S (revision 1765) @@ -0,0 +1,397 @@ +/* Support file for c based tests */ +#include "spr_defs.h" + +#define reset _reset + + .section .stack + .space 0x1000 +_stack: + + .section .except + .extern _reset_support + .extern _c_reset + .extern _excpt_buserr + .extern _excpt_dpfault + .extern _excpt_ipfault + .extern _excpt_tick + .extern _excpt_align + .extern _excpt_illinsn + .extern _excpt_int + .extern _excpt_dtlbmiss + .extern _excpt_itlbmiss + .extern _excpt_range + .extern _excpt_syscall + .extern _excpt_break + .extern _excpt_trap + + + .org 0x100 +_reset_vector: + l.nop + l.nop + l.addi r4,r0,0x0 + l.addi r5,r0,0x0 + l.addi r6,r0,0x0 + l.addi r7,r0,0x0 + l.addi r8,r0,0x0 + l.addi r9,r0,0x0 + l.addi r10,r0,0x0 + l.addi r11,r0,0x0 + l.addi r12,r0,0x0 + l.addi r13,r0,0x0 + l.addi r14,r0,0x0 + l.addi r15,r0,0x0 + l.addi r16,r0,0x0 + l.addi r17,r0,0x0 + l.addi r18,r0,0x0 + l.addi r19,r0,0x0 + l.addi r20,r0,0x0 + l.addi r21,r0,0x0 + l.addi r22,r0,0x0 + l.addi r23,r0,0x0 + l.addi r24,r0,0x0 + l.addi r25,r0,0x0 + l.addi r26,r0,0x0 + l.addi r27,r0,0x0 + l.addi r28,r0,0x0 + l.addi r29,r0,0x0 + l.addi r30,r0,0x0 + l.addi r31,r0,0x0 + + l.j init_mc + l.nop + +start: l.movhi r1,hi(_stack) + l.ori r1,r1,lo(_stack) + + /* Check if this is RTL version */ + l.lbz r3,0(r0) + l.sfeqi r3,0xff + l.bf 2f + l.nop + l.movhi r3,hi(_src_beg) + l.ori r3,r3,lo(_src_beg) + 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 + + .org 0x200 +_buserr_vector: + l.addi r1,r1,-116 + l.sw 0x18(r1),r9 + l.jal store_regs + l.nop + l.movhi r9,hi(end_except) + l.ori r9,r9,lo(end_except) + l.movhi r10,hi(_excpt_buserr) + l.ori r10,r10,lo(_excpt_buserr) + l.lwz r10,0x0(r10) + l.jr r10 + l.nop + + .org 0x300 +_dpfault_vector: + l.addi r1,r1,-116 + l.sw 0x18(r1),r9 + l.jal store_regs + l.nop + + l.mfspr r3,r0,SPR_EPCR_BASE + l.addi r3,r3,-4 + l.mtspr r0,r3,SPR_EPCR_BASE + + l.movhi r9,hi(end_except) + l.ori r9,r9,lo(end_except) + l.movhi r10,hi(_excpt_dpfault) + l.ori r10,r10,lo(_excpt_dpfault) + l.lwz r10,0(r10) + l.jr r10 + l.nop + + .org 0x400 +_ipfault_vector: + l.addi r1,r1,-116 + l.sw 0x18(r1),r9 + l.jal store_regs + l.nop + l.movhi r9,hi(end_except) + l.ori r9,r9,lo(end_except) + l.movhi r10,hi(_excpt_ipfault) + l.ori r10,r10,lo(_excpt_ipfault) + l.lwz r10,0(r10) + l.jr r10 + l.nop + + .org 0x500 +_lpint_vector: + l.addi r1,r1,-116 + l.sw 0x18(r1),r9 + l.jal store_regs + l.nop + l.movhi r9,hi(end_except) + l.ori r9,r9,lo(end_except) + l.movhi r10,hi(_excpt_tick) + l.ori r10,r10,lo(_excpt_tick) + l.lwz r10,0(r10) + l.jr r10 + l.nop + + .org 0x600 +_align_vector: + l.addi r1,r1,-116 + l.sw 0x18(r1),r9 + l.jal store_regs + l.nop + l.movhi r9,hi(end_except) + l.ori r9,r9,lo(end_except) + l.movhi r10,hi(_excpt_align) + l.ori r10,r10,lo(_excpt_align) + l.lwz r10,0(r10) + l.jr r10 + l.nop + + .org 0x700 +_illinsn_vector: + l.addi r1,r1,-116 + l.sw 0x18(r1),r9 + l.jal store_regs + l.nop + l.movhi r9,hi(end_except) + l.ori r9,r9,lo(end_except) + l.movhi r10,hi(_excpt_illinsn) + l.ori r10,r10,lo(_excpt_illinsn) + l.lwz r10,0(r10) + l.jr r10 + l.nop + + .org 0x800 +_hpint_vector: + l.addi r1,r1,-116 + l.sw 0x18(r1),r9 + l.jal store_regs + l.nop + l.movhi r9,hi(end_except) + l.ori r9,r9,lo(end_except) + l.movhi r10,hi(_excpt_int) + l.ori r10,r10,lo(_excpt_int) + l.lwz r10,0(r10) + l.jr r10 + l.nop + + .org 0x900 +_dtlbmiss_vector: + l.addi r1,r1,-116 + l.sw 0x18(r1),r9 + l.jal store_regs + l.nop + + l.mfspr r3,r0,SPR_EPCR_BASE + l.addi r3,r3,-4 + l.mtspr r0,r3,SPR_EPCR_BASE + + l.movhi r9,hi(end_except) + l.ori r9,r9,lo(end_except) + l.movhi r10,hi(_excpt_dtlbmiss) + l.ori r10,r10,lo(_excpt_dtlbmiss) + l.lwz r10,0(r10) + l.jr r10 + l.nop + + .org 0xa00 +_itlbmiss_vector: + l.addi r1,r1,-116 + l.sw 0x18(r1),r9 + l.jal store_regs + l.nop + l.movhi r9,hi(end_except) + l.ori r9,r9,lo(end_except) + l.movhi r10,hi(_excpt_itlbmiss) + l.ori r10,r10,lo(_excpt_itlbmiss) + l.lwz r10,0(r10) + l.jr r10 + l.nop + + .org 0xb00 +_range_vector: + l.addi r1,r1,-116 + l.sw 0x18(r1),r9 + l.jal store_regs + l.nop + l.movhi r9,hi(end_except) + l.ori r9,r9,lo(end_except) + l.movhi r10,hi(_excpt_range) + l.ori r10,r10,lo(_excpt_range) + l.lwz r10,0(r10) + l.jr r10 + l.nop + + .org 0xc00 +_syscall_vector: + l.addi r1,r1,-116 + l.sw 0x18(r1),r9 + l.jal store_regs + l.nop + l.movhi r9,hi(end_except) + l.ori r9,r9,lo(end_except) + l.movhi r10,hi(_excpt_syscall) + l.ori r10,r10,lo(_excpt_syscall) + l.lwz r10,0(r10) + l.jr r10 + l.nop + + .org 0xd00 +_break_vector: + l.addi r1,r1,-116 + l.sw 0x18(r1),r9 + l.jal store_regs + l.nop + l.movhi r9,hi(end_except) + l.ori r9,r9,lo(end_except) + l.movhi r10,hi(_excpt_break) + l.ori r10,r10,lo(_excpt_break) + l.lwz r10,0(r10) + l.jr r10 + l.nop + + .org 0xe00 +_trap_vector: + l.addi r1,r1,-116 + l.sw 0x18(r1),r9 + l.jal store_regs + l.nop + l.movhi r9,hi(end_except) + l.ori r9,r9,lo(end_except) + l.movhi r10,hi(_excpt_trap) + l.ori r10,r10,lo(_excpt_trap) + l.lwz r10,0(r10) + l.jr r10 + l.nop + +store_regs: + l.sw 0x00(r1),r3 + l.sw 0x04(r1),r4 + l.sw 0x08(r1),r5 + l.sw 0x0c(r1),r6 + l.sw 0x10(r1),r7 + l.sw 0x14(r1),r8 + l.sw 0x1c(r1),r10 + l.sw 0x20(r1),r11 + l.sw 0x24(r1),r12 + l.sw 0x28(r1),r13 + l.sw 0x2c(r1),r14 + l.sw 0x30(r1),r15 + l.sw 0x34(r1),r16 + l.sw 0x38(r1),r17 + l.sw 0x3c(r1),r18 + l.sw 0x40(r1),r19 + l.sw 0x44(r1),r20 + l.sw 0x48(r1),r21 + l.sw 0x4c(r1),r22 + l.sw 0x50(r1),r23 + l.sw 0x54(r1),r24 + l.sw 0x58(r1),r25 + l.sw 0x5c(r1),r26 + l.sw 0x60(r1),r27 + l.sw 0x64(r1),r28 + l.sw 0x68(r1),r29 + l.sw 0x6c(r1),r30 + l.sw 0x70(r1),r31 + l.jr r9 + l.nop + +end_except: + l.lwz r3,0x00(r1) + l.lwz r4,0x04(r1) + l.lwz r5,0x08(r1) + l.lwz r6,0x0c(r1) + l.lwz r7,0x10(r1) + l.lwz r8,0x14(r1) + l.lwz r9,0x18(r1) + l.lwz r10,0x1c(r1) + l.lwz r11,0x20(r1) + l.lwz r12,0x24(r1) + l.lwz r13,0x28(r1) + l.lwz r14,0x2c(r1) + l.lwz r15,0x30(r1) + l.lwz r16,0x34(r1) + l.lwz r17,0x38(r1) + l.lwz r18,0x3c(r1) + l.lwz r19,0x40(r1) + l.lwz r20,0x44(r1) + l.lwz r21,0x48(r1) + l.lwz r22,0x4c(r1) + l.lwz r23,0x50(r1) + l.lwz r24,0x54(r1) + l.lwz r25,0x58(r1) + l.lwz r26,0x5c(r1) + l.lwz r27,0x60(r1) + l.lwz r28,0x64(r1) + l.lwz r29,0x68(r1) + l.lwz r30,0x6c(r1) + l.lwz r31,0x70(r1) + l.addi r1,r1,116 + l.rfe + l.nop + +init_mc: + l.movhi r0, 0x0 + l.slli r0,r0,16 + +/* Set speed of FLASH access */ +/* TMS[0] = 0x00000210 */ +/* TMS address = 0x60000014 */ + l.ori r2,r0,0x020a + l.movhi r3, 0x6000 + l.ori r1,r3,0x0014 + l.sw 0(r1),r2 + +/* Set SDRAM parameters for CS1 */ +/* old TMS[1] (*6000001c) = 0xfffff020 */ +/* old CSC[1] (*60000018) = 0x00200611 */ +/* CSR (*60000000) = 0x60300300 */ +/* BA_MASK (*60000008) = 0x000000f0 */ + +/* TMS[1] (*6000001c) = 0xfffff023 */ +/* CSC[1] (*60000018) = 0x00200491 */ + l.movhi r2,0x6030 + l.ori r2,r2,0x0300 + l.ori r1,r3,0x0000 + l.sw 0(r1),r2 + l.movhi r2,0x0000 + l.ori r2,r2,0x00f0 + l.ori r1,r3,0x0008 + l.sw 0(r1),r2 + l.movhi r2,0x0724 + l.ori r2,r2,0x8230 + l.ori r1,r3,0x001c + l.sw 0(r1),r2 + l.movhi r2,0x0020 + l.ori r2,r2,0x0411 + l.ori r1,r3,0x0018 + l.sw 0(r1),r2 + l.xor r0,r0,r0 + l.xor r1,r1,r1 + l.xor r2,r2,r2 + l.xor r3,r3,r3 + l.j start + l.nop
except_mc.S Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: inst_set_test.c =================================================================== --- inst_set_test.c (nonexistent) +++ inst_set_test.c (revision 1765) @@ -0,0 +1,268 @@ +/* This is a complex instruction test for OR1200 */ +/* trap, movhi, mul, nop, rfe, sys instructions not tested*/ + +#include "support.h" + +volatile unsigned long test = 0xdeaddead; + +#define TEST_32(c1,c2,val1,val2,op) \ + test ^= ((c1##(val1)) op (c2##(val2))); test ^= ((c1##(val2)) op (c2##(val1)));\ + test ^= ((c1##(val1)) op (c2##(val2))); test ^= ((c1##(val2)) op (c2##(val1)));\ + test ^= ((c1##(val1)) op (c2##(val2))); test ^= ((c1##(val2)) op (c2##(val1)));\ + test ^= ((c1##(val1)) op (c2##(val2))); test ^= ((c1##(val2)) op (c2##(val1)));\ + test ^= ((c1##(val1)) op (c2##(val2))); test ^= ((c1##(val2)) op (c2##(val1)));\ + test ^= ((c1##(val1)) op (c2##(val2))); test ^= ((c1##(val2)) op (c2##(val1)));\ + test ^= ((c1##(val1)) op (c2##(val2))); test ^= ((c1##(val2)) op (c2##(val1)));\ + test ^= ((c1##(val1)) op (c2##(val2))); test ^= ((c1##(val2)) op (c2##(val1)));\ + +#define TEST_CASTS(val1,val2,op)\ + TEST_32((unsigned long), (unsigned long), val1, val2, op);\ + TEST_32((unsigned long), (signed long), val1, val2, op);\ + TEST_32((unsigned long), (unsigned short), val1, val2, op);\ + TEST_32((unsigned long), (signed short), val1, val2, op);\ + TEST_32((unsigned long), (unsigned char), val1, val2, op);\ + TEST_32((unsigned long), (signed char), val1, val2, op);\ + \ + TEST_32((unsigned short), (unsigned long), val1, val2, op);\ + TEST_32((unsigned short), (signed long), val1, val2, op);\ + TEST_32((unsigned short), (unsigned short), val1, val2, op);\ + TEST_32((unsigned short), (signed short), val1, val2, op);\ + TEST_32((unsigned short), (unsigned char), val1, val2, op);\ + TEST_32((unsigned short), (signed char), val1, val2, op);\ + \ + TEST_32((unsigned char), (unsigned long), val1, val2, op);\ + TEST_32((unsigned char), (signed long), val1, val2, op);\ + TEST_32((unsigned char), (unsigned short), val1, val2, op);\ + TEST_32((unsigned char), (signed short), val1, val2, op)\ + TEST_32((unsigned char), (unsigned char), val1, val2, op);\ + TEST_32((unsigned char), (signed char), val1, val2, op); + + +void add_test () +{ + int i, j; + TEST_CASTS(0x12345678, 0x12345678, +); + TEST_CASTS(0x12345678, 0x87654321, +); + TEST_CASTS(0x87654321, 0x12345678, +); + TEST_CASTS(0x87654321, 0x87654321, +); + + TEST_CASTS(0x1234, -0x1234, +); + TEST_CASTS(0x1234, -0x1234, +); + TEST_CASTS(-0x1234, 0x1234, +); + TEST_CASTS(-0x1234, -0x1234, +); + + for (i = -1; i <= 1; i++) + for (j = -1; j <= 1; j++) + TEST_CASTS (i, j, +); + report (test); +} + +void and_test () +{ +/* TEST_CASTS(0x12345678, 0x12345678, &); + TEST_CASTS(0x12345678, 0x87654321, &); + TEST_CASTS(0x87654321, 0x12345678, &); + TEST_CASTS(0x87654321, 0x87654321, &); + + TEST_CASTS(0x12345678, 0x0, &); + TEST_CASTS(0x12345678, 0xffffffff, &); + TEST_CASTS(0x87654321, 0x80000000, &); + TEST_CASTS(0x87654321, 0x08000000, &); + + TEST_CASTS(0x12345678, 0x12345678, &&); + TEST_CASTS(0x12345678, 0x87654321, &&); + TEST_CASTS(0x87654321, 0x12345678, &&); + TEST_CASTS(0x87654321, 0x87654321, &&); + + TEST_CASTS(0x12345678, 0x0, &&); + TEST_CASTS(0x12345678, 0xffffffff, &&); + TEST_CASTS(0x87654321, 0x80000000, &&); + TEST_CASTS(0x87654321, 0x08000000, &&); + report (test);*/ +} + +void branch_test () +{ + /* bf, bnf, j, jal, jalr, jr, sfeq, sfges, sfgeu, sfgts, sfgtu, sfles, sfleu, sflts, sfltu, sfne */ + report (test); +} + +void load_store_test () +{ + volatile long a; + volatile short b; + volatile char c; + unsigned long *pa = (unsigned long *)&a; + unsigned short *pb = (unsigned short *)&b; + unsigned char *pc = (unsigned char *)&c; + + test ^= a = 0xdeadbeef; + test ^= b = 0x12345678; + test ^= c = 0x87654321; + test ^= a = b; + test ^= b = c; + test ^= a; + test ^= (unsigned long)a; + test ^= (unsigned short)a; + test ^= (unsigned char)a; + + test ^= (unsigned long)b; + test ^= (unsigned short)b; + test ^= (unsigned char)b; + + test ^= (unsigned long)c; + test ^= (unsigned short)c; + test ^= (unsigned char)c; + + test ^= *pa = 0xabcdef12; + test ^= *pb = 0x12345678; + test ^= *pc = 0xdeadbeef; + + test ^= (signed long)c; + test ^= (signed short)c; + test ^= (signed char)c; + + test ^= (signed long)a; + test ^= (signed short)a; + test ^= (signed char)a; + + test ^= (signed long)b; + test ^= (signed short)b; + test ^= (signed char)b; + + test ^= *pa = 0xaabbccdd; + test ^= *pb = 0x56789012; + test ^= *pc = 0xb055b055; + + test ^= (unsigned long)b; + test ^= (signed long)c; + test ^= (unsigned long)a; + test ^= (unsigned short)c; + test ^= (unsigned short)a; + test ^= (unsigned char)c; + test ^= (unsigned short)b; + test ^= (unsigned char)b; + test ^= (unsigned char)a; + report (test); +} + +void or_test () +{ +/* TEST_CASTS(0x12345678, 0x12345678, |); + TEST_CASTS(0x12345678, 0x87654321, |); + TEST_CASTS(0x87654321, 0x12345678, |); + TEST_CASTS(0x87654321, 0x87654321, |); + + TEST_CASTS(0x12345678, 0x0, |); + TEST_CASTS(0x12345678, 0xffffffff, |); + TEST_CASTS(0x87654321, 0x80000000, |); + TEST_CASTS(0x87654321, 0x08000000, |); + + TEST_CASTS(0x12345678, 0x12345678, ||); + TEST_CASTS(0x12345678, 0x87654321, ||); + TEST_CASTS(0x87654321, 0x12345678, ||); + TEST_CASTS(0x87654321, 0x87654321, ||); + + TEST_CASTS(0x12345678, 0x0, ||); + TEST_CASTS(0x12345678, 0xffffffff, ||); + TEST_CASTS(0x87654321, 0x80000000, ||); + TEST_CASTS(0x87654321, 0x08000000, ||);*/ + report (test); +} + +void xor_test () +{ +/* TEST_CASTS(0x12345678, 0x12345678, ^); + TEST_CASTS(0x12345678, 0x87654321, ^); + TEST_CASTS(0x87654321, 0x12345678, ^); + TEST_CASTS(0x87654321, 0x87654321, ^); + + TEST_CASTS(0x12345678, 0x0, ^); + TEST_CASTS(0x12345678, 0xffffffff, ^); + TEST_CASTS(0x87654321, 0x80000000, ^); + TEST_CASTS(0x87654321, 0x08000000, ^);*/ + report (test); +} + +void sll_test () +{ + int i; + for (i = -1; i < 40; i++) + TEST_CASTS(0xdeaf1234, i, <<); + for (i = -1; i < 33; i++) + TEST_CASTS(0x12345678, i, <<); + for (i = -1; i < 33; i++) + TEST_CASTS(0xdea12345, i, <<); + + test ^= (unsigned long)0xabcd4321 << test; + test ^= (signed long)0xabcd4321 << test; + test ^= (unsigned long)0xabcd << test; + test ^= (signed long)0xabcd << test; + report (test); +} + +void srl_sra_test () +{ + int i; + for (i = -1; i < 40; i++) + TEST_CASTS(0xdeaf1234, i, >>); + for (i = -1; i < 33; i++) + TEST_CASTS(0x12345678, i, >>); + for (i = -1; i < 33; i++) + TEST_CASTS(0xdea12345, i, >>); + + test ^= (unsigned long)0xabcd4321 >> test; + test ^= (signed long)0xabcd4321 >> test; + test ^= (unsigned long)0xabcd >> test; + test ^= (signed long)0xabcd >> test; + report (test); +} + + +void ror_test () +{ + unsigned long a; + int i; + for (i = -1; i < 40; i++) { + asm ("l.ror %0, %1, %2" : "=r" (a) : "r" (0x12345678), "r" (i)); + test ^= a; + asm ("l.ror %0, %1, %2" : "=r" (a) : "r" (0xabcdef), "r" (i)); + test ^= a; + } + asm ("l.ror %0, %1, %2" : "=r" (a) : "r" (0x12345678), "r" (0x12345678)); + test ^= a; + report (test); +} + +void sub_test () +{ +/* int i, j; + TEST_CASTS(0x12345678, 0x12345678, -); + TEST_CASTS(0x12345678, 0x87654321, -); + TEST_CASTS(0x87654321, 0x12345678, -); + TEST_CASTS(0x87654321, 0x87654321, -); + + TEST_CASTS(0x1234, -0x1234, -); + TEST_CASTS(0x1234, -0x1234, -); + TEST_CASTS(-0x1234, 0x1234, -); + TEST_CASTS(-0x1234, -0x1234, -); + + for (i = -1; i <= 1; i++) + for (j = -1; j <= 1; j++) + TEST_CASTS (i, j, -); + report (test);*/ +} + +int main () +{ + add_test (); + and_test (); + branch_test (); + load_store_test (); + or_test (); + sll_test (); + srl_sra_test (); + xor_test (); + sub_test (); + return 0; +}
inst_set_test.c Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: mc_sync.h =================================================================== --- mc_sync.h (nonexistent) +++ mc_sync.h (revision 1765) @@ -0,0 +1,76 @@ +/* mc_sync.h - Memory Controller testbench SYNCdevices defines + 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. +*/ + +#ifndef __MC_SYNC_H +#define __MC_SYNC_H + +/* should configuration be read from MC? */ +#define MC_READ_CONF + +/* TEMPLATE SELECTION */ +/* change #undef to #define */ +#define _MC_TEST_TEMPLATE1 +#undef _MC_TEST_TEMPLATE2 +#undef _MC_TEST_TEMPLATE3 +/* ------------------------ */ + +/* memory configuration that must reflect mcmem.cfg */ +#define MC_SYNC_CSMASK 0xFE /* 8 bit mask for 8 chip selects. 1 ASYNC at CS, 0 something else at CS */ + +typedef struct MC_SYNC_CS +{ + unsigned long M; +} MC_SYNC_CS; + +MC_SYNC_CS mc_sync_cs[8] = { + { 0x02 /* SELect mask */ + }, + { 0x04 }, + { 0x06 }, + { 0x08 }, + { 0x0A }, + { 0x0C }, + { 0x0E }, + { 0x10 } }; + + +#define MC_SYNC_TEST0 0x00000001LU /* no parity, bank after column, write enable */ +#define MC_SYNC_TEST1 0x00000002LU /* parity */ +#define MC_SYNC_TEST2 0x00000004LU /* bank after row */ +#define MC_SYNC_TEST3 0x00000008LU /* RO */ +#define MC_SYNC_TEST4 0x00000010LU /* - NOT DEFINED - */ + +#ifdef _MC_TEST_TEMPLATE1 + #define MC_SYNC_FLAGS 0x000002B4LU /* MC_TEST_ flags... see mc_common.h */ + #define MC_SYNC_TESTS 0x00000005LU +#endif + +#ifdef _MC_TEST_TEMPLATE2 + #define MC_SYNC_FLAGS 0x00000128LU /* MC_TEST_ flags... see mc_common.h */ + #define MC_SYNC_TESTS 0x00000008LU +#endif + +#ifdef _MC_TEST_TEMPLATE3 + #define MC_SYNC_FLAGS 0x000007FFLU /* MC_TEST_ flags... see mc_common.h */ + #define MC_SYNC_TESTS 0x0000000FLU +#endif + + +#endif Index: mc_async.h =================================================================== --- mc_async.h (nonexistent) +++ mc_async.h (revision 1765) @@ -0,0 +1,76 @@ +/* mc_async.h - Memory Controller testbench ASYNCdevices defines + 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. +*/ + +#ifndef __MC_ASYNC_H +#define __MC_ASYNC_H + +/* should configuration be readm from MC? */ +#define MC_READ_CONF + +/* TEMPLATE SELECTION */ +/* change #undef to #define */ +#define _MC_TEST_TEMPLATE1 +#undef _MC_TEST_TEMPLATE2 +#undef _MC_TEST_TEMPLATE3 +/* ------------------------ */ + +/* memory configuration that must reflect mcmem.cfg */ +#define MC_ASYNC_CSMASK 0xFE /* 8 bit mask for 8 chip selects. 1 ASYNC at CS, 0 something else at CS */ + +typedef struct MC_ASYNC_CS +{ + unsigned long BW; + unsigned long M; +} MC_ASYNC_CS; + +MC_ASYNC_CS mc_async_cs[8] = { + { 2, /* Bus Width : 0 - 8bit, 1 - 16bit, 2 - 32bit */ + 0x02 /* SELect mask */ + }, + { 2, 0x04 }, + { 2, 0x06 }, + { 2, 0x08 }, + { 2, 0x0A }, + { 2, 0x0C }, + { 2, 0x0E }, + { 2, 0x10 } }; + +#define MC_ASYNC_TEST0 0x00000001LU /* no parity, bank after column, write enable */ +#define MC_ASYNC_TEST1 0x00000002LU /* parity */ +#define MC_ASYNC_TEST2 0x00000004LU /* bank after row */ +#define MC_ASYNC_TEST3 0x00000008LU /* RO */ +#define MC_ASYNC_TEST4 0x00000010LU /* - NOT DEFINED - */ + +#ifdef _MC_TEST_TEMPLATE1 + #define MC_ASYNC_FLAGS 0x000002B4LU /* MC_TEST_ flags... see mc_common.h */ + #define MC_ASYNC_TESTS 0x0000000FLU +#endif + +#ifdef _MC_TEST_TEMPLATE2 + #define MC_ASYNC_FLAGS 0x00000128LU /* MC_TEST_ flags... see mc_common.h */ + #define MC_ASYNC_TESTS 0x00000008LU +#endif + +#ifdef _MC_TEST_TEMPLATE3 + #define MC_ASYNC_FLAGS 0x000007FFLU /* MC_TEST_ flags... see mc_common.h */ + #define MC_ASYNC_TESTS 0x0000000FLU +#endif + +#endif Index: mc_dram.h =================================================================== --- mc_dram.h (nonexistent) +++ mc_dram.h (revision 1765) @@ -0,0 +1,188 @@ +/* mc_dram.h - Memory Controller testbench SDRAM defines + 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. +*/ + +#ifndef __MC_DRAM_H +#define __MC_DRAM_H + +/* should configuration be read from MC? */ +#define MC_READ_CONF + +/* TEMPLATE SELECTION */ +/* change #undef to #define */ +#undef _MC_TEST_TEMPLATE1 +#define _MC_TEST_TEMPLATE2 +#undef _MC_TEST_TEMPLATE3 +/* ------------------------ */ + + +/* memory configuration that must reflect sim.cfg */ +#define MC_SDRAM_CSMASK 0x02 /* 8 bit mask for 8 chip selects. 1 SDRAM at CS, 0 something else at CS */ + /* bits: CS7|CS6|CS5|CS4|CS3|CS2|CS1|CS0 */ +typedef struct MC_SDRAM_CS +{ + unsigned long BW; + unsigned long MS; + unsigned long M; +} MC_SDRAM_CS; + +MC_SDRAM_CS mc_sdram_cs[8] = { + { 2, /* Bus Width : 0 - 8bit, 1 - 16bit, 2 - 32bit */ + 2, /* Memory Size : 0 - 64Mbit, 1 - 128Mbit, 2 - 256Mbit */ + 0x20 /* SELect mask */ + }, + { 1, 0, 0x20 }, + { 2, 0, 0x06 }, + { 2, 0, 0x08 }, + { 2, 0, 0x0A }, + { 2, 0, 0x0C }, + { 2, 0, 0x0E }, + { 2, 0, 0x10 } }; + +/* SDRAM configuration tests flag defines */ +#define MC_SDRAM_TEST0 0x00000001LU /*no parity, close row, BankAfterCol, R/W, single loc, seq. burst 1 */ +#define MC_SDRAM_TEST1 0x00000002LU /*parity enabled*/ +#define MC_SDRAM_TEST2 0x00000004LU /*keep row*/ +#define MC_SDRAM_TEST3 0x00000008LU /*BankAfterRow*/ +#define MC_SDRAM_TEST4 0x00000010LU /*RO*/ +#define MC_SDRAM_TEST5 0x00000020LU /*prog. burst 1*/ +#define MC_SDRAM_TEST6 0x00000040LU /* -||- 2*/ +#define MC_SDRAM_TEST7 0x00000080LU /* -||- 4*/ +#define MC_SDRAM_TEST8 0x00000100LU /* -||- 8*/ +#define MC_SDRAM_TEST9 0x00000200LU /* -||- fullpage*/ +#define MC_SDRAM_TEST10 0x00000400LU /*prog. burst int. 1*/ +#define MC_SDRAM_TEST11 0x00000800LU /* -||- 2*/ +#define MC_SDRAM_TEST12 0x00001000LU /* -||- 4*/ +#define MC_SDRAM_TEST13 0x00002000LU /* -||- 8*/ +#define MC_SDRAM_TEST14 0x00004000LU /* -||- fullpage*/ +#define MC_SDRAM_TEST15 0x00008000LU /*prog. burst int. fullpage, keep row*/ +#define MC_SDRAM_TEST16 0x00010000LU /* NOT DEFINED */ + +/* test type flag defines */ +#define MC_SDRAM_SROW 0x00000001LU /* perform sequential row access test */ +#define MC_SDRAM_RROW 0x00000010LU /* perform random row access test */ +#define MC_SDRAM_SGRP 0x00000100LU /* perform sequential row-group access test */ +#define MC_SDRAM_RGRP 0x00001000LU /* perform random row-group access test */ + +#define MC_SDRAM_ROWSH_0 16 +#define MC_SDRAM_ROWSH_1 16 +#define MC_SDRAM_ROWSH_2 15 +#define MC_SDRAM_ROWSH_3 16 +#define MC_SDRAM_ROWSH_4 16 +#define MC_SDRAM_ROWSH_5 16 +#define MC_SDRAM_ROWSH_6 17 +#define MC_SDRAM_ROWSH_7 17 +#define MC_SDRAM_ROWSH_8 17 + + +/* TEMPLATE 1 */ +#ifdef _MC_TEST_TEMPLATE1 + #define MC_SDRAM_FLAGS 0x000004A8LU /* MC_TEST_ flags... see mc_common.h */ + #define MC_SDRAM_TESTS 0x00000001LU /* mask for SDRAM configuration, see conf. test flag defines */ + #define MC_SDRAM_ACC 0x00001010LU /* mask for test types */ + + /* memory sizes*/ + #define MC_SDRAM_GROUPSIZE 5 + /* MAX */ + #define MC_SDRAM_ROWSIZE_0 8/* 16 * 1024 * 4 */ + #define MC_SDRAM_ROWSIZE_1 8/* 16 * 1024 * 4 */ + #define MC_SDRAM_ROWSIZE_2 8/* 8 * 1024 * 4 */ + #define MC_SDRAM_ROWSIZE_3 8/* 16 * 1024 * 4 */ + #define MC_SDRAM_ROWSIZE_4 8/* 16 * 1024 * 4 */ + #define MC_SDRAM_ROWSIZE_5 8/* 16 * 1024 * 4 */ + #define MC_SDRAM_ROWSIZE_6 8/* 32 * 1024 * 4 */ + #define MC_SDRAM_ROWSIZE_7 8/* 32 * 1024 * 4 */ + #define MC_SDRAM_ROWSIZE_8 8/* 32 * 1024 * 4 */ + /* MAX */ + #define MC_SDRAM_ROWS_0 25/* 512 */ + #define MC_SDRAM_ROWS_1 25/* 256 */ + #define MC_SDRAM_ROWS_2 25/* 256 */ + #define MC_SDRAM_ROWS_3 25/* 1024 */ + #define MC_SDRAM_ROWS_4 25/* 512 */ + #define MC_SDRAM_ROWS_5 25/* 256 */ + #define MC_SDRAM_ROWS_6 25/* 1024 */ + #define MC_SDRAM_ROWS_7 25/* 512 */ + #define MC_SDRAM_ROWS_8 25/* 256 */ + + #define MC_SDRAM_ROW_OFF 5 +#endif /*_MC_TEST_TEMPLATE1*/ + +/* TEMPLATE 2 */ +#ifdef _MC_TEST_TEMPLATE2 + #define MC_SDRAM_FLAGS 0x000004A8LU /* MC_TEST_ flags... see mc_common.h */ + #define MC_SDRAM_TESTS 0x00000001LU /* mask for SDRAM configuration, see conf. test flag defines */ + #define MC_SDRAM_ACC 0x00001010LU /* mask for test types */ + + /* memory sizes*/ + #define MC_SDRAM_GROUPSIZE 5 + + #define MC_SDRAM_ROWSIZE_0 16 * 1024 * 4 + #define MC_SDRAM_ROWSIZE_1 16 * 1024 * 4 + #define MC_SDRAM_ROWSIZE_2 8 * 1024 * 4 + #define MC_SDRAM_ROWSIZE_3 16 * 1024 * 4 + #define MC_SDRAM_ROWSIZE_4 16 * 1024 * 4 + #define MC_SDRAM_ROWSIZE_5 16 * 1024 * 4 + #define MC_SDRAM_ROWSIZE_6 32 * 1024 * 4 + #define MC_SDRAM_ROWSIZE_7 32 * 1024 * 4 + #define MC_SDRAM_ROWSIZE_8 32 * 1024 * 4 + + #define MC_SDRAM_ROWS_0 512 + #define MC_SDRAM_ROWS_1 256 + #define MC_SDRAM_ROWS_2 256 + #define MC_SDRAM_ROWS_3 1024 + #define MC_SDRAM_ROWS_4 512 + #define MC_SDRAM_ROWS_5 256 + #define MC_SDRAM_ROWS_6 1024 + #define MC_SDRAM_ROWS_7 512 + #define MC_SDRAM_ROWS_8 256 + +#endif /*_MC_TEST_TEMPLATE2*/ + +/* TEMPLATE 3 */ +#ifdef _MC_TEST_TEMPLATE3 + #define MC_SDRAM_FLAGS 0x000004A8LU /* MC_TEST_ flags... see mc_common.h */ + #define MC_SDRAM_TESTS 0x00000001LU /* mask for SDRAM configuration, see conf. test flag defines */ + #define MC_SDRAM_ACC 0x00001010LU /* mask for test types */ + + /* memory sizes*/ + #define MC_SDRAM_GROUPSIZE 5 + /* MAX */ + #define MC_SDRAM_ROWSIZE_0 16 * 1024 * 4 + #define MC_SDRAM_ROWSIZE_1 16 * 1024 * 4 + #define MC_SDRAM_ROWSIZE_2 8 * 1024 * 4 + #define MC_SDRAM_ROWSIZE_3 16 * 1024 * 4 + #define MC_SDRAM_ROWSIZE_4 16 * 1024 * 4 + #define MC_SDRAM_ROWSIZE_5 16 * 1024 * 4 + #define MC_SDRAM_ROWSIZE_6 32 * 1024 * 4 + #define MC_SDRAM_ROWSIZE_7 32 * 1024 * 4 + #define MC_SDRAM_ROWSIZE_8 32 * 1024 * 4 + /* MAX */ + #define MC_SDRAM_ROWS_0 10/* 512 */ + #define MC_SDRAM_ROWS_1 10/* 256 */ + #define MC_SDRAM_ROWS_2 10/* 256 */ + #define MC_SDRAM_ROWS_3 10/* 1024 */ + #define MC_SDRAM_ROWS_4 10/* 512 */ + #define MC_SDRAM_ROWS_5 10/* 256 */ + #define MC_SDRAM_ROWS_6 10/* 1024 */ + #define MC_SDRAM_ROWS_7 10/* 512 */ + #define MC_SDRAM_ROWS_8 10/* 256 */ + +#endif /*_MC_TEST_TEMPLATE3*/ + +#endif Index: mc_ssram.h =================================================================== --- mc_ssram.h (nonexistent) +++ mc_ssram.h (revision 1765) @@ -0,0 +1,75 @@ +/* mc_ssram.h - Memory Controller testbench SSRAM defines + 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. +*/ + +#ifndef __MC_SSRAM_H +#define __MC_SSRAM_H + +/* should configuration be read form MC? */ +#define MC_READ_CONF + +/* TEMPLATE SELECTION */ +/* change #undef to #define */ +#define _MC_TEST_TEMPLATE1 +#undef _MC_TEST_TEMPLATE2 +#undef _MC_TEST_TEMPLATE3 +/* ------------------------ */ + +/* memory configuration that must reflect mcmem.cfg */ +#define MC_SSRAM_CSMASK 0xFE /* 8 bit mask for 8 chip selects. 1 SSRAM at CS, 0 something else at CS */ + +typedef struct MC_SSRAM_CS +{ + unsigned long M; +} MC_SSRAM_CS; + +MC_SSRAM_CS mc_ssram_cs[8] = { + { 0x02 /* SELect mask */ + }, + { 0x04 }, + { 0x06 }, + { 0x08 }, + { 0x0A }, + { 0x0C }, + { 0x0E }, + { 0x10 } }; + +#define MC_SSRAM_TEST0 0x00000001LU /* no parity, bank after column, write enable */ +#define MC_SSRAM_TEST1 0x00000002LU /* parity */ +#define MC_SSRAM_TEST2 0x00000004LU /* bank after row */ +#define MC_SSRAM_TEST3 0x00000008LU /* RO */ +#define MC_SSRAM_TEST4 0x00000010LU /* - NOT DEFINED - */ +#define MC_SSRAM_TEST5 0x00000020LU /* - NOT DEFINED - */ + +#ifdef _MC_TEST_TEMPLATE1 + #define MC_SSRAM_FLAGS 0x000002B8LU /* MC_TEST_ flags... see mc_common.h */ + #define MC_SSRAM_TESTS 0x00000005LU +#endif + +#ifdef _MC_TEST_TEMPLATE2 + #define MC_SSRAM_FLAGS 0x00000128LU /* MC_TEST_ flags... see mc_common.h */ + #define MC_SSRAM_TESTS 0x00000008LU +#endif + +#ifdef _MC_TEST_TEMPLATE3 + #define MC_SSRAM_FLAGS 0x000007FFLU /* MC_TEST_ flags... see mc_common.h */ + #define MC_SSRAM_TESTS 0x0000003FLU +#endif + +#endif Index: mem_test.c =================================================================== --- mem_test.c (nonexistent) +++ mem_test.c (revision 1765) @@ -0,0 +1,72 @@ +/* Simple test, which tests whether memory accesses are performed correctly. + WARNING: Requires big endian host!!! */ + +#include "support.h" + +unsigned long _ul, *pul; +unsigned short *pus; +unsigned char *puc; + +int main () +{ + unsigned long cnt = 0; + _ul = 0x12345678; + pul = &_ul; + report (*pul); + cnt = (cnt + *pul) << 1; + + pus = (unsigned short *)&_ul; + report (*pus); + cnt = (cnt + *pus) << 1; + pus++; + report (*pus); + cnt = (cnt + *pus) << 1; + + puc = (unsigned char *)&_ul; + report (*puc); + cnt = (cnt + *puc) << 1; + puc++; + report (*puc); + cnt = (cnt + *puc) << 1; + puc++; + report (*puc); + cnt = (cnt + *puc) << 1; + puc++; + report (*puc); + cnt = (cnt + *puc) << 1; + + *pul = 0xdeaddead; + report (*pul); + cnt = (cnt + *pul) << 1; + + pus = (unsigned short *)&_ul; + *pus = 0x5678; + report (*pul); + cnt = (cnt + *pul) << 1; + pus++; + *pus = 0x1234; + report (*pul); + cnt = (cnt + *pul) << 1; + + puc = (unsigned char *)&_ul; + *puc = 0xdd; + report (*pul); + cnt = (cnt + *pul) << 1; + puc++; + *puc = 0xcc; + report (*pul); + cnt = (cnt + *pul) << 1; + puc++; + *puc = 0xbb; + report (*pul); + cnt = (cnt + *pul) << 1; + puc++; + *puc = 0xaa; + report (*pul); + cnt = (cnt + *pul) << 1; + + report (cnt); + cnt ^= 0xdeaddead ^ 0xda25e544; + report(cnt); + return (cnt != 0xdeaddead); +}
mem_test.c Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: mc_common.h =================================================================== --- mc_common.h (nonexistent) +++ mc_common.h (revision 1765) @@ -0,0 +1,70 @@ +/* mc_common.h - Memory Controller testbench common routines defines + 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. +*/ + +#ifndef __MC_COMMON_H +#define __MC_COMMON_H + +#define GPIO_BASE 0xA0000000LU +#define MC_BASE 0x60000000LU +#define MC_MEM_BASE 0x04000000LU + +/* Row Test flags */ +#define MC_TEST_RUN0 0x00000001LU +#define MC_TEST_RUN1 0x00000002LU +#define MC_TEST_RUN01 0x00000004LU +#define MC_TEST_RUN10 0x00000008LU +#define MC_TEST_RUNINC 0x00000010LU +#define MC_TEST_8 0x00000020LU +#define MC_TEST_16 0x00000040LU +#define MC_TEST_32 0x00000080LU +#define MC_TEST_SEQ 0x00000100LU +#define MC_TEST_SEQ1 0x00000200LU +#define MC_TEST_RAND 0x00000400LU + +/* test pattern defines */ +#define MC_TEST_PAT1_8 0x00U +#define MC_TEST_PAT2_8 0xFFU +#define MC_TEST_PAT3_8 0x55U +#define MC_TEST_PAT4_8 0xAAU +#define MC_TEST_PAT1_16 0x0000U +#define MC_TEST_PAT2_16 0xFFFFU +#define MC_TEST_PAT3_16 0x5555U +#define MC_TEST_PAT4_16 0xAAAAU +#define MC_TEST_PAT1_32 0x00000000LU +#define MC_TEST_PAT2_32 0xFFFFFFFFLU +#define MC_TEST_PAT3_32 0x55555555LU +#define MC_TEST_PAT4_32 0xAAAAAAAALU + +/* test device defines */ +#define MC_TEST_DEV_SDRAM 0 +#define MC_TEST_DEV_SSRAM 1 +#define MC_TEST_DEV_ASYNC 2 +#define MC_TEST_DEV_SYNC 3 + +typedef volatile unsigned char *MEMLOC8; +typedef volatile unsigned short *MEMLOC16; +typedef volatile unsigned long *MEMLOC32; + +/* Prototypes */ +unsigned long mc_test_row(unsigned long nFrom, unsigned long nTo, unsigned long flags); +void randomin(unsigned long seed); +unsigned long random(unsigned long max); + +#endif Index: local_global.c =================================================================== --- local_global.c (nonexistent) +++ local_global.c (revision 1765) @@ -0,0 +1,18 @@ +/* Test local and global variables */ +#include "support.h" + +int global = 5; + +int func (unsigned long a, char b) { + global = 2; + a = 3 + a; + b = 4 + b; + return a + b; +} + +int main () { + int local = 7; + global += func (local, 14); + report (global ^ 0xdeaddead ^ 30); + return 0; +}
local_global.c Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: exit.c =================================================================== --- exit.c (nonexistent) +++ exit.c (revision 1765) @@ -0,0 +1,9 @@ +/* This test covers basic functionality, to show that framework works. */ + +#include "support.h" + +int main () +{ + report (0xdeaddead); + return 0; +}
exit.c Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: TODO =================================================================== --- TODO (nonexistent) +++ TODO (revision 1765) @@ -0,0 +1,2 @@ + - add confugure time parameter for .ld files + - separate or1k specific and compareable tests
TODO Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: COPYING =================================================================== --- COPYING (nonexistent) +++ COPYING (revision 1765) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Index: . =================================================================== --- . (nonexistent) +++ . (revision 1765)
. Property changes : Added: svn:ignore ## -0,0 +1,34 ## +Makefile +acv_gpio +acv_uart +basic +cache +cbasic +cfg +dhry +dmatest +eth +eth0.tx +except +excpt +executed.log +exit +functest +local_global +mc_async +mc_dram +mc_ssram +mc_sync +mmu +mul +mycompress +pic +stdout.txt +vapi.log +config.cache +config.status +*.log +*test +*.bmp +.deps +flag

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.