fix syscall2 for linux-aarch64

This commit is contained in:
Jorge Aparicio 2017-01-14 19:53:16 -05:00
parent 73b3ee20b9
commit afc4b25219
2 changed files with 7 additions and 1 deletions

View file

@ -5,6 +5,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased] ## [Unreleased]
### Fixed
- syscall2 for linux-aarch64. There was a type in the register constraints.
## v0.1.0 - 2017-01-13 ## v0.1.0 - 2017-01-13
Initial release. Forked from [syscall] v0.2.1. Initial release. Forked from [syscall] v0.2.1.
@ -13,7 +17,9 @@ Initial release. Forked from [syscall] v0.2.1.
- Support for ARM, Aarch64, MIPS, MIPS64, PowerPC, PowerPC64, SPARC64, x86 and - Support for ARM, Aarch64, MIPS, MIPS64, PowerPC, PowerPC64, SPARC64, x86 and
x86_64 Linux x86_64 Linux
- Support for x86_64 macOS - Support for x86_64 macOS
- Support for x86_64 FreeBSD - Support for x86_64 FreeBSD
[Unreleased]: https://github.com/japaric/syscall.rs/compare/v0.1.0...HEAD [Unreleased]: https://github.com/japaric/syscall.rs/compare/v0.1.0...HEAD

View file

@ -37,7 +37,7 @@ pub unsafe fn syscall1(n: usize, a1: usize) -> usize {
pub unsafe fn syscall2(n: usize, a1: usize, a2: usize) -> usize { pub unsafe fn syscall2(n: usize, a1: usize, a2: usize) -> usize {
let ret: usize; let ret: usize;
asm!("svc 0" asm!("svc 0"
: "={r0}"(ret) : "={x0}"(ret)
: "{x8}"(n) "{x0}"(a1) "{x1}"(a2) : "{x8}"(n) "{x0}"(a1) "{x1}"(a2)
: "memory" "cc" : "memory" "cc"
: "volatile"); : "volatile");