> No, there was no particular reason. mem_ref seems like a better choice
> if it detects more types of loads.
Right, it's supposed to detect all types of loads. Here's what I have
installed on the mainline and 7 branch.
2017-12-04 Eric Botcazou
* config/sparc/sparc.c (sparc_do_work
Any particular reason to use MEM_P instead of mem_ref here? It looks like
there is also a case for the b2bst workaround (only loads are concerned).
No, there was no particular reason. mem_ref seems like a better choice
if it detects more types of loads.
/Daniel C
> @@ -1024,6 +1040,31 @@ sparc_do_work_around_errata (void)
> emit_insn_before (gen_nop (), target);
> }
>
> + /* Insert a NOP between load instruction and atomic
> + instruction. Insert a NOP at branch target if load
> + in delay slot and atomic instruction at bran
> 2017-11-17 Daniel Cederman
>
> * config/sparc/sparc.c (atomic_insn_p): New function.
> (sparc_do_work_around_errata): Insert NOP instructions to
> prevent sequences that could trigger the TN-0010 errata for
> UT700.
> * config/sparc/sync.md (atomic_compare_and_sw
This patch provides a workaround for the errata described in GRLIB-TN-0010.
If the workaround is enabled it will:
* Insert a NOP between load instruction and atomic
instruction (swap, ldstub, casa).
* Insert a NOP at branch target if load in delay slot
and atomic instruction at branch target