summaryrefslogtreecommitdiff
path: root/arch/xtensa
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2020-02-04 23:51:21 +0300
committerMax Filippov <jcmvbkbc@gmail.com>2020-02-05 08:57:05 +0300
commitc74c0fd2282e0e3ce891cb571f325b9412cbaa3f (patch)
tree2b96dba5a0c3ba4f9874fd902766f4b922456e4e /arch/xtensa
parent5e4417f921238b5acf101bfcd59a7b3463fb2dbd (diff)
downloadlinux-c74c0fd2282e0e3ce891cb571f325b9412cbaa3f.tar.xz
xtensa: ISS: improve simcall assembly
Drop redundant result moving from inline assembly, use a1 and b1 values as return value and errno value respectively. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa')
-rw-r--r--arch/xtensa/platforms/iss/include/platform/simcall.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/xtensa/platforms/iss/include/platform/simcall.h b/arch/xtensa/platforms/iss/include/platform/simcall.h
index 2ba45858e50a..111bcc5d0dc0 100644
--- a/arch/xtensa/platforms/iss/include/platform/simcall.h
+++ b/arch/xtensa/platforms/iss/include/platform/simcall.h
@@ -66,19 +66,17 @@ static int errno;
static inline int __simc(int a, int b, int c, int d)
{
- int ret;
register int a1 asm("a2") = a;
register int b1 asm("a3") = b;
register int c1 asm("a4") = c;
register int d1 asm("a5") = d;
__asm__ __volatile__ (
"simcall\n"
- "mov %0, a2\n"
- "mov %1, a3\n"
- : "=a" (ret), "=a" (errno), "+r"(a1), "+r"(b1)
+ : "+r"(a1), "+r"(b1)
: "r"(c1), "r"(d1)
: "memory");
- return ret;
+ errno = b1;
+ return a1;
}
static inline int simc_exit(int exit_code)