/* Target-dependent code for Moxie.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This file is part of GDB.
{
inst = read_memory_unsigned_integer (next_addr, 2, byte_order);
- /* Match "push $rN" where N is between 2 and 13 inclusive. */
- if (inst >= 0x0614 && inst <= 0x061f)
+ /* Match "push $sp $rN" where N is between 0 and 13 inclusive. */
+ if (inst >= 0x0612 && inst <= 0x061f)
{
regnum = inst & 0x000f;
cache->framesize += 4;
/* Optional stack allocation for args and local vars <= 4
byte. */
- if (inst == 0x0170) /* ldi.l $r5, X */
+ if (inst == 0x01e0) /* ldi.l $r12, X */
{
offset = read_memory_integer (next_addr + 2, 4, byte_order);
inst2 = read_memory_unsigned_integer (next_addr + 6, 2, byte_order);
- if (inst2 == 0x0517) /* add.l $sp, $r5 */
+ if (inst2 == 0x291e) /* sub.l $sp, $r12 */
{
cache->framesize += offset;
}
return (next_addr + 8);
}
- else if ((inst & 0xff00) == 0x91) /* dec $sp, X */
+ else if ((inst & 0xff00) == 0x9100) /* dec $sp, X */
{
cache->framesize += (inst & 0x00ff);
next_addr += 2;
while (next_addr < end_addr)
{
inst = read_memory_unsigned_integer (next_addr, 2, byte_order);
- if ((inst & 0xff00) != 0x91) /* no more dec $sp, X */
+ if ((inst & 0xff00) != 0x9100) /* no more dec $sp, X */
break;
cache->framesize += (inst & 0x00ff);
next_addr += 2;
if (record_debug)
printf_unfiltered (_("Process record: error reading memory at "
"addr 0x%s len = %d.\n"),
- paddress (target_gdbarch, addr), length);
+ paddress (target_gdbarch (), addr), length);
return -1;
}
if (record_debug > 1)
fprintf_unfiltered (gdb_stdlog, "Process record: moxie_process_record "
"addr = 0x%s\n",
- paddress (target_gdbarch, addr));
+ paddress (target_gdbarch (), addr));
inst = (uint16_t) moxie_process_readu (addr, buf, 2, byte_order);