[hpux] Update prologue analysis insn pattern

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[hpux] Update prologue analysis insn pattern

Randolph Chung
through experimentation I have found another insn pattern used for
storing rp onto the stack that is used at least on hpux11.11. Add it to
the prologue analysis code.

this is a good example of why Joel's proposal of cleaning up and
considating the prologue analysis code is a good idea :)

committed.
randolph

2005-11-19  Randolph Chung  <[hidden email]>

        * hppa-tdep.c (skip_prologue_hard_way): Add one more insn pattern for
        "std rp,-0x10(sp)".
        (hppa_frame_cache): Likewise.
        (hppa_fallback_frame_cache): Likewise.

Index: hppa-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-tdep.c,v
retrieving revision 1.212
diff -u -p -r1.212 hppa-tdep.c
--- hppa-tdep.c 3 Oct 2005 20:53:00 -0000 1.212
+++ hppa-tdep.c 19 Nov 2005 12:30:24 -0000
@@ -1491,7 +1552,7 @@ restart:
 
       /* There are limited ways to store the return pointer into the
  stack.  */
-      if (inst == 0x6bc23fd9 || inst == 0x0fc212c1)
+      if (inst == 0x6bc23fd9 || inst == 0x0fc212c1 || inst == 0x73c23fe1)
  save_rp = 0;
 
       /* These are the only ways we save SP into the stack.  At this time
@@ -1846,7 +1907,8 @@ hppa_frame_cache (struct frame_info *nex
     looking_for_rp = 0;
     cache->saved_regs[HPPA_RP_REGNUM].addr = -24;
   }
- else if (inst == 0x0fc212c1) /* std rp,-0x10(sr0,sp) */
+ else if (inst == 0x0fc212c1
+         || inst == 0x73c23fe1) /* std rp,-0x10(sr0,sp) */
   {
     looking_for_rp = 0;
     cache->saved_regs[HPPA_RP_REGNUM].addr = -16;
@@ -2174,7 +2249,8 @@ hppa_fallback_frame_cache (struct frame_
       cache->saved_regs[HPPA_RP_REGNUM].addr = -20;
       found_rp = 1;
     }
-  else if (insn == 0x0fc212c1) /* std rp,-0x10(sr0,sp) */
+  else if (insn == 0x0fc212c1
+           || insn == 0x73c23fe1) /* std rp,-0x10(sr0,sp) */
     {
       cache->saved_regs[HPPA_RP_REGNUM].addr = -16;
       found_rp = 1;