1
0
mirror of https://github.com/fadden/6502bench.git synced 2025-11-06 07:17:26 +00:00

Fix application of reloc info in data areas

The test wasn't correctly excluding instructions, so it was possible
to create a situation where a two-byte data item had an instruction
starting in the second byte.

We also weren't checking the length of the instruction to ensure that
it was wider than the reloc data.  This could get weird for an
immediate constant when the M/X flags are wrong.  When in doubt, don't
overwrite.
This commit is contained in:
Andy McFadden
2020-07-06 17:10:04 -07:00
parent bc15178a8e
commit f4fe3af050
3 changed files with 20 additions and 5 deletions

View File

@@ -225,6 +225,11 @@ namespace SourceGen {
return IsInlineData && DataDescriptor != null;
}
}
public bool IsUntyped {
get {
return !IsInstruction && !IsData && !IsInlineData;
}
}
/// <summary>
/// Get the target memory address for this byte.