aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog5
-rw-r--r--opcodes/avr-dis.c14
2 files changed, 15 insertions, 4 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 13d35e0..f218365 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2016-06-03 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
+
+ * avr-dis.c (avr_operand): Add default data address space origin (0x800000)
+ to the address and set as symbol address for LDS/ STS immediate operands.
+
2016-06-07 Alan Modra <amodra@gmail.com>
* ppc-dis.c (ppc_opts): Delete extraneous parentheses. Default
diff --git a/opcodes/avr-dis.c b/opcodes/avr-dis.c
index 3b783fb..748cb2d 100644
--- a/opcodes/avr-dis.c
+++ b/opcodes/avr-dis.c
@@ -184,17 +184,23 @@ avr_operand (unsigned int insn, unsigned int insn2, unsigned int pc, int constra
break;
case 'i':
- sprintf (buf, "0x%04X", insn2);
+ {
+ unsigned int val = insn2 | 0x800000;
+ *sym = 1;
+ *sym_addr = val;
+ sprintf (buf, "0x%04X", insn2);
+ strcpy (comment, comment_start);
+ }
break;
case 'j':
{
unsigned int val = ((insn & 0xf) | ((insn & 0x600) >> 5)
| ((insn & 0x100) >> 2));
- if (val > 0 && !(insn & 0x100))
- val |= 0x80;
+ *sym = 1;
+ *sym_addr = val | 0x800000;
sprintf (buf, "0x%02x", val);
- sprintf (buf, "%d", val);
+ strcpy (comment, comment_start);
}
break;