]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/rl78-tdep.c
Extend rl78 prologue analyzer to recognize more complicated prologues
authorKevin Buettner <kevinb@redhat.com>
Tue, 21 Apr 2015 06:37:44 +0000 (23:37 -0700)
committerKevin Buettner <kevinb@redhat.com>
Tue, 21 Apr 2015 06:44:19 +0000 (23:44 -0700)
commit0bca7f99d8fa254b5e35a211ee306a46b95adc65
tree318e7f1a06e78c35e4a30e03ebce5122e1236572
parent4b889c3013d7d45e2775781c3904b657419db2fa
Extend rl78 prologue analyzer to recognize more complicated prologues

This patch extends the rl78 prologue analyzer so that it can recognize
this kind of prologue:

   0x119f <main>:       movw    ax, sp
   0x11a1 <main+2>:     subw    ax, #0x1fa6
   0x11a4 <main+5>:     movw    sp, ax

The test case for gdb.base/miscexprs.exp is now compiled to generate
that sequence instead of a much longer and more inefficient sequence.

gdb/ChangeLog:

* rl78-tdep.c (RL78_SP_ADDR): Define.
(opc_reg_to_gdb_regnum): New static function.
(rl78_analyze_prologue): Recognize instructions forming slightly
more interesting prologues.
gdb/ChangeLog
gdb/rl78-tdep.c