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.
+2018-08-17 Alan Hayward <alan.hayward@arm.com>
+
+ PR gdb/18931
+ * gdb.arch/aarch64-fp.c (main): Fix asm registers.
+
2018-08-16 Keith Seitz <keiths@redhat.com>
* gdb.compile/compile.exp: Use gdb_test_no_output for "compile code"
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;
}