Merge pull request #3028 from cfallin/x86-legacy
cranelift-codegen: move old x86 and RISC-V backends to isa/legacy/.
This commit is contained in:
12
cranelift/codegen/src/isa/legacy/mod.rs
Normal file
12
cranelift/codegen/src/isa/legacy/mod.rs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
//! Legacy ("old-style") backends that will be removed in the future.
|
||||||
|
|
||||||
|
// N.B.: the old x86-64 backend (`x86`) and the new one (`x64`) are both
|
||||||
|
// included whenever building with x86 support. The new backend is the default,
|
||||||
|
// but the old can be requested with `BackendVariant::Legacy`. However, if this
|
||||||
|
// crate is built with the `old-x86-backend` feature, then the old backend is
|
||||||
|
// default instead.
|
||||||
|
#[cfg(feature = "x86")]
|
||||||
|
pub(crate) mod x86;
|
||||||
|
|
||||||
|
#[cfg(feature = "riscv")]
|
||||||
|
pub(crate) mod riscv;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
//! x86 ABI implementation.
|
//! x86 ABI implementation.
|
||||||
|
|
||||||
use super::super::settings as shared_settings;
|
use super::super::super::settings as shared_settings;
|
||||||
use super::registers::{FPR, GPR, RU};
|
use super::registers::{FPR, GPR, RU};
|
||||||
use super::settings as isa_settings;
|
use super::settings as isa_settings;
|
||||||
use crate::abi::{legalize_args, ArgAction, ArgAssigner, ValueConversion};
|
use crate::abi::{legalize_args, ArgAction, ArgAssigner, ValueConversion};
|
||||||
@@ -178,7 +178,7 @@ impl TargetIsa for Isa {
|
|||||||
fn create_unwind_info(
|
fn create_unwind_info(
|
||||||
&self,
|
&self,
|
||||||
func: &ir::Function,
|
func: &ir::Function,
|
||||||
) -> CodegenResult<Option<super::unwind::UnwindInfo>> {
|
) -> CodegenResult<Option<super::super::unwind::UnwindInfo>> {
|
||||||
abi::create_unwind_info(func, self)
|
abi::create_unwind_info(func, self)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,17 +70,6 @@ use core::fmt::{Debug, Formatter};
|
|||||||
use core::hash::Hasher;
|
use core::hash::Hasher;
|
||||||
use target_lexicon::{triple, Architecture, OperatingSystem, PointerWidth, Triple};
|
use target_lexicon::{triple, Architecture, OperatingSystem, PointerWidth, Triple};
|
||||||
|
|
||||||
#[cfg(feature = "riscv")]
|
|
||||||
mod riscv;
|
|
||||||
|
|
||||||
// N.B.: the old x86-64 backend (`x86`) and the new one (`x64`) are both
|
|
||||||
// included whenever building with x86 support. The new backend is the default,
|
|
||||||
// but the old can be requested with `BackendVariant::Legacy`. However, if this
|
|
||||||
// crate is built with the `old-x86-backend` feature, then the old backend is
|
|
||||||
// default instead.
|
|
||||||
#[cfg(feature = "x86")]
|
|
||||||
mod x86;
|
|
||||||
|
|
||||||
// This module is made public here for benchmarking purposes. No guarantees are
|
// This module is made public here for benchmarking purposes. No guarantees are
|
||||||
// made regarding API stability.
|
// made regarding API stability.
|
||||||
#[cfg(feature = "x86")]
|
#[cfg(feature = "x86")]
|
||||||
@@ -95,6 +84,15 @@ pub(crate) mod aarch64;
|
|||||||
#[cfg(feature = "s390x")]
|
#[cfg(feature = "s390x")]
|
||||||
mod s390x;
|
mod s390x;
|
||||||
|
|
||||||
|
#[cfg(any(feature = "x86", feature = "riscv"))]
|
||||||
|
mod legacy;
|
||||||
|
|
||||||
|
#[cfg(feature = "x86")]
|
||||||
|
use legacy::x86;
|
||||||
|
|
||||||
|
#[cfg(feature = "riscv")]
|
||||||
|
use legacy::riscv;
|
||||||
|
|
||||||
pub mod unwind;
|
pub mod unwind;
|
||||||
|
|
||||||
mod call_conv;
|
mod call_conv;
|
||||||
|
|||||||
Reference in New Issue
Block a user