#endif
#include INCLUDEFILE
#ifdef DEST_PREDINT
+#ifndef INSN_TYPE_C_STACK_ST // XXX TODO: stack-based DEST_REG
+ reg_spec_t rdr = insn._DEST_REG();
+ bool dest_predicated = (dest_pred & (1<<*dest_offs)) != 0;
// don't check inversion here as dest_pred has already been inverted
- if (zeroing && ((dest_pred & (1<<*dest_offs)) == 0))
+ if (zeroing && (!dest_predicated))
{
// insn._rd() would be predicated: have to use insn._rd() here
-#ifndef INSN_TYPE_C_STACK_ST
- WRITE_REG(insn._DEST_REG(), 0);
-#endif
+ WRITE_REG(rdr, 0);
}
+ else if (!zeroing && dest_predicated && !rdr.isvec)
+ {
+ // zeroing not set, answer was stored, and it's a scalar operand.
+ // time to exit the loop.
+ break;
+ }
+#endif
#endif
if (vlen > 1)
{