From: Doug Evans Date: Thu, 1 Nov 2012 17:53:05 +0000 (+0000) Subject: * gdb.arch/amd64-pseudo.c (main): Mark registers that the testsuite X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c207c6da70497edf962e5904d20e23732cf7de37;p=binutils-gdb.git * gdb.arch/amd64-pseudo.c (main): Mark registers that the testsuite changes as clobbered (e.g., amd64-dword.exp) so gcc doesn't try to use them. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 8a756aaa27f..ccd49945b31 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2012-11-01 Doug Evans + + * gdb.arch/amd64-pseudo.c (main): Mark registers that the testsuite + changes as clobbered (e.g., amd64-dword.exp) so gcc doesn't try to + use them. + 2012-10-31 Andrew Burgess PR cli/14772 diff --git a/gdb/testsuite/gdb.arch/amd64-pseudo.c b/gdb/testsuite/gdb.arch/amd64-pseudo.c index f73ec10f8c7..4e8efc0af8c 100644 --- a/gdb/testsuite/gdb.arch/amd64-pseudo.c +++ b/gdb/testsuite/gdb.arch/amd64-pseudo.c @@ -63,6 +63,14 @@ main (int argc, char **argv) : "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"); asm ("nop"); /* second breakpoint here */ + /* amd64-dword.exp writes eax-edi here. + Tell gcc they're clobbered so it doesn't try to keep "data" in + one of them. */ + asm ("" + : /* no outputs */ + : /* no inputs */ + : "eax", "ebx", "ecx", "edx", "esi", "edi"); + asm ("mov %%eax, 0(%0)\n\t" "mov %%ebx, 4(%0)\n\t" "mov %%ecx, 8(%0)\n\t" @@ -74,6 +82,14 @@ main (int argc, char **argv) : "eax", "ebx", "ecx", "edx", "esi", "edi"); asm ("nop"); /* third breakpoint here */ + /* amd64-dword.exp writes r8-r15 here. + Tell gcc they're clobbered so it doesn't try to keep "data" in + one of them. */ + asm ("" + : /* no outputs */ + : /* no inputs */ + : "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"); + asm ("mov %%r8d, 24(%0)\n\t" "mov %%r9d, 28(%0)\n\t" "mov %%r10d, 32(%0)\n\t"