linux-mips
[Top] [All Lists]

64bit _syscall6 fix

To: ralf@linux-mips.org, linux-mips@linux-mips.org
Subject: 64bit _syscall6 fix
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Tue, 29 Jul 2003 16:13:03 +0900 (JST)
Organization: TOSHIBA Personal Computer System Corporation
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Here is a small fix for 64bit (N32 or ABI64) version of _syscall6().
"__NR_##name" is 7th parameter not 6th.

This is for 2.4 branch.  

diff -u linux-mips-cvs/include/asm-mips64/unistd.h 
linux.new/include/asm-mips64/unistd.h
--- linux-mips-cvs/include/asm-mips64/unistd.h  Tue Jul 22 09:48:19 2003
+++ linux.new/include/asm-mips64/unistd.h       Tue Jul 29 16:03:31 2003
@@ -883,7 +883,7 @@
        \
        __asm__ volatile ( \
        ".set\tnoreorder\n\t" \
-       "li\t$2, %6\t\t\t# " #name "\n\t" \
+       "li\t$2, %7\t\t\t# " #name "\n\t" \
        "syscall\n\t" \
        "move\t%0, $2\n\t" \
        ".set\treorder" \

And this is for 2.6.

diff -u linux-mips-cvs-2.6/include/asm-mips/unistd.h 
linux.new-2.6/include/asm-mips/unistd.h
--- linux-mips-cvs-2.6/include/asm-mips/unistd.h        Tue Jul 29 16:08:13 2003
+++ linux.new-2.6/include/asm-mips/unistd.h     Tue Jul 29 16:10:43 2003
@@ -1028,7 +1028,7 @@
        \
        __asm__ volatile ( \
        ".set\tnoreorder\n\t" \
-       "li\t$2, %6\t\t\t# " #name "\n\t" \
+       "li\t$2, %7\t\t\t# " #name "\n\t" \
        "syscall\n\t" \
        "move\t%0, $2\n\t" \
        ".set\treorder" \
---
Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>
  • 64bit _syscall6 fix, Atsushi Nemoto <=