-
Notifications
You must be signed in to change notification settings - Fork 272
Element width in whole register move load/stores affects misalignment exceptions? #529
Comments
This may be problematic for use within traps/code unaware of last store values. The width is now coupled to the spillers /fillers memory alignment constraints and not the application that invoked (or was interrupted). In such a case the code might resolve to the lowest common denominator, 8bits, and that can be very bad for subsequent regiater access for EEW > 8 on a machine that has in-register not mapping in-memory. |
Spill/fill code can easily guarantee sufficient alignment for whichever width hint it chooses to use. It doesn't seem likely that will force least-common-denominator use of EEW=8. |
The point is we are providing this formulation for the benefit of SLEN<VLEN-like (SlVl) machines. This is a recipe for LCD 8bit domination as all the incentives drive that way; not forced but many collective nudges and no guide rails to ensure the code does not go off track from advantaging SlVl machines. If SlVl machines were to gain dominance, then the metrics could change, but only if the performance impacts were also substantial. More likely, for 8bit WR load SlVl machines will (eventually) ignore alignment issues (it is LCD alignment after all) and also ignore 8bit as a in-register format directive, instead use some heuristic, possibly of the type I suggest in section Better Mechanisms #503 (comment) In other words, what we intended for good will end up dead weight. The possible good take away from exploring the alignment issues is that we may as well designate 8bit as the "unsure" case and not e1024. (which works well for #519 Reserve e1024 (and also e512, maybe e256). |
To the original point, I see no value to these width formulation enforcing alignment. How does it help software?Whole Register (WR) stores' width specification have no impact on subsequent SLEN<VLEN-like (SlVl) execution, only the loads do. Thus, given this predominant use case, WR store alignment will typically affect WR load alignment as the same memory location is typically used for both. Further as explained above #529 (comment), software will be driven to WR load of 8bit having agonized (lost energy) on the correct formulation for WR stores. The net is that software is negatively affected by this change that is not required for correct functioning of WR loads/stores. how does it help hardware?
but is there any misalignment to report? A profile stipulation can be made that all machines of a certain class must only use a certain non-byte alignment (e..g.the XLEN of the system)..
An none of this assures SlVl machines are going to have reasonable in-register format assignments for their next use. This is not a win-win by any metrics. |
The element width in whole register load/stores is treated as hint currently, but it would somewhat simplify machines if this was treated as the actual transfer width in terms of reporting misalignment exceptions (on EEW boundaries). The width would then no longer be a strict hint.
The text was updated successfully, but these errors were encountered: