]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
mips: fix incorrect assert for hwcaps_host
authorPetar Jovanovic <mips32r2@gmail.com>
Fri, 13 Nov 2015 15:45:38 +0000 (15:45 +0000)
committerPetar Jovanovic <mips32r2@gmail.com>
Fri, 13 Nov 2015 15:45:38 +0000 (15:45 +0000)
Fix incorrect and incomplete assert condition for hwcaps_host in
iselSB_MIPS().

Spotted by Coverity and reported by Rhys Kidd.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3203

VEX/priv/host_mips_isel.c

index a4a89cb974207d7355610edb8c816a18197fafef..66b3014d04b9f6dfdf8154da7f0411e5d5a6131d 100644 (file)
@@ -4171,9 +4171,10 @@ HInstrArray *iselSB_MIPS ( const IRSB* bb,
 
    /* sanity ... */
    vassert(arch_host == VexArchMIPS32 || arch_host == VexArchMIPS64);
-   vassert(VEX_PRID_COMP_MIPS == hwcaps_host
-           || VEX_PRID_COMP_BROADCOM == hwcaps_host
-           || VEX_PRID_COMP_NETLOGIC);
+   vassert(VEX_PRID_COMP_MIPS == VEX_MIPS_COMP_ID(hwcaps_host)
+           || VEX_PRID_COMP_BROADCOM == VEX_MIPS_COMP_ID(hwcaps_host)
+           || VEX_PRID_COMP_NETLOGIC == VEX_MIPS_COMP_ID(hwcaps_host)
+           || VEX_PRID_COMP_CAVIUM == VEX_MIPS_COMP_ID(hwcaps_host));
 
    /* Check that the host's endianness is as expected. */
    vassert(archinfo_host->endness == VexEndnessLE