From 74db7efbe3a09c00e5f4f5b99862f173258938f6 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 4 Sep 2013 07:59:33 +0000 Subject: PR gas/15914 * config/tc-arm.c (T16_32_TAB): Add _udf. (do_t_udf): New function. (insns): Add "udf". * gas/arm/udf-bad.s: New file. * gas/arm/udf-bad.d: New file. * gas/arm/udf-bad.l: New file. * gas/arm/udf.s: New file. * gas/arm/udf.d: New file. * gas/arm/udf.l: New file. * arm-dis.c (arm_opcodes): Add udf. (thumb_opcodes): Use "udf" mnemonic rather than UNDEFINED_INSTRUCTION. (thumb32_opcodes): Add udf.w. (print_insn_thumb32): Handle %H as the thumb32_opcodes comment says. --- gas/testsuite/ChangeLog | 10 ++++++++++ gas/testsuite/gas/arm/udf-bad.d | 2 ++ gas/testsuite/gas/arm/udf-bad.l | 5 +++++ gas/testsuite/gas/arm/udf-bad.s | 9 +++++++++ gas/testsuite/gas/arm/udf.d | 30 ++++++++++++++++++++++++++++++ gas/testsuite/gas/arm/udf.l | 3 +++ gas/testsuite/gas/arm/udf.s | 24 ++++++++++++++++++++++++ 7 files changed, 83 insertions(+) create mode 100644 gas/testsuite/gas/arm/udf-bad.d create mode 100644 gas/testsuite/gas/arm/udf-bad.l create mode 100644 gas/testsuite/gas/arm/udf-bad.s create mode 100644 gas/testsuite/gas/arm/udf.d create mode 100644 gas/testsuite/gas/arm/udf.l create mode 100644 gas/testsuite/gas/arm/udf.s (limited to 'gas/testsuite') diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index dd0fe72..15e00f3 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2013-09-04 Roland McGrath + + PR gas/15914 + * gas/arm/udf-bad.s: New file. + * gas/arm/udf-bad.d: New file. + * gas/arm/udf-bad.l: New file. + * gas/arm/udf.s: New file. + * gas/arm/udf.d: New file. + * gas/arm/udf.l: New file. + 2013-08-28 Nick Clifton * gas/aarch64/illegal.s: Add illegal constant for logical diff --git a/gas/testsuite/gas/arm/udf-bad.d b/gas/testsuite/gas/arm/udf-bad.d new file mode 100644 index 0000000..94706d1 --- /dev/null +++ b/gas/testsuite/gas/arm/udf-bad.d @@ -0,0 +1,2 @@ +#name: Invalid UDF operands +#error-output: udf-bad.l diff --git a/gas/testsuite/gas/arm/udf-bad.l b/gas/testsuite/gas/arm/udf-bad.l new file mode 100644 index 0000000..4145ef0 --- /dev/null +++ b/gas/testsuite/gas/arm/udf-bad.l @@ -0,0 +1,5 @@ +[^:]*: Assembler messages: +^[^:]*:4: Error: immediate value out of range -- `udf #0x10000' +^[^:]*:7: Error: immediate value out of range -- `udf #0x10000' +^[^:]*:8: Error: immediate value out of range -- `udf.w #0x10000' +^[^:]*:9: Error: immediate value out of range -- `udf.n #0x100' diff --git a/gas/testsuite/gas/arm/udf-bad.s b/gas/testsuite/gas/arm/udf-bad.s new file mode 100644 index 0000000..6057698 --- /dev/null +++ b/gas/testsuite/gas/arm/udf-bad.s @@ -0,0 +1,9 @@ + .syntax unified + +arm: .arm + udf #0x10000 + +thumb: .thumb + udf #0x10000 + udf.w #0x10000 + udf.n #0x100 diff --git a/gas/testsuite/gas/arm/udf.d b/gas/testsuite/gas/arm/udf.d new file mode 100644 index 0000000..db41080 --- /dev/null +++ b/gas/testsuite/gas/arm/udf.d @@ -0,0 +1,30 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: UDF +#error-output: udf.l + +.*: +file format .*arm.* + +Disassembly of section \.text: + +0+0 : +\s*0:\s+e7f000f0\s+udf #0 +\s*4:\s+e7fabcfd\s+udf #43981 ; 0xabcd + +0+0 : +\s*8:\s+deab\s+udf #171 ; 0xab +\s*a:\s+decd\s+udf #205 ; 0xcd +\s*c:\s+de00\s+udf #0 +\s*e:\s+46c0\s+nop.* +\s*10:\s+f7f0 a000\s+udf\.w #0 +\s*14:\s+f7f1 a234\s+udf\.w #4660 ; 0x1234 +\s*18:\s+f7fc acdd\s+udf\.w #52445 ; 0xccdd +\s*1c:\s+bf08\s+it eq +\s*1e:\s+de12\s+udfeq #18 +\s*20:\s+de23\s+udf #35 ; 0x23 +\s*22:\s+de34\s+udf #52 ; 0x34 +\s*24:\s+de56\s+udf #86 ; 0x56 +\s*26:\s+bf18\s+it ne +\s*28:\s+f7f1 a234\s+udfne\.w #4660 ; 0x1234 +\s*2c:\s+f7f2 a345\s+udf\.w #9029 ; 0x2345 +\s*30:\s+f7f3 a456\s+udf\.w #13398 ; 0x3456 +\s*34:\s+f7f5 a678\s+udf\.w #22136 ; 0x5678 diff --git a/gas/testsuite/gas/arm/udf.l b/gas/testsuite/gas/arm/udf.l new file mode 100644 index 0000000..67218cd --- /dev/null +++ b/gas/testsuite/gas/arm/udf.l @@ -0,0 +1,3 @@ +^[^:]*: Assembler messages: +^[^:]*:16: Warning: IT blocks containing 16-bit Thumb instructions of the following class are deprecated in ARMv8: Short branches, Undefined, SVC, LDM/STM +^[^:]*:21: Warning: IT blocks containing 32-bit Thumb instructions are deprecated in ARMv8 diff --git a/gas/testsuite/gas/arm/udf.s b/gas/testsuite/gas/arm/udf.s new file mode 100644 index 0000000..d85b88f --- /dev/null +++ b/gas/testsuite/gas/arm/udf.s @@ -0,0 +1,24 @@ + .syntax unified + +arm: .arm + udf + udf #0xabcd + +thumb: .thumb + udf #0xab + udf.n #0xcd + udf + nop + udf.w + udf #0x1234 + udf.w #0xccdd + it eq + udf #0x12 + udf #0x23 + udf #0x34 + udf #0x56 + it ne + udf #0x1234 + udf #0x2345 + udf #0x3456 + udf #0x5678 -- cgit v1.1