Skip to content
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

Fix the recent breakage of the gba crate #704

Merged
merged 6 commits into from
Mar 18, 2019
Merged
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
22 changes: 22 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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"
}
7 changes: 6 additions & 1 deletion crates/core_arch/src/acle/registers/aarch32.rs
Original file line number Diff line number Diff line change
@@ -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);