File tree 1 file changed +4
-1
lines changed 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -371,6 +371,9 @@ enum {
371
371
#elif defined(__aarch64__ ) && defined(__AARCH64EL__ ) && !defined(__ILP32__ )
372
372
DWRF_REG_SP = 31 ,
373
373
DWRF_REG_RA = 30 ,
374
+ #elif defined(__riscv )
375
+ DWRF_REG_RA = 1 ,
376
+ DWRF_REG_SP = 2 ,
374
377
#else
375
378
# error "Unsupported target architecture"
376
379
#endif
@@ -477,7 +480,7 @@ elf_init_ehframe(ELFObjectContext* ctx)
477
480
DWRF_U8 (DWRF_CFA_advance_loc | 6 );
478
481
DWRF_U8 (DWRF_CFA_def_cfa_offset ); DWRF_UV (8 );
479
482
/* Extra registers saved for JIT-compiled code. */
480
- #elif defined(__aarch64__ ) && defined(__AARCH64EL__ ) && !defined(__ILP32__ )
483
+ #elif ( defined(__aarch64__ ) && defined(__AARCH64EL__ ) && !defined(__ILP32__ )) || defined( __riscv )
481
484
DWRF_U8 (DWRF_CFA_advance_loc | 1 );
482
485
DWRF_U8 (DWRF_CFA_def_cfa_offset ); DWRF_UV (16 );
483
486
DWRF_U8 (DWRF_CFA_offset | 29 ); DWRF_UV (2 );
You can’t perform that action at this time.
0 commit comments