public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Add SFENCE.VMA instruction
@ 2017-02-15  0:46 Palmer Dabbelt
  0 siblings, 0 replies; 6+ messages in thread
From: Palmer Dabbelt @ 2017-02-15  0:46 UTC (permalink / raw)
  To: binutils; +Cc: Andrew Waterman

From: Andrew Waterman <andrew@sifive.com>

include/ChangeLog:

2017-02-14  Andrew Waterman  <andrew@sifive.com>

        * opcode/riscv-opc.h (MATCH_SFENCE_VMA): New define.
        (MASK_SFENCE_VMA): Likewise.
        (sfence_vma): Declare instruction.

opcodes/ChangeLog:

2017-02-14  Andrew Waterman  <andrew@sifive.com>

        * riscv-opc.c (riscv_opcodes): Add sfence.vma instruction and
        pseudoinstructions.
---
 include/ChangeLog          | 6 ++++++
 include/opcode/riscv-opc.h | 3 +++
 opcodes/ChangeLog          | 5 +++++
 opcodes/riscv-opc.c        | 3 +++
 4 files changed, 17 insertions(+)

diff --git a/include/ChangeLog b/include/ChangeLog
index e90166c..7e59ea2 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,9 @@
+2017-02-14  Andrew Waterman  <andrew@sifive.com>
+
+	* opcode/riscv-opc.h (MATCH_SFENCE_VMA): New define.
+	(MASK_SFENCE_VMA): Likewise.
+	(sfence_vma): Declare instruction.
+
 2017-02-14  Alan Modra  <amodra@gmail.com>
 
 	PR 21118
diff --git a/include/opcode/riscv-opc.h b/include/opcode/riscv-opc.h
index 09d680b..dd58053 100644
--- a/include/opcode/riscv-opc.h
+++ b/include/opcode/riscv-opc.h
@@ -227,6 +227,8 @@
 #define MASK_DRET  0xffffffff
 #define MATCH_SFENCE_VM 0x10400073
 #define MASK_SFENCE_VM  0xfff07fff
+#define MATCH_SFENCE_VMA 0x12000073
+#define MASK_SFENCE_VMA  0xfe007fff
 #define MATCH_WFI 0x10500073
 #define MASK_WFI  0xffffffff
 #define MATCH_CSRRW 0x1073
@@ -883,6 +885,7 @@ DECLARE_INSN(hret, MATCH_HRET, MASK_HRET)
 DECLARE_INSN(mret, MATCH_MRET, MASK_MRET)
 DECLARE_INSN(dret, MATCH_DRET, MASK_DRET)
 DECLARE_INSN(sfence_vm, MATCH_SFENCE_VM, MASK_SFENCE_VM)
+DECLARE_INSN(sfence_vma, MATCH_SFENCE_VMA, MASK_SFENCE_VMA)
 DECLARE_INSN(wfi, MATCH_WFI, MASK_WFI)
 DECLARE_INSN(csrrw, MATCH_CSRRW, MASK_CSRRW)
 DECLARE_INSN(csrrs, MATCH_CSRRS, MASK_CSRRS)
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index eafd7d2..bf81dde 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2017-02-14  Andrew Waterman  <andrew@sifive.com>
+
+	* riscv-opc.c (riscv_opcodes): Add sfence.vma instruction and
+	pseudoinstructions.
+
 2017-02-14  Alan Modra  <amodra@gmail.com>
 
 	PR 21118
diff --git a/opcodes/riscv-opc.c b/opcodes/riscv-opc.c
index cc39390..61d0159 100644
--- a/opcodes/riscv-opc.c
+++ b/opcodes/riscv-opc.c
@@ -678,6 +678,9 @@ const struct riscv_opcode riscv_opcodes[] =
 {"dret",      "I",   "",     MATCH_DRET, MASK_DRET, match_opcode, 0 },
 {"sfence.vm", "I",   "",     MATCH_SFENCE_VM, MASK_SFENCE_VM | MASK_RS1, match_opcode, 0 },
 {"sfence.vm", "I",   "s",    MATCH_SFENCE_VM, MASK_SFENCE_VM, match_opcode, 0 },
