Skip to content

Commit

Permalink
Add support for riscv32im architecture
Browse files Browse the repository at this point in the history
New in Rust 1.61.
  • Loading branch information
sunshowers authored and sunfishcode committed May 23, 2022
1 parent 53f83c5 commit 4992cf0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/targets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ pub enum Riscv32Architecture {
Riscv32,
Riscv32gc,
Riscv32i,
Riscv32im,
Riscv32imac,
Riscv32imc,
}
Expand Down Expand Up @@ -685,6 +686,7 @@ impl fmt::Display for Riscv32Architecture {
Riscv32 => "riscv32",
Riscv32gc => "riscv32gc",
Riscv32i => "riscv32i",
Riscv32im => "riscv32im",
Riscv32imac => "riscv32imac",
Riscv32imc => "riscv32imc",
};
Expand Down Expand Up @@ -856,6 +858,7 @@ impl FromStr for Riscv32Architecture {
"riscv32" => Riscv32,
"riscv32gc" => Riscv32gc,
"riscv32i" => Riscv32i,
"riscv32im" => Riscv32im,
"riscv32imac" => Riscv32imac,
"riscv32imc" => Riscv32imc,
_ => return Err(()),
Expand Down Expand Up @@ -1454,6 +1457,7 @@ mod tests {
"riscv32gc-unknown-linux-gnu",
"riscv32gc-unknown-linux-musl",
"riscv32i-unknown-none-elf",
"riscv32im-unknown-none-elf",
"riscv32imac-unknown-none-elf",
"riscv32imc-unknown-none-elf",
"riscv32i-unknown-none-elf",
Expand Down

0 comments on commit 4992cf0

Please sign in to comment.