Address and data dependencies

Contents

This note illustrates that address and data dependencies may behave differently. It is reminded that an address dependency occurs when the effective address of a store depends upon the value read by a previous load instruction; while a data dependency occurs when the the value stored by a store instruction depends upon the value. The difference is observable on ARM hardware only, as the tests derive from the LB and S+ffence+po idioms, which are not observed on Power.

ARM

There are 9 such tests
 KindModelARMRelax-Addr-PoRTegra2APQ8060A5XA6XExynos5250Tegra3Exynos4412Exynos5410APQ8064
S+dmb+poAllowAllowOk, 13M/33GAllowOk, 16k/400MOk, 13/780MOk, 2.7M/2.4GNo, 0/8.6GNo, 0/8.3GOk, 302k/860MOk, 10M/2.0GNo, 0/6.8GOk, 3.8k/800M
        Allow unseenAllow unseen  Allow unseen 
DataRWAllowAllowOk, 20k/39GAllowNo, 0/400MNo, 0/4.5GOk, 12k/2.4GNo, 0/8.6GNo, 0/8.3GNo, 0/860MOk, 7.4k/2.0GNo, 0/6.8GOk, 367/2.8G
     Allow unseenAllow unseen Allow unseenAllow unseenAllow unseen Allow unseen 
AddrRWForbidForbidOk, 0/61GForbidOk, 0/1.8GOk, 0/4.5GOk, 0/5.6GOk, 0/8.6GOk, 0/8.3GOk, 0/5.8GOk, 0/13GOk, 0/6.8GOk, 0/4.9G
DataWWAllowAllowOk, 95k/39GAllowNo, 0/400MNo, 0/4.5GOk, 29k/2.4GNo, 0/8.6GNo, 0/8.3GNo, 0/860MOk, 63k/2.0GNo, 0/6.8GOk, 2.8k/2.8G
     Allow unseenAllow unseen Allow unseenAllow unseenAllow unseen Allow unseen 
AddrWWForbidForbidOk, 0/61GForbidOk, 0/1.8GOk, 0/4.5GOk, 0/5.6GOk, 0/8.6GOk, 0/8.3GOk, 0/5.8GOk, 0/13GOk, 0/6.8GOk, 0/4.9G
LBAllowAllowOk, 87M/35GAllowOk, 48k/400MOk, 3.7k/780MOk, 31M/3.2GNo, 0/9.4GNo, 0/8.3GOk, 17M/860MOk, 39M/2.0GNo, 0/6.8GOk, 231k/800M
        Allow unseenAllow unseen  Allow unseen 
LB+datas+WWAllowAllowOk, 649k/46GAllowNo, 0/400MNo, 0/5.1GOk, 182k/3.2GNo, 0/9.4GNo, 0/8.3GOk, 332k/2.1GOk, 43k/2.0GNo, 0/8.0GOk, 92k/6.0G
     Allow unseenAllow unseen Allow unseenAllow unseen  Allow unseen 
LB+addrs+RWForbidForbidOk, 0/63GForbidOk, 0/1.8GOk, 0/4.5GOk, 0/6.4GOk, 0/9.4GOk, 0/8.3GOk, 0/5.8GOk, 0/13GOk, 0/6.8GOk, 0/4.9G
LB+addrs+WWForbidForbidOk, 0/63GForbidOk, 0/1.8GOk, 0/4.5GOk, 0/6.4GOk, 0/9.4GOk, 0/8.3GOk, 0/5.8GOk, 0/13GOk, 0/6.8GOk, 0/4.9G

The above table lists some tests that differ only in some dependencies from one load to one store: the dependency being either an address dependency or a data dependency. Names should help to identify the matching tests. For instance LB+addrs+WW matches LB+datas+WW.

Then, one sees that tests with a data dependency are allowed by the model and observed on hardware; while tests with an address dependency are forbidden by the model and not observed on hardware.

Power

There are 9 such tests
 KindModelPowerPowerG5Power6Power7
S+sync+poAllowAllowNo, 0/89GNo, 0/6.2GNo, 0/4.1GNo, 0/57G
   Allow unseenAllow unseenAllow unseenAllow unseen
DataRWAllowAllowNo, 0/76GNo, 0/5.9GNo, 0/48G
   Allow unseenAllow unseen Allow unseen
AddrRWForbidForbidOk, 0/76GOk, 0/5.9GOk, 0/48G
DataWWAllowAllowNo, 0/76GNo, 0/5.9GNo, 0/48G
   Allow unseenAllow unseen Allow unseen
AddrWWForbidForbidOk, 0/76GOk, 0/5.9GOk, 0/48G
LBAllowAllowNo, 0/91GNo, 0/6.4GNo, 0/4.0GNo, 0/59G
   Allow unseenAllow unseenAllow unseenAllow unseen
LB+datas+WWAllowAllowNo, 0/76GNo, 0/5.9GNo, 0/48G
   Allow unseenAllow unseen Allow unseen
LB+addrs+RWForbidForbidOk, 0/75GOk, 0/5.9GOk, 0/48G
LB+addrs+WWForbidForbidOk, 0/76GOk, 0/5.9GOk, 0/48G

This document was translated from LATEX by HEVEA.