upgrade to target-lexicon 0.8.0
* the target-lexicon crate no longer has or needs the std feature in cargo, so we can delete all default-features=false, any mentions of its std feature, and the nostd configs in many lib.rs files * the representation of arm architectures has changed, so some case statements needed refactoring
This commit is contained in:
@@ -18,7 +18,7 @@ cranelift-bforest = { path = "../cranelift-bforest", version = "0.41.0", default
|
||||
failure = { version = "0.1.1", default-features = false, features = ["derive"] }
|
||||
failure_derive = { version = "0.1.1", default-features = false }
|
||||
hashmap_core = { version = "0.1.9", optional = true }
|
||||
target-lexicon = { version = "0.4.0", default-features = false }
|
||||
target-lexicon = "0.8.0"
|
||||
log = { version = "0.4.6", default-features = false }
|
||||
serde = { version = "1.0.94", features = ["derive"], optional = true }
|
||||
# It is a goal of the cranelift-codegen crate to have minimal external dependencies.
|
||||
@@ -38,7 +38,6 @@ default = ["std"]
|
||||
std = [
|
||||
"cranelift-entity/std",
|
||||
"cranelift-bforest/std",
|
||||
"target-lexicon/std",
|
||||
"cranelift-codegen-meta/std"
|
||||
]
|
||||
|
||||
|
||||
@@ -42,14 +42,13 @@ fn isa_constructor(
|
||||
builder: shared_settings::Builder,
|
||||
) -> Box<dyn TargetIsa> {
|
||||
let level1 = match triple.architecture {
|
||||
Architecture::Thumbv6m | Architecture::Thumbv7em | Architecture::Thumbv7m => {
|
||||
&enc_tables::LEVEL1_T32[..]
|
||||
Architecture::Arm(arm) => {
|
||||
if arm.is_thumb() {
|
||||
&enc_tables::LEVEL1_T32[..]
|
||||
} else {
|
||||
&enc_tables::LEVEL1_A32[..]
|
||||
}
|
||||
}
|
||||
Architecture::Arm
|
||||
| Architecture::Armv4t
|
||||
| Architecture::Armv5te
|
||||
| Architecture::Armv7
|
||||
| Architecture::Armv7s => &enc_tables::LEVEL1_A32[..],
|
||||
_ => panic!(),
|
||||
};
|
||||
Box::new(Isa {
|
||||
|
||||
@@ -31,6 +31,7 @@ impl CallConv {
|
||||
// uses System V.
|
||||
Ok(CallingConvention::SystemV) | Err(()) => CallConv::SystemV,
|
||||
Ok(CallingConvention::WindowsFastcall) => CallConv::WindowsFastcall,
|
||||
Ok(unimp) => unimplemented!("calling convention: {:?}", unimp),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -111,15 +111,8 @@ pub fn lookup(triple: Triple) -> Result<Builder, LookupError> {
|
||||
Architecture::I386 | Architecture::I586 | Architecture::I686 | Architecture::X86_64 => {
|
||||
isa_builder!(x86, "x86")(triple)
|
||||
}
|
||||
Architecture::Thumbv6m
|
||||
| Architecture::Thumbv7em
|
||||
| Architecture::Thumbv7m
|
||||
| Architecture::Arm
|
||||
| Architecture::Armv4t
|
||||
| Architecture::Armv5te
|
||||
| Architecture::Armv7
|
||||
| Architecture::Armv7s => isa_builder!(arm32, "arm32")(triple),
|
||||
Architecture::Aarch64 => isa_builder!(arm64, "arm64")(triple),
|
||||
Architecture::Arm { .. } => isa_builder!(arm32, "arm32")(triple),
|
||||
Architecture::Aarch64 { .. } => isa_builder!(arm64, "arm64")(triple),
|
||||
_ => Err(LookupError::Unsupported),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
)
|
||||
)]
|
||||
#![no_std]
|
||||
#![cfg_attr(not(feature = "std"), feature(alloc))]
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
#[macro_use]
|
||||
|
||||
Reference in New Issue
Block a user