aboutsummaryrefslogtreecommitdiffstats
path: root/man7/unicode.7
diff options
context:
space:
mode:
authorsnyh <snyh@snyh.org>2018-12-08 14:44:15 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2018-12-08 14:44:15 +0100
commit2e75672790959b85b60d332cbf2856693b3b6e47 (patch)
tree013eb3685dd5341a5518c56b0aea5aa909a656b4 /man7/unicode.7
parent34211ee3f2c60dc784f4d211b8c301860f5bd9a1 (diff)
downloadman-pages-2e75672790959b85b60d332cbf2856693b3b6e47.tar.gz
syscall.2: Fix wrong retval register number in alpha architecture
alpha use v0 e.g. $0 as the return value register both in syscall ABI and C ABI. see also https://github.com/torvalds/linux/blob/master/arch/alpha/kernel/entry.S#L479 The normal Alpha C ABI use a0~a5 to pass arguments and use v0 as the return value register. See here https://www2.cs.arizona.edu/projects/alto/Doc/local/alpha.register.html The syscall ABI use v0 as the trap number, a0~a5 to pass arguments and use a3 as a indicator (bool type) whether has a error occurred. We can also see the libc's syscall wrapper implements at https://code.woboq.org/userspace/glibc/sysdeps/unix/sysv/linux/alpha/syscall.S.html The v0 is the normal used as return register, and we can see the return processing doesn't do anything about a0 which is the wrong register of currently syscall(2) description. p.s. I found this wrong description because I'm porting Go gc to a new CPU architecture which is similar to Alpha, And I use the wrong register at first, then I have inspect the kernel code and objdump to ensure the right syscall ABI. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man7/unicode.7')
0 files changed, 0 insertions, 0 deletions