Skip to content

Commit 8e76351

Browse files
committed
Remove the last IACA instruction if it equals the first to work better with loops
1 parent c43ebff commit 8e76351

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/static/js/disassembly_analysis.js

+4
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ function startIaca(event, model) {
242242

243243
function runIaca(event, model) {
244244
var string_of_bytes = ""
245+
if (analysis.iaca_bytes[0] == analysis.iaca_bytes[analysis.iaca_bytes.length - 1]) {
246+
// This happens if your last instruction was a jump to the start of the loop.
247+
analysis.iaca_bytes.pop();
248+
}
245249
analysis.iaca_bytes.forEach(function(i) {
246250
string_of_bytes += i.bytes;
247251
});

0 commit comments

Comments
 (0)