diff options
author | Kito Cheng <kito.cheng@gmail.com> | 2017-11-17 09:50:52 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2018-01-18 11:21:10 +0300 |
commit | cba678ba02428b02e08a9a169d57e70f271d789f (patch) | |
tree | b3165c8aed85a86bdfbf90c04e7e7197c20a5432 /newlib/libc | |
parent | 4cd1905add4404d995f1a7c77bc298957b01f91d (diff) |
RISC-V: Fix alignment issue in sigjmp_buf
Diffstat (limited to 'newlib/libc')
-rw-r--r-- | newlib/libc/include/machine/setjmp.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/newlib/libc/include/machine/setjmp.h b/newlib/libc/include/machine/setjmp.h index b33f437d7..9212f840b 100644 --- a/newlib/libc/include/machine/setjmp.h +++ b/newlib/libc/include/machine/setjmp.h @@ -359,7 +359,9 @@ _BEGIN_STD_C #endif #ifdef __riscv -#define _JBTYPE long +/* _JBTYPE using long long to make sure the alignment is align to 8 byte, + otherwise in rv32imafd, store/restore FPR may mis-align. */ +#define _JBTYPE long long #ifdef __riscv_32e #define _JBLEN ((4*sizeof(long))/sizeof(long)) #else |