summaryrefslogtreecommitdiff
path: root/opcodes/sparc-dis.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2002-02-11 13:24:51 +0000
committerAlexandre Oliva <aoliva@redhat.com>2002-02-11 13:24:51 +0000
commit210753856d6e8c9b7e16b0d1cb543724d0c1b4f4 (patch)
tree37cd84dc5ebadc963145d1b967e6c99ca2f662a7 /opcodes/sparc-dis.c
parent464509193c28dd7e2c75cc6d8c89229437201192 (diff)
downloadgdb-210753856d6e8c9b7e16b0d1cb543724d0c1b4f4.tar.gz
* sparc-dis.c (print_insn_sparc): Make sure 0xFFFFFFFF is not
sign-extended.
Diffstat (limited to 'opcodes/sparc-dis.c')
-rw-r--r--opcodes/sparc-dis.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/opcodes/sparc-dis.c b/opcodes/sparc-dis.c
index 359050723d4..4c59398d54d 100644
--- a/opcodes/sparc-dis.c
+++ b/opcodes/sparc-dis.c
@@ -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