예제 #1
0
    checkPBSUnknown2WithGraphAsync(Preserved p, Ice.Current current)
    {
        var pu = (PSUnknown2)p;

        test(pu.pi == 5);
        test(pu.ps.Equals("preserved"));
        test(pu.pb == pu);
        return(Task.CompletedTask);
    }
예제 #2
0
        internal override void MethodGen()
        {
            Constructor.AddLocal(Method.Params[0].Offset);
            Constructor.AddLoadT(Method.Params[0].Type);
            Constructor.AddPushA(Preserved.GetAbsoluteAddress(PreservedAddressTag.STDCHARIO));
            Constructor.AddStoreT(Method.Params[0].Type);

            Constructor.AddRet();
        }
예제 #3
0
    public void checkPBSUnknown2WithGraph(Preserved p, Ice.Current current)
    {
        test(p is PSUnknown2);
        PSUnknown2 pu = (PSUnknown2)p;

        test(pu.pi == 5);
        test(pu.ps.Equals("preserved"));
        test(pu.pb == pu);
    }
예제 #4
0
    checkPBSUnknownAsync(Preserved p, Ice.Current current)
    {
        var pu = p as PSUnknown;

        test(pu.pi == 5);
        test(pu.ps.Equals("preserved"));
        test(pu.psu.Equals("unknown"));
        test(pu.graph == null);
        test(pu.cl != null && pu.cl.i == 15);
        return(Task.CompletedTask);
    }
예제 #5
0
    public void checkPBSUnknown(Preserved p, Ice.Current current)
    {
        test(p is PSUnknown);
        PSUnknown pu = (PSUnknown)p;

        test(pu.pi == 5);
        test(pu.ps.Equals("preserved"));
        test(pu.psu.Equals("unknown"));
        test(pu.graph == null);
        test(pu.cl != null && pu.cl.i == 15);
    }
예제 #6
0
    public void checkPBSUnknownWithGraph(Preserved p, Ice.Current current)
    {
        test(p is PSUnknown);
        PSUnknown pu = (PSUnknown)p;

        test(pu.pi == 5);
        test(pu.ps.Equals("preserved"));
        test(pu.psu.Equals("unknown"));
        test(pu.graph != pu.graph.next);
        test(pu.graph.next != pu.graph.next.next);
        test(pu.graph.next.next.next == pu.graph);
    }
예제 #7
0
    checkPBSUnknownWithGraphAsync(Preserved p, Ice.Current current)
    {
        test(p is PSUnknown);
        var pu = (PSUnknown)p;

        test(pu.pi == 5);
        test(pu.ps.Equals("preserved"));
        test(pu.psu.Equals("unknown"));
        test(pu.graph != pu.graph.next);
        test(pu.graph.next != pu.graph.next.next);
        test(pu.graph.next.next.next == pu.graph);
        return(Task.CompletedTask);
    }
예제 #8
0
파일: TestI.cs 프로젝트: zxh1986123/ice
 public override void checkPBSUnknown2WithGraph(Preserved p, Ice.Current current)
 {
     if (current.encoding.Equals(Ice.Util.Encoding_1_0))
     {
         test(!(p is PSUnknown2));
         test(p.pi == 5);
         test(p.ps.Equals("preserved"));
     }
     else
     {
         PSUnknown2 pu = p as PSUnknown2;
         test(pu.pi == 5);
         test(pu.ps.Equals("preserved"));
         test(pu.pb == pu);
     }
 }
예제 #9
0
파일: TestI.cs 프로젝트: zhangwei5095/ice
 public override void checkPBSUnknown2WithGraph(Preserved p, Ice.Current current)
 {
     if(current.encoding.Equals(Ice.Util.Encoding_1_0))
     {
         test(!(p is PSUnknown2));
         test(p.pi == 5);
         test(p.ps.Equals("preserved"));
     }
     else
     {
         PSUnknown2 pu = p as PSUnknown2;
         test(pu.pi == 5);
         test(pu.ps.Equals("preserved"));
         test(pu.pb == pu);
     }
 }
