[MIPS] Fix constraint modifier for syscall clone
__v0 has to be marked as read-write rather than early-clobbered.
This fixes an issue in which return value from the system call is
unexpectedly overridden.
When v0 is marked as early-clobbered,
(asm) "li %0,%2\n"
will be coded as:
(objdump) "58: 2410ffea li s0,-22"
and at label '1' the value is restored to v0:
(objdump) "b0: 02001021 move v0,s0"
However, this clobbers the return value from the syscall.
When v0 is marked as read-write, (-EINVAL) is correctly loaded in v0:
(objdump) "58: 2402ffea li v0,-22"
and the value is not overridden later.
BUG = described above
TEST= used by breakpad for MIPS
Review URL: https://codereview.chromium.org/13846002
git-svn-id: http://linux-syscall-support.googlecode.com/svn/trunk/lss@21 829466d3-f3f5-3ae4-62ad-de35cf9bba21
1 file changed