public static Operand EmitLoadExclusive(
            ArmEmitterContext context,
            Operand address,
            bool exclusive,
            int size)
        {
            Delegate fallbackMethodDlg = null;

            if (exclusive)
            {
                switch (size)
                {
                case 0: fallbackMethodDlg = new _U8_U64(NativeInterface.ReadByteExclusive); break;

                case 1: fallbackMethodDlg = new _U16_U64(NativeInterface.ReadUInt16Exclusive); break;

                case 2: fallbackMethodDlg = new _U32_U64(NativeInterface.ReadUInt32Exclusive); break;

                case 3: fallbackMethodDlg = new _U64_U64(NativeInterface.ReadUInt64Exclusive); break;

                case 4: fallbackMethodDlg = new _V128_U64(NativeInterface.ReadVector128Exclusive); break;
                }
            }
            else
            {
                switch (size)
                {
                case 0: fallbackMethodDlg = new _U8_U64(NativeInterface.ReadByte); break;

                case 1: fallbackMethodDlg = new _U16_U64(NativeInterface.ReadUInt16); break;

                case 2: fallbackMethodDlg = new _U32_U64(NativeInterface.ReadUInt32); break;

                case 3: fallbackMethodDlg = new _U64_U64(NativeInterface.ReadUInt64); break;

                case 4: fallbackMethodDlg = new _V128_U64(NativeInterface.ReadVector128); break;
                }
            }

            return(context.Call(fallbackMethodDlg, address));
        }
        private static void EmitReadVectorFallback(
            ArmEmitterContext context,
            Operand address,
            Operand vector,
            int rt,
            int elem,
            int size)
        {
            Delegate fallbackMethodDlg = null;

            switch (size)
            {
            case 0: fallbackMethodDlg = new _U8_U64(NativeInterface.ReadByte);      break;

            case 1: fallbackMethodDlg = new _U16_U64(NativeInterface.ReadUInt16);    break;

            case 2: fallbackMethodDlg = new _U32_U64(NativeInterface.ReadUInt32);    break;

            case 3: fallbackMethodDlg = new _U64_U64(NativeInterface.ReadUInt64);    break;

            case 4: fallbackMethodDlg = new _V128_U64(NativeInterface.ReadVector128); break;
            }

            Operand value = context.Call(fallbackMethodDlg, address);

            switch (size)
            {
            case 0: value = context.VectorInsert8(vector, value, elem); break;

            case 1: value = context.VectorInsert16(vector, value, elem); break;

            case 2: value = context.VectorInsert(vector, value, elem); break;

            case 3: value = context.VectorInsert(vector, value, elem); break;
            }

            context.Copy(GetVec(rt), value);
        }