This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] [AArch64] Mark LR clobbered by BL in inline asm


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bb11dd58391459bd5ba54ec405adab663ac59e89

commit bb11dd58391459bd5ba54ec405adab663ac59e89
Author: Yao Qi <yao.qi@linaro.org>
Date:   Fri Oct 27 15:29:24 2017 +0100

    [AArch64] Mark LR clobbered by BL in inline asm
    
    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.

Diff:
---
 gdb/testsuite/ChangeLog             | 4 ++++
 gdb/testsuite/gdb.arch/insn-reloc.c | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 0e2bc23..46552b0 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -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
diff --git a/gdb/testsuite/gdb.arch/insn-reloc.c b/gdb/testsuite/gdb.arch/insn-reloc.c
index c19d0be..5cf9cca 100644
--- a/gdb/testsuite/gdb.arch/insn-reloc.c
+++ b/gdb/testsuite/gdb.arch/insn-reloc.c
@@ -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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]