diff options
author | Nick Clifton <nickc@redhat.com> | 2013-01-15 08:45:45 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2013-01-15 08:45:45 +0000 |
commit | dd42f060364b48544301451a4b68e01bc978b281 (patch) | |
tree | 0107564ec6477f07134fef85de74b371b7d0f85d /opcodes | |
parent | 77bf820f915a0c12108e266b185430fb73561c94 (diff) | |
download | gdb-dd42f060364b48544301451a4b68e01bc978b281.zip gdb-dd42f060364b48544301451a4b68e01bc978b281.tar.gz gdb-dd42f060364b48544301451a4b68e01bc978b281.tar.bz2 |
* config/tc-v850.c (md_assemble): Allow signed values for
V850E_IMMEDIATE.
* gas/v850/basic.exp: Allow for variations in reloc names.
* gas/v850/split-lo16.d: Likewise.
* gas/v850/v850e1.s: Add more tests of the PREPARE insn.
* gas/v850/v850e1.d: Update expected disassembly.
* v850-dis.c (get_operand_value): Sign extend V850E_IMMEDIATE
values.
* v850-opc.c (IMM16LO): Add V850_OPERAND_SIGNED attribute.
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 6 | ||||
-rw-r--r-- | opcodes/v850-dis.c | 2 | ||||
-rw-r--r-- | opcodes/v850-opc.c | 4 |
3 files changed, 10 insertions, 2 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 6ccf7ac..2760788 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,9 @@ +2013-01-15 Nick Clifton <nickc@redhat.com> + + * v850-dis.c (get_operand_value): Sign extend V850E_IMMEDIATE + values. + * v850-opc.c (IMM16LO): Add V850_OPERAND_SIGNED attribute. + 2013-01-14 Will Newton <will.newton@imgtec.com> * metag-dis.c (REG_WIDTH): Increase to 64. diff --git a/opcodes/v850-dis.c b/opcodes/v850-dis.c index 5f9d87b..7d2e720 100644 --- a/opcodes/v850-dis.c +++ b/opcodes/v850-dis.c @@ -118,6 +118,8 @@ get_operand_value (const struct v850_operand *operand, if (operand->flags & V850E_IMMEDIATE16HI) value <<= 16; + else if (value & 0x8000) + value |= (-1L << 16); return value; } diff --git a/opcodes/v850-opc.c b/opcodes/v850-opc.c index 0867d43..806651f 100644 --- a/opcodes/v850-opc.c +++ b/opcodes/v850-opc.c @@ -747,9 +747,9 @@ const struct v850_operand v850_operands[] = #define IMM16 (I16 + 1) { 16, 32, NULL, NULL, V850E_IMMEDIATE16, BFD_RELOC_16 }, -/* The 16 bit immediate following a 32 bit instruction. */ +/* The signed 16 bit immediate following a prepare instruction. */ #define IMM16LO (IMM16 + 1) - { 16, 32, NULL, NULL, V850E_IMMEDIATE16, BFD_RELOC_LO16 }, + { 16, 32, NULL, NULL, V850E_IMMEDIATE16 | V850_OPERAND_SIGNED, BFD_RELOC_LO16 }, /* The hi 16 bit immediate following a 32 bit instruction. */ #define IMM16HI (IMM16LO + 1) |