diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-01-25 21:41:15 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-01-25 21:41:15 (GMT) |
commit | 7370350b82305afe200c34ed91027a55f543bf98 (patch) | |
tree | cddda25dffb1cc17c2a1fb2c194c0564cd17d940 /tools/d2c | |
parent | 62da8564d257af381acb606e98fc712d87f7f5cb (diff) |
Fixed some Thumb decodings for ARMv7 branch instructions.
Diffstat (limited to 'tools/d2c')
-rw-r--r-- | tools/d2c/args/manager.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/tools/d2c/args/manager.c b/tools/d2c/args/manager.c index 8706694..980bc6c 100644 --- a/tools/d2c/args/manager.c +++ b/tools/d2c/args/manager.c @@ -1095,14 +1095,33 @@ bool define_arg_expr(const arg_expr_t *expr, int fd, const coding_bits *bits, co switch (expr->un_op) { case CUO_NOT: - dprintf(fd, "!"); + dprintf(fd, "("); break; default: result = false; break; } - result &= define_arg_expr(expr->un_expr, fd, bits, list); + if (result) + result = define_arg_expr(expr->un_expr, fd, bits, list); + + if (result) + result = compute_arg_expr_size(expr, bits, list, &max_size); + + if (result) + switch (expr->un_op) + { + case CUO_NOT: + dprintf(fd, " ^ "); + if (max_size >= 64) + dprintf(fd, "0xffffffffffffffff"); + else + dprintf(fd, "0x%x", (1 << max_size) - 1); + dprintf(fd, ")"); + break; + default: + break; + } break; |