[binutils-gdb] ubsan: d30v: negation of -2147483648

Alan Modra amodra@sourceware.org
Tue Feb 4 03:42:00 GMT 2020


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

commit c5d7be0c97a75ff20b49d57bff078360464125fb
Author: Alan Modra <amodra@gmail.com>
Date:   Tue Feb 4 08:30:22 2020 +1030

    ubsan: d30v: negation of -2147483648
    
    include/
    	* opcode/d30v.h (struct pd_reg): Make value field unsigned.
    opcodes/
    	* d30v-dis.c (print_insn): Make "val" and "opnum" unsigned.

Diff:
---
 include/ChangeLog     | 4 ++++
 include/opcode/d30v.h | 2 +-
 opcodes/ChangeLog     | 4 ++++
 opcodes/d30v-dis.c    | 4 ++--
 4 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/include/ChangeLog b/include/ChangeLog
index 8185e61..1a37078 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2020-02-04  Alan Modra  <amodra@gmail.com>
+
+	* opcode/d30v.h (struct pd_reg): Make value field unsigned.
+
 2020-01-16  Jon Turney  <jon.turney@dronecode.org.uk>
 
 	* coff/internal.h (PE_IMAGE_DEBUG_TYPE_VC_FEATURE)
diff --git a/include/opcode/d30v.h b/include/opcode/d30v.h
index 2694d6d..4ba2c45 100644
--- a/include/opcode/d30v.h
+++ b/include/opcode/d30v.h
@@ -33,7 +33,7 @@ struct pd_reg
 {
   char *name;		/* name to recognize */
   char *pname;		/* name to print for this register */
-  int value;
+  unsigned int value;
 };
 
 extern const struct pd_reg pre_defined_registers[];
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 126025a..a410612 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,7 @@
+2020-02-04  Alan Modra  <amodra@gmail.com>
+
+	* d30v-dis.c (print_insn): Make "val" and "opnum" unsigned.
+
 2020-02-03  Alan Modra  <amodra@gmail.com>
 
 	* m32c-ibld.c: Regenerate.
diff --git a/opcodes/d30v-dis.c b/opcodes/d30v-dis.c
index 212d24a..ba43731 100644
--- a/opcodes/d30v-dis.c
+++ b/opcodes/d30v-dis.c
@@ -123,9 +123,9 @@ print_insn (struct disassemble_info *info,
 	    int is_long,
 	    int show_ext)
 {
-  int val, opnum, need_comma = 0;
+  unsigned int val, opnum;
   const struct d30v_operand *oper;
-  int i, match, need_paren = 0, found_control = 0;
+  int i, match, need_comma = 0, need_paren = 0, found_control = 0;
   unsigned int opind = 0;
 
   (*info->fprintf_func) (info->stream, "%s", insn->op->name);



More information about the Binutils-cvs mailing list