1/* Copyright 2022-2023 Free Software Foundation, Inc. 2 3 This file is part of GDB. 4 5 This program is free software; you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation; either version 3 of the License, or 8 (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 17 18 .text 19 .globl main 20 .type main,#function 21main: 22 .cfi_startproc 23 stp x29, x30, [sp, -16]! 24 .cfi_def_cfa sp, 16 25 .cfi_offset x29, 0 26 .cfi_offset x30, 8 27 bl test_func 28 ldp x29, x30, [sp], 16 29 .cfi_restore x29 30 .cfi_restore x30 31 .cfi_def_cfa sp, 0 32 mov x0, 0 33 ret 34 .cfi_endproc 35 36 .globl test_func 37test_func: 38 .cfi_startproc 39 // Unwind x30 to a different value 40 // CFA_val_expression x30 const2u 0x1234 41 .cfi_escape 0x16, 30, 0x03, 0x0a, 0x34, 0x12 42 // CFA_val_expression pc breg30 0 43 .cfi_escape 0x16, 32, 0x02, 0x8e, 0x00 44 mov x0, x30 45 .cfi_register 32, x0 46 mov x30, 0x1234 47 ret x0 48 .cfi_endproc 49 .section .note.GNU-stack,"",@progbits 50