fix rtruffle, was failing Lbr and a few ReverseTruffle tests

This commit is contained in:
Konstantinos Margaritis 2021-07-05 13:06:12 +03:00 committed by Konstantinos Margaritis
parent f425951b49
commit 0ed10082b1
2 changed files with 3 additions and 9 deletions

View File

@ -37,7 +37,6 @@
#include "util/arch.h" #include "util/arch.h"
#include "util/bitutils.h" #include "util/bitutils.h"
#if !defined(HAVE_SVE) #if !defined(HAVE_SVE)
#include "truffle_simd.hpp" #include "truffle_simd.hpp"

View File

@ -145,7 +145,6 @@ const u8 *truffleExecReal(SuperVector<S> shuf_mask_lo_highclear, SuperVector<S>
} }
return rv; return rv;
} }
@ -157,7 +156,6 @@ static really_inline const u8 *truffleRevMini(SuperVector<S> shuf_mask_lo_highcl
SuperVector<S> chars = SuperVector<S>::loadu(buf); SuperVector<S> chars = SuperVector<S>::loadu(buf);
u32 mask = (0xffff >> (16 - len)) ^ 0xffff; u32 mask = (0xffff >> (16 - len)) ^ 0xffff;
typename SuperVector<S>::movemask_type z = block(shuf_mask_lo_highclear, shuf_mask_lo_highset, chars); typename SuperVector<S>::movemask_type z = block(shuf_mask_lo_highclear, shuf_mask_lo_highset, chars);
@ -215,21 +213,18 @@ const u8 *rtruffleExecReal(SuperVector<S> shuf_mask_lo_highclear, SuperVector<S>
rv = revBlock(wide_shuf_mask_lo_highclear, wide_shuf_mask_lo_highset, chars, d); rv = revBlock(wide_shuf_mask_lo_highclear, wide_shuf_mask_lo_highset, chars, d);
if (rv) return rv; if (rv) return rv;
} }
} }
DEBUG_PRINTF("d %p e %p \n", buf, d); DEBUG_PRINTF("tail: d %p e %p \n", buf, d);
// finish off tail // finish off tail
if (d != buf) { if (d != buf) {
rv = truffleRevMini(shuf_mask_lo_highclear, shuf_mask_lo_highset, buf, d); rv = truffleRevMini(shuf_mask_lo_highclear, shuf_mask_lo_highset, buf, d);
DEBUG_PRINTF("rv %p \n", rv); DEBUG_PRINTF("rv %p \n", rv);
if (rv != d - 1) return rv; if (rv) return rv;
} }
return buf; return buf - 1;
} }