This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Re: PowerPC Improve support for Gekko & Broadway


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=16065af1b0497ea33b53948dfd1f64f551787959

commit 16065af1b0497ea33b53948dfd1f64f551787959
Author: Alan Modra <amodra@gmail.com>
Date:   Fri Jul 27 08:19:45 2018 +0930

    Re: PowerPC Improve support for Gekko & Broadway
    
    PowerPC has replaced use of "long" for insns with "int64_t", in
    preparation for 64-bit power10 insns.
    
    	* ppc-opc.c (insert_sprbat): Correct function parameter and
    	return type.
    	(extract_sprbat): Likewise, variable too.

Diff:
---
 opcodes/ChangeLog |  6 ++++++
 opcodes/ppc-opc.c | 12 ++++++------
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 88286af..ff652dc 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,9 @@
+2018-07-27  Alan Modra  <amodra@gmail.com>
+
+	* ppc-opc.c (insert_sprbat): Correct function parameter and
+	return type.
+	(extract_sprbat): Likewise, variable too.
+
 2018-07-26  Alex Chadwick  <Alex.Chadwick@cl.cam.ac.uk>
 	    Alan Modra  <amodra@gmail.com>
 
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
index 03891a4..df2f0cd 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
@@ -1190,9 +1190,9 @@ extract_spr (uint64_t insn,
 /* Some dialects have 8 [DI]BAT registers instead of the standard 4.  */
 #define ALLOW8_BAT (PPC_OPCODE_750)
 
-static unsigned long
-insert_sprbat (unsigned long insn,
-	       long value,
+static uint64_t
+insert_sprbat (uint64_t insn,
+	       int64_t value,
 	       ppc_cpu_t dialect,
 	       const char **errmsg)
 {
@@ -1209,12 +1209,12 @@ insert_sprbat (unsigned long insn,
   return insn | (value << 11);
 }
 
-static long
-extract_sprbat (unsigned long insn,
+static int64_t
+extract_sprbat (uint64_t insn,
 		ppc_cpu_t dialect,
 		int *invalid)
 {
-  unsigned long val = (insn >> 17) & 0x3;
+  uint64_t val = (insn >> 17) & 0x3;
 
   val = val + ((insn >> 9) & 0x4);
   if (val > 3 && (dialect & ALLOW8_BAT) == 0)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]