mirror of
https://github.com/creeperlv/SVM.git
synced 2026-01-11 12:59:54 +00:00
22 lines
645 B
C#
22 lines
645 B
C#
|
|
using SVM.Core;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
|
|||
|
|
namespace SVM.Assembler.Core
|
|||
|
|
{
|
|||
|
|
public class ISADefinition
|
|||
|
|
{
|
|||
|
|
public Dictionary<string, InstructionDefinition> InstructionDefinitions = new Dictionary<string, InstructionDefinition>();
|
|||
|
|
public Dictionary<PrimaryInstruction, LinkerFunction> LinkerFunctions = new Dictionary<PrimaryInstruction, LinkerFunction>();
|
|||
|
|
public void Init()
|
|||
|
|
{
|
|||
|
|
foreach (var item in InstructionDefinitions)
|
|||
|
|
{
|
|||
|
|
if (!LinkerFunctions.TryAdd(item.Value.PrimaryInstruction, item.Value.linkerFunction))
|
|||
|
|
{
|
|||
|
|
LinkerFunctions[item.Value.PrimaryInstruction] = item.Value.linkerFunction;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|