예제 #10
0
 checkPBSUnknown2WithGraphAsync(Preserved p, Action response, Action <Exception> exception, Ice.Current current)
 {
     if (current.encoding.Equals(Ice.Util.Encoding_1_0))
     {
         test(!(p is PSUnknown2));
         test(p.pi == 5);
         test(p.ps.Equals("preserved"));
     }
     else
     {
         var pu = p as PSUnknown2;
         test(pu.pi == 5);
         test(pu.ps.Equals("preserved"));
         test(pu.pb == pu);
     }
     response();
 }
예제 #11
0
 public override Task checkPBSUnknown2WithGraphAsync(Preserved p, Ice.Current current)
 {
     if(current.encoding.Equals(Ice.Util.Encoding_1_0))
     {
         test(!(p is PSUnknown2));
         test(p.pi == 5);
         test(p.ps.Equals("preserved"));
     }
     else
     {
         var pu = p as PSUnknown2;
         test(pu.pi == 5);
         test(pu.ps.Equals("preserved"));
         test(pu.pb == pu);
     }
     return null;
 }
예제 #12
0
 checkPBSUnknown2WithGraphAsync(Preserved p, Ice.Current current)
 {
     if (current.encoding.Equals(Ice.Util.Encoding_1_0))
     {
         test(!(p is PSUnknown2));
         test(p.pi == 5);
         test(p.ps.Equals("preserved"));
     }
     else
     {
         var pu = p as PSUnknown2;
         test(pu.pi == 5);
         test(pu.ps.Equals("preserved"));
         test(pu.pb == pu);
     }
     return(null);
 }
예제 #13
0
 public override void checkPBSUnknown(Preserved p, Ice.Current current)
 {
     if (current.encoding.Equals(Ice.Util.Encoding_1_0))
     {
         test(!(p is PSUnknown));
         test(p.pi == 5);
         test(p.ps.Equals("preserved"));
     }
     else
     {
         PSUnknown pu = p as PSUnknown;
         test(pu.pi == 5);
         test(pu.ps.Equals("preserved"));
         test(pu.psu.Equals("unknown"));
         test(pu.graph == null);
         test(pu.cl != null && pu.cl.i == 15);
     }
 }
예제 #14
0
파일: TestI.cs 프로젝트: Crysty-Yui/ice
 public override void checkPBSUnknown(Preserved p, Ice.Current current)
 {
     if(current.encoding.Equals(Ice.Util.Encoding_1_0))
     {
         test(!(p is PSUnknown));
         test(p.pi == 5);
         test(p.ps.Equals("preserved"));
     }
     else
     {
         PSUnknown pu = p as PSUnknown;
         test(pu.pi == 5);
         test(pu.ps.Equals("preserved"));
         test(pu.psu.Equals("unknown"));
         test(pu.graph == null);
         test(pu.cl != null && pu.cl.i == 15);
     }
 }
예제 #15
0
파일: TestI.cs 프로젝트: zxh1986123/ice
 public override void checkPBSUnknownWithGraph(Preserved p, Ice.Current current)
 {
     if (current.encoding.Equals(Ice.Util.Encoding_1_0))
     {
         test(!(p is PSUnknown));
         test(p.pi == 5);
         test(p.ps.Equals("preserved"));
     }
     else
     {
         PSUnknown pu = p as PSUnknown;
         test(pu.pi == 5);
         test(pu.ps.Equals("preserved"));
         test(pu.psu.Equals("unknown"));
         test(pu.graph != pu.graph.next);
         test(pu.graph.next != pu.graph.next.next);
         test(pu.graph.next.next.next == pu.graph);
     }
 }
예제 #16
0
 checkPBSUnknownAsync(Preserved p, Ice.Current current)
 {
     if (current.encoding.Equals(Ice.Util.Encoding_1_0))
     {
         test(!(p is PSUnknown));
         test(p.pi == 5);
         test(p.ps.Equals("preserved"));
     }
     else
     {
         var pu = p as PSUnknown;
         test(pu.pi == 5);
         test(pu.ps.Equals("preserved"));
         test(pu.psu.Equals("unknown"));
         test(pu.graph == null);
         test(pu.cl != null && pu.cl.i == 15);
     }
     return(null);
 }
