aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2012-11-01 17:53:05 +0000
committerDoug Evans <dje@google.com>2012-11-01 17:53:05 +0000
commitc207c6da70497edf962e5904d20e23732cf7de37 (patch)
treefeee8af5418edc4a2ad0e878ea76f918a0eb7c18 /gdb
parentff826ef3e28e9934318fe17d3c09c4af2f4c799d (diff)
downloadbinutils-c207c6da70497edf962e5904d20e23732cf7de37.zip
binutils-c207c6da70497edf962e5904d20e23732cf7de37.tar.gz
binutils-c207c6da70497edf962e5904d20e23732cf7de37.tar.bz2
* 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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.arch/amd64-pseudo.c16
2 files changed, 22 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 8a756aa..ccd4994 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2012-11-01 Doug Evans <dje@google.com>
+
+ * 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 <aburgess@broadcom.com>
PR cli/14772
diff --git a/gdb/testsuite/gdb.arch/amd64-pseudo.c b/gdb/testsuite/gdb.arch/amd64-pseudo.c
index f73ec10..4e8efc0 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"