Fixing assembly coverage
We failed to correctly parse files that executed from the very start of the file due to a missing '- line XXX'. We now use the 'Ir' indicator to recognize the beginning of a file. Change-Id: I529fae9458ac634bf7bf8af61ef18f080e808535 Reviewed-on: https://boringssl-review.googlesource.com/7542 Reviewed-by: Steven Valdez <svaldez@google.com> Reviewed-by: David Benjamin <davidben@google.com>
This commit is contained in:
parent
afd6d9d61a
commit
0a0f83d308
@ -69,6 +69,7 @@ def parse(filename, data, current):
|
||||
|
||||
# Lines are of the following formats:
|
||||
# -- line: Indicates that analysis continues from a different place.
|
||||
# Ir : Indicates the start of a file.
|
||||
# => : Indicates a call/jump in the control flow.
|
||||
# <Count> <Code>: Indicates that the line has been executed that many times.
|
||||
line = None
|
||||
@ -76,7 +77,9 @@ def parse(filename, data, current):
|
||||
l = l.strip() + ' '
|
||||
if l.startswith('-- line'):
|
||||
line = int(l.split(' ')[2]) - 1
|
||||
elif line != None and '=>' not in l:
|
||||
elif l.strip() == 'Ir':
|
||||
line = 0
|
||||
elif line != None and l.strip() and '=>' not in l and 'unidentified lines' not in l:
|
||||
count = l.split(' ')[0].replace(',', '').replace('.', '0')
|
||||
instruction = l.split(' ', 1)[1].strip()
|
||||
if count != '0' or is_asm(instruction):
|
||||
|
Loading…
Reference in New Issue
Block a user