From 981064d039d0e7a5fd66b5369f2a0390728ca4be Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Sat, 20 Feb 2010 04:57:37 +0000 Subject: [PATCH] ARM EABI git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2878 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- lib/syscall-alternative.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/lib/syscall-alternative.h b/lib/syscall-alternative.h index 63f4f32..a3d5bc9 100644 --- a/lib/syscall-alternative.h +++ b/lib/syscall-alternative.h @@ -90,6 +90,32 @@ #elif defined(__arm__) +#ifdef __ARM_EABI__ + +/* The Arm calling convention uses stack args after four arguments + but the Linux kernel gets up to seven arguments in registers. + + scnr: r7 + args: a1(r0), a2(r1), a3(r2), a4(r3), a5(r4), a6(r5), + sret: r0(r0) + serr: (sret >= (unsigned)-EMAXERRNO) + call: swi + clob: memory + move: mov $dR,$sR +*/ + +#define __sysc_max_err 125 + +#define __sysc_cmd(n) "swi $0x0" + +#define __sysc_regs "r0", "r1", "r2", "r3", "r4", "r5" +#define __sysc_reg_cid "r7" +#define __sysc_reg_ret "r0" + +#warning syscall arch armel not tested yet + +#else + /* The Arm calling convention uses stack args after four arguments but the Linux kernel gets up to seven arguments in registers. @@ -111,6 +137,7 @@ #warning syscall arch arm not tested yet +#endif /* ***************************************** -- 1.8.1.5