From 4bd13cde17a27c342b79b72bde9ef8e1b5373344 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 28 Apr 2016 09:11:03 +0100 Subject: Add support to AArch64 disassembler for verifying instructions. Add verifier for LDPSW. PR target/19722 opcodes * aarch64-dis.c (aarch64_opcode_decode): Run verifier if present. * aarch64-opc.c (verify_ldpsw): New function. * aarch64-opc.h (verify_ldpsw): New prototype. * aarch64-tbl.h: Add initialiser for verifier field. (LDPSW): Set verifier to verify_ldpsw. binutils* testsuite/binutils-all/aarch64/illegal.s: New test. * testsuite/binutils-all/aarch64/illegal.d: New test driver. include * opcode/aarch64.h (struct aarch64_opcode): Add verifier field. --- binutils/ChangeLog | 6 ++++++ binutils/testsuite/binutils-all/aarch64/illegal.d | 12 ++++++++++++ binutils/testsuite/binutils-all/aarch64/illegal.s | 7 +++++++ 3 files changed, 25 insertions(+) create mode 100644 binutils/testsuite/binutils-all/aarch64/illegal.d create mode 100644 binutils/testsuite/binutils-all/aarch64/illegal.s (limited to 'binutils') diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 100ef0c..fc495cc 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2016-04-28 Nick Clifton + + PR target/19722 + * testsuite/binutils-all/aarch64/illegal.s: New test. + * testsuite/binutils-all/aarch64/illegal.d: New test driver. + 2016-04-20 Trevor Saunders * resres.c: Likewise. diff --git a/binutils/testsuite/binutils-all/aarch64/illegal.d b/binutils/testsuite/binutils-all/aarch64/illegal.d new file mode 100644 index 0000000..4b90a1d --- /dev/null +++ b/binutils/testsuite/binutils-all/aarch64/illegal.d @@ -0,0 +1,12 @@ +#PROG: objcopy +#objdump: -d +#name: Check that the disassembler complains about illegal instructions. + +.*: +file format .*aarch64.* + +Disassembly of section \.text: + +0+000 <.*>: +[ ]+0:[ ]+68ea18cc[ ]+.inst[ ]+0x68ea18cc ; undefined +#pass + diff --git a/binutils/testsuite/binutils-all/aarch64/illegal.s b/binutils/testsuite/binutils-all/aarch64/illegal.s new file mode 100644 index 0000000..216cbe6 --- /dev/null +++ b/binutils/testsuite/binutils-all/aarch64/illegal.s @@ -0,0 +1,7 @@ + # Test disassembly of illegal instructions. + .text + + # ldpsw x12, x6, [x6],#-8 ; illegal because one of the dest regs is also the address reg + .inst 0x68ea18cc + + # FIXME: Add more illegal instructions here. -- cgit v1.1