Fix compile time warnings when building for the CSKY target on a 32-bit host.
authorNick Clifton <nickc@redhat.com>
Thu, 10 Sep 2020 08:58:15 +0000 (09:58 +0100)
committerNick Clifton <nickc@redhat.com>
Thu, 10 Sep 2020 08:58:15 +0000 (09:58 +0100)
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.

include/ChangeLog
include/opcode/csky.h
opcodes/ChangeLog
opcodes/csky-dis.c

index 28779bc6e486ef1cf6c344197751fd0ea0bdecae..2c0a0085f58a6d2e81e50d3c4164d7533f464d7b 100644 (file)
@@ -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.
index 421454383e8e5d1f057bc48ba2060b9542fe75d8..717e8a949d18605719a011346a0b527abc3e6a31 100644 (file)
@@ -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)
index cbd62b786d5ebb4345b9ad525dae93f56fe2fcaa..d026e1059aa9fd3565350fd8771c9d91a9b538e6 100644 (file)
@@ -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.
index 78ff055c3dbd7a3444c99d1ab1d64bc8ef39fc42..450a9bed0bf17ad92ba17edd6e5c62a2b45ad1e3 100644 (file)
@@ -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;
       }
This page took 0.029413 seconds and 4 git commands to generate.