Skip to content

Commit c45584d

Browse files
committed
app: check scratches only for registers
1 parent 44c1d7f commit c45584d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@ const nextBpfState = (state: BpfState, line: ParsedLine): BpfState => {
6464
effect = Effect.WRITE;
6565
newState.values.set(expr.id, makeValue(expr.value, effect));
6666
}
67+
// if it's a register write, but value is unknown, assume scratch
6768
for (const id of line.bpfIns?.writes || []) {
68-
// if it's a write, but value is unknown, assume scratch
69+
if (!id.startsWith('r'))
70+
continue;
6971
if (!newState.values.has(id))
7072
newState.values.set(id, makeValue('', Effect.WRITE));
7173
newState.lastKnownWrites.set(id, line.idx);

0 commit comments

Comments
 (0)