Skip to content

Commit 8023375

Browse files
[libc][NFC] add remarks to the setjmp implementation (llvm#137066)
We use naked functions to avoid compiler-generated prologue and epilogue. Despite GCC documentation listing this as an unsupported case for extended asm, the generated code is not wrong as we only pass in constant operands to extended asm. See llvm#137055 for related remarks. --------- Co-authored-by: Copilot <[email protected]>
1 parent 0c7c82a commit 8023375

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libc/src/setjmp/x86_64/setjmp.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
// We use naked functions to avoid compiler-generated prologue and epilogue.
10+
// Despite GCC documentation listing this as an unsupported case for extended
11+
// asm, the generated code is not wrong as we only pass in constant operands
12+
// to extended asm.
13+
// See https://github.com/llvm/llvm-project/issues/137055 for related remarks.
14+
915
#include "hdr/offsetof_macros.h"
1016
#include "src/__support/common.h"
1117
#include "src/__support/macros/config.h"

0 commit comments

Comments
 (0)