| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[libc] Fix issue with sigjmp_buf.h not being found (#150439) When trying to use <setjmp.h>, it will try to include llvm-libc-types/sigjmp_buf.h due to the way that headergen works. This commit creates a dummy file, as the real implementation is found in llvm-libc-types/jmp_buf.h. | 1 年前 | |
[libc] Add proxy header for the jmp_buf type (#107712) Added proxy header for the jmp_buf type and changed all use instances from __jmp_buf * to the typedef alias jmp_buf , fixed the link to LLVM in stack_t.h description | 1 年前 | |
[libc] Add proxy header for the jmp_buf type (#107712) Added proxy header for the jmp_buf type and changed all use instances from __jmp_buf * to the typedef alias jmp_buf , fixed the link to LLVM in stack_t.h description | 1 年前 | |
[libc] implement sigsetjmp/siglongjmp for riscv (#137992) See https://godbolt.org/z/jo7s6j7sq for compiled code. c++ #if __riscv_xlen == 64 #define STORE(A, B, C) "sd " #A ", %c[" #B "](" #C ")\n\t" #define LOAD(A, B, C) "ld " #A ", %c[" #B "](" #C ")\n\t" #elif __riscv_xlen == 32 #define STORE(A, B, C) "sw " #A ", %c[" #B "](" #C ")\n\t" #define LOAD(A, B, C) "lw " #A ", %c[" #B "](" #C ")\n\t" #else #error "Unsupported RISC-V architecture" #endif namespace LIBC_NAMESPACE_DECL { [[gnu::naked]] LLVM_LIBC_FUNCTION(int, sigsetjmp, (sigjmp_buf, int)) { // clang-format off asm("beqz a1, .Lnosave\n\t" STORE(ra, retaddr, a0) STORE(s0, extra, a0) "mv s0, a0\n\t" "call %c[setjmp]\n\t" "mv a1, a0\n\t" "mv a0, s0\n\t" LOAD(s0, extra, a0) LOAD(ra, retaddr, a0) "tail %c[epilogue]\n" ".Lnosave:\n\t" "tail %c[setjmp]" // clang-format on ::[retaddr] "i"(offsetof(__jmp_buf, sig_retaddr)), [extra] "i"(offsetof(__jmp_buf, sig_extra)), [setjmp] "i"(setjmp), [epilogue] "i"(sigsetjmp_epilogue) : "a0", "a1", "s0"); } | 1 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 |