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-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2ecae92e2372102ac0fa774fce4c4c0d6f8c85f5;p=binutils-gdb.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 84ef82f3670..705e5f07b90 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 0ff8e00bbd3..7eb6df2a040 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; }