1/* 2 * Some or all of this work - Copyright (c) 2006 - 2016, Intel Corp. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without modification, 6 * are permitted provided that the following conditions are met: 7 * 8 * Redistributions of source code must retain the above copyright notice, 9 * this list of conditions and the following disclaimer. 10 * Redistributions in binary form must reproduce the above copyright notice, 11 * this list of conditions and the following disclaimer in the documentation 12 * and/or other materials provided with the distribution. 13 * Neither the name of Intel Corporation nor the names of its contributors 14 * may be used to endorse or promote products derived from this software 15 * without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 26 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29 30Name(z066, 66) 31 32// Verify result 33// 34// arg0 - name of test 35// arg1 - results Package 36// arg2 - index of four results 37// arg3 - indication of Result 38// arg4 - indication of ComputationalData 39// arg5 - Result 40// arg6 - ComputationalData 41Method(m4c1, 7, Serialized) 42{ 43 Name(tmp0, 0) 44 Name(tmp1, 0) 45 Name(lpC0, 0) 46 47 Multiply(arg2, 4, lpC0) 48 49 if (arg3) { 50 51 // Result 52 53 // Benchmark of Result 54 Store(DeRefOf(Index(arg1, lpC0)), Local0) 55 Increment(lpC0) 56 Store(DeRefOf(Index(arg1, lpC0)), Local1) 57 58 Store(ObjectType(arg5), tmp0) 59 60 if (F64) { 61 Store(ObjectType(Local0), tmp1) 62 if (LNotEqual(tmp0, tmp1)) { 63 err(arg0, z066, 0, 0, 0, tmp0, tmp1) 64 } elseif (LNotEqual(arg5, Local0)) { 65 err(arg0, z066, 1, 0, 0, arg5, Local0) 66 } 67 } else { 68 Store(ObjectType(Local1), tmp1) 69 if (LNotEqual(tmp0, tmp1)) { 70 err(arg0, z066, 2, 0, 0, tmp0, tmp1) 71 } elseif (LNotEqual(arg5, Local1)) { 72 err(arg0, z066, 3, 0, 0, arg5, Local1) 73 } 74 } 75 } else { 76 Increment(lpC0) 77 } 78 79 if (arg4) { 80 81 // ComputationalData 82 83 // Benchmark of ComputationalData 84 85 Increment(lpC0) 86 Store(DeRefOf(Index(arg1, lpC0)), Local2) 87 Increment(lpC0) 88 Store(DeRefOf(Index(arg1, lpC0)), Local3) 89 90 Store(ObjectType(arg6), tmp0) 91 92 if (F64) { 93 Store(ObjectType(Local2), tmp1) 94 if (LNotEqual(tmp0, tmp1)) { 95 err(arg0, z066, 4, 0, 0, tmp0, tmp1) 96 } elseif (LNotEqual(arg6, Local2)) { 97 err(arg0, z066, 5, 0, 0, arg6, Local2) 98 } 99 } else { 100 Store(ObjectType(Local3), tmp1) 101 if (LNotEqual(tmp0, tmp1)) { 102 err(arg0, z066, 6, 0, 0, tmp0, tmp1) 103 } elseif (LNotEqual(arg6, Local3)) { 104 err(arg0, z066, 7, 0, 0, arg6, Local3) 105 } 106 } 107 } 108} 109