diff options
author | Daniel Jacobowitz <drow@false.org> | 2007-03-13 17:34:23 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2007-03-13 17:34:23 +0000 |
commit | 4e463ff5459d8c72eb1c5c1a7859e8556dbd69e2 (patch) | |
tree | 53db7049f2fd0de140d1c84c26136fbde1e65141 /gdb/testsuite/gdb.arch/powerpc-prologue.c | |
parent | 35d9dd2fb8ba23282114af75003ff0c2bee9661a (diff) | |
download | gdb-4e463ff5459d8c72eb1c5c1a7859e8556dbd69e2.zip gdb-4e463ff5459d8c72eb1c5c1a7859e8556dbd69e2.tar.gz gdb-4e463ff5459d8c72eb1c5c1a7859e8556dbd69e2.tar.bz2 |
* rs6000-tdep.c (rs6000_skip_prologue): Use skip_prologue_using_sal.
(rs6000_in_function_epilogue_p): Use extract_unsigned_integer.
(refine_prologue_limit): Delete.
(skip_prologue): Don't call it. Use extract_unsigned_integer.
Assume lim_pc is set. Correct check for incomplete prologues.
Do not skip clobbers of the frame pointer.
* symtab.c (skip_prologue_using_sal): Fail if there is only one
sal.
* gdb.arch/powerpc-prologue.c (optimized_1_marker, gdb2029_marker)
(optimized_1): New.
(main): Call optimized_1.
(gdb2029): Correct typos. Call gdb2029_marker.
* gdb.arch/powerpc-prologue.exp: Run new test. Use a breakpoint
for gdb2029.
Diffstat (limited to 'gdb/testsuite/gdb.arch/powerpc-prologue.c')
-rw-r--r-- | gdb/testsuite/gdb.arch/powerpc-prologue.c | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.arch/powerpc-prologue.c b/gdb/testsuite/gdb.arch/powerpc-prologue.c index 9f3836a..6dcec2f 100644 --- a/gdb/testsuite/gdb.arch/powerpc-prologue.c +++ b/gdb/testsuite/gdb.arch/powerpc-prologue.c @@ -31,23 +31,54 @@ int main (void) { gdb2029 (); + optimized_1 (); return 0; } +void +optimized_1_marker (void) +{ +} + +void +gdb2029_marker (void) +{ +} + /* A typical PIC prologue from GCC. */ asm(".text\n" - " .align 8\n" + " .p2align 3\n" SYMBOL (gdb2029) ":\n" - " stw %r1, -32(%r1)\n" + " stwu %r1, -32(%r1)\n" " mflr %r0\n" " bcl- 20,31,.+4\n" " stw %r30, 24(%r1)\n" " mflr %r30\n" " stw %r0, 36(%r1)\n" - " twge %r2, %r2\n" + " bl gdb2029_marker\n" " lwz %r0, 36(%r1)\n" " lwz %r30, 24(%r1)\n" " mtlr %r0\n" - " addi %r0, %r0, 32\n" + " addi %r1, %r1, 32\n" + " blr"); + +/* A heavily scheduled prologue. */ +asm(".text\n" + " .p2align 3\n" + SYMBOL (optimized_1) ":\n" + " stwu %r1,-32(%r1)\n" + " lis %r9,-16342\n" + " lis %r11,-16342\n" + " mflr %r0\n" + " addi %r11,%r11,3776\n" + " stmw %r27,12(%r1)\n" + " addi %r31,%r9,3152\n" + " cmplw %cr7,%r31,%r11\n" + " stw %r0,36(%r1)\n" + " mr %r30,%r3\n" + " bl optimized_1_marker\n" + " lwz %r0,36(%r1)\n" + " lmw %r27,12(%r1)\n" + " addi %r1,%r1,32\n" " blr"); |