]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[AArch64] Mark LR clobbered by BL in inline asm
authorYao Qi <yao.qi@linaro.org>
Fri, 27 Oct 2017 14:29:24 +0000 (15:29 +0100)
committerYao Qi <yao.qi@linaro.org>
Fri, 27 Oct 2017 14:29:24 +0000 (15:29 +0100)
LR is a caller-save register, so, if inline asm does BL (which touches
LR), we should mark LR clobbered.

gdb/testsuite:

2017-10-27  Yao Qi  <yao.qi@linaro.org>

* gdb.arch/insn-reloc.c (can_relocate_bl): Mark "x30" clobbered.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.arch/insn-reloc.c

index 0e2bc23d0ce431d16074c1eb3e28c5b88d2b60c4..46552b083d3cc45ae750906ed4009e05b74f6ec3 100644 (file)
@@ -1,3 +1,7 @@
+2017-10-27  Yao Qi  <yao.qi@linaro.org>
+
+       * gdb.arch/insn-reloc.c (can_relocate_bl): Mark "x30" clobbered.
+
 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
 
        * gdb.cp/classes.exp (test_static_members): Test printing
index c19d0be1c761c3c04f0b81268f8ad5d3a57718ba..5cf9ccaf7a80bd10b52a38c6b431e7e9796c9250 100644 (file)
@@ -508,7 +508,8 @@ can_relocate_bl (void)
 {
   asm ("set_point11:\n"
        "  bl foo\n"
-       "  bl pass\n"); /* Test that LR is updated correctly.  */
+       "  bl pass\n"
+       : : : "x30"); /* Test that LR is updated correctly.  */
 }
 
 #endif