Rename intel to x86.

x86 is the more accurate name, as there are non-Intel x86 implementations.

Fixes #263.
This commit is contained in:
Dan Gohman
2018-04-12 15:23:39 -07:00
parent 9e17e62d68
commit 1c760ab179
87 changed files with 222 additions and 225 deletions

View File

@@ -77,7 +77,7 @@ fn main() {
#[derive(Copy, Clone)]
enum Isa {
Riscv,
Intel,
X86,
Arm32,
Arm64,
}
@@ -103,14 +103,14 @@ impl Isa {
/// Returns all supported isa targets.
fn all() -> [Isa; 4] {
[Isa::Riscv, Isa::Intel, Isa::Arm32, Isa::Arm64]
[Isa::Riscv, Isa::X86, Isa::Arm32, Isa::Arm64]
}
/// Returns name of the isa target.
fn name(&self) -> &'static str {
match *self {
Isa::Riscv => "riscv",
Isa::Intel => "intel",
Isa::X86 => "x86",
Isa::Arm32 => "arm32",
Isa::Arm64 => "arm64",
}
@@ -120,7 +120,7 @@ impl Isa {
fn is_arch_applicable(&self, arch: &str) -> bool {
match *self {
Isa::Riscv => arch == "riscv",
Isa::Intel => ["x86_64", "i386", "i586", "i686"].contains(&arch),
Isa::X86 => ["x86_64", "i386", "i586", "i686"].contains(&arch),
Isa::Arm32 => arch.starts_with("arm") || arch.starts_with("thumb"),
Isa::Arm64 => arch == "aarch64",
}