* sparc-dis.c (print_insn_sparc): Make sure 0xFFFFFFFF is not
authorAlexandre Oliva <aoliva@redhat.com>
Mon, 11 Feb 2002 13:24:51 +0000 (13:24 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Mon, 11 Feb 2002 13:24:51 +0000 (13:24 +0000)
sign-extended.

opcodes/ChangeLog
opcodes/sparc-dis.c

index 21fb7ee64582fdf7059b9b5c42e579a03e1dc7f5..a6a07e390bf1fc039006a95f99b97bd70b7ca466 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-11  Alexandre Oliva  <aoliva@redhat.com>
+
+       * sparc-dis.c (print_insn_sparc): Make sure 0xFFFFFFFF is not
+       sign-extended.
+
 2002-02-11  Alan Modra  <amodra@bigpond.net.au>
 
        * Makefile.am: "make dep-am".
index 359050723d4dd3ce1bfba829f4ae96600ba7d875..4c59398d54dd3b59a25a4c77ab4aa6f5f7eeea70 100644 (file)
@@ -419,7 +419,7 @@ print_insn_sparc (memaddr, info)
 
                  case 'h':
                    (*info->fprintf_func) (stream, "%%hi(%#x)",
-                                          (0xFFFFFFFF
+                                          ((unsigned) 0xFFFFFFFF
                                            & ((int) X_IMM22 (insn) << 10)));
                    break;
 
@@ -716,7 +716,8 @@ print_insn_sparc (memaddr, info)
                    {
                      (*info->fprintf_func) (stream, "\t! ");
                      info->target = 
-                       (0xFFFFFFFF & (int) X_IMM22 (prev_insn) << 10);
+                       ((unsigned) 0xFFFFFFFF
+                        & ((int) X_IMM22 (prev_insn) << 10));
                      if (imm_added_to_rs1)
                        info->target += X_SIMM (insn, 13);
                      else
This page took 0.043687 seconds and 4 git commands to generate.