This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] If using branch likelies in MIPS sync code fill the delay slot with a nop
- From: Richard Sandiford <richard dot sandiford at arm dot com>
- To: Andrew Bennett <Andrew dot Bennett at imgtec dot com>
- Cc: Matthew Fortune <Matthew dot Fortune at imgtec dot com>, "Moore\, Catherine" <Catherine_Moore at mentor dot com>, "gcc-patches\ at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "Rozycki\, Maciej" <Maciej_Rozycki at mentor dot com>
- Date: Wed, 26 Nov 2014 16:03:45 +0000
- Subject: Re: [PATCH] If using branch likelies in MIPS sync code fill the delay slot with a nop
- Authentication-results: sourceware.org; auth=none
- References: <0DA23CC379F5F945ACB41CF394B9827720F331A8 at LEMAIL01 dot le dot imgtec dot org> <6D39441BF12EF246A7ABCE6654B0235320F73768 at LEMAIL01 dot le dot imgtec dot org> <FD3DCEAC5B03E9408544A1E416F1124201891165E6 at NA-MBX-01 dot mgc dot mentorg dot com> <0DA23CC379F5F945ACB41CF394B9827720F341BF at LEMAIL01 dot le dot imgtec dot org> <6D39441BF12EF246A7ABCE6654B0235320F75FAF at LEMAIL01 dot le dot imgtec dot org> <0DA23CC379F5F945ACB41CF394B9827720F3431A at LEMAIL01 dot le dot imgtec dot org>
FWIW, I agree this is the right fix, but:
Andrew Bennett <Andrew.Bennett@imgtec.com> writes:
> + /* When using branch likely (-mfix-r10000), the delay slot instruction
> + will be annulled on false. The normal delay slot instructions
> + calculate the overall result of the atomic operation and must not
> + be annulled. To ensure this behaviour unconditionally use a NOP
> + in the delay slot for the branch likely case. */
remember to use US spelling: "behavior" rather than "behaviour".
Thanks,
Richard