Mikhail R. Gadelha
0f6fd1b704
[libc] Add support for setjmp and longjmp in riscv
...
This patch implements setjmp and longjmp in riscv using inline asm. The
following changes were required:
* Omit frame pointer: otherwise gcc won't allow us to use s0
* Use __attribute__((naked)): otherwise both gcc and clang will generate
function prologue and epilogue in both functions. This doesn't happen
in x86_64, so we guard it to only riscv
Furthermore, using __attribute__((naked)) causes two problems: we
can't use `return 0` (both gcc and clang) and the function arguments in
the function body (clang only), so we had to use a0 and a1 directly.
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D145584
2023-03-24 16:16:31 -03:00
..
2022-02-17 17:21:55 +00:00
2022-10-10 18:28:43 +00:00
2022-10-06 19:50:23 +00:00
2022-10-06 19:50:23 +00:00
2022-10-06 15:19:43 -07:00
2022-10-31 16:55:53 +00:00
2022-05-24 22:48:14 +00:00
2022-09-28 06:54:48 +00:00
2022-06-02 01:47:24 +00:00
2022-08-12 05:28:40 +00:00
2022-07-13 07:09:40 +00:00
2022-09-21 18:35:02 +00:00
2022-09-21 18:35:02 +00:00
2022-10-18 20:53:00 +00:00
2022-10-25 18:06:05 +00:00
2022-09-29 10:23:21 -07:00
2023-03-20 16:36:21 -07:00
2022-02-28 23:51:44 +00:00
2022-04-22 08:02:25 +00:00
2022-09-29 20:31:46 +00:00
2022-09-21 18:35:02 +00:00
2022-07-25 20:23:25 +00:00
2022-10-22 03:17:48 +00:00
2023-03-08 17:31:58 -03:00
2022-09-21 18:35:02 +00:00
2022-09-21 18:35:02 +00:00
2023-03-24 16:16:31 -03:00
2022-01-27 20:32:02 +00:00
2022-03-04 18:33:46 +00:00
2022-09-21 18:35:02 +00:00
2022-04-22 08:02:25 +00:00
2022-03-01 17:12:39 +00:00
2022-09-21 18:41:20 +00:00
2022-10-11 04:54:44 +00:00
2022-10-13 18:47:47 +00:00
2022-04-11 16:08:49 +00:00
2022-08-12 05:28:40 +00:00
2022-05-24 22:48:14 +00:00
2022-04-04 18:11:12 +00:00
2022-09-28 06:54:48 +00:00
2022-06-02 01:47:24 +00:00
2022-09-16 20:50:28 +00:00
2022-11-02 07:17:33 +00:00
2022-09-30 07:31:50 +00:00
2022-09-30 07:31:50 +00:00
2023-03-20 16:36:21 -07:00
2022-10-18 20:53:00 +00:00
2022-10-18 22:04:30 +00:00
2022-07-25 20:23:25 +00:00
2022-09-16 21:07:17 +00:00
2022-10-05 07:38:55 +00:00
2022-09-30 07:31:50 +00:00
2022-09-21 18:35:02 +00:00
2022-10-18 20:53:00 +00:00
2022-09-24 00:13:58 +00:00
2022-10-05 07:38:55 +00:00
2022-01-21 07:04:32 +00:00
2022-09-16 21:21:29 +00:00
2022-10-05 07:38:55 +00:00
2022-10-18 20:53:00 +00:00
2022-06-02 01:47:24 +00:00
2022-09-21 18:35:02 +00:00
2022-08-12 05:28:40 +00:00
2022-08-12 05:28:40 +00:00
2022-09-21 18:35:02 +00:00
2022-09-30 07:31:50 +00:00
2023-03-20 16:36:21 -07:00
2023-03-20 16:36:21 -07:00