1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
llvm-mirror/test/MC/AArch64/cfi.s
Francis Visoiu Mistrih 94c00d2e59 [AsmPrinterDwarf] Add support for .cfi_restore directive
As of today we only use .cfi_offset to specify the offset of a CSR, but
we never use .cfi_restore when the CSR is restored.

If we want to perform a more advanced type of shrink-wrapping, we need
to use .cfi_restore in order to switch the CFI state between blocks.

This patch only aims at adding support for the directive.

Differential Revision: https://reviews.llvm.org/D36114

llvm-svn: 317199
2017-11-02 12:00:58 +00:00

27 lines
508 B
ArmAsm

// RUN: llvm-mc -triple aarch64-- -o - %s | FileCheck %s
fun:
.cfi_startproc
// CHECK: .cfi_startproc
stp x29, x30, [sp, #-16]!
.Lcfi0:
.cfi_offset w29, -16
// CHECK: .cfi_offset w29, -16
.Lcfi1:
.cfi_offset w30, -8
// CHECK: .cfi_offset w30, -8
mov x29, sp
.Lcfi2:
.cfi_def_cfa w29, 16
// CHECK: .cfi_def_cfa w29, 16
.Lcfi3:
.cfi_restore w30
// CHECK: .cfi_restore w30
ldr x29, [sp], #16
.Lcfi4:
.cfi_restore w29
// CHECK: .cfi_restore w29
ret
.cfi_endproc
// CHECK: .cfi_endproc