Commit cb8c905
committed
rustc_codegen_ssa: More comprehensive RISC-V ELF flags
This commit implements more conformant, more comprehensive RISC-V ELF
flags handling when generating certain object files directly from rustc.
* Use "zca" instead of "c"
The "Zca" extension (a subset of "C") is the minimal configuration
for compressed instructions to set `EF_RISCV_RVC` flag.
* Set TSO flag from "ztso"
The "Ztso" extension denotes that the program depends on the RVTSO
(Total Store Ordering) memory consistency model, which is stronger
than the standard RVWMO (Weak Memory Ordering) consistency model and
on ELF targets, we need to set `EF_RISCV_TSO` flag.1 parent 6912064 commit cb8c905
File tree
2 files changed
+10
-2
lines changed- compiler
- rustc_codegen_ssa/src/back
- rustc_span/src
2 files changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
334 | | - | |
| 333 | + | |
| 334 | + | |
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
338 | 344 | | |
339 | 345 | | |
340 | 346 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2419 | 2419 | | |
2420 | 2420 | | |
2421 | 2421 | | |
| 2422 | + | |
2422 | 2423 | | |
2423 | 2424 | | |
2424 | 2425 | | |
| 2426 | + | |
2425 | 2427 | | |
2426 | 2428 | | |
2427 | 2429 | | |
| |||
0 commit comments