which gets a base CFG with only three nodes: 104f0, 104f8 (which is a self-loop), and 10510. I would naively have expected the bxeq and the mov-sub pair to each get a basic block.
The lifted source I'd like to aim for, eventually, would be (modulo variable names):
int c;
if (a == b) return a;
do {
c = b - a;
if (c < 0) {
c = b;
a = a - b;
}
b = c;
} while (a == c);
return a;
There are, of course, several open questions about how we might represent the provenance for such phantom CFG nodes, and also how to reliably drive patching from edits to the lifted source corresponding to predicated instructions.
Should predicated instructions be explicitly represented with a basic block in the control flow graph?
This source for Euclid's GCD:
becomes this
-O2
assembly:which gets a base CFG with only three nodes:
104f0
,104f8
(which is a self-loop), and10510
. I would naively have expected the bxeq and the mov-sub pair to each get a basic block.The lifted source I'd like to aim for, eventually, would be (modulo variable names):
There are, of course, several open questions about how we might represent the provenance for such phantom CFG nodes, and also how to reliably drive patching from edits to the lifted source corresponding to predicated instructions.