mirror of
https://github.com/fadden/6502bench.git
synced 2024-09-06 01:55:11 +00:00
Remove a couple of faulty assertions
One asserted unnecessarily, one should have been an if/then. Both were concerned with instruction operands being formatted with type "address".
This commit is contained in:
parent
635084db9d
commit
ec2ad529c8
@ -157,8 +157,14 @@ namespace SourceGen {
|
|||||||
// numeric/Address, but we don't allow that for instructions.)
|
// numeric/Address, but we don't allow that for instructions.)
|
||||||
//
|
//
|
||||||
// Project and platform symbols are applied later.
|
// Project and platform symbols are applied later.
|
||||||
Debug.Assert(attr.DataDescriptor.FormatSubType !=
|
|
||||||
FormatDescriptor.SubType.Address);
|
// (This assert is bogus -- this is possible with a bad bit of formatting.
|
||||||
|
// One way this can occur semi-naturally is to follow a JSR with a 16-bit
|
||||||
|
// value that evaluates to a pair of "illegal" instructions, which are
|
||||||
|
// then formatted by the user as a 16-bit address without tagging as
|
||||||
|
// inline data. Enabling undocumented 6502 instructions throws it off.)
|
||||||
|
//Debug.Assert(attr.DataDescriptor.FormatSubType !=
|
||||||
|
// FormatDescriptor.SubType.Address);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1649,9 +1649,11 @@ namespace SourceGen {
|
|||||||
MessageList.MessageEntry.ProblemResolution.FormatDescriptorIgnored));
|
MessageList.MessageEntry.ProblemResolution.FormatDescriptorIgnored));
|
||||||
}
|
}
|
||||||
} else if (dfd.FormatSubType == FormatDescriptor.SubType.Address) {
|
} else if (dfd.FormatSubType == FormatDescriptor.SubType.Address) {
|
||||||
|
if (!(attr.IsData || attr.IsInlineData)) {
|
||||||
// not expecting this format on an instruction operand
|
// not expecting this format on an instruction operand
|
||||||
Debug.Assert(attr.IsData || attr.IsInlineData);
|
Debug.WriteLine("Found addr format on instruction at +" +
|
||||||
|
offset.ToString("x6"));
|
||||||
|
} else {
|
||||||
// This generally doesn't happen for internal addresses, because
|
// This generally doesn't happen for internal addresses, because
|
||||||
// we create an auto label for the target address, and a weak ref
|
// we create an auto label for the target address, and a weak ref
|
||||||
// to the auto label, which means the xref is handled by the symbol
|
// to the auto label, which means the xref is handled by the symbol
|
||||||
@ -1675,6 +1677,7 @@ namespace SourceGen {
|
|||||||
accType, accessFlags, 0));
|
accType, accessFlags, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Look for instruction offset references. We skip this if we've already
|
// Look for instruction offset references. We skip this if we've already
|
||||||
// added a reference from a symbol with zero adjustment, since that would
|
// added a reference from a symbol with zero adjustment, since that would
|
||||||
|
Loading…
Reference in New Issue
Block a user