typedef struct test_table_t test_table_t;
struct test_t {
test_func_t func;
- const unsigned char *name;
+ const char *name;
};
struct test_table_t {
test_t *tests;
- const unsigned char *name;
+ const char *name;
uint32_t flags;
};
-typedef void (*test_loop_t) (const unsigned char *name, test_func_t func,
+typedef void (*test_loop_t) (const char *name, test_func_t func,
uint32_t flags);
enum test_flags {
}
#endif
-static void test_int_three_args (const unsigned char *name, test_func_t func,
+static void test_int_three_args (const char* name, test_func_t func,
unused uint32_t test_flags)
{
volatile uint32_t res, flags, xer, tmpcr, tmpxer;
}
}
-static void test_int_two_args (const unsigned char *name, test_func_t func,
+static void test_int_two_args (const char* name, test_func_t func,
uint32_t test_flags)
{
volatile uint32_t res, flags, xer, xer_orig, tmpcr, tmpxer;
}
}
-static void test_int_one_arg (const unsigned char *name, test_func_t func,
+static void test_int_one_arg (const char* name, test_func_t func,
uint32_t test_flags)
{
volatile uint32_t res, flags, xer, xer_orig, tmpcr, tmpxer;
patch_op_imm(out, in, imm, 0, 16);
}
-static void test_int_one_reg_imm16 (const unsigned char *name,
+static void test_int_one_reg_imm16 (const char* name,
test_func_t func,
unused uint32_t test_flags)
{
* mtspr_cb
*/
-static void rlwi_cb (const unsigned char *name, test_func_t func,
+static void rlwi_cb (const char* name, test_func_t func,
unused uint32_t test_flags)
{
uint32_t func_buf[2], *p;
}
}
-static void rlwnm_cb (const unsigned char *name, test_func_t func,
+static void rlwnm_cb (const char* name, test_func_t func,
unused uint32_t test_flags)
{
uint32_t func_buf[2], *p;
}
}
-static void srawi_cb (const unsigned char *name, test_func_t func,
+static void srawi_cb (const char* name, test_func_t func,
unused uint32_t test_flags)
{
uint32_t func_buf[2], *p;
}
}
-static void mcrf_cb (const unsigned char *name, test_func_t func,
+static void mcrf_cb (const char* name, test_func_t func,
unused uint32_t test_flags)
{
uint32_t func_buf[2], *p;
}
#if 0
-static void mcrfs_cb (const unsigned char *name, test_func_t func,
+static void mcrfs_cb (const char* name, test_func_t func,
unused uint32_t test_flags)
{}
#endif
-static void mcrxr_cb (const unsigned char *name, test_func_t func,
+static void mcrxr_cb (const char* name, test_func_t func,
unused uint32_t test_flags)
{
uint32_t func_buf[2], *p;
}
}
-static void mfcr_cb (const unsigned char *name, test_func_t func,
+static void mfcr_cb (const char* name, test_func_t func,
unused uint32_t test_flags)
{
volatile uint32_t res, flags, xer, tmpcr, tmpxer;
}
// NOTE: Not using func: calling function kills lr
-static void mfspr_cb (const unsigned char *name, test_func_t func,
+static void mfspr_cb (const char* name, test_func_t func,
unused uint32_t test_flags)
{
volatile uint32_t res, flags, xer, ctr, lr, tmpcr, tmpxer;
}
#if 0
-static void mftb_cb (const unsigned char *name, test_func_t func,
+static void mftb_cb (const char* name, test_func_t func,
unused uint32_t test_flags)
{
// How to test this?
}
#endif
-static void mtcrf_cb (const unsigned char *name, test_func_t func,
+static void mtcrf_cb (const char* name, test_func_t func,
unused uint32_t test_flags)
{
uint32_t func_buf[2], *p;
}
// NOTE: Not using func: calling function kills lr
-static void mtspr_cb (const unsigned char *name, test_func_t func,
+static void mtspr_cb (const char* name, test_func_t func,
unused uint32_t test_flags)
{
volatile uint32_t flags, xer, ctr, lr, tmpcr, tmpxer;
typedef struct special_t special_t;
struct special_t {
- const unsigned char *name;
- void (*test_cb)(const unsigned char *name, test_func_t func,
+ const char *name;
+ void (*test_cb)(const char* name, test_func_t func,
unused uint32_t test_flags);
};
static void test_special (special_t *table,
- const unsigned char *name, test_func_t func,
+ const char* name, test_func_t func,
unused uint32_t test_flags)
{
- const unsigned char *tmp;
+ const char *tmp;
int i;
for (tmp = name; isspace(*tmp); tmp++)
},
};
-static void test_int_special (const unsigned char *name, test_func_t func,
+static void test_int_special (const char* name, test_func_t func,
uint32_t test_flags)
{
test_special(special_int_ops, name, func, test_flags);
}
-static void test_int_ld_one_reg_imm16 (const unsigned char *name,
+static void test_int_ld_one_reg_imm16 (const char* name,
test_func_t func,
unused uint32_t test_flags)
{
}
}
-static void test_int_ld_two_regs (const unsigned char *name,
+static void test_int_ld_two_regs (const char* name,
test_func_t func,
unused uint32_t test_flags)
{
}
}
-static void test_int_st_two_regs_imm16 (const unsigned char *name,
+static void test_int_st_two_regs_imm16 (const char* name,
test_func_t func,
unused uint32_t test_flags)
{
free(iargs_priv);
}
-static void test_int_st_three_regs (const unsigned char *name,
+static void test_int_st_three_regs (const char* name,
test_func_t func,
unused uint32_t test_flags)
{
};
#if !defined (NO_FLOAT)
-static void test_float_three_args (const unsigned char *name, test_func_t func,
+static void test_float_three_args (const char* name, test_func_t func,
unused uint32_t test_flags)
{
double res;
}
}
-static void test_float_two_args (const unsigned char *name, test_func_t func,
+static void test_float_two_args (const char* name, test_func_t func,
unused uint32_t test_flags)
{
double res;
}
}
-static void test_float_one_arg (const unsigned char *name, test_func_t func,
+static void test_float_one_arg (const char* name, test_func_t func,
unused uint32_t test_flags)
{
double res;
},
};
-static void test_float_special (const unsigned char *name, test_func_t func,
+static void test_float_special (const char* name, test_func_t func,
uint32_t test_flags)
{
test_special(special_float_ops, name, func, test_flags);
#define DEFAULT_VSCR 0x00010000
-static void test_av_int_one_arg (const unsigned char *name, test_func_t func,
+static void test_av_int_one_arg (const char* name, test_func_t func,
unused uint32_t test_flags)
{
volatile uint32_t flags, tmpcr;
}
}
-static void test_av_int_two_args (const unsigned char *name, test_func_t func,
+static void test_av_int_two_args (const char* name, test_func_t func,
unused uint32_t test_flags)
{
volatile uint32_t flags, tmpcr;
}
}
-static void test_av_int_three_args (const unsigned char *name, test_func_t func,
+static void test_av_int_three_args (const char* name, test_func_t func,
unused uint32_t test_flags)
{
volatile uint32_t flags, tmpcr;
}
-static void vs128_cb (const unsigned char *name, test_func_t func,
+static void vs128_cb (const char* name, test_func_t func,
unused uint32_t test_flags)
{
volatile uint32_t flags, tmpcr;
}
}
-static void vsplt_cb (const unsigned char *name, test_func_t func,
+static void vsplt_cb (const char* name, test_func_t func,
unused uint32_t test_flags)
{
volatile uint32_t flags, tmpcr;
}
}
-static void vspltis_cb (const unsigned char *name, test_func_t func,
+static void vspltis_cb (const char* name, test_func_t func,
unused uint32_t test_flags)
{
volatile uint32_t flags, tmpcr;
}
}
-static void vsldoi_cb (const unsigned char *name, test_func_t func,
+static void vsldoi_cb (const char* name, test_func_t func,
unused uint32_t test_flags)
{
volatile uint32_t flags, tmpcr;
},
};
-static void test_av_int_special (const unsigned char *name, test_func_t func,
+static void test_av_int_special (const char* name, test_func_t func,
uint32_t test_flags)
{
test_special(special_av_int_ops, name, func, test_flags);
};
-static void test_av_float_one_arg (const unsigned char *name, test_func_t func,
+static void test_av_float_one_arg (const char* name, test_func_t func,
unused uint32_t test_flags)
{
volatile uint32_t flags, tmpcr;
}
}
-static void test_av_float_two_args (const unsigned char *name, test_func_t func,
+static void test_av_float_two_args (const char* name, test_func_t func,
unused uint32_t test_flags)
{
volatile uint32_t flags, tmpcr;
}
}
-static void test_av_float_three_args (const unsigned char *name, test_func_t func,
+static void test_av_float_three_args (const char* name, test_func_t func,
unused uint32_t test_flags)
{
volatile uint32_t flags, tmpcr;
#if defined (IS_PPC405)
-static void test_ppc405 (const unsigned char *name, test_func_t func,
+static void test_ppc405 (const char* name, test_func_t func,
unused uint32_t test_flags)
{
volatile uint32_t res, flags, xer, tmpcr, tmpxer;
}
#endif /* defined (IS_PPC405) */
-static int check_filter (unsigned char *filter)
+static int check_filter (char *filter)
{
- unsigned char *c;
+ char *c;
int ret = 1;
if (filter != NULL) {
return ret;
}
-static int check_name (const unsigned char *name, const unsigned char *filter,
+static int check_name (const char* name, const char *filter,
int exact)
{
int nlen, flen;
} insn_sel_flags_t;
static void do_tests ( insn_sel_flags_t seln_flags,
- unsigned char *filter)
+ char *filter)
{
#if defined (IS_PPC405)
test_loop_t tmpl;
./test-ppc => all insns, except AV
./test-ppc -a => all insns, including AV
*/
- unsigned char *filter = NULL;
+ char *filter = NULL;
insn_sel_flags_t flags;
int c;