diff options
author | Jacob Bramley <jacob.bramley@arm.com> | 2018-08-23 18:13:09 +0100 |
---|---|---|
committer | Jacob Bramley <jacob.bramley@arm.com> | 2018-08-30 16:30:35 +0000 |
commit | 59aee848df95d80b37de8819a69defacb11be0e9 (patch) | |
tree | b8d542c5a2a2a5a84f397a4c9d220cc569cad85c /test/aarch64 | |
parent | 364c82b15129b5f168e450356ee0abd0e62ffa15 (diff) | |
download | vixl-59aee848df95d80b37de8819a69defacb11be0e9.tar.gz |
Support hint <imm>, and fix hint disassembly.
This allows users to use custom hints without resorting to an undefined
static_cast.
Also, fix disassembly of hints:
- Add several named hints to the disassembler, so they can be properly
disassembled.
- Properly disassemble unnamed hints.
Change-Id: Ia8b4d07a5bff08346faebd5b2f495d047d7037c0
Diffstat (limited to 'test/aarch64')
-rw-r--r-- | test/aarch64/test-disasm-aarch64.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/aarch64/test-disasm-aarch64.cc b/test/aarch64/test-disasm-aarch64.cc index 426319ff..b494780c 100644 --- a/test/aarch64/test-disasm-aarch64.cc +++ b/test/aarch64/test-disasm-aarch64.cc @@ -7018,5 +7018,29 @@ TEST(address_map) { CLEANUP(); } +TEST(hint) { + SETUP(); + + // Test that we properly disassemble named and unnamed hints. + COMPARE(hint(NOP), "nop"); + COMPARE(hint(YIELD), "yield"); + COMPARE(hint(WFE), "wfe"); + COMPARE(hint(WFI), "wfi"); + COMPARE(hint(SEV), "sev"); + COMPARE(hint(SEVL), "sevl"); + COMPARE(hint(6), "hint #6"); + COMPARE(hint(CSDB), "csdb"); + COMPARE(hint(42), "hint #42"); + COMPARE(hint(127), "hint #127"); + + // The MacroAssembler should simply pass through to the Assembler. + COMPARE_MACRO(Hint(NOP), "nop"); + COMPARE_MACRO(Hint(CSDB), "csdb"); + COMPARE_MACRO(Hint(42), "hint #42"); + COMPARE_MACRO(Hint(127), "hint #127"); + + CLEANUP(); +} + } // namespace aarch64 } // namespace vixl |