Re: [PATCH 1/2] Documentation: LoongArch: Document the syscall ABI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2022/10/18 18:12, Xi Ruoyao wrote:
On Tue, 2022-10-18 at 18:04 +0800, WANG Xuerui wrote:

/* snip */


+The system call number is placed in the register ``a7``.
+Parameters, if present, are placed from ``a0`` through ``a6`` as needed,
+as if calling a function with the respective arguments.
+Upon return, ``a0`` contains the return value, and ``t0-t8`` should be
+considered clobbered; all other registers are preserved.
Hmm, are a1-a7 guaranteed to be preserved?

Yes, you can find the relevant code here: [1] [2].

Thanks.


[1]: https://github.com/torvalds/linux/blob/master/arch/loongarch/kernel/entry.S#L43-L50

[2]: https://github.com/torvalds/linux/blob/master/arch/loongarch/kernel/entry.S#L68




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux