You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The plugin emits incorrect pcode for the following snippet:
{ R3 = memw(R2+#0x0); memw(R2+#0x0) = #0x0 }
The store should occur after the load, as written. The problem causing the incorrect pcode is that these instructions form a DUPLEX; and in a DUPLEX the slot 0 instruction comes first in program memory, but the slot 1 instruction must always be executed after.
Previously we would emit pcode for instructions in the order they appear
in the listing (order of increasing address). This assumption is
incorrect for DUPLEX instructions.
DUPLEX instructions appear in the listing in swapped order: the slot 0
instruction appears earlier in memory, followed by the slot 1
instruction. But execution order follows the opposite ordering: order of
decreasing slots (so slot 3, 2, 1, 0)
As a result, we would emit incorrect pcode for the following assembly:
{ R3 = memw(R2+#0x0); memw(R2+#0x0) = #0x0 }
As written, the load comes before the store, but since they are DUPLEX
the store would appear before the load, causing the load to be
const-propped. This commit fixes the issue.
Fixes#10
The plugin emits incorrect pcode for the following snippet:
The store should occur after the load, as written. The problem causing the incorrect pcode is that these instructions form a DUPLEX; and in a DUPLEX the slot 0 instruction comes first in program memory, but the slot 1 instruction must always be executed after.
A standard InstructionIterator is insufficient
Because DUPLEXes will be enumerated in the incorrect (execution) order
The text was updated successfully, but these errors were encountered: