diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2021-12-02 15:00:57 +0000 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2021-12-02 15:00:57 +0000 |
commit | bcca550b3dc542284715c19655c1885bdf2d3b67 (patch) | |
tree | 9595ba94a8add55664ce8192a82dc8594e8b137a /opcodes/aarch64-dis-2.c | |
parent | 63eff947512b36c770c92d45e4b22cb8a18a39be (diff) | |
download | binutils-gdb-bcca550b3dc542284715c19655c1885bdf2d3b67.tar.gz |
aarch64: Add BC instruction
This patch adds support for the Armv8.8-A BC instruction.
[https://developer.arm.com/documentation/ddi0596/2021-09/Base-Instructions/BC-cond--Branch-Consistent-conditionally-?lang=en]
include/
* opcode/aarch64.h (AARCH64_FEATURE_HBC): New macro.
(AARCH64_ARCH_V8_8): Make armv8.8-a imply AARCH64_FEATURE_HBC.
opcodes/
* aarch64-tbl.h (aarch64_feature_hbc): New variable.
(HBC, HBC_INSN): New macros.
(aarch64_opcode_table): Add BC.C.
* aarch64-dis-2.c: Regenerate.
gas/
* doc/c-aarch64.texi: Document +hbc.
* config/tc-aarch64.c (aarch64_features): Add "hbc".
* testsuite/gas/aarch64/hbc.s, testsuite/gas/aarch64/hbc.d: New test.
* testsuite/gas/aarch64/hbc-invalid.s,
testsuite/gas/aarch64/hbc-invalid.l,
testsuite/gas/aarch64/hbc-invalid.d: New test.
Diffstat (limited to 'opcodes/aarch64-dis-2.c')
-rw-r--r-- | opcodes/aarch64-dis-2.c | 105 |
1 files changed, 58 insertions, 47 deletions
diff --git a/opcodes/aarch64-dis-2.c b/opcodes/aarch64-dis-2.c index 70cbf908e81..37a0f8c80f6 100644 --- a/opcodes/aarch64-dis-2.c +++ b/opcodes/aarch64-dis-2.c @@ -16913,87 +16913,98 @@ aarch64_opcode_lookup_1 (uint32_t word) } else { - if (((word >> 10) & 0x1) == 0) + if (((word >> 25) & 0x1) == 0) { - if (((word >> 21) & 0x1) == 0) + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1010100xxxxxxxxxxxxxxxxxxx1xxxx + bc.c. */ + return 2631; + } + else + { + if (((word >> 10) & 0x1) == 0) { - if (((word >> 22) & 0x1) == 0) + if (((word >> 21) & 0x1) == 0) { - if (((word >> 23) & 0x1) == 0) + if (((word >> 22) & 0x1) == 0) { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - x10101x0000xxxxxxxxxx0xxxxx1xxxx - braaz. */ - return 647; + if (((word >> 23) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1010110000xxxxxxxxxx0xxxxx1xxxx + braaz. */ + return 647; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1010110100xxxxxxxxxx0xxxxx1xxxx + eretaa. */ + return 653; + } } else { /* 33222222222211111111110000000000 10987654321098765432109876543210 - x10101x0100xxxxxxxxxx0xxxxx1xxxx - eretaa. */ - return 653; + x1010110x10xxxxxxxxxx0xxxxx1xxxx + retaa. */ + return 651; } } else { /* 33222222222211111111110000000000 10987654321098765432109876543210 - x10101x0x10xxxxxxxxxx0xxxxx1xxxx - retaa. */ - return 651; + x1010110xx1xxxxxxxxxx0xxxxx1xxxx + blraaz. */ + return 649; } } else { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - x10101x0xx1xxxxxxxxxx0xxxxx1xxxx - blraaz. */ - return 649; - } - } - else - { - if (((word >> 21) & 0x1) == 0) - { - if (((word >> 22) & 0x1) == 0) + if (((word >> 21) & 0x1) == 0) { - if (((word >> 23) & 0x1) == 0) + if (((word >> 22) & 0x1) == 0) { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - x10101x0000xxxxxxxxxx1xxxxx1xxxx - brabz. */ - return 648; + if (((word >> 23) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1010110000xxxxxxxxxx1xxxxx1xxxx + brabz. */ + return 648; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1010110100xxxxxxxxxx1xxxxx1xxxx + eretab. */ + return 654; + } } else { /* 33222222222211111111110000000000 10987654321098765432109876543210 - x10101x0100xxxxxxxxxx1xxxxx1xxxx - eretab. */ - return 654; + x1010110x10xxxxxxxxxx1xxxxx1xxxx + retab. */ + return 652; } } else { /* 33222222222211111111110000000000 10987654321098765432109876543210 - x10101x0x10xxxxxxxxxx1xxxxx1xxxx - retab. */ - return 652; + x1010110xx1xxxxxxxxxx1xxxxx1xxxx + blrabz. */ + return 650; } } - else - { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - x10101x0xx1xxxxxxxxxx1xxxxx1xxxx - blrabz. */ - return 650; - } } } } |