public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Zack Weinberg <zack@codesourcery.com>
To: Nick Clifton <nickc@redhat.com>
Cc: binutils@sources.redhat.com
Subject: Re: PATCH: Additional Thumb instructions for ARMv6K
Date: Thu, 10 Mar 2005 17:45:00 -0000	[thread overview]
Message-ID: <87psy7l7i8.fsf@codesourcery.com> (raw)
In-Reply-To: <422EEE54.80006@redhat.com> (Nick Clifton's message of "Wed, 09 Mar 2005 12:38:44 +0000")

Nick Clifton <nickc@redhat.com> writes:

> Hi Zack,
>
>> The only possibly problematic part of this patch is the NOP changes.
>
> Do you have a patch for the ARM simulator to handle these new
> instructions ?  Especially the NOP instruction ?

I don't.  CodeSourcery's client is not paying us to improve the
simulator, and there are also intellectual-property issues.

This version of the patch drops the NOP changes (except for the
disassembler recognizing 0xbf00 as a Thumb NOP).  Will you take this
without corresponding simulator improvements?

zw

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.

===================================================================
Index: gas/config/tc-arm.c
--- gas/config/tc-arm.c	23 Feb 2005 12:28:03 -0000	1.193
+++ gas/config/tc-arm.c	10 Mar 2005 17:43:18 -0000
@@ -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
===================================================================
Index: gas/testsuite/gas/arm/arm.exp
--- gas/testsuite/gas/arm/arm.exp	4 Mar 2005 15:28:36 -0000	1.35
+++ gas/testsuite/gas/arm/arm.exp	10 Mar 2005 17:43:18 -0000
@@ -50,6 +50,7 @@ if {[istarget *arm*-*-*] || [istarget "x
     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"
===================================================================
Index: gas/testsuite/gas/arm/thumbv6k.d
--- gas/testsuite/gas/arm/thumbv6k.d	1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/arm/thumbv6k.d	10 Mar 2005 17:43:18 -0000
@@ -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\)
===================================================================
Index: gas/testsuite/gas/arm/thumbv6k.s
--- gas/testsuite/gas/arm/thumbv6k.s	1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/arm/thumbv6k.s	10 Mar 2005 17:43:18 -0000
@@ -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
===================================================================
Index: opcodes/arm-dis.c
--- opcodes/arm-dis.c	29 Nov 2004 10:12:57 -0000	1.41
+++ opcodes/arm-dis.c	10 Mar 2005 17:43:19 -0000
@@ -622,6 +622,13 @@ static const struct thumb_opcode thumb_o
 {
   /* 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"},

  reply	other threads:[~2005-03-10 17:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-09  1:19 Zack Weinberg
2005-03-09 11:43 ` Richard Earnshaw
2005-03-10 17:09   ` Zack Weinberg
2005-03-09 12:26 ` Nick Clifton
2005-03-10 17:45   ` Zack Weinberg [this message]
2005-03-11 10:27     ` Nick Clifton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87psy7l7i8.fsf@codesourcery.com \
    --to=zack@codesourcery.com \
    --cc=binutils@sources.redhat.com \
    --cc=nickc@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).