+{"sfence.vma","I",   "",     MATCH_SFENCE_VMA, MASK_SFENCE_VMA | MASK_RS1 | MASK_RS2, match_opcode, INSN_ALIAS },
+{"sfence.vma","I",   "s",    MATCH_SFENCE_VMA, MASK_SFENCE_VMA | MASK_RS2, match_opcode, INSN_ALIAS },
+{"sfence.vma","I",   "s,t",  MATCH_SFENCE_VMA, MASK_SFENCE_VMA, match_opcode, 0 },
 {"wfi",       "I",   "",     MATCH_WFI, MASK_WFI, match_opcode, 0 },
 
 /* Terminate the list.  */
-- 
2.10.2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add SFENCE.VMA instruction
  2017-02-16  1:12       ` Alan Modra
@ 2017-03-03 12:28         ` Maciej W. Rozycki
  0 siblings, 0 replies; 6+ messages in thread
From: Maciej W. Rozycki @ 2017-03-03 12:28 UTC (permalink / raw)
  To: Alan Modra
  Cc: Palmer Dabbelt, Nick Clifton, binutils, Tristan Gingold, Andrew Waterman

On Thu, 16 Feb 2017, Alan Modra wrote:

> > I've been using "git-merge-changelog" to merge my ChangeLog entries and haven't
> > had a merge conflict yet.
> 
> Good point.  I've been wondering about a change to our policy about
> ChangeLog diffs for a while.  With git and git-merge-changelog it is
> actually *less* work for a maintainer to apply a patch if the diff
> includes the ChangeLog.  You just save the email to a temporary empty
> mailbox somewhere, then "git am <mailbox>" plus perhaps a little
> editing of the commit message and adding generated files.

 Or use a mailer that has a `pipe message' command even. :)

  Maciej

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add SFENCE.VMA instruction
  2017-02-15 18:39     ` Palmer Dabbelt
@ 2017-02-16  1:12       ` Alan Modra
  2017-03-03 12:28         ` Maciej W. Rozycki
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Modra @ 2017-02-16  1:12 UTC (permalink / raw)
  To: Palmer Dabbelt; +Cc: nickc, binutils, Tristan Gingold, Andrew Waterman

On Wed, Feb 15, 2017 at 10:39:23AM -0800, Palmer Dabbelt wrote:
> On Wed, 15 Feb 2017 03:33:40 PST (-0800), nickc@redhat.com wrote:
> > Note - it is customary to include ChangeLog entries as plain text rather
> > than context diffs.  This is because the changelogs change so rapidly that
> > it is often not possible to apply a patch cleanly if they contain changelog
> > diffs.
> 
> I've been using "git-merge-changelog" to merge my ChangeLog entries and haven't
> had a merge conflict yet.

Good point.  I've been wondering about a change to our policy about
ChangeLog diffs for a while.  With git and git-merge-changelog it is
actually *less* work for a maintainer to apply a patch if the diff
includes the ChangeLog.  You just save the email to a temporary empty
mailbox somewhere, then "git am <mailbox>" plus perhaps a little
editing of the commit message and adding generated files.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add SFENCE.VMA instruction
  2017-02-15 11:33   ` Nick Clifton
@ 2017-02-15 18:39     ` Palmer Dabbelt
  2017-02-16  1:12       ` Alan Modra
  0 siblings, 1 reply; 6+ messages in thread
From: Palmer Dabbelt @ 2017-02-15 18:39 UTC (permalink / raw)
  To: nickc; +Cc: binutils, Tristan Gingold, Andrew Waterman

On Wed, 15 Feb 2017 03:33:40 PST (-0800), nickc@redhat.com wrote:
> Hi Palmer,
>
>> include/ChangeLog:
>> 2017-02-14  Andrew Waterman  <andrew@sifive.com>
>>
>>         * opcode/riscv-opc.h (MATCH_SFENCE_VMA): New define.
>>         (MASK_SFENCE_VMA): Likewise.
>>         (sfence_vma): Declare instruction.
>>
>> opcodes/ChangeLog:
>> 2017-02-14  Andrew Waterman  <andrew@sifive.com>
>>
>>         * riscv-opc.c (riscv_opcodes): Add sfence.vma instruction and
>>         pseudoinstructions.
>
> OK for trunk.

Thanks!

>> diff --git a/include/ChangeLog b/include/ChangeLog
>> index 6a61d61..df14aca 100644
>> --- a/include/ChangeLog
>> +++ b/include/ChangeLog
>> @@ -1,3 +1,9 @@
>> +2017-02-14  Andrew Waterman  <andrew@sifive.com>
>> +
>> +	* opcode/riscv-opc.h (MATCH_SFENCE_VMA): New define.
>> +	(MASK_SFENCE_VMA): Likewise.
>> +	(sfence_vma): Declare instruction.
>> +
>
> Note - it is customary to include ChangeLog entries as plain text rather
> than context diffs.  This is because the changelogs change so rapidly that
> it is often not possible to apply a patch cleanly if they contain changelog
> diffs.

I've been using "git-merge-changelog" to merge my ChangeLog entries and haven't
had a merge conflict yet.  If you'd like I can drop them from the mailing list
posts, but it's slightly easier for me to keep everything together.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add SFENCE.VMA instruction
  2017-02-15  0:55 ` [PATCH] " Palmer Dabbelt
