[Bug libc/25523] MIPS/Linux inline syscall template is miscompiled

cvs-commit at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Sun Feb 16 13:02:00 GMT 2020


https://sourceware.org/bugzilla/show_bug.cgi?id=25523

--- Comment #13 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The release/2.31/master branch has been updated by Aurelien Jarno
<aurel32@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5d31b083e41ce2492f3c1d4061dc610cdcdcfaa9

commit 5d31b083e41ce2492f3c1d4061dc610cdcdcfaa9
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Feb 10 10:32:14 2020 -0300

    riscv: Avoid clobbering register parameters in syscall

    The riscv INTERNAL_SYSCALL macro might clobber the register
    parameter if the argument itself might clobber any register (a function
    call for instance).

    This patch fixes it by using temporary variables for the expressions
    between the register assignments (as indicated by GCC documentation,
    6.47.5.2 Specifying Registers for Local Variables).

    It is similar to the fix done for MIPS (bug 25523).

    Checked with riscv64-linux-gnu-rv64imafdc-lp64d build.

    (cherry picked from commit be74b42ee2a97009a6cd4fc90126add4a41c583b)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list