Description[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
Committed: https://code.google.com/p/linux-syscall-support/source/detail?r=21
Patch Set 1 #
Total comments: 4
Messages
Total messages: 10 (0 generated)
|