On s390{,x}, r2 is scrambled after syscall entry
authorPetr Machata <pmachata@redhat.com>
Tue, 26 Nov 2013 23:42:51 +0000 (00:42 +0100)
committerChanho Park <chanho61.park@samsung.com>
Fri, 22 Aug 2014 11:38:24 +0000 (20:38 +0900)
commitaa74869c3945ae99033cd1c15b697f8cba9c1184
tree599183a1306cf3dbcd50ff6b63079836ba8c3ea6
parentb19fc96717410a043ceab6cf9af00b4336337587
On s390{,x}, r2 is scrambled after syscall entry

This was caught by system_call_params.exp test case:

   exe->mount("source", "target", "filesystemtype", 0, nil <unfinished ...>
   mount@SYS("", "target", "filesystemtype", 0, nil)                 = -2
   <... mount resumed>                                               = -1

Note how the first parameter disappears--r2 now holds syscall number
(21 in this case), and the original value is stored in orig_gpr2 in
save area.
sysdeps/linux-gnu/s390/fetch.c