Skip to content

Commit

Permalink
Remove all cdsl legalizations for arm32, arm64 and s390x
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Jun 20, 2021
1 parent 9834632 commit b8f75ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 30 deletions.
16 changes: 1 addition & 15 deletions cranelift/codegen/meta/src/isa/arm32/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use crate::cdsl::cpu_modes::CpuMode;
use crate::cdsl::instructions::{InstructionGroupBuilder, InstructionPredicateMap};
use crate::cdsl::isa::TargetIsa;
use crate::cdsl::recipes::Recipes;
Expand Down Expand Up @@ -55,20 +54,7 @@ pub(crate) fn define(shared_defs: &mut SharedDefinitions) -> TargetIsa {

let inst_group = InstructionGroupBuilder::new(&mut shared_defs.all_instructions).build();

// CPU modes for 32-bit ARM and Thumb2.
let mut a32 = CpuMode::new("A32");
let mut t32 = CpuMode::new("T32");

// TODO refine these.
let narrow_flags = shared_defs.transform_groups.by_name("narrow_flags");
a32.legalize_default(narrow_flags);
t32.legalize_default(narrow_flags);

// Make sure that the expand code is used, thus generated.
let expand = shared_defs.transform_groups.by_name("expand");
a32.legalize_monomorphic(expand);

let cpu_modes = vec![a32, t32];
let cpu_modes = vec![];

// TODO implement arm32 recipes.
let recipes = Recipes::new();
Expand Down
11 changes: 1 addition & 10 deletions cranelift/codegen/meta/src/isa/arm64/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use crate::cdsl::cpu_modes::CpuMode;
use crate::cdsl::instructions::{InstructionGroupBuilder, InstructionPredicateMap};
use crate::cdsl::isa::TargetIsa;
use crate::cdsl::recipes::Recipes;
Expand Down Expand Up @@ -54,15 +53,7 @@ pub(crate) fn define(shared_defs: &mut SharedDefinitions) -> TargetIsa {

let inst_group = InstructionGroupBuilder::new(&mut shared_defs.all_instructions).build();

let mut a64 = CpuMode::new("A64");

// TODO refine these.
let expand_flags = shared_defs.transform_groups.by_name("expand_flags");
let narrow_flags = shared_defs.transform_groups.by_name("narrow_flags");
a64.legalize_monomorphic(expand_flags);
a64.legalize_default(narrow_flags);

let cpu_modes = vec![a64];
let cpu_modes = vec![];

// TODO implement arm64 recipes.
let recipes = Recipes::new();
Expand Down
6 changes: 1 addition & 5 deletions cranelift/codegen/meta/src/isa/s390x/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use crate::cdsl::cpu_modes::CpuMode;
use crate::cdsl::instructions::{InstructionGroupBuilder, InstructionPredicateMap};
use crate::cdsl::isa::TargetIsa;
use crate::cdsl::recipes::Recipes;
Expand Down Expand Up @@ -51,10 +50,7 @@ pub(crate) fn define(shared_defs: &mut SharedDefinitions) -> TargetIsa {
let recipes = Recipes::new();
let encodings_predicates = InstructionPredicateMap::new();

let mut mode = CpuMode::new("s390x");
let expand = shared_defs.transform_groups.by_name("expand");
mode.legalize_default(expand);
let cpu_modes = vec![mode];
let cpu_modes = vec![];

TargetIsa::new(
"s390x",
Expand Down

0 comments on commit b8f75ee

Please sign in to comment.