Example #1
0
        public void Init(InstDeclController controller)
        {
            _controller = controller;
            _cli        = CliOptions.GetInstance();
            _nl         = Environment.NewLine;
            _externFncs = new List <string>();

            if (CliOptions.Arch.Arch == System.Reflection.ProcessorArchitecture.Amd64)
            {
                byteWidth     = 1;
                shortWidth    = 2;
                intWidth      = 4;
                longWidth     = 8;
                longlongWidth = 16;

                bitMode = 64;
            }
            else if (CliOptions.Arch.Arch == System.Reflection.ProcessorArchitecture.X86)
            {
                byteWidth     = 1;
                shortWidth    = 2;
                intWidth      = 4;
                longWidth     = 8;
                longlongWidth = 16;

                bitMode = 32;
            }
        }
Example #2
0
 public Converter()
 {
     _asm        = new List <string>();
     _cli        = CliOptions.GetInstance();
     _controller = InstDeclController.GetInstance();
 }
Example #3
0
 public void Init(InstDeclController graph)
 {
     _symbolTable = GlobalSymbolTable.GetInstance();
     _typeTable   = TypeTable.GetInstance();
     _graph       = graph;
 }