@ 2017-02-15 11:33   ` Nick Clifton
  2017-02-15 18:39     ` Palmer Dabbelt
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Clifton @ 2017-02-15 11:33 UTC (permalink / raw)
  To: Palmer Dabbelt, binutils, Tristan Gingold; +Cc: Andrew Waterman

Hi Palmer,

> include/ChangeLog:
> 2017-02-14  Andrew Waterman  <andrew@sifive.com>
> 
>         * opcode/riscv-opc.h (MATCH_SFENCE_VMA): New define.
>         (MASK_SFENCE_VMA): Likewise.
>         (sfence_vma): Declare instruction.
> 
> opcodes/ChangeLog:
> 2017-02-14  Andrew Waterman  <andrew@sifive.com>
> 
>         * riscv-opc.c (riscv_opcodes): Add sfence.vma instruction and
>         pseudoinstructions.

OK for trunk.

> diff --git a/include/ChangeLog b/include/ChangeLog
> index 6a61d61..df14aca 100644
> --- a/include/ChangeLog
> +++ b/include/ChangeLog
> @@ -1,3 +1,9 @@
> +2017-02-14  Andrew Waterman  <andrew@sifive.com>
> +
> +	* opcode/riscv-opc.h (MATCH_SFENCE_VMA): New define.
> +	(MASK_SFENCE_VMA): Likewise.
> +	(sfence_vma): Declare instruction.
> +

Note - it is customary to include ChangeLog entries as plain text rather
than context diffs.  This is because the changelogs change so rapidly that
it is often not possible to apply a patch cleanly if they contain changelog
diffs.

Cheers
  Nick

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] Add SFENCE.VMA instruction
  2017-02-15  0:55 binutils-2_28-branch: " Palmer Dabbelt
@ 2017-02-15  0:55 ` Palmer Dabbelt
  2017-02-15 11:33   ` Nick Clifton
  0 siblings, 1 reply; 6+ messages in thread
From: Palmer Dabbelt @ 2017-02-15  0:55 UTC (permalink / raw)
  To: binutils, Tristan Gingold; +Cc: Andrew Waterman, Andrew Waterman

From: Andrew Waterman <andrew@sifive.com>

include/ChangeLog:

2017-02-14  Andrew Waterman  <andrew@sifive.com>

        * opcode/riscv-opc.h (MATCH_SFENCE_VMA): New define.
        (MASK_SFENCE_VMA): Likewise.
        (sfence_vma): Declare instruction.

opcodes/ChangeLog:

2017-02-14  Andrew Waterman  <andrew@sifive.com>

        * riscv-opc.c (riscv_opcodes): Add sfence.vma instruction and
        pseudoinstructions.
---
 include/ChangeLog          | 6 ++++++
 include/opcode/riscv-opc.h | 3 +++
 opcodes/ChangeLog          | 5 +++++
 opcodes/riscv-opc.c        | 3 +++
 4 files changed, 17 insertions(+)

