|
From: <sv...@va...> - 2017-05-05 14:15:55
|
Author: petarj
Date: Fri May 5 15:15:48 2017
New Revision: 3361
Log:
mips: reduce compile warnings
Tune the code so it does not trigger any compile warnings.
argregs and tmpregs arrays have been enlarged to have 8 elements on mips32,
since that way we get rid of several false warnings:
warning: array index 5 is past the end of the array
(which contains 4 elements) [-Warray-bounds]
Also removing three "vassert(tmp >= 0);" as these asserts are not valid,
since tmp is an unsigned value. With the change, we get rid of:
warning: comparison of unsigned expression >= 0 is always true
[-Wtautological-compare]
Modified:
trunk/priv/host_mips_isel.c
Modified: trunk/priv/host_mips_isel.c
==============================================================================
--- trunk/priv/host_mips_isel.c (original)
+++ trunk/priv/host_mips_isel.c Fri May 5 15:15:48 2017
@@ -129,14 +129,12 @@
static HReg lookupIRTemp(ISelEnv * env, IRTemp tmp)
{
- vassert(tmp >= 0);
vassert(tmp < env->n_vregmap);
return env->vregmap[tmp];
}
static void lookupIRTemp64(HReg * vrHI, HReg * vrLO, ISelEnv * env, IRTemp tmp)
{
- vassert(tmp >= 0);
vassert(tmp < env->n_vregmap);
vassert(! hregIsInvalid(env->vregmapHI[tmp]));
*vrLO = env->vregmap[tmp];
@@ -147,7 +145,6 @@
lookupIRTempPair(HReg * vrHI, HReg * vrLO, ISelEnv * env, IRTemp tmp)
{
vassert(env->mode64);
- vassert(tmp >= 0);
vassert(tmp < env->n_vregmap);
vassert(! hregIsInvalid(env->vregmapHI[tmp]));
*vrLO = env->vregmap[tmp];
@@ -395,8 +392,8 @@
IRCallee* cee, IRType retTy, IRExpr** args )
{
MIPSCondCode cc;
- HReg argregs[MIPS_N_REGPARMS];
- HReg tmpregs[MIPS_N_REGPARMS];
+ HReg argregs[8];
+ HReg tmpregs[8];
Bool go_fast;
Int n_args, i, argreg;
UInt argiregs;
|