Skip to content

[WIP] test enabling i128 lowering for emscripten #49487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ matrix:
- env: IMAGE=dist-x86_64-netbsd DEPLOY=1
if: branch = auto
- env: IMAGE=asmjs
if: branch = auto
if: type = pull_request OR branch = try OR branch = auto
- env: IMAGE=i686-gnu
if: branch = auto
- env: IMAGE=i686-gnu-nopt
Expand Down
1 change: 1 addition & 0 deletions src/librustc_back/target/asmjs_unknown_emscripten.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pub fn target() -> Result<Target, String> {
max_atomic_width: Some(32),
post_link_args: args,
target_family: Some("unix".to_string()),
i128_lowering: true,
codegen_backend: "emscripten".to_string(),
.. Default::default()
};
Expand Down
1 change: 1 addition & 0 deletions src/librustc_back/target/wasm32_unknown_emscripten.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pub fn target() -> Result<Target, String> {
max_atomic_width: Some(32),
post_link_args,
target_family: Some("unix".to_string()),
i128_lowering: true,
codegen_backend: "emscripten".to_string(),
.. Default::default()
};
Expand Down
2 changes: 0 additions & 2 deletions src/test/run-pass/float-int-invalid-const-cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-emscripten no i128 support

#![deny(const_err)]

use std::{f32, f64};
Expand Down
2 changes: 0 additions & 2 deletions src/test/run-pass/i128.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-emscripten i128 doesn't work

// compile-flags: -Z borrowck=compare

#![feature(test)]
Expand Down
2 changes: 0 additions & 2 deletions src/test/run-pass/intrinsics-integer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-emscripten no i128 support

#![feature(intrinsics)]

mod rusti {
Expand Down
11 changes: 3 additions & 8 deletions src/test/run-pass/saturating-float-casts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
extern crate test;

use std::{f32, f64};
use std::{u8, i8, u16, i16, u32, i32, u64, i64};
#[cfg(not(target_os="emscripten"))]
use std::{u128, i128};
use std::{u8, i8, u16, i16, u32, i32, u64, i64, u128, i128};
use test::black_box;

macro_rules! test {
Expand Down Expand Up @@ -97,11 +95,8 @@ macro_rules! fptoui_tests {
pub fn main() {
common_fptoi_tests!(f* -> i8 i16 i32 i64 u8 u16 u32 u64);
fptoui_tests!(f* -> u8 u16 u32 u64);
// FIXME emscripten does not support i128
#[cfg(not(target_os="emscripten"))] {
common_fptoi_tests!(f* -> i128 u128);
fptoui_tests!(f* -> u128);
}
common_fptoi_tests!(f* -> i128 u128);
fptoui_tests!(f* -> u128);

// The following tests cover edge cases for some integer types.

Expand Down