aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Cpu/LightningJit/Arm32/Target/Arm64/InstEmitNeonHash.cs
blob: 57090ac8f7d90ae33a9e50171d40f73b28460c5a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
using System.Diagnostics;

namespace Ryujinx.Cpu.LightningJit.Arm32.Target.Arm64
{
    static class InstEmitNeonHash
    {
        public static void Sha1c(CodeGenContext context, uint rd, uint rn, uint rm, uint q)
        {
            // TODO: Feature check, emulation if not supported.

            Debug.Assert(q == 1);

            InstEmitNeonCommon.EmitVectorBinary(context, rd, rn, rm, context.Arm64Assembler.Sha1c);
        }

        public static void Sha1h(CodeGenContext context, uint rd, uint rm, uint size)
        {
            // TODO: Feature check, emulation if not supported.

            Debug.Assert(size == 2);

            InstEmitNeonCommon.EmitVectorUnary(context, rd, rm, context.Arm64Assembler.Sha1h);
        }

        public static void Sha1m(CodeGenContext context, uint rd, uint rn, uint rm, uint q)
        {
            // TODO: Feature check, emulation if not supported.

            Debug.Assert(q == 1);

            InstEmitNeonCommon.EmitVectorBinary(context, rd, rn, rm, context.Arm64Assembler.Sha1m);
        }

        public static void Sha1p(CodeGenContext context, uint rd, uint rn, uint rm, uint q)
        {
            // TODO: Feature check, emulation if not supported.

            Debug.Assert(q == 1);

            InstEmitNeonCommon.EmitVectorBinary(context, rd, rn, rm, context.Arm64Assembler.Sha1p);
        }

        public static void Sha1su0(CodeGenContext context, uint rd, uint rn, uint rm, uint q)
        {
            // TODO: Feature check, emulation if not supported.

            Debug.Assert(q == 1);

            InstEmitNeonCommon.EmitVectorBinary(context, rd, rn, rm, context.Arm64Assembler.Sha1su0);
        }

        public static void Sha1su1(CodeGenContext context, uint rd, uint rm, uint size)
        {
            // TODO: Feature check, emulation if not supported.

            Debug.Assert(size == 2);

            InstEmitNeonCommon.EmitVectorUnary(context, rd, rm, context.Arm64Assembler.Sha1su1);
        }

        public static void Sha256h(CodeGenContext context, uint rd, uint rn, uint rm, uint q)
        {
            // TODO: Feature check, emulation if not supported.

            Debug.Assert(q == 1);

            InstEmitNeonCommon.EmitVectorBinary(context, rd, rn, rm, context.Arm64Assembler.Sha256h);
        }

        public static void Sha256h2(CodeGenContext context, uint rd, uint rn, uint rm, uint q)
        {
            // TODO: Feature check, emulation if not supported.

            Debug.Assert(q == 1);

            InstEmitNeonCommon.EmitVectorBinary(context, rd, rn, rm, context.Arm64Assembler.Sha256h2);
        }

        public static void Sha256su0(CodeGenContext context, uint rd, uint rm, uint size)
        {
            // TODO: Feature check, emulation if not supported.

            Debug.Assert(size == 2);

            InstEmitNeonCommon.EmitVectorUnary(context, rd, rm, context.Arm64Assembler.Sha256su0);
        }

        public static void Sha256su1(CodeGenContext context, uint rd, uint rn, uint rm, uint q)
        {
            // TODO: Feature check, emulation if not supported.

            Debug.Assert(q == 1);

            InstEmitNeonCommon.EmitVectorBinary(context, rd, rn, rm, context.Arm64Assembler.Sha256su1);
        }
    }
}