Branch Coverage

blib/lib/CPU/Z80/Disassembler.pm
Criterion Covered Total %
branch 195 234 83.3


line true false branch
234 8954 0 if (defined $instr) { }
235 6598 2356 if ($instr->is_code)
238 1036 5562 if ($addr >= $limit_addr)
246 193 6405 if ($instr->opcode ne $long_instr->opcode)
263 0 193 if defined $new_instr->comment
266 406 105 if ($old_instr)
268 315 91 if defined $old_instr->comment
271 0 406 if (defined $old_instr->_format)
282 160 33 if @comments
291 1037 0 defined $label ? :
334 1 8 if defined $self->footer
349 9 15057 unless defined $addr
354 3622 20940 if defined $comment
370 2 7 if defined $self->header
374 1911 120 if defined $self->instr->[$label->addr]
377 6 3 if @labels
384 2 16 if (defined $addr)
386 2 0 if (defined $label) { }
398 2 7 if $printed_base
408 1911 13146 if defined $label
411 15018 39 if (defined $instr) { }
413 1172 13846 if (defined $instr->NN and not defined $instr->format->{'NN'}) { }
379 26934 elsif (defined $instr->DIS and not defined $instr->format->{'DIS'}) { }
416 215 957 if (ref $instr->NN) { }
421 216 3 if (defined $ref_label)
425 3 216 if (/^\d+$/) { }
434 646 311 if (defined $ref_label)
442 292 466 if ($instr->opcode =~ /$reg/ and defined(my $base = $self->$func))
445 269 23 if (defined $ref_label)
472 32 2464 if $count > $max_count
493 823 64730 if ($addr == $min or $addr % 80 == 0)
507 3 6 unless @labels
530 12 347 unless $self->_can_call->{$addr}
537 3 6 if (%unknown_calls)
550 15 3 if (defined $file) { }
551 0 15 unless open $fh, ">", $file
577 0 17823 unless $type =~ /$TYPES_RE/
582 1 2540 if $current_type ne "-" and $type ne "-" and $current_type ne $type
610 1 133085 unless defined $self->memory->peek($addr)
614 41214 91871 defined $current_type ? :
616 0 133085 unless $current_type =~ /$TYPES_RE/
660 1663 6930 if defined $label
671 2 23292 unless (defined $self->memory->peek($addr))
672 0 2 unless ($self->labels->search_addr($addr))
679 11093 12199 if $self->get_type($addr) eq "C"
686 3334 8865 if ($instr->is_branch)
693 1748 10451 if ($instr->is_call)
696 400 1348 if (not defined $can_call) { }
116 1232 elsif (ref $can_call) { }
1156 76 elsif ($can_call) { }
729 48 13593 if ($instr->opcode =~ /call \w+,NN/ or $self->get_type($instr->next_addr) eq "C")
752 337 13256 if (defined $can_call)
775 14838 118504 if $seen{$addr}++
779 84 118420 if (defined $can_call)
780 83 1 if $sp_level == 0
784 1 118420 unless (defined $self->memory->peek($addr))
793 244 118176 if (/ret/) { }
15375 102801 elsif (/push/) { }
2314 100487 elsif (/pop/) { }
0 100487 elsif (/dec sp/) { }
0 100487 elsif (/inc sp/) { }
25 100462 elsif (/ex \(sp\),/) { }
1 100461 elsif (/ld sp/) { }
794 241 3 if $sp_level == 0
801 9 2305 if $sp_level < 0
808 0 0 if $sp_level < 0
811 3 22 if $sp_level < 2
818 15426 102740 if ($instr->is_call) { }
17411 85329 elsif ($instr->is_branch) { }
820 2472 9575 if (defined $can_call and not ref $can_call and $can_call)
828 100167 17999 unless $instr->is_break_flow
848 7 5276 if defined $label
900 6060 6465 if (defined $block_comment)
922 1 6746 unless $instr
925 1760 4986 if $old_comment
1084 4 1 if -f $include_file
1088 1 0 if -f $relative
1098 1 4 if -f $ctl_file
1121 0 5 unless open my $fh, $file
1126 5240 36285 unless /\S/
1128 1 36284 if (/^ \#include \s+ (\S+) /xi) { }
1133 26213 10071 if (s/^ ([0-9a-f]+) //xi)
1139 1463 34821 if (s/^ -([0-9a-f]+) //xi)
1144 15735 20549 unless /:\s*/
1146 0 20549 unless /\S/
1152 4 20545 if (($include_file) = /^ F \s+ (\S+) /xi) { }
7506 13039 elsif (($label) = /^ C \s* (\w+)? /xi) { }
40 12999 elsif (($label, $comment) = /^ = \s+ (\S+) \s* ;? \s*(.*)/xi) { }
3270 9729 elsif (($comment) = /^ \# \s? (.*)/xi) { }
56 9673 elsif (($comment) = /^ \< \s? (.*)/xi) { }
0 9673 elsif (($comment) = /^ \> \s? (.*)/xi) { }
6746 2927 elsif (($comment) = /^ \; [\s;]* (.*)/xi) { }
0 2927 elsif (($label, $signature) = /^ P \s+ (\w+) \s* (.*)/xi) { }
2926 1 elsif (my($type, $ipl, $label) = /^ (B2 | B | W | M) (?: \[ (\d+) \] )? \s* (\w+)?/xi) { }
0 1 elsif (/^ IX /xi) { }
1 0 elsif (/^ IY /xi) { }
1165 40 0 if $comment
1176 55 1 if $header
1183 0 0 if $footer
1197 0 0 unless @types
1201 0 0 if ($_ eq 'B') { }
0 0 elsif ($_ eq 'W') { }
0 0 elsif ($_ eq 'C') { }
1222 70 2856 if defined $label
1223 2926 0 unless $ipl
1226 2724 202 if ($type eq 'B') { }
0 202 elsif ($type eq 'B2') { }
202 0 elsif ($type eq 'W') { }
0 0 elsif ($type eq 'M') { }
1232 101 2825 if ($size == 2 and $addr == $end_addr)
1238 0 2926 if $items > $ipl
1269 0 25 unless my $instr = $self->_get_instr($addr)
1272 3 22 if ($label_name eq '$') { }
1276 1 21 unless my $label = $self->labels->search_name($label_name)
1281 4 1 defined $instr->N ? :
19 5 defined $instr->NN ? :
1286 23 0 unless ref $arg