diff --git a/libc/src/setjmp/x86_64/setjmp.cpp b/libc/src/setjmp/x86_64/setjmp.cpp index 28e52712c785d..66d13166d4d46 100644 --- a/libc/src/setjmp/x86_64/setjmp.cpp +++ b/libc/src/setjmp/x86_64/setjmp.cpp @@ -6,6 +6,12 @@ // //===----------------------------------------------------------------------===// +// 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 https://github.com/llvm/llvm-project/issues/137055 for related remarks. + #include "hdr/offsetof_macros.h" #include "src/__support/common.h" #include "src/__support/macros/config.h"