[binutils-gdb] Fix compile time warnings when building for the CSKY target on a 32-bit host.
Nick Clifton
nickc@sourceware.org
Thu Sep 10 08:59:06 GMT 2020
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0332f66274a72dad611053a1183649092b090a58
commit 0332f66274a72dad611053a1183649092b090a58
Author: Nick Clifton <nickc@redhat.com>
Date: Thu Sep 10 09:58:15 2020 +0100
Fix compile time warnings when building for the CSKY target on a 32-bit host.
incldue * opcode/csky.h (CSKY_ISA_FLOAT_7E60): Use a long long type for
this value.
opcodes * csky-dis.c (csky_output_operand): Coerce the immediate values to
long before printing.
Diff:
---
include/ChangeLog | 5 +++++
include/opcode/csky.h | 2 +-
opcodes/ChangeLog | 5 +++++
opcodes/csky-dis.c | 2 +-
4 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/include/ChangeLog b/include/ChangeLog
index 28779bc6e48..2c0a0085f58 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,8 @@
+2020-09-10 Nick Clifton <nickc@redhat.com>
+
+ * opcode/csky.h (CSKY_ISA_FLOAT_7E60): Use a long long type for
+ this value.
+
2020-09-07 Cooper Qu <cooper.qu@linux.alibaba.com>
* opcode/csky.h (CSKY_ISA_DSPE60): Define.
diff --git a/include/opcode/csky.h b/include/opcode/csky.h
index 421454383e8..717e8a949d1 100644
--- a/include/opcode/csky.h
+++ b/include/opcode/csky.h
@@ -58,7 +58,7 @@
/* 807 support (803f & 807f). */
#define CSKY_ISA_FLOAT_3E4 (1L << 28)
/* 860 support. */
-#define CSKY_ISA_FLOAT_7E60 (1L << 36)
+#define CSKY_ISA_FLOAT_7E60 (1LL << 36)
/* Vector DSP support. */
#define CSKY_ISA_VDSP (1L << 29)
#define CSKY_ISA_VDSP_2 (1L << 30)
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index cbd62b786d5..d026e1059aa 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2020-09-10 Nick Clifton <nickc@redhat.com>
+
+ * csky-dis.c (csky_output_operand): Coerce the immediate values to
+ long before printing.
+
2020-09-10 Alan Modra <amodra@gmail.com>
* csky-dis.c (csky_output_operand): Don't sprintf str to itself.
diff --git a/opcodes/csky-dis.c b/opcodes/csky-dis.c
index 78ff055c3db..450a9bed0bf 100644
--- a/opcodes/csky-dis.c
+++ b/opcodes/csky-dis.c
@@ -675,7 +675,7 @@ csky_output_operand (char *str, struct operand const *oprnd,
}
double d = 0;
memcpy (&d, &dvalue, sizeof (double));
- sprintf (buf, "%lf\t// imm9:%4ld, imm4:%2ld", d, imm8, imm4);
+ sprintf (buf, "%lf\t// imm9:%4ld, imm4:%2ld", d, (long) imm8, (long) imm4);
strcat (str, buf);
break;
}
More information about the Binutils-cvs
mailing list