From 48cc88d0635fc998a56354d667998c1af2be330a Mon Sep 17 00:00:00 2001 From: Ken Thompson Date: Fri, 12 Nov 2010 14:27:55 -0800 Subject: [PATCH] arm is not little-endian R=rob CC=golang-dev https://golang.org/cl/3075041 --- src/pkg/syscall/mkall.sh | 2 +- src/pkg/syscall/zsyscall_linux_arm.go | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pkg/syscall/mkall.sh b/src/pkg/syscall/mkall.sh index b75df6abb84..a1f8ae2ff4a 100755 --- a/src/pkg/syscall/mkall.sh +++ b/src/pkg/syscall/mkall.sh @@ -144,7 +144,7 @@ nacl_386) ;; linux_arm) mkerrors="$mkerrors" - mksyscall="./mksyscall.sh -l32" + mksyscall="./mksyscall.sh -b32" mksysnum="./mksysnum_linux.sh /usr/include/asm/unistd.h" mktypes="godefs -gsyscall" ;; diff --git a/src/pkg/syscall/zsyscall_linux_arm.go b/src/pkg/syscall/zsyscall_linux_arm.go index 22db0dfe4da..ee78bf062ab 100644 --- a/src/pkg/syscall/zsyscall_linux_arm.go +++ b/src/pkg/syscall/zsyscall_linux_arm.go @@ -1,4 +1,4 @@ -// mksyscall.sh -l32 syscall_linux.go syscall_linux_arm.go +// mksyscall.sh -b32 syscall_linux.go syscall_linux_arm.go // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT package syscall @@ -209,7 +209,7 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (errno int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fallocate(fd int, mode uint32, off int64, len int64) (errno int) { - _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32)) + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off>>32), uintptr(off), uintptr(len>>32), uintptr(len)) errno = int(e1) return } @@ -581,7 +581,7 @@ func Setuid(uid int) (errno int) { func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, errno int) { r0, r1, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) - n = int64(int64(r1)<<32 | int64(r0)) + n = int64(int64(r0)<<32 | int64(r1)) errno = int(e1) return } @@ -613,7 +613,7 @@ func Sysinfo(info *Sysinfo_t) (errno int) { func Tee(rfd int, wfd int, len int, flags int) (n int64, errno int) { r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) - n = int64(int64(r1)<<32 | int64(r0)) + n = int64(int64(r0)<<32 | int64(r1)) errno = int(e1) return } @@ -873,7 +873,7 @@ func Fstatfs(fd int, buf *Statfs_t) (errno int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Ftruncate(fd int, length int64) (errno int) { - _, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32)) + _, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length>>32), uintptr(length)) errno = int(e1) return } @@ -1026,7 +1026,7 @@ func Statfs(path string, buf *Statfs_t) (errno int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Truncate(path string, length int64) (errno int) { - _, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(length), uintptr(length>>32)) + _, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(length>>32), uintptr(length)) errno = int(e1) return }