{
mask = 0xffffffffU;
msb = 0x80000000U;
+ if (count > 16 || count < -16)
+ {
+ fprintf(stderr, "Error: SI shift of %d undefined\n", count);
+ exit(1);
+ }
+ if (count > 16)
+ count = (count - 1) % 16 + 1;
+ if (count < -16)
+ count = -((-count - 1) % 16 + 1);
}
tprintf("%s %x by %d\n", arith ? "sha" : "shl", v, count);
tprintf ("b=%d, carry=%d, %s = %d\n", b, carry, #expr, v); \
set_c (v);
+/* The "BMcnd dest" opcode uses a different encoding for the */
+/* condition than other opcodes. */
+static int bmcnd_cond_map[] = {
+ 0, 1, 2, 3, 8, 9, 10, 11, 4, 5, 6, 7, 12, 13, 14, 15
+};
+
int
decode_r8c()
{
/** 0111 1110 0010 dest BMcnd dest */
dc = decode_bit (dest);
- if (condition_true (IMM (0)))
+ if (condition_true (bmcnd_cond_map [IMM (0) & 15]))
put_bit (dc, 1);
else
put_bit (dc, 0);