|
From: <sv...@va...> - 2005-11-11 13:13:09
|
Author: sewardj
Date: 2005-11-11 13:13:01 +0000 (Fri, 11 Nov 2005)
New Revision: 5085
Log:
Stop gcc4 complaining about pointer signedness mismatches.
Modified:
trunk/none/tests/ppc32/jm-insns.c
Modified: trunk/none/tests/ppc32/jm-insns.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/ppc32/jm-insns.c 2005-11-11 12:32:10 UTC (rev 5084)
+++ trunk/none/tests/ppc32/jm-insns.c 2005-11-11 13:13:01 UTC (rev 5085)
@@ -153,16 +153,16 @@
typedef struct test_table_t test_table_t;
struct test_t {
test_func_t func;
- const unsigned char *name;
+ const char *name;
};
=20
struct test_table_t {
test_t *tests;
- const unsigned char *name;
+ const char *name;
uint32_t flags;
};
=20
-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);
=20
enum test_flags {
@@ -3756,7 +3756,7 @@
}
#endif
=20
-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;
@@ -3796,7 +3796,7 @@
}
}
=20
-static void test_int_two_args (const unsigned char *name, test_func_t fu=
nc,
+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;
@@ -3840,7 +3840,7 @@
}
}
=20
-static void test_int_one_arg (const unsigned char *name, test_func_t fun=
c,
+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;
@@ -3923,7 +3923,7 @@
patch_op_imm(out, in, imm, 0, 16);
}
=20
-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)
{
@@ -3988,7 +3988,7 @@
* mtspr_cb
*/
=20
-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;
@@ -4037,7 +4037,7 @@
}
}
=20
-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;
@@ -4086,7 +4086,7 @@
}
}
=20
-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;
@@ -4129,7 +4129,7 @@
}
}
=20
-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;
@@ -4175,13 +4175,13 @@
}
=20
#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
=20
=20
-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;
@@ -4224,7 +4224,7 @@
}
}
=20
-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;
@@ -4258,7 +4258,7 @@
}
=20
// 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;
@@ -4395,7 +4395,7 @@
}
=20
#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?
@@ -4464,7 +4464,7 @@
}
#endif
=20
-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;
@@ -4507,7 +4507,7 @@
}
=20
// 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;
@@ -4648,16 +4648,16 @@
typedef struct special_t special_t;
=20
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);
};
=20
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;
=20
for (tmp =3D name; isspace(*tmp); tmp++)
@@ -4750,14 +4750,14 @@
},
};
=20
-static void test_int_special (const unsigned char *name, test_func_t fun=
c,
+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);
}
=20
=20
-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)
{
@@ -4841,7 +4841,7 @@
}
}
=20
-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)
{
@@ -4883,7 +4883,7 @@
}
}
=20
-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)
{
@@ -4976,7 +4976,7 @@
free(iargs_priv);
}
=20
-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)
{
@@ -5043,7 +5043,7 @@
};
=20
#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;
@@ -5089,7 +5089,7 @@
}
}
=20
-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;
@@ -5131,7 +5131,7 @@
}
}
=20
-static void test_float_one_arg (const unsigned char *name, test_func_t f=
unc,
+static void test_float_one_arg (const char* name, test_func_t func,
unused uint32_t test_flags)
{
double res;
@@ -5221,7 +5221,7 @@
},
};
=20
-static void test_float_special (const unsigned char *name, test_func_t f=
unc,
+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);
@@ -5262,7 +5262,7 @@
=20
#define DEFAULT_VSCR 0x00010000
=20
-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;
@@ -5315,7 +5315,7 @@
}
}
=20
-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;
@@ -5375,7 +5375,7 @@
}
}
=20
-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;
@@ -5443,7 +5443,7 @@
}
=20
=20
-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;
@@ -5505,7 +5505,7 @@
}
}
=20
-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;
@@ -5570,7 +5570,7 @@
}
}
=20
-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;
@@ -5624,7 +5624,7 @@
}
}
=20
-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;
@@ -5734,7 +5734,7 @@
},
};
=20
-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);
@@ -5758,7 +5758,7 @@
};
=20
=20
-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;
@@ -5812,7 +5812,7 @@
}
}
=20
-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;
@@ -5873,7 +5873,7 @@
}
}
=20
-static void test_av_float_three_args (const unsigned char *name, test_fu=
nc_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;
@@ -5961,7 +5961,7 @@
=20
=20
#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;
@@ -6005,9 +6005,9 @@
}
#endif /* defined (IS_PPC405) */
=20
-static int check_filter (unsigned char *filter)
+static int check_filter (char *filter)
{
- unsigned char *c;
+ char *c;
int ret =3D 1;
=20
if (filter !=3D NULL) {
@@ -6021,7 +6021,7 @@
return ret;
}
=20
-static int check_name (const unsigned char *name, const unsigned char *f=
ilter,
+static int check_name (const char* name, const char *filter,
int exact)
{
int nlen, flen;
@@ -6057,7 +6057,7 @@
} insn_sel_flags_t;
=20
static void do_tests ( insn_sel_flags_t seln_flags,
- unsigned char *filter)
+ char *filter)
{
#if defined (IS_PPC405)
test_loop_t tmpl;
@@ -6337,7 +6337,7 @@
./test-ppc =3D> all insns, except AV
./test-ppc -a =3D> all insns, including AV
*/
- unsigned char *filter =3D NULL;
+ char *filter =3D NULL;
insn_sel_flags_t flags;
int c;
=20
|