From: Alan Hayward Date: Thu, 16 Aug 2018 14:21:15 +0000 (+0100) Subject: Fix asm in testsuite/gdb.arch/aarch64-fp.c X-Git-Tag: users/ARM/embedded-binutils-master-2018q4~1074 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ecae92e2372102ac0fa774fce4c4c0d6f8c85f5;p=platform%2Fupstream%2Fbinutils.git Fix asm in testsuite/gdb.arch/aarch64-fp.c Cannot assume result of first and third ldr will go into x0. Rewrite asm to be clearer. gdb/testsuite/ PR gdb/18931: * gdb.arch/aarch64-fp.c (main): Fix asm registers. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 84ef82f..705e5f0 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-08-17 Alan Hayward + + PR gdb/18931 + * gdb.arch/aarch64-fp.c (main): Fix asm registers. + 2018-08-16 Keith Seitz * gdb.compile/compile.exp: Use gdb_test_no_output for "compile code" diff --git a/gdb/testsuite/gdb.arch/aarch64-fp.c b/gdb/testsuite/gdb.arch/aarch64-fp.c index 0ff8e00..7eb6df2 100644 --- a/gdb/testsuite/gdb.arch/aarch64-fp.c +++ b/gdb/testsuite/gdb.arch/aarch64-fp.c @@ -26,12 +26,18 @@ main (void) void *addr; addr = &buf0[0]; - __asm __volatile ("ldr %x0, [%1]" : "=r" (val) : "r" (&addr)); - __asm __volatile ("ldr q0, [x0]"); - + __asm __volatile ("ldr %x0, [%1]\n\t" + "ldr q0, [%x0]" + : "=r" (val) + : "r" (&addr) + : "q0" ); + addr = &buf1[0]; - __asm __volatile ("ldr %x0, [%1]" : "=r" (val) : "r" (&addr)); - __asm __volatile ("ldr q1, [x0]"); + __asm __volatile ("ldr %x0, [%1]\n\t" + "ldr q1, [%x0]" + : "=r" (val) + : "r" (&addr) + : "q1" ); return 1; }