Commit 4feeffb
committed
[cheriot] Add an R_RISCV_CHERIOT_CCALL reloc
This is needed because Cheriot uses 11-bit shifts on AUIPCC (differing from normal RISC-V CHERI), and requires that the HI and LO relocs offset the target in the same direction. This is meant to be handled for all of Cheriot via R_RISCV_CHERIOT_COMPARTMENT_HI and R_RISCV_CHERIOT_COMPARTMENT_LO_I, but that is complicated by the simultaneous need to relax calls in (almost) all situations, which requires using R_RISCV_CHERI_CCALL. The solution is to add a new reloc that relaxes like R_RISCV_CHERI_CCALL, but relocates via R_RISCV_CHERIOT_COMPARTMENT_HI / R_RISCV_CHERIOT_COMPARTMENT_LO_I.1 parent cba5428 commit 4feeffb
File tree
3 files changed
+33
-6
lines changed- lld/ELF/Arch
- llvm
- include/llvm/BinaryFormat/ELFRelocs
- lib/Target/RISCV/MCTargetDesc
3 files changed
+33
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| 361 | + | |
361 | 362 | | |
362 | 363 | | |
363 | 364 | | |
| |||
504 | 505 | | |
505 | 506 | | |
506 | 507 | | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
507 | 526 | | |
508 | 527 | | |
509 | 528 | | |
| |||
750 | 769 | | |
751 | 770 | | |
752 | 771 | | |
753 | | - | |
| 772 | + | |
754 | 773 | | |
755 | 774 | | |
756 | 775 | | |
757 | 776 | | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
762 | 781 | | |
763 | 782 | | |
764 | 783 | | |
| |||
967 | 986 | | |
968 | 987 | | |
969 | 988 | | |
| 989 | + | |
970 | 990 | | |
971 | 991 | | |
972 | 992 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
100 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
101 | 106 | | |
| 107 | + | |
102 | 108 | | |
103 | 109 | | |
104 | 110 | | |
| |||
0 commit comments