public void Arm64Arch_GetRegister()
        {
            var sc   = new ServiceContainer();
            var arch = new Arm64Architecture(sc, "aarch64");

            Assert.AreSame(Registers.GpRegs32[3], arch.GetRegister((StorageDomain)3, new BitRange(16, 32)));
        }
Example #2
0
 public A64Rewriter(Arm64Architecture arch, EndianImageReader rdr, ProcessorState state, IStorageBinder binder, IRewriterHost host)
 {
     this.arch   = arch;
     this.rdr    = rdr;
     this.state  = state;
     this.binder = binder;
     this.host   = host;
     this.dasm   = new AArch64Disassembler(arch, rdr).GetEnumerator();
 }
Example #3
0
 public A64Rewriter(Arm64Architecture arch, EndianImageReader rdr, ProcessorState state, IStorageBinder binder, IRewriterHost host)
 {
     this.arch    = arch;
     this.rdr     = rdr;
     this.state   = state;
     this.binder  = binder;
     this.host    = host;
     this.dasm    = new AArch64Disassembler(arch, rdr).GetEnumerator();
     this.instr   = null !;
     this.cluster = new List <RtlInstruction>();
     this.m       = new RtlEmitter(cluster);
 }
        public static AndroidApkToolchain GetToolChain(bool useStatic, bool mainTarget)
        {
            // wrong build configuration
            if (!Config.Validate())
            {
                return(new AndroidApkToolchain(new AndroidNdkLocator(new ARMv7Architecture()).UserDefaultOrDummy, useStatic, mainTarget));
            }

            Architecture architecture;

            if (mainTarget)
            {
                if ((Config.Architectures.Architectures & AndroidArchitecture.ARMv7) != 0)
                {
                    architecture = new ARMv7Architecture();
                }
                else if ((Config.Architectures.Architectures & AndroidArchitecture.ARM64) != 0)
                {
                    architecture = new Arm64Architecture();
                }
                else // shouldn't happen
                {
                    return(null);
                }
            }
            else if (IsFatApk) // complementary target for fat apk
            {
                architecture = new Arm64Architecture();
            }
            else // complementary target for single-architecture apk
            {
                return(null);
            }
            var androidNdk = (new AndroidNdkLocator(architecture)).UseSpecific(new NPath(Config.ExternalTools.NdkPath));

            return(new AndroidApkToolchain(androidNdk, useStatic, mainTarget));
        }
Example #5
0
 public Arm64State(Arm64State that)
 {
     this.arch   = that.arch;
     this.values = that.values.ToDictionary(k => k.Key, v => v.Value);
 }
Example #6
0
 public Arm64State(Arm64Architecture arch)
 {
     this.arch   = arch;
     this.values = new Dictionary <StorageDomain, Constant>();
 }
 public Arm64CallingConventionTests()
 {
     this.arch = new Arm64Architecture(new ServiceContainer(), "aarch64", new Dictionary <string, object>());
 }
Example #8
0
 public Arm64CallingConventionTests()
 {
     this.arch = new Arm64Architecture("aarch64");
 }
 public Arm64CallingConventionTests()
 {
     this.arch = new Arm64Architecture(new ServiceContainer(), "aarch64");
 }