From 885fc2570fb532bed3be36d73dccddb01511a9d5 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Sat, 12 Mar 2005 18:25:47 +0000 Subject: [PATCH] gas: * config/tc-arm.c (tinsns): Add ARMv6K instructions sev, wfe, wfi, yield. opcodes: * arm-dis.c (thumb_opcodes): Add ARMv6K instructions nop, sev, wfe, wfi, yield. gas/testsuite: * gas/arm/thumbv6k.d, gas/arm/thumbv6k.s: New dump test. * gas/arm/arm.exp: Run it. --- gas/ChangeLog | 5 +++++ gas/config/tc-arm.c | 6 ++++++ gas/testsuite/ChangeLog | 7 ++++++- gas/testsuite/gas/arm/arm.exp | 1 + gas/testsuite/gas/arm/thumbv6k.d | 15 +++++++++++++++ gas/testsuite/gas/arm/thumbv6k.s | 14 ++++++++++++++ opcodes/ChangeLog | 1 + opcodes/arm-dis.c | 7 +++++++ 8 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 gas/testsuite/gas/arm/thumbv6k.d create mode 100644 gas/testsuite/gas/arm/thumbv6k.s diff --git a/gas/ChangeLog b/gas/ChangeLog index 57fd9610301..ec62da610de 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2005-03-12 Zack Weinberg + + * config/tc-arm.c (tinsns): Add ARMv6K instructions sev, wfe, + wfi, yield. + 2005-03-11 Daniel Jacobowitz * config-gas.com: Mark vax-vms as obsolete. diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 6976d88a3a1..3ab5aa1524a 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -10950,6 +10950,12 @@ static const struct thumb_opcode tinsns[] = {"sxtb", 0xb240, 2, ARM_EXT_V6, do_t_arit}, {"uxth", 0xb280, 2, ARM_EXT_V6, do_t_arit}, {"uxtb", 0xb2c0, 2, ARM_EXT_V6, do_t_arit}, + + /* ARM V6K. */ + {"sev", 0xbf40, 2, ARM_EXT_V6K, do_empty}, + {"wfe", 0xbf20, 2, ARM_EXT_V6K, do_empty}, + {"wfi", 0xbf30, 2, ARM_EXT_V6K, do_empty}, + {"yield", 0xbf10, 2, ARM_EXT_V6K, do_empty}, }; void diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 521d59cb722..09706cfe982 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,6 +1,11 @@ +2005-03-12 Zack Weinberg + + * gas/arm/thumbv6k.d, gas/arm/thumbv6k.s: New dump test. + * gas/arm/arm.exp: Run it. + 2005-03-10 Aldy Hernandez - * gas/ppc/e500.d: Fix encoding of efscfd. + * gas/ppc/e500.d: Fix encoding of efscfd. 2005-03-10 Jeff Baker Alan Modra diff --git a/gas/testsuite/gas/arm/arm.exp b/gas/testsuite/gas/arm/arm.exp index 872e62bf69e..a84c80b0931 100644 --- a/gas/testsuite/gas/arm/arm.exp +++ b/gas/testsuite/gas/arm/arm.exp @@ -50,6 +50,7 @@ if {[istarget *arm*-*-*] || [istarget "xscale-*-*"]} then { run_dump_test "maverick" run_dump_test "archv6" run_dump_test "thumbv6" + run_dump_test "thumbv6k" run_dump_test "arch6zk" run_errors_test "vfp-bad" "-mfpu=vfp" "VFP errors" diff --git a/gas/testsuite/gas/arm/thumbv6k.d b/gas/testsuite/gas/arm/thumbv6k.d new file mode 100644 index 00000000000..54a1d31ca63 --- /dev/null +++ b/gas/testsuite/gas/arm/thumbv6k.d @@ -0,0 +1,15 @@ +#name: THUMB V6K instructions +#as: -march=armv6k -mthumb +#objdump: -dr --prefix-addresses --show-raw-insn -M force-thumb + +.*: +file format .*arm.* + +Disassembly of section .text: +0+000 <[^>]*> bf10 * yield +0+002 <[^>]*> bf20 * wfe +0+004 <[^>]*> bf30 * wfi +0+006 <[^>]*> bf40 * sev +0+008 <[^>]*> 46c0 * nop[ \t]+\(mov r8, r8\) +0+00a <[^>]*> 46c0 * nop[ \t]+\(mov r8, r8\) +0+00c <[^>]*> 46c0 * nop[ \t]+\(mov r8, r8\) +0+00e <[^>]*> 46c0 * nop[ \t]+\(mov r8, r8\) diff --git a/gas/testsuite/gas/arm/thumbv6k.s b/gas/testsuite/gas/arm/thumbv6k.s new file mode 100644 index 00000000000..86198432396 --- /dev/null +++ b/gas/testsuite/gas/arm/thumbv6k.s @@ -0,0 +1,14 @@ + .text + .align 0 + .thumb +label: + yield + wfe + wfi + sev + # arm-aout wants the segment padded to an 16-byte boundary; + # do this explicitly so it's consistent for all object formats. + nop + nop + nop + nop diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 883c7a954a4..684695b4ade 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -4,6 +4,7 @@ Add entries for v6T2 ARM instructions: bfc bfi mls strht ldrht ldrsht ldrsbt movw movt rbit ubfx sbfx. (print_insn_arm): Add support for %E and %V. + (thumb_opcodes): Add ARMv6K instructions nop, sev, wfe, wfi, yield. 2005-03-10 Jeff Baker Alan Modra diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c index 3ec809027c7..a87bcc0b2f8 100644 --- a/opcodes/arm-dis.c +++ b/opcodes/arm-dis.c @@ -635,6 +635,13 @@ static const struct thumb_opcode thumb_opcodes[] = { /* Thumb instructions. */ + /* ARM V6K no-argument instructions. */ + {ARM_EXT_V6K, 0xbf00, 0xffff, "nop"}, + {ARM_EXT_V6K, 0xbf10, 0xffff, "yield"}, + {ARM_EXT_V6K, 0xbf20, 0xffff, "wfe"}, + {ARM_EXT_V6K, 0xbf30, 0xffff, "wfi"}, + {ARM_EXT_V6K, 0xbf40, 0xffff, "sev"}, + /* ARM V6. */ {ARM_EXT_V6, 0xb660, 0xfff8, "cpsie\t%2'a%1'i%0'f"}, {ARM_EXT_V6, 0xb670, 0xfff8, "cpsid\t%2'a%1'i%0'f"}, -- 2.30.2