[all-commits] [llvm/llvm-project] 05b586: [libc][RISCV] Add naked attribute to setjmp/longjm...

Paul Kirth via All-commits all-commits at lists.llvm.org
Tue Jul 23 10:43:17 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 05b586be3d70cd51c809c52a67d36517fb4b8f6f
      https://github.com/llvm/llvm-project/commit/05b586be3d70cd51c809c52a67d36517fb4b8f6f
  Author: Paul Kirth <paulkirth at google.com>
  Date:   2024-07-23 (Tue, 23 Jul 2024)

  Changed paths:
    M libc/src/setjmp/riscv/longjmp.cpp
    M libc/src/setjmp/riscv/setjmp.cpp

  Log Message:
  -----------
  [libc][RISCV] Add naked attribute to setjmp/longjmp (#100036)

We want to avoid any possibility that the compiler will insert a
prologue/epilogue violating the calling contracts for these special
functions, potentially clobbering registers that must be preserved. To
do that they should be marked naked, as is already the case on ARM.
See #87837 for further context.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list