예제 #17
0
파일: TestI.cs 프로젝트: zhangwei5095/ice
 public override void checkPBSUnknownWithGraph(Preserved p, Ice.Current current)
 {
     if(current.encoding.Equals(Ice.Util.Encoding_1_0))
     {
         test(!(p is PSUnknown));
         test(p.pi == 5);
         test(p.ps.Equals("preserved"));
     }
     else
     {
         PSUnknown pu = p as PSUnknown;
         test(pu.pi == 5);
         test(pu.ps.Equals("preserved"));
         test(pu.psu.Equals("unknown"));
         test(pu.graph != pu.graph.next);
         test(pu.graph.next != pu.graph.next.next);
         test(pu.graph.next.next.next == pu.graph);
     }
 }
예제 #18
0
파일: TestAMDI.cs 프로젝트: Crysty-Yui/ice
 public override void checkPBSUnknown2WithGraph_async(AMD_TestIntf_checkPBSUnknown2WithGraph cb, Preserved p,
                                                      Ice.Current current)
 {
     if(current.encoding.Equals(Ice.Util.Encoding_1_0))
     {
         test(!(p is PSUnknown2));
         test(p.pi == 5);
         test(p.ps.Equals("preserved"));
     }
     else
     {
         PSUnknown2 pu = p as PSUnknown2;
         test(pu.pi == 5);
         test(pu.ps.Equals("preserved"));
         test(pu.pb == pu);
         pu.pb = null; // Break the cycle.
     }
     cb.ice_response();
 }
예제 #19
0
 checkPBSUnknownWithGraphAsync(Preserved p, Ice.Current current)
 {
     if (current.encoding.Equals(Ice.Util.Encoding_1_0))
     {
         test(!(p is PSUnknown));
         test(p.pi == 5);
         test(p.ps.Equals("preserved"));
     }
     else
     {
         var pu = p as PSUnknown;
         test(pu.pi == 5);
         test(pu.ps.Equals("preserved"));
         test(pu.psu.Equals("unknown"));
         test(pu.graph != pu.graph.next);
         test(pu.graph.next != pu.graph.next.next);
         test(pu.graph.next.next.next == pu.graph);
     }
     return(null);
 }
예제 #20
0
 public override void checkPBSUnknownWithGraph_async(AMD_TestIntf_checkPBSUnknownWithGraph cb,
                                                     Preserved p, Ice.Current current)
 {
     if (current.encoding.Equals(Ice.Util.Encoding_1_0))
     {
         test(!(p is PSUnknown));
         test(p.pi == 5);
         test(p.ps.Equals("preserved"));
     }
     else
     {
         PSUnknown pu = p as PSUnknown;
         test(pu.pi == 5);
         test(pu.ps.Equals("preserved"));
         test(pu.psu.Equals("unknown"));
         test(pu.graph != pu.graph.next);
         test(pu.graph.next != pu.graph.next.next);
         test(pu.graph.next.next.next == pu.graph);
         pu.graph.next.next.next = null;          // Break the cycle.
     }
     cb.ice_response();
 }
