s390: optimize syscall function

System Internals / glibc - Christian Borntraeger [de.ibm.com] - 19 June 2017 04:59 EDT

Since kernel 2.6.0 all Linux version accept the system call number in register 1 for svc 0. There is no need to have special handling that uses EX for system calls < 256. This will simplify and speed up that code.

A microbenchmark doing "syscall(__NR_getpid);" in a loops gets faster by ~12%.

- sysdeps/unix/sysv/linux/s390/s390-32/syscall.S: Simplify code by always using SVC 0 instead of EX.
- sysdeps/unix/sysv/linux/s390/s390-64/syscall.S: Likewise.

35810f5 s390: optimize syscall function
ChangeLog | 6 ++++++
sysdeps/unix/sysv/linux/s390/s390-32/syscall.S | 12 +++---------
sysdeps/unix/sysv/linux/s390/s390-64/syscall.S | 12 +++---------
3 files changed, 12 insertions(+), 18 deletions(-)

Upstream: sourceware.org


  • Share