From 13fbd909d7f119a402f8bc759945f1e3e99d96a7 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Mon, 11 Mar 2019 17:00:44 +0100 Subject: [PATCH] ARM: Specify R7 as changed. * lib/linux/arm-mes-gcc/mini.c (_exit): Specify R7 as changed. * lib/linux/arm-mes-gcc/syscall.c (_sys_call, _sys_call1, _sys_call2, _sys_call3, _sys_call4): Specify R7 as changed. --- lib/linux/arm-mes-gcc/mini.c | 2 +- lib/linux/arm-mes-gcc/syscall.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/linux/arm-mes-gcc/mini.c b/lib/linux/arm-mes-gcc/mini.c index 789c6d39..c39ecf86 100644 --- a/lib/linux/arm-mes-gcc/mini.c +++ b/lib/linux/arm-mes-gcc/mini.c @@ -33,7 +33,7 @@ _exit (int code) "swi $0\n\t" : // no outputs "=" (r) : "r" (code) - : "r0"//, "r7" // error: r7 cannot be used in asm here + : "r0", "r7" ); // not reached _exit (0); diff --git a/lib/linux/arm-mes-gcc/syscall.c b/lib/linux/arm-mes-gcc/syscall.c index a7adc13a..96d7d5fa 100644 --- a/lib/linux/arm-mes-gcc/syscall.c +++ b/lib/linux/arm-mes-gcc/syscall.c @@ -32,7 +32,7 @@ _sys_call (long sys_call) "mov %0, r0\n\t" : "=r" (r) : "r" (sys_call) - : "r0" // , "r7" // error: r7 cannot be used in asm here + : "r0", "r7" ); if (r < 0) { @@ -55,7 +55,7 @@ _sys_call1 (long sys_call, long one) "mov %0, r0\n\t" : "=r" (r) : "r" (sys_call), "r" (one) - : "r0" + : "r0", "r7" ); if (r < 0) { @@ -79,7 +79,7 @@ _sys_call2 (long sys_call, long one, long two) "mov %0, r0\n\t" : "=r" (r) : "r" (sys_call), "r" (one), "r" (two) - : "r0", "r1" + : "r0", "r1", "r7" ); if (r < 0) { @@ -104,7 +104,7 @@ _sys_call3 (long sys_call, long one, long two, long three) "mov %0, r0\n\t" : "=r" (r) : "r" (sys_call), "r" (one), "r" (two), "r" (three) - : "r0", "r1", "r2" + : "r0", "r1", "r2", "r7" ); if (r < 0) { @@ -130,7 +130,7 @@ _sys_call4 (long sys_call, long one, long two, long three, long four) "mov %0, r0\n\t" : "=r" (r) : "r" (sys_call), "r" (one), "r" (two), "r" (three), "r" (four) - : "r0", "r1", "r2", "r3" + : "r0", "r1", "r2", "r3", "r7" ); if (r < 0) { @@ -158,7 +158,7 @@ _sys_call6 (long sys_call, long one, long two, long three, long four, long five, "mov %0, r0\n\t" : "=r" (r) : "r" (sys_call), "r" (one), "r" (two), "r" (three), "r" (four), "r" (five), "r" (six) - : "r0", "r1", "r2", "r3", "r4", "r5" + : "r0", "r1", "r2", "r3", "r4", "r5" //, "r7" FIXME ); return r; }