aboutsummaryrefslogtreecommitdiff
path: root/gdb/moxie-tdep.c
diff options
context:
space:
mode:
authorAnthony Green <green@redhat.com>2012-09-10 21:16:43 +0000
committerAnthony Green <green@redhat.com>2012-09-10 21:16:43 +0000
commit5152ff903945c2e68714d562206030a703cc80c2 (patch)
treefa3e7554af73f026dfb47ad7666ba255ce656968 /gdb/moxie-tdep.c
parentc891b3f924c4fb5fd06b71cabe74ffe74dcffa48 (diff)
downloadgdb-5152ff903945c2e68714d562206030a703cc80c2.zip
gdb-5152ff903945c2e68714d562206030a703cc80c2.tar.gz
gdb-5152ff903945c2e68714d562206030a703cc80c2.tar.bz2
Fix function prologue analyzer for moxie.
Diffstat (limited to 'gdb/moxie-tdep.c')
-rw-r--r--gdb/moxie-tdep.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/moxie-tdep.c b/gdb/moxie-tdep.c
index 3e08d60..5a04ecc 100644
--- a/gdb/moxie-tdep.c
+++ b/gdb/moxie-tdep.c
@@ -166,8 +166,8 @@ moxie_analyze_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
{
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;
@@ -182,19 +182,19 @@ moxie_analyze_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
/* 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;
@@ -202,7 +202,7 @@ moxie_analyze_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
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;