Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

128 bit integers not supported (needed for Rust) #169

Closed
@est31

Description

@est31

Hi!

Rust recently has gained experimental 128 bit integer support. The intention is to, unlike C or C++ which only support it on X86_64, provide 128 bit integers cross platform, just like its done for 64 bit integers already.

The regression test for 128 bit integers in the rust codebase is currently ignored for emscripten. When unignoring it, one gets the error message:

LLVM ERROR: Function _ZN4test9black_box17h6220793b9183d295E has illegal integer argument

This error message originates in code from this repo. The file that contains the error message also states that 64 is the maximum supported number. It would be great if it could be raised to 128.

This is a fairly minimal reproducing example:

#![feature(i128_type, test)]

#[inline(never)]
fn b(i: i128) -> i128 { // same as the black_box function from the test crate
    i
}

fn main() {
    let x: i128 = b(-1);
    let y: i128 = b(3);
    assert_eq!(0, !x);
}

cc @nagisa
cc @alexcrichton

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions