Пример #1
0
        public override void GenerateArmAsm(StringBuilder sb)
        {
            string postLoadInstr1 = "  mov x15, x25";
            string postLoadInstr2 = "  mov x15, x26";

            string[] rors = new string[1];
            rors[0] = "  ror x15, x15, #1";
            UarchTestHelpers.GenerateArmAsmStructureTestFuncs(sb, this.Counts, this.Prefix, rors, rors, false, postLoadInstrs1: postLoadInstr1, postLoadInstrs2: postLoadInstr2);
        }
Пример #2
0
 public override void GenerateArmAsm(StringBuilder sb)
 {
     string[] unrolledLoads = new string[4];
     unrolledLoads[0] = "  str x15, [x2]";
     unrolledLoads[1] = "  str x14, [x2]";
     unrolledLoads[2] = "  str x13, [x2]";
     unrolledLoads[3] = "  str x12, [x2]";
     UarchTestHelpers.GenerateArmAsmStructureTestFuncs(sb, this.Counts, this.Prefix, unrolledLoads, unrolledLoads, true);
 }
Пример #3
0
 public override void GenerateArmAsm(StringBuilder sb)
 {
     string[] instrs = new string[4];
     instrs[0] = "  str x15, [x2]";
     instrs[1] = "  ldr x14, [x1]";
     instrs[2] = "  str x13, [x2]";
     instrs[3] = "  ldr x12, [x1]";
     UarchTestHelpers.GenerateArmAsmStructureTestFuncs(sb, this.Counts, this.Prefix, instrs, instrs, true);
 }
Пример #4
0
 public override void GenerateArmAsm(StringBuilder sb)
 {
     string[] unrolledAdds = new string[4];
     unrolledAdds[0] = "  add v15.2s, v15.2s, v19.2s";
     unrolledAdds[1] = "  add v16.2s, v16.2s, v19.2s";
     unrolledAdds[2] = "  add v17.2s, v17.2s, v19.2s";
     unrolledAdds[3] = "  add v18.2s, v18.2s, v19.2s";
     UarchTestHelpers.GenerateArmAsmStructureTestFuncs(sb, this.Counts, this.Prefix, unrolledAdds, unrolledAdds);
 }
Пример #5
0
        public override void GenerateArmAsm(StringBuilder sb)
        {
            string[] unrolledJumps = new string[1];
            unrolledJumps[0] = "  cmp x25, x26\n  b.eq jumpsched_reallybadthing";
            UarchTestHelpers.GenerateArmAsmStructureTestFuncs(
                sb, this.Counts, this.Prefix, unrolledJumps, unrolledJumps, false);

            sb.AppendLine("jumpsched_reallybadthing:");
            sb.AppendLine("  .word 0xf7f0a000");
        }
Пример #6
0
        // todo
        public override void GenerateArmAsm(StringBuilder sb)
        {
            // read FPCR into x15, set x14 = flush denormals to zero enabled, x15 = flush denormals to zero disabled
            // x12 = mask with all bits set except bit 24 (flush to zero) - bitwise AND to unset bit 24
            // x13 = just bit 24 set with all other bits zero - bitwise OR to set bit 24
            string initInstrs = "  mrs x15, fpcr\n  mov x13, 1\n  lsl x13, x13, 24\n  neg x12, x13\n  orr x14, x15, x13\n  and x15, x15, x12";

            string[] setFpcrInstrs = new string[2];
            setFpcrInstrs[0] = "  msr fpcr, x15\n  fadd s2, s2, s3\n";
            setFpcrInstrs[1] = "  msr fpcr, x14\n  fadd s4, s4, s5\n";
            UarchTestHelpers.GenerateArmAsmStructureTestFuncs(sb, this.Counts, this.Prefix, setFpcrInstrs, setFpcrInstrs, false, initInstrs: initInstrs);
        }
        public override void GenerateArmAsm(StringBuilder sb)
        {
            string initInstrs     = "  ldr q18, [x1]\n  ldr q18, [x1]\n  ldr q19, [x2]\n  ldr q20, [x2]\n  ldr q21, [x2]\n";
            string postLoadInstr1 = "  mov v17.s[0], w25\n";
            string postLoadInstr2 = "  mov v17.s[0], w26\n";

            string[] unrolledAdds = new string[4];
            unrolledAdds[0] = "  add v18.4s, v18.4s, v17.4s";
            unrolledAdds[1] = "  add v19.4s, v19.4s, v17.4s";
            unrolledAdds[2] = "  add v20.4s, v20.4s, v17.4s";
            unrolledAdds[3] = "  add v21.4s, v21.4s, v17.4s";
            UarchTestHelpers.GenerateArmAsmStructureTestFuncs(sb, this.Counts, this.Prefix, unrolledAdds, unrolledAdds, false, initInstrs, postLoadInstr1, postLoadInstr2);
        }
