06.08.2013 Views

Threads in the new ISO C Standard from 2011

Threads in the new ISO C Standard from 2011

Threads in the new ISO C Standard from 2011

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

isync Memory Barrier<br />

The A and B sets consist of all <strong>in</strong>structions preced<strong>in</strong>g and follow<strong>in</strong>g<br />

<strong>the</strong> isync, respectively.<br />

An <strong>in</strong>struction which cannot raise an exception <strong>in</strong> <strong>the</strong> pipel<strong>in</strong>e can be<br />

allowed to complete and <strong>in</strong>structions follow<strong>in</strong>g <strong>the</strong> isync <strong>the</strong>refore<br />

actually execute without order.<br />

Consider <strong>the</strong> sequence:<br />

ldw r1,r2,r3<br />

isync<br />

stw r4,r5,r6<br />

The store may execute before <strong>the</strong> load if <strong>the</strong> load had e.g. a cache<br />

miss.<br />

This is not what we want and to overcome that problem we can exploit<br />

that Power does not permit speculative execution of store <strong>in</strong>structions.<br />

Jonas Skeppstedt (js@cs.lth.se) Lecture 6 2013 52 / 70

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!