rsp_regr_vu_mad.c 4.69 KB
#include <sys/types.h>
#ifdef __sgi__
#include <sys/sbd.h>
#endif
#include <sys/stat.h>
#include <sys/mman.h>
#ifdef __sgi__
#include <sys/sema.h>
#endif
#include <netinet/in.h>

#include <errno.h>
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <getopt.h>

#include <rcp.h>
#include <rsp.h>

/* From $ROOT/usr/include/ide, which is installed from PR/diags/include */
#include "diag.h"
#include "dbg_comm.h"

#define RSP_TEST_BASE	001

static int NumFailures = 0;

/* From rsp_regr_common.c: */
extern int generic_rsp_regression (const char *file_name);
extern void imem_init(FILE *file_p);
extern int rsp_regrInit();
extern int rsp_regrDo(TEST_REF *test_ref);
extern int rsp_regr(TEST_REF TestRefs[]);

int vmadh1_h();
int vmadh1_q();
int vmadh1_v();
int vmadh1_w();
int vmadh_clamp();
int vmadh_h();
int vmadh_q();
int vmadh_v();
int vmadh_v1();
int vmadh_w();
int vmadl_clamp();
int vmadl_h();
int vmadl_q();
int vmadl_v();
int vmadl_w();
int vmadm_clamp();
int vmadm_h();
int vmadm_q();
int vmadm_v();
int vmadm_v1();
int vmadm_w();
int vmadn_clamp();
int vmadn_h();
int vmadn_q();
int vmadn_v();
int vmadn_v1();
int vmadn_w();

/*
 * An array of tests, each of which corresponds to a separate menu
 * item callable from the master ide menu.
 */
static TEST_REF TestRefs[] = {
  {"vmadh1_h", 			RSP_TEST_BASE+0, vmadh1_h},
  {"vmadh1_q", 			RSP_TEST_BASE+1, vmadh1_q},
  {"vmadh1_v", 			RSP_TEST_BASE+2, vmadh1_v},
  {"vmadh1_w", 			RSP_TEST_BASE+3, vmadh1_w},
  {"vmadh_clamp", 		RSP_TEST_BASE+4, vmadh_clamp},
  {"vmadh_h", 			RSP_TEST_BASE+5, vmadh_h},
  {"vmadh_q", 			RSP_TEST_BASE+6, vmadh_q},
  {"vmadh_v", 			RSP_TEST_BASE+7, vmadh_v},
  {"vmadh_v1", 			RSP_TEST_BASE+8, vmadh_v1},
  {"vmadh_w", 			RSP_TEST_BASE+9, vmadh_w},
  {"vmadl_clamp", 		RSP_TEST_BASE+10, vmadl_clamp},
  {"vmadl_h", 			RSP_TEST_BASE+11, vmadl_h},
  {"vmadl_q", 			RSP_TEST_BASE+12, vmadl_q},
  {"vmadl_v", 			RSP_TEST_BASE+13, vmadl_v},
  {"vmadl_w", 			RSP_TEST_BASE+14, vmadl_w},
  {"vmadm_clamp", 		RSP_TEST_BASE+15, vmadm_clamp},
  {"vmadm_h", 			RSP_TEST_BASE+16, vmadm_h},
  {"vmadm_q", 			RSP_TEST_BASE+17, vmadm_q},
  {"vmadm_v", 			RSP_TEST_BASE+18, vmadm_v},
  {"vmadm_v1", 			RSP_TEST_BASE+19, vmadm_v1},
  {"vmadm_w", 			RSP_TEST_BASE+20, vmadm_w},
  {"vmadn_clamp", 		RSP_TEST_BASE+21, vmadn_clamp},
  {"vmadn_h", 			RSP_TEST_BASE+22, vmadn_h},
  {"vmadn_q", 			RSP_TEST_BASE+23, vmadn_q},
  {"vmadn_v", 			RSP_TEST_BASE+24, vmadn_v},
  {"vmadn_v1", 			RSP_TEST_BASE+25, vmadn_v1},
  {"vmadn_w", 			RSP_TEST_BASE+26, vmadn_w},
    {"",0,0}
};

static int failed_tests[512];

/*
 * diagnostic entry point:
 *
 * Each separately invokable ide diagnostic command corresponds to an
 * independent ".c" module; the entry point herein must match
 * the test name as specified in the rspcmd.awk script.  These command
 * names correspond to the names you see from the ide menu.  For this
 * module, there will be an ide command "rsp_regr".
 */

int rsp_regr_vu_mad(void) {rsp_regr(TestRefs);}

/*
 * Tests
 */

int vmadh1_h() {return generic_rsp_regression("tests/vmadh1_h");}
int vmadh1_q() {return generic_rsp_regression("tests/vmadh1_q");}
int vmadh1_v() {return generic_rsp_regression("tests/vmadh1_v");}
int vmadh1_w() {return generic_rsp_regression("tests/vmadh1_w");}
int vmadh_clamp() {return generic_rsp_regression("tests/vmadh_clamp");}
int vmadh_h() {return generic_rsp_regression("tests/vmadh_h");}
int vmadh_q() {return generic_rsp_regression("tests/vmadh_q");}
int vmadh_v() {return generic_rsp_regression("tests/vmadh_v");}
int vmadh_v1() {return generic_rsp_regression("tests/vmadh_v1");}
int vmadh_w() {return generic_rsp_regression("tests/vmadh_w");}
int vmadl_clamp() {return generic_rsp_regression("tests/vmadl_clamp");}
int vmadl_h() {return generic_rsp_regression("tests/vmadl_h");}
int vmadl_q() {return generic_rsp_regression("tests/vmadl_q");}
int vmadl_v() {return generic_rsp_regression("tests/vmadl_v");}
int vmadl_w() {return generic_rsp_regression("tests/vmadl_w");}
int vmadm_clamp() {return generic_rsp_regression("tests/vmadm_clamp");}
int vmadm_h() {return generic_rsp_regression("tests/vmadm_h");}
int vmadm_q() {return generic_rsp_regression("tests/vmadm_q");}
int vmadm_v() {return generic_rsp_regression("tests/vmadm_v");}
int vmadm_v1() {return generic_rsp_regression("tests/vmadm_v1");}
int vmadm_w() {return generic_rsp_regression("tests/vmadm_w");}
int vmadn_clamp() {return generic_rsp_regression("tests/vmadn_clamp");}
int vmadn_h() {return generic_rsp_regression("tests/vmadn_h");}
int vmadn_q() {return generic_rsp_regression("tests/vmadn_q");}
int vmadn_v() {return generic_rsp_regression("tests/vmadn_v");}
int vmadn_v1() {return generic_rsp_regression("tests/vmadn_v1");}
int vmadn_w() {return generic_rsp_regression("tests/vmadn_w");}