Пример #8
0
        public override void GenerateArmAsm(StringBuilder sb)
        {
            // todo, or not. no lea on aarch64
            string postLoadInstr1 = "  mov x15, x25";
            string postLoadInstr2 = "  mov x15, x26";

            string[] instrs = new string[2];
            instrs[0] = "  ror x15, x15, #1";
            instrs[1] = "  mul x12, x12, x25";
            string[] instrs1 = new string[2];
            instrs1[0] = "  ror x15, x15, #1";
            instrs1[1] = "  mul x11, x11, x26";
            UarchTestHelpers.GenerateArmAsmStructureTestFuncs(sb, this.Counts, this.Prefix, instrs, instrs, false, postLoadInstrs1: postLoadInstr1, postLoadInstrs2: postLoadInstr2);
        }
Пример #9
0
        public override void GenerateArmAsm(StringBuilder sb)
        {
            string initInstrs = "  ldr s17, [x2]\n" +
                                "  ldr s18, [x2, 4]\n" +
                                "  ldr s19, [x2, 8]\n" +
                                "  ldr s20, [x2, 12]\n" +
                                "  ldr s21, [x2, 16]\n";

            string[] unrolledAdds = new string[4];
            unrolledAdds[0] = "  fadd s18, s18, s17";
            unrolledAdds[1] = "  fadd s19, s19, s17";
            unrolledAdds[2] = "  fadd s20, s20, s17";
            unrolledAdds[3] = "  fadd s21, s21, s17";
            UarchTestHelpers.GenerateArmAsmStructureTestFuncs(sb, this.Counts, this.Prefix, unrolledAdds, unrolledAdds, false, initInstrs);
        }
Пример #10
0
        public override void GenerateArmAsm(StringBuilder sb)
        {
            string initInstrs = "  ldr q0, [x1]\n" +
                                "  ldr q1, [x1, #0x10]\n" +
                                "  ldr q2, [x1, #0x20]\n" +
                                "  ldr q3, [x1, #0x30]\n" +
                                "  ldr q4, [x1, #0x40]\n";

            string[] unrolledAdds = new string[4];
            unrolledAdds[0] = "  add v1.4s, v1.4s, v0.4s";
            unrolledAdds[1] = "  add v2.4s, v2.4s, v0.4s";
            unrolledAdds[2] = "  add v3.4s, v3.4s, v0.4s";
            unrolledAdds[3] = "  add v4.4s, v4.4s, v0.4s";
            UarchTestHelpers.GenerateArmAsmStructureTestFuncs(sb, this.Counts, this.Prefix, unrolledAdds, unrolledAdds, false, initInstrs);
        }
Пример #11
0
        public override void GenerateArmAsm(StringBuilder sb)
        {
            string[] unrolledInstrs = new string[4];
            unrolledInstrs[0] = "  scvtf s0, w25";
            unrolledInstrs[1] = "  scvtf s0, w25";
            unrolledInstrs[2] = "  scvtf s0, w25";
            unrolledInstrs[3] = "  scvtf s0, w25";

            string[] unrolledInstrs1 = new string[4];
            unrolledInstrs1[0] = "  scvtf s0, w26";
            unrolledInstrs1[1] = "  scvtf s0, w26";
            unrolledInstrs1[2] = "  scvtf s0, w26";
            unrolledInstrs1[3] = "  scvtf s0, w26";
            UarchTestHelpers.GenerateArmAsmStructureTestFuncs(sb, this.Counts, this.Prefix, unrolledInstrs, unrolledInstrs1, false);
        }
