Index: bolt/lib/Core/Exceptions.cpp =================================================================== --- bolt/lib/Core/Exceptions.cpp +++ bolt/lib/Core/Exceptions.cpp @@ -626,11 +626,13 @@ errs() << "BOLT-WARNING: DW_CFA_MIPS_advance_loc unimplemented\n"; return false; case DW_CFA_GNU_window_save: + Function.addCFIInstruction( + Offset, MCCFIInstruction::createNegateRAState(nullptr)); + break; case DW_CFA_lo_user: case DW_CFA_hi_user: if (opts::Verbosity >= 1) { - errs() << "BOLT-WARNING: DW_CFA_GNU_* and DW_CFA_*_user " - "unimplemented\n"; + errs() << "BOLT-WARNING: DW_CFA_*_user unimplemented\n"; } return false; default: Index: bolt/test/AArch64/dw_cfa_gnu_window_save.cc =================================================================== --- /dev/null +++ bolt/test/AArch64/dw_cfa_gnu_window_save.cc @@ -0,0 +1,10 @@ +// RUN: %clang %cflags -O2 -Wl,-q %s -o %t.exe +// RUN: llvm-bolt %t.exe -o %t.bolt 2>&1 | FileCheck %s + +// CHECK-NOT: paciasp +// CHECK-NOT: autiasp +// CHECK-NOT: ERROR: unable to fill CFI. + +int main(int argc, char **argv) { + return 0; +}