]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/config/arc/arc.c
arc: Update ARC700 cache hazard detection.
authorClaudiu Zissulescu <claziss@gmail.com>
Fri, 11 Dec 2020 16:27:21 +0000 (18:27 +0200)
committerClaudiu Zissulescu <claziss@synopsys.com>
Fri, 11 Dec 2020 16:29:56 +0000 (18:29 +0200)
commit78e9cfe1e29902a887853142a5e417500fe90fc8
tree36ae57bb66f481e7b2737b8ca284f665fa95e37a
parenta412be00c49406889a84791935194fc54a89ff79
arc: Update ARC700 cache hazard detection.

Replace/update ARC700 cache hazard detection. The next situations are
handled:

- There are 2 stores back2back, then 3 loads in next 3 or 4 instructions.

    if 3 loads in 3 instructions then we insert 2 nops after stores.
    if 3 loads in 4 instructions then we insert 1 nop after stores

- 2 back to back stores, followed by at least 3 loads in next 4 instructions.
        st st ld ld ld ##
        st st ## ld ld ld
        st st ld ## ld ld
        st st ld ld ## ld
        ## - any instruction

- store between non-store instructions, followed by 3 loads
        $$ st SS ld ld ld
        $$ - non-store instruction, even load.

gcc/
2020-12-11  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc.c (arc_active_insn): Ignore all non essential
instructions when getting the next active instruction.
(check_store_cacheline_hazard): Update.
(workaround_arc_anomaly): Remove obsolete cache hazard code.

Signed-off-by: Claudiu Zissulescu <claziss@gmail.com>
gcc/config/arc/arc.c