[llvm] 901831a - Revert "AArch64: take compact unwind frame size from last CFI instruction."

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 11 04:26:24 PDT 2022


Author: Tim Northover
Date: 2022-04-11T12:25:58+01:00
New Revision: 901831a4e615d92b6e6df8970afbd30ddcae15d8

URL: https://github.com/llvm/llvm-project/commit/901831a4e615d92b6e6df8970afbd30ddcae15d8
DIFF: https://github.com/llvm/llvm-project/commit/901831a4e615d92b6e6df8970afbd30ddcae15d8.diff

LOG: Revert "AArch64: take compact unwind frame size from last CFI instruction."

It was on ToT when I pushed and committed unintentionally.

Added: 
    

Modified: 
    llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
    llvm/test/MC/AArch64/arm64-compact-unwind-fallback.s

Removed: 
    llvm/test/CodeGen/AArch64/compact-unwind-async.ll


################################################################################
diff  --git a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
index 04d9b4999d2e2..85b221286ecd0 100644
--- a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
+++ b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
@@ -621,6 +621,8 @@ class DarwinAArch64AsmBackend : public AArch64AsmBackend {
         break;
       }
       case MCCFIInstruction::OpDefCfaOffset: {
+        if (StackSize != 0)
+          return CU::UNWIND_ARM64_MODE_DWARF;
         StackSize = std::abs(Inst.getOffset());
         break;
       }

diff  --git a/llvm/test/CodeGen/AArch64/compact-unwind-async.ll b/llvm/test/CodeGen/AArch64/compact-unwind-async.ll
deleted file mode 100644
index f1d09357f7d30..0000000000000
--- a/llvm/test/CodeGen/AArch64/compact-unwind-async.ll
+++ /dev/null
@@ -1,11 +0,0 @@
-; RUN: llc -mtriple=arm64-apple-macosx %s -filetype=obj -o - | llvm-objdump --unwind-info - | FileCheck %s
-
-; CHECK: Contents of __compact_unwind section
-; CHECK: compact encoding: 0x02021010
-
-; 0x02|021|010 => frameless, stack size 0x21 * 16 = 528, x27 & x28 saved
-
-define void @func() {
-  alloca i8, i32 512
-  ret void
-}

diff  --git a/llvm/test/MC/AArch64/arm64-compact-unwind-fallback.s b/llvm/test/MC/AArch64/arm64-compact-unwind-fallback.s
index d2a078729b75c..12525b78a274b 100644
--- a/llvm/test/MC/AArch64/arm64-compact-unwind-fallback.s
+++ b/llvm/test/MC/AArch64/arm64-compact-unwind-fallback.s
@@ -5,11 +5,21 @@
 
 // CHECK: Contents of __compact_unwind section:
 // CHECK: compact encoding:     0x03000000
+// CHECK: compact encoding:     0x03000000
 
 // CHECK: .eh_frame contents:
 // CHECK: DW_CFA_def_cfa: reg1 +32
 
+//  DW_CFA_def_cfa_offset: +32
+//  DW_CFA_def_cfa_offset: +64
+
 _cfi_dwarf0:
  .cfi_startproc
  .cfi_def_cfa x1, 32;
  .cfi_endproc
+
+_cfi_dwarf1:
+ .cfi_startproc
+ .cfi_def_cfa_offset 32
+ .cfi_def_cfa_offset 64
+ .cfi_endproc


        


More information about the llvm-commits mailing list