projects
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
x86: FMA4 scalar insns ignore VEX.L
[binutils-gdb.git]
/
opcodes
/
d30v-dis.c
diff --git
a/opcodes/d30v-dis.c
b/opcodes/d30v-dis.c
index 61bb16d6d252b1f08c8c286e0d0763999576866e..ba43731122d80f24995261377e7ba7763d69817f 100644
(file)
--- 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 is_long,
int show_ext)
{
-
int val, opnum, need_comma = 0
;
+
unsigned int val, opnum
;
const struct d30v_operand *oper;
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);
unsigned int opind = 0;
(*info->fprintf_func) (info->stream, "%s", insn->op->name);
@@
-271,14
+271,10
@@
print_insn (struct disassemble_info *info,
/* IMM6S3 is unsigned. */
if (oper->flags & OPERAND_SIGNED || bits == 32)
{
/* IMM6S3 is unsigned. */
if (oper->flags & OPERAND_SIGNED || bits == 32)
{
- long max;
- max = (1 << (bits - 1));
- if (val & max)
+ unsigned int sign = 1u << (bits - 1);
+ if (val & sign)
{
{
- if (bits == 32)
- val = -val;
- else
- val = -val & ((1 << bits) - 1);
+ val = -val & (sign + sign - 1);
neg = 1;
}
}
neg = 1;
}
}
@@
-303,13
+299,11
@@
print_insn (struct disassemble_info *info,
{
if (oper->flags & OPERAND_SIGNED)
{
{
if (oper->flags & OPERAND_SIGNED)
{
-
int max = (1 << (bits - 1)
);
+
unsigned int sign = 1u << (bits - 1
);
- if (val &
max
)
+ if (val &
sign
)
{
{
- val = -val;
- if (bits < 32)
- val &= ((1 << bits) - 1);
+ val = -val & (sign + sign - 1);
(*info->fprintf_func) (info->stream, "-");
}
}
(*info->fprintf_func) (info->stream, "-");
}
}