OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2963 CHECK_EQUAL_64(0xffeeddccbbaa9988UL, dst[6]); | 2963 CHECK_EQUAL_64(0xffeeddccbbaa9988UL, dst[6]); |
2964 CHECK_EQUAL_64(src_base - base_offset, x20); | 2964 CHECK_EQUAL_64(src_base - base_offset, x20); |
2965 CHECK_EQUAL_64(dst_base - base_offset, x21); | 2965 CHECK_EQUAL_64(dst_base - base_offset, x21); |
2966 CHECK_EQUAL_64(src_base + base_offset + 24, x18); | 2966 CHECK_EQUAL_64(src_base + base_offset + 24, x18); |
2967 CHECK_EQUAL_64(dst_base + base_offset + 56, x19); | 2967 CHECK_EQUAL_64(dst_base + base_offset + 56, x19); |
2968 | 2968 |
2969 TEARDOWN(); | 2969 TEARDOWN(); |
2970 } | 2970 } |
2971 | 2971 |
2972 | 2972 |
2973 TEST(ldnp_stnp_offset) { | |
2974 INIT_V8(); | |
2975 SETUP(); | |
2976 | |
2977 uint64_t src[3] = {0x0011223344556677UL, 0x8899aabbccddeeffUL, | |
2978 0xffeeddccbbaa9988UL}; | |
2979 uint64_t dst[7] = {0, 0, 0, 0, 0, 0, 0}; | |
2980 uintptr_t src_base = reinterpret_cast<uintptr_t>(src); | |
2981 uintptr_t dst_base = reinterpret_cast<uintptr_t>(dst); | |
2982 | |
2983 START(); | |
2984 __ Mov(x16, src_base); | |
2985 __ Mov(x17, dst_base); | |
2986 __ Mov(x18, src_base + 24); | |
2987 __ Mov(x19, dst_base + 56); | |
2988 __ Ldnp(w0, w1, MemOperand(x16)); | |
2989 __ Ldnp(w2, w3, MemOperand(x16, 4)); | |
2990 __ Ldnp(x4, x5, MemOperand(x16, 8)); | |
2991 __ Ldnp(w6, w7, MemOperand(x18, -12)); | |
2992 __ Ldnp(x8, x9, MemOperand(x18, -16)); | |
2993 __ Stnp(w0, w1, MemOperand(x17)); | |
2994 __ Stnp(w2, w3, MemOperand(x17, 8)); | |
2995 __ Stnp(x4, x5, MemOperand(x17, 16)); | |
2996 __ Stnp(w6, w7, MemOperand(x19, -24)); | |
2997 __ Stnp(x8, x9, MemOperand(x19, -16)); | |
2998 END(); | |
2999 | |
3000 RUN(); | |
3001 | |
3002 CHECK_EQUAL_64(0x44556677, x0); | |
3003 CHECK_EQUAL_64(0x00112233, x1); | |
3004 CHECK_EQUAL_64(0x0011223344556677UL, dst[0]); | |
3005 CHECK_EQUAL_64(0x00112233, x2); | |
3006 CHECK_EQUAL_64(0xccddeeff, x3); | |
3007 CHECK_EQUAL_64(0xccddeeff00112233UL, dst[1]); | |
3008 CHECK_EQUAL_64(0x8899aabbccddeeffUL, x4); | |
3009 CHECK_EQUAL_64(0x8899aabbccddeeffUL, dst[2]); | |
3010 CHECK_EQUAL_64(0xffeeddccbbaa9988UL, x5); | |
3011 CHECK_EQUAL_64(0xffeeddccbbaa9988UL, dst[3]); | |
3012 CHECK_EQUAL_64(0x8899aabb, x6); | |
3013 CHECK_EQUAL_64(0xbbaa9988, x7); | |
3014 CHECK_EQUAL_64(0xbbaa99888899aabbUL, dst[4]); | |
3015 CHECK_EQUAL_64(0x8899aabbccddeeffUL, x8); | |
3016 CHECK_EQUAL_64(0x8899aabbccddeeffUL, dst[5]); | |
3017 CHECK_EQUAL_64(0xffeeddccbbaa9988UL, x9); | |
3018 CHECK_EQUAL_64(0xffeeddccbbaa9988UL, dst[6]); | |
3019 CHECK_EQUAL_64(src_base, x16); | |
3020 CHECK_EQUAL_64(dst_base, x17); | |
3021 CHECK_EQUAL_64(src_base + 24, x18); | |
3022 CHECK_EQUAL_64(dst_base + 56, x19); | |
3023 | |
3024 TEARDOWN(); | |
3025 } | |
3026 | |
3027 | |
3028 TEST(ldp_stp_preindex) { | 2973 TEST(ldp_stp_preindex) { |
3029 INIT_V8(); | 2974 INIT_V8(); |
3030 SETUP(); | 2975 SETUP(); |
3031 | 2976 |
3032 uint64_t src[3] = {0x0011223344556677UL, 0x8899aabbccddeeffUL, | 2977 uint64_t src[3] = {0x0011223344556677UL, 0x8899aabbccddeeffUL, |
3033 0xffeeddccbbaa9988UL}; | 2978 0xffeeddccbbaa9988UL}; |
3034 uint64_t dst[5] = {0, 0, 0, 0, 0}; | 2979 uint64_t dst[5] = {0, 0, 0, 0, 0}; |
3035 uintptr_t src_base = reinterpret_cast<uintptr_t>(src); | 2980 uintptr_t src_base = reinterpret_cast<uintptr_t>(src); |
3036 uintptr_t dst_base = reinterpret_cast<uintptr_t>(dst); | 2981 uintptr_t dst_base = reinterpret_cast<uintptr_t>(dst); |
3037 | 2982 |
(...skipping 8349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11387 __ Mov(x0, 1); | 11332 __ Mov(x0, 1); |
11388 | 11333 |
11389 END(); | 11334 END(); |
11390 | 11335 |
11391 RUN(); | 11336 RUN(); |
11392 | 11337 |
11393 CHECK_EQUAL_64(0x1, x0); | 11338 CHECK_EQUAL_64(0x1, x0); |
11394 | 11339 |
11395 TEARDOWN(); | 11340 TEARDOWN(); |
11396 } | 11341 } |
OLD | NEW |