aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2020-09-10 09:58:15 +0100
committerNick Clifton <nickc@redhat.com>2020-09-10 09:58:15 +0100
commit0332f66274a72dad611053a1183649092b090a58 (patch)
tree522becae3efb39a79ff8fd48518d26105640303d /opcodes
parent23bef3fea380f383f910fd48f9d4f5633ee0d366 (diff)
downloadgdb-0332f66274a72dad611053a1183649092b090a58.zip
gdb-0332f66274a72dad611053a1183649092b090a58.tar.gz
gdb-0332f66274a72dad611053a1183649092b090a58.tar.bz2
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.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog5
-rw-r--r--opcodes/csky-dis.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index cbd62b7..d026e10 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 78ff055..450a9be 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;
}