diff --git a/cranelift/codegen/src/isa/legacy/mod.rs b/cranelift/codegen/src/isa/legacy/mod.rs
new file mode 100644
index 0000000000..a89230f941
--- /dev/null
+++ b/cranelift/codegen/src/isa/legacy/mod.rs
@@ -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;
diff --git a/cranelift/codegen/src/isa/riscv/abi.rs b/cranelift/codegen/src/isa/legacy/riscv/abi.rs
similarity index 100%
rename from cranelift/codegen/src/isa/riscv/abi.rs
rename to cranelift/codegen/src/isa/legacy/riscv/abi.rs
diff --git a/cranelift/codegen/src/isa/riscv/binemit.rs b/cranelift/codegen/src/isa/legacy/riscv/binemit.rs
similarity index 100%
rename from cranelift/codegen/src/isa/riscv/binemit.rs
rename to cranelift/codegen/src/isa/legacy/riscv/binemit.rs
diff --git a/cranelift/codegen/src/isa/riscv/enc_tables.rs b/cranelift/codegen/src/isa/legacy/riscv/enc_tables.rs
similarity index 100%
rename from cranelift/codegen/src/isa/riscv/enc_tables.rs
rename to cranelift/codegen/src/isa/legacy/riscv/enc_tables.rs
diff --git a/cranelift/codegen/src/isa/riscv/mod.rs b/cranelift/codegen/src/isa/legacy/riscv/mod.rs
similarity index 100%
rename from cranelift/codegen/src/isa/riscv/mod.rs
rename to cranelift/codegen/src/isa/legacy/riscv/mod.rs
diff --git a/cranelift/codegen/src/isa/riscv/registers.rs b/cranelift/codegen/src/isa/legacy/riscv/registers.rs
similarity index 100%
rename from cranelift/codegen/src/isa/riscv/registers.rs
rename to cranelift/codegen/src/isa/legacy/riscv/registers.rs
diff --git a/cranelift/codegen/src/isa/riscv/settings.rs b/cranelift/codegen/src/isa/legacy/riscv/settings.rs
similarity index 100%
rename from cranelift/codegen/src/isa/riscv/settings.rs
rename to cranelift/codegen/src/isa/legacy/riscv/settings.rs
diff --git a/cranelift/codegen/src/isa/x86/abi.rs b/cranelift/codegen/src/isa/legacy/x86/abi.rs
similarity index 99%
rename from cranelift/codegen/src/isa/x86/abi.rs
rename to cranelift/codegen/src/isa/legacy/x86/abi.rs
index 69c1e1b761..934cfec4dd 100644
--- a/cranelift/codegen/src/isa/x86/abi.rs
+++ b/cranelift/codegen/src/isa/legacy/x86/abi.rs
@@ -1,6 +1,6 @@
//! 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::settings as isa_settings;
use crate::abi::{legalize_args, ArgAction, ArgAssigner, ValueConversion};
diff --git a/cranelift/codegen/src/isa/x86/binemit.rs b/cranelift/codegen/src/isa/legacy/x86/binemit.rs
similarity index 100%
rename from cranelift/codegen/src/isa/x86/binemit.rs
rename to cranelift/codegen/src/isa/legacy/x86/binemit.rs
diff --git a/cranelift/codegen/src/isa/x86/enc_tables.rs b/cranelift/codegen/src/isa/legacy/x86/enc_tables.rs
similarity index 100%
rename from cranelift/codegen/src/isa/x86/enc_tables.rs
rename to cranelift/codegen/src/isa/legacy/x86/enc_tables.rs
diff --git a/cranelift/codegen/src/isa/x86/mod.rs b/cranelift/codegen/src/isa/legacy/x86/mod.rs
similarity index 98%
rename from cranelift/codegen/src/isa/x86/mod.rs
rename to cranelift/codegen/src/isa/legacy/x86/mod.rs
index 54efe7fcfd..e61fda1931 100644
--- a/cranelift/codegen/src/isa/x86/mod.rs
+++ b/cranelift/codegen/src/isa/legacy/x86/mod.rs
@@ -178,7 +178,7 @@ impl TargetIsa for Isa {
fn create_unwind_info(
&self,
func: &ir::Function,
- ) -> CodegenResult