s390[x]: get rid of syscall_mode, delete code which never triggers

Before this change, the logic was as follows:
syscall entry:
  get_scno:
    syscall_mode = GPR2
    scno = syscall_mode unless syscall_mode == -ENOSYS
    (if -ENOSYS, scn is retrieved by decoding current insn)
  fixup:
    gpr2 = GPR2
    syscall_mode = scno unless syscall_mode == -ENOSYS
    if (gpr2 != syscall_mode) stray_entry
syscall exit:
  get_res:
    gpr2 = GRP2
  fixup:
    syscall_mode = scno unless syscall_mode == -ENOSYS
    if (WAITEXECVE && gpr2 in (-ENOSYS, scno)) gpr2 = 0;
  get_error:
    gpr2 is retval

Entry fixup's if() can never trigger:
regardless whether GPR2 is -ENOSYS or not, syscall_mode is always
equal to GRP2 value there. So it can be removed.

On sysexit path, syscall mode is never used.

Therefore, syscall_mode variable is deleted. grp2 is read from
GPR2 register in get_scno, redundant read in entry fixup is removed.
As a result, entry fixup's s390 code block vanishes completely.

gpr2 variable is renamed s390_gpr2 to match the convention used
by other arches.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
1 file changed