OSDN Git Service

gcc:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Apr 2010 14:48:46 +0000 (14:48 +0000)
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Apr 2010 14:48:46 +0000 (14:48 +0000)
PR target/43643
* config/i386/gmon-sol2.c [__x86_64__]: Properly restore %rcx.

gcc/testsuite:
PR target/43643
* gcc.dg/pr43643.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158130 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/gmon-sol2.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr43643.c [new file with mode: 0644]

index e23b3fb..0d9eb6d 100644 (file)
@@ -1,5 +1,10 @@
 2010-04-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
+       PR target/43643
+       * config/i386/gmon-sol2.c [__x86_64__]: Properly restore %rcx.
+
+2010-04-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
        * doc/install.texi (Specific, i?86-*-solaris2.10): Fix grammar.
        (Specific, *-*-solaris2*): Likewise.
        Don't prefer Sun as over GNU as.
index e0923a0..fb813a1 100644 (file)
@@ -275,7 +275,7 @@ asm(".globl _mcount\n"
     "\tmovq\t0x20(%rsp),%rdi\n"
     "\tmovq\t0x18(%rsp),%rsi\n"
     "\tmovq\t0x10(%rsp),%rdx\n"
-    "\tmovq\t0x08(%rsp),%rdx\n"
+    "\tmovq\t0x08(%rsp),%rcx\n"
     "\tmovq\t(%rsp),%rax\n"
     "\taddq\t$0x38,%rsp\n"
     "\tretq\n"
index d46f375..738ee29 100644 (file)
@@ -1,3 +1,8 @@
+2010-04-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR target/43643
+       * gcc.dg/pr43643.c: New test.
+
 2010-04-08  Tobias Burnus  <burnus@net-b.de>
 
        * gfortran.dg/iso_fortran_env_6.f90: Add more checks.
diff --git a/gcc/testsuite/gcc.dg/pr43643.c b/gcc/testsuite/gcc.dg/pr43643.c
new file mode 100644 (file)
index 0000000..7fbbfc2
--- /dev/null
@@ -0,0 +1,24 @@
+/* Contributed by J├╝rgen Keil <jrgn.keil@googlemail.com> */
+
+/* { dg-do run } */
+/* { dg-require-profiling "-pg" } */
+/* { dg-options "-O2 -pg" } */
+
+extern char *strdup (const char *);
+
+void
+func(char *a, char *b, char *c)
+{
+  strdup(a);
+  strdup(b);
+  strdup(c);
+}
+
+int
+main(void)
+{
+  func("a", "b", "c");
+  return 0;
+}
+
+/* { dg-final { cleanup-profile-file } } */