orcmips: Fix register range check
authorEdward Hervey <bilboed@bilboed.com>
Fri, 11 Apr 2014 14:13:08 +0000 (16:13 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Fri, 11 Apr 2014 14:13:08 +0000 (16:13 +0200)
There are 32 possible registers and not 33

CID #1146987

orc/orcmips.c

index d2d26ae..81c4182 100644 (file)
@@ -73,7 +73,7 @@ orc_mips_reg_name (int reg)
     "$gp", "$sp", "$fp", "$ra"
   };
 
-  if (reg < ORC_GP_REG_BASE || reg > ORC_GP_REG_BASE + 32)
+  if (reg < ORC_GP_REG_BASE || reg >= ORC_GP_REG_BASE + 32)
     return "ERROR";
 
   return regs[reg-32];