]> git.lizzy.rs Git - rust.git/commit
add mips64-gnu and mips64el-gnu targets
authorJorge Aparicio <japaricious@gmail.com>
Fri, 26 Aug 2016 22:06:13 +0000 (17:06 -0500)
committerJorge Aparicio <japaricious@gmail.com>
Fri, 26 Aug 2016 22:17:03 +0000 (17:17 -0500)
commit6a5bdb78f15b8e53fa848e31c90298edf6c48d6c
tree5d4d4ca9868472d1cd5f13912d44def20ce9ce0b
parente07dd59eaeb7be95afd2fb3dc131108ae750c91c
add mips64-gnu and mips64el-gnu targets

With this commit one can build no_core (and probably no_std as well)
Rust programs for these targets. It's not yet possible to cross compile
std for these targets because rust-lang/libc doesn't know about the
mips64 architecture.

These targets have been tested by cross compiling the "smallest hello"
program (see code below) and then running it under QEMU.

``` rust
#![feature(start)]
#![feature(lang_items)]
#![feature(no_core)]
#![no_core]

#[link(name = "c")]
extern {
    fn puts(_: *const u8);
}

#[start]
fn start(_: isize, _: *const *const u8) -> isize {
    unsafe {
        let msg = b"Hello, world!\0";
        puts(msg as *const _ as *const u8);
    }
    0
}

#[lang = "copy"]
trait Copy {}

#[lang = "sized"]
trait Sized {}
```
mk/cfg/mips64-unknown-linux-gnuabi64.mk [new file with mode: 0644]
mk/cfg/mips64el-unknown-linux-gnuabi64.mk [new file with mode: 0644]
src/librustc_back/target/mips64_unknown_linux_gnuabi64.rs [new file with mode: 0644]
src/librustc_back/target/mips64el_unknown_linux_gnuabi64.rs [new file with mode: 0644]
src/librustc_back/target/mod.rs
src/librustc_trans/abi.rs
src/librustc_trans/cabi_mips64.rs [new file with mode: 0644]
src/librustc_trans/cabi_powerpc.rs
src/librustc_trans/lib.rs