File tree Expand file tree Collapse file tree 1 file changed +20
-11
lines changed Expand file tree Collapse file tree 1 file changed +20
-11
lines changed Original file line number Diff line number Diff line change @@ -3731,26 +3731,35 @@ inline const char *Registers_hexagon::getRegisterName(int regNum) {
3731
3731
// / Registers_riscv holds the register state of a thread in a RISC-V
3732
3732
// / process.
3733
3733
3734
- # if __riscv_xlen == 32
3734
+ // This check makes it safe when LIBUNWIND_ENABLE_CROSS_UNWINDING enabled.
3735
+ # ifdef __riscv
3736
+ # if __riscv_xlen == 32
3735
3737
typedef uint32_t reg_t ;
3736
- # elif __riscv_xlen == 64
3738
+ # elif __riscv_xlen == 64
3737
3739
typedef uint64_t reg_t ;
3738
- # else
3739
- # error "Unsupported __riscv_xlen"
3740
- # endif
3740
+ # else
3741
+ # error "Unsupported __riscv_xlen"
3742
+ # endif
3741
3743
3742
- # if defined(__riscv_flen)
3743
- # if __riscv_flen == 64
3744
+ # if defined(__riscv_flen)
3745
+ # if __riscv_flen == 64
3744
3746
typedef double fp_t ;
3745
- # elif __riscv_flen == 32
3747
+ # elif __riscv_flen == 32
3746
3748
typedef float fp_t ;
3749
+ # else
3750
+ # error "Unsupported __riscv_flen"
3751
+ # endif
3747
3752
# else
3748
- # error "Unsupported __riscv_flen"
3753
+ // This is just for supressing undeclared error of fp_t.
3754
+ typedef double fp_t ;
3749
3755
# endif
3750
3756
# else
3751
- // This is just for supressing undeclared error of fp_t.
3757
+ // Use Max possible width when cross unwinding
3758
+ typedef uint64_t reg_t ;
3752
3759
typedef double fp_t ;
3753
- # endif
3760
+ # define __riscv_xlen 64
3761
+ # define __riscv_flen 64
3762
+ #endif
3754
3763
3755
3764
// / Registers_riscv holds the register state of a thread.
3756
3765
class _LIBUNWIND_HIDDEN Registers_riscv {
You can’t perform that action at this time.
0 commit comments