|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This test has one latency and an independent instruction further down the block. Reordering this independent instruction causes the jump to move down one and its offset gets patched. |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This test has a latency at the end of the instruction block which can’t be filled. This tests one of the boundary cases of our processor |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
In this test the only instruction that can fill the latency is the jump, but the jump is referencing memory as far ahead as is possible - thus it can’t be moved any higher, and no reordering is performed. |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There are no latencies in this code block, so nothing is reordered |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This test has multiple latencies, but only one of them can be filled. The last store here can be filled with the binop following it since they’re not dependent - but since the independent binop is already filling the latency, it just gets moved “in place.” |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There is a single latency in the following block, and an independent binop instruction can be moved from below to fill the latency. |
|
There is a single latency in the following block, and an independent jump instruction can be moved in from below. The jump address gets patched up to reflect its new position. |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
We created this final test during the testing process, and it was never simulated with Irsim due to the difficulties of having to simulate external memory accesses. The test has two latencies, both of which can benefit from reording. You can see in the test that memory is written back to two separate times. The first time two instructions are reordered and the second time three are. |
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
|