Commit 64b4d28c38ccf69a468b90e8e45563ac947cd9b0

Authored by aurel32
1 parent 71f75756

target-alpha: implement getxuid and getxgid syscalls

This patch implemented the setxuid and setxgid syscalls for Alpha.
These syscalls return two values, both uid/euid and gid/egid.
In addition to returning the first value in $v0, the additional
value is returned in the $a4 register.

The syscalls are used instead of the separate syscalls for those values
used on other architectures (this is probably because Alpha Linux started
out syscall compatible with DEC/OSF/Tru64).

With this patch, the perlbmk benchmarks from Spec2000 run properly.

(Vince Weaver)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5722 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 24 additions and 0 deletions
linux-user/syscall.c
... ... @@ -5533,6 +5533,30 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
5533 5533 ret = get_errno(getuid());
5534 5534 break;
5535 5535 #endif
  5536 +
  5537 +#if defined(TARGET_NR_getxuid) && defined(TARGET_ALPHA)
  5538 + /* Alpha specific */
  5539 + case TARGET_NR_getxuid:
  5540 + {
  5541 + uid_t euid;
  5542 + euid=geteuid();
  5543 + ((CPUAlphaState *)cpu_env)->ir[IR_A4]=euid;
  5544 + }
  5545 + ret = get_errno(getuid());
  5546 + break;
  5547 +#endif
  5548 +#if defined(TARGET_NR_getxgid) && defined(TARGET_ALPHA)
  5549 + /* Alpha specific */
  5550 + case TARGET_NR_getxgid:
  5551 + {
  5552 + uid_t egid;
  5553 + egid=getegid();
  5554 + ((CPUAlphaState *)cpu_env)->ir[IR_A4]=egid;
  5555 + }
  5556 + ret = get_errno(getgid());
  5557 + break;
  5558 +#endif
  5559 +
5536 5560 #ifdef TARGET_NR_getgid32
5537 5561 case TARGET_NR_getgid32:
5538 5562 ret = get_errno(getgid());
... ...