Skip to content

Commit

Permalink
Add .attributes also for "rv32ec", "rv32em", "rv32emc"
Browse files Browse the repository at this point in the history
I presume these are required if there happens to be any C or M
instructions in the binary.

At least the "rv32em" variant here is required for our rv32emc if
-Fsingle-hart is disabled.
  • Loading branch information
hegza committed Mar 7, 2024
1 parent 9042916 commit ebab8f7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions riscv-rt/src/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ cfg_global_asm!(
".attribute arch, \"rv32im\"",
#[cfg(all(riscv32, riscve))]
".attribute arch, \"rv32e\"",
#[cfg(all(riscv32, riscve, riscvc))]
".attribute arch, \"rv32ec\"",
#[cfg(all(riscv32, riscve, riscvm))]
".attribute arch, \"rv32em\"",
#[cfg(all(riscv32, riscve, riscvm, riscvc))]
".attribute arch, \"rv32emc\"",
#[cfg(all(riscv64, riscvm, not(riscvg)))]
".attribute arch, \"rv64im\"",
#[cfg(all(riscv64, riscvg))]
Expand Down

0 comments on commit ebab8f7

Please sign in to comment.