Skip to content

Commit

Permalink
Revert the regression, add a GBA target to avoid this again
Browse files Browse the repository at this point in the history
  • Loading branch information
Lokathor authored and gnzlbg committed Mar 18, 2019
1 parent e3e067d commit 2fdd3ac
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 2 deletions.
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,24 @@ 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: 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 ..
- xargo build --all --target=ci/gba.json
- name: "Documentation"
install: true
script: ci/dox.sh
Expand Down
34 changes: 34 additions & 0 deletions ci/gba.json
Original file line number Diff line number Diff line change
@@ -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"
}
8 changes: 6 additions & 2 deletions crates/core_arch/src/acle/registers/aarch32.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
/// Application Program Status Register
pub struct APSR;

#[cfg(any(not(target_feature = "thumb-mode"), target_feature = "v6t2"))]
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);

0 comments on commit 2fdd3ac

Please sign in to comment.