Add Operand.Label support to Assembler (#2680)

* Add `Operand.Label` support to `Assembler`

This adds label support to `Assembler` and enables branch tightening
when compiling with relocatables. Jump management and patching has been
moved to the `Assembler`.

* Move instruction table to `Assembler.Table`

* Set PTC internal version

* Rename `Assembler.Table` to `AssemblerTable`
This commit is contained in:
FICTURE7 2021-10-05 21:04:55 +04:00 committed by GitHub
parent 11b437eafc
commit ecc64c934d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 577 additions and 562 deletions

View file

@ -17,7 +17,7 @@ namespace ARMeilleure.CodeGen.Linking
/// <summary>
/// Gets the set of <see cref="RelocEntry"/>.
/// </summary>
public ReadOnlySpan<RelocEntry> Entries => _entries ?? Array.Empty<RelocEntry>();
public ReadOnlySpan<RelocEntry> Entries => _entries;
/// <summary>
/// Initializes a new instance of the <see cref="RelocInfo"/> struct with the specified set of
@ -26,7 +26,7 @@ namespace ARMeilleure.CodeGen.Linking
/// <param name="entries">Set of <see cref="RelocInfo"/> to use</param>
public RelocInfo(RelocEntry[] entries)
{
_entries = entries ?? Array.Empty<RelocEntry>();
_entries = entries;
}
}
}