Branch Coverage

blib/lib/CPU/x86_64/InstructionWriter.pm
Criterion Covered Total %
branch 211 298 70.8


line true false branch
95 61 78 unless (defined $name and defined $labels->{$name})
97 0 61 unless defined $name
106 0 61 unless @_ == 2
110 0 61 unless defined $_[1]
115 61 0 unless ref $label
119 0 61 if defined $label->{'start'}
139 35 82 defined $_[1] ? :
144 0 0 defined $_[1] ? :
150 0 2 unless @_ == 2
151 0 2 unless defined $_[1]
155 2 0 unless ref $label
161 0 2 unless defined $label->{'start'}
163 0 2 unless $ofs >> 31 == $ofs >> 32
172 0 0 ref $immed ? :
173 0 0 if ref $immed
191 2 1 if ($pop_bytes) { }
192 0 2 ref $pop_bytes ? :
193 0 2 if ref $pop_bytes
204 0 4 unless @_ == 2
205 0 4 unless defined $_[1]
209 4 0 unless ref $label
215 0 8 unless defined $label->{'start'}
218 4 4 $short ? :
334 28 35 if (not $immed >> 32) { }
21 14 elsif ($immed >> 31 == -1) { }
335 12 16 $reg > 7 ? :
351 24 32 if $reg > 7
359 21 28 if $reg > 7
367 20 35 if (not defined $reg) { }
370 25 10 if $reg > 3
730 3 4 $reg > 7 ? :
737 0 8 ref $imm ? :
738 6 2 $val >> 7 == $val >> 8 ? :
739 0 8 if ref $imm
750 3 4 $reg > 7 ? :
760 28 0 if (not ref $varspace || ref $nesting) { }
764 0 0 ref $varspace ? :
765 0 0 if ref $varspace
767 0 0 ref $nesting ? :
768 0 0 if ref $nesting
820 0 6 defined $immed ? :
0 8 defined $immed ? :
6 8 $rex ? :
847 339 256 $rex ? :
858 321 232 $rex ? :
870 0 371 if (not defined $reg1 && defined $reg2) { }
875 0 0 if ($old_reg1 and $old_reg1 > 3 or $old_reg2 and $old_reg2 > 3)
881 335 36 $reg1 > 3 || $reg2 > 3 ? :
896 72 140 if (not defined $reg2) { }
902 100 40 $reg2 > 3 ? :
913 7938 0 if defined $reg
915 6048 1890 if defined $base_reg
917 6048 1890 if defined $index_reg
926 7686 0 if defined $reg
928 5856 1830 if defined $base_reg
930 5856 1830 if defined $index_reg
938 7686 0 if defined $reg
940 5856 1830 if defined $base_reg
942 5856 1830 if defined $index_reg
951 4896 1530 if defined $base_reg
953 4896 1530 if defined $index_reg
957 0 6426 if (not defined $reg) { }
4410 2016 elsif ($reg > 3) { }
959 0 0 unless not $rex and ($base_reg // 0) < 8 and ($index_reg // 0) < 8
973 960 300 if defined $base_reg
975 960 300 if defined $index_reg
994 33024 10320 if (defined $base_reg) { }
998 2752 5504 ($base_reg & 7) == 5 ? :
8256 0 $disp >> 31 == $disp >> 32 ? :
16512 8256 $disp >> 7 == $disp >> 8 ? :
8256 24768 !$disp ? :
1003 24768 8256 if (defined $index_reg) { }
2752 5504 elsif (($base_reg & 7) == 4) { }
1005 0 24768 unless $index_reg != 4
1020 0 10320 unless $disp >> 31 == $disp >> 32
1023 8256 2064 if (defined $index_reg) { }
1025 0 8256 unless $index_reg != 4
1034 3528 39816 if defined $immed
1037 26612 16732 $rex ? :
1052 120 20 $reg ? :
140 0 $value >> 31 == $value >> 32 ? :
252 140 defined $opcode8 && $value >> 7 == $value >> 8 ? :
1073 108 144 $rex ? :
60 20 $reg ? :
60 80 $rex ? :
140 0 $value >> 32 == $value >> 33 ? :
252 140 defined $opcode8 && ($value >> 7 == $value >> 8 || $value >> 8 == 16777215) ? :
1096 90 120 $rex ? :
57 19 $reg ? :
57 76 $rex ? :
133 0 $value >> 16 == $value >> 17 ? :
210 133 defined $opcode8 && ($value >> 7 == $value >> 8 || $value >> 8 == 255) ? :
1114 0 245 ref $immed ? :
1115 0 245 unless $value >> 8 == $value >> 9
1116 0 245 if (not defined $reg) { }
35 210 elsif (not $reg) { }
175 35 elsif ($reg > 3) { }
1126 0 245 if ref $immed
1134 2688 840 if defined $base_reg
1136 2688 840 if defined $index_reg
1138 3528 0 defined $disp ? :
1143 1260 0 $value >> 31 == $value >> 32 ? :
2268 1260 defined $opcode8 && $value >> 7 == $value >> 8 ? :
1153 2688 840 if defined $base_reg
1155 2688 840 if defined $index_reg
1157 3528 0 defined $disp ? :
1162 1260 0 $value >> 32 == $value >> 33 ? :
2268 1260 defined $opcode8 && ($value >> 7 == $value >> 8 || $value >> 8 == 16777215) ? :
1172 2352 735 if defined $base_reg
1174 2352 735 if defined $index_reg
1177 3087 0 defined $disp ? :
1182 1197 0 $value >> 16 == $value >> 17 ? :
1890 1197 defined $opcode8 && ($value >> 7 == $value >> 8 || $value >> 8 == 255) ? :
1192 1680 525 if defined $base_reg
1194 1680 525 if defined $index_reg
1196 2205 0 defined $disp ? :
1201 0 2205 unless $value >> 8 == $value >> 9
1210 96 636 $immed eq 1 ? :
1212 147 165 $bits == 16 ? :
189 312 $bits == 32 ? :
231 501 $bits == 64 ? :
1218 636 96 unless ($immed eq 1)
1219 0 636 ref $immed ? :
1220 0 636 if ref $immed
1232 756 3024 $immed eq 1 ? :
1234 945 945 $bits == 16 ? :
945 1890 $bits == 32 ? :
945 2835 $bits == 64 ? :
1240 3024 756 unless ($immed eq 1)
1241 0 3024 ref $immed ? :
1242 0 3024 if ref $immed
1251 0 64 unless defined $_[2]
1255 64 0 unless ref $label
1261 0 128 unless defined $label->{'start'}
1264 64 64 $short ? :
1275 8 0 unless ref $label
1281 0 8 unless defined $label->{'start'}
1283 0 8 unless $ofs >> 7 == $ofs >> 8
1292 0 44694 if (ref $encoder_args->[$unknown_pos]) { }
1316 0 78 if ($location < 0) { }
1334 0 0 unless defined $v
1336 0 0 $bits == 64 ? :
0 0 $bits == 32 ? :
0 0 $bits == 16 ? :
0 0 $bits == 8 ? :
1337 0 0 unless $v >> $bits == $v >> $bits + 1
1351 17 241 if $ofs
1353 112 146 unless my $fn = $p->{'encode'}
1356 34 112 if (length $enc != $p->{'len'})