projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't write to inferior_ptid in bsd-kvm.c
[deliverable/binutils-gdb.git]
/
opcodes
/
tilepro-opc.c
diff --git
a/opcodes/tilepro-opc.c
b/opcodes/tilepro-opc.c
index 9158d0e7903e624ff483b09583ca801e537d2521..dbe0605e0c6e4d9960cc473758a5588a972961e0 100644
(file)
--- a/
opcodes/tilepro-opc.c
+++ b/
opcodes/tilepro-opc.c
@@
-1,6
+1,6
@@
/* TILEPro opcode information.
/* TILEPro opcode information.
- Copyright
2011
Free Software Foundation, Inc.
+ Copyright
(C) 2011-2020
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-17,9
+17,10
@@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
+#include "sysdep.h"
+
/* This define is BFD_RELOC_##x for real bfd, or -1 for everyone else. */
#define BFD_RELOC(x) BFD_RELOC_##x
/* This define is BFD_RELOC_##x for real bfd, or -1 for everyone else. */
#define BFD_RELOC(x) BFD_RELOC_##x
-
#include "bfd.h"
/* Special registers. */
#include "bfd.h"
/* Special registers. */
@@
-10214,21
+10215,18
@@
parse_insn_tilepro (tilepro_bundle_bits bits,
{
const struct tilepro_operand *op =
&tilepro_operands[opc->operands[pipe][i]];
{
const struct tilepro_operand *op =
&tilepro_operands[opc->operands[pipe][i]];
- int opval = op->extract (bits);
+
unsigned
int opval = op->extract (bits);
if (op->is_signed)
{
/* Sign-extend the operand. */
if (op->is_signed)
{
/* Sign-extend the operand. */
-
int shift = (int)((sizeof(int) * 8) - op->num_bits
);
- opval = (
opval << shift) >> shift
;
+
unsigned int sign = 1u << (op->num_bits - 1
);
+ opval = (
(opval & (sign + sign - 1)) ^ sign) - sign
;
}
/* Adjust PC-relative scaled branch offsets. */
if (op->type == TILEPRO_OP_TYPE_ADDRESS)
}
/* Adjust PC-relative scaled branch offsets. */
if (op->type == TILEPRO_OP_TYPE_ADDRESS)
- {
- opval *= TILEPRO_BUNDLE_SIZE_IN_BYTES;
- opval += (int)pc;
- }
+ opval = opval * TILEPRO_BUNDLE_SIZE_IN_BYTES + pc;
/* Record the final value. */
d->operands[i] = op;
/* Record the final value. */
d->operands[i] = op;
This page took
0.025981 seconds
and
4
git commands to generate.