projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a test case for skip with inlined functions
[deliverable/binutils-gdb.git]
/
opcodes
/
v850-dis.c
diff --git
a/opcodes/v850-dis.c
b/opcodes/v850-dis.c
index f8b5d1c93f29b8e41ad46688e155476e1bddd6a7..45e6c65d83a19c25ee866b4d6e4334bcf03e95f2 100644
(file)
--- a/
opcodes/v850-dis.c
+++ b/
opcodes/v850-dis.c
@@
-88,7
+88,7
@@
get_operand_value (const struct v850_operand *operand,
bfd_boolean noerror,
int *invalid)
{
bfd_boolean noerror,
int *invalid)
{
- long value;
+
unsigned
long value;
bfd_byte buffer[4];
if ((operand->flags & V850E_IMMEDIATE16)
bfd_byte buffer[4];
if ((operand->flags & V850E_IMMEDIATE16)
@@
-158,11
+158,13
@@
get_operand_value (const struct v850_operand *operand,
if (operand->bits == -1)
value = (insn & operand->shift);
else
if (operand->bits == -1)
value = (insn & operand->shift);
else
- value = (insn >> operand->shift) & ((1 << operand->bits) - 1);
+ value = (insn >> operand->shift) & ((1
ul
<< operand->bits) - 1);
if (operand->flags & V850_OPERAND_SIGNED)
if (operand->flags & V850_OPERAND_SIGNED)
- value = ((long)(value << (sizeof (long)*8 - operand->bits))
- >> (sizeof (long)*8 - operand->bits));
+ {
+ unsigned long sign = 1ul << (operand->bits - 1);
+ value = (value ^ sign) - sign;
+ }
}
return value;
}
return value;
This page took
0.023341 seconds
and
4
git commands to generate.