Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 38 additions & 38 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ crate-type = ["dylib"]

[dependencies]
# These have to be in sync with each other
cranelift-codegen = { version = "0.137.0", default-features = false, features = ["std", "timing", "unwind", "all-native-arch"] }
cranelift-frontend = { version = "0.137.0" }
cranelift-module = { version = "0.137.0" }
cranelift-native = { version = "0.137.0" }
cranelift-jit = { version = "0.137.0", optional = true }
cranelift-object = { version = "0.137.0", default-features = false }
cranelift-codegen = { version = "0.138.0-rc.1", default-features = false, features = ["std", "timing", "unwind", "all-native-arch"] }
cranelift-frontend = { version = "0.138.0-rc.1" }
cranelift-module = { version = "0.138.0-rc.1" }
cranelift-native = { version = "0.138.0-rc.1" }
cranelift-jit = { version = "0.138.0-rc.1", optional = true }
cranelift-object = { version = "0.138.0-rc.1", default-features = false }
target-lexicon = "0.13"
gimli = { version = "0.33", default-features = false, features = ["write"] }
object = { version = "0.40.0", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
Expand All @@ -24,12 +24,12 @@ smallvec = "1.8.1"

# Uncomment to use an unreleased version of cranelift
#[patch.crates-io]
#cranelift-codegen = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-50.0.0" }
#cranelift-frontend = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-50.0.0" }
#cranelift-module = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-50.0.0" }
#cranelift-native = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-50.0.0" }
#cranelift-jit = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-50.0.0" }
#cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-50.0.0" }
#cranelift-codegen = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-51.0.0" }
#cranelift-frontend = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-51.0.0" }
#cranelift-module = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-51.0.0" }
#cranelift-native = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-51.0.0" }
#cranelift-jit = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-51.0.0" }
#cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-51.0.0" }

# Uncomment to use local checkout of cranelift
#cranelift-codegen = { path = "../wasmtime/cranelift/codegen" }
Expand Down
58 changes: 0 additions & 58 deletions patches/0027-stdlib-128bit-atomic-operations.patch

This file was deleted.

39 changes: 0 additions & 39 deletions patches/0027-sysroot_tests-128bit-atomic-operations.patch

This file was deleted.

3 changes: 0 additions & 3 deletions scripts/setup_rust_fork.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ git checkout --no-progress "$(rustc -V | cut -d' ' -f3 | tr -d '(')"

git submodule update --quiet --init src/tools/cargo library/backtrace library/stdarch

git -c user.name=Dummy -c user.email=dummy@example.com -c commit.gpgSign=false \
am ../patches/*-stdlib-*.patch

cat > config.toml <<EOF
change-id = "ignore"

Expand Down
27 changes: 0 additions & 27 deletions src/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,33 +115,6 @@ pub(crate) fn clif_int_or_float_cast(
vec![AbiParam::new(types::I128)],
&[from],
)[0]
} else if to_ty == types::I8 || to_ty == types::I16 {
// FIXME implement fcvt_to_*int_sat.i8/i16
let val = if to_signed {
fx.bcx.ins().fcvt_to_sint_sat(types::I32, from)
} else {
fx.bcx.ins().fcvt_to_uint_sat(types::I32, from)
};
let (min, max) = match (to_ty, to_signed) {
(types::I8, false) => (0, i64::from(u8::MAX)),
(types::I16, false) => (0, i64::from(u16::MAX)),
(types::I8, true) => (i64::from(i8::MIN as u32), i64::from(i8::MAX as u32)),
(types::I16, true) => (i64::from(i16::MIN as u32), i64::from(i16::MAX as u32)),
_ => unreachable!(),
};
let min_val = fx.bcx.ins().iconst(types::I32, min);
let max_val = fx.bcx.ins().iconst(types::I32, max);

let val = if to_signed {
let has_underflow = fx.bcx.ins().icmp_imm_s(IntCC::SignedLessThan, val, min);
let has_overflow = fx.bcx.ins().icmp_imm_s(IntCC::SignedGreaterThan, val, max);
let bottom_capped = fx.bcx.ins().select(has_underflow, min_val, val);
fx.bcx.ins().select(has_overflow, max_val, bottom_capped)
} else {
let has_overflow = fx.bcx.ins().icmp_imm_u(IntCC::UnsignedGreaterThan, val, max);
fx.bcx.ins().select(has_overflow, max_val, val)
};
fx.bcx.ins().ireduce(to_ty, val)
} else if to_signed {
fx.bcx.ins().fcvt_to_sint_sat(to_ty, from)
} else {
Expand Down
Loading
Loading