diff --git a/.travis.yml b/.travis.yml index da28db8da8..e4cf492793 100644 --- a/.travis.yml +++ b/.travis.yml @@ -64,6 +64,28 @@ matrix: env: TARGET=thumbv7em-none-eabi NORUN=1 NOSTD=1 NO_DOCKER=1 - name: "thumbv7em-none-eabihf - build libcore only" env: TARGET=thumbv7em-none-eabihf NORUN=1 NOSTD=1 NO_DOCKER=1 + - name: "Game Boy Advance - build libcore only" + env: NORUN=1 NOSTD=1 NO_DOCKER=1 + install: + - rustup component add rust-src + - cargo install xargo + script: + # Obtain the devkitPro tools, using `target/` as a temp directory. This + # is required because we need to use their linker. `lld` uses the `BLX` + # instruction, which was not available in thumb state code until ARMv5. + - mkdir -p target + - cd target + - wget https://github.com/devkitPro/pacman/releases/download/devkitpro-pacman-1.0.1/devkitpro-pacman.deb + - sudo dpkg -i devkitpro-pacman.deb + - sudo dkp-pacman -Sy + - sudo dkp-pacman -Syu + - sudo dkp-pacman -S -v --noconfirm gba-tools devkitARM + - export PATH="$PATH:/opt/devkitpro/devkitARM/bin" + - export PATH="$PATH:/opt/devkitpro/tools/bin" + - cd .. + # Pull the target spec up into the current directory and then build + - mv ci/gba.json gba.json + - xargo build --all --target=gba - name: "Documentation" install: true script: ci/dox.sh diff --git a/ci/gba.json b/ci/gba.json new file mode 100644 index 0000000000..5aece43af2 --- /dev/null +++ b/ci/gba.json @@ -0,0 +1,34 @@ +{ + "abi-blacklist": [ + "stdcall", + "fastcall", + "vectorcall", + "thiscall", + "win64", + "sysv64" + ], + "arch": "arm", + "atomic-cas": false, + "cpu": "arm7tdmi", + "data-layout": "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", + "emit-debug-gdb-scripts": false, + "env": "agb", + "executables": true, + "features": "+soft-float,+strict-align", + "linker": "arm-none-eabi-ld", + "linker-flavor": "ld", + "linker-is-gnu": true, + "llvm-target": "thumbv4-none-agb", + "os": "none", + "panic-strategy": "abort", + "pre-link-args": { + "ld": [ + "-Tlinker.ld" + ] + }, + "relocation-model": "static", + "target-c-int-width": "32", + "target-endian": "little", + "target-pointer-width": "32", + "vendor": "nintendo" +} \ No newline at end of file diff --git a/crates/core_arch/src/acle/registers/aarch32.rs b/crates/core_arch/src/acle/registers/aarch32.rs index f59af5d3ae..5cc66308be 100644 --- a/crates/core_arch/src/acle/registers/aarch32.rs +++ b/crates/core_arch/src/acle/registers/aarch32.rs @@ -1,4 +1,9 @@ /// Application Program Status Register pub struct APSR; -rsr!(APSR); +// Note (@Lokathor): Because this breaks the use of Rust on the Game Boy +// Advance, this change must be reverted until Rust learns to handle cpu state +// properly. See also: https://github.com/rust-lang-nursery/stdsimd/issues/702 + +//#[cfg(any(not(target_feature = "thumb-state"), target_feature = "v6t2"))] +//rsr!(APSR);