Skip to content

Commit

Permalink
s390x: Add ISLE support
Browse files Browse the repository at this point in the history
This adds ISLE support for the s390x back-end and moves lowering
of most instructions to ISLE.  The only instructions still remaining
are calls, returns, traps, and branches, most of which will need
additional support in common code.

Generated code is not intended to be (significantly) different
than before; any additional optimizations now made easier to
implement due to the ISLE layer can be added in follow-on patches.

There were a few differences in some filetests, but those are all
just simple register allocation changes (and all to the better!).
  • Loading branch information
uweigand committed Jan 21, 2022
1 parent 2615ef9 commit a94e72b
Show file tree
Hide file tree
Showing 11 changed files with 16,975 additions and 3,219 deletions.
15 changes: 15 additions & 0 deletions cranelift/codegen/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ fn get_isle_compilations(crate_dir: &std::path::Path) -> Result<IsleCompilations
make_isle_source_path_relative(&cur_dir, crate_dir.join("src").join("isa").join("x64"));
let src_isa_aarch64 =
make_isle_source_path_relative(&cur_dir, crate_dir.join("src").join("isa").join("aarch64"));
let src_isa_s390x =
make_isle_source_path_relative(&cur_dir, crate_dir.join("src").join("isa").join("s390x"));

// This is a set of ISLE compilation units.
//
Expand Down Expand Up @@ -258,6 +260,19 @@ fn get_isle_compilations(crate_dir: &std::path::Path) -> Result<IsleCompilations
src_isa_aarch64.join("lower.isle"),
],
},
// The s390x instruction selector.
IsleCompilation {
output: src_isa_s390x
.join("lower")
.join("isle")
.join("generated_code.rs"),
inputs: vec![
clif_isle.clone(),
prelude_isle.clone(),
src_isa_s390x.join("inst.isle"),
src_isa_s390x.join("lower.isle"),
],
},
],
})
}
Expand Down
Loading

0 comments on commit a94e72b

Please sign in to comment.