mirror of
https://github.com/fadden/6502bench.git
synced 2025-03-02 23:29:02 +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.)
|
||||
//
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
@ -1649,9 +1649,11 @@ namespace SourceGen {
|
||||
MessageList.MessageEntry.ProblemResolution.FormatDescriptorIgnored));
|
||||
}
|
||||
} else if (dfd.FormatSubType == FormatDescriptor.SubType.Address) {
|
||||
if (!(attr.IsData || attr.IsInlineData)) {
|
||||
// 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
|
||||
// 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
|
||||
@ -1675,6 +1677,7 @@ namespace SourceGen {
|
||||
accType, accessFlags, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Look for instruction offset references. We skip this if we've already
|
||||
// added a reference from a symbol with zero adjustment, since that would
|
||||
|
Loading…
x
Reference in New Issue
Block a user