예제 #21
0
        private void InitCallingConvention()
        {
            ArgumentsStackSize = 0;
            RedZoneSize        = 0;
            SpillZoneSize      = 0;

            CalleePopsStack = false;

            Passed.Reset();
            Preserved.Reset();

            if (Constants.X64)
            {
                switch (CallingConvention)
                {
                case CallingConvention.X64Win:
                    SpillZoneSize = 32;
                    Passed.Set(RegisterClass.Gp, Utils.Mask(RegisterIndex.Cx, RegisterIndex.Dx, 8, 9));
                    _passedOrderGp[0] = RegisterIndex.Cx;
                    _passedOrderGp[1] = RegisterIndex.Dx;
                    _passedOrderGp[2] = 8;
                    _passedOrderGp[3] = 9;

                    Passed.Set(RegisterClass.Xyz, Utils.Mask(0, 1, 2, 3));
                    _passedOrderXyz[0] = 0;
                    _passedOrderXyz[1] = 1;
                    _passedOrderXyz[2] = 2;
                    _passedOrderXyz[3] = 3;

                    Preserved.Set(RegisterClass.Gp, Utils.Mask(RegisterIndex.Bx, RegisterIndex.Sp, RegisterIndex.Bp, RegisterIndex.Si, RegisterIndex.Di, 12, 13, 14, 15));
                    Preserved.Set(RegisterClass.Xyz, Utils.Mask(6, 7, 8, 9, 10, 11, 12, 13, 14, 15));
                    break;

                case CallingConvention.X64Unix:
                    RedZoneSize = 128;

                    Passed.Set(RegisterClass.Gp, Utils.Mask(7, 6, 2, 1, 8, 9));
                    _passedOrderGp[0] = 7;
                    _passedOrderGp[1] = 6;
                    _passedOrderGp[2] = 2;
                    _passedOrderGp[3] = 1;
                    _passedOrderGp[4] = 8;
                    _passedOrderGp[5] = 9;

                    Passed.Set(RegisterClass.Xyz, Utils.Mask(0, 1, 2, 3, 4, 5, 6, 7));
                    _passedOrderXyz[0] = 0;
                    _passedOrderXyz[1] = 1;
                    _passedOrderXyz[2] = 2;
                    _passedOrderXyz[3] = 3;
                    _passedOrderXyz[4] = 4;
                    _passedOrderXyz[5] = 5;
                    _passedOrderXyz[6] = 6;
                    _passedOrderXyz[7] = 7;

                    Preserved.Set(RegisterClass.Gp, Utils.Mask(3, 4, 5, 12, 13, 14, 15));
                    break;
                }
            }
            else
            {
                _argumentPassingDirection = ArgumentPassingDirection.RightToLeft;

                Preserved.Set(RegisterClass.Gp, Utils.Mask(3, 4, 5, 6, 7));
                switch (CallingConvention)
                {
                case CallingConvention.X86CDecl:
                    break;

                case CallingConvention.X86StdCall:
                    CalleePopsStack = true;
                    break;

                case CallingConvention.X86MsThisCall:
                    CalleePopsStack = true;
                    Passed.Set(RegisterClass.Gp, Utils.Mask(1));
                    _passedOrderGp[0] = 1;
                    break;

                case CallingConvention.X86MsFastCall:
                    CalleePopsStack = true;
                    Passed.Set(RegisterClass.Gp, Utils.Mask(1, 1));
                    _passedOrderGp[0] = 1;
                    _passedOrderGp[1] = 2;
                    break;

                case CallingConvention.X86BorlandFastCall:
                    CalleePopsStack           = true;
                    _argumentPassingDirection = ArgumentPassingDirection.LeftToRight;
                    Passed.Set(RegisterClass.Gp, Utils.Mask(0, 2, 1));
                    _passedOrderGp[0] = 0;
                    _passedOrderGp[1] = 2;
                    _passedOrderGp[2] = 1;
                    break;

                case CallingConvention.X86GccFastCall:
                    CalleePopsStack = true;
                    Passed.Set(RegisterClass.Gp, Utils.Mask(1, 2));
                    _passedOrderGp[0] = 1;
                    _passedOrderGp[1] = 2;
                    break;

                case CallingConvention.X86GccRegParm1:
                    Passed.Set(RegisterClass.Gp, Utils.Mask(0));
                    _passedOrderGp[0] = 0;
                    break;

                case CallingConvention.X86GccRegParm2:
                    Passed.Set(RegisterClass.Gp, Utils.Mask(0, 2));
                    _passedOrderGp[0] = 0;
                    _passedOrderGp[1] = 2;
                    break;

                case CallingConvention.X86GccRegParm3:
                    Passed.Set(RegisterClass.Gp, Utils.Mask(0, 2, 1));
                    _passedOrderGp[0] = 0;
                    _passedOrderGp[1] = 2;
                    _passedOrderGp[2] = 1;
                    break;
                }
            }
        }