mirror of
https://github.com/fadden/6502bench.git
synced 2024-11-25 14:34:27 +00:00
Don't show adjustment in constant cross-references
The change to properly display adjustments to project/platform symbol cross-references also added them to constants, but based on the reference address rather than the operand value. We could generate an adjustment from the value, but I'm not sure if that's actually useful.
This commit is contained in:
parent
63b84dcece
commit
5d852e3ea6
@ -1542,7 +1542,14 @@ namespace SourceGen {
|
||||
DefSymbol defSym = sym as DefSymbol;
|
||||
int adj = 0;
|
||||
Debug.Assert(operandOffset < 0); // outside file scope
|
||||
adj = defSym.Value - attr.OperandAddress;
|
||||
if (sym.SymbolType != Symbol.Type.Constant) {
|
||||
adj = defSym.Value - attr.OperandAddress;
|
||||
} else {
|
||||
// We could compute the operand's value and display
|
||||
// the difference, so "LDA #$00" --> "LDA #FOO" when
|
||||
// FOO is 1 would display "FOO -1" in the xref table.
|
||||
// Not sure if that's useful.
|
||||
}
|
||||
defSym.Xrefs.Add(
|
||||
new XrefSet.Xref(offset, true, xrefType, accType, adj));
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user