diff --git a/include/ChangeLog b/include/ChangeLog
index 6a61d61..df14aca 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,9 @@
+2017-02-14  Andrew Waterman  <andrew@sifive.com>
+
+	* opcode/riscv-opc.h (MATCH_SFENCE_VMA): New define.
+	(MASK_SFENCE_VMA): Likewise.
+	(sfence_vma): Declare instruction.
+
 2017-01-02  Alan Modra  <amodra@gmail.com>
 
 	Update year range in copyright notice of all files.
diff --git a/include/opcode/riscv-opc.h b/include/opcode/riscv-opc.h
index d10c7f8..cef2f3c 100644
--- a/include/opcode/riscv-opc.h
+++ b/include/opcode/riscv-opc.h
@@ -227,6 +227,8 @@
 #define MASK_DRET  0xffffffff
 #define MATCH_SFENCE_VM 0x10400073
 #define MASK_SFENCE_VM  0xfff07fff
+#define MATCH_SFENCE_VMA 0x12000073
+#define MASK_SFENCE_VMA  0xfe007fff
 #define MATCH_WFI 0x10500073
 #define MASK_WFI  0xffffffff
 #define MATCH_CSRRW 0x1073
@@ -815,6 +817,7 @@ DECLARE_INSN(hret, MATCH_HRET, MASK_HRET)
 DECLARE_INSN(mret, MATCH_MRET, MASK_MRET)
 DECLARE_INSN(dret, MATCH_DRET, MASK_DRET)
 DECLARE_INSN(sfence_vm, MATCH_SFENCE_VM, MASK_SFENCE_VM)
+DECLARE_INSN(sfence_vma, MATCH_SFENCE_VMA, MASK_SFENCE_VMA)
 DECLARE_INSN(wfi, MATCH_WFI, MASK_WFI)
 DECLARE_INSN(csrrw, MATCH_CSRRW, MASK_CSRRW)
 DECLARE_INSN(csrrs, MATCH_CSRRS, MASK_CSRRS)
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index d096ce1..04822ad 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2017-02-14  Andrew Waterman  <andrew@sifive.com>
+
+	* riscv-opc.c (riscv_opcodes): Add sfence.vma instruction and
+	pseudoinstructions.
+
 2017-02-11  Stafford Horne  <shorne@gmail.com>
 	    Alan Modra  <amodra@gmail.com>
 
diff --git a/opcodes/riscv-opc.c b/opcodes/riscv-opc.c
index 0a6f36f..867a026 100644
--- a/opcodes/riscv-opc.c
+++ b/opcodes/riscv-opc.c
@@ -618,6 +618,9 @@ const struct riscv_opcode riscv_opcodes[] =
 {"dret",      "I",   "",     MATCH_DRET, MASK_DRET, match_opcode, 0 },
 {"sfence.vm", "I",   "",     MATCH_SFENCE_VM, MASK_SFENCE_VM | MASK_RS1, match_opcode, 0 },
 {"sfence.vm", "I",   "s",    MATCH_SFENCE_VM, MASK_SFENCE_VM, match_opcode, 0 },
+{"sfence.vma","I",   "",     MATCH_SFENCE_VMA, MASK_SFENCE_VMA | MASK_RS1 | MASK_RS2, match_opcode, INSN_ALIAS },
+{"sfence.vma","I",   "s",    MATCH_SFENCE_VMA, MASK_SFENCE_VMA | MASK_RS2, match_opcode, INSN_ALIAS },
+{"sfence.vma","I",   "s,t",  MATCH_SFENCE_VMA, MASK_SFENCE_VMA, match_opcode, 0 },
 {"wfi",       "I",   "",     MATCH_WFI, MASK_WFI, match_opcode, 0 },
 
 /* Terminate the list.  */
-- 
2.10.2

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-03-03 12:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-15  0:46 [PATCH] Add SFENCE.VMA instruction Palmer Dabbelt
2017-02-15  0:55 binutils-2_28-branch: " Palmer Dabbelt
2017-02-15  0:55 ` [PATCH] " Palmer Dabbelt
2017-02-15 11:33   ` Nick Clifton
2017-02-15 18:39     ` Palmer Dabbelt
2017-02-16  1:12       ` Alan Modra
2017-03-03 12:28         ` Maciej W. Rozycki

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).