Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

s390x: Fix epilog for some tail-call ABI routines (#11689)

Ulrich Weigand3ba4d97940a4
diff --git a/cranelift/codegen/src/isa/s390x/abi.rs b/cranelift/codegen/src/isa/s390x/abi.rs
index 13da06c4e9..52e15af267 100644
--- a/cranelift/codegen/src/isa/s390x/abi.rs
+++ b/cranelift/codegen/src/isa/s390x/abi.rs
@@ -1100,8 +1100,8 @@ impl S390xMachineDeps {
fn is_reg_saved_in_prologue(call_conv: isa::CallConv, r: RealReg) -> bool {
match (call_conv, r.class()) {
(isa::CallConv::Tail, RegClass::Int) => {
- // r8 - r15 inclusive are callee-saves.
- r.hw_enc() >= 8 && r.hw_enc() <= 15
+ // r8 - r14 inclusive are callee-saves.
+ r.hw_enc() >= 8 && r.hw_enc() <= 14
}
(_, RegClass::Int) => {
// r6 - r15 inclusive are callee-saves.
diff --git a/crates/test-util/src/wast.rs b/crates/test-util/src/wast.rs
index 7a98f9f443..8467b786a7 100644
--- a/crates/test-util/src/wast.rs
+++ b/crates/test-util/src/wast.rs
@@ -326,13 +326,7 @@ impl Compiler {
/// `Config::compiler_panicking_wasm_features`.
pub fn should_fail(&self, config: &TestConfig) -> bool {
match self {
- Compiler::CraneliftNative => {
- // FIXME(#11602) temporarily disabled
- if cfg!(target_arch = "s390x") && config.exceptions() {
- return true;
- }
- config.legacy_exceptions()
- }
+ Compiler::CraneliftNative => config.legacy_exceptions(),
Compiler::Winch => {
if config.gc()
diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rs
index e1cc9f2fda..ae61afcfa0 100644
--- a/crates/wasmtime/src/config.rs
+++ b/crates/wasmtime/src/config.rs
@@ -2096,11 +2096,6 @@ impl Config {
unsupported |= WasmFeatures::STACK_SWITCHING;
}
- // FIXME(#11602) temporarily disabled
- if self.compiler_target().architecture == target_lexicon::Architecture::S390x {
- unsupported |= WasmFeatures::EXCEPTIONS;
- }
-
use target_lexicon::*;
match self.compiler_target() {
Triple {