Пример #12
0
        public override void GenerateArmAsm(StringBuilder sb)
        {
            string[] unrolledMuls = new string[4];
            unrolledMuls[0] = "  mul w15, w15, w25";
            unrolledMuls[1] = "  mul w14, w14, w25";
            unrolledMuls[2] = "  mul w13, w13, w25";
            unrolledMuls[3] = "  mul w12, w12, w25";

            string[] unrolledMuls1 = new string[4];
            unrolledMuls1[0] = "  mul w15, w15, w26";
            unrolledMuls1[1] = "  mul w14, w14, w26";
            unrolledMuls1[2] = "  mul w13, w13, w26";
            unrolledMuls1[3] = "  mul w12, w12, w26";
            UarchTestHelpers.GenerateArmAsmStructureTestFuncs(sb, this.Counts, this.Prefix, unrolledMuls, unrolledMuls1, false);
        }
        public override void GenerateArmAsm(StringBuilder sb)
        {
            string[] dependentStores = new string[4];
            dependentStores[0] = "  str w15, [x2, w25, uxtw #2]";
            dependentStores[1] = "  str w15, [x2, w25, uxtw #2]";
            dependentStores[2] = "  str w15, [x2, w25, uxtw #2]";
            dependentStores[3] = "  str w15, [x2, w25, uxtw #2]";

            string[] dependentStores1 = new string[4];
            dependentStores1[0] = "  str w15, [x2, w26, uxtw #2]";
            dependentStores1[1] = "  str w15, [x2, w26, uxtw #2]";
            dependentStores1[2] = "  str w15, [x2, w26, uxtw #2]";
            dependentStores1[3] = "  str w15, [x2, w26, uxtw #2]";
            UarchTestHelpers.GenerateArmAsmStructureTestFuncs(sb, this.Counts, this.Prefix, dependentStores, dependentStores1, false);
        }
Пример #14
0
        // not implemented for ARM
        public override void GenerateArmAsm(StringBuilder sb)
        {
            string[] unrolledAdds = new string[4];
            unrolledAdds[0] = "  add x15, x15, x25";
            unrolledAdds[1] = "  add x14, x14, x25";
            unrolledAdds[2] = "  add x13, x13, x25";
            unrolledAdds[3] = "  add x12, x12, x25";

            string[] unrolledAdds1 = new string[4];
            unrolledAdds1[0] = "  add x15, x15, x26";
            unrolledAdds1[1] = "  add x14, x14, x26";
            unrolledAdds1[2] = "  add x13, x13, x26";
            unrolledAdds1[3] = "  add x12, x12, x26";
            UarchTestHelpers.GenerateArmAsmStructureTestFuncs(sb, this.Counts, this.Prefix, unrolledAdds, unrolledAdds1, false);
        }
Пример #15
0
        public override void GenerateArmAsm(StringBuilder sb)
        {
            string initInstrs = "  ldr s17, [x2]\n" +
                                "  ldr s18, [x2, 4]\n" +
                                "  ldr s19, [x2, 8]\n" +
                                "  ldr s20, [x2, 12]\n" +
                                "  ldr s21, [x2, 16]\n";

            string[] instrs = new string[8];
            instrs[0] = "  add x15, x15, x11";
            instrs[1] = "  fadd s18, s18, s17";
            instrs[2] = "  add x14, x14, x11";
            instrs[3] = "  fadd s19, s19, s17";
            instrs[4] = "  add x13, x13, x11";
            instrs[3] = "  fadd s20, s20, s17";
            instrs[6] = "  add x12, x12, x11";
            instrs[7] = "  fadd s21, s21, s17";
            UarchTestHelpers.GenerateArmAsmStructureTestFuncs(sb, this.Counts, this.Prefix, instrs, instrs, true, initInstrs);
        }
Пример #16
0
        public override void GenerateArmAsm(StringBuilder sb)
        {
            string postLoadInstr1 = "  add x11, x11, x25";
            string postLoadInstr2 = "  add x11, x11, x26";

            string[] unrolledAdds = new string[4];
            unrolledAdds[0] = "  add x15, x15, x25";
            unrolledAdds[1] = "  add x14, x14, x25";
            unrolledAdds[2] = "  add x13, x13, x25";
            unrolledAdds[3] = "  add x12, x12, x25";

            UarchTestHelpers.GenerateArmAsmStructureTestFuncs(
                sb,
                this.Counts,
                this.Prefix,
                unrolledAdds,
                unrolledAdds,
                false,
                postLoadInstrs1: postLoadInstr1,
                postLoadInstrs2: postLoadInstr2);
        }
Пример #17
0
 public override void GenerateArmAsm(StringBuilder sb)
 {
     UarchTestHelpers.GenerateArmAsmStructureTestFuncs(sb, this.Counts, this.Prefix, nops, nops, true);
 }
Пример #18
0
 public override void GenerateArmAsm(StringBuilder sb)
 {
     string[] nops = new string[1];
     nops[0] = "cmp x14, x15";
     UarchTestHelpers.GenerateArmAsmStructureTestFuncs(sb, this.Counts, this.Prefix, nops, nops, true);
 }