ubsan: nios2: left shift cannot be represented in type 'int'

Alan Modra amodra@gmail.com
Wed Dec 11 00:57:00 GMT 2019


	* nios2-dis.c (nios2_print_insn_arg): Use 1u << 31.

diff --git a/opcodes/nios2-dis.c b/opcodes/nios2-dis.c
index 2d63eeda86..adf0091b2a 100644
--- a/opcodes/nios2-dis.c
+++ b/opcodes/nios2-dis.c
@@ -867,7 +867,7 @@ nios2_print_insn_arg (const char *argptr,
 
 	  case iw_L5I4X1_type:
 	    /* Encoding for push.n/pop.n.  */
-	    reglist |= (1 << 31);
+	    reglist |= (1u << 31);
 	    if (GET_IW_L5I4X1_FP (opcode))
 	      reglist |= (1 << 28);
 	    if (GET_IW_L5I4X1_CS (opcode))

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list