1b8021494Sopenharmony_ci// Copyright 2020, VIXL authors 2b8021494Sopenharmony_ci// All rights reserved. 3b8021494Sopenharmony_ci// 4b8021494Sopenharmony_ci// Redistribution and use in source and binary forms, with or without 5b8021494Sopenharmony_ci// modification, are permitted provided that the following conditions are met: 6b8021494Sopenharmony_ci// 7b8021494Sopenharmony_ci// * Redistributions of source code must retain the above copyright notice, 8b8021494Sopenharmony_ci// this list of conditions and the following disclaimer. 9b8021494Sopenharmony_ci// * Redistributions in binary form must reproduce the above copyright notice, 10b8021494Sopenharmony_ci// this list of conditions and the following disclaimer in the documentation 11b8021494Sopenharmony_ci// and/or other materials provided with the distribution. 12b8021494Sopenharmony_ci// * Neither the name of ARM Limited nor the names of its contributors may be 13b8021494Sopenharmony_ci// used to endorse or promote products derived from this software without 14b8021494Sopenharmony_ci// specific prior written permission. 15b8021494Sopenharmony_ci// 16b8021494Sopenharmony_ci// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND 17b8021494Sopenharmony_ci// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18b8021494Sopenharmony_ci// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19b8021494Sopenharmony_ci// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 20b8021494Sopenharmony_ci// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21b8021494Sopenharmony_ci// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22b8021494Sopenharmony_ci// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23b8021494Sopenharmony_ci// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24b8021494Sopenharmony_ci// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25b8021494Sopenharmony_ci// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26b8021494Sopenharmony_ci 27b8021494Sopenharmony_ci#include <cfloat> 28b8021494Sopenharmony_ci#include <cmath> 29b8021494Sopenharmony_ci#include <cstdio> 30b8021494Sopenharmony_ci#include <cstdlib> 31b8021494Sopenharmony_ci#include <cstring> 32b8021494Sopenharmony_ci#include <functional> 33b8021494Sopenharmony_ci#include <sys/mman.h> 34b8021494Sopenharmony_ci#include <unistd.h> 35b8021494Sopenharmony_ci 36b8021494Sopenharmony_ci#include "test-runner.h" 37b8021494Sopenharmony_ci#include "test-utils.h" 38b8021494Sopenharmony_ci 39b8021494Sopenharmony_ci#include "aarch64/cpu-aarch64.h" 40b8021494Sopenharmony_ci#include "aarch64/disasm-aarch64.h" 41b8021494Sopenharmony_ci#include "aarch64/macro-assembler-aarch64.h" 42b8021494Sopenharmony_ci#include "aarch64/simulator-aarch64.h" 43b8021494Sopenharmony_ci#include "aarch64/test-utils-aarch64.h" 44b8021494Sopenharmony_ci#include "test-assembler-aarch64.h" 45b8021494Sopenharmony_ci 46b8021494Sopenharmony_ci#define TEST_SVE(name) TEST_SVE_INNER("SIM", name) 47b8021494Sopenharmony_ci 48b8021494Sopenharmony_cinamespace vixl { 49b8021494Sopenharmony_cinamespace aarch64 { 50b8021494Sopenharmony_ci 51b8021494Sopenharmony_ciTEST_SVE(sve2_halving_arithmetic) { 52b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 53b8021494Sopenharmony_ci CPUFeatures::kSVE2, 54b8021494Sopenharmony_ci CPUFeatures::kNEON, 55b8021494Sopenharmony_ci CPUFeatures::kCRC32); 56b8021494Sopenharmony_ci START(); 57b8021494Sopenharmony_ci 58b8021494Sopenharmony_ci SetInitialMachineState(&masm); 59b8021494Sopenharmony_ci // state = 0xe2bd2480 60b8021494Sopenharmony_ci 61b8021494Sopenharmony_ci { 62b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 63b8021494Sopenharmony_ci __ dci(0x441182b2); // uhadd z18.b, p0/m, z18.b, z21.b 64b8021494Sopenharmony_ci // vl128 state = 0x8ac2942a 65b8021494Sopenharmony_ci __ dci(0x441382f3); // uhsub z19.b, p0/m, z19.b, z23.b 66b8021494Sopenharmony_ci // vl128 state = 0x0e0db643 67b8021494Sopenharmony_ci __ dci(0x449383fb); // uhsub z27.s, p0/m, z27.s, z31.s 68b8021494Sopenharmony_ci // vl128 state = 0x6a97fc8c 69b8021494Sopenharmony_ci __ dci(0x441283fa); // shsub z26.b, p0/m, z26.b, z31.b 70b8021494Sopenharmony_ci // vl128 state = 0x48a5fd5f 71b8021494Sopenharmony_ci __ dci(0x44928372); // shsub z18.s, p0/m, z18.s, z27.s 72b8021494Sopenharmony_ci // vl128 state = 0x7c670d36 73b8021494Sopenharmony_ci __ dci(0x44d2827a); // shsub z26.d, p0/m, z26.d, z19.d 74b8021494Sopenharmony_ci // vl128 state = 0x3a15c66f 75b8021494Sopenharmony_ci __ dci(0x4492823b); // shsub z27.s, p0/m, z27.s, z17.s 76b8021494Sopenharmony_ci // vl128 state = 0xe407c826 77b8021494Sopenharmony_ci __ dci(0x44978239); // uhsubr z25.s, p0/m, z25.s, z17.s 78b8021494Sopenharmony_ci // vl128 state = 0xf7157dae 79b8021494Sopenharmony_ci __ dci(0x4493827d); // uhsub z29.s, p0/m, z29.s, z19.s 80b8021494Sopenharmony_ci // vl128 state = 0xcebff22f 81b8021494Sopenharmony_ci __ dci(0x449782f9); // uhsubr z25.s, p0/m, z25.s, z23.s 82b8021494Sopenharmony_ci // vl128 state = 0xbe691139 83b8021494Sopenharmony_ci __ dci(0x44978231); // uhsubr z17.s, p0/m, z17.s, z17.s 84b8021494Sopenharmony_ci // vl128 state = 0x59b2af72 85b8021494Sopenharmony_ci __ dci(0x44578233); // uhsubr z19.h, p0/m, z19.h, z17.h 86b8021494Sopenharmony_ci // vl128 state = 0xd7fad727 87b8021494Sopenharmony_ci __ dci(0x44578312); // uhsubr z18.h, p0/m, z18.h, z24.h 88b8021494Sopenharmony_ci // vl128 state = 0x87b5d00a 89b8021494Sopenharmony_ci __ dci(0x44578610); // uhsubr z16.h, p1/m, z16.h, z16.h 90b8021494Sopenharmony_ci // vl128 state = 0xbaae097d 91b8021494Sopenharmony_ci __ dci(0x44578618); // uhsubr z24.h, p1/m, z24.h, z16.h 92b8021494Sopenharmony_ci // vl128 state = 0x3887509e 93b8021494Sopenharmony_ci __ dci(0x44168608); // shsubr z8.b, p1/m, z8.b, z16.b 94b8021494Sopenharmony_ci // vl128 state = 0xc16dc63b 95b8021494Sopenharmony_ci __ dci(0x44128700); // shsub z0.b, p1/m, z0.b, z24.b 96b8021494Sopenharmony_ci // vl128 state = 0x3eddcd6d 97b8021494Sopenharmony_ci __ dci(0x44528f02); // shsub z2.h, p3/m, z2.h, z24.h 98b8021494Sopenharmony_ci // vl128 state = 0x2e7ffa0d 99b8021494Sopenharmony_ci __ dci(0x44538f40); // uhsub z0.h, p3/m, z0.h, z26.h 100b8021494Sopenharmony_ci // vl128 state = 0x1f68bee5 101b8021494Sopenharmony_ci __ dci(0x44538342); // uhsub z2.h, p0/m, z2.h, z26.h 102b8021494Sopenharmony_ci // vl128 state = 0x2a368049 103b8021494Sopenharmony_ci __ dci(0x44538040); // uhsub z0.h, p0/m, z0.h, z2.h 104b8021494Sopenharmony_ci // vl128 state = 0x0537f844 105b8021494Sopenharmony_ci __ dci(0x44568044); // shsubr z4.h, p0/m, z4.h, z2.h 106b8021494Sopenharmony_ci // vl128 state = 0x0dfac1b2 107b8021494Sopenharmony_ci __ dci(0x445688cc); // shsubr z12.h, p2/m, z12.h, z6.h 108b8021494Sopenharmony_ci // vl128 state = 0xbefa909b 109b8021494Sopenharmony_ci __ dci(0x44d288dc); // shsub z28.d, p2/m, z28.d, z6.d 110b8021494Sopenharmony_ci // vl128 state = 0xbadc14bb 111b8021494Sopenharmony_ci __ dci(0x44d288d8); // shsub z24.d, p2/m, z24.d, z6.d 112b8021494Sopenharmony_ci // vl128 state = 0x518130c0 113b8021494Sopenharmony_ci __ dci(0x44d088f0); // shadd z16.d, p2/m, z16.d, z7.d 114b8021494Sopenharmony_ci // vl128 state = 0xb01856bd 115b8021494Sopenharmony_ci __ dci(0x44d08cd2); // shadd z18.d, p3/m, z18.d, z6.d 116b8021494Sopenharmony_ci // vl128 state = 0xbbcfeaa2 117b8021494Sopenharmony_ci __ dci(0x44d484d0); // srhadd z16.d, p1/m, z16.d, z6.d 118b8021494Sopenharmony_ci // vl128 state = 0xefe1d416 119b8021494Sopenharmony_ci __ dci(0x44d496d1); // srhadd z17.d, p5/m, z17.d, z22.d 120b8021494Sopenharmony_ci // vl128 state = 0xceb574b8 121b8021494Sopenharmony_ci __ dci(0x44d196d5); // uhadd z21.d, p5/m, z21.d, z22.d 122b8021494Sopenharmony_ci // vl128 state = 0x46cdd268 123b8021494Sopenharmony_ci __ dci(0x44d496dd); // srhadd z29.d, p5/m, z29.d, z22.d 124b8021494Sopenharmony_ci // vl128 state = 0x21a81b6a 125b8021494Sopenharmony_ci __ dci(0x4494969c); // srhadd z28.s, p5/m, z28.s, z20.s 126b8021494Sopenharmony_ci // vl128 state = 0x2316cb04 127b8021494Sopenharmony_ci __ dci(0x4494968c); // srhadd z12.s, p5/m, z12.s, z20.s 128b8021494Sopenharmony_ci // vl128 state = 0x6248cc0a 129b8021494Sopenharmony_ci __ dci(0x4415968d); // urhadd z13.b, p5/m, z13.b, z20.b 130b8021494Sopenharmony_ci // vl128 state = 0x6edd11e0 131b8021494Sopenharmony_ci __ dci(0x44119e8c); // uhadd z12.b, p7/m, z12.b, z20.b 132b8021494Sopenharmony_ci // vl128 state = 0x81841eb6 133b8021494Sopenharmony_ci __ dci(0x4491968d); // uhadd z13.s, p5/m, z13.s, z20.s 134b8021494Sopenharmony_ci // vl128 state = 0x02b8b893 135b8021494Sopenharmony_ci __ dci(0x44118685); // uhadd z5.b, p1/m, z5.b, z20.b 136b8021494Sopenharmony_ci // vl128 state = 0x707db891 137b8021494Sopenharmony_ci __ dci(0x44138e8d); // uhsub z13.b, p3/m, z13.b, z20.b 138b8021494Sopenharmony_ci // vl128 state = 0x2caa64dd 139b8021494Sopenharmony_ci __ dci(0x44139e0c); // uhsub z12.b, p7/m, z12.b, z16.b 140b8021494Sopenharmony_ci // vl128 state = 0xe34695ef 141b8021494Sopenharmony_ci __ dci(0x44128e0d); // shsub z13.b, p3/m, z13.b, z16.b 142b8021494Sopenharmony_ci // vl128 state = 0x477197dd 143b8021494Sopenharmony_ci __ dci(0x44129a1d); // shsub z29.b, p6/m, z29.b, z16.b 144b8021494Sopenharmony_ci // vl128 state = 0x19cebaa2 145b8021494Sopenharmony_ci __ dci(0x44129a19); // shsub z25.b, p6/m, z25.b, z16.b 146b8021494Sopenharmony_ci // vl128 state = 0x0d62dca4 147b8021494Sopenharmony_ci __ dci(0x44129249); // shsub z9.b, p4/m, z9.b, z18.b 148b8021494Sopenharmony_ci // vl128 state = 0x327e81e3 149b8021494Sopenharmony_ci __ dci(0x44129248); // shsub z8.b, p4/m, z8.b, z18.b 150b8021494Sopenharmony_ci // vl128 state = 0x28ec9bf8 151b8021494Sopenharmony_ci __ dci(0x44169269); // shsubr z9.b, p4/m, z9.b, z19.b 152b8021494Sopenharmony_ci // vl128 state = 0x652ca8c9 153b8021494Sopenharmony_ci __ dci(0x44168661); // shsubr z1.b, p1/m, z1.b, z19.b 154b8021494Sopenharmony_ci // vl128 state = 0x46fcb15a 155b8021494Sopenharmony_ci __ dci(0x44168420); // shsubr z0.b, p1/m, z0.b, z1.b 156b8021494Sopenharmony_ci // vl128 state = 0x7151e02b 157b8021494Sopenharmony_ci __ dci(0x44168428); // shsubr z8.b, p1/m, z8.b, z1.b 158b8021494Sopenharmony_ci // vl128 state = 0x4c8921f6 159b8021494Sopenharmony_ci __ dci(0x44148409); // srhadd z9.b, p1/m, z9.b, z0.b 160b8021494Sopenharmony_ci // vl128 state = 0xd0d2fc1c 161b8021494Sopenharmony_ci __ dci(0x44148641); // srhadd z1.b, p1/m, z1.b, z18.b 162b8021494Sopenharmony_ci // vl128 state = 0xc821f381 163b8021494Sopenharmony_ci } 164b8021494Sopenharmony_ci 165b8021494Sopenharmony_ci uint32_t state; 166b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 167b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 168b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 169b8021494Sopenharmony_ci 170b8021494Sopenharmony_ci END(); 171b8021494Sopenharmony_ci if (CAN_RUN()) { 172b8021494Sopenharmony_ci RUN(); 173b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 174b8021494Sopenharmony_ci 0xc821f381, 175b8021494Sopenharmony_ci 0xc0ad3b7c, 176b8021494Sopenharmony_ci 0x4eb4ba1b, 177b8021494Sopenharmony_ci 0xdc8e061a, 178b8021494Sopenharmony_ci 0x64675a15, 179b8021494Sopenharmony_ci 0x923703bf, 180b8021494Sopenharmony_ci 0x6944c0db, 181b8021494Sopenharmony_ci 0x7ac89bae, 182b8021494Sopenharmony_ci 0x8fa4c45f, 183b8021494Sopenharmony_ci 0xf64c8b4c, 184b8021494Sopenharmony_ci 0x8ba751b7, 185b8021494Sopenharmony_ci 0x2fe8832e, 186b8021494Sopenharmony_ci 0xc6b8000d, 187b8021494Sopenharmony_ci 0x864ba0ff, 188b8021494Sopenharmony_ci 0xded22c04, 189b8021494Sopenharmony_ci 0x213cf65e, 190b8021494Sopenharmony_ci }; 191b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 192b8021494Sopenharmony_ci } 193b8021494Sopenharmony_ci} 194b8021494Sopenharmony_ci 195b8021494Sopenharmony_ciTEST_SVE(sve2_sli_sri) { 196b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 197b8021494Sopenharmony_ci CPUFeatures::kSVE2, 198b8021494Sopenharmony_ci CPUFeatures::kNEON, 199b8021494Sopenharmony_ci CPUFeatures::kCRC32); 200b8021494Sopenharmony_ci START(); 201b8021494Sopenharmony_ci 202b8021494Sopenharmony_ci SetInitialMachineState(&masm); 203b8021494Sopenharmony_ci // state = 0xe2bd2480 204b8021494Sopenharmony_ci 205b8021494Sopenharmony_ci { 206b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 207b8021494Sopenharmony_ci __ dci(0x4509f07f); // sri z31.b, z3.b, #7 208b8021494Sopenharmony_ci // vl128 state = 0x509a7a2d 209b8021494Sopenharmony_ci __ dci(0x454bf07e); // sri z30.s, z3.s, #21 210b8021494Sopenharmony_ci // vl128 state = 0xc973a4e8 211b8021494Sopenharmony_ci __ dci(0x450bf17a); // sri z26.b, z11.b, #5 212b8021494Sopenharmony_ci // vl128 state = 0xa9dcbcf5 213b8021494Sopenharmony_ci __ dci(0x450ef17b); // sri z27.b, z11.b, #2 214b8021494Sopenharmony_ci // vl128 state = 0xd56761c1 215b8021494Sopenharmony_ci __ dci(0x458ef1f9); // sri z25.d, z15.d, #50 216b8021494Sopenharmony_ci // vl128 state = 0xdd84a538 217b8021494Sopenharmony_ci __ dci(0x459ff1fb); // sri z27.d, z15.d, #33 218b8021494Sopenharmony_ci // vl128 state = 0x4e2dbf4a 219b8021494Sopenharmony_ci __ dci(0x459ff5df); // sli z31.d, z14.d, #31 220b8021494Sopenharmony_ci // vl128 state = 0x46d9563e 221b8021494Sopenharmony_ci __ dci(0x45d7f5cf); // sli z15.d, z14.d, #55 222b8021494Sopenharmony_ci // vl128 state = 0xf4fcf912 223b8021494Sopenharmony_ci __ dci(0x4593f5ce); // sli z14.d, z14.d, #19 224b8021494Sopenharmony_ci // vl128 state = 0xcef34d18 225b8021494Sopenharmony_ci __ dci(0x4593f1fe); // sri z30.d, z15.d, #45 226b8021494Sopenharmony_ci // vl128 state = 0x69509e94 227b8021494Sopenharmony_ci __ dci(0x4581f1ff); // sri z31.d, z15.d, #63 228b8021494Sopenharmony_ci // vl128 state = 0x09cd0cf7 229b8021494Sopenharmony_ci __ dci(0x45c1f1bd); // sri z29.d, z13.d, #31 230b8021494Sopenharmony_ci // vl128 state = 0xfc095f8b 231b8021494Sopenharmony_ci __ dci(0x45c1f03c); // sri z28.d, z1.d, #31 232b8021494Sopenharmony_ci // vl128 state = 0x0ca836f0 233b8021494Sopenharmony_ci __ dci(0x45c1f4b4); // sli z20.d, z5.d, #33 234b8021494Sopenharmony_ci // vl128 state = 0x678be6b3 235b8021494Sopenharmony_ci __ dci(0x45c1f5f0); // sli z16.d, z15.d, #33 236b8021494Sopenharmony_ci // vl128 state = 0x7a743b56 237b8021494Sopenharmony_ci __ dci(0x45c7f5f2); // sli z18.d, z15.d, #39 238b8021494Sopenharmony_ci // vl128 state = 0x0bbc4117 239b8021494Sopenharmony_ci __ dci(0x45c7f5e2); // sli z2.d, z15.d, #39 240b8021494Sopenharmony_ci // vl128 state = 0x13e1a7ae 241b8021494Sopenharmony_ci __ dci(0x45c7f1a0); // sri z0.d, z13.d, #25 242b8021494Sopenharmony_ci // vl128 state = 0x8014a497 243b8021494Sopenharmony_ci __ dci(0x4597f1b0); // sri z16.d, z13.d, #41 244b8021494Sopenharmony_ci // vl128 state = 0x5f7994a8 245b8021494Sopenharmony_ci __ dci(0x4593f5b1); // sli z17.d, z13.d, #19 246b8021494Sopenharmony_ci // vl128 state = 0x125f37b5 247b8021494Sopenharmony_ci __ dci(0x4591f5f0); // sli z16.d, z15.d, #17 248b8021494Sopenharmony_ci // vl128 state = 0x26f1fdf2 249b8021494Sopenharmony_ci __ dci(0x4581f5d2); // sli z18.d, z14.d, #1 250b8021494Sopenharmony_ci // vl128 state = 0x5b0baccc 251b8021494Sopenharmony_ci __ dci(0x4541f5d6); // sli z22.s, z14.s, #1 252b8021494Sopenharmony_ci // vl128 state = 0x74f04ecb 253b8021494Sopenharmony_ci __ dci(0x4551f1d4); // sri z20.s, z14.s, #15 254b8021494Sopenharmony_ci // vl128 state = 0xc43d0586 255b8021494Sopenharmony_ci __ dci(0x4553f150); // sri z16.s, z10.s, #13 256b8021494Sopenharmony_ci // vl128 state = 0xce8c688a 257b8021494Sopenharmony_ci __ dci(0x4557f171); // sri z17.s, z11.s, #9 258b8021494Sopenharmony_ci // vl128 state = 0x03a5b3b0 259b8021494Sopenharmony_ci __ dci(0x4513f175); // sri z21.h, z11.h, #13 260b8021494Sopenharmony_ci // vl128 state = 0x392ab48e 261b8021494Sopenharmony_ci __ dci(0x4551f177); // sri z23.s, z11.s, #15 262b8021494Sopenharmony_ci // vl128 state = 0xa886dbc8 263b8021494Sopenharmony_ci __ dci(0x4551f17f); // sri z31.s, z11.s, #15 264b8021494Sopenharmony_ci // vl128 state = 0x37c804bc 265b8021494Sopenharmony_ci __ dci(0x4551f16f); // sri z15.s, z11.s, #15 266b8021494Sopenharmony_ci // vl128 state = 0x17e99d67 267b8021494Sopenharmony_ci __ dci(0x4550f067); // sri z7.s, z3.s, #16 268b8021494Sopenharmony_ci // vl128 state = 0xb0bd981a 269b8021494Sopenharmony_ci __ dci(0x4550f077); // sri z23.s, z3.s, #16 270b8021494Sopenharmony_ci // vl128 state = 0x5f643b3e 271b8021494Sopenharmony_ci __ dci(0x4551f0f5); // sri z21.s, z7.s, #15 272b8021494Sopenharmony_ci // vl128 state = 0xa0b83a32 273b8021494Sopenharmony_ci __ dci(0x4551f09d); // sri z29.s, z4.s, #15 274b8021494Sopenharmony_ci // vl128 state = 0x890807a1 275b8021494Sopenharmony_ci __ dci(0x4552f08d); // sri z13.s, z4.s, #14 276b8021494Sopenharmony_ci // vl128 state = 0x81cb8fa4 277b8021494Sopenharmony_ci __ dci(0x4512f01d); // sri z29.h, z0.h, #14 278b8021494Sopenharmony_ci // vl128 state = 0x62751a54 279b8021494Sopenharmony_ci __ dci(0x4552f419); // sli z25.s, z0.s, #18 280b8021494Sopenharmony_ci // vl128 state = 0xfd7c0337 281b8021494Sopenharmony_ci __ dci(0x4542f49b); // sli z27.s, z4.s, #2 282b8021494Sopenharmony_ci // vl128 state = 0x0089e534 283b8021494Sopenharmony_ci __ dci(0x454af09a); // sri z26.s, z4.s, #22 284b8021494Sopenharmony_ci // vl128 state = 0xea87d159 285b8021494Sopenharmony_ci __ dci(0x45caf0d8); // sri z24.d, z6.d, #22 286b8021494Sopenharmony_ci // vl128 state = 0x3c44b845 287b8021494Sopenharmony_ci __ dci(0x45c2f2dc); // sri z28.d, z22.d, #30 288b8021494Sopenharmony_ci // vl128 state = 0x9b8c17a7 289b8021494Sopenharmony_ci __ dci(0x45caf25d); // sri z29.d, z18.d, #22 290b8021494Sopenharmony_ci // vl128 state = 0x3e2c1797 291b8021494Sopenharmony_ci __ dci(0x45caf0dc); // sri z28.d, z6.d, #22 292b8021494Sopenharmony_ci // vl128 state = 0xbf933754 293b8021494Sopenharmony_ci __ dci(0x458af1cc); // sri z12.d, z14.d, #54 294b8021494Sopenharmony_ci // vl128 state = 0x93e91a23 295b8021494Sopenharmony_ci __ dci(0x4586f1cd); // sri z13.d, z14.d, #58 296b8021494Sopenharmony_ci // vl128 state = 0x0f7c6faa 297b8021494Sopenharmony_ci __ dci(0x458ef0cc); // sri z12.d, z6.d, #50 298b8021494Sopenharmony_ci // vl128 state = 0x1d771f71 299b8021494Sopenharmony_ci __ dci(0x458ef00d); // sri z13.d, z0.d, #50 300b8021494Sopenharmony_ci // vl128 state = 0x29a23da7 301b8021494Sopenharmony_ci __ dci(0x450ef05d); // sri z29.b, z2.b, #2 302b8021494Sopenharmony_ci // vl128 state = 0x74fd2038 303b8021494Sopenharmony_ci __ dci(0x450cf00d); // sri z13.b, z0.b, #4 304b8021494Sopenharmony_ci // vl128 state = 0x075bc166 305b8021494Sopenharmony_ci __ dci(0x450cf00c); // sri z12.b, z0.b, #4 306b8021494Sopenharmony_ci // vl128 state = 0xfd3d290f 307b8021494Sopenharmony_ci } 308b8021494Sopenharmony_ci 309b8021494Sopenharmony_ci uint32_t state; 310b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 311b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 312b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 313b8021494Sopenharmony_ci 314b8021494Sopenharmony_ci END(); 315b8021494Sopenharmony_ci if (CAN_RUN()) { 316b8021494Sopenharmony_ci RUN(); 317b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 318b8021494Sopenharmony_ci 0xfd3d290f, 319b8021494Sopenharmony_ci 0x8dd0bdab, 320b8021494Sopenharmony_ci 0xa25ba843, 321b8021494Sopenharmony_ci 0x484543ed, 322b8021494Sopenharmony_ci 0x22df2f4f, 323b8021494Sopenharmony_ci 0xb62769dc, 324b8021494Sopenharmony_ci 0x795e30f7, 325b8021494Sopenharmony_ci 0xe49948e7, 326b8021494Sopenharmony_ci 0xd4ceb676, 327b8021494Sopenharmony_ci 0xbf2d359a, 328b8021494Sopenharmony_ci 0xcf4331a9, 329b8021494Sopenharmony_ci 0x8cce4eef, 330b8021494Sopenharmony_ci 0x4fbaec97, 331b8021494Sopenharmony_ci 0x4fec4d88, 332b8021494Sopenharmony_ci 0x3efc521d, 333b8021494Sopenharmony_ci 0xffef31d1, 334b8021494Sopenharmony_ci }; 335b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 336b8021494Sopenharmony_ci } 337b8021494Sopenharmony_ci} 338b8021494Sopenharmony_ci 339b8021494Sopenharmony_ciTEST_SVE(sve2_srshr_urshr) { 340b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 341b8021494Sopenharmony_ci CPUFeatures::kSVE2, 342b8021494Sopenharmony_ci CPUFeatures::kNEON, 343b8021494Sopenharmony_ci CPUFeatures::kCRC32); 344b8021494Sopenharmony_ci START(); 345b8021494Sopenharmony_ci 346b8021494Sopenharmony_ci SetInitialMachineState(&masm); 347b8021494Sopenharmony_ci // state = 0xe2bd2480 348b8021494Sopenharmony_ci 349b8021494Sopenharmony_ci { 350b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 351b8021494Sopenharmony_ci __ dci(0x04cc9074); // srshr z20.d, p4/m, z20.d, #29 352b8021494Sopenharmony_ci // vl128 state = 0xecefbcaa 353b8021494Sopenharmony_ci __ dci(0x04cc9236); // srshr z22.d, p4/m, z22.d, #15 354b8021494Sopenharmony_ci // vl128 state = 0x7eef75c3 355b8021494Sopenharmony_ci __ dci(0x04cd927e); // urshr z30.d, p4/m, z30.d, #13 356b8021494Sopenharmony_ci // vl128 state = 0xf5ab0a43 357b8021494Sopenharmony_ci __ dci(0x04cd9e76); // urshr z22.d, p7/m, z22.d, #13 358b8021494Sopenharmony_ci // vl128 state = 0x67a9d15a 359b8021494Sopenharmony_ci __ dci(0x04cd9a57); // urshr z23.d, p6/m, z23.d, #14 360b8021494Sopenharmony_ci // vl128 state = 0xf1591f3f 361b8021494Sopenharmony_ci __ dci(0x044d9247); // urshr z7.s, p4/m, z7.s, #14 362b8021494Sopenharmony_ci // vl128 state = 0xcb770d03 363b8021494Sopenharmony_ci __ dci(0x044d9245); // urshr z5.s, p4/m, z5.s, #14 364b8021494Sopenharmony_ci // vl128 state = 0x7a225c92 365b8021494Sopenharmony_ci __ dci(0x044d9241); // urshr z1.s, p4/m, z1.s, #14 366b8021494Sopenharmony_ci // vl128 state = 0x31e4f59a 367b8021494Sopenharmony_ci __ dci(0x044d8200); // urshr z0.s, p0/m, z0.s, #16 368b8021494Sopenharmony_ci // vl128 state = 0x7c0c67fa 369b8021494Sopenharmony_ci __ dci(0x044d8330); // urshr z16.s, p0/m, z16.s, #7 370b8021494Sopenharmony_ci // vl128 state = 0x2aaa996d 371b8021494Sopenharmony_ci __ dci(0x044d8340); // urshr z0.s, p0/m, z0.s, #6 372b8021494Sopenharmony_ci // vl128 state = 0x1999a541 373b8021494Sopenharmony_ci __ dci(0x044d8104); // urshr z4.s, p0/m, z4.s, #24 374b8021494Sopenharmony_ci // vl128 state = 0xbebc22f3 375b8021494Sopenharmony_ci __ dci(0x044d8526); // urshr z6.s, p1/m, z6.s, #23 376b8021494Sopenharmony_ci // vl128 state = 0x5e9c818d 377b8021494Sopenharmony_ci __ dci(0x04cd8502); // urshr z2.d, p1/m, z2.d, #24 378b8021494Sopenharmony_ci // vl128 state = 0x9cd88e00 379b8021494Sopenharmony_ci __ dci(0x048d9506); // urshr z6.d, p5/m, z6.d, #56 380b8021494Sopenharmony_ci // vl128 state = 0xff60a16e 381b8021494Sopenharmony_ci __ dci(0x048d9504); // urshr z4.d, p5/m, z4.d, #56 382b8021494Sopenharmony_ci // vl128 state = 0xfae64bf4 383b8021494Sopenharmony_ci __ dci(0x048d8705); // urshr z5.d, p1/m, z5.d, #40 384b8021494Sopenharmony_ci // vl128 state = 0xbd7bc8bb 385b8021494Sopenharmony_ci __ dci(0x048d9307); // urshr z7.d, p4/m, z7.d, #40 386b8021494Sopenharmony_ci // vl128 state = 0x22e58729 387b8021494Sopenharmony_ci __ dci(0x048c9323); // srshr z3.d, p4/m, z3.d, #39 388b8021494Sopenharmony_ci // vl128 state = 0x1a2b90d1 389b8021494Sopenharmony_ci __ dci(0x048c8721); // srshr z1.d, p1/m, z1.d, #39 390b8021494Sopenharmony_ci // vl128 state = 0xf31798ea 391b8021494Sopenharmony_ci __ dci(0x04cc8f20); // srshr z0.d, p3/m, z0.d, #7 392b8021494Sopenharmony_ci // vl128 state = 0x3a159e41 393b8021494Sopenharmony_ci __ dci(0x04cc87b0); // srshr z16.d, p1/m, z16.d, #3 394b8021494Sopenharmony_ci // vl128 state = 0x461819c6 395b8021494Sopenharmony_ci __ dci(0x04cc8778); // srshr z24.d, p1/m, z24.d, #5 396b8021494Sopenharmony_ci // vl128 state = 0x52c8c945 397b8021494Sopenharmony_ci __ dci(0x048c8730); // srshr z16.d, p1/m, z16.d, #39 398b8021494Sopenharmony_ci // vl128 state = 0xa6724c16 399b8021494Sopenharmony_ci __ dci(0x040c8534); // srshr z20.b, p1/m, z20.b, #7 400b8021494Sopenharmony_ci // vl128 state = 0xfeae5ea1 401b8021494Sopenharmony_ci __ dci(0x040c957c); // srshr z28.b, p5/m, z28.b, #5 402b8021494Sopenharmony_ci // vl128 state = 0xe55cac9f 403b8021494Sopenharmony_ci __ dci(0x048c9554); // srshr z20.d, p5/m, z20.d, #54 404b8021494Sopenharmony_ci // vl128 state = 0x41ccbe50 405b8021494Sopenharmony_ci __ dci(0x048c8156); // srshr z22.d, p0/m, z22.d, #54 406b8021494Sopenharmony_ci // vl128 state = 0xfef5c71e 407b8021494Sopenharmony_ci __ dci(0x040c8957); // srshr z23.b, p2/m, z23.b, #6 408b8021494Sopenharmony_ci // vl128 state = 0xac8cf177 409b8021494Sopenharmony_ci __ dci(0x040c8bd5); // srshr z21.h, p2/m, z21.h, #2 410b8021494Sopenharmony_ci // vl128 state = 0xfe7005fe 411b8021494Sopenharmony_ci __ dci(0x040c8354); // srshr z20.h, p0/m, z20.h, #6 412b8021494Sopenharmony_ci // vl128 state = 0x1daa6598 413b8021494Sopenharmony_ci __ dci(0x040c931c); // srshr z28.h, p4/m, z28.h, #8 414b8021494Sopenharmony_ci // vl128 state = 0x8c7f2675 415b8021494Sopenharmony_ci __ dci(0x040c9798); // srshr z24.h, p5/m, z24.h, #4 416b8021494Sopenharmony_ci // vl128 state = 0x2349e927 417b8021494Sopenharmony_ci __ dci(0x044c97ba); // srshr z26.s, p5/m, z26.s, #3 418b8021494Sopenharmony_ci // vl128 state = 0xf3670053 419b8021494Sopenharmony_ci __ dci(0x040c9faa); // srshr z10.h, p7/m, z10.h, #3 420b8021494Sopenharmony_ci // vl128 state = 0x61333578 421b8021494Sopenharmony_ci __ dci(0x044d9fae); // urshr z14.s, p7/m, z14.s, #3 422b8021494Sopenharmony_ci // vl128 state = 0xdb1232a3 423b8021494Sopenharmony_ci __ dci(0x044d8f8f); // urshr z15.s, p3/m, z15.s, #4 424b8021494Sopenharmony_ci // vl128 state = 0xb1b4bda1 425b8021494Sopenharmony_ci __ dci(0x044d8f87); // urshr z7.s, p3/m, z7.s, #4 426b8021494Sopenharmony_ci // vl128 state = 0xba636ab8 427b8021494Sopenharmony_ci __ dci(0x044d9d97); // urshr z23.s, p7/m, z23.s, #20 428b8021494Sopenharmony_ci // vl128 state = 0x8ab01b49 429b8021494Sopenharmony_ci __ dci(0x040d9593); // urshr z19.b, p5/m, z19.b, #4 430b8021494Sopenharmony_ci // vl128 state = 0x20ee49b4 431b8021494Sopenharmony_ci __ dci(0x040d959b); // urshr z27.b, p5/m, z27.b, #4 432b8021494Sopenharmony_ci // vl128 state = 0xe34dcf2e 433b8021494Sopenharmony_ci __ dci(0x044c959a); // srshr z26.s, p5/m, z26.s, #20 434b8021494Sopenharmony_ci // vl128 state = 0x65bafb28 435b8021494Sopenharmony_ci __ dci(0x044d9492); // urshr z18.s, p5/m, z18.s, #28 436b8021494Sopenharmony_ci // vl128 state = 0xcbed1382 437b8021494Sopenharmony_ci __ dci(0x044c8493); // srshr z19.s, p1/m, z19.s, #28 438b8021494Sopenharmony_ci // vl128 state = 0xa54fb84c 439b8021494Sopenharmony_ci __ dci(0x044c8cc3); // srshr z3.s, p3/m, z3.s, #26 440b8021494Sopenharmony_ci // vl128 state = 0x257267ee 441b8021494Sopenharmony_ci __ dci(0x044c8c0b); // srshr z11.s, p3/m, z11.s, #32 442b8021494Sopenharmony_ci // vl128 state = 0xd494a3e8 443b8021494Sopenharmony_ci __ dci(0x044c8c6f); // srshr z15.s, p3/m, z15.s, #29 444b8021494Sopenharmony_ci // vl128 state = 0x63621477 445b8021494Sopenharmony_ci __ dci(0x044c9c2e); // srshr z14.s, p7/m, z14.s, #31 446b8021494Sopenharmony_ci // vl128 state = 0x4cb2e888 447b8021494Sopenharmony_ci __ dci(0x04cc943e); // srshr z30.d, p5/m, z30.d, #31 448b8021494Sopenharmony_ci // vl128 state = 0x8e580ba2 449b8021494Sopenharmony_ci __ dci(0x04cd953f); // urshr z31.d, p5/m, z31.d, #23 450b8021494Sopenharmony_ci // vl128 state = 0x7678cc05 451b8021494Sopenharmony_ci } 452b8021494Sopenharmony_ci 453b8021494Sopenharmony_ci uint32_t state; 454b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 455b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 456b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 457b8021494Sopenharmony_ci 458b8021494Sopenharmony_ci END(); 459b8021494Sopenharmony_ci if (CAN_RUN()) { 460b8021494Sopenharmony_ci RUN(); 461b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 462b8021494Sopenharmony_ci 0x7678cc05, 463b8021494Sopenharmony_ci 0x37f2893a, 464b8021494Sopenharmony_ci 0xce2a105d, 465b8021494Sopenharmony_ci 0x5a03f5a3, 466b8021494Sopenharmony_ci 0x81444dfc, 467b8021494Sopenharmony_ci 0x5581c0c1, 468b8021494Sopenharmony_ci 0xfee622cc, 469b8021494Sopenharmony_ci 0x0f6796a5, 470b8021494Sopenharmony_ci 0xf151a5fd, 471b8021494Sopenharmony_ci 0x13e9be9c, 472b8021494Sopenharmony_ci 0x9685f8b5, 473b8021494Sopenharmony_ci 0xa6827285, 474b8021494Sopenharmony_ci 0x7ad6d004, 475b8021494Sopenharmony_ci 0xba7989ae, 476b8021494Sopenharmony_ci 0x96fe2826, 477b8021494Sopenharmony_ci 0xd1ddc17e, 478b8021494Sopenharmony_ci }; 479b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 480b8021494Sopenharmony_ci } 481b8021494Sopenharmony_ci} 482b8021494Sopenharmony_ci 483b8021494Sopenharmony_ciTEST_SVE(sve2_sqshl_uqshl) { 484b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 485b8021494Sopenharmony_ci CPUFeatures::kSVE2, 486b8021494Sopenharmony_ci CPUFeatures::kNEON, 487b8021494Sopenharmony_ci CPUFeatures::kCRC32); 488b8021494Sopenharmony_ci START(); 489b8021494Sopenharmony_ci 490b8021494Sopenharmony_ci SetInitialMachineState(&masm); 491b8021494Sopenharmony_ci // state = 0xe2bd2480 492b8021494Sopenharmony_ci 493b8021494Sopenharmony_ci { 494b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 495b8021494Sopenharmony_ci __ dci(0x044f86aa); // sqshlu z10.s, p1/m, z10.s, #21 496b8021494Sopenharmony_ci // vl128 state = 0x37777991 497b8021494Sopenharmony_ci __ dci(0x044f8482); // sqshlu z2.s, p1/m, z2.s, #4 498b8021494Sopenharmony_ci // vl128 state = 0x8119dd5a 499b8021494Sopenharmony_ci __ dci(0x048f8480); // sqshlu z0.d, p1/m, z0.d, #4 500b8021494Sopenharmony_ci // vl128 state = 0x8966cd23 501b8021494Sopenharmony_ci __ dci(0x04cf8c82); // sqshlu z2.d, p3/m, z2.d, #36 502b8021494Sopenharmony_ci // vl128 state = 0x71b53135 503b8021494Sopenharmony_ci __ dci(0x044f8892); // sqshlu z18.s, p2/m, z18.s, #4 504b8021494Sopenharmony_ci // vl128 state = 0x44e0e9a7 505b8021494Sopenharmony_ci __ dci(0x04cf8996); // sqshlu z22.d, p2/m, z22.d, #44 506b8021494Sopenharmony_ci // vl128 state = 0x4e4b77b9 507b8021494Sopenharmony_ci __ dci(0x04cf9194); // sqshlu z20.d, p4/m, z20.d, #44 508b8021494Sopenharmony_ci // vl128 state = 0x66d72728 509b8021494Sopenharmony_ci __ dci(0x04cf9b9c); // sqshlu z28.d, p6/m, z28.d, #60 510b8021494Sopenharmony_ci // vl128 state = 0xa80f62ce 511b8021494Sopenharmony_ci __ dci(0x04c79f8c); // uqshl z12.d, p7/m, z12.d, #60 512b8021494Sopenharmony_ci // vl128 state = 0x87a3a8c0 513b8021494Sopenharmony_ci __ dci(0x04469f88); // sqshl z8.s, p7/m, z8.s, #28 514b8021494Sopenharmony_ci // vl128 state = 0x3db302cb 515b8021494Sopenharmony_ci __ dci(0x04469f8a); // sqshl z10.s, p7/m, z10.s, #28 516b8021494Sopenharmony_ci // vl128 state = 0x2d66bbb2 517b8021494Sopenharmony_ci __ dci(0x04469a8e); // sqshl z14.s, p6/m, z14.s, #20 518b8021494Sopenharmony_ci // vl128 state = 0x39524732 519b8021494Sopenharmony_ci __ dci(0x04c69a1e); // sqshl z30.d, p6/m, z30.d, #48 520b8021494Sopenharmony_ci // vl128 state = 0x39d71433 521b8021494Sopenharmony_ci __ dci(0x04c68a9a); // sqshl z26.d, p2/m, z26.d, #52 522b8021494Sopenharmony_ci // vl128 state = 0x58771cfb 523b8021494Sopenharmony_ci __ dci(0x04469a8a); // sqshl z10.s, p6/m, z10.s, #20 524b8021494Sopenharmony_ci // vl128 state = 0xa773fcc9 525b8021494Sopenharmony_ci __ dci(0x04c68a88); // sqshl z8.d, p2/m, z8.d, #52 526b8021494Sopenharmony_ci // vl128 state = 0x9dce801c 527b8021494Sopenharmony_ci __ dci(0x04469a89); // sqshl z9.s, p6/m, z9.s, #20 528b8021494Sopenharmony_ci // vl128 state = 0x4141302f 529b8021494Sopenharmony_ci __ dci(0x04479b81); // uqshl z1.s, p6/m, z1.s, #28 530b8021494Sopenharmony_ci // vl128 state = 0x369084f9 531b8021494Sopenharmony_ci __ dci(0x044f9f91); // sqshlu z17.s, p7/m, z17.s, #28 532b8021494Sopenharmony_ci // vl128 state = 0x1570bb90 533b8021494Sopenharmony_ci __ dci(0x04479e90); // uqshl z16.s, p7/m, z16.s, #20 534b8021494Sopenharmony_ci // vl128 state = 0x27765662 535b8021494Sopenharmony_ci __ dci(0x044f9f94); // sqshlu z20.s, p7/m, z20.s, #28 536b8021494Sopenharmony_ci // vl128 state = 0xe99bcbb9 537b8021494Sopenharmony_ci __ dci(0x04479795); // uqshl z21.s, p5/m, z21.s, #28 538b8021494Sopenharmony_ci // vl128 state = 0xb36c3b9f 539b8021494Sopenharmony_ci __ dci(0x04479754); // uqshl z20.s, p5/m, z20.s, #26 540b8021494Sopenharmony_ci // vl128 state = 0x435e0256 541b8021494Sopenharmony_ci __ dci(0x04479750); // uqshl z16.s, p5/m, z16.s, #26 542b8021494Sopenharmony_ci // vl128 state = 0x485471e9 543b8021494Sopenharmony_ci __ dci(0x04479740); // uqshl z0.s, p5/m, z0.s, #26 544b8021494Sopenharmony_ci // vl128 state = 0x170e10cb 545b8021494Sopenharmony_ci __ dci(0x04079544); // uqshl z4.b, p5/m, z4.b, #2 546b8021494Sopenharmony_ci // vl128 state = 0x026fe32a 547b8021494Sopenharmony_ci __ dci(0x04c79546); // uqshl z6.d, p5/m, z6.d, #42 548b8021494Sopenharmony_ci // vl128 state = 0x9a92b063 549b8021494Sopenharmony_ci __ dci(0x04c78504); // uqshl z4.d, p1/m, z4.d, #40 550b8021494Sopenharmony_ci // vl128 state = 0x4e9a105e 551b8021494Sopenharmony_ci __ dci(0x04879500); // uqshl z0.d, p5/m, z0.d, #8 552b8021494Sopenharmony_ci // vl128 state = 0x958b4d28 553b8021494Sopenharmony_ci __ dci(0x04879908); // uqshl z8.d, p6/m, z8.d, #8 554b8021494Sopenharmony_ci // vl128 state = 0x420ff82d 555b8021494Sopenharmony_ci __ dci(0x04879318); // uqshl z24.d, p4/m, z24.d, #24 556b8021494Sopenharmony_ci // vl128 state = 0x88002097 557b8021494Sopenharmony_ci __ dci(0x0487931a); // uqshl z26.d, p4/m, z26.d, #24 558b8021494Sopenharmony_ci // vl128 state = 0x3047401c 559b8021494Sopenharmony_ci __ dci(0x0486938a); // sqshl z10.d, p4/m, z10.d, #28 560b8021494Sopenharmony_ci // vl128 state = 0x5b2b7938 561b8021494Sopenharmony_ci __ dci(0x04069188); // sqshl z8.b, p4/m, z8.b, #4 562b8021494Sopenharmony_ci // vl128 state = 0xb92dd260 563b8021494Sopenharmony_ci __ dci(0x04469389); // sqshl z9.s, p4/m, z9.s, #28 564b8021494Sopenharmony_ci // vl128 state = 0xdc6370c3 565b8021494Sopenharmony_ci __ dci(0x0447918b); // uqshl z11.s, p4/m, z11.s, #12 566b8021494Sopenharmony_ci // vl128 state = 0x5e6198f0 567b8021494Sopenharmony_ci __ dci(0x0447913b); // uqshl z27.s, p4/m, z27.s, #9 568b8021494Sopenharmony_ci // vl128 state = 0x935ed2a3 569b8021494Sopenharmony_ci __ dci(0x0447915f); // uqshl z31.s, p4/m, z31.s, #10 570b8021494Sopenharmony_ci // vl128 state = 0x76271654 571b8021494Sopenharmony_ci __ dci(0x0406915d); // sqshl z29.b, p4/m, z29.b, #2 572b8021494Sopenharmony_ci // vl128 state = 0x46a71ae3 573b8021494Sopenharmony_ci __ dci(0x0486911f); // sqshl z31.d, p4/m, z31.d, #8 574b8021494Sopenharmony_ci // vl128 state = 0x2c7320a6 575b8021494Sopenharmony_ci __ dci(0x0486911d); // sqshl z29.d, p4/m, z29.d, #8 576b8021494Sopenharmony_ci // vl128 state = 0x4aa0022d 577b8021494Sopenharmony_ci __ dci(0x04869b1f); // sqshl z31.d, p6/m, z31.d, #24 578b8021494Sopenharmony_ci // vl128 state = 0x2de081d7 579b8021494Sopenharmony_ci __ dci(0x04069317); // sqshl z23.h, p4/m, z23.h, #8 580b8021494Sopenharmony_ci // vl128 state = 0x879c9ead 581b8021494Sopenharmony_ci __ dci(0x0447931f); // uqshl z31.s, p4/m, z31.s, #24 582b8021494Sopenharmony_ci // vl128 state = 0x51070552 583b8021494Sopenharmony_ci __ dci(0x04479b9e); // uqshl z30.s, p6/m, z30.s, #28 584b8021494Sopenharmony_ci // vl128 state = 0x8cc26b2b 585b8021494Sopenharmony_ci __ dci(0x04479adf); // uqshl z31.s, p6/m, z31.s, #22 586b8021494Sopenharmony_ci // vl128 state = 0x8f4512d3 587b8021494Sopenharmony_ci __ dci(0x04479adb); // uqshl z27.s, p6/m, z27.s, #22 588b8021494Sopenharmony_ci // vl128 state = 0x3d44e050 589b8021494Sopenharmony_ci __ dci(0x04079a99); // uqshl z25.h, p6/m, z25.h, #4 590b8021494Sopenharmony_ci // vl128 state = 0xede0c288 591b8021494Sopenharmony_ci __ dci(0x04079a89); // uqshl z9.h, p6/m, z9.h, #4 592b8021494Sopenharmony_ci // vl128 state = 0x928beed6 593b8021494Sopenharmony_ci __ dci(0x04879acb); // uqshl z11.d, p6/m, z11.d, #22 594b8021494Sopenharmony_ci // vl128 state = 0x6945e18a 595b8021494Sopenharmony_ci } 596b8021494Sopenharmony_ci 597b8021494Sopenharmony_ci uint32_t state; 598b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 599b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 600b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 601b8021494Sopenharmony_ci 602b8021494Sopenharmony_ci END(); 603b8021494Sopenharmony_ci if (CAN_RUN()) { 604b8021494Sopenharmony_ci RUN(); 605b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 606b8021494Sopenharmony_ci 0x6945e18a, 607b8021494Sopenharmony_ci 0x0e954f70, 608b8021494Sopenharmony_ci 0x3d269eb2, 609b8021494Sopenharmony_ci 0xefeb5acb, 610b8021494Sopenharmony_ci 0xfb27cb0c, 611b8021494Sopenharmony_ci 0x651a1aea, 612b8021494Sopenharmony_ci 0x07011083, 613b8021494Sopenharmony_ci 0xd425418b, 614b8021494Sopenharmony_ci 0xa0e026c6, 615b8021494Sopenharmony_ci 0x407c416e, 616b8021494Sopenharmony_ci 0x14e25761, 617b8021494Sopenharmony_ci 0x21eef576, 618b8021494Sopenharmony_ci 0xc6ad09eb, 619b8021494Sopenharmony_ci 0x3642006b, 620b8021494Sopenharmony_ci 0xdebec165, 621b8021494Sopenharmony_ci 0x24ae8a32, 622b8021494Sopenharmony_ci }; 623b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 624b8021494Sopenharmony_ci } 625b8021494Sopenharmony_ci} 626b8021494Sopenharmony_ci 627b8021494Sopenharmony_ciTEST_SVE(sve2_unsigned_sat_round_shift) { 628b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 629b8021494Sopenharmony_ci CPUFeatures::kSVE2, 630b8021494Sopenharmony_ci CPUFeatures::kNEON, 631b8021494Sopenharmony_ci CPUFeatures::kCRC32); 632b8021494Sopenharmony_ci START(); 633b8021494Sopenharmony_ci 634b8021494Sopenharmony_ci SetInitialMachineState(&masm); 635b8021494Sopenharmony_ci // state = 0xe2bd2480 636b8021494Sopenharmony_ci 637b8021494Sopenharmony_ci { 638b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 100 * kInstructionSize); 639b8021494Sopenharmony_ci __ dci(0x44cb84cb); // uqrshl z11.d, p1/m, z11.d, z6.d 640b8021494Sopenharmony_ci // vl128 state = 0x9794ef4a 641b8021494Sopenharmony_ci __ dci(0x444b85db); // uqrshl z27.h, p1/m, z27.h, z14.h 642b8021494Sopenharmony_ci // vl128 state = 0xda137fcc 643b8021494Sopenharmony_ci __ dci(0x444b874b); // uqrshl z11.h, p1/m, z11.h, z26.h 644b8021494Sopenharmony_ci // vl128 state = 0xafc1533b 645b8021494Sopenharmony_ci __ dci(0x444b87fb); // uqrshl z27.h, p1/m, z27.h, z31.h 646b8021494Sopenharmony_ci // vl128 state = 0x228890a2 647b8021494Sopenharmony_ci __ dci(0x444b87f3); // uqrshl z19.h, p1/m, z19.h, z31.h 648b8021494Sopenharmony_ci // vl128 state = 0x5cb0d356 649b8021494Sopenharmony_ci __ dci(0x444385f1); // urshl z17.h, p1/m, z17.h, z15.h 650b8021494Sopenharmony_ci // vl128 state = 0xbb6b6d1d 651b8021494Sopenharmony_ci __ dci(0x444795f3); // urshlr z19.h, p5/m, z19.h, z15.h 652b8021494Sopenharmony_ci // vl128 state = 0x98b43358 653b8021494Sopenharmony_ci __ dci(0x44479552); // urshlr z18.h, p5/m, z18.h, z10.h 654b8021494Sopenharmony_ci // vl128 state = 0x472880b2 655b8021494Sopenharmony_ci __ dci(0x44c79502); // urshlr z2.d, p5/m, z2.d, z8.d 656b8021494Sopenharmony_ci // vl128 state = 0x0995d86f 657b8021494Sopenharmony_ci __ dci(0x44879406); // urshlr z6.s, p5/m, z6.s, z0.s 658b8021494Sopenharmony_ci // vl128 state = 0x405211cd 659b8021494Sopenharmony_ci __ dci(0x44079436); // urshlr z22.b, p5/m, z22.b, z1.b 660b8021494Sopenharmony_ci // vl128 state = 0x563647b0 661b8021494Sopenharmony_ci __ dci(0x44078c34); // urshlr z20.b, p3/m, z20.b, z1.b 662b8021494Sopenharmony_ci // vl128 state = 0x2eacf2d3 663b8021494Sopenharmony_ci __ dci(0x440f843c); // uqrshlr z28.b, p1/m, z28.b, z1.b 664b8021494Sopenharmony_ci // vl128 state = 0x56f472ce 665b8021494Sopenharmony_ci __ dci(0x440f8cbe); // uqrshlr z30.b, p3/m, z30.b, z5.b 666b8021494Sopenharmony_ci // vl128 state = 0x910ce8d0 667b8021494Sopenharmony_ci __ dci(0x44078eba); // urshlr z26.b, p3/m, z26.b, z21.b 668b8021494Sopenharmony_ci // vl128 state = 0xc47b6482 669b8021494Sopenharmony_ci __ dci(0x44078ebe); // urshlr z30.b, p3/m, z30.b, z21.b 670b8021494Sopenharmony_ci // vl128 state = 0xff805975 671b8021494Sopenharmony_ci __ dci(0x440f86b6); // uqrshlr z22.b, p1/m, z22.b, z21.b 672b8021494Sopenharmony_ci // vl128 state = 0x132fe792 673b8021494Sopenharmony_ci __ dci(0x444b86b7); // uqrshl z23.h, p1/m, z23.h, z21.h 674b8021494Sopenharmony_ci // vl128 state = 0xabd3d85c 675b8021494Sopenharmony_ci __ dci(0x440b84a7); // uqrshl z7.b, p1/m, z7.b, z5.b 676b8021494Sopenharmony_ci // vl128 state = 0x8f718992 677b8021494Sopenharmony_ci __ dci(0x440b8085); // uqrshl z5.b, p0/m, z5.b, z4.b 678b8021494Sopenharmony_ci // vl128 state = 0x1b05e694 679b8021494Sopenharmony_ci __ dci(0x440b8687); // uqrshl z7.b, p1/m, z7.b, z20.b 680b8021494Sopenharmony_ci // vl128 state = 0xd9a0c225 681b8021494Sopenharmony_ci __ dci(0x440986cf); // uqshl z15.b, p1/m, z15.b, z22.b 682b8021494Sopenharmony_ci // vl128 state = 0x98be170a 683b8021494Sopenharmony_ci __ dci(0x440b87ce); // uqrshl z14.b, p1/m, z14.b, z30.b 684b8021494Sopenharmony_ci // vl128 state = 0x0993d862 685b8021494Sopenharmony_ci __ dci(0x440b838c); // uqrshl z12.b, p0/m, z12.b, z28.b 686b8021494Sopenharmony_ci // vl128 state = 0xbc95a037 687b8021494Sopenharmony_ci __ dci(0x440b839c); // uqrshl z28.b, p0/m, z28.b, z28.b 688b8021494Sopenharmony_ci // vl128 state = 0x558159d9 689b8021494Sopenharmony_ci __ dci(0x444b8314); // uqrshl z20.h, p0/m, z20.h, z24.h 690b8021494Sopenharmony_ci // vl128 state = 0x53798c6b 691b8021494Sopenharmony_ci __ dci(0x44498b1c); // uqshl z28.h, p2/m, z28.h, z24.h 692b8021494Sopenharmony_ci // vl128 state = 0x83db6a7c 693b8021494Sopenharmony_ci __ dci(0x44498b0c); // uqshl z12.h, p2/m, z12.h, z24.h 694b8021494Sopenharmony_ci // vl128 state = 0x62bda6cb 695b8021494Sopenharmony_ci __ dci(0x44438b0e); // urshl z14.h, p2/m, z14.h, z24.h 696b8021494Sopenharmony_ci // vl128 state = 0xc04356eb 697b8021494Sopenharmony_ci __ dci(0x44438986); // urshl z6.h, p2/m, z6.h, z12.h 698b8021494Sopenharmony_ci // vl128 state = 0x0e2e6682 699b8021494Sopenharmony_ci __ dci(0x444389e4); // urshl z4.h, p2/m, z4.h, z15.h 700b8021494Sopenharmony_ci // vl128 state = 0xbb28cacd 701b8021494Sopenharmony_ci __ dci(0x444391f4); // urshl z20.h, p4/m, z20.h, z15.h 702b8021494Sopenharmony_ci // vl128 state = 0x5349f37a 703b8021494Sopenharmony_ci __ dci(0x444391f6); // urshl z22.h, p4/m, z22.h, z15.h 704b8021494Sopenharmony_ci // vl128 state = 0x99e66890 705b8021494Sopenharmony_ci __ dci(0x44c39177); // urshl z23.d, p4/m, z23.d, z11.d 706b8021494Sopenharmony_ci // vl128 state = 0x2d48a891 707b8021494Sopenharmony_ci __ dci(0x44c79573); // urshlr z19.d, p5/m, z19.d, z11.d 708b8021494Sopenharmony_ci // vl128 state = 0xd26e94f9 709b8021494Sopenharmony_ci __ dci(0x04c79d63); // uqshl z3.d, p7/m, z3.d, #43 710b8021494Sopenharmony_ci // vl128 state = 0x54801050 711b8021494Sopenharmony_ci __ dci(0x04c78c67); // uqshl z7.d, p3/m, z7.d, #35 712b8021494Sopenharmony_ci // vl128 state = 0xde9f357a 713b8021494Sopenharmony_ci __ dci(0x04878c43); // uqshl z3.d, p3/m, z3.d, #2 714b8021494Sopenharmony_ci // vl128 state = 0x59e5d53c 715b8021494Sopenharmony_ci __ dci(0x44878c0b); // urshlr z11.s, p3/m, z11.s, z0.s 716b8021494Sopenharmony_ci // vl128 state = 0x8cfa7532 717b8021494Sopenharmony_ci __ dci(0x44878c03); // urshlr z3.s, p3/m, z3.s, z0.s 718b8021494Sopenharmony_ci // vl128 state = 0xdb4e86b6 719b8021494Sopenharmony_ci __ dci(0x44878d42); // urshlr z2.s, p3/m, z2.s, z10.s 720b8021494Sopenharmony_ci // vl128 state = 0x07467a7c 721b8021494Sopenharmony_ci __ dci(0x44878d4a); // urshlr z10.s, p3/m, z10.s, z10.s 722b8021494Sopenharmony_ci // vl128 state = 0x6a4ad81c 723b8021494Sopenharmony_ci __ dci(0x44879948); // urshlr z8.s, p6/m, z8.s, z10.s 724b8021494Sopenharmony_ci // vl128 state = 0x91d7bdc0 725b8021494Sopenharmony_ci __ dci(0x44879949); // urshlr z9.s, p6/m, z9.s, z10.s 726b8021494Sopenharmony_ci // vl128 state = 0x2fe3b819 727b8021494Sopenharmony_ci __ dci(0x44879bcb); // urshlr z11.s, p6/m, z11.s, z30.s 728b8021494Sopenharmony_ci // vl128 state = 0x5c121b68 729b8021494Sopenharmony_ci __ dci(0x04879b4f); // uqshl z15.d, p6/m, z15.d, #26 730b8021494Sopenharmony_ci // vl128 state = 0xe678f4f7 731b8021494Sopenharmony_ci __ dci(0x44879bdf); // urshlr z31.s, p6/m, z31.s, z30.s 732b8021494Sopenharmony_ci // vl128 state = 0x6593da76 733b8021494Sopenharmony_ci __ dci(0x4487935e); // urshlr z30.s, p4/m, z30.s, z26.s 734b8021494Sopenharmony_ci // vl128 state = 0xb558ba57 735b8021494Sopenharmony_ci __ dci(0x440f9356); // uqrshlr z22.b, p4/m, z22.b, z26.b 736b8021494Sopenharmony_ci // vl128 state = 0x45d1775e 737b8021494Sopenharmony_ci __ dci(0x440f93f7); // uqrshlr z23.b, p4/m, z23.b, z31.b 738b8021494Sopenharmony_ci // vl128 state = 0x20974795 739b8021494Sopenharmony_ci __ dci(0x448793f5); // urshlr z21.s, p4/m, z21.s, z31.s 740b8021494Sopenharmony_ci // vl128 state = 0xeb0bc2ab 741b8021494Sopenharmony_ci __ dci(0x448383fd); // urshl z29.s, p0/m, z29.s, z31.s 742b8021494Sopenharmony_ci // vl128 state = 0x74557d81 743b8021494Sopenharmony_ci __ dci(0x448b82f9); // uqrshl z25.s, p0/m, z25.s, z23.s 744b8021494Sopenharmony_ci // vl128 state = 0x34518418 745b8021494Sopenharmony_ci __ dci(0x448f82b8); // uqrshlr z24.s, p0/m, z24.s, z21.s 746b8021494Sopenharmony_ci // vl128 state = 0x93e637f3 747b8021494Sopenharmony_ci __ dci(0x448f82bc); // uqrshlr z28.s, p0/m, z28.s, z21.s 748b8021494Sopenharmony_ci // vl128 state = 0x6e35e56a 749b8021494Sopenharmony_ci __ dci(0x448f83fe); // uqrshlr z30.s, p0/m, z30.s, z31.s 750b8021494Sopenharmony_ci // vl128 state = 0xf3c59bb1 751b8021494Sopenharmony_ci __ dci(0x448d83ae); // uqshlr z14.s, p0/m, z14.s, z29.s 752b8021494Sopenharmony_ci // vl128 state = 0x95b401a3 753b8021494Sopenharmony_ci __ dci(0x448d83aa); // uqshlr z10.s, p0/m, z10.s, z29.s 754b8021494Sopenharmony_ci // vl128 state = 0x56ec65b0 755b8021494Sopenharmony_ci __ dci(0x448993ae); // uqshl z14.s, p4/m, z14.s, z29.s 756b8021494Sopenharmony_ci // vl128 state = 0x28f6e4c6 757b8021494Sopenharmony_ci __ dci(0x448993a6); // uqshl z6.s, p4/m, z6.s, z29.s 758b8021494Sopenharmony_ci // vl128 state = 0x9ed5eaf3 759b8021494Sopenharmony_ci __ dci(0x44c991a4); // uqshl z4.d, p4/m, z4.d, z13.d 760b8021494Sopenharmony_ci // vl128 state = 0xa8512b00 761b8021494Sopenharmony_ci __ dci(0x44c991a5); // uqshl z5.d, p4/m, z5.d, z13.d 762b8021494Sopenharmony_ci // vl128 state = 0x49a10780 763b8021494Sopenharmony_ci __ dci(0x44c991a1); // uqshl z1.d, p4/m, z1.d, z13.d 764b8021494Sopenharmony_ci // vl128 state = 0x465a2cb4 765b8021494Sopenharmony_ci __ dci(0x444b91a0); // uqrshl z0.h, p4/m, z0.h, z13.h 766b8021494Sopenharmony_ci // vl128 state = 0x8f6dad8e 767b8021494Sopenharmony_ci __ dci(0x444b91a1); // uqrshl z1.h, p4/m, z1.h, z13.h 768b8021494Sopenharmony_ci // vl128 state = 0x50dec3f8 769b8021494Sopenharmony_ci __ dci(0x440391a3); // urshl z3.b, p4/m, z3.b, z13.b 770b8021494Sopenharmony_ci // vl128 state = 0xab2b5ad7 771b8021494Sopenharmony_ci __ dci(0x448393a7); // urshl z7.s, p4/m, z7.s, z29.s 772b8021494Sopenharmony_ci // vl128 state = 0x2ffd164f 773b8021494Sopenharmony_ci __ dci(0x448393af); // urshl z15.s, p4/m, z15.s, z29.s 774b8021494Sopenharmony_ci // vl128 state = 0x43a7959b 775b8021494Sopenharmony_ci __ dci(0x448393ab); // urshl z11.s, p4/m, z11.s, z29.s 776b8021494Sopenharmony_ci // vl128 state = 0xf9526723 777b8021494Sopenharmony_ci __ dci(0x448f93af); // uqrshlr z15.s, p4/m, z15.s, z29.s 778b8021494Sopenharmony_ci // vl128 state = 0xf9081b27 779b8021494Sopenharmony_ci __ dci(0x448f93ae); // uqrshlr z14.s, p4/m, z14.s, z29.s 780b8021494Sopenharmony_ci // vl128 state = 0x3a4f693e 781b8021494Sopenharmony_ci __ dci(0x048793aa); // uqshl z10.d, p4/m, z10.d, #29 782b8021494Sopenharmony_ci // vl128 state = 0xbba37d9a 783b8021494Sopenharmony_ci __ dci(0x04c79388); // uqshl z8.d, p4/m, z8.d, #60 784b8021494Sopenharmony_ci // vl128 state = 0x3b3f5fa4 785b8021494Sopenharmony_ci __ dci(0x04c79380); // uqshl z0.d, p4/m, z0.d, #60 786b8021494Sopenharmony_ci // vl128 state = 0xdac48ac2 787b8021494Sopenharmony_ci __ dci(0x04878390); // uqshl z16.d, p0/m, z16.d, #28 788b8021494Sopenharmony_ci // vl128 state = 0xe3c8148f 789b8021494Sopenharmony_ci __ dci(0x44878794); // urshlr z20.s, p1/m, z20.s, z28.s 790b8021494Sopenharmony_ci // vl128 state = 0xee2179ec 791b8021494Sopenharmony_ci __ dci(0x04878384); // uqshl z4.d, p0/m, z4.d, #28 792b8021494Sopenharmony_ci // vl128 state = 0xc6a3796c 793b8021494Sopenharmony_ci __ dci(0x048787ac); // uqshl z12.d, p1/m, z12.d, #29 794b8021494Sopenharmony_ci // vl128 state = 0x18e0fd43 795b8021494Sopenharmony_ci __ dci(0x04c786ae); // uqshl z14.d, p1/m, z14.d, #53 796b8021494Sopenharmony_ci // vl128 state = 0x9292503e 797b8021494Sopenharmony_ci __ dci(0x04c786be); // uqshl z30.d, p1/m, z30.d, #53 798b8021494Sopenharmony_ci // vl128 state = 0xc1ebe042 799b8021494Sopenharmony_ci __ dci(0x44c782b6); // urshlr z22.d, p0/m, z22.d, z21.d 800b8021494Sopenharmony_ci // vl128 state = 0x0badc025 801b8021494Sopenharmony_ci __ dci(0x44c78a3e); // urshlr z30.d, p2/m, z30.d, z17.d 802b8021494Sopenharmony_ci // vl128 state = 0x51b3b5ac 803b8021494Sopenharmony_ci __ dci(0x04c78b3a); // uqshl z26.d, p2/m, z26.d, #57 804b8021494Sopenharmony_ci // vl128 state = 0x334f52f8 805b8021494Sopenharmony_ci __ dci(0x04c78832); // uqshl z18.d, p2/m, z18.d, #33 806b8021494Sopenharmony_ci // vl128 state = 0xf95df0b7 807b8021494Sopenharmony_ci __ dci(0x44cf8833); // uqrshlr z19.d, p2/m, z19.d, z1.d 808b8021494Sopenharmony_ci // vl128 state = 0xda88a00a 809b8021494Sopenharmony_ci __ dci(0x44cf9811); // uqrshlr z17.d, p6/m, z17.d, z0.d 810b8021494Sopenharmony_ci // vl128 state = 0x1e642a4c 811b8021494Sopenharmony_ci __ dci(0x44cf9c41); // uqrshlr z1.d, p7/m, z1.d, z2.d 812b8021494Sopenharmony_ci // vl128 state = 0xeb7fe4bd 813b8021494Sopenharmony_ci __ dci(0x444f8c45); // uqrshlr z5.h, p3/m, z5.h, z2.h 814b8021494Sopenharmony_ci // vl128 state = 0x5a82d833 815b8021494Sopenharmony_ci __ dci(0x44cf844d); // uqrshlr z13.d, p1/m, z13.d, z2.d 816b8021494Sopenharmony_ci // vl128 state = 0x595d42a4 817b8021494Sopenharmony_ci __ dci(0x44c7841d); // urshlr z29.d, p1/m, z29.d, z0.d 818b8021494Sopenharmony_ci // vl128 state = 0x0b433688 819b8021494Sopenharmony_ci __ dci(0x44c7805f); // urshlr z31.d, p0/m, z31.d, z2.d 820b8021494Sopenharmony_ci // vl128 state = 0x14b8c29a 821b8021494Sopenharmony_ci __ dci(0x44cf807b); // uqrshlr z27.d, p0/m, z27.d, z3.d 822b8021494Sopenharmony_ci // vl128 state = 0x12a76015 823b8021494Sopenharmony_ci __ dci(0x44c780eb); // urshlr z11.d, p0/m, z11.d, z7.d 824b8021494Sopenharmony_ci // vl128 state = 0x73fa7d24 825b8021494Sopenharmony_ci __ dci(0x44c794e3); // urshlr z3.d, p5/m, z3.d, z7.d 826b8021494Sopenharmony_ci // vl128 state = 0x0a01c859 827b8021494Sopenharmony_ci __ dci(0x04c795eb); // uqshl z11.d, p5/m, z11.d, #47 828b8021494Sopenharmony_ci // vl128 state = 0x0e7024fd 829b8021494Sopenharmony_ci __ dci(0x04c795e9); // uqshl z9.d, p5/m, z9.d, #47 830b8021494Sopenharmony_ci // vl128 state = 0x9ca5cb63 831b8021494Sopenharmony_ci __ dci(0x04c795f9); // uqshl z25.d, p5/m, z25.d, #47 832b8021494Sopenharmony_ci // vl128 state = 0x4c60da07 833b8021494Sopenharmony_ci __ dci(0x04c795fb); // uqshl z27.d, p5/m, z27.d, #47 834b8021494Sopenharmony_ci // vl128 state = 0x71114c19 835b8021494Sopenharmony_ci __ dci(0x04c799f3); // uqshl z19.d, p6/m, z19.d, #47 836b8021494Sopenharmony_ci // vl128 state = 0x32d71e12 837b8021494Sopenharmony_ci __ dci(0x04c79997); // uqshl z23.d, p6/m, z23.d, #44 838b8021494Sopenharmony_ci // vl128 state = 0xab0c9051 839b8021494Sopenharmony_ci } 840b8021494Sopenharmony_ci 841b8021494Sopenharmony_ci uint32_t state; 842b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 843b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 844b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 845b8021494Sopenharmony_ci 846b8021494Sopenharmony_ci END(); 847b8021494Sopenharmony_ci if (CAN_RUN()) { 848b8021494Sopenharmony_ci RUN(); 849b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 850b8021494Sopenharmony_ci 0xab0c9051, 851b8021494Sopenharmony_ci 0xc2455013, 852b8021494Sopenharmony_ci 0x6e4b3f1e, 853b8021494Sopenharmony_ci 0x631ce7ed, 854b8021494Sopenharmony_ci 0x031e4f7f, 855b8021494Sopenharmony_ci 0xa2be23bd, 856b8021494Sopenharmony_ci 0x2f5f74b0, 857b8021494Sopenharmony_ci 0x9e60f1ea, 858b8021494Sopenharmony_ci 0xb1080595, 859b8021494Sopenharmony_ci 0x953020c9, 860b8021494Sopenharmony_ci 0x7a5bfffb, 861b8021494Sopenharmony_ci 0xf0a27817, 862b8021494Sopenharmony_ci 0x83904886, 863b8021494Sopenharmony_ci 0x04620572, 864b8021494Sopenharmony_ci 0xbcd5c8c9, 865b8021494Sopenharmony_ci 0x3d4abe12, 866b8021494Sopenharmony_ci }; 867b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 868b8021494Sopenharmony_ci } 869b8021494Sopenharmony_ci} 870b8021494Sopenharmony_ci 871b8021494Sopenharmony_ciTEST_SVE(sve2_signed_sat_round_shift) { 872b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 873b8021494Sopenharmony_ci CPUFeatures::kSVE2, 874b8021494Sopenharmony_ci CPUFeatures::kNEON, 875b8021494Sopenharmony_ci CPUFeatures::kCRC32); 876b8021494Sopenharmony_ci START(); 877b8021494Sopenharmony_ci 878b8021494Sopenharmony_ci SetInitialMachineState(&masm); 879b8021494Sopenharmony_ci // state = 0xe2bd2480 880b8021494Sopenharmony_ci 881b8021494Sopenharmony_ci { 882b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 100 * kInstructionSize); 883b8021494Sopenharmony_ci __ dci(0x048687c6); // sqshl z6.d, p1/m, z6.d, #30 884b8021494Sopenharmony_ci // vl128 state = 0xe81d8487 885b8021494Sopenharmony_ci __ dci(0x048687c4); // sqshl z4.d, p1/m, z4.d, #30 886b8021494Sopenharmony_ci // vl128 state = 0x47cc69b1 887b8021494Sopenharmony_ci __ dci(0x04868385); // sqshl z5.d, p0/m, z5.d, #28 888b8021494Sopenharmony_ci // vl128 state = 0xec4cab7b 889b8021494Sopenharmony_ci __ dci(0x0486838d); // sqshl z13.d, p0/m, z13.d, #28 890b8021494Sopenharmony_ci // vl128 state = 0x23b07ac8 891b8021494Sopenharmony_ci __ dci(0x048681a9); // sqshl z9.d, p0/m, z9.d, #13 892b8021494Sopenharmony_ci // vl128 state = 0xace4253d 893b8021494Sopenharmony_ci __ dci(0x04068139); // sqshl z25.b, p0/m, z25.b, #1 894b8021494Sopenharmony_ci // vl128 state = 0xf8f14a80 895b8021494Sopenharmony_ci __ dci(0x440681b8); // srshlr z24.b, p0/m, z24.b, z13.b 896b8021494Sopenharmony_ci // vl128 state = 0xa79d8fc1 897b8021494Sopenharmony_ci __ dci(0x4406803a); // srshlr z26.b, p0/m, z26.b, z1.b 898b8021494Sopenharmony_ci // vl128 state = 0xed9bb777 899b8021494Sopenharmony_ci __ dci(0x4406808a); // srshlr z10.b, p0/m, z10.b, z4.b 900b8021494Sopenharmony_ci // vl128 state = 0xbd1dfa2f 901b8021494Sopenharmony_ci __ dci(0x440688da); // srshlr z26.b, p2/m, z26.b, z6.b 902b8021494Sopenharmony_ci // vl128 state = 0x8f9b61e6 903b8021494Sopenharmony_ci __ dci(0x448680db); // srshlr z27.s, p0/m, z27.s, z6.s 904b8021494Sopenharmony_ci // vl128 state = 0x0a16f551 905b8021494Sopenharmony_ci __ dci(0x440684d3); // srshlr z19.b, p1/m, z19.b, z6.b 906b8021494Sopenharmony_ci // vl128 state = 0x0a764f12 907b8021494Sopenharmony_ci __ dci(0x448694c3); // srshlr z3.s, p5/m, z3.s, z6.s 908b8021494Sopenharmony_ci // vl128 state = 0x8d6f5613 909b8021494Sopenharmony_ci __ dci(0x448e9cc7); // sqrshlr z7.s, p7/m, z7.s, z6.s 910b8021494Sopenharmony_ci // vl128 state = 0xaf7b559b 911b8021494Sopenharmony_ci __ dci(0x448e9ef7); // sqrshlr z23.s, p7/m, z23.s, z23.s 912b8021494Sopenharmony_ci // vl128 state = 0x086d6430 913b8021494Sopenharmony_ci __ dci(0x448e9673); // sqrshlr z19.s, p5/m, z19.s, z19.s 914b8021494Sopenharmony_ci // vl128 state = 0x4a9a5736 915b8021494Sopenharmony_ci __ dci(0x448a8663); // sqrshl z3.s, p1/m, z3.s, z19.s 916b8021494Sopenharmony_ci // vl128 state = 0x19adf50e 917b8021494Sopenharmony_ci __ dci(0x440a8e6b); // sqrshl z11.b, p3/m, z11.b, z19.b 918b8021494Sopenharmony_ci // vl128 state = 0x4a01719c 919b8021494Sopenharmony_ci __ dci(0x44028eef); // srshl z15.b, p3/m, z15.b, z23.b 920b8021494Sopenharmony_ci // vl128 state = 0x1af6d72e 921b8021494Sopenharmony_ci __ dci(0x44028e8b); // srshl z11.b, p3/m, z11.b, z20.b 922b8021494Sopenharmony_ci // vl128 state = 0xeca2061d 923b8021494Sopenharmony_ci __ dci(0x44828f8f); // srshl z15.s, p3/m, z15.s, z28.s 924b8021494Sopenharmony_ci // vl128 state = 0x61059832 925b8021494Sopenharmony_ci __ dci(0x44828f87); // srshl z7.s, p3/m, z7.s, z28.s 926b8021494Sopenharmony_ci // vl128 state = 0x5e4d94cc 927b8021494Sopenharmony_ci __ dci(0x44828a97); // srshl z23.s, p2/m, z23.s, z20.s 928b8021494Sopenharmony_ci // vl128 state = 0xf5095aa8 929b8021494Sopenharmony_ci __ dci(0x44828a93); // srshl z19.s, p2/m, z19.s, z20.s 930b8021494Sopenharmony_ci // vl128 state = 0x155ff234 931b8021494Sopenharmony_ci __ dci(0x44868a11); // srshlr z17.s, p2/m, z17.s, z16.s 932b8021494Sopenharmony_ci // vl128 state = 0xf2844c7f 933b8021494Sopenharmony_ci __ dci(0x44c68a90); // srshlr z16.d, p2/m, z16.d, z20.d 934b8021494Sopenharmony_ci // vl128 state = 0xcf9f9508 935b8021494Sopenharmony_ci __ dci(0x44c68a80); // srshlr z0.d, p2/m, z0.d, z20.d 936b8021494Sopenharmony_ci // vl128 state = 0xd476915b 937b8021494Sopenharmony_ci __ dci(0x44868a02); // srshlr z2.s, p2/m, z2.s, z16.s 938b8021494Sopenharmony_ci // vl128 state = 0x9acbc986 939b8021494Sopenharmony_ci __ dci(0x44868a12); // srshlr z18.s, p2/m, z18.s, z16.s 940b8021494Sopenharmony_ci // vl128 state = 0xaf9e1114 941b8021494Sopenharmony_ci __ dci(0x4486921a); // srshlr z26.s, p4/m, z26.s, z16.s 942b8021494Sopenharmony_ci // vl128 state = 0x9d188add 943b8021494Sopenharmony_ci __ dci(0x4486909e); // srshlr z30.s, p4/m, z30.s, z4.s 944b8021494Sopenharmony_ci // vl128 state = 0xb41018d5 945b8021494Sopenharmony_ci __ dci(0x448c9096); // sqshlr z22.s, p4/m, z22.s, z4.s 946b8021494Sopenharmony_ci // vl128 state = 0x4ab51dea 947b8021494Sopenharmony_ci __ dci(0x448890b4); // sqshl z20.s, p4/m, z20.s, z5.s 948b8021494Sopenharmony_ci // vl128 state = 0x600dcc36 949b8021494Sopenharmony_ci __ dci(0x448884bc); // sqshl z28.s, p1/m, z28.s, z5.s 950b8021494Sopenharmony_ci // vl128 state = 0x84f37050 951b8021494Sopenharmony_ci __ dci(0x44c88434); // sqshl z20.d, p1/m, z20.d, z1.d 952b8021494Sopenharmony_ci // vl128 state = 0x1f19ce5a 953b8021494Sopenharmony_ci __ dci(0x44cc8536); // sqshlr z22.d, p1/m, z22.d, z9.d 954b8021494Sopenharmony_ci // vl128 state = 0xa51d3f31 955b8021494Sopenharmony_ci __ dci(0x448c8517); // sqshlr z23.s, p1/m, z23.s, z8.s 956b8021494Sopenharmony_ci // vl128 state = 0x8d431292 957b8021494Sopenharmony_ci __ dci(0x448c8133); // sqshlr z19.s, p0/m, z19.s, z9.s 958b8021494Sopenharmony_ci // vl128 state = 0xdd59917f 959b8021494Sopenharmony_ci __ dci(0x448c8b23); // sqshlr z3.s, p2/m, z3.s, z25.s 960b8021494Sopenharmony_ci // vl128 state = 0xfcdae7d4 961b8021494Sopenharmony_ci __ dci(0x448c8b21); // sqshlr z1.s, p2/m, z1.s, z25.s 962b8021494Sopenharmony_ci // vl128 state = 0x0f1239a5 963b8021494Sopenharmony_ci __ dci(0x448c8b29); // sqshlr z9.s, p2/m, z9.s, z25.s 964b8021494Sopenharmony_ci // vl128 state = 0xf6d1f180 965b8021494Sopenharmony_ci __ dci(0x448c8b2b); // sqshlr z11.s, p2/m, z11.s, z25.s 966b8021494Sopenharmony_ci // vl128 state = 0xe7a1af08 967b8021494Sopenharmony_ci __ dci(0x448c8b89); // sqshlr z9.s, p2/m, z9.s, z28.s 968b8021494Sopenharmony_ci // vl128 state = 0xa72666cb 969b8021494Sopenharmony_ci __ dci(0x448c9bcb); // sqshlr z11.s, p6/m, z11.s, z30.s 970b8021494Sopenharmony_ci // vl128 state = 0x9cae5fd7 971b8021494Sopenharmony_ci __ dci(0x44869bca); // srshlr z10.s, p6/m, z10.s, z30.s 972b8021494Sopenharmony_ci // vl128 state = 0xda133b76 973b8021494Sopenharmony_ci __ dci(0x04869b8e); // sqshl z14.d, p6/m, z14.d, #28 974b8021494Sopenharmony_ci // vl128 state = 0xf8eb71c2 975b8021494Sopenharmony_ci __ dci(0x44869bca); // srshlr z10.s, p6/m, z10.s, z30.s 976b8021494Sopenharmony_ci // vl128 state = 0xbe561563 977b8021494Sopenharmony_ci __ dci(0x44869ae2); // srshlr z2.s, p6/m, z2.s, z23.s 978b8021494Sopenharmony_ci // vl128 state = 0x0c286f7e 979b8021494Sopenharmony_ci __ dci(0x44869a46); // srshlr z6.s, p6/m, z6.s, z18.s 980b8021494Sopenharmony_ci // vl128 state = 0x59da6464 981b8021494Sopenharmony_ci __ dci(0x44869a47); // srshlr z7.s, p6/m, z7.s, z18.s 982b8021494Sopenharmony_ci // vl128 state = 0x908e5664 983b8021494Sopenharmony_ci __ dci(0x4486920f); // srshlr z15.s, p4/m, z15.s, z16.s 984b8021494Sopenharmony_ci // vl128 state = 0x213d23db 985b8021494Sopenharmony_ci __ dci(0x44869a87); // srshlr z7.s, p6/m, z7.s, z20.s 986b8021494Sopenharmony_ci // vl128 state = 0xd81ea7fb 987b8021494Sopenharmony_ci __ dci(0x44469a86); // srshlr z6.h, p6/m, z6.h, z20.h 988b8021494Sopenharmony_ci // vl128 state = 0x27d44726 989b8021494Sopenharmony_ci __ dci(0x44029a82); // srshl z2.b, p6/m, z2.b, z20.b 990b8021494Sopenharmony_ci // vl128 state = 0x2187127f 991b8021494Sopenharmony_ci __ dci(0x44069aa0); // srshlr z0.b, p6/m, z0.b, z21.b 992b8021494Sopenharmony_ci // vl128 state = 0x68ba9323 993b8021494Sopenharmony_ci __ dci(0x444692b0); // srshlr z16.h, p4/m, z16.h, z21.h 994b8021494Sopenharmony_ci // vl128 state = 0x148619ff 995b8021494Sopenharmony_ci __ dci(0x44468ab2); // srshlr z18.h, p2/m, z18.h, z21.h 996b8021494Sopenharmony_ci // vl128 state = 0xae93eae6 997b8021494Sopenharmony_ci __ dci(0x444698b6); // srshlr z22.h, p6/m, z22.h, z5.h 998b8021494Sopenharmony_ci // vl128 state = 0x0b875035 999b8021494Sopenharmony_ci __ dci(0x44469934); // srshlr z20.h, p6/m, z20.h, z9.h 1000b8021494Sopenharmony_ci // vl128 state = 0x559132ed 1001b8021494Sopenharmony_ci __ dci(0x0406993c); // sqshl z28.b, p6/m, z28.b, #1 1002b8021494Sopenharmony_ci // vl128 state = 0xec1782e4 1003b8021494Sopenharmony_ci __ dci(0x4406912c); // srshlr z12.b, p4/m, z12.b, z9.b 1004b8021494Sopenharmony_ci // vl128 state = 0x089d32a4 1005b8021494Sopenharmony_ci __ dci(0x440291ae); // srshl z14.b, p4/m, z14.b, z13.b 1006b8021494Sopenharmony_ci // vl128 state = 0xde257893 1007b8021494Sopenharmony_ci __ dci(0x44829126); // srshl z6.s, p4/m, z6.s, z9.s 1008b8021494Sopenharmony_ci // vl128 state = 0x318d27ef 1009b8021494Sopenharmony_ci __ dci(0x448a8127); // sqrshl z7.s, p0/m, z7.s, z9.s 1010b8021494Sopenharmony_ci // vl128 state = 0x1bc564fc 1011b8021494Sopenharmony_ci __ dci(0x448e8165); // sqrshlr z5.s, p0/m, z5.s, z11.s 1012b8021494Sopenharmony_ci // vl128 state = 0xa5e5c696 1013b8021494Sopenharmony_ci __ dci(0x44869161); // srshlr z1.s, p4/m, z1.s, z11.s 1014b8021494Sopenharmony_ci // vl128 state = 0xd64b6830 1015b8021494Sopenharmony_ci __ dci(0x44829120); // srshl z0.s, p4/m, z0.s, z9.s 1016b8021494Sopenharmony_ci // vl128 state = 0x107ca84d 1017b8021494Sopenharmony_ci __ dci(0x44829124); // srshl z4.s, p4/m, z4.s, z9.s 1018b8021494Sopenharmony_ci // vl128 state = 0xcd5688f3 1019b8021494Sopenharmony_ci __ dci(0x4482912c); // srshl z12.s, p4/m, z12.s, z9.s 1020b8021494Sopenharmony_ci // vl128 state = 0x88dee210 1021b8021494Sopenharmony_ci __ dci(0x44829128); // srshl z8.s, p4/m, z8.s, z9.s 1022b8021494Sopenharmony_ci // vl128 state = 0xfe8611fa 1023b8021494Sopenharmony_ci __ dci(0x44c69120); // srshlr z0.d, p4/m, z0.d, z9.d 1024b8021494Sopenharmony_ci // vl128 state = 0xe8b8cabd 1025b8021494Sopenharmony_ci __ dci(0x44ce9168); // sqrshlr z8.d, p4/m, z8.d, z11.d 1026b8021494Sopenharmony_ci // vl128 state = 0x269af804 1027b8021494Sopenharmony_ci __ dci(0x448e9069); // sqrshlr z9.s, p4/m, z9.s, z3.s 1028b8021494Sopenharmony_ci // vl128 state = 0x7d425704 1029b8021494Sopenharmony_ci __ dci(0x448e8461); // sqrshlr z1.s, p1/m, z1.s, z3.s 1030b8021494Sopenharmony_ci // vl128 state = 0x1577bd67 1031b8021494Sopenharmony_ci __ dci(0x448e8460); // sqrshlr z0.s, p1/m, z0.s, z3.s 1032b8021494Sopenharmony_ci // vl128 state = 0x6966617f 1033b8021494Sopenharmony_ci __ dci(0x448a8428); // sqrshl z8.s, p1/m, z8.s, z1.s 1034b8021494Sopenharmony_ci // vl128 state = 0x6c9cc508 1035b8021494Sopenharmony_ci __ dci(0x44ca8409); // sqrshl z9.d, p1/m, z9.d, z0.d 1036b8021494Sopenharmony_ci // vl128 state = 0xb3ea2e65 1037b8021494Sopenharmony_ci __ dci(0x44c68408); // srshlr z8.d, p1/m, z8.d, z0.d 1038b8021494Sopenharmony_ci // vl128 state = 0x1aef7620 1039b8021494Sopenharmony_ci __ dci(0x44c6840a); // srshlr z10.d, p1/m, z10.d, z0.d 1040b8021494Sopenharmony_ci // vl128 state = 0x63f2c5a3 1041b8021494Sopenharmony_ci __ dci(0x44cc840e); // sqshlr z14.d, p1/m, z14.d, z0.d 1042b8021494Sopenharmony_ci // vl128 state = 0xb54a8f94 1043b8021494Sopenharmony_ci __ dci(0x44cc8e1e); // sqshlr z30.d, p3/m, z30.d, z16.d 1044b8021494Sopenharmony_ci // vl128 state = 0xe247e0a3 1045b8021494Sopenharmony_ci __ dci(0x44c68e1a); // srshlr z26.d, p3/m, z26.d, z16.d 1046b8021494Sopenharmony_ci // vl128 state = 0xfb8bf060 1047b8021494Sopenharmony_ci __ dci(0x44c28a0a); // srshl z10.d, p2/m, z10.d, z16.d 1048b8021494Sopenharmony_ci // vl128 state = 0x829643e3 1049b8021494Sopenharmony_ci __ dci(0x44c68e0e); // srshlr z14.d, p3/m, z14.d, z16.d 1050b8021494Sopenharmony_ci // vl128 state = 0x8bd62d7b 1051b8021494Sopenharmony_ci __ dci(0x44c6881e); // srshlr z30.d, p2/m, z30.d, z0.d 1052b8021494Sopenharmony_ci // vl128 state = 0x4d8caca2 1053b8021494Sopenharmony_ci __ dci(0x44869816); // srshlr z22.s, p6/m, z22.s, z0.s 1054b8021494Sopenharmony_ci // vl128 state = 0x027f41ac 1055b8021494Sopenharmony_ci __ dci(0x44029817); // srshl z23.b, p6/m, z23.b, z0.b 1056b8021494Sopenharmony_ci // vl128 state = 0xab9c9627 1057b8021494Sopenharmony_ci __ dci(0x4402993f); // srshl z31.b, p6/m, z31.b, z9.b 1058b8021494Sopenharmony_ci // vl128 state = 0x42a71056 1059b8021494Sopenharmony_ci __ dci(0x4406991e); // srshlr z30.b, p6/m, z30.b, z8.b 1060b8021494Sopenharmony_ci // vl128 state = 0xdcdf1396 1061b8021494Sopenharmony_ci __ dci(0x44068d1f); // srshlr z31.b, p3/m, z31.b, z8.b 1062b8021494Sopenharmony_ci // vl128 state = 0x84fa5cac 1063b8021494Sopenharmony_ci __ dci(0x44068d1d); // srshlr z29.b, p3/m, z29.b, z8.b 1064b8021494Sopenharmony_ci // vl128 state = 0x1239cdae 1065b8021494Sopenharmony_ci __ dci(0x44468d2d); // srshlr z13.h, p3/m, z13.h, z9.h 1066b8021494Sopenharmony_ci // vl128 state = 0xae689b2f 1067b8021494Sopenharmony_ci __ dci(0x4446850f); // srshlr z15.h, p1/m, z15.h, z8.h 1068b8021494Sopenharmony_ci // vl128 state = 0x6330c9c2 1069b8021494Sopenharmony_ci __ dci(0x4446910e); // srshlr z14.h, p4/m, z14.h, z8.h 1070b8021494Sopenharmony_ci // vl128 state = 0x326ffb9f 1071b8021494Sopenharmony_ci __ dci(0x4446940f); // srshlr z15.h, p5/m, z15.h, z0.h 1072b8021494Sopenharmony_ci // vl128 state = 0x3f48f466 1073b8021494Sopenharmony_ci __ dci(0x44468487); // srshlr z7.h, p1/m, z7.h, z4.h 1074b8021494Sopenharmony_ci // vl128 state = 0x0d3b6c65 1075b8021494Sopenharmony_ci __ dci(0x444694b7); // srshlr z23.h, p5/m, z23.h, z5.h 1076b8021494Sopenharmony_ci // vl128 state = 0x5ef21cd8 1077b8021494Sopenharmony_ci __ dci(0x44469c93); // srshlr z19.h, p7/m, z19.h, z4.h 1078b8021494Sopenharmony_ci // vl128 state = 0x413d5573 1079b8021494Sopenharmony_ci __ dci(0x44069e92); // srshlr z18.b, p7/m, z18.b, z20.b 1080b8021494Sopenharmony_ci // vl128 state = 0xac59d0c3 1081b8021494Sopenharmony_ci __ dci(0x44469693); // srshlr z19.h, p5/m, z19.h, z20.h 1082b8021494Sopenharmony_ci // vl128 state = 0xb3969968 1083b8021494Sopenharmony_ci } 1084b8021494Sopenharmony_ci 1085b8021494Sopenharmony_ci uint32_t state; 1086b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 1087b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 1088b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 1089b8021494Sopenharmony_ci 1090b8021494Sopenharmony_ci END(); 1091b8021494Sopenharmony_ci if (CAN_RUN()) { 1092b8021494Sopenharmony_ci RUN(); 1093b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 1094b8021494Sopenharmony_ci 0xb3969968, 1095b8021494Sopenharmony_ci 0x8ba60941, 1096b8021494Sopenharmony_ci 0x53937d52, 1097b8021494Sopenharmony_ci 0xe6737b5d, 1098b8021494Sopenharmony_ci 0x8649cf1f, 1099b8021494Sopenharmony_ci 0xb7ee12ca, 1100b8021494Sopenharmony_ci 0x6fd03bd4, 1101b8021494Sopenharmony_ci 0x4a82eb52, 1102b8021494Sopenharmony_ci 0xc0d52997, 1103b8021494Sopenharmony_ci 0xb52a263f, 1104b8021494Sopenharmony_ci 0x70599fa2, 1105b8021494Sopenharmony_ci 0x68cd2ef1, 1106b8021494Sopenharmony_ci 0x57b84410, 1107b8021494Sopenharmony_ci 0x1072dde9, 1108b8021494Sopenharmony_ci 0xe39a23c8, 1109b8021494Sopenharmony_ci 0xeded9f88, 1110b8021494Sopenharmony_ci }; 1111b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 1112b8021494Sopenharmony_ci } 1113b8021494Sopenharmony_ci} 1114b8021494Sopenharmony_ci 1115b8021494Sopenharmony_ciTEST_SVE(sve2_usra) { 1116b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 1117b8021494Sopenharmony_ci CPUFeatures::kSVE2, 1118b8021494Sopenharmony_ci CPUFeatures::kNEON, 1119b8021494Sopenharmony_ci CPUFeatures::kCRC32); 1120b8021494Sopenharmony_ci START(); 1121b8021494Sopenharmony_ci 1122b8021494Sopenharmony_ci SetInitialMachineState(&masm); 1123b8021494Sopenharmony_ci // state = 0xe2bd2480 1124b8021494Sopenharmony_ci 1125b8021494Sopenharmony_ci { 1126b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 1127b8021494Sopenharmony_ci __ dci(0x450ce41d); // usra z29.b, z0.b, #4 1128b8021494Sopenharmony_ci // vl128 state = 0x57e84943 1129b8021494Sopenharmony_ci __ dci(0x450ce635); // usra z21.b, z17.b, #4 1130b8021494Sopenharmony_ci // vl128 state = 0xc2696a7c 1131b8021494Sopenharmony_ci __ dci(0x45cce637); // usra z23.d, z17.d, #20 1132b8021494Sopenharmony_ci // vl128 state = 0x97aec47c 1133b8021494Sopenharmony_ci __ dci(0x458cee35); // ursra z21.d, z17.d, #52 1134b8021494Sopenharmony_ci // vl128 state = 0xab24864c 1135b8021494Sopenharmony_ci __ dci(0x450eee25); // ursra z5.b, z17.b, #2 1136b8021494Sopenharmony_ci // vl128 state = 0x8aab49c9 1137b8021494Sopenharmony_ci __ dci(0x458eef21); // ursra z1.d, z25.d, #50 1138b8021494Sopenharmony_ci // vl128 state = 0x3db09e7f 1139b8021494Sopenharmony_ci __ dci(0x458fef65); // ursra z5.d, z27.d, #49 1140b8021494Sopenharmony_ci // vl128 state = 0xa9905ae3 1141b8021494Sopenharmony_ci __ dci(0x459fef41); // ursra z1.d, z26.d, #33 1142b8021494Sopenharmony_ci // vl128 state = 0x624c2e4d 1143b8021494Sopenharmony_ci __ dci(0x459fe549); // usra z9.d, z10.d, #33 1144b8021494Sopenharmony_ci // vl128 state = 0x5a158f70 1145b8021494Sopenharmony_ci __ dci(0x459de561); // usra z1.d, z11.d, #35 1146b8021494Sopenharmony_ci // vl128 state = 0xf24ffa83 1147b8021494Sopenharmony_ci __ dci(0x451ce565); // usra z5.h, z11.h, #4 1148b8021494Sopenharmony_ci // vl128 state = 0x0213f9c7 1149b8021494Sopenharmony_ci __ dci(0x4519e564); // usra z4.h, z11.h, #7 1150b8021494Sopenharmony_ci // vl128 state = 0x8903ccf3 1151b8021494Sopenharmony_ci __ dci(0x4589e56c); // usra z12.d, z11.d, #55 1152b8021494Sopenharmony_ci // vl128 state = 0x3c0f6e72 1153b8021494Sopenharmony_ci __ dci(0x4589e56e); // usra z14.d, z11.d, #55 1154b8021494Sopenharmony_ci // vl128 state = 0x5d9787fc 1155b8021494Sopenharmony_ci __ dci(0x4589e56c); // usra z12.d, z11.d, #55 1156b8021494Sopenharmony_ci // vl128 state = 0x3bc6fced 1157b8021494Sopenharmony_ci __ dci(0x458bed64); // ursra z4.d, z11.d, #53 1158b8021494Sopenharmony_ci // vl128 state = 0x966476e2 1159b8021494Sopenharmony_ci __ dci(0x45dbed65); // ursra z5.d, z11.d, #5 1160b8021494Sopenharmony_ci // vl128 state = 0xf85c4247 1161b8021494Sopenharmony_ci __ dci(0x455bedf5); // ursra z21.s, z15.s, #5 1162b8021494Sopenharmony_ci // vl128 state = 0xd342f9ae 1163b8021494Sopenharmony_ci __ dci(0x450bedfd); // ursra z29.b, z15.b, #5 1164b8021494Sopenharmony_ci // vl128 state = 0xc03cb476 1165b8021494Sopenharmony_ci __ dci(0x4549edf9); // ursra z25.s, z15.s, #23 1166b8021494Sopenharmony_ci // vl128 state = 0x5649b073 1167b8021494Sopenharmony_ci __ dci(0x4549ede9); // ursra z9.s, z15.s, #23 1168b8021494Sopenharmony_ci // vl128 state = 0xce5a7dbb 1169b8021494Sopenharmony_ci __ dci(0x4549ed59); // ursra z25.s, z10.s, #23 1170b8021494Sopenharmony_ci // vl128 state = 0x8c98ee08 1171b8021494Sopenharmony_ci __ dci(0x4549ed5d); // ursra z29.s, z10.s, #23 1172b8021494Sopenharmony_ci // vl128 state = 0xd991a574 1173b8021494Sopenharmony_ci __ dci(0x45cded59); // ursra z25.d, z10.d, #19 1174b8021494Sopenharmony_ci // vl128 state = 0xebc24746 1175b8021494Sopenharmony_ci __ dci(0x45d9ed58); // ursra z24.d, z10.d, #7 1176b8021494Sopenharmony_ci // vl128 state = 0x145d5970 1177b8021494Sopenharmony_ci __ dci(0x45d8ec50); // ursra z16.d, z2.d, #8 1178b8021494Sopenharmony_ci // vl128 state = 0x8f65850c 1179b8021494Sopenharmony_ci __ dci(0x45c8ec60); // ursra z0.d, z3.d, #24 1180b8021494Sopenharmony_ci // vl128 state = 0xe510a1b4 1181b8021494Sopenharmony_ci __ dci(0x45c0ed61); // ursra z1.d, z11.d, #32 1182b8021494Sopenharmony_ci // vl128 state = 0xfef468e1 1183b8021494Sopenharmony_ci __ dci(0x45c8ec65); // ursra z5.d, z3.d, #24 1184b8021494Sopenharmony_ci // vl128 state = 0xa6754589 1185b8021494Sopenharmony_ci __ dci(0x45c0e464); // usra z4.d, z3.d, #32 1186b8021494Sopenharmony_ci // vl128 state = 0x2b4cd23a 1187b8021494Sopenharmony_ci __ dci(0x45c0e4a5); // usra z5.d, z5.d, #32 1188b8021494Sopenharmony_ci // vl128 state = 0xfa58fea0 1189b8021494Sopenharmony_ci __ dci(0x45c0e4a1); // usra z1.d, z5.d, #32 1190b8021494Sopenharmony_ci // vl128 state = 0x015c4435 1191b8021494Sopenharmony_ci __ dci(0x45c0e4b1); // usra z17.d, z5.d, #32 1192b8021494Sopenharmony_ci // vl128 state = 0x67271050 1193b8021494Sopenharmony_ci __ dci(0x45c2ecb3); // ursra z19.d, z5.d, #30 1194b8021494Sopenharmony_ci // vl128 state = 0x1d3631c3 1195b8021494Sopenharmony_ci __ dci(0x45c0ece3); // ursra z3.d, z7.d, #32 1196b8021494Sopenharmony_ci // vl128 state = 0x646e0e43 1197b8021494Sopenharmony_ci __ dci(0x45caece7); // ursra z7.d, z7.d, #22 1198b8021494Sopenharmony_ci // vl128 state = 0x104bf393 1199b8021494Sopenharmony_ci __ dci(0x458aeee3); // ursra z3.d, z23.d, #54 1200b8021494Sopenharmony_ci // vl128 state = 0xbac8c54b 1201b8021494Sopenharmony_ci __ dci(0x454aeee1); // ursra z1.s, z23.s, #22 1202b8021494Sopenharmony_ci // vl128 state = 0x5c2a40db 1203b8021494Sopenharmony_ci __ dci(0x4508eee9); // ursra z9.b, z23.b, #8 1204b8021494Sopenharmony_ci // vl128 state = 0xe117d81a 1205b8021494Sopenharmony_ci __ dci(0x4518ece1); // ursra z1.h, z7.h, #8 1206b8021494Sopenharmony_ci // vl128 state = 0xeb43265d 1207b8021494Sopenharmony_ci __ dci(0x451cede0); // ursra z0.h, z15.h, #4 1208b8021494Sopenharmony_ci // vl128 state = 0xd5c8d09e 1209b8021494Sopenharmony_ci __ dci(0x4598edf0); // ursra z16.d, z15.d, #40 1210b8021494Sopenharmony_ci // vl128 state = 0x0c060220 1211b8021494Sopenharmony_ci __ dci(0x451cede0); // ursra z0.h, z15.h, #4 1212b8021494Sopenharmony_ci // vl128 state = 0x0ea52d2d 1213b8021494Sopenharmony_ci __ dci(0x459cefe8); // ursra z8.d, z31.d, #36 1214b8021494Sopenharmony_ci // vl128 state = 0xa6a7e977 1215b8021494Sopenharmony_ci __ dci(0x459ce5f8); // usra z24.d, z15.d, #36 1216b8021494Sopenharmony_ci // vl128 state = 0xb0192caf 1217b8021494Sopenharmony_ci __ dci(0x458cedfa); // ursra z26.d, z15.d, #52 1218b8021494Sopenharmony_ci // vl128 state = 0x154fce29 1219b8021494Sopenharmony_ci __ dci(0x458cedfe); // ursra z30.d, z15.d, #52 1220b8021494Sopenharmony_ci // vl128 state = 0x369cc3e1 1221b8021494Sopenharmony_ci __ dci(0x450cedb6); // ursra z22.b, z13.b, #4 1222b8021494Sopenharmony_ci // vl128 state = 0xf613cb4b 1223b8021494Sopenharmony_ci __ dci(0x450cedb4); // ursra z20.b, z13.b, #4 1224b8021494Sopenharmony_ci // vl128 state = 0xd075c8a9 1225b8021494Sopenharmony_ci __ dci(0x458eeda4); // ursra z4.d, z13.d, #50 1226b8021494Sopenharmony_ci // vl128 state = 0xc9366682 1227b8021494Sopenharmony_ci } 1228b8021494Sopenharmony_ci 1229b8021494Sopenharmony_ci uint32_t state; 1230b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 1231b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 1232b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 1233b8021494Sopenharmony_ci 1234b8021494Sopenharmony_ci END(); 1235b8021494Sopenharmony_ci if (CAN_RUN()) { 1236b8021494Sopenharmony_ci RUN(); 1237b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 1238b8021494Sopenharmony_ci 0xc9366682, 1239b8021494Sopenharmony_ci 0xaf202cff, 1240b8021494Sopenharmony_ci 0x0e90a7c4, 1241b8021494Sopenharmony_ci 0xa8c89f40, 1242b8021494Sopenharmony_ci 0xc7bb56ad, 1243b8021494Sopenharmony_ci 0xa203dd34, 1244b8021494Sopenharmony_ci 0xf3b3a749, 1245b8021494Sopenharmony_ci 0xf16c9d5f, 1246b8021494Sopenharmony_ci 0x9929dea8, 1247b8021494Sopenharmony_ci 0xd652c693, 1248b8021494Sopenharmony_ci 0xe76f701b, 1249b8021494Sopenharmony_ci 0xe2fe20a3, 1250b8021494Sopenharmony_ci 0x07182afb, 1251b8021494Sopenharmony_ci 0x816b928f, 1252b8021494Sopenharmony_ci 0x52baf33f, 1253b8021494Sopenharmony_ci 0x9ef46875, 1254b8021494Sopenharmony_ci }; 1255b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 1256b8021494Sopenharmony_ci } 1257b8021494Sopenharmony_ci} 1258b8021494Sopenharmony_ci 1259b8021494Sopenharmony_ciTEST_SVE(sve2_ssra) { 1260b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 1261b8021494Sopenharmony_ci CPUFeatures::kSVE2, 1262b8021494Sopenharmony_ci CPUFeatures::kNEON, 1263b8021494Sopenharmony_ci CPUFeatures::kCRC32); 1264b8021494Sopenharmony_ci START(); 1265b8021494Sopenharmony_ci 1266b8021494Sopenharmony_ci SetInitialMachineState(&masm); 1267b8021494Sopenharmony_ci // state = 0xe2bd2480 1268b8021494Sopenharmony_ci 1269b8021494Sopenharmony_ci { 1270b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 1271b8021494Sopenharmony_ci __ dci(0x450ce01d); // ssra z29.b, z0.b, #4 1272b8021494Sopenharmony_ci // vl128 state = 0xdf461c2b 1273b8021494Sopenharmony_ci __ dci(0x450ce235); // ssra z21.b, z17.b, #4 1274b8021494Sopenharmony_ci // vl128 state = 0xd28868a9 1275b8021494Sopenharmony_ci __ dci(0x45cce237); // ssra z23.d, z17.d, #20 1276b8021494Sopenharmony_ci // vl128 state = 0x874fc6a9 1277b8021494Sopenharmony_ci __ dci(0x458cea35); // srsra z21.d, z17.d, #52 1278b8021494Sopenharmony_ci // vl128 state = 0xb848785b 1279b8021494Sopenharmony_ci __ dci(0x450eea25); // srsra z5.b, z17.b, #2 1280b8021494Sopenharmony_ci // vl128 state = 0x8bca62e4 1281b8021494Sopenharmony_ci __ dci(0x458eeb21); // srsra z1.d, z25.d, #50 1282b8021494Sopenharmony_ci // vl128 state = 0x3cd1b552 1283b8021494Sopenharmony_ci __ dci(0x458feb65); // srsra z5.d, z27.d, #49 1284b8021494Sopenharmony_ci // vl128 state = 0xd78844fb 1285b8021494Sopenharmony_ci __ dci(0x459feb41); // srsra z1.d, z26.d, #33 1286b8021494Sopenharmony_ci // vl128 state = 0xa948dc2f 1287b8021494Sopenharmony_ci __ dci(0x459fe149); // ssra z9.d, z10.d, #33 1288b8021494Sopenharmony_ci // vl128 state = 0x709a83f1 1289b8021494Sopenharmony_ci __ dci(0x459de161); // ssra z1.d, z11.d, #35 1290b8021494Sopenharmony_ci // vl128 state = 0x1c21e4f6 1291b8021494Sopenharmony_ci __ dci(0x451ce165); // ssra z5.h, z11.h, #4 1292b8021494Sopenharmony_ci // vl128 state = 0x72288f41 1293b8021494Sopenharmony_ci __ dci(0x4519e164); // ssra z4.h, z11.h, #7 1294b8021494Sopenharmony_ci // vl128 state = 0x9a8c4c8c 1295b8021494Sopenharmony_ci __ dci(0x4589e16c); // ssra z12.d, z11.d, #55 1296b8021494Sopenharmony_ci // vl128 state = 0x872585d4 1297b8021494Sopenharmony_ci __ dci(0x4589e16e); // ssra z14.d, z11.d, #55 1298b8021494Sopenharmony_ci // vl128 state = 0xd237aaa0 1299b8021494Sopenharmony_ci __ dci(0x4589e16c); // ssra z12.d, z11.d, #55 1300b8021494Sopenharmony_ci // vl128 state = 0x1c828333 1301b8021494Sopenharmony_ci __ dci(0x458be964); // srsra z4.d, z11.d, #53 1302b8021494Sopenharmony_ci // vl128 state = 0xc190178f 1303b8021494Sopenharmony_ci __ dci(0x45dbe965); // srsra z5.d, z11.d, #5 1304b8021494Sopenharmony_ci // vl128 state = 0xe9e81bda 1305b8021494Sopenharmony_ci __ dci(0x455be9f5); // srsra z21.s, z15.s, #5 1306b8021494Sopenharmony_ci // vl128 state = 0x8e58c7a1 1307b8021494Sopenharmony_ci __ dci(0x450be9fd); // srsra z29.b, z15.b, #5 1308b8021494Sopenharmony_ci // vl128 state = 0x904b404b 1309b8021494Sopenharmony_ci __ dci(0x4549e9f9); // srsra z25.s, z15.s, #23 1310b8021494Sopenharmony_ci // vl128 state = 0x35a60481 1311b8021494Sopenharmony_ci __ dci(0x4549e9e9); // srsra z9.s, z15.s, #23 1312b8021494Sopenharmony_ci // vl128 state = 0x6911448b 1313b8021494Sopenharmony_ci __ dci(0x4549e959); // srsra z25.s, z10.s, #23 1314b8021494Sopenharmony_ci // vl128 state = 0xdb384324 1315b8021494Sopenharmony_ci __ dci(0x4549e95d); // srsra z29.s, z10.s, #23 1316b8021494Sopenharmony_ci // vl128 state = 0x16acd8ee 1317b8021494Sopenharmony_ci __ dci(0x45cde959); // srsra z25.d, z10.d, #19 1318b8021494Sopenharmony_ci // vl128 state = 0x56bf7bda 1319b8021494Sopenharmony_ci __ dci(0x45d9e958); // srsra z24.d, z10.d, #7 1320b8021494Sopenharmony_ci // vl128 state = 0x6a713fa6 1321b8021494Sopenharmony_ci __ dci(0x45d8e850); // srsra z16.d, z2.d, #8 1322b8021494Sopenharmony_ci // vl128 state = 0xa6394cf3 1323b8021494Sopenharmony_ci __ dci(0x45c8e860); // srsra z0.d, z3.d, #24 1324b8021494Sopenharmony_ci // vl128 state = 0x829c3d2a 1325b8021494Sopenharmony_ci __ dci(0x45c0e961); // srsra z1.d, z11.d, #32 1326b8021494Sopenharmony_ci // vl128 state = 0x006d1904 1327b8021494Sopenharmony_ci __ dci(0x45c8e865); // srsra z5.d, z3.d, #24 1328b8021494Sopenharmony_ci // vl128 state = 0xcc7dffaf 1329b8021494Sopenharmony_ci __ dci(0x45c0e064); // ssra z4.d, z3.d, #32 1330b8021494Sopenharmony_ci // vl128 state = 0xc9eaddd0 1331b8021494Sopenharmony_ci __ dci(0x45c0e0a5); // ssra z5.d, z5.d, #32 1332b8021494Sopenharmony_ci // vl128 state = 0x643145e1 1333b8021494Sopenharmony_ci __ dci(0x45c0e0a1); // ssra z1.d, z5.d, #32 1334b8021494Sopenharmony_ci // vl128 state = 0x03f4c42e 1335b8021494Sopenharmony_ci __ dci(0x45c0e0b1); // ssra z17.d, z5.d, #32 1336b8021494Sopenharmony_ci // vl128 state = 0x5a8cff35 1337b8021494Sopenharmony_ci __ dci(0x45c2e8b3); // srsra z19.d, z5.d, #30 1338b8021494Sopenharmony_ci // vl128 state = 0x3ee63e9f 1339b8021494Sopenharmony_ci __ dci(0x45c0e8e3); // srsra z3.d, z7.d, #32 1340b8021494Sopenharmony_ci // vl128 state = 0x687d943b 1341b8021494Sopenharmony_ci __ dci(0x45cae8e7); // srsra z7.d, z7.d, #22 1342b8021494Sopenharmony_ci // vl128 state = 0xf5a19cb2 1343b8021494Sopenharmony_ci __ dci(0x458aeae3); // srsra z3.d, z23.d, #54 1344b8021494Sopenharmony_ci // vl128 state = 0xd1371248 1345b8021494Sopenharmony_ci __ dci(0x454aeae1); // srsra z1.s, z23.s, #22 1346b8021494Sopenharmony_ci // vl128 state = 0xdb83ef8b 1347b8021494Sopenharmony_ci __ dci(0x455ae8e9); // srsra z9.s, z7.s, #6 1348b8021494Sopenharmony_ci // vl128 state = 0xc831a54c 1349b8021494Sopenharmony_ci __ dci(0x455ee9e8); // srsra z8.s, z15.s, #2 1350b8021494Sopenharmony_ci // vl128 state = 0x4342b823 1351b8021494Sopenharmony_ci __ dci(0x45dae9f8); // srsra z24.d, z15.d, #6 1352b8021494Sopenharmony_ci // vl128 state = 0x52a7151a 1353b8021494Sopenharmony_ci __ dci(0x455ee9e8); // srsra z8.s, z15.s, #2 1354b8021494Sopenharmony_ci // vl128 state = 0xde8110e0 1355b8021494Sopenharmony_ci __ dci(0x45deebe0); // srsra z0.d, z31.d, #2 1356b8021494Sopenharmony_ci // vl128 state = 0xd2b28e81 1357b8021494Sopenharmony_ci __ dci(0x45dee1f0); // ssra z16.d, z15.d, #2 1358b8021494Sopenharmony_ci // vl128 state = 0x56d1c366 1359b8021494Sopenharmony_ci __ dci(0x45cee9f2); // srsra z18.d, z15.d, #18 1360b8021494Sopenharmony_ci // vl128 state = 0x53537689 1361b8021494Sopenharmony_ci __ dci(0x45cee9f6); // srsra z22.d, z15.d, #18 1362b8021494Sopenharmony_ci // vl128 state = 0x5e410508 1363b8021494Sopenharmony_ci __ dci(0x454ee9be); // srsra z30.s, z13.s, #18 1364b8021494Sopenharmony_ci // vl128 state = 0x06245094 1365b8021494Sopenharmony_ci __ dci(0x454ee9bc); // srsra z28.s, z13.s, #18 1366b8021494Sopenharmony_ci // vl128 state = 0xb92b3929 1367b8021494Sopenharmony_ci __ dci(0x45cce9ac); // srsra z12.d, z13.d, #20 1368b8021494Sopenharmony_ci // vl128 state = 0xfe6a2830 1369b8021494Sopenharmony_ci __ dci(0x45cde93c); // srsra z28.d, z9.d, #19 1370b8021494Sopenharmony_ci // vl128 state = 0x737461a1 1371b8021494Sopenharmony_ci } 1372b8021494Sopenharmony_ci 1373b8021494Sopenharmony_ci uint32_t state; 1374b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 1375b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 1376b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 1377b8021494Sopenharmony_ci 1378b8021494Sopenharmony_ci END(); 1379b8021494Sopenharmony_ci if (CAN_RUN()) { 1380b8021494Sopenharmony_ci RUN(); 1381b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 1382b8021494Sopenharmony_ci 0x737461a1, 1383b8021494Sopenharmony_ci 0xe1ef707c, 1384b8021494Sopenharmony_ci 0x9760ba4e, 1385b8021494Sopenharmony_ci 0x782dd4cd, 1386b8021494Sopenharmony_ci 0xe793d0c2, 1387b8021494Sopenharmony_ci 0x991e0de7, 1388b8021494Sopenharmony_ci 0x34627e21, 1389b8021494Sopenharmony_ci 0x76c89433, 1390b8021494Sopenharmony_ci 0x96c9f4ce, 1391b8021494Sopenharmony_ci 0x38ec4b6f, 1392b8021494Sopenharmony_ci 0x7aee3ec7, 1393b8021494Sopenharmony_ci 0x665f9b94, 1394b8021494Sopenharmony_ci 0x8e166fc3, 1395b8021494Sopenharmony_ci 0xb4461fac, 1396b8021494Sopenharmony_ci 0x215de9dc, 1397b8021494Sopenharmony_ci 0xc23ef1f9, 1398b8021494Sopenharmony_ci }; 1399b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 1400b8021494Sopenharmony_ci } 1401b8021494Sopenharmony_ci} 1402b8021494Sopenharmony_ci 1403b8021494Sopenharmony_ciTEST_SVE(sve2_sat_arith) { 1404b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 1405b8021494Sopenharmony_ci CPUFeatures::kSVE2, 1406b8021494Sopenharmony_ci CPUFeatures::kNEON, 1407b8021494Sopenharmony_ci CPUFeatures::kCRC32); 1408b8021494Sopenharmony_ci START(); 1409b8021494Sopenharmony_ci 1410b8021494Sopenharmony_ci SetInitialMachineState(&masm); 1411b8021494Sopenharmony_ci // state = 0xe2bd2480 1412b8021494Sopenharmony_ci 1413b8021494Sopenharmony_ci { 1414b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 1415b8021494Sopenharmony_ci __ dci(0x44df9df9); // uqsubr z25.d, p7/m, z25.d, z15.d 1416b8021494Sopenharmony_ci // vl128 state = 0x7670ac87 1417b8021494Sopenharmony_ci __ dci(0x445f9db1); // uqsubr z17.h, p7/m, z17.h, z13.h 1418b8021494Sopenharmony_ci // vl128 state = 0x3c5b39fe 1419b8021494Sopenharmony_ci __ dci(0x441f99a1); // uqsubr z1.b, p6/m, z1.b, z13.b 1420b8021494Sopenharmony_ci // vl128 state = 0x5df43635 1421b8021494Sopenharmony_ci __ dci(0x441d9ba0); // usqadd z0.b, p6/m, z0.b, z29.b 1422b8021494Sopenharmony_ci // vl128 state = 0x737bc7a5 1423b8021494Sopenharmony_ci __ dci(0x441d9ba8); // usqadd z8.b, p6/m, z8.b, z29.b 1424b8021494Sopenharmony_ci // vl128 state = 0xba69890b 1425b8021494Sopenharmony_ci __ dci(0x441d9bb8); // usqadd z24.b, p6/m, z24.b, z29.b 1426b8021494Sopenharmony_ci // vl128 state = 0x3f81c19d 1427b8021494Sopenharmony_ci __ dci(0x441d8b30); // usqadd z16.b, p2/m, z16.b, z25.b 1428b8021494Sopenharmony_ci // vl128 state = 0x076c5fc1 1429b8021494Sopenharmony_ci __ dci(0x441d8a14); // usqadd z20.b, p2/m, z20.b, z16.b 1430b8021494Sopenharmony_ci // vl128 state = 0x67df29dd 1431b8021494Sopenharmony_ci __ dci(0x449d8215); // usqadd z21.s, p0/m, z21.s, z16.s 1432b8021494Sopenharmony_ci // vl128 state = 0x663b236f 1433b8021494Sopenharmony_ci __ dci(0x449d8205); // usqadd z5.s, p0/m, z5.s, z16.s 1434b8021494Sopenharmony_ci // vl128 state = 0xe58d41d0 1435b8021494Sopenharmony_ci __ dci(0x449d8201); // usqadd z1.s, p0/m, z1.s, z16.s 1436b8021494Sopenharmony_ci // vl128 state = 0x82f89d40 1437b8021494Sopenharmony_ci __ dci(0x449c8a09); // suqadd z9.s, p2/m, z9.s, z16.s 1438b8021494Sopenharmony_ci // vl128 state = 0xa0218390 1439b8021494Sopenharmony_ci __ dci(0x44dd8a0d); // usqadd z13.d, p2/m, z13.d, z16.d 1440b8021494Sopenharmony_ci // vl128 state = 0xfab22f04 1441b8021494Sopenharmony_ci __ dci(0x44d98a2c); // uqadd z12.d, p2/m, z12.d, z17.d 1442b8021494Sopenharmony_ci // vl128 state = 0x70911fc9 1443b8021494Sopenharmony_ci __ dci(0x44598a0d); // uqadd z13.h, p2/m, z13.h, z16.h 1444b8021494Sopenharmony_ci // vl128 state = 0xcc12ec49 1445b8021494Sopenharmony_ci __ dci(0x44d99a05); // uqadd z5.d, p6/m, z5.d, z16.d 1446b8021494Sopenharmony_ci // vl128 state = 0x31fef46f 1447b8021494Sopenharmony_ci __ dci(0x44d99004); // uqadd z4.d, p4/m, z4.d, z0.d 1448b8021494Sopenharmony_ci // vl128 state = 0xf81448db 1449b8021494Sopenharmony_ci __ dci(0x44d98020); // uqadd z0.d, p0/m, z0.d, z1.d 1450b8021494Sopenharmony_ci // vl128 state = 0xe6fe9d31 1451b8021494Sopenharmony_ci __ dci(0x44d980e1); // uqadd z1.d, p0/m, z1.d, z7.d 1452b8021494Sopenharmony_ci // vl128 state = 0x76fecfc2 1453b8021494Sopenharmony_ci __ dci(0x44d981c0); // uqadd z0.d, p0/m, z0.d, z14.d 1454b8021494Sopenharmony_ci // vl128 state = 0x4066a558 1455b8021494Sopenharmony_ci __ dci(0x44d98161); // uqadd z1.d, p0/m, z1.d, z11.d 1456b8021494Sopenharmony_ci // vl128 state = 0x0d3a1487 1457b8021494Sopenharmony_ci __ dci(0x44d98031); // uqadd z17.d, p0/m, z17.d, z1.d 1458b8021494Sopenharmony_ci // vl128 state = 0x061b4aed 1459b8021494Sopenharmony_ci __ dci(0x44d98039); // uqadd z25.d, p0/m, z25.d, z1.d 1460b8021494Sopenharmony_ci // vl128 state = 0x02172a17 1461b8021494Sopenharmony_ci __ dci(0x44d98029); // uqadd z9.d, p0/m, z9.d, z1.d 1462b8021494Sopenharmony_ci // vl128 state = 0xebe138b3 1463b8021494Sopenharmony_ci __ dci(0x44d8800d); // sqadd z13.d, p0/m, z13.d, z0.d 1464b8021494Sopenharmony_ci // vl128 state = 0x73f0114b 1465b8021494Sopenharmony_ci __ dci(0x44d8828f); // sqadd z15.d, p0/m, z15.d, z20.d 1466b8021494Sopenharmony_ci // vl128 state = 0x7a8689e0 1467b8021494Sopenharmony_ci __ dci(0x44d8829f); // sqadd z31.d, p0/m, z31.d, z20.d 1468b8021494Sopenharmony_ci // vl128 state = 0x0800ae49 1469b8021494Sopenharmony_ci __ dci(0x44d88e8f); // sqadd z15.d, p3/m, z15.d, z20.d 1470b8021494Sopenharmony_ci // vl128 state = 0x9b733fff 1471b8021494Sopenharmony_ci __ dci(0x44d88e8b); // sqadd z11.d, p3/m, z11.d, z20.d 1472b8021494Sopenharmony_ci // vl128 state = 0x6d01eb90 1473b8021494Sopenharmony_ci __ dci(0x44d88e8f); // sqadd z15.d, p3/m, z15.d, z20.d 1474b8021494Sopenharmony_ci // vl128 state = 0x337692b3 1475b8021494Sopenharmony_ci __ dci(0x44d8968e); // sqadd z14.d, p5/m, z14.d, z20.d 1476b8021494Sopenharmony_ci // vl128 state = 0xcd4478b6 1477b8021494Sopenharmony_ci __ dci(0x44d886ca); // sqadd z10.d, p1/m, z10.d, z22.d 1478b8021494Sopenharmony_ci // vl128 state = 0x335fd099 1479b8021494Sopenharmony_ci __ dci(0x44dc87ce); // suqadd z14.d, p1/m, z14.d, z30.d 1480b8021494Sopenharmony_ci // vl128 state = 0x0d3b6403 1481b8021494Sopenharmony_ci __ dci(0x44de8fcf); // sqsubr z15.d, p3/m, z15.d, z30.d 1482b8021494Sopenharmony_ci // vl128 state = 0x41a1073f 1483b8021494Sopenharmony_ci __ dci(0x449e9fcd); // sqsubr z13.s, p7/m, z13.s, z30.s 1484b8021494Sopenharmony_ci // vl128 state = 0x5a4b1c22 1485b8021494Sopenharmony_ci __ dci(0x445e9fcf); // sqsubr z15.h, p7/m, z15.h, z30.h 1486b8021494Sopenharmony_ci // vl128 state = 0x5a08ccf1 1487b8021494Sopenharmony_ci __ dci(0x441e9ece); // sqsubr z14.b, p7/m, z14.b, z22.b 1488b8021494Sopenharmony_ci // vl128 state = 0x3f3c700c 1489b8021494Sopenharmony_ci __ dci(0x441e8cde); // sqsubr z30.b, p3/m, z30.b, z6.b 1490b8021494Sopenharmony_ci // vl128 state = 0x3b32b296 1491b8021494Sopenharmony_ci __ dci(0x441e88fa); // sqsubr z26.b, p2/m, z26.b, z7.b 1492b8021494Sopenharmony_ci // vl128 state = 0x7a6472e3 1493b8021494Sopenharmony_ci __ dci(0x441f98f8); // uqsubr z24.b, p6/m, z24.b, z7.b 1494b8021494Sopenharmony_ci // vl128 state = 0x1d72f5ea 1495b8021494Sopenharmony_ci __ dci(0x441f98fc); // uqsubr z28.b, p6/m, z28.b, z7.b 1496b8021494Sopenharmony_ci // vl128 state = 0x0245804b 1497b8021494Sopenharmony_ci __ dci(0x441b9afe); // uqsub z30.b, p6/m, z30.b, z23.b 1498b8021494Sopenharmony_ci // vl128 state = 0x8c7ac3d7 1499b8021494Sopenharmony_ci __ dci(0x441b9afc); // uqsub z28.b, p6/m, z28.b, z23.b 1500b8021494Sopenharmony_ci // vl128 state = 0xa96d65cb 1501b8021494Sopenharmony_ci __ dci(0x449b9a74); // uqsub z20.s, p6/m, z20.s, z19.s 1502b8021494Sopenharmony_ci // vl128 state = 0x261eb58f 1503b8021494Sopenharmony_ci __ dci(0x449a9b75); // sqsub z21.s, p6/m, z21.s, z27.s 1504b8021494Sopenharmony_ci // vl128 state = 0x3464e3e5 1505b8021494Sopenharmony_ci __ dci(0x449a9b7d); // sqsub z29.s, p6/m, z29.s, z27.s 1506b8021494Sopenharmony_ci // vl128 state = 0xfe3ab427 1507b8021494Sopenharmony_ci __ dci(0x445a9b79); // sqsub z25.h, p6/m, z25.h, z27.h 1508b8021494Sopenharmony_ci // vl128 state = 0x609eef3a 1509b8021494Sopenharmony_ci __ dci(0x445a9b7d); // sqsub z29.h, p6/m, z29.h, z27.h 1510b8021494Sopenharmony_ci // vl128 state = 0x0e6d6940 1511b8021494Sopenharmony_ci __ dci(0x445e9b5f); // sqsubr z31.h, p6/m, z31.h, z26.h 1512b8021494Sopenharmony_ci // vl128 state = 0x60a375e7 1513b8021494Sopenharmony_ci __ dci(0x441e8b5b); // sqsubr z27.b, p2/m, z27.b, z26.b 1514b8021494Sopenharmony_ci // vl128 state = 0xea9bd16f 1515b8021494Sopenharmony_ci } 1516b8021494Sopenharmony_ci 1517b8021494Sopenharmony_ci uint32_t state; 1518b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 1519b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 1520b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 1521b8021494Sopenharmony_ci 1522b8021494Sopenharmony_ci END(); 1523b8021494Sopenharmony_ci if (CAN_RUN()) { 1524b8021494Sopenharmony_ci RUN(); 1525b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 1526b8021494Sopenharmony_ci 0xea9bd16f, 1527b8021494Sopenharmony_ci 0x1296119e, 1528b8021494Sopenharmony_ci 0x00aaf6dc, 1529b8021494Sopenharmony_ci 0xb6ce0579, 1530b8021494Sopenharmony_ci 0xdb3d0829, 1531b8021494Sopenharmony_ci 0x119f52d0, 1532b8021494Sopenharmony_ci 0xf697dcd8, 1533b8021494Sopenharmony_ci 0x2c46a66c, 1534b8021494Sopenharmony_ci 0x7d838497, 1535b8021494Sopenharmony_ci 0x6cd68fb3, 1536b8021494Sopenharmony_ci 0xf98a5c79, 1537b8021494Sopenharmony_ci 0x51685054, 1538b8021494Sopenharmony_ci 0xa9494104, 1539b8021494Sopenharmony_ci 0x8d012936, 1540b8021494Sopenharmony_ci 0x32726258, 1541b8021494Sopenharmony_ci 0x091f1956, 1542b8021494Sopenharmony_ci }; 1543b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 1544b8021494Sopenharmony_ci } 1545b8021494Sopenharmony_ci} 1546b8021494Sopenharmony_ci 1547b8021494Sopenharmony_ciTEST_SVE(sve2_pair_arith) { 1548b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 1549b8021494Sopenharmony_ci CPUFeatures::kSVE2, 1550b8021494Sopenharmony_ci CPUFeatures::kNEON, 1551b8021494Sopenharmony_ci CPUFeatures::kCRC32); 1552b8021494Sopenharmony_ci START(); 1553b8021494Sopenharmony_ci 1554b8021494Sopenharmony_ci SetInitialMachineState(&masm); 1555b8021494Sopenharmony_ci // state = 0xe2bd2480 1556b8021494Sopenharmony_ci 1557b8021494Sopenharmony_ci { 1558b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 64 * kInstructionSize); 1559b8021494Sopenharmony_ci __ dci(0x4414b214); // smaxp z20.b, p4/m, z20.b, z16.b 1560b8021494Sopenharmony_ci // vl128 state = 0x90adc6c9 1561b8021494Sopenharmony_ci __ dci(0x4414ba5c); // smaxp z28.b, p6/m, z28.b, z18.b 1562b8021494Sopenharmony_ci // vl128 state = 0x0e41b2b9 1563b8021494Sopenharmony_ci __ dci(0x4454ba0c); // smaxp z12.h, p6/m, z12.h, z16.h 1564b8021494Sopenharmony_ci // vl128 state = 0x472160b8 1565b8021494Sopenharmony_ci __ dci(0x4454ba64); // smaxp z4.h, p6/m, z4.h, z19.h 1566b8021494Sopenharmony_ci // vl128 state = 0x4f485ba3 1567b8021494Sopenharmony_ci __ dci(0x44d4bb65); // smaxp z5.d, p6/m, z5.d, z27.d 1568b8021494Sopenharmony_ci // vl128 state = 0x432f5185 1569b8021494Sopenharmony_ci __ dci(0x4456bb64); // sminp z4.h, p6/m, z4.h, z27.h 1570b8021494Sopenharmony_ci // vl128 state = 0x01bd324a 1571b8021494Sopenharmony_ci __ dci(0x4455bb74); // umaxp z20.h, p6/m, z20.h, z27.h 1572b8021494Sopenharmony_ci // vl128 state = 0xaf795389 1573b8021494Sopenharmony_ci __ dci(0x4451bb35); // addp z21.h, p6/m, z21.h, z25.h 1574b8021494Sopenharmony_ci // vl128 state = 0x5f4be111 1575b8021494Sopenharmony_ci __ dci(0x4451ab71); // addp z17.h, p2/m, z17.h, z27.h 1576b8021494Sopenharmony_ci // vl128 state = 0xc16a8d03 1577b8021494Sopenharmony_ci __ dci(0x4451ba75); // addp z21.h, p6/m, z21.h, z19.h 1578b8021494Sopenharmony_ci // vl128 state = 0x8cd36853 1579b8021494Sopenharmony_ci __ dci(0x4451b225); // addp z5.h, p4/m, z5.h, z17.h 1580b8021494Sopenharmony_ci // vl128 state = 0xea3d5389 1581b8021494Sopenharmony_ci __ dci(0x4455b627); // umaxp z7.h, p5/m, z7.h, z17.h 1582b8021494Sopenharmony_ci // vl128 state = 0xbb42a8e1 1583b8021494Sopenharmony_ci __ dci(0x4415b426); // umaxp z6.b, p5/m, z6.b, z1.b 1584b8021494Sopenharmony_ci // vl128 state = 0x485ca761 1585b8021494Sopenharmony_ci __ dci(0x4415b224); // umaxp z4.b, p4/m, z4.b, z17.b 1586b8021494Sopenharmony_ci // vl128 state = 0x6bcfd641 1587b8021494Sopenharmony_ci __ dci(0x4455b02c); // umaxp z12.h, p4/m, z12.h, z1.h 1588b8021494Sopenharmony_ci // vl128 state = 0x84485a9f 1589b8021494Sopenharmony_ci __ dci(0x4455a12d); // umaxp z13.h, p0/m, z13.h, z9.h 1590b8021494Sopenharmony_ci // vl128 state = 0xed43519f 1591b8021494Sopenharmony_ci __ dci(0x4455b33d); // umaxp z29.h, p4/m, z29.h, z25.h 1592b8021494Sopenharmony_ci // vl128 state = 0xcc0b7c40 1593b8021494Sopenharmony_ci __ dci(0x4455b7b9); // umaxp z25.h, p5/m, z25.h, z29.h 1594b8021494Sopenharmony_ci // vl128 state = 0xe1c14517 1595b8021494Sopenharmony_ci __ dci(0x4454b6b8); // smaxp z24.h, p5/m, z24.h, z21.h 1596b8021494Sopenharmony_ci // vl128 state = 0x4c5e9f3c 1597b8021494Sopenharmony_ci __ dci(0x44d4b4bc); // smaxp z28.d, p5/m, z28.d, z5.d 1598b8021494Sopenharmony_ci // vl128 state = 0x7530a2f7 1599b8021494Sopenharmony_ci __ dci(0x44d4b4bd); // smaxp z29.d, p5/m, z29.d, z5.d 1600b8021494Sopenharmony_ci // vl128 state = 0x37e61b68 1601b8021494Sopenharmony_ci __ dci(0x44d4b5ed); // smaxp z13.d, p5/m, z13.d, z15.d 1602b8021494Sopenharmony_ci // vl128 state = 0xb592b6e9 1603b8021494Sopenharmony_ci __ dci(0x4455b5fd); // umaxp z29.h, p5/m, z29.h, z15.h 1604b8021494Sopenharmony_ci // vl128 state = 0xe7f9e492 1605b8021494Sopenharmony_ci __ dci(0x4415b57f); // umaxp z31.b, p5/m, z31.b, z11.b 1606b8021494Sopenharmony_ci // vl128 state = 0xe4e7b644 1607b8021494Sopenharmony_ci __ dci(0x4411b5fe); // addp z30.b, p5/m, z30.b, z15.b 1608b8021494Sopenharmony_ci // vl128 state = 0x4bfe144d 1609b8021494Sopenharmony_ci __ dci(0x4411a576); // addp z22.b, p1/m, z22.b, z11.b 1610b8021494Sopenharmony_ci // vl128 state = 0xb1813df8 1611b8021494Sopenharmony_ci __ dci(0x4455a566); // umaxp z6.h, p1/m, z6.h, z11.h 1612b8021494Sopenharmony_ci // vl128 state = 0x4aa8b50e 1613b8021494Sopenharmony_ci __ dci(0x4455adf6); // umaxp z22.h, p3/m, z22.h, z15.h 1614b8021494Sopenharmony_ci // vl128 state = 0xfc13568a 1615b8021494Sopenharmony_ci __ dci(0x4454acfe); // smaxp z30.h, p3/m, z30.h, z7.h 1616b8021494Sopenharmony_ci // vl128 state = 0x3aac7365 1617b8021494Sopenharmony_ci __ dci(0x4454acff); // smaxp z31.h, p3/m, z31.h, z7.h 1618b8021494Sopenharmony_ci // vl128 state = 0x610991cf 1619b8021494Sopenharmony_ci __ dci(0x44d4a8fb); // smaxp z27.d, p2/m, z27.d, z7.d 1620b8021494Sopenharmony_ci // vl128 state = 0x36581f26 1621b8021494Sopenharmony_ci __ dci(0x4456a8f3); // sminp z19.h, p2/m, z19.h, z7.h 1622b8021494Sopenharmony_ci // vl128 state = 0x249bb813 1623b8021494Sopenharmony_ci __ dci(0x4457a8b1); // uminp z17.h, p2/m, z17.h, z5.h 1624b8021494Sopenharmony_ci // vl128 state = 0xd48d6d88 1625b8021494Sopenharmony_ci __ dci(0x4457a8b5); // uminp z21.h, p2/m, z21.h, z5.h 1626b8021494Sopenharmony_ci // vl128 state = 0x1628fb6e 1627b8021494Sopenharmony_ci __ dci(0x4456a8f7); // sminp z23.h, p2/m, z23.h, z7.h 1628b8021494Sopenharmony_ci // vl128 state = 0x0bd3c76b 1629b8021494Sopenharmony_ci __ dci(0x4456a89f); // sminp z31.h, p2/m, z31.h, z4.h 1630b8021494Sopenharmony_ci // vl128 state = 0xf09d21e4 1631b8021494Sopenharmony_ci __ dci(0x4456aa0f); // sminp z15.h, p2/m, z15.h, z16.h 1632b8021494Sopenharmony_ci // vl128 state = 0xd2a92168 1633b8021494Sopenharmony_ci __ dci(0x4456b807); // sminp z7.h, p6/m, z7.h, z0.h 1634b8021494Sopenharmony_ci // vl128 state = 0x009d0ac8 1635b8021494Sopenharmony_ci __ dci(0x4456bc26); // sminp z6.h, p7/m, z6.h, z1.h 1636b8021494Sopenharmony_ci // vl128 state = 0x716ddc73 1637b8021494Sopenharmony_ci __ dci(0x4456beae); // sminp z14.h, p7/m, z14.h, z21.h 1638b8021494Sopenharmony_ci // vl128 state = 0x35a4d900 1639b8021494Sopenharmony_ci __ dci(0x4416b6ac); // sminp z12.b, p5/m, z12.b, z21.b 1640b8021494Sopenharmony_ci // vl128 state = 0x7929e077 1641b8021494Sopenharmony_ci __ dci(0x4416b6bc); // sminp z28.b, p5/m, z28.b, z21.b 1642b8021494Sopenharmony_ci // vl128 state = 0x259195ca 1643b8021494Sopenharmony_ci __ dci(0x4417b694); // uminp z20.b, p5/m, z20.b, z20.b 1644b8021494Sopenharmony_ci // vl128 state = 0x5cc3927b 1645b8021494Sopenharmony_ci __ dci(0x4417b684); // uminp z4.b, p5/m, z4.b, z20.b 1646b8021494Sopenharmony_ci // vl128 state = 0x2e7c4b88 1647b8021494Sopenharmony_ci __ dci(0x4415b6a0); // umaxp z0.b, p5/m, z0.b, z21.b 1648b8021494Sopenharmony_ci // vl128 state = 0x1478d524 1649b8021494Sopenharmony_ci __ dci(0x4415a690); // umaxp z16.b, p1/m, z16.b, z20.b 1650b8021494Sopenharmony_ci // vl128 state = 0xc3ac4a89 1651b8021494Sopenharmony_ci __ dci(0x4415b614); // umaxp z20.b, p5/m, z20.b, z16.b 1652b8021494Sopenharmony_ci // vl128 state = 0xb94a5aeb 1653b8021494Sopenharmony_ci __ dci(0x4415b675); // umaxp z21.b, p5/m, z21.b, z19.b 1654b8021494Sopenharmony_ci // vl128 state = 0xabeed92b 1655b8021494Sopenharmony_ci __ dci(0x4415a63d); // umaxp z29.b, p1/m, z29.b, z17.b 1656b8021494Sopenharmony_ci // vl128 state = 0xe36835ea 1657b8021494Sopenharmony_ci __ dci(0x4415a63c); // umaxp z28.b, p1/m, z28.b, z17.b 1658b8021494Sopenharmony_ci // vl128 state = 0x087002bb 1659b8021494Sopenharmony_ci __ dci(0x4455a61d); // umaxp z29.h, p1/m, z29.h, z16.h 1660b8021494Sopenharmony_ci // vl128 state = 0x17388ea4 1661b8021494Sopenharmony_ci __ dci(0x4451ae1f); // addp z31.h, p3/m, z31.h, z16.h 1662b8021494Sopenharmony_ci // vl128 state = 0x86ee7dbe 1663b8021494Sopenharmony_ci __ dci(0x4451ae1b); // addp z27.h, p3/m, z27.h, z16.h 1664b8021494Sopenharmony_ci // vl128 state = 0x9846169e 1665b8021494Sopenharmony_ci __ dci(0x4451bc0b); // addp z11.h, p7/m, z11.h, z0.h 1666b8021494Sopenharmony_ci // vl128 state = 0x5dc31eb0 1667b8021494Sopenharmony_ci __ dci(0x4455bc4f); // umaxp z15.h, p7/m, z15.h, z2.h 1668b8021494Sopenharmony_ci // vl128 state = 0x9ec9086c 1669b8021494Sopenharmony_ci __ dci(0x4455bf47); // umaxp z7.h, p7/m, z7.h, z26.h 1670b8021494Sopenharmony_ci // vl128 state = 0xf3a2766b 1671b8021494Sopenharmony_ci __ dci(0x44d5b743); // umaxp z3.d, p5/m, z3.d, z26.d 1672b8021494Sopenharmony_ci // vl128 state = 0x1ce44f7e 1673b8021494Sopenharmony_ci __ dci(0x44d5b7e2); // umaxp z2.d, p5/m, z2.d, z31.d 1674b8021494Sopenharmony_ci // vl128 state = 0xf121f7c0 1675b8021494Sopenharmony_ci __ dci(0x44d5b7e0); // umaxp z0.d, p5/m, z0.d, z31.d 1676b8021494Sopenharmony_ci // vl128 state = 0x4ac0d4f3 1677b8021494Sopenharmony_ci __ dci(0x44d5b670); // umaxp z16.d, p5/m, z16.d, z19.d 1678b8021494Sopenharmony_ci // vl128 state = 0xdb0d62f5 1679b8021494Sopenharmony_ci __ dci(0x44d1b272); // addp z18.d, p4/m, z18.d, z19.d 1680b8021494Sopenharmony_ci // vl128 state = 0x34b0c018 1681b8021494Sopenharmony_ci __ dci(0x44d1be76); // addp z22.d, p7/m, z22.d, z19.d 1682b8021494Sopenharmony_ci // vl128 state = 0x1673f380 1683b8021494Sopenharmony_ci __ dci(0x44d1b772); // addp z18.d, p5/m, z18.d, z27.d 1684b8021494Sopenharmony_ci // vl128 state = 0xe3e67205 1685b8021494Sopenharmony_ci __ dci(0x44d1b162); // addp z2.d, p4/m, z2.d, z11.d 1686b8021494Sopenharmony_ci // vl128 state = 0x42907adc 1687b8021494Sopenharmony_ci } 1688b8021494Sopenharmony_ci 1689b8021494Sopenharmony_ci uint32_t state; 1690b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 1691b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 1692b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 1693b8021494Sopenharmony_ci 1694b8021494Sopenharmony_ci END(); 1695b8021494Sopenharmony_ci if (CAN_RUN()) { 1696b8021494Sopenharmony_ci RUN(); 1697b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 1698b8021494Sopenharmony_ci 0x42907adc, 1699b8021494Sopenharmony_ci 0xee2f21f5, 1700b8021494Sopenharmony_ci 0xcbfa0af4, 1701b8021494Sopenharmony_ci 0x42e7c862, 1702b8021494Sopenharmony_ci 0x10ef537f, 1703b8021494Sopenharmony_ci 0x83461e96, 1704b8021494Sopenharmony_ci 0x2dca0c37, 1705b8021494Sopenharmony_ci 0xf2080504, 1706b8021494Sopenharmony_ci 0xf615d956, 1707b8021494Sopenharmony_ci 0x1732775a, 1708b8021494Sopenharmony_ci 0x491fec07, 1709b8021494Sopenharmony_ci 0xf9e33ada, 1710b8021494Sopenharmony_ci 0x324435d7, 1711b8021494Sopenharmony_ci 0x08a9c2ca, 1712b8021494Sopenharmony_ci 0x87ce3994, 1713b8021494Sopenharmony_ci 0x338adb5d, 1714b8021494Sopenharmony_ci }; 1715b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 1716b8021494Sopenharmony_ci } 1717b8021494Sopenharmony_ci} 1718b8021494Sopenharmony_ci 1719b8021494Sopenharmony_ciTEST_SVE(sve2_extract_narrow) { 1720b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 1721b8021494Sopenharmony_ci CPUFeatures::kSVE2, 1722b8021494Sopenharmony_ci CPUFeatures::kNEON, 1723b8021494Sopenharmony_ci CPUFeatures::kCRC32); 1724b8021494Sopenharmony_ci START(); 1725b8021494Sopenharmony_ci 1726b8021494Sopenharmony_ci SetInitialMachineState(&masm); 1727b8021494Sopenharmony_ci // state = 0xe2bd2480 1728b8021494Sopenharmony_ci 1729b8021494Sopenharmony_ci { 1730b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 64 * kInstructionSize); 1731b8021494Sopenharmony_ci __ dci(0x45284000); // sqxtnb z0.b, z0.h 1732b8021494Sopenharmony_ci // vl128 state = 0x874f147b 1733b8021494Sopenharmony_ci __ dci(0x45284228); // sqxtnb z8.b, z17.h 1734b8021494Sopenharmony_ci // vl128 state = 0xf694d31e 1735b8021494Sopenharmony_ci __ dci(0x45284820); // uqxtnb z0.b, z1.h 1736b8021494Sopenharmony_ci // vl128 state = 0x5d25df42 1737b8021494Sopenharmony_ci __ dci(0x45304821); // uqxtnb z1.h, z1.s 1738b8021494Sopenharmony_ci // vl128 state = 0x87eb933f 1739b8021494Sopenharmony_ci __ dci(0x45304823); // uqxtnb z3.h, z1.s 1740b8021494Sopenharmony_ci // vl128 state = 0x137eddc9 1741b8021494Sopenharmony_ci __ dci(0x45604822); // uqxtnb z2.s, z1.d 1742b8021494Sopenharmony_ci // vl128 state = 0x26e237a3 1743b8021494Sopenharmony_ci __ dci(0x45604d26); // uqxtnt z6.s, z9.d 1744b8021494Sopenharmony_ci // vl128 state = 0x72bcf361 1745b8021494Sopenharmony_ci __ dci(0x45304d2e); // uqxtnt z14.h, z9.s 1746b8021494Sopenharmony_ci // vl128 state = 0x5bcdd232 1747b8021494Sopenharmony_ci __ dci(0x45304d3e); // uqxtnt z30.h, z9.s 1748b8021494Sopenharmony_ci // vl128 state = 0x9a695f7e 1749b8021494Sopenharmony_ci __ dci(0x453049bc); // uqxtnb z28.h, z13.s 1750b8021494Sopenharmony_ci // vl128 state = 0x9c2fa230 1751b8021494Sopenharmony_ci __ dci(0x453049b8); // uqxtnb z24.h, z13.s 1752b8021494Sopenharmony_ci // vl128 state = 0xb590179f 1753b8021494Sopenharmony_ci __ dci(0x45304979); // uqxtnb z25.h, z11.s 1754b8021494Sopenharmony_ci // vl128 state = 0xc8987735 1755b8021494Sopenharmony_ci __ dci(0x4530497d); // uqxtnb z29.h, z11.s 1756b8021494Sopenharmony_ci // vl128 state = 0x380f8730 1757b8021494Sopenharmony_ci __ dci(0x4530496d); // uqxtnb z13.h, z11.s 1758b8021494Sopenharmony_ci // vl128 state = 0x45bf22d4 1759b8021494Sopenharmony_ci __ dci(0x45304565); // sqxtnt z5.h, z11.s 1760b8021494Sopenharmony_ci // vl128 state = 0xd9237f41 1761b8021494Sopenharmony_ci __ dci(0x45304f75); // uqxtnt z21.h, z27.s 1762b8021494Sopenharmony_ci // vl128 state = 0x0726a49b 1763b8021494Sopenharmony_ci __ dci(0x45304f71); // uqxtnt z17.h, z27.s 1764b8021494Sopenharmony_ci // vl128 state = 0xcbc547e0 1765b8021494Sopenharmony_ci __ dci(0x45304f73); // uqxtnt z19.h, z27.s 1766b8021494Sopenharmony_ci // vl128 state = 0x0b16d843 1767b8021494Sopenharmony_ci __ dci(0x45284f72); // uqxtnt z18.b, z27.h 1768b8021494Sopenharmony_ci // vl128 state = 0xea84ff1f 1769b8021494Sopenharmony_ci __ dci(0x45284f7a); // uqxtnt z26.b, z27.h 1770b8021494Sopenharmony_ci // vl128 state = 0x4bdb094d 1771b8021494Sopenharmony_ci __ dci(0x45284fca); // uqxtnt z10.b, z30.h 1772b8021494Sopenharmony_ci // vl128 state = 0x5986f190 1773b8021494Sopenharmony_ci __ dci(0x45284b8b); // uqxtnb z11.b, z28.h 1774b8021494Sopenharmony_ci // vl128 state = 0xb40f0b26 1775b8021494Sopenharmony_ci __ dci(0x45284bef); // uqxtnb z15.b, z31.h 1776b8021494Sopenharmony_ci // vl128 state = 0x7abef2b5 1777b8021494Sopenharmony_ci __ dci(0x45284fae); // uqxtnt z14.b, z29.h 1778b8021494Sopenharmony_ci // vl128 state = 0x79503b36 1779b8021494Sopenharmony_ci __ dci(0x45284fac); // uqxtnt z12.b, z29.h 1780b8021494Sopenharmony_ci // vl128 state = 0x481a6879 1781b8021494Sopenharmony_ci __ dci(0x45284eed); // uqxtnt z13.b, z23.h 1782b8021494Sopenharmony_ci // vl128 state = 0x32da844c 1783b8021494Sopenharmony_ci __ dci(0x45284ee9); // uqxtnt z9.b, z23.h 1784b8021494Sopenharmony_ci // vl128 state = 0xb8438ca7 1785b8021494Sopenharmony_ci __ dci(0x45284ef9); // uqxtnt z25.b, z23.h 1786b8021494Sopenharmony_ci // vl128 state = 0x4aa26674 1787b8021494Sopenharmony_ci __ dci(0x45284cd1); // uqxtnt z17.b, z6.h 1788b8021494Sopenharmony_ci // vl128 state = 0xc5411d78 1789b8021494Sopenharmony_ci __ dci(0x45284cd5); // uqxtnt z21.b, z6.h 1790b8021494Sopenharmony_ci // vl128 state = 0xee446689 1791b8021494Sopenharmony_ci __ dci(0x45284ad4); // uqxtnb z20.b, z22.h 1792b8021494Sopenharmony_ci // vl128 state = 0x66ef53ef 1793b8021494Sopenharmony_ci __ dci(0x45604adc); // uqxtnb z28.s, z22.d 1794b8021494Sopenharmony_ci // vl128 state = 0xa894f4d4 1795b8021494Sopenharmony_ci __ dci(0x45604ade); // uqxtnb z30.s, z22.d 1796b8021494Sopenharmony_ci // vl128 state = 0x50215eb8 1797b8021494Sopenharmony_ci __ dci(0x456040dc); // sqxtnb z28.s, z6.d 1798b8021494Sopenharmony_ci // vl128 state = 0x5ee8464d 1799b8021494Sopenharmony_ci __ dci(0x456048f4); // uqxtnb z20.s, z7.d 1800b8021494Sopenharmony_ci // vl128 state = 0xee2ca07b 1801b8021494Sopenharmony_ci __ dci(0x45604c75); // uqxtnt z21.s, z3.d 1802b8021494Sopenharmony_ci // vl128 state = 0x0e81e7e0 1803b8021494Sopenharmony_ci __ dci(0x45604cb1); // uqxtnt z17.s, z5.d 1804b8021494Sopenharmony_ci // vl128 state = 0x5c448cac 1805b8021494Sopenharmony_ci __ dci(0x45604e33); // uqxtnt z19.s, z17.d 1806b8021494Sopenharmony_ci // vl128 state = 0xcd0d561e 1807b8021494Sopenharmony_ci __ dci(0x45604e23); // uqxtnt z3.s, z17.d 1808b8021494Sopenharmony_ci // vl128 state = 0x7b8b2204 1809b8021494Sopenharmony_ci __ dci(0x45604cab); // uqxtnt z11.s, z5.d 1810b8021494Sopenharmony_ci // vl128 state = 0x418cec7f 1811b8021494Sopenharmony_ci __ dci(0x45604caa); // uqxtnt z10.s, z5.d 1812b8021494Sopenharmony_ci // vl128 state = 0x37064bb6 1813b8021494Sopenharmony_ci __ dci(0x45604efa); // uqxtnt z26.s, z23.d 1814b8021494Sopenharmony_ci // vl128 state = 0xc83ef05d 1815b8021494Sopenharmony_ci __ dci(0x456046db); // sqxtnt z27.s, z22.d 1816b8021494Sopenharmony_ci // vl128 state = 0xe30a1f0f 1817b8021494Sopenharmony_ci __ dci(0x456046da); // sqxtnt z26.s, z22.d 1818b8021494Sopenharmony_ci // vl128 state = 0xe10b92fa 1819b8021494Sopenharmony_ci __ dci(0x4560424a); // sqxtnb z10.s, z18.d 1820b8021494Sopenharmony_ci // vl128 state = 0x2396410c 1821b8021494Sopenharmony_ci __ dci(0x45604a08); // uqxtnb z8.s, z16.d 1822b8021494Sopenharmony_ci // vl128 state = 0xf4ae5ad5 1823b8021494Sopenharmony_ci __ dci(0x45304a00); // uqxtnb z0.h, z16.s 1824b8021494Sopenharmony_ci // vl128 state = 0x26bbb3d1 1825b8021494Sopenharmony_ci __ dci(0x45304828); // uqxtnb z8.h, z1.s 1826b8021494Sopenharmony_ci // vl128 state = 0x57d91166 1827b8021494Sopenharmony_ci __ dci(0x4530422c); // sqxtnb z12.h, z17.s 1828b8021494Sopenharmony_ci // vl128 state = 0x5548e0b4 1829b8021494Sopenharmony_ci __ dci(0x45305324); // sqxtunb z4.h, z25.s 1830b8021494Sopenharmony_ci // vl128 state = 0xf7eb8d9c 1831b8021494Sopenharmony_ci __ dci(0x45305325); // sqxtunb z5.h, z25.s 1832b8021494Sopenharmony_ci // vl128 state = 0xcf294303 1833b8021494Sopenharmony_ci __ dci(0x45305321); // sqxtunb z1.h, z25.s 1834b8021494Sopenharmony_ci // vl128 state = 0x6c7597d6 1835b8021494Sopenharmony_ci __ dci(0x453057a9); // sqxtunt z9.h, z29.s 1836b8021494Sopenharmony_ci // vl128 state = 0xe7be4fd5 1837b8021494Sopenharmony_ci __ dci(0x453043b9); // sqxtnb z25.h, z29.s 1838b8021494Sopenharmony_ci // vl128 state = 0x376f3f76 1839b8021494Sopenharmony_ci __ dci(0x453043bb); // sqxtnb z27.h, z29.s 1840b8021494Sopenharmony_ci // vl128 state = 0xf8389159 1841b8021494Sopenharmony_ci __ dci(0x4530431a); // sqxtnb z26.h, z24.s 1842b8021494Sopenharmony_ci // vl128 state = 0x8ca15413 1843b8021494Sopenharmony_ci __ dci(0x45304312); // sqxtnb z18.h, z24.s 1844b8021494Sopenharmony_ci // vl128 state = 0x2a6d8b90 1845b8021494Sopenharmony_ci __ dci(0x4530491a); // uqxtnb z26.h, z8.s 1846b8021494Sopenharmony_ci // vl128 state = 0x7119ff0d 1847b8021494Sopenharmony_ci __ dci(0x4530413b); // sqxtnb z27.h, z9.s 1848b8021494Sopenharmony_ci // vl128 state = 0x884748db 1849b8021494Sopenharmony_ci __ dci(0x4530482b); // uqxtnb z11.h, z1.s 1850b8021494Sopenharmony_ci // vl128 state = 0x43296aec 1851b8021494Sopenharmony_ci __ dci(0x4530483b); // uqxtnb z27.h, z1.s 1852b8021494Sopenharmony_ci // vl128 state = 0xdb9908f0 1853b8021494Sopenharmony_ci __ dci(0x45304979); // uqxtnb z25.h, z11.s 1854b8021494Sopenharmony_ci // vl128 state = 0xef30bfc8 1855b8021494Sopenharmony_ci __ dci(0x453049d1); // uqxtnb z17.h, z14.s 1856b8021494Sopenharmony_ci // vl128 state = 0xb46173d8 1857b8021494Sopenharmony_ci __ dci(0x456049d3); // uqxtnb z19.s, z14.d 1858b8021494Sopenharmony_ci // vl128 state = 0xcb8c3b83 1859b8021494Sopenharmony_ci } 1860b8021494Sopenharmony_ci 1861b8021494Sopenharmony_ci uint32_t state; 1862b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 1863b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 1864b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 1865b8021494Sopenharmony_ci 1866b8021494Sopenharmony_ci END(); 1867b8021494Sopenharmony_ci if (CAN_RUN()) { 1868b8021494Sopenharmony_ci RUN(); 1869b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 1870b8021494Sopenharmony_ci 0xcb8c3b83, 1871b8021494Sopenharmony_ci 0x92fb7f98, 1872b8021494Sopenharmony_ci 0xb7ec6385, 1873b8021494Sopenharmony_ci 0x81de8602, 1874b8021494Sopenharmony_ci 0xd970d431, 1875b8021494Sopenharmony_ci 0x2fe61431, 1876b8021494Sopenharmony_ci 0x359b1355, 1877b8021494Sopenharmony_ci 0xdeec900e, 1878b8021494Sopenharmony_ci 0xfd0c7d7d, 1879b8021494Sopenharmony_ci 0x62e89b19, 1880b8021494Sopenharmony_ci 0x43039424, 1881b8021494Sopenharmony_ci 0xdd42efc9, 1882b8021494Sopenharmony_ci 0x861010f1, 1883b8021494Sopenharmony_ci 0x82d68f37, 1884b8021494Sopenharmony_ci 0x3761a1d0, 1885b8021494Sopenharmony_ci 0xbcf3c5c9, 1886b8021494Sopenharmony_ci }; 1887b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 1888b8021494Sopenharmony_ci } 1889b8021494Sopenharmony_ci} 1890b8021494Sopenharmony_ci 1891b8021494Sopenharmony_ciTEST_SVE(sve2_eorbt_eortb) { 1892b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 1893b8021494Sopenharmony_ci CPUFeatures::kSVE2, 1894b8021494Sopenharmony_ci CPUFeatures::kNEON, 1895b8021494Sopenharmony_ci CPUFeatures::kCRC32); 1896b8021494Sopenharmony_ci START(); 1897b8021494Sopenharmony_ci 1898b8021494Sopenharmony_ci SetInitialMachineState(&masm); 1899b8021494Sopenharmony_ci // state = 0xe2bd2480 1900b8021494Sopenharmony_ci 1901b8021494Sopenharmony_ci { 1902b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 1903b8021494Sopenharmony_ci __ dci(0x451892b8); // eorbt z24.b, z21.b, z24.b 1904b8021494Sopenharmony_ci // vl128 state = 0xc3f2b082 1905b8021494Sopenharmony_ci __ dci(0x455893ba); // eorbt z26.h, z29.h, z24.h 1906b8021494Sopenharmony_ci // vl128 state = 0xc7421198 1907b8021494Sopenharmony_ci __ dci(0x455892f8); // eorbt z24.h, z23.h, z24.h 1908b8021494Sopenharmony_ci // vl128 state = 0x4e155b96 1909b8021494Sopenharmony_ci __ dci(0x455092bc); // eorbt z28.h, z21.h, z16.h 1910b8021494Sopenharmony_ci // vl128 state = 0x09393ad0 1911b8021494Sopenharmony_ci __ dci(0x455893be); // eorbt z30.h, z29.h, z24.h 1912b8021494Sopenharmony_ci // vl128 state = 0x6d660844 1913b8021494Sopenharmony_ci __ dci(0x4558922e); // eorbt z14.h, z17.h, z24.h 1914b8021494Sopenharmony_ci // vl128 state = 0x84f1ff20 1915b8021494Sopenharmony_ci __ dci(0x45d892aa); // eorbt z10.d, z21.d, z24.d 1916b8021494Sopenharmony_ci // vl128 state = 0x568612d4 1917b8021494Sopenharmony_ci __ dci(0x454892a8); // eorbt z8.h, z21.h, z8.h 1918b8021494Sopenharmony_ci // vl128 state = 0x699a3e24 1919b8021494Sopenharmony_ci __ dci(0x45c890ac); // eorbt z12.d, z5.d, z8.d 1920b8021494Sopenharmony_ci // vl128 state = 0x17bb6d9b 1921b8021494Sopenharmony_ci __ dci(0x45c990ed); // eorbt z13.d, z7.d, z9.d 1922b8021494Sopenharmony_ci // vl128 state = 0xee5be73f 1923b8021494Sopenharmony_ci __ dci(0x45c892fd); // eorbt z29.d, z23.d, z8.d 1924b8021494Sopenharmony_ci // vl128 state = 0x141c47ed 1925b8021494Sopenharmony_ci __ dci(0x45c892f9); // eorbt z25.d, z23.d, z8.d 1926b8021494Sopenharmony_ci // vl128 state = 0xc3259593 1927b8021494Sopenharmony_ci __ dci(0x45c892f8); // eorbt z24.d, z23.d, z8.d 1928b8021494Sopenharmony_ci // vl128 state = 0x3bca0bcc 1929b8021494Sopenharmony_ci __ dci(0x45c892e8); // eorbt z8.d, z23.d, z8.d 1930b8021494Sopenharmony_ci // vl128 state = 0x4714ab64 1931b8021494Sopenharmony_ci __ dci(0x454a92ea); // eorbt z10.h, z23.h, z10.h 1932b8021494Sopenharmony_ci // vl128 state = 0x51360c73 1933b8021494Sopenharmony_ci __ dci(0x454092e2); // eorbt z2.h, z23.h, z0.h 1934b8021494Sopenharmony_ci // vl128 state = 0xe33859fe 1935b8021494Sopenharmony_ci __ dci(0x454092f2); // eorbt z18.h, z23.h, z0.h 1936b8021494Sopenharmony_ci // vl128 state = 0xa0d81168 1937b8021494Sopenharmony_ci __ dci(0x4550927a); // eorbt z26.h, z19.h, z16.h 1938b8021494Sopenharmony_ci // vl128 state = 0xe4983274 1939b8021494Sopenharmony_ci __ dci(0x4551923b); // eorbt z27.h, z17.h, z17.h 1940b8021494Sopenharmony_ci // vl128 state = 0x8e89eab7 1941b8021494Sopenharmony_ci __ dci(0x45d3923f); // eorbt z31.d, z17.d, z19.d 1942b8021494Sopenharmony_ci // vl128 state = 0x472bd288 1943b8021494Sopenharmony_ci __ dci(0x4553921d); // eorbt z29.h, z16.h, z19.h 1944b8021494Sopenharmony_ci // vl128 state = 0x61090ed4 1945b8021494Sopenharmony_ci __ dci(0x4553932d); // eorbt z13.h, z25.h, z19.h 1946b8021494Sopenharmony_ci // vl128 state = 0x3ef228eb 1947b8021494Sopenharmony_ci __ dci(0x4513912c); // eorbt z12.b, z9.b, z19.b 1948b8021494Sopenharmony_ci // vl128 state = 0x96d4505c 1949b8021494Sopenharmony_ci __ dci(0x4551912d); // eorbt z13.h, z9.h, z17.h 1950b8021494Sopenharmony_ci // vl128 state = 0x1c32baef 1951b8021494Sopenharmony_ci __ dci(0x45119029); // eorbt z9.b, z1.b, z17.b 1952b8021494Sopenharmony_ci // vl128 state = 0xa138f554 1953b8021494Sopenharmony_ci __ dci(0x45149028); // eorbt z8.b, z1.b, z20.b 1954b8021494Sopenharmony_ci // vl128 state = 0xf0681d9a 1955b8021494Sopenharmony_ci __ dci(0x459490aa); // eorbt z10.s, z5.s, z20.s 1956b8021494Sopenharmony_ci // vl128 state = 0xbd4b30f5 1957b8021494Sopenharmony_ci __ dci(0x458590a8); // eorbt z8.s, z5.s, z5.s 1958b8021494Sopenharmony_ci // vl128 state = 0x45c5b437 1959b8021494Sopenharmony_ci __ dci(0x4585948c); // eortb z12.s, z4.s, z5.s 1960b8021494Sopenharmony_ci // vl128 state = 0x22f90a7b 1961b8021494Sopenharmony_ci __ dci(0x45cd949c); // eortb z28.d, z4.d, z13.d 1962b8021494Sopenharmony_ci // vl128 state = 0x5e4584ca 1963b8021494Sopenharmony_ci __ dci(0x4589949d); // eortb z29.s, z4.s, z9.s 1964b8021494Sopenharmony_ci // vl128 state = 0x65ac913e 1965b8021494Sopenharmony_ci __ dci(0x458990ad); // eorbt z13.s, z5.s, z9.s 1966b8021494Sopenharmony_ci // vl128 state = 0x4f13d973 1967b8021494Sopenharmony_ci __ dci(0x459b90ac); // eorbt z12.s, z5.s, z27.s 1968b8021494Sopenharmony_ci // vl128 state = 0xd13bb801 1969b8021494Sopenharmony_ci __ dci(0x45db90ee); // eorbt z14.d, z7.d, z27.d 1970b8021494Sopenharmony_ci // vl128 state = 0xf24115d0 1971b8021494Sopenharmony_ci __ dci(0x45db916f); // eorbt z15.d, z11.d, z27.d 1972b8021494Sopenharmony_ci // vl128 state = 0x04f38375 1973b8021494Sopenharmony_ci __ dci(0x45db95e7); // eortb z7.d, z15.d, z27.d 1974b8021494Sopenharmony_ci // vl128 state = 0xe1046ae5 1975b8021494Sopenharmony_ci __ dci(0x45db94a3); // eortb z3.d, z5.d, z27.d 1976b8021494Sopenharmony_ci // vl128 state = 0xaaeae67e 1977b8021494Sopenharmony_ci __ dci(0x45dd94a1); // eortb z1.d, z5.d, z29.d 1978b8021494Sopenharmony_ci // vl128 state = 0xd67f6823 1979b8021494Sopenharmony_ci __ dci(0x45dd94b1); // eortb z17.d, z5.d, z29.d 1980b8021494Sopenharmony_ci // vl128 state = 0xf172245b 1981b8021494Sopenharmony_ci __ dci(0x45dd90f3); // eorbt z19.d, z7.d, z29.d 1982b8021494Sopenharmony_ci // vl128 state = 0xc99195b8 1983b8021494Sopenharmony_ci __ dci(0x458d90e3); // eorbt z3.s, z7.s, z13.s 1984b8021494Sopenharmony_ci // vl128 state = 0xe1a146cf 1985b8021494Sopenharmony_ci __ dci(0x458994e2); // eortb z2.s, z7.s, z9.s 1986b8021494Sopenharmony_ci // vl128 state = 0x8038f273 1987b8021494Sopenharmony_ci __ dci(0x458b94a3); // eortb z3.s, z5.s, z11.s 1988b8021494Sopenharmony_ci // vl128 state = 0x50bda372 1989b8021494Sopenharmony_ci __ dci(0x459b9481); // eortb z1.s, z4.s, z27.s 1990b8021494Sopenharmony_ci // vl128 state = 0xe8d53012 1991b8021494Sopenharmony_ci __ dci(0x455b9485); // eortb z5.h, z4.h, z27.h 1992b8021494Sopenharmony_ci // vl128 state = 0xdba33ea5 1993b8021494Sopenharmony_ci __ dci(0x454b9087); // eorbt z7.h, z4.h, z11.h 1994b8021494Sopenharmony_ci // vl128 state = 0xff7f1815 1995b8021494Sopenharmony_ci __ dci(0x45499003); // eorbt z3.h, z0.h, z9.h 1996b8021494Sopenharmony_ci // vl128 state = 0x5d6e0104 1997b8021494Sopenharmony_ci __ dci(0x454d9022); // eorbt z2.h, z1.h, z13.h 1998b8021494Sopenharmony_ci // vl128 state = 0xe9161cfe 1999b8021494Sopenharmony_ci __ dci(0x45099026); // eorbt z6.b, z1.b, z9.b 2000b8021494Sopenharmony_ci // vl128 state = 0x48126fb9 2001b8021494Sopenharmony_ci __ dci(0x454b9024); // eorbt z4.h, z1.h, z11.h 2002b8021494Sopenharmony_ci // vl128 state = 0x53cbfc46 2003b8021494Sopenharmony_ci } 2004b8021494Sopenharmony_ci 2005b8021494Sopenharmony_ci uint32_t state; 2006b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 2007b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 2008b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 2009b8021494Sopenharmony_ci 2010b8021494Sopenharmony_ci END(); 2011b8021494Sopenharmony_ci if (CAN_RUN()) { 2012b8021494Sopenharmony_ci RUN(); 2013b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 2014b8021494Sopenharmony_ci 0x53cbfc46, 2015b8021494Sopenharmony_ci 0x0f81a01e, 2016b8021494Sopenharmony_ci 0xf97c4e96, 2017b8021494Sopenharmony_ci 0x745e9ed6, 2018b8021494Sopenharmony_ci 0x4487a0a1, 2019b8021494Sopenharmony_ci 0x7ad79509, 2020b8021494Sopenharmony_ci 0x53577280, 2021b8021494Sopenharmony_ci 0x1e589717, 2022b8021494Sopenharmony_ci 0xaaa96af0, 2023b8021494Sopenharmony_ci 0x4f2b0884, 2024b8021494Sopenharmony_ci 0x24d2cd1c, 2025b8021494Sopenharmony_ci 0x4d89438d, 2026b8021494Sopenharmony_ci 0x9b327a12, 2027b8021494Sopenharmony_ci 0xeabfd558, 2028b8021494Sopenharmony_ci 0xb63e33f1, 2029b8021494Sopenharmony_ci 0xebd7d9ca, 2030b8021494Sopenharmony_ci }; 2031b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 2032b8021494Sopenharmony_ci } 2033b8021494Sopenharmony_ci} 2034b8021494Sopenharmony_ci 2035b8021494Sopenharmony_ciTEST_SVE(sve2_saturating_multiply_add_high_vector) { 2036b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 2037b8021494Sopenharmony_ci CPUFeatures::kSVE2, 2038b8021494Sopenharmony_ci CPUFeatures::kNEON, 2039b8021494Sopenharmony_ci CPUFeatures::kCRC32); 2040b8021494Sopenharmony_ci START(); 2041b8021494Sopenharmony_ci 2042b8021494Sopenharmony_ci SetInitialMachineState(&masm); 2043b8021494Sopenharmony_ci // state = 0xe2bd2480 2044b8021494Sopenharmony_ci 2045b8021494Sopenharmony_ci { 2046b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 40 * kInstructionSize); 2047b8021494Sopenharmony_ci __ dci(0x44d9721a); // sqrdmlah z26.d, z16.d, z25.d 2048b8021494Sopenharmony_ci // vl128 state = 0xc0474f3f 2049b8021494Sopenharmony_ci __ dci(0x44dd761b); // sqrdmlsh z27.d, z16.d, z29.d 2050b8021494Sopenharmony_ci // vl128 state = 0x102712ac 2051b8021494Sopenharmony_ci __ dci(0x44d4760b); // sqrdmlsh z11.d, z16.d, z20.d 2052b8021494Sopenharmony_ci // vl128 state = 0xe8666aa6 2053b8021494Sopenharmony_ci __ dci(0x44947709); // sqrdmlsh z9.s, z24.s, z20.s 2054b8021494Sopenharmony_ci // vl128 state = 0xdd18f643 2055b8021494Sopenharmony_ci __ dci(0x4494770b); // sqrdmlsh z11.s, z24.s, z20.s 2056b8021494Sopenharmony_ci // vl128 state = 0xac4a4d4c 2057b8021494Sopenharmony_ci __ dci(0x44d4773b); // sqrdmlsh z27.d, z25.d, z20.d 2058b8021494Sopenharmony_ci // vl128 state = 0x1a5447d4 2059b8021494Sopenharmony_ci __ dci(0x44dc7639); // sqrdmlsh z25.d, z17.d, z28.d 2060b8021494Sopenharmony_ci // vl128 state = 0xf547ac30 2061b8021494Sopenharmony_ci __ dci(0x44dc763b); // sqrdmlsh z27.d, z17.d, z28.d 2062b8021494Sopenharmony_ci // vl128 state = 0xb42d177a 2063b8021494Sopenharmony_ci __ dci(0x44d4743f); // sqrdmlsh z31.d, z1.d, z20.d 2064b8021494Sopenharmony_ci // vl128 state = 0xd0da2c6b 2065b8021494Sopenharmony_ci __ dci(0x449c742f); // sqrdmlsh z15.s, z1.s, z28.s 2066b8021494Sopenharmony_ci // vl128 state = 0xb24c8988 2067b8021494Sopenharmony_ci __ dci(0x449c7487); // sqrdmlsh z7.s, z4.s, z28.s 2068b8021494Sopenharmony_ci // vl128 state = 0x9e67ddac 2069b8021494Sopenharmony_ci __ dci(0x449c7485); // sqrdmlsh z5.s, z4.s, z28.s 2070b8021494Sopenharmony_ci // vl128 state = 0xd96b34e2 2071b8021494Sopenharmony_ci __ dci(0x448e7481); // sqrdmlsh z1.s, z4.s, z14.s 2072b8021494Sopenharmony_ci // vl128 state = 0x81d91007 2073b8021494Sopenharmony_ci __ dci(0x448e7480); // sqrdmlsh z0.s, z4.s, z14.s 2074b8021494Sopenharmony_ci // vl128 state = 0x901fa692 2075b8021494Sopenharmony_ci __ dci(0x449c7488); // sqrdmlsh z8.s, z4.s, z28.s 2076b8021494Sopenharmony_ci // vl128 state = 0xeedceee6 2077b8021494Sopenharmony_ci __ dci(0x441c758a); // sqrdmlsh z10.b, z12.b, z28.b 2078b8021494Sopenharmony_ci // vl128 state = 0x8dc4d389 2079b8021494Sopenharmony_ci __ dci(0x441475ae); // sqrdmlsh z14.b, z13.b, z20.b 2080b8021494Sopenharmony_ci // vl128 state = 0xb1711932 2081b8021494Sopenharmony_ci __ dci(0x440075ac); // sqrdmlsh z12.b, z13.b, z0.b 2082b8021494Sopenharmony_ci // vl128 state = 0x8cacf188 2083b8021494Sopenharmony_ci __ dci(0x440171bc); // sqrdmlah z28.b, z13.b, z1.b 2084b8021494Sopenharmony_ci // vl128 state = 0x9c8b9f4f 2085b8021494Sopenharmony_ci __ dci(0x440171b8); // sqrdmlah z24.b, z13.b, z1.b 2086b8021494Sopenharmony_ci // vl128 state = 0x562ebefa 2087b8021494Sopenharmony_ci __ dci(0x441971b9); // sqrdmlah z25.b, z13.b, z25.b 2088b8021494Sopenharmony_ci // vl128 state = 0x1ef60d31 2089b8021494Sopenharmony_ci __ dci(0x440970bb); // sqrdmlah z27.b, z5.b, z9.b 2090b8021494Sopenharmony_ci // vl128 state = 0x69bd18ee 2091b8021494Sopenharmony_ci __ dci(0x441870ba); // sqrdmlah z26.b, z5.b, z24.b 2092b8021494Sopenharmony_ci // vl128 state = 0x525b1f84 2093b8021494Sopenharmony_ci __ dci(0x441270b8); // sqrdmlah z24.b, z5.b, z18.b 2094b8021494Sopenharmony_ci // vl128 state = 0x3c7dadd8 2095b8021494Sopenharmony_ci __ dci(0x44927090); // sqrdmlah z16.s, z4.s, z18.s 2096b8021494Sopenharmony_ci // vl128 state = 0x276f0567 2097b8021494Sopenharmony_ci __ dci(0x44937292); // sqrdmlah z18.s, z20.s, z19.s 2098b8021494Sopenharmony_ci // vl128 state = 0x6f0f8bb4 2099b8021494Sopenharmony_ci __ dci(0x4491721a); // sqrdmlah z26.s, z16.s, z17.s 2100b8021494Sopenharmony_ci // vl128 state = 0x28eb737a 2101b8021494Sopenharmony_ci __ dci(0x44d3721b); // sqrdmlah z27.d, z16.d, z19.d 2102b8021494Sopenharmony_ci // vl128 state = 0xa3bd1133 2103b8021494Sopenharmony_ci __ dci(0x44d372ab); // sqrdmlah z11.d, z21.d, z19.d 2104b8021494Sopenharmony_ci // vl128 state = 0x6e81e8fd 2105b8021494Sopenharmony_ci __ dci(0x44d372a3); // sqrdmlah z3.d, z21.d, z19.d 2106b8021494Sopenharmony_ci // vl128 state = 0x55730750 2107b8021494Sopenharmony_ci __ dci(0x445376a1); // sqrdmlsh z1.h, z21.h, z19.h 2108b8021494Sopenharmony_ci // vl128 state = 0x7c7afd6d 2109b8021494Sopenharmony_ci __ dci(0x44527685); // sqrdmlsh z5.h, z20.h, z18.h 2110b8021494Sopenharmony_ci // vl128 state = 0x1c9dc1a1 2111b8021494Sopenharmony_ci __ dci(0x44127495); // sqrdmlsh z21.b, z4.b, z18.b 2112b8021494Sopenharmony_ci // vl128 state = 0xf2e07e92 2113b8021494Sopenharmony_ci __ dci(0x44127794); // sqrdmlsh z20.b, z28.b, z18.b 2114b8021494Sopenharmony_ci // vl128 state = 0xc5a2e589 2115b8021494Sopenharmony_ci __ dci(0x44527695); // sqrdmlsh z21.h, z20.h, z18.h 2116b8021494Sopenharmony_ci // vl128 state = 0x417df395 2117b8021494Sopenharmony_ci __ dci(0x445274dd); // sqrdmlsh z29.h, z6.h, z18.h 2118b8021494Sopenharmony_ci // vl128 state = 0x2e223308 2119b8021494Sopenharmony_ci __ dci(0x445774df); // sqrdmlsh z31.h, z6.h, z23.h 2120b8021494Sopenharmony_ci // vl128 state = 0x99047839 2121b8021494Sopenharmony_ci __ dci(0x445775fe); // sqrdmlsh z30.h, z15.h, z23.h 2122b8021494Sopenharmony_ci // vl128 state = 0x34a4be39 2123b8021494Sopenharmony_ci __ dci(0x445175ff); // sqrdmlsh z31.h, z15.h, z17.h 2124b8021494Sopenharmony_ci // vl128 state = 0x714b9d66 2125b8021494Sopenharmony_ci __ dci(0x44517557); // sqrdmlsh z23.h, z10.h, z17.h 2126b8021494Sopenharmony_ci // vl128 state = 0x2aa51ff4 2127b8021494Sopenharmony_ci } 2128b8021494Sopenharmony_ci 2129b8021494Sopenharmony_ci uint32_t state; 2130b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 2131b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 2132b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 2133b8021494Sopenharmony_ci 2134b8021494Sopenharmony_ci END(); 2135b8021494Sopenharmony_ci if (CAN_RUN()) { 2136b8021494Sopenharmony_ci RUN(); 2137b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 2138b8021494Sopenharmony_ci 0x2aa51ff4, 2139b8021494Sopenharmony_ci 0xde163ba0, 2140b8021494Sopenharmony_ci 0x8b237661, 2141b8021494Sopenharmony_ci 0x30086cf2, 2142b8021494Sopenharmony_ci 0xabf248f0, 2143b8021494Sopenharmony_ci 0xcc183608, 2144b8021494Sopenharmony_ci 0xa4103141, 2145b8021494Sopenharmony_ci 0x521ebe39, 2146b8021494Sopenharmony_ci 0xd746470e, 2147b8021494Sopenharmony_ci 0x141a51a4, 2148b8021494Sopenharmony_ci 0x695a47fd, 2149b8021494Sopenharmony_ci 0x0a74d701, 2150b8021494Sopenharmony_ci 0xd14bae63, 2151b8021494Sopenharmony_ci 0xf967aadb, 2152b8021494Sopenharmony_ci 0xdaed8896, 2153b8021494Sopenharmony_ci 0x7ba556cb, 2154b8021494Sopenharmony_ci }; 2155b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 2156b8021494Sopenharmony_ci } 2157b8021494Sopenharmony_ci} 2158b8021494Sopenharmony_ci 2159b8021494Sopenharmony_ciTEST_SVE(sve2_integer_pairwise_add_accumulate_long) { 2160b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 2161b8021494Sopenharmony_ci CPUFeatures::kSVE2, 2162b8021494Sopenharmony_ci CPUFeatures::kNEON, 2163b8021494Sopenharmony_ci CPUFeatures::kCRC32); 2164b8021494Sopenharmony_ci START(); 2165b8021494Sopenharmony_ci 2166b8021494Sopenharmony_ci SetInitialMachineState(&masm); 2167b8021494Sopenharmony_ci // state = 0xe2bd2480 2168b8021494Sopenharmony_ci 2169b8021494Sopenharmony_ci { 2170b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 40 * kInstructionSize); 2171b8021494Sopenharmony_ci __ dci(0x4445b4e3); // uadalp z3.h, p5/m, z7.b 2172b8021494Sopenharmony_ci // vl128 state = 0x3ad015af 2173b8021494Sopenharmony_ci __ dci(0x4445b4e1); // uadalp z1.h, p5/m, z7.b 2174b8021494Sopenharmony_ci // vl128 state = 0x3f53978b 2175b8021494Sopenharmony_ci __ dci(0x4445bc65); // uadalp z5.h, p7/m, z3.b 2176b8021494Sopenharmony_ci // vl128 state = 0xf3340744 2177b8021494Sopenharmony_ci __ dci(0x4445be35); // uadalp z21.h, p7/m, z17.b 2178b8021494Sopenharmony_ci // vl128 state = 0xb6f81377 2179b8021494Sopenharmony_ci __ dci(0x4445be9d); // uadalp z29.h, p7/m, z20.b 2180b8021494Sopenharmony_ci // vl128 state = 0xaf772b37 2181b8021494Sopenharmony_ci __ dci(0x4444bc9c); // sadalp z28.h, p7/m, z4.b 2182b8021494Sopenharmony_ci // vl128 state = 0x591be304 2183b8021494Sopenharmony_ci __ dci(0x4444bc9d); // sadalp z29.h, p7/m, z4.b 2184b8021494Sopenharmony_ci // vl128 state = 0x406d9d34 2185b8021494Sopenharmony_ci __ dci(0x4444ba99); // sadalp z25.h, p6/m, z20.b 2186b8021494Sopenharmony_ci // vl128 state = 0xb455880f 2187b8021494Sopenharmony_ci __ dci(0x44c4ba09); // sadalp z9.d, p6/m, z16.s 2188b8021494Sopenharmony_ci // vl128 state = 0x5ef8e2ed 2189b8021494Sopenharmony_ci __ dci(0x44c4ba01); // sadalp z1.d, p6/m, z16.s 2190b8021494Sopenharmony_ci // vl128 state = 0xca2ccf0d 2191b8021494Sopenharmony_ci __ dci(0x44c4ba11); // sadalp z17.d, p6/m, z16.s 2192b8021494Sopenharmony_ci // vl128 state = 0x33bb9903 2193b8021494Sopenharmony_ci __ dci(0x4484bb15); // sadalp z21.s, p6/m, z24.h 2194b8021494Sopenharmony_ci // vl128 state = 0x3964a356 2195b8021494Sopenharmony_ci __ dci(0x4484b957); // sadalp z23.s, p6/m, z10.h 2196b8021494Sopenharmony_ci // vl128 state = 0x1e1426d2 2197b8021494Sopenharmony_ci __ dci(0x4484b953); // sadalp z19.s, p6/m, z10.h 2198b8021494Sopenharmony_ci // vl128 state = 0x83e2e1a6 2199b8021494Sopenharmony_ci __ dci(0x4484b943); // sadalp z3.s, p6/m, z10.h 2200b8021494Sopenharmony_ci // vl128 state = 0x24335149 2201b8021494Sopenharmony_ci __ dci(0x4484b102); // sadalp z2.s, p4/m, z8.h 2202b8021494Sopenharmony_ci // vl128 state = 0x8bde109a 2203b8021494Sopenharmony_ci __ dci(0x4484bd06); // sadalp z6.s, p7/m, z8.h 2204b8021494Sopenharmony_ci // vl128 state = 0x5abf30eb 2205b8021494Sopenharmony_ci __ dci(0x4484bdc2); // sadalp z2.s, p7/m, z14.h 2206b8021494Sopenharmony_ci // vl128 state = 0xcb199381 2207b8021494Sopenharmony_ci __ dci(0x4485b5c6); // uadalp z6.s, p5/m, z14.h 2208b8021494Sopenharmony_ci // vl128 state = 0x5f3819ad 2209b8021494Sopenharmony_ci __ dci(0x4485b5c2); // uadalp z2.s, p5/m, z14.h 2210b8021494Sopenharmony_ci // vl128 state = 0x5f6d69e4 2211b8021494Sopenharmony_ci __ dci(0x4485b5ca); // uadalp z10.s, p5/m, z14.h 2212b8021494Sopenharmony_ci // vl128 state = 0x1a0d7053 2213b8021494Sopenharmony_ci __ dci(0x4485b15a); // uadalp z26.s, p4/m, z10.h 2214b8021494Sopenharmony_ci // vl128 state = 0x9081b6cd 2215b8021494Sopenharmony_ci __ dci(0x44c5b95e); // uadalp z30.d, p6/m, z10.s 2216b8021494Sopenharmony_ci // vl128 state = 0x6b15107e 2217b8021494Sopenharmony_ci __ dci(0x44c5a14e); // uadalp z14.d, p0/m, z10.s 2218b8021494Sopenharmony_ci // vl128 state = 0x4a127dc2 2219b8021494Sopenharmony_ci __ dci(0x4445a1c6); // uadalp z6.h, p0/m, z14.b 2220b8021494Sopenharmony_ci // vl128 state = 0x06902399 2221b8021494Sopenharmony_ci __ dci(0x4445a1ce); // uadalp z14.h, p0/m, z14.b 2222b8021494Sopenharmony_ci // vl128 state = 0x1789be4a 2223b8021494Sopenharmony_ci __ dci(0x4444a9de); // sadalp z30.h, p2/m, z14.b 2224b8021494Sopenharmony_ci // vl128 state = 0x86732543 2225b8021494Sopenharmony_ci __ dci(0x4444adff); // sadalp z31.h, p3/m, z15.b 2226b8021494Sopenharmony_ci // vl128 state = 0xe326faef 2227b8021494Sopenharmony_ci __ dci(0x4444bdb7); // sadalp z23.h, p7/m, z13.b 2228b8021494Sopenharmony_ci // vl128 state = 0x46d5f328 2229b8021494Sopenharmony_ci __ dci(0x4444bda7); // sadalp z7.h, p7/m, z13.b 2230b8021494Sopenharmony_ci // vl128 state = 0x5cf7a973 2231b8021494Sopenharmony_ci __ dci(0x4445bd25); // uadalp z5.h, p7/m, z9.b 2232b8021494Sopenharmony_ci // vl128 state = 0xdf8cbb97 2233b8021494Sopenharmony_ci __ dci(0x4485bd35); // uadalp z21.s, p7/m, z9.h 2234b8021494Sopenharmony_ci // vl128 state = 0x330c3d35 2235b8021494Sopenharmony_ci __ dci(0x4485bc17); // uadalp z23.s, p7/m, z0.h 2236b8021494Sopenharmony_ci // vl128 state = 0x6ebfa4fe 2237b8021494Sopenharmony_ci __ dci(0x4485bc15); // uadalp z21.s, p7/m, z0.h 2238b8021494Sopenharmony_ci // vl128 state = 0x52f18385 2239b8021494Sopenharmony_ci __ dci(0x4485be91); // uadalp z17.s, p7/m, z20.h 2240b8021494Sopenharmony_ci // vl128 state = 0x82fa2d85 2241b8021494Sopenharmony_ci __ dci(0x4485be53); // uadalp z19.s, p7/m, z18.h 2242b8021494Sopenharmony_ci // vl128 state = 0xa7d6098b 2243b8021494Sopenharmony_ci __ dci(0x4485aa52); // uadalp z18.s, p2/m, z18.h 2244b8021494Sopenharmony_ci // vl128 state = 0xfe8faafa 2245b8021494Sopenharmony_ci __ dci(0x4485ae13); // uadalp z19.s, p3/m, z16.h 2246b8021494Sopenharmony_ci // vl128 state = 0xf2465f31 2247b8021494Sopenharmony_ci __ dci(0x4485b617); // uadalp z23.s, p5/m, z16.h 2248b8021494Sopenharmony_ci // vl128 state = 0xed6be8ed 2249b8021494Sopenharmony_ci __ dci(0x4485bc13); // uadalp z19.s, p7/m, z0.h 2250b8021494Sopenharmony_ci // vl128 state = 0xb2f95c3d 2251b8021494Sopenharmony_ci } 2252b8021494Sopenharmony_ci 2253b8021494Sopenharmony_ci uint32_t state; 2254b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 2255b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 2256b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 2257b8021494Sopenharmony_ci 2258b8021494Sopenharmony_ci END(); 2259b8021494Sopenharmony_ci if (CAN_RUN()) { 2260b8021494Sopenharmony_ci RUN(); 2261b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 2262b8021494Sopenharmony_ci 0xb2f95c3d, 2263b8021494Sopenharmony_ci 0xa4189170, 2264b8021494Sopenharmony_ci 0xed9e7f9e, 2265b8021494Sopenharmony_ci 0xfca732cb, 2266b8021494Sopenharmony_ci 0x4c94b2d7, 2267b8021494Sopenharmony_ci 0x92a2fb21, 2268b8021494Sopenharmony_ci 0xbca62a5c, 2269b8021494Sopenharmony_ci 0x9aec54d6, 2270b8021494Sopenharmony_ci 0x8df82b02, 2271b8021494Sopenharmony_ci 0x50c18764, 2272b8021494Sopenharmony_ci 0xd27e5a0e, 2273b8021494Sopenharmony_ci 0x1a538cc6, 2274b8021494Sopenharmony_ci 0x538b673e, 2275b8021494Sopenharmony_ci 0x37e4b499, 2276b8021494Sopenharmony_ci 0x7160cbd5, 2277b8021494Sopenharmony_ci 0x113951bc, 2278b8021494Sopenharmony_ci }; 2279b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 2280b8021494Sopenharmony_ci } 2281b8021494Sopenharmony_ci} 2282b8021494Sopenharmony_ci 2283b8021494Sopenharmony_ciTEST_SVE(sve2_pmul_mul_vector_unpredicated) { 2284b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 2285b8021494Sopenharmony_ci CPUFeatures::kSVE2, 2286b8021494Sopenharmony_ci CPUFeatures::kNEON, 2287b8021494Sopenharmony_ci CPUFeatures::kCRC32); 2288b8021494Sopenharmony_ci START(); 2289b8021494Sopenharmony_ci 2290b8021494Sopenharmony_ci SetInitialMachineState(&masm); 2291b8021494Sopenharmony_ci // state = 0xe2bd2480 2292b8021494Sopenharmony_ci 2293b8021494Sopenharmony_ci { 2294b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 30 * kInstructionSize); 2295b8021494Sopenharmony_ci __ dci(0x04a56309); // mul z9.s, z24.s, z5.s 2296b8021494Sopenharmony_ci // vl128 state = 0x0ef461d5 2297b8021494Sopenharmony_ci __ dci(0x04a56148); // mul z8.s, z10.s, z5.s 2298b8021494Sopenharmony_ci // vl128 state = 0xce9f1381 2299b8021494Sopenharmony_ci __ dci(0x04a161d8); // mul z24.s, z14.s, z1.s 2300b8021494Sopenharmony_ci // vl128 state = 0x2a14ff8c 2301b8021494Sopenharmony_ci __ dci(0x04a16179); // mul z25.s, z11.s, z1.s 2302b8021494Sopenharmony_ci // vl128 state = 0x88a0241b 2303b8021494Sopenharmony_ci __ dci(0x04b36171); // mul z17.s, z11.s, z19.s 2304b8021494Sopenharmony_ci // vl128 state = 0x23aea8a6 2305b8021494Sopenharmony_ci __ dci(0x04fb6170); // mul z16.d, z11.d, z27.d 2306b8021494Sopenharmony_ci // vl128 state = 0x58eaa46d 2307b8021494Sopenharmony_ci __ dci(0x04fb6171); // mul z17.d, z11.d, z27.d 2308b8021494Sopenharmony_ci // vl128 state = 0xc733a399 2309b8021494Sopenharmony_ci __ dci(0x04fb6350); // mul z16.d, z26.d, z27.d 2310b8021494Sopenharmony_ci // vl128 state = 0x2806af41 2311b8021494Sopenharmony_ci __ dci(0x04eb6372); // mul z18.d, z27.d, z11.d 2312b8021494Sopenharmony_ci // vl128 state = 0x5ec775d1 2313b8021494Sopenharmony_ci __ dci(0x04eb6376); // mul z22.d, z27.d, z11.d 2314b8021494Sopenharmony_ci // vl128 state = 0x40d03f0d 2315b8021494Sopenharmony_ci __ dci(0x04ed637e); // mul z30.d, z27.d, z13.d 2316b8021494Sopenharmony_ci // vl128 state = 0xe3a61d56 2317b8021494Sopenharmony_ci __ dci(0x04e8637f); // mul z31.d, z27.d, z8.d 2318b8021494Sopenharmony_ci // vl128 state = 0x2eb4313f 2319b8021494Sopenharmony_ci __ dci(0x04a86337); // mul z23.s, z25.s, z8.s 2320b8021494Sopenharmony_ci // vl128 state = 0xc68e329e 2321b8021494Sopenharmony_ci __ dci(0x04a86336); // mul z22.s, z25.s, z8.s 2322b8021494Sopenharmony_ci // vl128 state = 0x177b1a43 2323b8021494Sopenharmony_ci __ dci(0x04ac63be); // mul z30.s, z29.s, z12.s 2324b8021494Sopenharmony_ci // vl128 state = 0xaaa415dd 2325b8021494Sopenharmony_ci __ dci(0x04ac63d6); // mul z22.s, z30.s, z12.s 2326b8021494Sopenharmony_ci // vl128 state = 0xaeb212b8 2327b8021494Sopenharmony_ci __ dci(0x042c67d2); // pmul z18.b, z30.b, z12.b 2328b8021494Sopenharmony_ci // vl128 state = 0xa11be1c8 2329b8021494Sopenharmony_ci __ dci(0x042c65f3); // pmul z19.b, z15.b, z12.b 2330b8021494Sopenharmony_ci // vl128 state = 0x8dd03a21 2331b8021494Sopenharmony_ci __ dci(0x042e65d2); // pmul z18.b, z14.b, z14.b 2332b8021494Sopenharmony_ci // vl128 state = 0x83ef9a66 2333b8021494Sopenharmony_ci __ dci(0x042f6550); // pmul z16.b, z10.b, z15.b 2334b8021494Sopenharmony_ci // vl128 state = 0x6a495368 2335b8021494Sopenharmony_ci __ dci(0x042e6754); // pmul z20.b, z26.b, z14.b 2336b8021494Sopenharmony_ci // vl128 state = 0x0b6c3ccf 2337b8021494Sopenharmony_ci __ dci(0x042e6750); // pmul z16.b, z26.b, z14.b 2338b8021494Sopenharmony_ci // vl128 state = 0xa745457f 2339b8021494Sopenharmony_ci __ dci(0x042e6600); // pmul z0.b, z16.b, z14.b 2340b8021494Sopenharmony_ci // vl128 state = 0x92fe8b9d 2341b8021494Sopenharmony_ci __ dci(0x042e6602); // pmul z2.b, z16.b, z14.b 2342b8021494Sopenharmony_ci // vl128 state = 0xda39ebe2 2343b8021494Sopenharmony_ci __ dci(0x043f6600); // pmul z0.b, z16.b, z31.b 2344b8021494Sopenharmony_ci // vl128 state = 0xcc36d223 2345b8021494Sopenharmony_ci __ dci(0x042b6608); // pmul z8.b, z16.b, z11.b 2346b8021494Sopenharmony_ci // vl128 state = 0x8b94d25a 2347b8021494Sopenharmony_ci __ dci(0x042a6700); // pmul z0.b, z24.b, z10.b 2348b8021494Sopenharmony_ci // vl128 state = 0x0118ccba 2349b8021494Sopenharmony_ci __ dci(0x042a6710); // pmul z16.b, z24.b, z10.b 2350b8021494Sopenharmony_ci // vl128 state = 0x4b38543b 2351b8021494Sopenharmony_ci __ dci(0x042a6714); // pmul z20.b, z24.b, z10.b 2352b8021494Sopenharmony_ci // vl128 state = 0xa54e126f 2353b8021494Sopenharmony_ci __ dci(0x042a6716); // pmul z22.b, z24.b, z10.b 2354b8021494Sopenharmony_ci // vl128 state = 0x61ad87c9 2355b8021494Sopenharmony_ci } 2356b8021494Sopenharmony_ci 2357b8021494Sopenharmony_ci uint32_t state; 2358b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 2359b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 2360b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 2361b8021494Sopenharmony_ci 2362b8021494Sopenharmony_ci END(); 2363b8021494Sopenharmony_ci if (CAN_RUN()) { 2364b8021494Sopenharmony_ci RUN(); 2365b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 2366b8021494Sopenharmony_ci 0x61ad87c9, 2367b8021494Sopenharmony_ci 0x82df488f, 2368b8021494Sopenharmony_ci 0xc0d7c1a4, 2369b8021494Sopenharmony_ci 0x4f86e761, 2370b8021494Sopenharmony_ci 0x8d651d7b, 2371b8021494Sopenharmony_ci 0x294cf55a, 2372b8021494Sopenharmony_ci 0x060ab34c, 2373b8021494Sopenharmony_ci 0x1db0e99c, 2374b8021494Sopenharmony_ci 0x4b0b59d7, 2375b8021494Sopenharmony_ci 0xcee6dfd1, 2376b8021494Sopenharmony_ci 0x29575669, 2377b8021494Sopenharmony_ci 0x5c1c7922, 2378b8021494Sopenharmony_ci 0x4b1957ed, 2379b8021494Sopenharmony_ci 0x8bc5712b, 2380b8021494Sopenharmony_ci 0x6ac59fdc, 2381b8021494Sopenharmony_ci 0x048ce1b5, 2382b8021494Sopenharmony_ci }; 2383b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 2384b8021494Sopenharmony_ci } 2385b8021494Sopenharmony_ci} 2386b8021494Sopenharmony_ci 2387b8021494Sopenharmony_ciTEST_SVE(sve2_smulh_umulh_vector_unpredicated) { 2388b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 2389b8021494Sopenharmony_ci CPUFeatures::kSVE2, 2390b8021494Sopenharmony_ci CPUFeatures::kNEON, 2391b8021494Sopenharmony_ci CPUFeatures::kCRC32); 2392b8021494Sopenharmony_ci START(); 2393b8021494Sopenharmony_ci 2394b8021494Sopenharmony_ci SetInitialMachineState(&masm); 2395b8021494Sopenharmony_ci // state = 0xe2bd2480 2396b8021494Sopenharmony_ci 2397b8021494Sopenharmony_ci { 2398b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 30 * kInstructionSize); 2399b8021494Sopenharmony_ci __ dci(0x04e46c3b); // umulh z27.d, z1.d, z4.d 2400b8021494Sopenharmony_ci // vl128 state = 0xfb66ba83 2401b8021494Sopenharmony_ci __ dci(0x04ac6c3a); // umulh z26.s, z1.s, z12.s 2402b8021494Sopenharmony_ci // vl128 state = 0x45cdb9a2 2403b8021494Sopenharmony_ci __ dci(0x04a86e32); // umulh z18.s, z17.s, z8.s 2404b8021494Sopenharmony_ci // vl128 state = 0x4ad150dc 2405b8021494Sopenharmony_ci __ dci(0x04a86a7a); // smulh z26.s, z19.s, z8.s 2406b8021494Sopenharmony_ci // vl128 state = 0xbf08e2cb 2407b8021494Sopenharmony_ci __ dci(0x04e86b7b); // smulh z27.d, z27.d, z8.d 2408b8021494Sopenharmony_ci // vl128 state = 0x51ad0655 2409b8021494Sopenharmony_ci __ dci(0x04ee6b73); // smulh z19.d, z27.d, z14.d 2410b8021494Sopenharmony_ci // vl128 state = 0xf764bda9 2411b8021494Sopenharmony_ci __ dci(0x04ec6f7b); // umulh z27.d, z27.d, z12.d 2412b8021494Sopenharmony_ci // vl128 state = 0xc90f20ef 2413b8021494Sopenharmony_ci __ dci(0x04ac6f3a); // umulh z26.s, z25.s, z12.s 2414b8021494Sopenharmony_ci // vl128 state = 0x9ec08333 2415b8021494Sopenharmony_ci __ dci(0x04ac6f32); // umulh z18.s, z25.s, z12.s 2416b8021494Sopenharmony_ci // vl128 state = 0x3620406c 2417b8021494Sopenharmony_ci __ dci(0x042e6f3a); // umulh z26.b, z25.b, z14.b 2418b8021494Sopenharmony_ci // vl128 state = 0x4e18467a 2419b8021494Sopenharmony_ci __ dci(0x042a6b2a); // smulh z10.b, z25.b, z10.b 2420b8021494Sopenharmony_ci // vl128 state = 0x13c7cd6f 2421b8021494Sopenharmony_ci __ dci(0x042a6b2b); // smulh z11.b, z25.b, z10.b 2422b8021494Sopenharmony_ci // vl128 state = 0x16a44c1b 2423b8021494Sopenharmony_ci __ dci(0x043a6b03); // smulh z3.b, z24.b, z26.b 2424b8021494Sopenharmony_ci // vl128 state = 0x9f8f203b 2425b8021494Sopenharmony_ci __ dci(0x047a690b); // smulh z11.h, z8.h, z26.h 2426b8021494Sopenharmony_ci // vl128 state = 0xce0aa45e 2427b8021494Sopenharmony_ci __ dci(0x047a690a); // smulh z10.h, z8.h, z26.h 2428b8021494Sopenharmony_ci // vl128 state = 0xb667d59b 2429b8021494Sopenharmony_ci __ dci(0x0479690e); // smulh z14.h, z8.h, z25.h 2430b8021494Sopenharmony_ci // vl128 state = 0xd76639b7 2431b8021494Sopenharmony_ci __ dci(0x046d690c); // smulh z12.h, z8.h, z13.h 2432b8021494Sopenharmony_ci // vl128 state = 0x736b227e 2433b8021494Sopenharmony_ci __ dci(0x042f690e); // smulh z14.b, z8.b, z15.b 2434b8021494Sopenharmony_ci // vl128 state = 0xc0804df9 2435b8021494Sopenharmony_ci __ dci(0x042f69ac); // smulh z12.b, z13.b, z15.b 2436b8021494Sopenharmony_ci // vl128 state = 0x8a5509f5 2437b8021494Sopenharmony_ci __ dci(0x042f696e); // smulh z14.b, z11.b, z15.b 2438b8021494Sopenharmony_ci // vl128 state = 0x761f9cf8 2439b8021494Sopenharmony_ci __ dci(0x042e6b6a); // smulh z10.b, z27.b, z14.b 2440b8021494Sopenharmony_ci // vl128 state = 0x3b5f2705 2441b8021494Sopenharmony_ci __ dci(0x042e6b6e); // smulh z14.b, z27.b, z14.b 2442b8021494Sopenharmony_ci // vl128 state = 0x53b23a0a 2443b8021494Sopenharmony_ci __ dci(0x04366b6f); // smulh z15.b, z27.b, z22.b 2444b8021494Sopenharmony_ci // vl128 state = 0x5bd53ce9 2445b8021494Sopenharmony_ci __ dci(0x04766f7f); // umulh z31.h, z27.h, z22.h 2446b8021494Sopenharmony_ci // vl128 state = 0x701bec8f 2447b8021494Sopenharmony_ci __ dci(0x04746fef); // umulh z15.h, z31.h, z20.h 2448b8021494Sopenharmony_ci // vl128 state = 0x29697c8c 2449b8021494Sopenharmony_ci __ dci(0x04706dee); // umulh z14.h, z15.h, z16.h 2450b8021494Sopenharmony_ci // vl128 state = 0x2088f1c2 2451b8021494Sopenharmony_ci __ dci(0x04706c7e); // umulh z30.h, z3.h, z16.h 2452b8021494Sopenharmony_ci // vl128 state = 0x56224145 2453b8021494Sopenharmony_ci __ dci(0x04306c2e); // umulh z14.b, z1.b, z16.b 2454b8021494Sopenharmony_ci // vl128 state = 0x2ba58c9c 2455b8021494Sopenharmony_ci __ dci(0x04b06e2a); // umulh z10.s, z17.s, z16.s 2456b8021494Sopenharmony_ci // vl128 state = 0xb933d058 2457b8021494Sopenharmony_ci __ dci(0x04b56e2e); // umulh z14.s, z17.s, z21.s 2458b8021494Sopenharmony_ci // vl128 state = 0x184daee9 2459b8021494Sopenharmony_ci } 2460b8021494Sopenharmony_ci 2461b8021494Sopenharmony_ci uint32_t state; 2462b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 2463b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 2464b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 2465b8021494Sopenharmony_ci 2466b8021494Sopenharmony_ci END(); 2467b8021494Sopenharmony_ci if (CAN_RUN()) { 2468b8021494Sopenharmony_ci RUN(); 2469b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 2470b8021494Sopenharmony_ci 0x184daee9, 2471b8021494Sopenharmony_ci 0x19454232, 2472b8021494Sopenharmony_ci 0xa56823a3, 2473b8021494Sopenharmony_ci 0xe334897a, 2474b8021494Sopenharmony_ci 0xcaa988e1, 2475b8021494Sopenharmony_ci 0x614cbf4f, 2476b8021494Sopenharmony_ci 0xfaa384e4, 2477b8021494Sopenharmony_ci 0x4b45e885, 2478b8021494Sopenharmony_ci 0xef930ead, 2479b8021494Sopenharmony_ci 0x49304b9a, 2480b8021494Sopenharmony_ci 0x4f1d830e, 2481b8021494Sopenharmony_ci 0xa41c1a95, 2482b8021494Sopenharmony_ci 0xa1ea8d07, 2483b8021494Sopenharmony_ci 0x62ca97b4, 2484b8021494Sopenharmony_ci 0x15f52cac, 2485b8021494Sopenharmony_ci 0xc190cd57, 2486b8021494Sopenharmony_ci }; 2487b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 2488b8021494Sopenharmony_ci } 2489b8021494Sopenharmony_ci} 2490b8021494Sopenharmony_ci 2491b8021494Sopenharmony_ciTEST_SVE(sve2_arith_interleaved_long) { 2492b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 2493b8021494Sopenharmony_ci CPUFeatures::kSVE2, 2494b8021494Sopenharmony_ci CPUFeatures::kNEON, 2495b8021494Sopenharmony_ci CPUFeatures::kCRC32); 2496b8021494Sopenharmony_ci START(); 2497b8021494Sopenharmony_ci 2498b8021494Sopenharmony_ci SetInitialMachineState(&masm); 2499b8021494Sopenharmony_ci // state = 0xe2bd2480 2500b8021494Sopenharmony_ci 2501b8021494Sopenharmony_ci { 2502b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 2503b8021494Sopenharmony_ci __ dci(0x459289bd); // ssublbt z29.s, z13.h, z18.h 2504b8021494Sopenharmony_ci // vl128 state = 0xe2e0965a 2505b8021494Sopenharmony_ci __ dci(0x459289bf); // ssublbt z31.s, z13.h, z18.h 2506b8021494Sopenharmony_ci // vl128 state = 0x64e3e1a3 2507b8021494Sopenharmony_ci __ dci(0x45d689be); // ssublbt z30.d, z13.s, z22.s 2508b8021494Sopenharmony_ci // vl128 state = 0x02711ec2 2509b8021494Sopenharmony_ci __ dci(0x45d68916); // ssublbt z22.d, z8.s, z22.s 2510b8021494Sopenharmony_ci // vl128 state = 0x7ff6f63f 2511b8021494Sopenharmony_ci __ dci(0x45968957); // ssublbt z23.s, z10.h, z22.h 2512b8021494Sopenharmony_ci // vl128 state = 0xa9aace7f 2513b8021494Sopenharmony_ci __ dci(0x45968a55); // ssublbt z21.s, z18.h, z22.h 2514b8021494Sopenharmony_ci // vl128 state = 0x6007d46c 2515b8021494Sopenharmony_ci __ dci(0x45868251); // saddlbt z17.s, z18.h, z6.h 2516b8021494Sopenharmony_ci // vl128 state = 0xecea329d 2517b8021494Sopenharmony_ci __ dci(0x45868230); // saddlbt z16.s, z17.h, z6.h 2518b8021494Sopenharmony_ci // vl128 state = 0xa16880b8 2519b8021494Sopenharmony_ci __ dci(0x45868231); // saddlbt z17.s, z17.h, z6.h 2520b8021494Sopenharmony_ci // vl128 state = 0xcff73a01 2521b8021494Sopenharmony_ci __ dci(0x458c8235); // saddlbt z21.s, z17.h, z12.h 2522b8021494Sopenharmony_ci // vl128 state = 0xf6486b24 2523b8021494Sopenharmony_ci __ dci(0x458c8231); // saddlbt z17.s, z17.h, z12.h 2524b8021494Sopenharmony_ci // vl128 state = 0xa5612e07 2525b8021494Sopenharmony_ci __ dci(0x459c8021); // saddlbt z1.s, z1.h, z28.h 2526b8021494Sopenharmony_ci // vl128 state = 0xd71ab1e8 2527b8021494Sopenharmony_ci __ dci(0x458c8009); // saddlbt z9.s, z0.h, z12.h 2528b8021494Sopenharmony_ci // vl128 state = 0xaf74bd16 2529b8021494Sopenharmony_ci __ dci(0x459e800b); // saddlbt z11.s, z0.h, z30.h 2530b8021494Sopenharmony_ci // vl128 state = 0x96dee616 2531b8021494Sopenharmony_ci __ dci(0x45928003); // saddlbt z3.s, z0.h, z18.h 2532b8021494Sopenharmony_ci // vl128 state = 0x652e9cca 2533b8021494Sopenharmony_ci __ dci(0x45d28207); // saddlbt z7.d, z16.s, z18.s 2534b8021494Sopenharmony_ci // vl128 state = 0xc6b07290 2535b8021494Sopenharmony_ci __ dci(0x45da8225); // saddlbt z5.d, z17.s, z26.s 2536b8021494Sopenharmony_ci // vl128 state = 0x8c74a35d 2537b8021494Sopenharmony_ci __ dci(0x45da830d); // saddlbt z13.d, z24.s, z26.s 2538b8021494Sopenharmony_ci // vl128 state = 0xff620001 2539b8021494Sopenharmony_ci __ dci(0x45cb8309); // saddlbt z9.d, z24.s, z11.s 2540b8021494Sopenharmony_ci // vl128 state = 0x2147f374 2541b8021494Sopenharmony_ci __ dci(0x45ca8119); // saddlbt z25.d, z8.s, z10.s 2542b8021494Sopenharmony_ci // vl128 state = 0x6f961936 2543b8021494Sopenharmony_ci __ dci(0x45ce831d); // saddlbt z29.d, z24.s, z14.s 2544b8021494Sopenharmony_ci // vl128 state = 0xaa91e68a 2545b8021494Sopenharmony_ci __ dci(0x45ce8135); // saddlbt z21.d, z9.s, z14.s 2546b8021494Sopenharmony_ci // vl128 state = 0xa5635d0e 2547b8021494Sopenharmony_ci __ dci(0x458e8331); // saddlbt z17.s, z25.h, z14.h 2548b8021494Sopenharmony_ci // vl128 state = 0xa0705ea7 2549b8021494Sopenharmony_ci __ dci(0x458e8030); // saddlbt z16.s, z1.h, z14.h 2550b8021494Sopenharmony_ci // vl128 state = 0x397dc4d5 2551b8021494Sopenharmony_ci __ dci(0x458e8271); // saddlbt z17.s, z19.h, z14.h 2552b8021494Sopenharmony_ci // vl128 state = 0x5e975082 2553b8021494Sopenharmony_ci __ dci(0x458a82e1); // saddlbt z1.s, z23.h, z10.h 2554b8021494Sopenharmony_ci // vl128 state = 0x048f8dea 2555b8021494Sopenharmony_ci __ dci(0x458a8240); // saddlbt z0.s, z18.h, z10.h 2556b8021494Sopenharmony_ci // vl128 state = 0xd9104514 2557b8021494Sopenharmony_ci __ dci(0x458a8e50); // ssubltb z16.s, z18.h, z10.h 2558b8021494Sopenharmony_ci // vl128 state = 0x6afbf8b6 2559b8021494Sopenharmony_ci __ dci(0x45988e58); // ssubltb z24.s, z18.h, z24.h 2560b8021494Sopenharmony_ci // vl128 state = 0xfe44a2f8 2561b8021494Sopenharmony_ci __ dci(0x45d08e59); // ssubltb z25.d, z18.s, z16.s 2562b8021494Sopenharmony_ci // vl128 state = 0x050fb0ab 2563b8021494Sopenharmony_ci __ dci(0x45d08e58); // ssubltb z24.d, z18.s, z16.s 2564b8021494Sopenharmony_ci // vl128 state = 0xc9160f61 2565b8021494Sopenharmony_ci __ dci(0x45d08259); // saddlbt z25.d, z18.s, z16.s 2566b8021494Sopenharmony_ci // vl128 state = 0x70ae0c4a 2567b8021494Sopenharmony_ci __ dci(0x45d08b51); // ssublbt z17.d, z26.s, z16.s 2568b8021494Sopenharmony_ci // vl128 state = 0xe627770c 2569b8021494Sopenharmony_ci __ dci(0x45d08970); // ssublbt z16.d, z11.s, z16.s 2570b8021494Sopenharmony_ci // vl128 state = 0x445fd924 2571b8021494Sopenharmony_ci __ dci(0x45d28d74); // ssubltb z20.d, z11.s, z18.s 2572b8021494Sopenharmony_ci // vl128 state = 0x8c7dd6c0 2573b8021494Sopenharmony_ci __ dci(0x45c28d56); // ssubltb z22.d, z10.s, z2.s 2574b8021494Sopenharmony_ci // vl128 state = 0x925de210 2575b8021494Sopenharmony_ci __ dci(0x45c28d52); // ssubltb z18.d, z10.s, z2.s 2576b8021494Sopenharmony_ci // vl128 state = 0x28b67c05 2577b8021494Sopenharmony_ci __ dci(0x45c48d5a); // ssubltb z26.d, z10.s, z4.s 2578b8021494Sopenharmony_ci // vl128 state = 0x48e8377c 2579b8021494Sopenharmony_ci __ dci(0x45c18d5b); // ssubltb z27.d, z10.s, z1.s 2580b8021494Sopenharmony_ci // vl128 state = 0xb46af33e 2581b8021494Sopenharmony_ci __ dci(0x45818d13); // ssubltb z19.s, z8.h, z1.h 2582b8021494Sopenharmony_ci // vl128 state = 0x12fada0b 2583b8021494Sopenharmony_ci __ dci(0x45818d12); // ssubltb z18.s, z8.h, z1.h 2584b8021494Sopenharmony_ci // vl128 state = 0xeaeea3cd 2585b8021494Sopenharmony_ci __ dci(0x45858d9a); // ssubltb z26.s, z12.h, z5.h 2586b8021494Sopenharmony_ci // vl128 state = 0x6d466bd8 2587b8021494Sopenharmony_ci __ dci(0x45858df2); // ssubltb z18.s, z15.h, z5.h 2588b8021494Sopenharmony_ci // vl128 state = 0x60c67411 2589b8021494Sopenharmony_ci __ dci(0x45c58d62); // ssubltb z2.d, z11.s, z5.s 2590b8021494Sopenharmony_ci // vl128 state = 0xec3b40ed 2591b8021494Sopenharmony_ci __ dci(0x45c58b72); // ssublbt z18.d, z27.s, z5.s 2592b8021494Sopenharmony_ci // vl128 state = 0x5b421b0a 2593b8021494Sopenharmony_ci __ dci(0x45858a76); // ssublbt z22.s, z19.h, z5.h 2594b8021494Sopenharmony_ci // vl128 state = 0x8a0f26e9 2595b8021494Sopenharmony_ci __ dci(0x45878877); // ssublbt z23.s, z3.h, z7.h 2596b8021494Sopenharmony_ci // vl128 state = 0xc224293b 2597b8021494Sopenharmony_ci __ dci(0x458f8073); // saddlbt z19.s, z3.h, z15.h 2598b8021494Sopenharmony_ci // vl128 state = 0x9f5c0b50 2599b8021494Sopenharmony_ci __ dci(0x45878051); // saddlbt z17.s, z2.h, z7.h 2600b8021494Sopenharmony_ci // vl128 state = 0x2ae674c9 2601b8021494Sopenharmony_ci __ dci(0x45838841); // ssublbt z1.s, z2.h, z3.h 2602b8021494Sopenharmony_ci // vl128 state = 0x1dff4e20 2603b8021494Sopenharmony_ci } 2604b8021494Sopenharmony_ci 2605b8021494Sopenharmony_ci uint32_t state; 2606b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 2607b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 2608b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 2609b8021494Sopenharmony_ci 2610b8021494Sopenharmony_ci END(); 2611b8021494Sopenharmony_ci if (CAN_RUN()) { 2612b8021494Sopenharmony_ci RUN(); 2613b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 2614b8021494Sopenharmony_ci 0x1dff4e20, 2615b8021494Sopenharmony_ci 0x3d2c11df, 2616b8021494Sopenharmony_ci 0x64caeccf, 2617b8021494Sopenharmony_ci 0x7940c227, 2618b8021494Sopenharmony_ci 0xf5f59485, 2619b8021494Sopenharmony_ci 0x7ad48c48, 2620b8021494Sopenharmony_ci 0xcde4523b, 2621b8021494Sopenharmony_ci 0xcb5849f0, 2622b8021494Sopenharmony_ci 0x1e7e9722, 2623b8021494Sopenharmony_ci 0x8049333f, 2624b8021494Sopenharmony_ci 0x40d95eb3, 2625b8021494Sopenharmony_ci 0x628a428d, 2626b8021494Sopenharmony_ci 0x1cf123f2, 2627b8021494Sopenharmony_ci 0x8d377510, 2628b8021494Sopenharmony_ci 0x44a03b91, 2629b8021494Sopenharmony_ci 0xabe90e98, 2630b8021494Sopenharmony_ci }; 2631b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 2632b8021494Sopenharmony_ci } 2633b8021494Sopenharmony_ci} 2634b8021494Sopenharmony_ci 2635b8021494Sopenharmony_ciTEST_SVE(sve2_sqabs_sqneg) { 2636b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 2637b8021494Sopenharmony_ci CPUFeatures::kSVE2, 2638b8021494Sopenharmony_ci CPUFeatures::kNEON, 2639b8021494Sopenharmony_ci CPUFeatures::kCRC32); 2640b8021494Sopenharmony_ci START(); 2641b8021494Sopenharmony_ci 2642b8021494Sopenharmony_ci SetInitialMachineState(&masm); 2643b8021494Sopenharmony_ci // state = 0xe2bd2480 2644b8021494Sopenharmony_ci 2645b8021494Sopenharmony_ci { 2646b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 2647b8021494Sopenharmony_ci __ dci(0x4448b23a); // sqabs z26.h, p4/m, z17.h 2648b8021494Sopenharmony_ci // vl128 state = 0x4aadd589 2649b8021494Sopenharmony_ci __ dci(0x4448b23e); // sqabs z30.h, p4/m, z17.h 2650b8021494Sopenharmony_ci // vl128 state = 0x86da455e 2651b8021494Sopenharmony_ci __ dci(0x4448a21c); // sqabs z28.h, p0/m, z16.h 2652b8021494Sopenharmony_ci // vl128 state = 0x4eecab5c 2653b8021494Sopenharmony_ci __ dci(0x4408a298); // sqabs z24.b, p0/m, z20.b 2654b8021494Sopenharmony_ci // vl128 state = 0xf81ee16e 2655b8021494Sopenharmony_ci __ dci(0x4408a0dc); // sqabs z28.b, p0/m, z6.b 2656b8021494Sopenharmony_ci // vl128 state = 0x84b94ec5 2657b8021494Sopenharmony_ci __ dci(0x4408a0de); // sqabs z30.b, p0/m, z6.b 2658b8021494Sopenharmony_ci // vl128 state = 0x626db033 2659b8021494Sopenharmony_ci __ dci(0x4408a19c); // sqabs z28.b, p0/m, z12.b 2660b8021494Sopenharmony_ci // vl128 state = 0x181303a1 2661b8021494Sopenharmony_ci __ dci(0x4408a3d4); // sqabs z20.b, p0/m, z30.b 2662b8021494Sopenharmony_ci // vl128 state = 0xf4e93ff3 2663b8021494Sopenharmony_ci __ dci(0x4489a3dc); // sqneg z28.s, p0/m, z30.s 2664b8021494Sopenharmony_ci // vl128 state = 0xffe7a865 2665b8021494Sopenharmony_ci __ dci(0x4409a1d4); // sqneg z20.b, p0/m, z14.b 2666b8021494Sopenharmony_ci // vl128 state = 0x6a27d8fe 2667b8021494Sopenharmony_ci __ dci(0x4408a3d0); // sqabs z16.b, p0/m, z30.b 2668b8021494Sopenharmony_ci // vl128 state = 0x9ffc0414 2669b8021494Sopenharmony_ci __ dci(0x44c8a3d8); // sqabs z24.d, p0/m, z30.d 2670b8021494Sopenharmony_ci // vl128 state = 0xd59acd78 2671b8021494Sopenharmony_ci __ dci(0x44c8b3fa); // sqabs z26.d, p4/m, z31.d 2672b8021494Sopenharmony_ci // vl128 state = 0x8853f8ac 2673b8021494Sopenharmony_ci __ dci(0x44c8a2fb); // sqabs z27.d, p0/m, z23.d 2674b8021494Sopenharmony_ci // vl128 state = 0x439e9079 2675b8021494Sopenharmony_ci __ dci(0x44c8a2f9); // sqabs z25.d, p0/m, z23.d 2676b8021494Sopenharmony_ci // vl128 state = 0xbaaa56a6 2677b8021494Sopenharmony_ci __ dci(0x4488a2db); // sqabs z27.s, p0/m, z22.s 2678b8021494Sopenharmony_ci // vl128 state = 0x328cbd5a 2679b8021494Sopenharmony_ci __ dci(0x4488a2df); // sqabs z31.s, p0/m, z22.s 2680b8021494Sopenharmony_ci // vl128 state = 0x4a74b2da 2681b8021494Sopenharmony_ci __ dci(0x4488a2cf); // sqabs z15.s, p0/m, z22.s 2682b8021494Sopenharmony_ci // vl128 state = 0x52af62a6 2683b8021494Sopenharmony_ci __ dci(0x4488a04b); // sqabs z11.s, p0/m, z2.s 2684b8021494Sopenharmony_ci // vl128 state = 0xa45aef42 2685b8021494Sopenharmony_ci __ dci(0x4488a02f); // sqabs z15.s, p0/m, z1.s 2686b8021494Sopenharmony_ci // vl128 state = 0x0b5444ed 2687b8021494Sopenharmony_ci __ dci(0x4489a06d); // sqneg z13.s, p0/m, z3.s 2688b8021494Sopenharmony_ci // vl128 state = 0x6f0912d5 2689b8021494Sopenharmony_ci __ dci(0x4489a449); // sqneg z9.s, p1/m, z2.s 2690b8021494Sopenharmony_ci // vl128 state = 0x669ac78a 2691b8021494Sopenharmony_ci __ dci(0x4489a50b); // sqneg z11.s, p1/m, z8.s 2692b8021494Sopenharmony_ci // vl128 state = 0x58ae27ee 2693b8021494Sopenharmony_ci __ dci(0x4488a71b); // sqabs z27.s, p1/m, z24.s 2694b8021494Sopenharmony_ci // vl128 state = 0xa54925f9 2695b8021494Sopenharmony_ci __ dci(0x4408a519); // sqabs z25.b, p1/m, z8.b 2696b8021494Sopenharmony_ci // vl128 state = 0x45c13095 2697b8021494Sopenharmony_ci __ dci(0x4408a158); // sqabs z24.b, p0/m, z10.b 2698b8021494Sopenharmony_ci // vl128 state = 0x2d6d547a 2699b8021494Sopenharmony_ci __ dci(0x4488a168); // sqabs z8.s, p0/m, z11.s 2700b8021494Sopenharmony_ci // vl128 state = 0xc976b77b 2701b8021494Sopenharmony_ci __ dci(0x44c9a16c); // sqneg z12.d, p0/m, z11.d 2702b8021494Sopenharmony_ci // vl128 state = 0x766e750f 2703b8021494Sopenharmony_ci __ dci(0x44c9a17c); // sqneg z28.d, p0/m, z11.d 2704b8021494Sopenharmony_ci // vl128 state = 0xbf22858d 2705b8021494Sopenharmony_ci __ dci(0x44c9a878); // sqneg z24.d, p2/m, z3.d 2706b8021494Sopenharmony_ci // vl128 state = 0xe563a474 2707b8021494Sopenharmony_ci __ dci(0x44c9a8d9); // sqneg z25.d, p2/m, z6.d 2708b8021494Sopenharmony_ci // vl128 state = 0x573c2648 2709b8021494Sopenharmony_ci __ dci(0x44c9b85b); // sqneg z27.d, p6/m, z2.d 2710b8021494Sopenharmony_ci // vl128 state = 0x03cdf714 2711b8021494Sopenharmony_ci __ dci(0x4449b87f); // sqneg z31.h, p6/m, z3.h 2712b8021494Sopenharmony_ci // vl128 state = 0xff4e2cb1 2713b8021494Sopenharmony_ci __ dci(0x4449b81d); // sqneg z29.h, p6/m, z0.h 2714b8021494Sopenharmony_ci // vl128 state = 0xaab7065e 2715b8021494Sopenharmony_ci __ dci(0x4449a895); // sqneg z21.h, p2/m, z4.h 2716b8021494Sopenharmony_ci // vl128 state = 0x60d4a6d3 2717b8021494Sopenharmony_ci __ dci(0x4449a825); // sqneg z5.h, p2/m, z1.h 2718b8021494Sopenharmony_ci // vl128 state = 0x3bed34e4 2719b8021494Sopenharmony_ci __ dci(0x4449a821); // sqneg z1.h, p2/m, z1.h 2720b8021494Sopenharmony_ci // vl128 state = 0xaa750880 2721b8021494Sopenharmony_ci __ dci(0x4449a820); // sqneg z0.h, p2/m, z1.h 2722b8021494Sopenharmony_ci // vl128 state = 0xfca9d635 2723b8021494Sopenharmony_ci __ dci(0x4449a822); // sqneg z2.h, p2/m, z1.h 2724b8021494Sopenharmony_ci // vl128 state = 0x8a92f3e7 2725b8021494Sopenharmony_ci __ dci(0x4449ae23); // sqneg z3.h, p3/m, z17.h 2726b8021494Sopenharmony_ci // vl128 state = 0xc2db1ac5 2727b8021494Sopenharmony_ci __ dci(0x4449af73); // sqneg z19.h, p3/m, z27.h 2728b8021494Sopenharmony_ci // vl128 state = 0x386f5f27 2729b8021494Sopenharmony_ci __ dci(0x4449af77); // sqneg z23.h, p3/m, z27.h 2730b8021494Sopenharmony_ci // vl128 state = 0xff4fd505 2731b8021494Sopenharmony_ci __ dci(0x4489af67); // sqneg z7.s, p3/m, z27.s 2732b8021494Sopenharmony_ci // vl128 state = 0x4c897605 2733b8021494Sopenharmony_ci __ dci(0x4489ad25); // sqneg z5.s, p3/m, z9.s 2734b8021494Sopenharmony_ci // vl128 state = 0xcc73333a 2735b8021494Sopenharmony_ci __ dci(0x4409ad07); // sqneg z7.b, p3/m, z8.b 2736b8021494Sopenharmony_ci // vl128 state = 0x58d37b50 2737b8021494Sopenharmony_ci __ dci(0x4489ad85); // sqneg z5.s, p3/m, z12.s 2738b8021494Sopenharmony_ci // vl128 state = 0x2a142b9d 2739b8021494Sopenharmony_ci __ dci(0x44c9a984); // sqneg z4.d, p2/m, z12.d 2740b8021494Sopenharmony_ci // vl128 state = 0x006fd35a 2741b8021494Sopenharmony_ci __ dci(0x44c9a926); // sqneg z6.d, p2/m, z9.d 2742b8021494Sopenharmony_ci // vl128 state = 0x06c05c5d 2743b8021494Sopenharmony_ci __ dci(0x4449ab2e); // sqneg z14.h, p2/m, z25.h 2744b8021494Sopenharmony_ci // vl128 state = 0xe41a6fc4 2745b8021494Sopenharmony_ci __ dci(0x4449ab3e); // sqneg z30.h, p2/m, z25.h 2746b8021494Sopenharmony_ci // vl128 state = 0x6e574bec 2747b8021494Sopenharmony_ci } 2748b8021494Sopenharmony_ci 2749b8021494Sopenharmony_ci uint32_t state; 2750b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 2751b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 2752b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 2753b8021494Sopenharmony_ci 2754b8021494Sopenharmony_ci END(); 2755b8021494Sopenharmony_ci if (CAN_RUN()) { 2756b8021494Sopenharmony_ci RUN(); 2757b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 2758b8021494Sopenharmony_ci 0x6e574bec, 2759b8021494Sopenharmony_ci 0xec677945, 2760b8021494Sopenharmony_ci 0xe7357ba7, 2761b8021494Sopenharmony_ci 0xbbf92859, 2762b8021494Sopenharmony_ci 0x3f42d943, 2763b8021494Sopenharmony_ci 0xe2db0bb1, 2764b8021494Sopenharmony_ci 0x704d1161, 2765b8021494Sopenharmony_ci 0xc0e1f809, 2766b8021494Sopenharmony_ci 0x887dd5e7, 2767b8021494Sopenharmony_ci 0x452b8b80, 2768b8021494Sopenharmony_ci 0xcf455511, 2769b8021494Sopenharmony_ci 0x821ad0bc, 2770b8021494Sopenharmony_ci 0xb98b1eac, 2771b8021494Sopenharmony_ci 0x49ae6871, 2772b8021494Sopenharmony_ci 0x16b2e0a6, 2773b8021494Sopenharmony_ci 0xaba4d260, 2774b8021494Sopenharmony_ci }; 2775b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 2776b8021494Sopenharmony_ci } 2777b8021494Sopenharmony_ci} 2778b8021494Sopenharmony_ci 2779b8021494Sopenharmony_ciTEST_SVE(sve2_urecpe_ursqrte) { 2780b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 2781b8021494Sopenharmony_ci CPUFeatures::kSVE2, 2782b8021494Sopenharmony_ci CPUFeatures::kNEON, 2783b8021494Sopenharmony_ci CPUFeatures::kCRC32); 2784b8021494Sopenharmony_ci START(); 2785b8021494Sopenharmony_ci 2786b8021494Sopenharmony_ci SetInitialMachineState(&masm); 2787b8021494Sopenharmony_ci // state = 0xe2bd2480 2788b8021494Sopenharmony_ci 2789b8021494Sopenharmony_ci { 2790b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 20 * kInstructionSize); 2791b8021494Sopenharmony_ci __ dci(0x4481bee8); // ursqrte z8.s, p7/m, z23.s 2792b8021494Sopenharmony_ci // vl128 state = 0x38c317d5 2793b8021494Sopenharmony_ci __ dci(0x4480bea9); // urecpe z9.s, p7/m, z21.s 2794b8021494Sopenharmony_ci // vl128 state = 0x8412e46d 2795b8021494Sopenharmony_ci __ dci(0x4481bfab); // ursqrte z11.s, p7/m, z29.s 2796b8021494Sopenharmony_ci // vl128 state = 0xae6c2805 2797b8021494Sopenharmony_ci __ dci(0x4481b9a3); // ursqrte z3.s, p6/m, z13.s 2798b8021494Sopenharmony_ci // vl128 state = 0x114331ab 2799b8021494Sopenharmony_ci __ dci(0x4481aba2); // ursqrte z2.s, p2/m, z29.s 2800b8021494Sopenharmony_ci // vl128 state = 0x88f2308d 2801b8021494Sopenharmony_ci __ dci(0x4480abe6); // urecpe z6.s, p2/m, z31.s 2802b8021494Sopenharmony_ci // vl128 state = 0x328b45b8 2803b8021494Sopenharmony_ci __ dci(0x4480afa2); // urecpe z2.s, p3/m, z29.s 2804b8021494Sopenharmony_ci // vl128 state = 0x7b67ded4 2805b8021494Sopenharmony_ci __ dci(0x4480ae23); // urecpe z3.s, p3/m, z17.s 2806b8021494Sopenharmony_ci // vl128 state = 0x48d1ac45 2807b8021494Sopenharmony_ci __ dci(0x4481aa27); // ursqrte z7.s, p2/m, z17.s 2808b8021494Sopenharmony_ci // vl128 state = 0x475f61b6 2809b8021494Sopenharmony_ci __ dci(0x4481a325); // ursqrte z5.s, p0/m, z25.s 2810b8021494Sopenharmony_ci // vl128 state = 0xfbf0b767 2811b8021494Sopenharmony_ci __ dci(0x4481a321); // ursqrte z1.s, p0/m, z25.s 2812b8021494Sopenharmony_ci // vl128 state = 0x31481484 2813b8021494Sopenharmony_ci __ dci(0x4481ab05); // ursqrte z5.s, p2/m, z24.s 2814b8021494Sopenharmony_ci // vl128 state = 0x5aca5e43 2815b8021494Sopenharmony_ci __ dci(0x4481a995); // ursqrte z21.s, p2/m, z12.s 2816b8021494Sopenharmony_ci // vl128 state = 0xe3b96378 2817b8021494Sopenharmony_ci __ dci(0x4481bb91); // ursqrte z17.s, p6/m, z28.s 2818b8021494Sopenharmony_ci // vl128 state = 0x9d469964 2819b8021494Sopenharmony_ci __ dci(0x4481b199); // ursqrte z25.s, p4/m, z12.s 2820b8021494Sopenharmony_ci // vl128 state = 0xbbabbb9d 2821b8021494Sopenharmony_ci __ dci(0x4481a989); // ursqrte z9.s, p2/m, z12.s 2822b8021494Sopenharmony_ci // vl128 state = 0xf83e651c 2823b8021494Sopenharmony_ci __ dci(0x4481b18b); // ursqrte z11.s, p4/m, z12.s 2824b8021494Sopenharmony_ci // vl128 state = 0x70a808da 2825b8021494Sopenharmony_ci __ dci(0x4480b089); // urecpe z9.s, p4/m, z4.s 2826b8021494Sopenharmony_ci // vl128 state = 0x427916ac 2827b8021494Sopenharmony_ci __ dci(0x4480b2c1); // urecpe z1.s, p4/m, z22.s 2828b8021494Sopenharmony_ci // vl128 state = 0xbf35be88 2829b8021494Sopenharmony_ci __ dci(0x4480aad1); // urecpe z17.s, p2/m, z22.s 2830b8021494Sopenharmony_ci // vl128 state = 0xaf69727b 2831b8021494Sopenharmony_ci } 2832b8021494Sopenharmony_ci 2833b8021494Sopenharmony_ci uint32_t state; 2834b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 2835b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 2836b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 2837b8021494Sopenharmony_ci 2838b8021494Sopenharmony_ci END(); 2839b8021494Sopenharmony_ci if (CAN_RUN()) { 2840b8021494Sopenharmony_ci RUN(); 2841b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 2842b8021494Sopenharmony_ci 0xaf69727b, 2843b8021494Sopenharmony_ci 0x7fda1a01, 2844b8021494Sopenharmony_ci 0xd299e078, 2845b8021494Sopenharmony_ci 0x9a794a84, 2846b8021494Sopenharmony_ci 0x47a453c1, 2847b8021494Sopenharmony_ci 0xecc67cf0, 2848b8021494Sopenharmony_ci 0x04122ec2, 2849b8021494Sopenharmony_ci 0x82dd5669, 2850b8021494Sopenharmony_ci 0xcb2bb910, 2851b8021494Sopenharmony_ci 0xcc73c54c, 2852b8021494Sopenharmony_ci 0x4660030f, 2853b8021494Sopenharmony_ci 0x7c42b056, 2854b8021494Sopenharmony_ci 0x498a73b1, 2855b8021494Sopenharmony_ci 0x1de89fad, 2856b8021494Sopenharmony_ci 0x5411c616, 2857b8021494Sopenharmony_ci 0x9f378bac, 2858b8021494Sopenharmony_ci }; 2859b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 2860b8021494Sopenharmony_ci } 2861b8021494Sopenharmony_ci} 2862b8021494Sopenharmony_ci 2863b8021494Sopenharmony_ciTEST_SVE(sve2_arith_long) { 2864b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 2865b8021494Sopenharmony_ci CPUFeatures::kSVE2, 2866b8021494Sopenharmony_ci CPUFeatures::kNEON, 2867b8021494Sopenharmony_ci CPUFeatures::kCRC32); 2868b8021494Sopenharmony_ci START(); 2869b8021494Sopenharmony_ci 2870b8021494Sopenharmony_ci SetInitialMachineState(&masm); 2871b8021494Sopenharmony_ci // state = 0xe2bd2480 2872b8021494Sopenharmony_ci 2873b8021494Sopenharmony_ci { 2874b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 2875b8021494Sopenharmony_ci __ dci(0x45573eac); // uabdlt z12.h, z21.b, z23.b 2876b8021494Sopenharmony_ci // vl128 state = 0x2ee2e7d4 2877b8021494Sopenharmony_ci __ dci(0x45573c84); // uabdlt z4.h, z4.b, z23.b 2878b8021494Sopenharmony_ci // vl128 state = 0x33413c6f 2879b8021494Sopenharmony_ci __ dci(0x45571d8c); // usublt z12.h, z12.b, z23.b 2880b8021494Sopenharmony_ci // vl128 state = 0xb95ffb7e 2881b8021494Sopenharmony_ci __ dci(0x45971d8e); // usublt z14.s, z12.h, z23.h 2882b8021494Sopenharmony_ci // vl128 state = 0xac4d0015 2883b8021494Sopenharmony_ci __ dci(0x45d7158c); // ssublt z12.d, z12.s, z23.s 2884b8021494Sopenharmony_ci // vl128 state = 0xe5341703 2885b8021494Sopenharmony_ci __ dci(0x4557119c); // ssublb z28.h, z12.b, z23.b 2886b8021494Sopenharmony_ci // vl128 state = 0x744f8598 2887b8021494Sopenharmony_ci __ dci(0x45d5118c); // ssublb z12.d, z12.s, z21.s 2888b8021494Sopenharmony_ci // vl128 state = 0x120c8bf7 2889b8021494Sopenharmony_ci __ dci(0x45551088); // ssublb z8.h, z4.b, z21.b 2890b8021494Sopenharmony_ci // vl128 state = 0xbf53c9ed 2891b8021494Sopenharmony_ci __ dci(0x455410cc); // ssublb z12.h, z6.b, z20.b 2892b8021494Sopenharmony_ci // vl128 state = 0x2642a908 2893b8021494Sopenharmony_ci __ dci(0x454414c8); // ssublt z8.h, z6.b, z4.b 2894b8021494Sopenharmony_ci // vl128 state = 0x0682c7d0 2895b8021494Sopenharmony_ci __ dci(0x454510c9); // ssublb z9.h, z6.b, z5.b 2896b8021494Sopenharmony_ci // vl128 state = 0x1966420e 2897b8021494Sopenharmony_ci __ dci(0x455510ed); // ssublb z13.h, z7.b, z21.b 2898b8021494Sopenharmony_ci // vl128 state = 0xdd0ec707 2899b8021494Sopenharmony_ci __ dci(0x455508ef); // uaddlb z15.h, z7.b, z21.b 2900b8021494Sopenharmony_ci // vl128 state = 0x0756dbf9 2901b8021494Sopenharmony_ci __ dci(0x455502e7); // saddlb z7.h, z23.b, z21.b 2902b8021494Sopenharmony_ci // vl128 state = 0xb991e688 2903b8021494Sopenharmony_ci __ dci(0x455d06f7); // saddlt z23.h, z23.b, z29.b 2904b8021494Sopenharmony_ci // vl128 state = 0x55399de0 2905b8021494Sopenharmony_ci __ dci(0x455f06df); // saddlt z31.h, z22.b, z31.b 2906b8021494Sopenharmony_ci // vl128 state = 0x3379dce4 2907b8021494Sopenharmony_ci __ dci(0x45de06db); // saddlt z27.d, z22.s, z30.s 2908b8021494Sopenharmony_ci // vl128 state = 0xebf6b857 2909b8021494Sopenharmony_ci __ dci(0x45c606da); // saddlt z26.d, z22.s, z6.s 2910b8021494Sopenharmony_ci // vl128 state = 0x7625ec15 2911b8021494Sopenharmony_ci __ dci(0x45c306db); // saddlt z27.d, z22.s, z3.s 2912b8021494Sopenharmony_ci // vl128 state = 0x549988fd 2913b8021494Sopenharmony_ci __ dci(0x455306d3); // saddlt z19.h, z22.b, z19.b 2914b8021494Sopenharmony_ci // vl128 state = 0xb645cb0f 2915b8021494Sopenharmony_ci __ dci(0x455306d1); // saddlt z17.h, z22.b, z19.b 2916b8021494Sopenharmony_ci // vl128 state = 0x20a70427 2917b8021494Sopenharmony_ci __ dci(0x455306d3); // saddlt z19.h, z22.b, z19.b 2918b8021494Sopenharmony_ci // vl128 state = 0xd263ec78 2919b8021494Sopenharmony_ci __ dci(0x45510edb); // uaddlt z27.h, z22.b, z17.b 2920b8021494Sopenharmony_ci // vl128 state = 0xeecd9b44 2921b8021494Sopenharmony_ci __ dci(0x45510bdf); // uaddlb z31.h, z30.b, z17.b 2922b8021494Sopenharmony_ci // vl128 state = 0x0577c3d4 2923b8021494Sopenharmony_ci __ dci(0x45d10b4f); // uaddlb z15.d, z26.s, z17.s 2924b8021494Sopenharmony_ci // vl128 state = 0xca18b475 2925b8021494Sopenharmony_ci __ dci(0x45810b47); // uaddlb z7.s, z26.h, z1.h 2926b8021494Sopenharmony_ci // vl128 state = 0xdfe68417 2927b8021494Sopenharmony_ci __ dci(0x45811bc3); // usublb z3.s, z30.h, z1.h 2928b8021494Sopenharmony_ci // vl128 state = 0x96fe0360 2929b8021494Sopenharmony_ci __ dci(0x45891b82); // usublb z2.s, z28.h, z9.h 2930b8021494Sopenharmony_ci // vl128 state = 0x7e58a9d5 2931b8021494Sopenharmony_ci __ dci(0x4589398a); // uabdlb z10.s, z12.h, z9.h 2932b8021494Sopenharmony_ci // vl128 state = 0xd7612435 2933b8021494Sopenharmony_ci __ dci(0x458919ab); // usublb z11.s, z13.h, z9.h 2934b8021494Sopenharmony_ci // vl128 state = 0x8842dbca 2935b8021494Sopenharmony_ci __ dci(0x45cb19af); // usublb z15.d, z13.s, z11.s 2936b8021494Sopenharmony_ci // vl128 state = 0xfcac3d0f 2937b8021494Sopenharmony_ci __ dci(0x45cb19bf); // usublb z31.d, z13.s, z11.s 2938b8021494Sopenharmony_ci // vl128 state = 0x7b4952d6 2939b8021494Sopenharmony_ci __ dci(0x45cb190f); // usublb z15.d, z8.s, z11.s 2940b8021494Sopenharmony_ci // vl128 state = 0xb41cb8a3 2941b8021494Sopenharmony_ci __ dci(0x45cb1d8d); // usublt z13.d, z12.s, z11.s 2942b8021494Sopenharmony_ci // vl128 state = 0x9197543e 2943b8021494Sopenharmony_ci __ dci(0x45cb1d89); // usublt z9.d, z12.s, z11.s 2944b8021494Sopenharmony_ci // vl128 state = 0x3cc7e16c 2945b8021494Sopenharmony_ci __ dci(0x454b0d8b); // uaddlt z11.h, z12.b, z11.b 2946b8021494Sopenharmony_ci // vl128 state = 0x5c52744d 2947b8021494Sopenharmony_ci __ dci(0x45cb1d8a); // usublt z10.d, z12.s, z11.s 2948b8021494Sopenharmony_ci // vl128 state = 0x24c91c53 2949b8021494Sopenharmony_ci __ dci(0x454f1d8e); // usublt z14.h, z12.b, z15.b 2950b8021494Sopenharmony_ci // vl128 state = 0x0091f2f1 2951b8021494Sopenharmony_ci __ dci(0x455b1d8f); // usublt z15.h, z12.b, z27.b 2952b8021494Sopenharmony_ci // vl128 state = 0x521f94f7 2953b8021494Sopenharmony_ci __ dci(0x455a1c87); // usublt z7.h, z4.b, z26.b 2954b8021494Sopenharmony_ci // vl128 state = 0xa0631870 2955b8021494Sopenharmony_ci __ dci(0x454a1cb7); // usublt z23.h, z5.b, z10.b 2956b8021494Sopenharmony_ci // vl128 state = 0x089384c7 2957b8021494Sopenharmony_ci __ dci(0x454218a7); // usublb z7.h, z5.b, z2.b 2958b8021494Sopenharmony_ci // vl128 state = 0xe8c3c063 2959b8021494Sopenharmony_ci __ dci(0x454a19a6); // usublb z6.h, z13.b, z10.b 2960b8021494Sopenharmony_ci // vl128 state = 0x7a9f53ab 2961b8021494Sopenharmony_ci __ dci(0x454a3da2); // uabdlt z2.h, z13.b, z10.b 2962b8021494Sopenharmony_ci // vl128 state = 0x68d5f375 2963b8021494Sopenharmony_ci __ dci(0x45423ca6); // uabdlt z6.h, z5.b, z2.b 2964b8021494Sopenharmony_ci // vl128 state = 0x2c980ff7 2965b8021494Sopenharmony_ci __ dci(0x454a34a7); // sabdlt z7.h, z5.b, z10.b 2966b8021494Sopenharmony_ci // vl128 state = 0xe38196aa 2967b8021494Sopenharmony_ci __ dci(0x454a3466); // sabdlt z6.h, z3.b, z10.b 2968b8021494Sopenharmony_ci // vl128 state = 0x86c5bcb2 2969b8021494Sopenharmony_ci __ dci(0x454b146e); // ssublt z14.h, z3.b, z11.b 2970b8021494Sopenharmony_ci // vl128 state = 0xf8527375 2971b8021494Sopenharmony_ci __ dci(0x454b146a); // ssublt z10.h, z3.b, z11.b 2972b8021494Sopenharmony_ci // vl128 state = 0xf4bfb710 2973b8021494Sopenharmony_ci __ dci(0x454b147a); // ssublt z26.h, z3.b, z11.b 2974b8021494Sopenharmony_ci // vl128 state = 0xe1000ccf 2975b8021494Sopenharmony_ci } 2976b8021494Sopenharmony_ci 2977b8021494Sopenharmony_ci uint32_t state; 2978b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 2979b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 2980b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 2981b8021494Sopenharmony_ci 2982b8021494Sopenharmony_ci END(); 2983b8021494Sopenharmony_ci if (CAN_RUN()) { 2984b8021494Sopenharmony_ci RUN(); 2985b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 2986b8021494Sopenharmony_ci 0xe1000ccf, 2987b8021494Sopenharmony_ci 0xd320fd27, 2988b8021494Sopenharmony_ci 0x356a62d9, 2989b8021494Sopenharmony_ci 0xc6245994, 2990b8021494Sopenharmony_ci 0x78aeec8a, 2991b8021494Sopenharmony_ci 0xb5d0402b, 2992b8021494Sopenharmony_ci 0x06684b9e, 2993b8021494Sopenharmony_ci 0x6033f51d, 2994b8021494Sopenharmony_ci 0xd174ee86, 2995b8021494Sopenharmony_ci 0x80baaecc, 2996b8021494Sopenharmony_ci 0x2c9b263c, 2997b8021494Sopenharmony_ci 0x3fba551a, 2998b8021494Sopenharmony_ci 0x489fb8b7, 2999b8021494Sopenharmony_ci 0x862c9b27, 3000b8021494Sopenharmony_ci 0xc0549096, 3001b8021494Sopenharmony_ci 0xa927d570, 3002b8021494Sopenharmony_ci }; 3003b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 3004b8021494Sopenharmony_ci } 3005b8021494Sopenharmony_ci} 3006b8021494Sopenharmony_ci 3007b8021494Sopenharmony_ciTEST_SVE(sve2_arith_wide) { 3008b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 3009b8021494Sopenharmony_ci CPUFeatures::kSVE2, 3010b8021494Sopenharmony_ci CPUFeatures::kNEON, 3011b8021494Sopenharmony_ci CPUFeatures::kCRC32); 3012b8021494Sopenharmony_ci START(); 3013b8021494Sopenharmony_ci 3014b8021494Sopenharmony_ci SetInitialMachineState(&masm); 3015b8021494Sopenharmony_ci // state = 0xe2bd2480 3016b8021494Sopenharmony_ci 3017b8021494Sopenharmony_ci { 3018b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 3019b8021494Sopenharmony_ci __ dci(0x45494683); // saddwt z3.h, z20.h, z9.b 3020b8021494Sopenharmony_ci // vl128 state = 0x9a3fc71a 3021b8021494Sopenharmony_ci __ dci(0x45494687); // saddwt z7.h, z20.h, z9.b 3022b8021494Sopenharmony_ci // vl128 state = 0xb016cb2f 3023b8021494Sopenharmony_ci __ dci(0x454b46d7); // saddwt z23.h, z22.h, z11.b 3024b8021494Sopenharmony_ci // vl128 state = 0x5ce3d8a0 3025b8021494Sopenharmony_ci __ dci(0x455b56d5); // ssubwt z21.h, z22.h, z27.b 3026b8021494Sopenharmony_ci // vl128 state = 0xbace5453 3027b8021494Sopenharmony_ci __ dci(0x455b567d); // ssubwt z29.h, z19.h, z27.b 3028b8021494Sopenharmony_ci // vl128 state = 0x1f510928 3029b8021494Sopenharmony_ci __ dci(0x455b506d); // ssubwb z13.h, z3.h, z27.b 3030b8021494Sopenharmony_ci // vl128 state = 0x19ea553e 3031b8021494Sopenharmony_ci __ dci(0x4559502f); // ssubwb z15.h, z1.h, z25.b 3032b8021494Sopenharmony_ci // vl128 state = 0x4d88e5db 3033b8021494Sopenharmony_ci __ dci(0x45d95427); // ssubwt z7.d, z1.d, z25.s 3034b8021494Sopenharmony_ci // vl128 state = 0x069804b6 3035b8021494Sopenharmony_ci __ dci(0x45d95426); // ssubwt z6.d, z1.d, z25.s 3036b8021494Sopenharmony_ci // vl128 state = 0xfe46cf10 3037b8021494Sopenharmony_ci __ dci(0x45db5c36); // usubwt z22.d, z1.d, z27.s 3038b8021494Sopenharmony_ci // vl128 state = 0xad3c8120 3039b8021494Sopenharmony_ci __ dci(0x45d95d37); // usubwt z23.d, z9.d, z25.s 3040b8021494Sopenharmony_ci // vl128 state = 0x833d76fb 3041b8021494Sopenharmony_ci __ dci(0x45d55d27); // usubwt z7.d, z9.d, z21.s 3042b8021494Sopenharmony_ci // vl128 state = 0xc536845d 3043b8021494Sopenharmony_ci __ dci(0x45d44d25); // uaddwt z5.d, z9.d, z20.s 3044b8021494Sopenharmony_ci // vl128 state = 0x21f5a29c 3045b8021494Sopenharmony_ci __ dci(0x45dc4927); // uaddwb z7.d, z9.d, z28.s 3046b8021494Sopenharmony_ci // vl128 state = 0xfe67da2a 3047b8021494Sopenharmony_ci __ dci(0x455c490f); // uaddwb z15.h, z8.h, z28.b 3048b8021494Sopenharmony_ci // vl128 state = 0x5ec5d506 3049b8021494Sopenharmony_ci __ dci(0x455c490b); // uaddwb z11.h, z8.h, z28.b 3050b8021494Sopenharmony_ci // vl128 state = 0x74b7d2fc 3051b8021494Sopenharmony_ci __ dci(0x45584923); // uaddwb z3.h, z9.h, z24.b 3052b8021494Sopenharmony_ci // vl128 state = 0xa785f3c3 3053b8021494Sopenharmony_ci __ dci(0x45584922); // uaddwb z2.h, z9.h, z24.b 3054b8021494Sopenharmony_ci // vl128 state = 0x373049c0 3055b8021494Sopenharmony_ci __ dci(0x45584940); // uaddwb z0.h, z10.h, z24.b 3056b8021494Sopenharmony_ci // vl128 state = 0xbf385483 3057b8021494Sopenharmony_ci __ dci(0x45da4944); // uaddwb z4.d, z10.d, z26.s 3058b8021494Sopenharmony_ci // vl128 state = 0x94cd3b86 3059b8021494Sopenharmony_ci __ dci(0x45524945); // uaddwb z5.h, z10.h, z18.b 3060b8021494Sopenharmony_ci // vl128 state = 0x8535094f 3061b8021494Sopenharmony_ci __ dci(0x4540494d); // uaddwb z13.h, z10.h, z0.b 3062b8021494Sopenharmony_ci // vl128 state = 0x328abbdb 3063b8021494Sopenharmony_ci __ dci(0x45c04909); // uaddwb z9.d, z8.d, z0.s 3064b8021494Sopenharmony_ci // vl128 state = 0x253064cb 3065b8021494Sopenharmony_ci __ dci(0x45c8498d); // uaddwb z13.d, z12.d, z8.s 3066b8021494Sopenharmony_ci // vl128 state = 0xa1b39fe0 3067b8021494Sopenharmony_ci __ dci(0x45c0418f); // saddwb z15.d, z12.d, z0.s 3068b8021494Sopenharmony_ci // vl128 state = 0xa72048d9 3069b8021494Sopenharmony_ci __ dci(0x45d84187); // saddwb z7.d, z12.d, z24.s 3070b8021494Sopenharmony_ci // vl128 state = 0x4c8a23ac 3071b8021494Sopenharmony_ci __ dci(0x45dc5197); // ssubwb z23.d, z12.d, z28.s 3072b8021494Sopenharmony_ci // vl128 state = 0x352a3d60 3073b8021494Sopenharmony_ci __ dci(0x45dc5d93); // usubwt z19.d, z12.d, z28.s 3074b8021494Sopenharmony_ci // vl128 state = 0x404b9e8b 3075b8021494Sopenharmony_ci __ dci(0x45dd5592); // ssubwt z18.d, z12.d, z29.s 3076b8021494Sopenharmony_ci // vl128 state = 0xf46cc758 3077b8021494Sopenharmony_ci __ dci(0x45dd5550); // ssubwt z16.d, z10.d, z29.s 3078b8021494Sopenharmony_ci // vl128 state = 0x171ebd36 3079b8021494Sopenharmony_ci __ dci(0x45cd55d4); // ssubwt z20.d, z14.d, z13.s 3080b8021494Sopenharmony_ci // vl128 state = 0x4f2ef46f 3081b8021494Sopenharmony_ci __ dci(0x45dd5dd5); // usubwt z21.d, z14.d, z29.s 3082b8021494Sopenharmony_ci // vl128 state = 0x0c9ab301 3083b8021494Sopenharmony_ci __ dci(0x45dd5dc5); // usubwt z5.d, z14.d, z29.s 3084b8021494Sopenharmony_ci // vl128 state = 0x67a10e22 3085b8021494Sopenharmony_ci __ dci(0x454d5dd5); // usubwt z21.h, z14.h, z13.b 3086b8021494Sopenharmony_ci // vl128 state = 0xb4bd21c0 3087b8021494Sopenharmony_ci __ dci(0x454d4dfd); // uaddwt z29.h, z15.h, z13.b 3088b8021494Sopenharmony_ci // vl128 state = 0x8df5f90f 3089b8021494Sopenharmony_ci __ dci(0x45494fed); // uaddwt z13.h, z31.h, z9.b 3090b8021494Sopenharmony_ci // vl128 state = 0x913f7aa4 3091b8021494Sopenharmony_ci __ dci(0x45cb4fef); // uaddwt z15.d, z31.d, z11.s 3092b8021494Sopenharmony_ci // vl128 state = 0xa23d1307 3093b8021494Sopenharmony_ci __ dci(0x454b47ff); // saddwt z31.h, z31.h, z11.b 3094b8021494Sopenharmony_ci // vl128 state = 0x026ff306 3095b8021494Sopenharmony_ci __ dci(0x454747f7); // saddwt z23.h, z31.h, z7.b 3096b8021494Sopenharmony_ci // vl128 state = 0x9abf0566 3097b8021494Sopenharmony_ci __ dci(0x45c743f6); // saddwb z22.d, z31.d, z7.s 3098b8021494Sopenharmony_ci // vl128 state = 0x27031d0e 3099b8021494Sopenharmony_ci __ dci(0x45c74b66); // uaddwb z6.d, z27.d, z7.s 3100b8021494Sopenharmony_ci // vl128 state = 0xc6f3a976 3101b8021494Sopenharmony_ci __ dci(0x45474be4); // uaddwb z4.h, z31.h, z7.b 3102b8021494Sopenharmony_ci // vl128 state = 0xededea24 3103b8021494Sopenharmony_ci __ dci(0x454349e0); // uaddwb z0.h, z15.h, z3.b 3104b8021494Sopenharmony_ci // vl128 state = 0xf1092d40 3105b8021494Sopenharmony_ci __ dci(0x454359c1); // usubwb z1.h, z14.h, z3.b 3106b8021494Sopenharmony_ci // vl128 state = 0x2d96f026 3107b8021494Sopenharmony_ci __ dci(0x45535983); // usubwb z3.h, z12.h, z19.b 3108b8021494Sopenharmony_ci // vl128 state = 0x5a9cab0c 3109b8021494Sopenharmony_ci __ dci(0x45535981); // usubwb z1.h, z12.h, z19.b 3110b8021494Sopenharmony_ci // vl128 state = 0x7f8d695f 3111b8021494Sopenharmony_ci __ dci(0x45535a83); // usubwb z3.h, z20.h, z19.b 3112b8021494Sopenharmony_ci // vl128 state = 0xb0ae0f62 3113b8021494Sopenharmony_ci __ dci(0x45d35e81); // usubwt z1.d, z20.d, z19.s 3114b8021494Sopenharmony_ci // vl128 state = 0xfe7e227b 3115b8021494Sopenharmony_ci __ dci(0x45d25ec9); // usubwt z9.d, z22.d, z18.s 3116b8021494Sopenharmony_ci // vl128 state = 0xed9dd734 3117b8021494Sopenharmony_ci __ dci(0x45d35e88); // usubwt z8.d, z20.d, z19.s 3118b8021494Sopenharmony_ci // vl128 state = 0x943f8d24 3119b8021494Sopenharmony_ci } 3120b8021494Sopenharmony_ci 3121b8021494Sopenharmony_ci uint32_t state; 3122b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 3123b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 3124b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 3125b8021494Sopenharmony_ci 3126b8021494Sopenharmony_ci END(); 3127b8021494Sopenharmony_ci if (CAN_RUN()) { 3128b8021494Sopenharmony_ci RUN(); 3129b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 3130b8021494Sopenharmony_ci 0x943f8d24, 3131b8021494Sopenharmony_ci 0xfe956248, 3132b8021494Sopenharmony_ci 0xfefddb40, 3133b8021494Sopenharmony_ci 0x4d92bfb3, 3134b8021494Sopenharmony_ci 0x01dcd5b1, 3135b8021494Sopenharmony_ci 0x29a23c92, 3136b8021494Sopenharmony_ci 0xb7587530, 3137b8021494Sopenharmony_ci 0xa56fa28c, 3138b8021494Sopenharmony_ci 0xa0f8590d, 3139b8021494Sopenharmony_ci 0xa6b883a4, 3140b8021494Sopenharmony_ci 0x2e50d1fd, 3141b8021494Sopenharmony_ci 0x8e976f55, 3142b8021494Sopenharmony_ci 0xb21bd3b1, 3143b8021494Sopenharmony_ci 0x0c3586e5, 3144b8021494Sopenharmony_ci 0xe3d7e7e6, 3145b8021494Sopenharmony_ci 0xb1e0e34f, 3146b8021494Sopenharmony_ci }; 3147b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 3148b8021494Sopenharmony_ci } 3149b8021494Sopenharmony_ci} 3150b8021494Sopenharmony_ci 3151b8021494Sopenharmony_ciTEST_SVE(sve2_shift_long) { 3152b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 3153b8021494Sopenharmony_ci CPUFeatures::kSVE2, 3154b8021494Sopenharmony_ci CPUFeatures::kNEON, 3155b8021494Sopenharmony_ci CPUFeatures::kCRC32); 3156b8021494Sopenharmony_ci START(); 3157b8021494Sopenharmony_ci 3158b8021494Sopenharmony_ci SetInitialMachineState(&masm); 3159b8021494Sopenharmony_ci // state = 0xe2bd2480 3160b8021494Sopenharmony_ci 3161b8021494Sopenharmony_ci { 3162b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 3163b8021494Sopenharmony_ci __ dci(0x4518aafc); // ushllb z28.s, z23.h, #8 3164b8021494Sopenharmony_ci // vl128 state = 0x07dfb216 3165b8021494Sopenharmony_ci __ dci(0x4518afec); // ushllt z12.s, z31.h, #8 3166b8021494Sopenharmony_ci // vl128 state = 0xe3c5d68c 3167b8021494Sopenharmony_ci __ dci(0x4518adc4); // ushllt z4.s, z14.h, #8 3168b8021494Sopenharmony_ci // vl128 state = 0xce8721fc 3169b8021494Sopenharmony_ci __ dci(0x4518a1c5); // sshllb z5.s, z14.h, #8 3170b8021494Sopenharmony_ci // vl128 state = 0x71820bae 3171b8021494Sopenharmony_ci __ dci(0x4508a9cd); // ushllb z13.h, z14.b, #0 3172b8021494Sopenharmony_ci // vl128 state = 0xfdc3f7b3 3173b8021494Sopenharmony_ci __ dci(0x4508ad9d); // ushllt z29.h, z12.b, #0 3174b8021494Sopenharmony_ci // vl128 state = 0x93c1f606 3175b8021494Sopenharmony_ci __ dci(0x4508a795); // sshllt z21.h, z28.b, #0 3176b8021494Sopenharmony_ci // vl128 state = 0x15ebcb72 3177b8021494Sopenharmony_ci __ dci(0x450caf94); // ushllt z20.h, z28.b, #4 3178b8021494Sopenharmony_ci // vl128 state = 0x76c630f5 3179b8021494Sopenharmony_ci __ dci(0x4508afd6); // ushllt z22.h, z30.b, #0 3180b8021494Sopenharmony_ci // vl128 state = 0xa9c6dfbc 3181b8021494Sopenharmony_ci __ dci(0x4509aed7); // ushllt z23.h, z22.b, #1 3182b8021494Sopenharmony_ci // vl128 state = 0xa5942073 3183b8021494Sopenharmony_ci __ dci(0x4508ae55); // ushllt z21.h, z18.b, #0 3184b8021494Sopenharmony_ci // vl128 state = 0xe4348777 3185b8021494Sopenharmony_ci __ dci(0x450cac51); // ushllt z17.h, z2.b, #4 3186b8021494Sopenharmony_ci // vl128 state = 0x91c6e6ea 3187b8021494Sopenharmony_ci __ dci(0x450ca870); // ushllb z16.h, z3.b, #4 3188b8021494Sopenharmony_ci // vl128 state = 0x40393ae8 3189b8021494Sopenharmony_ci __ dci(0x450ca031); // sshllb z17.h, z1.b, #4 3190b8021494Sopenharmony_ci // vl128 state = 0x8b9526e8 3191b8021494Sopenharmony_ci __ dci(0x450aa030); // sshllb z16.h, z1.b, #2 3192b8021494Sopenharmony_ci // vl128 state = 0xd3d0857a 3193b8021494Sopenharmony_ci __ dci(0x450aa031); // sshllb z17.h, z1.b, #2 3194b8021494Sopenharmony_ci // vl128 state = 0xbdd18de2 3195b8021494Sopenharmony_ci __ dci(0x450ba233); // sshllb z19.h, z17.b, #3 3196b8021494Sopenharmony_ci // vl128 state = 0x5e5f6f2a 3197b8021494Sopenharmony_ci __ dci(0x4509a263); // sshllb z3.h, z19.b, #1 3198b8021494Sopenharmony_ci // vl128 state = 0xa3b5427b 3199b8021494Sopenharmony_ci __ dci(0x450da673); // sshllt z19.h, z19.b, #5 3200b8021494Sopenharmony_ci // vl128 state = 0x97472b22 3201b8021494Sopenharmony_ci __ dci(0x451da477); // sshllt z23.s, z3.h, #13 3202b8021494Sopenharmony_ci // vl128 state = 0xe6da4012 3203b8021494Sopenharmony_ci __ dci(0x451da5f6); // sshllt z22.s, z15.h, #13 3204b8021494Sopenharmony_ci // vl128 state = 0x11630552 3205b8021494Sopenharmony_ci __ dci(0x450da5b4); // sshllt z20.h, z13.b, #5 3206b8021494Sopenharmony_ci // vl128 state = 0xe9a4cad0 3207b8021494Sopenharmony_ci __ dci(0x450da5d5); // sshllt z21.h, z14.b, #5 3208b8021494Sopenharmony_ci // vl128 state = 0x750d4143 3209b8021494Sopenharmony_ci __ dci(0x450fa4d7); // sshllt z23.h, z6.b, #7 3210b8021494Sopenharmony_ci // vl128 state = 0xc441984c 3211b8021494Sopenharmony_ci __ dci(0x451ba4df); // sshllt z31.s, z6.h, #11 3212b8021494Sopenharmony_ci // vl128 state = 0x9a3899af 3213b8021494Sopenharmony_ci __ dci(0x451ba4db); // sshllt z27.s, z6.h, #11 3214b8021494Sopenharmony_ci // vl128 state = 0xbb6684bb 3215b8021494Sopenharmony_ci __ dci(0x451ba4bf); // sshllt z31.s, z5.h, #11 3216b8021494Sopenharmony_ci // vl128 state = 0x45a2cf1e 3217b8021494Sopenharmony_ci __ dci(0x451aa49b); // sshllt z27.s, z4.h, #10 3218b8021494Sopenharmony_ci // vl128 state = 0xac10df2f 3219b8021494Sopenharmony_ci __ dci(0x451aa49f); // sshllt z31.s, z4.h, #10 3220b8021494Sopenharmony_ci // vl128 state = 0x9cecdbd8 3221b8021494Sopenharmony_ci __ dci(0x451aa89b); // ushllb z27.s, z4.h, #10 3222b8021494Sopenharmony_ci // vl128 state = 0x73fca806 3223b8021494Sopenharmony_ci __ dci(0x4518aa9f); // ushllb z31.s, z20.h, #8 3224b8021494Sopenharmony_ci // vl128 state = 0xf58883fb 3225b8021494Sopenharmony_ci __ dci(0x451aaab7); // ushllb z23.s, z21.h, #10 3226b8021494Sopenharmony_ci // vl128 state = 0xf9476b16 3227b8021494Sopenharmony_ci __ dci(0x4508aaa7); // ushllb z7.h, z21.b, #0 3228b8021494Sopenharmony_ci // vl128 state = 0x6f65ea0e 3229b8021494Sopenharmony_ci __ dci(0x4508ae2f); // ushllt z15.h, z17.b, #0 3230b8021494Sopenharmony_ci // vl128 state = 0x574341e2 3231b8021494Sopenharmony_ci __ dci(0x4509ac27); // ushllt z7.h, z1.b, #1 3232b8021494Sopenharmony_ci // vl128 state = 0xe373d23c 3233b8021494Sopenharmony_ci __ dci(0x450dae25); // ushllt z5.h, z17.b, #5 3234b8021494Sopenharmony_ci // vl128 state = 0xc6ad882b 3235b8021494Sopenharmony_ci __ dci(0x4509aea7); // ushllt z7.h, z21.b, #1 3236b8021494Sopenharmony_ci // vl128 state = 0xfce8617d 3237b8021494Sopenharmony_ci __ dci(0x4509adb7); // ushllt z23.h, z13.b, #1 3238b8021494Sopenharmony_ci // vl128 state = 0x30f63baf 3239b8021494Sopenharmony_ci __ dci(0x4549ade7); // ushllt z7.d, z15.s, #9 3240b8021494Sopenharmony_ci // vl128 state = 0x20522e02 3241b8021494Sopenharmony_ci __ dci(0x4549adf7); // ushllt z23.d, z15.s, #9 3242b8021494Sopenharmony_ci // vl128 state = 0x18c6aade 3243b8021494Sopenharmony_ci __ dci(0x4548aff6); // ushllt z22.d, z31.s, #8 3244b8021494Sopenharmony_ci // vl128 state = 0x3ad49ec9 3245b8021494Sopenharmony_ci __ dci(0x4548affe); // ushllt z30.d, z31.s, #8 3246b8021494Sopenharmony_ci // vl128 state = 0x828be22f 3247b8021494Sopenharmony_ci __ dci(0x4548adda); // ushllt z26.d, z14.s, #8 3248b8021494Sopenharmony_ci // vl128 state = 0xb4997aa9 3249b8021494Sopenharmony_ci __ dci(0x4544add2); // ushllt z18.d, z14.s, #4 3250b8021494Sopenharmony_ci // vl128 state = 0x6e7feb55 3251b8021494Sopenharmony_ci __ dci(0x454cad42); // ushllt z2.d, z10.s, #12 3252b8021494Sopenharmony_ci // vl128 state = 0xb8ff410d 3253b8021494Sopenharmony_ci __ dci(0x450dad40); // ushllt z0.h, z10.b, #5 3254b8021494Sopenharmony_ci // vl128 state = 0x806bb38f 3255b8021494Sopenharmony_ci __ dci(0x4515ad50); // ushllt z16.s, z10.h, #5 3256b8021494Sopenharmony_ci // vl128 state = 0x6bd247ad 3257b8021494Sopenharmony_ci __ dci(0x4557ad51); // ushllt z17.d, z10.s, #23 3258b8021494Sopenharmony_ci // vl128 state = 0xc0959f27 3259b8021494Sopenharmony_ci __ dci(0x4557ad41); // ushllt z1.d, z10.s, #23 3260b8021494Sopenharmony_ci // vl128 state = 0xf0176482 3261b8021494Sopenharmony_ci __ dci(0x4557ad40); // ushllt z0.d, z10.s, #23 3262b8021494Sopenharmony_ci // vl128 state = 0xd5c958bf 3263b8021494Sopenharmony_ci } 3264b8021494Sopenharmony_ci 3265b8021494Sopenharmony_ci uint32_t state; 3266b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 3267b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 3268b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 3269b8021494Sopenharmony_ci 3270b8021494Sopenharmony_ci END(); 3271b8021494Sopenharmony_ci if (CAN_RUN()) { 3272b8021494Sopenharmony_ci RUN(); 3273b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 3274b8021494Sopenharmony_ci 0xd5c958bf, 3275b8021494Sopenharmony_ci 0xb7546431, 3276b8021494Sopenharmony_ci 0xee4f6b9f, 3277b8021494Sopenharmony_ci 0x74f31aeb, 3278b8021494Sopenharmony_ci 0x98282a7a, 3279b8021494Sopenharmony_ci 0xf2423509, 3280b8021494Sopenharmony_ci 0xe3ae7c5c, 3281b8021494Sopenharmony_ci 0xe544e7ba, 3282b8021494Sopenharmony_ci 0x7d52fba5, 3283b8021494Sopenharmony_ci 0x1520b68d, 3284b8021494Sopenharmony_ci 0xee539501, 3285b8021494Sopenharmony_ci 0x1a65ba45, 3286b8021494Sopenharmony_ci 0x0d4c2383, 3287b8021494Sopenharmony_ci 0x9f4a30c5, 3288b8021494Sopenharmony_ci 0xca6662a2, 3289b8021494Sopenharmony_ci 0x64dc5f23, 3290b8021494Sopenharmony_ci }; 3291b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 3292b8021494Sopenharmony_ci } 3293b8021494Sopenharmony_ci} 3294b8021494Sopenharmony_ci 3295b8021494Sopenharmony_ciTEST_SVE(sve2_shift_narrow) { 3296b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 3297b8021494Sopenharmony_ci CPUFeatures::kSVE2, 3298b8021494Sopenharmony_ci CPUFeatures::kNEON, 3299b8021494Sopenharmony_ci CPUFeatures::kCRC32); 3300b8021494Sopenharmony_ci START(); 3301b8021494Sopenharmony_ci 3302b8021494Sopenharmony_ci SetInitialMachineState(&masm); 3303b8021494Sopenharmony_ci // state = 0xe2bd2480 3304b8021494Sopenharmony_ci 3305b8021494Sopenharmony_ci { 3306b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 3307b8021494Sopenharmony_ci __ dci(0x456b1458); // shrnt z24.s, z2.d, #21 3308b8021494Sopenharmony_ci // vl128 state = 0x70323182 3309b8021494Sopenharmony_ci __ dci(0x456b145c); // shrnt z28.s, z2.d, #21 3310b8021494Sopenharmony_ci // vl128 state = 0x1d620da3 3311b8021494Sopenharmony_ci __ dci(0x45291454); // shrnt z20.b, z2.h, #7 3312b8021494Sopenharmony_ci // vl128 state = 0x8e6d3a55 3313b8021494Sopenharmony_ci __ dci(0x4539141c); // shrnt z28.h, z0.s, #7 3314b8021494Sopenharmony_ci // vl128 state = 0xbc19c1cc 3315b8021494Sopenharmony_ci __ dci(0x453914b8); // shrnt z24.h, z5.s, #7 3316b8021494Sopenharmony_ci // vl128 state = 0x0bd4d1e8 3317b8021494Sopenharmony_ci __ dci(0x453b14f9); // shrnt z25.h, z7.s, #5 3318b8021494Sopenharmony_ci // vl128 state = 0x15622295 3319b8021494Sopenharmony_ci __ dci(0x453315fd); // shrnt z29.h, z15.s, #13 3320b8021494Sopenharmony_ci // vl128 state = 0x45bf3b94 3321b8021494Sopenharmony_ci __ dci(0x45331d75); // rshrnt z21.h, z11.s, #13 3322b8021494Sopenharmony_ci // vl128 state = 0xbb3574e6 3323b8021494Sopenharmony_ci __ dci(0x45331945); // rshrnb z5.h, z10.s, #13 3324b8021494Sopenharmony_ci // vl128 state = 0x7b72be5f 3325b8021494Sopenharmony_ci __ dci(0x45331941); // rshrnb z1.h, z10.s, #13 3326b8021494Sopenharmony_ci // vl128 state = 0x073cdf1a 3327b8021494Sopenharmony_ci __ dci(0x45331949); // rshrnb z9.h, z10.s, #13 3328b8021494Sopenharmony_ci // vl128 state = 0x3ecd1bf9 3329b8021494Sopenharmony_ci __ dci(0x453b1979); // rshrnb z25.h, z11.s, #5 3330b8021494Sopenharmony_ci // vl128 state = 0x19f7734e 3331b8021494Sopenharmony_ci __ dci(0x453b11f1); // shrnb z17.h, z15.s, #5 3332b8021494Sopenharmony_ci // vl128 state = 0x47a3f036 3333b8021494Sopenharmony_ci __ dci(0x453711f9); // shrnb z25.h, z15.s, #9 3334b8021494Sopenharmony_ci // vl128 state = 0xff283fe4 3335b8021494Sopenharmony_ci __ dci(0x453315f8); // shrnt z24.h, z15.s, #13 3336b8021494Sopenharmony_ci // vl128 state = 0x1c19f8fb 3337b8021494Sopenharmony_ci __ dci(0x453319f0); // rshrnb z16.h, z15.s, #13 3338b8021494Sopenharmony_ci // vl128 state = 0x3be08052 3339b8021494Sopenharmony_ci __ dci(0x453b1972); // rshrnb z18.h, z11.s, #5 3340b8021494Sopenharmony_ci // vl128 state = 0xc5ae76a0 3341b8021494Sopenharmony_ci __ dci(0x453b1962); // rshrnb z2.h, z11.s, #5 3342b8021494Sopenharmony_ci // vl128 state = 0x75ec3872 3343b8021494Sopenharmony_ci __ dci(0x453b1c60); // rshrnt z0.h, z3.s, #5 3344b8021494Sopenharmony_ci // vl128 state = 0x9b372229 3345b8021494Sopenharmony_ci __ dci(0x45331c44); // rshrnt z4.h, z2.s, #13 3346b8021494Sopenharmony_ci // vl128 state = 0xe4e22904 3347b8021494Sopenharmony_ci __ dci(0x45371c0c); // rshrnt z12.h, z0.s, #9 3348b8021494Sopenharmony_ci // vl128 state = 0x12bc6f4b 3349b8021494Sopenharmony_ci __ dci(0x45331d08); // rshrnt z8.h, z8.s, #13 3350b8021494Sopenharmony_ci // vl128 state = 0x3ef95245 3351b8021494Sopenharmony_ci __ dci(0x45331c98); // rshrnt z24.h, z4.s, #13 3352b8021494Sopenharmony_ci // vl128 state = 0x0a4a0d68 3353b8021494Sopenharmony_ci __ dci(0x45731e99); // rshrnt z25.s, z20.d, #13 3354b8021494Sopenharmony_ci // vl128 state = 0xa01ca6c8 3355b8021494Sopenharmony_ci __ dci(0x457b1a98); // rshrnb z24.s, z20.d, #5 3356b8021494Sopenharmony_ci // vl128 state = 0x73a50e30 3357b8021494Sopenharmony_ci __ dci(0x452b1a9c); // rshrnb z28.b, z20.h, #5 3358b8021494Sopenharmony_ci // vl128 state = 0xbad3deda 3359b8021494Sopenharmony_ci __ dci(0x452b1818); // rshrnb z24.b, z0.h, #5 3360b8021494Sopenharmony_ci // vl128 state = 0x579b3c8f 3361b8021494Sopenharmony_ci __ dci(0x452b181a); // rshrnb z26.b, z0.h, #5 3362b8021494Sopenharmony_ci // vl128 state = 0xa2b0bf7c 3363b8021494Sopenharmony_ci __ dci(0x452b181b); // rshrnb z27.b, z0.h, #5 3364b8021494Sopenharmony_ci // vl128 state = 0x7bebdf9e 3365b8021494Sopenharmony_ci __ dci(0x45291a1a); // rshrnb z26.b, z16.h, #7 3366b8021494Sopenharmony_ci // vl128 state = 0x3f90e1b7 3367b8021494Sopenharmony_ci __ dci(0x45681a12); // rshrnb z18.s, z16.d, #24 3368b8021494Sopenharmony_ci // vl128 state = 0x57e6295e 3369b8021494Sopenharmony_ci __ dci(0x45681290); // shrnb z16.s, z20.d, #24 3370b8021494Sopenharmony_ci // vl128 state = 0xa53f48b5 3371b8021494Sopenharmony_ci __ dci(0x45281091); // shrnb z17.b, z4.h, #8 3372b8021494Sopenharmony_ci // vl128 state = 0x65179ab4 3373b8021494Sopenharmony_ci __ dci(0x45281401); // shrnt z1.b, z0.h, #8 3374b8021494Sopenharmony_ci // vl128 state = 0x3cc490ba 3375b8021494Sopenharmony_ci __ dci(0x45281c83); // rshrnt z3.b, z4.h, #8 3376b8021494Sopenharmony_ci // vl128 state = 0x3bc34e69 3377b8021494Sopenharmony_ci __ dci(0x45281c93); // rshrnt z19.b, z4.h, #8 3378b8021494Sopenharmony_ci // vl128 state = 0x6dded0bb 3379b8021494Sopenharmony_ci __ dci(0x45681cb7); // rshrnt z23.s, z5.d, #24 3380b8021494Sopenharmony_ci // vl128 state = 0x378f83c0 3381b8021494Sopenharmony_ci __ dci(0x45291cb6); // rshrnt z22.b, z5.h, #7 3382b8021494Sopenharmony_ci // vl128 state = 0x7e4d1c44 3383b8021494Sopenharmony_ci __ dci(0x45391eb2); // rshrnt z18.h, z21.s, #7 3384b8021494Sopenharmony_ci // vl128 state = 0x66c0b784 3385b8021494Sopenharmony_ci __ dci(0x45281ea2); // rshrnt z2.b, z21.h, #8 3386b8021494Sopenharmony_ci // vl128 state = 0x62df2c82 3387b8021494Sopenharmony_ci __ dci(0x452c1fa0); // rshrnt z0.b, z29.h, #4 3388b8021494Sopenharmony_ci // vl128 state = 0xd79ee307 3389b8021494Sopenharmony_ci __ dci(0x456c1ba2); // rshrnb z2.s, z29.d, #20 3390b8021494Sopenharmony_ci // vl128 state = 0x8ebb2251 3391b8021494Sopenharmony_ci __ dci(0x45641ab2); // rshrnb z18.s, z21.d, #28 3392b8021494Sopenharmony_ci // vl128 state = 0x77ec053a 3393b8021494Sopenharmony_ci __ dci(0x456c12ba); // shrnb z26.s, z21.d, #20 3394b8021494Sopenharmony_ci // vl128 state = 0xcf94b608 3395b8021494Sopenharmony_ci __ dci(0x452812b8); // shrnb z24.b, z21.h, #8 3396b8021494Sopenharmony_ci // vl128 state = 0x3e067a62 3397b8021494Sopenharmony_ci __ dci(0x4568123a); // shrnb z26.s, z17.d, #24 3398b8021494Sopenharmony_ci // vl128 state = 0xe451de0f 3399b8021494Sopenharmony_ci __ dci(0x456c1338); // shrnb z24.s, z25.d, #20 3400b8021494Sopenharmony_ci // vl128 state = 0x4042d707 3401b8021494Sopenharmony_ci __ dci(0x456813b9); // shrnb z25.s, z29.d, #24 3402b8021494Sopenharmony_ci // vl128 state = 0x5184a2aa 3403b8021494Sopenharmony_ci __ dci(0x456812e9); // shrnb z9.s, z23.d, #24 3404b8021494Sopenharmony_ci // vl128 state = 0x246344b8 3405b8021494Sopenharmony_ci __ dci(0x456812e1); // shrnb z1.s, z23.d, #24 3406b8021494Sopenharmony_ci // vl128 state = 0x76866e79 3407b8021494Sopenharmony_ci } 3408b8021494Sopenharmony_ci 3409b8021494Sopenharmony_ci uint32_t state; 3410b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 3411b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 3412b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 3413b8021494Sopenharmony_ci 3414b8021494Sopenharmony_ci END(); 3415b8021494Sopenharmony_ci if (CAN_RUN()) { 3416b8021494Sopenharmony_ci RUN(); 3417b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 3418b8021494Sopenharmony_ci 0x76866e79, 3419b8021494Sopenharmony_ci 0x42b52927, 3420b8021494Sopenharmony_ci 0x84a0bfcc, 3421b8021494Sopenharmony_ci 0xf8226fc2, 3422b8021494Sopenharmony_ci 0x444f6df5, 3423b8021494Sopenharmony_ci 0x2f8dcd68, 3424b8021494Sopenharmony_ci 0x5a48278a, 3425b8021494Sopenharmony_ci 0x1cdd7f2f, 3426b8021494Sopenharmony_ci 0x7816d36c, 3427b8021494Sopenharmony_ci 0xebae972f, 3428b8021494Sopenharmony_ci 0xa02adfbe, 3429b8021494Sopenharmony_ci 0xc93cde0f, 3430b8021494Sopenharmony_ci 0xce43287b, 3431b8021494Sopenharmony_ci 0x777d6ce0, 3432b8021494Sopenharmony_ci 0x9d3be904, 3433b8021494Sopenharmony_ci 0x3e059dd2, 3434b8021494Sopenharmony_ci }; 3435b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 3436b8021494Sopenharmony_ci } 3437b8021494Sopenharmony_ci} 3438b8021494Sopenharmony_ci 3439b8021494Sopenharmony_ciTEST_SVE(sve2_shift_narrow_usat) { 3440b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 3441b8021494Sopenharmony_ci CPUFeatures::kSVE2, 3442b8021494Sopenharmony_ci CPUFeatures::kNEON, 3443b8021494Sopenharmony_ci CPUFeatures::kCRC32); 3444b8021494Sopenharmony_ci START(); 3445b8021494Sopenharmony_ci 3446b8021494Sopenharmony_ci SetInitialMachineState(&masm); 3447b8021494Sopenharmony_ci // state = 0xe2bd2480 3448b8021494Sopenharmony_ci 3449b8021494Sopenharmony_ci { 3450b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 3451b8021494Sopenharmony_ci __ dci(0x457a3207); // uqshrnb z7.s, z16.d, #6 3452b8021494Sopenharmony_ci // vl128 state = 0x4b40d14e 3453b8021494Sopenharmony_ci __ dci(0x457a3206); // uqshrnb z6.s, z16.d, #6 3454b8021494Sopenharmony_ci // vl128 state = 0x4dbc0377 3455b8021494Sopenharmony_ci __ dci(0x457a3204); // uqshrnb z4.s, z16.d, #6 3456b8021494Sopenharmony_ci // vl128 state = 0xa6fbc7f9 3457b8021494Sopenharmony_ci __ dci(0x457e3a14); // uqrshrnb z20.s, z16.d, #2 3458b8021494Sopenharmony_ci // vl128 state = 0x9e9414a9 3459b8021494Sopenharmony_ci __ dci(0x457b3a15); // uqrshrnb z21.s, z16.d, #5 3460b8021494Sopenharmony_ci // vl128 state = 0xe8824afd 3461b8021494Sopenharmony_ci __ dci(0x457b3ab7); // uqrshrnb z23.s, z21.d, #5 3462b8021494Sopenharmony_ci // vl128 state = 0x81ce1be6 3463b8021494Sopenharmony_ci __ dci(0x457b3ab6); // uqrshrnb z22.s, z21.d, #5 3464b8021494Sopenharmony_ci // vl128 state = 0x5e343a1e 3465b8021494Sopenharmony_ci __ dci(0x457f3af7); // uqrshrnb z23.s, z23.d, #1 3466b8021494Sopenharmony_ci // vl128 state = 0x09a5c3a0 3467b8021494Sopenharmony_ci __ dci(0x457b38ff); // uqrshrnb z31.s, z7.d, #5 3468b8021494Sopenharmony_ci // vl128 state = 0xb50710bf 3469b8021494Sopenharmony_ci __ dci(0x453338fe); // uqrshrnb z30.h, z7.s, #13 3470b8021494Sopenharmony_ci // vl128 state = 0xfc719c85 3471b8021494Sopenharmony_ci __ dci(0x453338ee); // uqrshrnb z14.h, z7.s, #13 3472b8021494Sopenharmony_ci // vl128 state = 0x157d826a 3473b8021494Sopenharmony_ci __ dci(0x453b386a); // uqrshrnb z10.h, z3.s, #5 3474b8021494Sopenharmony_ci // vl128 state = 0x9c735771 3475b8021494Sopenharmony_ci __ dci(0x452f386e); // uqrshrnb z14.b, z3.h, #1 3476b8021494Sopenharmony_ci // vl128 state = 0xe03bb4a4 3477b8021494Sopenharmony_ci __ dci(0x452f3aea); // uqrshrnb z10.b, z23.h, #1 3478b8021494Sopenharmony_ci // vl128 state = 0xa841b415 3479b8021494Sopenharmony_ci __ dci(0x452f38ba); // uqrshrnb z26.b, z5.h, #1 3480b8021494Sopenharmony_ci // vl128 state = 0x55302a6d 3481b8021494Sopenharmony_ci __ dci(0x452f3878); // uqrshrnb z24.b, z3.h, #1 3482b8021494Sopenharmony_ci // vl128 state = 0x73bee182 3483b8021494Sopenharmony_ci __ dci(0x453f385c); // uqrshrnb z28.h, z2.s, #1 3484b8021494Sopenharmony_ci // vl128 state = 0x75f81ccc 3485b8021494Sopenharmony_ci __ dci(0x453f397d); // uqrshrnb z29.h, z11.s, #1 3486b8021494Sopenharmony_ci // vl128 state = 0x856fecc9 3487b8021494Sopenharmony_ci __ dci(0x457d397c); // uqrshrnb z28.s, z11.d, #3 3488b8021494Sopenharmony_ci // vl128 state = 0x4b144bf2 3489b8021494Sopenharmony_ci __ dci(0x457f3878); // uqrshrnb z24.s, z3.d, #1 3490b8021494Sopenharmony_ci // vl128 state = 0x7ea5dad3 3491b8021494Sopenharmony_ci __ dci(0x457b3c7a); // uqrshrnt z26.s, z3.d, #5 3492b8021494Sopenharmony_ci // vl128 state = 0xa7d48543 3493b8021494Sopenharmony_ci __ dci(0x45633c72); // uqrshrnt z18.s, z3.d, #29 3494b8021494Sopenharmony_ci // vl128 state = 0x18f647a7 3495b8021494Sopenharmony_ci __ dci(0x45613d76); // uqrshrnt z22.s, z11.d, #31 3496b8021494Sopenharmony_ci // vl128 state = 0x96d4081b 3497b8021494Sopenharmony_ci __ dci(0x45693972); // uqrshrnb z18.s, z11.d, #23 3498b8021494Sopenharmony_ci // vl128 state = 0xa8369e83 3499b8021494Sopenharmony_ci __ dci(0x45693d53); // uqrshrnt z19.s, z10.d, #23 3500b8021494Sopenharmony_ci // vl128 state = 0x7553ff55 3501b8021494Sopenharmony_ci __ dci(0x45713d51); // uqrshrnt z17.s, z10.d, #15 3502b8021494Sopenharmony_ci // vl128 state = 0x52a52ecc 3503b8021494Sopenharmony_ci __ dci(0x45713d99); // uqrshrnt z25.s, z12.d, #15 3504b8021494Sopenharmony_ci // vl128 state = 0x4de78f7b 3505b8021494Sopenharmony_ci __ dci(0x45753f9d); // uqrshrnt z29.s, z28.d, #11 3506b8021494Sopenharmony_ci // vl128 state = 0x0f8948cd 3507b8021494Sopenharmony_ci __ dci(0x45753f8d); // uqrshrnt z13.s, z28.d, #11 3508b8021494Sopenharmony_ci // vl128 state = 0x7f2c1b05 3509b8021494Sopenharmony_ci __ dci(0x45753685); // uqshrnt z5.s, z20.d, #11 3510b8021494Sopenharmony_ci // vl128 state = 0xbe6f6ea9 3511b8021494Sopenharmony_ci __ dci(0x457d3784); // uqshrnt z4.s, z28.d, #3 3512b8021494Sopenharmony_ci // vl128 state = 0x716e1acd 3513b8021494Sopenharmony_ci __ dci(0x453c3785); // uqshrnt z5.h, z28.s, #4 3514b8021494Sopenharmony_ci // vl128 state = 0x828a3cbb 3515b8021494Sopenharmony_ci __ dci(0x453837a4); // uqshrnt z4.h, z29.s, #8 3516b8021494Sopenharmony_ci // vl128 state = 0x125ddc3c 3517b8021494Sopenharmony_ci __ dci(0x457a37a6); // uqshrnt z6.s, z29.d, #6 3518b8021494Sopenharmony_ci // vl128 state = 0x8c5c5d4c 3519b8021494Sopenharmony_ci __ dci(0x453a37e4); // uqshrnt z4.h, z31.s, #6 3520b8021494Sopenharmony_ci // vl128 state = 0xdea9801f 3521b8021494Sopenharmony_ci __ dci(0x453f37ec); // uqshrnt z12.h, z31.s, #1 3522b8021494Sopenharmony_ci // vl128 state = 0x6caa6537 3523b8021494Sopenharmony_ci __ dci(0x457f37dc); // uqshrnt z28.s, z30.d, #1 3524b8021494Sopenharmony_ci // vl128 state = 0x66c0c05d 3525b8021494Sopenharmony_ci __ dci(0x45773fde); // uqrshrnt z30.s, z30.d, #9 3526b8021494Sopenharmony_ci // vl128 state = 0xf8d495e2 3527b8021494Sopenharmony_ci __ dci(0x45653fda); // uqrshrnt z26.s, z30.d, #27 3528b8021494Sopenharmony_ci // vl128 state = 0xb543c017 3529b8021494Sopenharmony_ci __ dci(0x45613ffb); // uqrshrnt z27.s, z31.d, #31 3530b8021494Sopenharmony_ci // vl128 state = 0x58a69fb4 3531b8021494Sopenharmony_ci __ dci(0x45613feb); // uqrshrnt z11.s, z31.d, #31 3532b8021494Sopenharmony_ci // vl128 state = 0xb5a04d48 3533b8021494Sopenharmony_ci __ dci(0x45653fca); // uqrshrnt z10.s, z30.d, #27 3534b8021494Sopenharmony_ci // vl128 state = 0xd2d445e0 3535b8021494Sopenharmony_ci __ dci(0x45753fe8); // uqrshrnt z8.s, z31.d, #11 3536b8021494Sopenharmony_ci // vl128 state = 0x67d89d28 3537b8021494Sopenharmony_ci __ dci(0x457537ca); // uqshrnt z10.s, z30.d, #11 3538b8021494Sopenharmony_ci // vl128 state = 0xcaa2b6dc 3539b8021494Sopenharmony_ci __ dci(0x457d35ce); // uqshrnt z14.s, z14.d, #3 3540b8021494Sopenharmony_ci // vl128 state = 0x9da6b10f 3541b8021494Sopenharmony_ci __ dci(0x452d35de); // uqshrnt z30.b, z14.h, #3 3542b8021494Sopenharmony_ci // vl128 state = 0xda8663db 3543b8021494Sopenharmony_ci __ dci(0x452d314e); // uqshrnb z14.b, z10.h, #3 3544b8021494Sopenharmony_ci // vl128 state = 0x761992a9 3545b8021494Sopenharmony_ci __ dci(0x453d304f); // uqshrnb z15.h, z2.s, #3 3546b8021494Sopenharmony_ci // vl128 state = 0x71587e6a 3547b8021494Sopenharmony_ci __ dci(0x453d386e); // uqrshrnb z14.h, z3.s, #3 3548b8021494Sopenharmony_ci // vl128 state = 0xc6118398 3549b8021494Sopenharmony_ci __ dci(0x453538ec); // uqrshrnb z12.h, z7.s, #11 3550b8021494Sopenharmony_ci // vl128 state = 0x5e542c3a 3551b8021494Sopenharmony_ci } 3552b8021494Sopenharmony_ci 3553b8021494Sopenharmony_ci uint32_t state; 3554b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 3555b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 3556b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 3557b8021494Sopenharmony_ci 3558b8021494Sopenharmony_ci END(); 3559b8021494Sopenharmony_ci if (CAN_RUN()) { 3560b8021494Sopenharmony_ci RUN(); 3561b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 3562b8021494Sopenharmony_ci 0x5e542c3a, 3563b8021494Sopenharmony_ci 0xd9128c5a, 3564b8021494Sopenharmony_ci 0x73f430ed, 3565b8021494Sopenharmony_ci 0x160c07da, 3566b8021494Sopenharmony_ci 0x7bff9561, 3567b8021494Sopenharmony_ci 0x4b2d6335, 3568b8021494Sopenharmony_ci 0x3738197c, 3569b8021494Sopenharmony_ci 0x2b624a48, 3570b8021494Sopenharmony_ci 0xbb257999, 3571b8021494Sopenharmony_ci 0x0d5d8614, 3572b8021494Sopenharmony_ci 0xb031d1fc, 3573b8021494Sopenharmony_ci 0x60f2fce2, 3574b8021494Sopenharmony_ci 0x92770ad6, 3575b8021494Sopenharmony_ci 0x6e33aa78, 3576b8021494Sopenharmony_ci 0x8752089b, 3577b8021494Sopenharmony_ci 0x37b56a40, 3578b8021494Sopenharmony_ci }; 3579b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 3580b8021494Sopenharmony_ci } 3581b8021494Sopenharmony_ci} 3582b8021494Sopenharmony_ci 3583b8021494Sopenharmony_ciTEST_SVE(sve2_shift_narrow_ssat) { 3584b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 3585b8021494Sopenharmony_ci CPUFeatures::kSVE2, 3586b8021494Sopenharmony_ci CPUFeatures::kNEON, 3587b8021494Sopenharmony_ci CPUFeatures::kCRC32); 3588b8021494Sopenharmony_ci START(); 3589b8021494Sopenharmony_ci 3590b8021494Sopenharmony_ci SetInitialMachineState(&masm); 3591b8021494Sopenharmony_ci // state = 0xe2bd2480 3592b8021494Sopenharmony_ci 3593b8021494Sopenharmony_ci { 3594b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 3595b8021494Sopenharmony_ci __ dci(0x456c0875); // sqrshrunb z21.s, z3.d, #20 3596b8021494Sopenharmony_ci // vl128 state = 0x1446427d 3597b8021494Sopenharmony_ci __ dci(0x456c0877); // sqrshrunb z23.s, z3.d, #20 3598b8021494Sopenharmony_ci // vl128 state = 0xd839ea94 3599b8021494Sopenharmony_ci __ dci(0x456c0876); // sqrshrunb z22.s, z3.d, #20 3600b8021494Sopenharmony_ci // vl128 state = 0xe4dd3104 3601b8021494Sopenharmony_ci __ dci(0x456e0c77); // sqrshrunt z23.s, z3.d, #18 3602b8021494Sopenharmony_ci // vl128 state = 0xd86dd8aa 3603b8021494Sopenharmony_ci __ dci(0x456e0a73); // sqrshrunb z19.s, z19.d, #18 3604b8021494Sopenharmony_ci // vl128 state = 0x7aacf973 3605b8021494Sopenharmony_ci __ dci(0x456c0e72); // sqrshrunt z18.s, z19.d, #20 3606b8021494Sopenharmony_ci // vl128 state = 0x6e7b28b8 3607b8021494Sopenharmony_ci __ dci(0x456c2c62); // sqrshrnt z2.s, z3.d, #20 3608b8021494Sopenharmony_ci // vl128 state = 0x242e0a5e 3609b8021494Sopenharmony_ci __ dci(0x456c24f2); // sqshrnt z18.s, z7.d, #20 3610b8021494Sopenharmony_ci // vl128 state = 0xf9c993ec 3611b8021494Sopenharmony_ci __ dci(0x456c2570); // sqshrnt z16.s, z11.d, #20 3612b8021494Sopenharmony_ci // vl128 state = 0x087c4fc1 3613b8021494Sopenharmony_ci __ dci(0x456e2478); // sqshrnt z24.s, z3.d, #18 3614b8021494Sopenharmony_ci // vl128 state = 0x33fdae0c 3615b8021494Sopenharmony_ci __ dci(0x456e2c30); // sqrshrnt z16.s, z1.d, #18 3616b8021494Sopenharmony_ci // vl128 state = 0x0c957ea2 3617b8021494Sopenharmony_ci __ dci(0x456e2d78); // sqrshrnt z24.s, z11.d, #18 3618b8021494Sopenharmony_ci // vl128 state = 0x0792e58a 3619b8021494Sopenharmony_ci __ dci(0x456f2970); // sqrshrnb z16.s, z11.d, #17 3620b8021494Sopenharmony_ci // vl128 state = 0xe7169693 3621b8021494Sopenharmony_ci __ dci(0x456b2938); // sqrshrnb z24.s, z9.d, #21 3622b8021494Sopenharmony_ci // vl128 state = 0x1372a92d 3623b8021494Sopenharmony_ci __ dci(0x45692979); // sqrshrnb z25.s, z11.d, #23 3624b8021494Sopenharmony_ci // vl128 state = 0xc1c31387 3625b8021494Sopenharmony_ci __ dci(0x4563297d); // sqrshrnb z29.s, z11.d, #29 3626b8021494Sopenharmony_ci // vl128 state = 0x50a08538 3627b8021494Sopenharmony_ci __ dci(0x45632975); // sqrshrnb z21.s, z11.d, #29 3628b8021494Sopenharmony_ci // vl128 state = 0xda962f25 3629b8021494Sopenharmony_ci __ dci(0x456309f1); // sqrshrunb z17.s, z15.d, #29 3630b8021494Sopenharmony_ci // vl128 state = 0xe149814e 3631b8021494Sopenharmony_ci __ dci(0x457308f3); // sqrshrunb z19.s, z7.d, #13 3632b8021494Sopenharmony_ci // vl128 state = 0x6d5ea38b 3633b8021494Sopenharmony_ci __ dci(0x457329fb); // sqrshrnb z27.s, z15.d, #13 3634b8021494Sopenharmony_ci // vl128 state = 0xee932acb 3635b8021494Sopenharmony_ci __ dci(0x457721f3); // sqshrnb z19.s, z15.d, #9 3636b8021494Sopenharmony_ci // vl128 state = 0x7e05914b 3637b8021494Sopenharmony_ci __ dci(0x45732171); // sqshrnb z17.s, z11.d, #13 3638b8021494Sopenharmony_ci // vl128 state = 0xe4bf82a4 3639b8021494Sopenharmony_ci __ dci(0x45722070); // sqshrnb z16.s, z3.d, #14 3640b8021494Sopenharmony_ci // vl128 state = 0xdfc01530 3641b8021494Sopenharmony_ci __ dci(0x456a2078); // sqshrnb z24.s, z3.d, #22 3642b8021494Sopenharmony_ci // vl128 state = 0x6b48fc15 3643b8021494Sopenharmony_ci __ dci(0x452a287c); // sqrshrnb z28.b, z3.h, #6 3644b8021494Sopenharmony_ci // vl128 state = 0x45e86048 3645b8021494Sopenharmony_ci __ dci(0x45282c78); // sqrshrnt z24.b, z3.h, #8 3646b8021494Sopenharmony_ci // vl128 state = 0xb8dc83dd 3647b8021494Sopenharmony_ci __ dci(0x45602c68); // sqrshrnt z8.s, z3.d, #32 3648b8021494Sopenharmony_ci // vl128 state = 0xda536cf8 3649b8021494Sopenharmony_ci __ dci(0x45602678); // sqshrnt z24.s, z19.d, #32 3650b8021494Sopenharmony_ci // vl128 state = 0xb548f79b 3651b8021494Sopenharmony_ci __ dci(0x45682e70); // sqrshrnt z16.s, z19.d, #24 3652b8021494Sopenharmony_ci // vl128 state = 0xd564dd2d 3653b8021494Sopenharmony_ci __ dci(0x45682260); // sqshrnb z0.s, z19.d, #24 3654b8021494Sopenharmony_ci // vl128 state = 0x7b901f9b 3655b8021494Sopenharmony_ci __ dci(0x45682642); // sqshrnt z2.s, z18.d, #24 3656b8021494Sopenharmony_ci // vl128 state = 0x1d4fe6f4 3657b8021494Sopenharmony_ci __ dci(0x45680606); // sqshrunt z6.s, z16.d, #24 3658b8021494Sopenharmony_ci // vl128 state = 0xe82d65a2 3659b8021494Sopenharmony_ci __ dci(0x45680282); // sqshrunb z2.s, z20.d, #24 3660b8021494Sopenharmony_ci // vl128 state = 0x8a1ae6f6 3661b8021494Sopenharmony_ci __ dci(0x45680283); // sqshrunb z3.s, z20.d, #24 3662b8021494Sopenharmony_ci // vl128 state = 0x5e345dcf 3663b8021494Sopenharmony_ci __ dci(0x4568238b); // sqshrnb z11.s, z28.d, #24 3664b8021494Sopenharmony_ci // vl128 state = 0x31f54470 3665b8021494Sopenharmony_ci __ dci(0x45682383); // sqshrnb z3.s, z28.d, #24 3666b8021494Sopenharmony_ci // vl128 state = 0x6b48975d 3667b8021494Sopenharmony_ci __ dci(0x45682682); // sqshrnt z2.s, z20.d, #24 3668b8021494Sopenharmony_ci // vl128 state = 0xa9fba153 3669b8021494Sopenharmony_ci __ dci(0x45782e8a); // sqrshrnt z10.s, z20.d, #8 3670b8021494Sopenharmony_ci // vl128 state = 0x0fe3100f 3671b8021494Sopenharmony_ci __ dci(0x45780eba); // sqrshrunt z26.s, z21.d, #8 3672b8021494Sopenharmony_ci // vl128 state = 0x1a392151 3673b8021494Sopenharmony_ci __ dci(0x45700e32); // sqrshrunt z18.s, z17.d, #16 3674b8021494Sopenharmony_ci // vl128 state = 0x08cea935 3675b8021494Sopenharmony_ci __ dci(0x45700e42); // sqrshrunt z2.s, z18.d, #16 3676b8021494Sopenharmony_ci // vl128 state = 0x353f24b1 3677b8021494Sopenharmony_ci __ dci(0x45782e52); // sqrshrnt z18.s, z18.d, #8 3678b8021494Sopenharmony_ci // vl128 state = 0xe06219d0 3679b8021494Sopenharmony_ci __ dci(0x45782e42); // sqrshrnt z2.s, z18.d, #8 3680b8021494Sopenharmony_ci // vl128 state = 0xbb4c6d3b 3681b8021494Sopenharmony_ci __ dci(0x45742e46); // sqrshrnt z6.s, z18.d, #12 3682b8021494Sopenharmony_ci // vl128 state = 0x77e7393c 3683b8021494Sopenharmony_ci __ dci(0x45642ec7); // sqrshrnt z7.s, z22.d, #28 3684b8021494Sopenharmony_ci // vl128 state = 0x5201634c 3685b8021494Sopenharmony_ci __ dci(0x45642a97); // sqrshrnb z23.s, z20.d, #28 3686b8021494Sopenharmony_ci // vl128 state = 0x49c32fc1 3687b8021494Sopenharmony_ci __ dci(0x45640b87); // sqrshrunb z7.s, z28.d, #28 3688b8021494Sopenharmony_ci // vl128 state = 0xdd09d56d 3689b8021494Sopenharmony_ci __ dci(0x45640f0f); // sqrshrunt z15.s, z24.d, #28 3690b8021494Sopenharmony_ci // vl128 state = 0x50f7d144 3691b8021494Sopenharmony_ci __ dci(0x45600e0e); // sqrshrunt z14.s, z16.d, #32 3692b8021494Sopenharmony_ci // vl128 state = 0xd6bbd38a 3693b8021494Sopenharmony_ci __ dci(0x45620a0f); // sqrshrunb z15.s, z16.d, #30 3694b8021494Sopenharmony_ci // vl128 state = 0x141e2991 3695b8021494Sopenharmony_ci } 3696b8021494Sopenharmony_ci 3697b8021494Sopenharmony_ci uint32_t state; 3698b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 3699b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 3700b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 3701b8021494Sopenharmony_ci 3702b8021494Sopenharmony_ci END(); 3703b8021494Sopenharmony_ci if (CAN_RUN()) { 3704b8021494Sopenharmony_ci RUN(); 3705b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 3706b8021494Sopenharmony_ci 0x141e2991, 3707b8021494Sopenharmony_ci 0x8cb951d0, 3708b8021494Sopenharmony_ci 0x74337526, 3709b8021494Sopenharmony_ci 0x515534c6, 3710b8021494Sopenharmony_ci 0xe3789189, 3711b8021494Sopenharmony_ci 0xfee7d505, 3712b8021494Sopenharmony_ci 0xfaae7ee8, 3713b8021494Sopenharmony_ci 0x71a110a3, 3714b8021494Sopenharmony_ci 0x6469dcda, 3715b8021494Sopenharmony_ci 0xe61425fc, 3716b8021494Sopenharmony_ci 0x6840f618, 3717b8021494Sopenharmony_ci 0xbc1b116d, 3718b8021494Sopenharmony_ci 0xaad97378, 3719b8021494Sopenharmony_ci 0x5d91b661, 3720b8021494Sopenharmony_ci 0x9eb84163, 3721b8021494Sopenharmony_ci 0xf8ca1e37, 3722b8021494Sopenharmony_ci }; 3723b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 3724b8021494Sopenharmony_ci } 3725b8021494Sopenharmony_ci} 3726b8021494Sopenharmony_ci 3727b8021494Sopenharmony_ciTEST_SVE(sve2_aba_long) { 3728b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 3729b8021494Sopenharmony_ci CPUFeatures::kSVE2, 3730b8021494Sopenharmony_ci CPUFeatures::kNEON, 3731b8021494Sopenharmony_ci CPUFeatures::kCRC32); 3732b8021494Sopenharmony_ci START(); 3733b8021494Sopenharmony_ci 3734b8021494Sopenharmony_ci SetInitialMachineState(&masm); 3735b8021494Sopenharmony_ci // state = 0xe2bd2480 3736b8021494Sopenharmony_ci 3737b8021494Sopenharmony_ci { 3738b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 3739b8021494Sopenharmony_ci __ dci(0x45c2ca3e); // uabalb z30.d, z17.s, z2.s 3740b8021494Sopenharmony_ci // vl128 state = 0xac47a81c 3741b8021494Sopenharmony_ci __ dci(0x45caca7f); // uabalb z31.d, z19.s, z10.s 3742b8021494Sopenharmony_ci // vl128 state = 0x10cd4e69 3743b8021494Sopenharmony_ci __ dci(0x455aca7e); // uabalb z30.h, z19.b, z26.b 3744b8021494Sopenharmony_ci // vl128 state = 0x8fba3755 3745b8021494Sopenharmony_ci __ dci(0x45daca5f); // uabalb z31.d, z18.s, z26.s 3746b8021494Sopenharmony_ci // vl128 state = 0x8c18257c 3747b8021494Sopenharmony_ci __ dci(0x45d8ca1d); // uabalb z29.d, z16.s, z24.s 3748b8021494Sopenharmony_ci // vl128 state = 0xe6eef5ec 3749b8021494Sopenharmony_ci __ dci(0x45d8ce95); // uabalt z21.d, z20.s, z24.s 3750b8021494Sopenharmony_ci // vl128 state = 0x2368baee 3751b8021494Sopenharmony_ci __ dci(0x4598ce14); // uabalt z20.s, z16.h, z24.h 3752b8021494Sopenharmony_ci // vl128 state = 0xc9281174 3753b8021494Sopenharmony_ci __ dci(0x4598ce04); // uabalt z4.s, z16.h, z24.h 3754b8021494Sopenharmony_ci // vl128 state = 0xa0b5fc24 3755b8021494Sopenharmony_ci __ dci(0x45d8ce40); // uabalt z0.d, z18.s, z24.s 3756b8021494Sopenharmony_ci // vl128 state = 0xb3ef6f1d 3757b8021494Sopenharmony_ci __ dci(0x45daca44); // uabalb z4.d, z18.s, z26.s 3758b8021494Sopenharmony_ci // vl128 state = 0xcfa3666b 3759b8021494Sopenharmony_ci __ dci(0x45dace00); // uabalt z0.d, z16.s, z26.s 3760b8021494Sopenharmony_ci // vl128 state = 0x27bb4ba9 3761b8021494Sopenharmony_ci __ dci(0x459ece04); // uabalt z4.s, z16.h, z30.h 3762b8021494Sopenharmony_ci // vl128 state = 0xb6628d3e 3763b8021494Sopenharmony_ci __ dci(0x458ece80); // uabalt z0.s, z20.h, z14.h 3764b8021494Sopenharmony_ci // vl128 state = 0xe8db526e 3765b8021494Sopenharmony_ci __ dci(0x458ec482); // sabalt z2.s, z4.h, z14.h 3766b8021494Sopenharmony_ci // vl128 state = 0x73cd8386 3767b8021494Sopenharmony_ci __ dci(0x45cec4a3); // sabalt z3.d, z5.s, z14.s 3768b8021494Sopenharmony_ci // vl128 state = 0xba1c4507 3769b8021494Sopenharmony_ci __ dci(0x45cec8a1); // uabalb z1.d, z5.s, z14.s 3770b8021494Sopenharmony_ci // vl128 state = 0x851cd798 3771b8021494Sopenharmony_ci __ dci(0x458ec0a9); // sabalb z9.s, z5.h, z14.h 3772b8021494Sopenharmony_ci // vl128 state = 0xc85973b8 3773b8021494Sopenharmony_ci __ dci(0x45c6c0ab); // sabalb z11.d, z5.s, z6.s 3774b8021494Sopenharmony_ci // vl128 state = 0x84072419 3775b8021494Sopenharmony_ci __ dci(0x4544c0a9); // sabalb z9.h, z5.b, z4.b 3776b8021494Sopenharmony_ci // vl128 state = 0x533a377a 3777b8021494Sopenharmony_ci __ dci(0x4550c0a1); // sabalb z1.h, z5.b, z16.b 3778b8021494Sopenharmony_ci // vl128 state = 0x5a216f3a 3779b8021494Sopenharmony_ci __ dci(0x4550c0b1); // sabalb z17.h, z5.b, z16.b 3780b8021494Sopenharmony_ci // vl128 state = 0x9957b992 3781b8021494Sopenharmony_ci __ dci(0x4552c095); // sabalb z21.h, z4.b, z18.b 3782b8021494Sopenharmony_ci // vl128 state = 0x666bd8db 3783b8021494Sopenharmony_ci __ dci(0x4543c094); // sabalb z20.h, z4.b, z3.b 3784b8021494Sopenharmony_ci // vl128 state = 0xd66d3d52 3785b8021494Sopenharmony_ci __ dci(0x4543c095); // sabalb z21.h, z4.b, z3.b 3786b8021494Sopenharmony_ci // vl128 state = 0x5d47b643 3787b8021494Sopenharmony_ci __ dci(0x4543c385); // sabalb z5.h, z28.b, z3.b 3788b8021494Sopenharmony_ci // vl128 state = 0x55fc0a65 3789b8021494Sopenharmony_ci __ dci(0x4543c38d); // sabalb z13.h, z28.b, z3.b 3790b8021494Sopenharmony_ci // vl128 state = 0xbb5ccc0f 3791b8021494Sopenharmony_ci __ dci(0x45c3c19d); // sabalb z29.d, z12.s, z3.s 3792b8021494Sopenharmony_ci // vl128 state = 0xb3dedffd 3793b8021494Sopenharmony_ci __ dci(0x45d3c595); // sabalt z21.d, z12.s, z19.s 3794b8021494Sopenharmony_ci // vl128 state = 0xd80597a1 3795b8021494Sopenharmony_ci __ dci(0x45d2c185); // sabalb z5.d, z12.s, z18.s 3796b8021494Sopenharmony_ci // vl128 state = 0x29a9fafc 3797b8021494Sopenharmony_ci __ dci(0x45d2c0b5); // sabalb z21.d, z5.s, z18.s 3798b8021494Sopenharmony_ci // vl128 state = 0x85dc16cb 3799b8021494Sopenharmony_ci __ dci(0x45d2c0bd); // sabalb z29.d, z5.s, z18.s 3800b8021494Sopenharmony_ci // vl128 state = 0xc38b621d 3801b8021494Sopenharmony_ci __ dci(0x45d2cab9); // uabalb z25.d, z21.s, z18.s 3802b8021494Sopenharmony_ci // vl128 state = 0x3801ad51 3803b8021494Sopenharmony_ci __ dci(0x45d0ca9b); // uabalb z27.d, z20.s, z16.s 3804b8021494Sopenharmony_ci // vl128 state = 0xd5cc0a31 3805b8021494Sopenharmony_ci __ dci(0x45d0ca39); // uabalb z25.d, z17.s, z16.s 3806b8021494Sopenharmony_ci // vl128 state = 0x272488a9 3807b8021494Sopenharmony_ci __ dci(0x45d0ca3d); // uabalb z29.d, z17.s, z16.s 3808b8021494Sopenharmony_ci // vl128 state = 0xea109c4b 3809b8021494Sopenharmony_ci __ dci(0x4550ce3c); // uabalt z28.h, z17.b, z16.b 3810b8021494Sopenharmony_ci // vl128 state = 0x5a9bdb39 3811b8021494Sopenharmony_ci __ dci(0x4559ce38); // uabalt z24.h, z17.b, z25.b 3812b8021494Sopenharmony_ci // vl128 state = 0xd90984c9 3813b8021494Sopenharmony_ci __ dci(0x455bcf39); // uabalt z25.h, z25.b, z27.b 3814b8021494Sopenharmony_ci // vl128 state = 0x6c0884ed 3815b8021494Sopenharmony_ci __ dci(0x455bceb1); // uabalt z17.h, z21.b, z27.b 3816b8021494Sopenharmony_ci // vl128 state = 0x2f01a6ad 3817b8021494Sopenharmony_ci __ dci(0x455bceb3); // uabalt z19.h, z21.b, z27.b 3818b8021494Sopenharmony_ci // vl128 state = 0x72a428e1 3819b8021494Sopenharmony_ci __ dci(0x455bceb1); // uabalt z17.h, z21.b, z27.b 3820b8021494Sopenharmony_ci // vl128 state = 0x27adcf54 3821b8021494Sopenharmony_ci __ dci(0x4559ce21); // uabalt z1.h, z17.b, z25.b 3822b8021494Sopenharmony_ci // vl128 state = 0xf1899dea 3823b8021494Sopenharmony_ci __ dci(0x45d9ce05); // uabalt z5.d, z16.s, z25.s 3824b8021494Sopenharmony_ci // vl128 state = 0x41e92a5c 3825b8021494Sopenharmony_ci __ dci(0x45dbc604); // sabalt z4.d, z16.s, z27.s 3826b8021494Sopenharmony_ci // vl128 state = 0x96021962 3827b8021494Sopenharmony_ci __ dci(0x45d3c634); // sabalt z20.d, z17.s, z19.s 3828b8021494Sopenharmony_ci // vl128 state = 0x4795c9e2 3829b8021494Sopenharmony_ci __ dci(0x45dbc235); // sabalb z21.d, z17.s, z27.s 3830b8021494Sopenharmony_ci // vl128 state = 0x6e2eccdb 3831b8021494Sopenharmony_ci __ dci(0x45dbc07d); // sabalb z29.d, z3.s, z27.s 3832b8021494Sopenharmony_ci // vl128 state = 0x2c2e3625 3833b8021494Sopenharmony_ci __ dci(0x459bc87c); // uabalb z28.s, z3.h, z27.h 3834b8021494Sopenharmony_ci // vl128 state = 0x618669ad 3835b8021494Sopenharmony_ci __ dci(0x459bc878); // uabalb z24.s, z3.h, z27.h 3836b8021494Sopenharmony_ci // vl128 state = 0x2d1a9a08 3837b8021494Sopenharmony_ci __ dci(0x4593cc79); // uabalt z25.s, z3.h, z19.h 3838b8021494Sopenharmony_ci // vl128 state = 0xdb6575df 3839b8021494Sopenharmony_ci } 3840b8021494Sopenharmony_ci 3841b8021494Sopenharmony_ci uint32_t state; 3842b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 3843b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 3844b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 3845b8021494Sopenharmony_ci 3846b8021494Sopenharmony_ci END(); 3847b8021494Sopenharmony_ci if (CAN_RUN()) { 3848b8021494Sopenharmony_ci RUN(); 3849b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 3850b8021494Sopenharmony_ci 0xdb6575df, 3851b8021494Sopenharmony_ci 0x691c09fc, 3852b8021494Sopenharmony_ci 0x6d969d30, 3853b8021494Sopenharmony_ci 0x83db67a7, 3854b8021494Sopenharmony_ci 0x8ca1109d, 3855b8021494Sopenharmony_ci 0x5175b8ff, 3856b8021494Sopenharmony_ci 0xade3cb1b, 3857b8021494Sopenharmony_ci 0x1c7b0422, 3858b8021494Sopenharmony_ci 0x1199a415, 3859b8021494Sopenharmony_ci 0xd1c715e8, 3860b8021494Sopenharmony_ci 0x2053b361, 3861b8021494Sopenharmony_ci 0x577c4450, 3862b8021494Sopenharmony_ci 0x1557204a, 3863b8021494Sopenharmony_ci 0xe994b21a, 3864b8021494Sopenharmony_ci 0xec34be56, 3865b8021494Sopenharmony_ci 0x1c9e0136, 3866b8021494Sopenharmony_ci }; 3867b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 3868b8021494Sopenharmony_ci } 3869b8021494Sopenharmony_ci} 3870b8021494Sopenharmony_ci 3871b8021494Sopenharmony_ciTEST_SVE(sve2_add_sub_carry) { 3872b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 3873b8021494Sopenharmony_ci CPUFeatures::kSVE2, 3874b8021494Sopenharmony_ci CPUFeatures::kNEON, 3875b8021494Sopenharmony_ci CPUFeatures::kCRC32); 3876b8021494Sopenharmony_ci START(); 3877b8021494Sopenharmony_ci 3878b8021494Sopenharmony_ci SetInitialMachineState(&masm); 3879b8021494Sopenharmony_ci // state = 0xe2bd2480 3880b8021494Sopenharmony_ci 3881b8021494Sopenharmony_ci { 3882b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 3883b8021494Sopenharmony_ci __ dci(0x4548d4a1); // adclt z1.d, z5.d, z8.d 3884b8021494Sopenharmony_ci // vl128 state = 0xde78ceb3 3885b8021494Sopenharmony_ci __ dci(0x4588d4a5); // sbclt z5.s, z5.s, z8.s 3886b8021494Sopenharmony_ci // vl128 state = 0x35dc8534 3887b8021494Sopenharmony_ci __ dci(0x4589d421); // sbclt z1.s, z1.s, z9.s 3888b8021494Sopenharmony_ci // vl128 state = 0xa72d158b 3889b8021494Sopenharmony_ci __ dci(0x45d9d423); // sbclt z3.d, z1.d, z25.d 3890b8021494Sopenharmony_ci // vl128 state = 0x197181b9 3891b8021494Sopenharmony_ci __ dci(0x45dfd433); // sbclt z19.d, z1.d, z31.d 3892b8021494Sopenharmony_ci // vl128 state = 0xaad0d32d 3893b8021494Sopenharmony_ci __ dci(0x4597d437); // sbclt z23.s, z1.s, z23.s 3894b8021494Sopenharmony_ci // vl128 state = 0xb1c42b7d 3895b8021494Sopenharmony_ci __ dci(0x4597d436); // sbclt z22.s, z1.s, z23.s 3896b8021494Sopenharmony_ci // vl128 state = 0x6c51a28c 3897b8021494Sopenharmony_ci __ dci(0x4587d537); // sbclt z23.s, z9.s, z7.s 3898b8021494Sopenharmony_ci // vl128 state = 0x525b5cf8 3899b8021494Sopenharmony_ci __ dci(0x4586d727); // sbclt z7.s, z25.s, z6.s 3900b8021494Sopenharmony_ci // vl128 state = 0x33942ff9 3901b8021494Sopenharmony_ci __ dci(0x45c6d625); // sbclt z5.d, z17.d, z6.d 3902b8021494Sopenharmony_ci // vl128 state = 0x24de09b4 3903b8021494Sopenharmony_ci __ dci(0x45c2d6b5); // sbclt z21.d, z21.d, z2.d 3904b8021494Sopenharmony_ci // vl128 state = 0xabc0063f 3905b8021494Sopenharmony_ci __ dci(0x4546d6b7); // adclt z23.d, z21.d, z6.d 3906b8021494Sopenharmony_ci // vl128 state = 0x52765e95 3907b8021494Sopenharmony_ci __ dci(0x45c7d6a7); // sbclt z7.d, z21.d, z7.d 3908b8021494Sopenharmony_ci // vl128 state = 0x7045d250 3909b8021494Sopenharmony_ci __ dci(0x4547d4a5); // adclt z5.d, z5.d, z7.d 3910b8021494Sopenharmony_ci // vl128 state = 0xb20f5c2a 3911b8021494Sopenharmony_ci __ dci(0x4517d4a1); // adclt z1.s, z5.s, z23.s 3912b8021494Sopenharmony_ci // vl128 state = 0x5c2c9c29 3913b8021494Sopenharmony_ci __ dci(0x4507d5a5); // adclt z5.s, z13.s, z7.s 3914b8021494Sopenharmony_ci // vl128 state = 0x788b25f0 3915b8021494Sopenharmony_ci __ dci(0x4507d5ad); // adclt z13.s, z13.s, z7.s 3916b8021494Sopenharmony_ci // vl128 state = 0xf27eff1e 3917b8021494Sopenharmony_ci __ dci(0x4507d0ac); // adclb z12.s, z5.s, z7.s 3918b8021494Sopenharmony_ci // vl128 state = 0xc0b629de 3919b8021494Sopenharmony_ci __ dci(0x450ed0ad); // adclb z13.s, z5.s, z14.s 3920b8021494Sopenharmony_ci // vl128 state = 0x3e15df94 3921b8021494Sopenharmony_ci __ dci(0x458ad0a9); // sbclb z9.s, z5.s, z10.s 3922b8021494Sopenharmony_ci // vl128 state = 0x68f64c82 3923b8021494Sopenharmony_ci __ dci(0x4582d2ad); // sbclb z13.s, z21.s, z2.s 3924b8021494Sopenharmony_ci // vl128 state = 0x882379e1 3925b8021494Sopenharmony_ci __ dci(0x4502d3af); // adclb z15.s, z29.s, z2.s 3926b8021494Sopenharmony_ci // vl128 state = 0x6901994e 3927b8021494Sopenharmony_ci __ dci(0x450ad32b); // adclb z11.s, z25.s, z10.s 3928b8021494Sopenharmony_ci // vl128 state = 0xa67e9382 3929b8021494Sopenharmony_ci __ dci(0x4582d329); // sbclb z9.s, z25.s, z2.s 3930b8021494Sopenharmony_ci // vl128 state = 0x9451d0c4 3931b8021494Sopenharmony_ci __ dci(0x4592d22b); // sbclb z11.s, z17.s, z18.s 3932b8021494Sopenharmony_ci // vl128 state = 0xc19da52e 3933b8021494Sopenharmony_ci __ dci(0x459ad2a3); // sbclb z3.s, z21.s, z26.s 3934b8021494Sopenharmony_ci // vl128 state = 0x91065b69 3935b8021494Sopenharmony_ci __ dci(0x451ad233); // adclb z19.s, z17.s, z26.s 3936b8021494Sopenharmony_ci // vl128 state = 0xe3fdc4a5 3937b8021494Sopenharmony_ci __ dci(0x450bd232); // adclb z18.s, z17.s, z11.s 3938b8021494Sopenharmony_ci // vl128 state = 0x168abbff 3939b8021494Sopenharmony_ci __ dci(0x450ad2b6); // adclb z22.s, z21.s, z10.s 3940b8021494Sopenharmony_ci // vl128 state = 0x64d0c940 3941b8021494Sopenharmony_ci __ dci(0x4582d2b4); // sbclb z20.s, z21.s, z2.s 3942b8021494Sopenharmony_ci // vl128 state = 0x37307824 3943b8021494Sopenharmony_ci __ dci(0x4582d6e4); // sbclt z4.s, z23.s, z2.s 3944b8021494Sopenharmony_ci // vl128 state = 0xd35e02f7 3945b8021494Sopenharmony_ci __ dci(0x4500d6f4); // adclt z20.s, z23.s, z0.s 3946b8021494Sopenharmony_ci // vl128 state = 0x017ed1b0 3947b8021494Sopenharmony_ci __ dci(0x4501d2e4); // adclb z4.s, z23.s, z1.s 3948b8021494Sopenharmony_ci // vl128 state = 0x327242bc 3949b8021494Sopenharmony_ci __ dci(0x4501d1f4); // adclb z20.s, z15.s, z1.s 3950b8021494Sopenharmony_ci // vl128 state = 0x208174e8 3951b8021494Sopenharmony_ci __ dci(0x4503d1b0); // adclb z16.s, z13.s, z3.s 3952b8021494Sopenharmony_ci // vl128 state = 0xa5a9f61d 3953b8021494Sopenharmony_ci __ dci(0x4501d198); // adclb z24.s, z12.s, z1.s 3954b8021494Sopenharmony_ci // vl128 state = 0x97e22c2b 3955b8021494Sopenharmony_ci __ dci(0x4501d3da); // adclb z26.s, z30.s, z1.s 3956b8021494Sopenharmony_ci // vl128 state = 0xd3ac35d5 3957b8021494Sopenharmony_ci __ dci(0x4501d6de); // adclt z30.s, z22.s, z1.s 3958b8021494Sopenharmony_ci // vl128 state = 0xab835df9 3959b8021494Sopenharmony_ci __ dci(0x4503d2dc); // adclb z28.s, z22.s, z3.s 3960b8021494Sopenharmony_ci // vl128 state = 0xa048599b 3961b8021494Sopenharmony_ci __ dci(0x4502d6d8); // adclt z24.s, z22.s, z2.s 3962b8021494Sopenharmony_ci // vl128 state = 0x4c245fee 3963b8021494Sopenharmony_ci __ dci(0x4502d6d0); // adclt z16.s, z22.s, z2.s 3964b8021494Sopenharmony_ci // vl128 state = 0x0222f3cc 3965b8021494Sopenharmony_ci __ dci(0x4502d280); // adclb z0.s, z20.s, z2.s 3966b8021494Sopenharmony_ci // vl128 state = 0x16bd7f6a 3967b8021494Sopenharmony_ci __ dci(0x458ad284); // sbclb z4.s, z20.s, z10.s 3968b8021494Sopenharmony_ci // vl128 state = 0x7ef7d0a2 3969b8021494Sopenharmony_ci __ dci(0x458ad6d4); // sbclt z20.s, z22.s, z10.s 3970b8021494Sopenharmony_ci // vl128 state = 0x303d8262 3971b8021494Sopenharmony_ci __ dci(0x458ad6dc); // sbclt z28.s, z22.s, z10.s 3972b8021494Sopenharmony_ci // vl128 state = 0x86b8b0e9 3973b8021494Sopenharmony_ci __ dci(0x458bd7cc); // sbclt z12.s, z30.s, z11.s 3974b8021494Sopenharmony_ci // vl128 state = 0x068cc5cd 3975b8021494Sopenharmony_ci __ dci(0x45dbd7ce); // sbclt z14.d, z30.d, z27.d 3976b8021494Sopenharmony_ci // vl128 state = 0x30acfa7f 3977b8021494Sopenharmony_ci __ dci(0x45dfd75e); // sbclt z30.d, z26.d, z31.d 3978b8021494Sopenharmony_ci // vl128 state = 0xdbd8b32a 3979b8021494Sopenharmony_ci __ dci(0x45ddd7ce); // sbclt z14.d, z30.d, z29.d 3980b8021494Sopenharmony_ci // vl128 state = 0x59c3c1a9 3981b8021494Sopenharmony_ci __ dci(0x45ddd7cf); // sbclt z15.d, z30.d, z29.d 3982b8021494Sopenharmony_ci // vl128 state = 0x5c953a50 3983b8021494Sopenharmony_ci } 3984b8021494Sopenharmony_ci 3985b8021494Sopenharmony_ci uint32_t state; 3986b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 3987b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 3988b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 3989b8021494Sopenharmony_ci 3990b8021494Sopenharmony_ci END(); 3991b8021494Sopenharmony_ci if (CAN_RUN()) { 3992b8021494Sopenharmony_ci RUN(); 3993b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 3994b8021494Sopenharmony_ci 0x5c953a50, 3995b8021494Sopenharmony_ci 0x22fea196, 3996b8021494Sopenharmony_ci 0x084c11a8, 3997b8021494Sopenharmony_ci 0x6e7e24d1, 3998b8021494Sopenharmony_ci 0x70965ff7, 3999b8021494Sopenharmony_ci 0x8c7cb797, 4000b8021494Sopenharmony_ci 0xdb846b66, 4001b8021494Sopenharmony_ci 0x512f049d, 4002b8021494Sopenharmony_ci 0x5c45d25c, 4003b8021494Sopenharmony_ci 0xa349606f, 4004b8021494Sopenharmony_ci 0x68a853e5, 4005b8021494Sopenharmony_ci 0xd92fbeff, 4006b8021494Sopenharmony_ci 0x52e59a6b, 4007b8021494Sopenharmony_ci 0xf77ee8ce, 4008b8021494Sopenharmony_ci 0x6c79623b, 4009b8021494Sopenharmony_ci 0x7efed6cc, 4010b8021494Sopenharmony_ci }; 4011b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 4012b8021494Sopenharmony_ci } 4013b8021494Sopenharmony_ci} 4014b8021494Sopenharmony_ci 4015b8021494Sopenharmony_ciTEST_SVE(sve2_add_sub_high) { 4016b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 4017b8021494Sopenharmony_ci CPUFeatures::kSVE2, 4018b8021494Sopenharmony_ci CPUFeatures::kNEON, 4019b8021494Sopenharmony_ci CPUFeatures::kCRC32); 4020b8021494Sopenharmony_ci START(); 4021b8021494Sopenharmony_ci 4022b8021494Sopenharmony_ci SetInitialMachineState(&masm); 4023b8021494Sopenharmony_ci // state = 0xe2bd2480 4024b8021494Sopenharmony_ci 4025b8021494Sopenharmony_ci { 4026b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 4027b8021494Sopenharmony_ci __ dci(0x45fd7464); // subhnt z4.s, z3.d, z29.d 4028b8021494Sopenharmony_ci // vl128 state = 0x0eea0f4a 4029b8021494Sopenharmony_ci __ dci(0x45fc7c66); // rsubhnt z6.s, z3.d, z28.d 4030b8021494Sopenharmony_ci // vl128 state = 0x4dc0d938 4031b8021494Sopenharmony_ci __ dci(0x45fc7c6e); // rsubhnt z14.s, z3.d, z28.d 4032b8021494Sopenharmony_ci // vl128 state = 0x33de615e 4033b8021494Sopenharmony_ci __ dci(0x45f46c7e); // raddhnt z30.s, z3.d, z20.d 4034b8021494Sopenharmony_ci // vl128 state = 0xa24af7ae 4035b8021494Sopenharmony_ci __ dci(0x45f06e7c); // raddhnt z28.s, z19.d, z16.d 4036b8021494Sopenharmony_ci // vl128 state = 0x13883aa2 4037b8021494Sopenharmony_ci __ dci(0x45b06a6c); // raddhnb z12.h, z19.s, z16.s 4038b8021494Sopenharmony_ci // vl128 state = 0x5bf75f05 4039b8021494Sopenharmony_ci __ dci(0x45b96a64); // raddhnb z4.h, z19.s, z25.s 4040b8021494Sopenharmony_ci // vl128 state = 0x0e489878 4041b8021494Sopenharmony_ci __ dci(0x45b96820); // raddhnb z0.h, z1.s, z25.s 4042b8021494Sopenharmony_ci // vl128 state = 0x86df8f5f 4043b8021494Sopenharmony_ci __ dci(0x45b96a01); // raddhnb z1.h, z16.s, z25.s 4044b8021494Sopenharmony_ci // vl128 state = 0x0d1563f2 4045b8021494Sopenharmony_ci __ dci(0x45b96900); // raddhnb z0.h, z8.s, z25.s 4046b8021494Sopenharmony_ci // vl128 state = 0xd66de87e 4047b8021494Sopenharmony_ci __ dci(0x45a97904); // rsubhnb z4.h, z8.s, z9.s 4048b8021494Sopenharmony_ci // vl128 state = 0x0c34bd33 4049b8021494Sopenharmony_ci __ dci(0x45a9790c); // rsubhnb z12.h, z8.s, z9.s 4050b8021494Sopenharmony_ci // vl128 state = 0x7892f2c5 4051b8021494Sopenharmony_ci __ dci(0x45e97988); // rsubhnb z8.s, z12.d, z9.d 4052b8021494Sopenharmony_ci // vl128 state = 0x9709efbd 4053b8021494Sopenharmony_ci __ dci(0x45f97909); // rsubhnb z9.s, z8.d, z25.d 4054b8021494Sopenharmony_ci // vl128 state = 0x029a3116 4055b8021494Sopenharmony_ci __ dci(0x45ff790d); // rsubhnb z13.s, z8.d, z31.d 4056b8021494Sopenharmony_ci // vl128 state = 0x48cf21c1 4057b8021494Sopenharmony_ci __ dci(0x45ff6d05); // raddhnt z5.s, z8.d, z31.d 4058b8021494Sopenharmony_ci // vl128 state = 0x44c94a11 4059b8021494Sopenharmony_ci __ dci(0x45ff6dc1); // raddhnt z1.s, z14.d, z31.d 4060b8021494Sopenharmony_ci // vl128 state = 0x12fab619 4061b8021494Sopenharmony_ci __ dci(0x45ff79d1); // rsubhnb z17.s, z14.d, z31.d 4062b8021494Sopenharmony_ci // vl128 state = 0x6f749933 4063b8021494Sopenharmony_ci __ dci(0x457f7dd0); // rsubhnt z16.b, z14.h, z31.h 4064b8021494Sopenharmony_ci // vl128 state = 0x404889de 4065b8021494Sopenharmony_ci __ dci(0x457f75f1); // subhnt z17.b, z15.h, z31.h 4066b8021494Sopenharmony_ci // vl128 state = 0x1dae2a16 4067b8021494Sopenharmony_ci __ dci(0x457f75f3); // subhnt z19.b, z15.h, z31.h 4068b8021494Sopenharmony_ci // vl128 state = 0xc441a9f0 4069b8021494Sopenharmony_ci __ dci(0x456d75fb); // subhnt z27.b, z15.h, z13.h 4070b8021494Sopenharmony_ci // vl128 state = 0xdd79f567 4071b8021494Sopenharmony_ci __ dci(0x45ed7dff); // rsubhnt z31.s, z15.d, z13.d 4072b8021494Sopenharmony_ci // vl128 state = 0x49b27a1f 4073b8021494Sopenharmony_ci __ dci(0x45e17dfe); // rsubhnt z30.s, z15.d, z1.d 4074b8021494Sopenharmony_ci // vl128 state = 0x19cddb35 4075b8021494Sopenharmony_ci __ dci(0x45e17df6); // rsubhnt z22.s, z15.d, z1.d 4076b8021494Sopenharmony_ci // vl128 state = 0xea722faa 4077b8021494Sopenharmony_ci __ dci(0x45e37d72); // rsubhnt z18.s, z11.d, z3.d 4078b8021494Sopenharmony_ci // vl128 state = 0x907267b3 4079b8021494Sopenharmony_ci __ dci(0x45737d62); // rsubhnt z2.b, z11.h, z19.h 4080b8021494Sopenharmony_ci // vl128 state = 0x1e5409d8 4081b8021494Sopenharmony_ci __ dci(0x45726d6a); // raddhnt z10.b, z11.h, z18.h 4082b8021494Sopenharmony_ci // vl128 state = 0xce3b87ca 4083b8021494Sopenharmony_ci __ dci(0x45726f5a); // raddhnt z26.b, z26.h, z18.h 4084b8021494Sopenharmony_ci // vl128 state = 0x2f330789 4085b8021494Sopenharmony_ci __ dci(0x45706f18); // raddhnt z24.b, z24.h, z16.h 4086b8021494Sopenharmony_ci // vl128 state = 0xff09606a 4087b8021494Sopenharmony_ci __ dci(0x45706f08); // raddhnt z8.b, z24.h, z16.h 4088b8021494Sopenharmony_ci // vl128 state = 0x062ac37b 4089b8021494Sopenharmony_ci __ dci(0x45706f09); // raddhnt z9.b, z24.h, z16.h 4090b8021494Sopenharmony_ci // vl128 state = 0xb12c9142 4091b8021494Sopenharmony_ci __ dci(0x45786b08); // raddhnb z8.b, z24.h, z24.h 4092b8021494Sopenharmony_ci // vl128 state = 0x77e41545 4093b8021494Sopenharmony_ci __ dci(0x45786b0c); // raddhnb z12.b, z24.h, z24.h 4094b8021494Sopenharmony_ci // vl128 state = 0x1f3a202d 4095b8021494Sopenharmony_ci __ dci(0x457a6308); // addhnb z8.b, z24.h, z26.h 4096b8021494Sopenharmony_ci // vl128 state = 0xea51f4b9 4097b8021494Sopenharmony_ci __ dci(0x45fb6318); // addhnb z24.s, z24.d, z27.d 4098b8021494Sopenharmony_ci // vl128 state = 0x5b98747e 4099b8021494Sopenharmony_ci __ dci(0x45b96319); // addhnb z25.h, z24.s, z25.s 4100b8021494Sopenharmony_ci // vl128 state = 0xdcebf700 4101b8021494Sopenharmony_ci __ dci(0x45bb621d); // addhnb z29.h, z16.s, z27.s 4102b8021494Sopenharmony_ci // vl128 state = 0x55a216b1 4103b8021494Sopenharmony_ci __ dci(0x45b3625f); // addhnb z31.h, z18.s, z19.s 4104b8021494Sopenharmony_ci // vl128 state = 0x3e86d641 4105b8021494Sopenharmony_ci __ dci(0x45b3631b); // addhnb z27.h, z24.s, z19.s 4106b8021494Sopenharmony_ci // vl128 state = 0x36d052e3 4107b8021494Sopenharmony_ci __ dci(0x45bb6213); // addhnb z19.h, z16.s, z27.s 4108b8021494Sopenharmony_ci // vl128 state = 0xba012cb8 4109b8021494Sopenharmony_ci __ dci(0x45bf7217); // subhnb z23.h, z16.s, z31.s 4110b8021494Sopenharmony_ci // vl128 state = 0xdef826a7 4111b8021494Sopenharmony_ci __ dci(0x45b67213); // subhnb z19.h, z16.s, z22.s 4112b8021494Sopenharmony_ci // vl128 state = 0x5cd11781 4113b8021494Sopenharmony_ci __ dci(0x45b66223); // addhnb z3.h, z17.s, z22.s 4114b8021494Sopenharmony_ci // vl128 state = 0x2f04c440 4115b8021494Sopenharmony_ci __ dci(0x45f66a27); // raddhnb z7.s, z17.d, z22.d 4116b8021494Sopenharmony_ci // vl128 state = 0x486d0d03 4117b8021494Sopenharmony_ci __ dci(0x45f76825); // raddhnb z5.s, z1.d, z23.d 4118b8021494Sopenharmony_ci // vl128 state = 0x8a94d5c9 4119b8021494Sopenharmony_ci __ dci(0x45f668a1); // raddhnb z1.s, z5.d, z22.d 4120b8021494Sopenharmony_ci // vl128 state = 0x14e8e0e7 4121b8021494Sopenharmony_ci __ dci(0x45f469b1); // raddhnb z17.s, z13.d, z20.d 4122b8021494Sopenharmony_ci // vl128 state = 0x19b96fb3 4123b8021494Sopenharmony_ci __ dci(0x45f469b3); // raddhnb z19.s, z13.d, z20.d 4124b8021494Sopenharmony_ci // vl128 state = 0xc98e7d4e 4125b8021494Sopenharmony_ci __ dci(0x45f169b7); // raddhnb z23.s, z13.d, z17.d 4126b8021494Sopenharmony_ci // vl128 state = 0x7ff24d47 4127b8021494Sopenharmony_ci } 4128b8021494Sopenharmony_ci 4129b8021494Sopenharmony_ci uint32_t state; 4130b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 4131b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 4132b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 4133b8021494Sopenharmony_ci 4134b8021494Sopenharmony_ci END(); 4135b8021494Sopenharmony_ci if (CAN_RUN()) { 4136b8021494Sopenharmony_ci RUN(); 4137b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 4138b8021494Sopenharmony_ci 0x7ff24d47, 4139b8021494Sopenharmony_ci 0xc639a9b3, 4140b8021494Sopenharmony_ci 0x0a1df4a5, 4141b8021494Sopenharmony_ci 0x30db6e18, 4142b8021494Sopenharmony_ci 0xf3e2f795, 4143b8021494Sopenharmony_ci 0x36ff477d, 4144b8021494Sopenharmony_ci 0x162f1ca5, 4145b8021494Sopenharmony_ci 0x36da990b, 4146b8021494Sopenharmony_ci 0x110b2c35, 4147b8021494Sopenharmony_ci 0xaf1580f5, 4148b8021494Sopenharmony_ci 0x14e39873, 4149b8021494Sopenharmony_ci 0x7f5eb52c, 4150b8021494Sopenharmony_ci 0x2ececb6f, 4151b8021494Sopenharmony_ci 0x4e4d71f0, 4152b8021494Sopenharmony_ci 0x800769d1, 4153b8021494Sopenharmony_ci 0x1bcbe3a3, 4154b8021494Sopenharmony_ci }; 4155b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 4156b8021494Sopenharmony_ci } 4157b8021494Sopenharmony_ci} 4158b8021494Sopenharmony_ci 4159b8021494Sopenharmony_ciTEST_SVE(sve2_complex_addition) { 4160b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 4161b8021494Sopenharmony_ci CPUFeatures::kSVE2, 4162b8021494Sopenharmony_ci CPUFeatures::kNEON, 4163b8021494Sopenharmony_ci CPUFeatures::kCRC32); 4164b8021494Sopenharmony_ci START(); 4165b8021494Sopenharmony_ci 4166b8021494Sopenharmony_ci SetInitialMachineState(&masm); 4167b8021494Sopenharmony_ci // state = 0xe2bd2480 4168b8021494Sopenharmony_ci 4169b8021494Sopenharmony_ci { 4170b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 4171b8021494Sopenharmony_ci __ dci(0x4500dc43); // cadd z3.b, z3.b, z2.b, #270 4172b8021494Sopenharmony_ci // vl128 state = 0x998365c2 4173b8021494Sopenharmony_ci __ dci(0x4540dc13); // cadd z19.h, z19.h, z0.h, #270 4174b8021494Sopenharmony_ci // vl128 state = 0xcc866131 4175b8021494Sopenharmony_ci __ dci(0x4541d81b); // sqcadd z27.h, z27.h, z0.h, #90 4176b8021494Sopenharmony_ci // vl128 state = 0x2ae23a6a 4177b8021494Sopenharmony_ci __ dci(0x45c1d853); // sqcadd z19.d, z19.d, z2.d, #90 4178b8021494Sopenharmony_ci // vl128 state = 0x1f8de2d3 4179b8021494Sopenharmony_ci __ dci(0x4541d8c3); // sqcadd z3.h, z3.h, z6.h, #90 4180b8021494Sopenharmony_ci // vl128 state = 0x3655c07c 4181b8021494Sopenharmony_ci __ dci(0x4541d8d3); // sqcadd z19.h, z19.h, z6.h, #90 4182b8021494Sopenharmony_ci // vl128 state = 0x3a8fe2d9 4183b8021494Sopenharmony_ci __ dci(0x4541d811); // sqcadd z17.h, z17.h, z0.h, #90 4184b8021494Sopenharmony_ci // vl128 state = 0x003c88ea 4185b8021494Sopenharmony_ci __ dci(0x4540da10); // cadd z16.h, z16.h, z16.h, #90 4186b8021494Sopenharmony_ci // vl128 state = 0xe20c1375 4187b8021494Sopenharmony_ci __ dci(0x4540da18); // cadd z24.h, z24.h, z16.h, #90 4188b8021494Sopenharmony_ci // vl128 state = 0x67bb0270 4189b8021494Sopenharmony_ci __ dci(0x4540de5a); // cadd z26.h, z26.h, z18.h, #270 4190b8021494Sopenharmony_ci // vl128 state = 0x7abb4f8f 4191b8021494Sopenharmony_ci __ dci(0x4540de4a); // cadd z10.h, z10.h, z18.h, #270 4192b8021494Sopenharmony_ci // vl128 state = 0x42850f11 4193b8021494Sopenharmony_ci __ dci(0x4500decb); // cadd z11.b, z11.b, z22.b, #270 4194b8021494Sopenharmony_ci // vl128 state = 0xda605f59 4195b8021494Sopenharmony_ci __ dci(0x4500da83); // cadd z3.b, z3.b, z20.b, #90 4196b8021494Sopenharmony_ci // vl128 state = 0x99e63476 4197b8021494Sopenharmony_ci __ dci(0x4500dc8b); // cadd z11.b, z11.b, z4.b, #270 4198b8021494Sopenharmony_ci // vl128 state = 0xd444a939 4199b8021494Sopenharmony_ci __ dci(0x4500dc8f); // cadd z15.b, z15.b, z4.b, #270 4200b8021494Sopenharmony_ci // vl128 state = 0xde3ad968 4201b8021494Sopenharmony_ci __ dci(0x4500d99f); // cadd z31.b, z31.b, z12.b, #90 4202b8021494Sopenharmony_ci // vl128 state = 0xd7cdb177 4203b8021494Sopenharmony_ci __ dci(0x4540d91e); // cadd z30.h, z30.h, z8.h, #90 4204b8021494Sopenharmony_ci // vl128 state = 0x74575b36 4205b8021494Sopenharmony_ci __ dci(0x4541d81a); // sqcadd z26.h, z26.h, z0.h, #90 4206b8021494Sopenharmony_ci // vl128 state = 0x3d347b0b 4207b8021494Sopenharmony_ci __ dci(0x4501d83b); // sqcadd z27.b, z27.b, z1.b, #90 4208b8021494Sopenharmony_ci // vl128 state = 0x03df7859 4209b8021494Sopenharmony_ci __ dci(0x45c1d83f); // sqcadd z31.d, z31.d, z1.d, #90 4210b8021494Sopenharmony_ci // vl128 state = 0xf0cdbf68 4211b8021494Sopenharmony_ci __ dci(0x45c1d83e); // sqcadd z30.d, z30.d, z1.d, #90 4212b8021494Sopenharmony_ci // vl128 state = 0x0931dda4 4213b8021494Sopenharmony_ci __ dci(0x45c1d83c); // sqcadd z28.d, z28.d, z1.d, #90 4214b8021494Sopenharmony_ci // vl128 state = 0x460b5369 4215b8021494Sopenharmony_ci __ dci(0x4581da3e); // sqcadd z30.s, z30.s, z17.s, #90 4216b8021494Sopenharmony_ci // vl128 state = 0x71af9203 4217b8021494Sopenharmony_ci __ dci(0x45c1d83f); // sqcadd z31.d, z31.d, z1.d, #90 4218b8021494Sopenharmony_ci // vl128 state = 0xd6babc53 4219b8021494Sopenharmony_ci __ dci(0x4581da3e); // sqcadd z30.s, z30.s, z17.s, #90 4220b8021494Sopenharmony_ci // vl128 state = 0xd3e4f42f 4221b8021494Sopenharmony_ci __ dci(0x4501d83f); // sqcadd z31.b, z31.b, z1.b, #90 4222b8021494Sopenharmony_ci // vl128 state = 0x7a594239 4223b8021494Sopenharmony_ci __ dci(0x4501dcbb); // sqcadd z27.b, z27.b, z5.b, #270 4224b8021494Sopenharmony_ci // vl128 state = 0x24a5a8c9 4225b8021494Sopenharmony_ci __ dci(0x4501dfba); // sqcadd z26.b, z26.b, z29.b, #270 4226b8021494Sopenharmony_ci // vl128 state = 0x0c3df842 4227b8021494Sopenharmony_ci __ dci(0x4581dfea); // sqcadd z10.s, z10.s, z31.s, #270 4228b8021494Sopenharmony_ci // vl128 state = 0x6173c97f 4229b8021494Sopenharmony_ci __ dci(0x4581db7a); // sqcadd z26.s, z26.s, z27.s, #90 4230b8021494Sopenharmony_ci // vl128 state = 0x55090d5f 4231b8021494Sopenharmony_ci __ dci(0x4581db1b); // sqcadd z27.s, z27.s, z24.s, #90 4232b8021494Sopenharmony_ci // vl128 state = 0x63477385 4233b8021494Sopenharmony_ci __ dci(0x4581da93); // sqcadd z19.s, z19.s, z20.s, #90 4234b8021494Sopenharmony_ci // vl128 state = 0xc996545e 4235b8021494Sopenharmony_ci __ dci(0x45c1db92); // sqcadd z18.d, z18.d, z28.d, #90 4236b8021494Sopenharmony_ci // vl128 state = 0xa48bf827 4237b8021494Sopenharmony_ci __ dci(0x45c1db93); // sqcadd z19.d, z19.d, z28.d, #90 4238b8021494Sopenharmony_ci // vl128 state = 0xf5a3b641 4239b8021494Sopenharmony_ci __ dci(0x45c1daa3); // sqcadd z3.d, z3.d, z21.d, #90 4240b8021494Sopenharmony_ci // vl128 state = 0x20ad4c28 4241b8021494Sopenharmony_ci __ dci(0x4581dba7); // sqcadd z7.s, z7.s, z29.s, #90 4242b8021494Sopenharmony_ci // vl128 state = 0xc9e36e96 4243b8021494Sopenharmony_ci __ dci(0x45c1daaf); // sqcadd z15.d, z15.d, z21.d, #90 4244b8021494Sopenharmony_ci // vl128 state = 0x6eb23fd2 4245b8021494Sopenharmony_ci __ dci(0x45c1daae); // sqcadd z14.d, z14.d, z21.d, #90 4246b8021494Sopenharmony_ci // vl128 state = 0x585d4d63 4247b8021494Sopenharmony_ci __ dci(0x4541dae6); // sqcadd z6.h, z6.h, z23.h, #90 4248b8021494Sopenharmony_ci // vl128 state = 0x827cc0a8 4249b8021494Sopenharmony_ci __ dci(0x4541daee); // sqcadd z14.h, z14.h, z23.h, #90 4250b8021494Sopenharmony_ci // vl128 state = 0xe00543a0 4251b8021494Sopenharmony_ci __ dci(0x4501dabe); // sqcadd z30.b, z30.b, z21.b, #90 4252b8021494Sopenharmony_ci // vl128 state = 0x2313db47 4253b8021494Sopenharmony_ci __ dci(0x4501deff); // sqcadd z31.b, z31.b, z23.b, #270 4254b8021494Sopenharmony_ci // vl128 state = 0xe30d4e83 4255b8021494Sopenharmony_ci __ dci(0x4501defd); // sqcadd z29.b, z29.b, z23.b, #270 4256b8021494Sopenharmony_ci // vl128 state = 0xb95d6d94 4257b8021494Sopenharmony_ci __ dci(0x4501def5); // sqcadd z21.b, z21.b, z23.b, #270 4258b8021494Sopenharmony_ci // vl128 state = 0x4f18b02e 4259b8021494Sopenharmony_ci __ dci(0x4501def4); // sqcadd z20.b, z20.b, z23.b, #270 4260b8021494Sopenharmony_ci // vl128 state = 0x20ae9a78 4261b8021494Sopenharmony_ci __ dci(0x4501dee4); // sqcadd z4.b, z4.b, z23.b, #270 4262b8021494Sopenharmony_ci // vl128 state = 0x4eef87a9 4263b8021494Sopenharmony_ci __ dci(0x4501dee6); // sqcadd z6.b, z6.b, z23.b, #270 4264b8021494Sopenharmony_ci // vl128 state = 0x1b041a7b 4265b8021494Sopenharmony_ci __ dci(0x4501dfc2); // sqcadd z2.b, z2.b, z30.b, #270 4266b8021494Sopenharmony_ci // vl128 state = 0xeaf5e18f 4267b8021494Sopenharmony_ci __ dci(0x4500df92); // cadd z18.b, z18.b, z28.b, #270 4268b8021494Sopenharmony_ci // vl128 state = 0xc47ee5e7 4269b8021494Sopenharmony_ci __ dci(0x4500de13); // cadd z19.b, z19.b, z16.b, #270 4270b8021494Sopenharmony_ci // vl128 state = 0x6482d75c 4271b8021494Sopenharmony_ci } 4272b8021494Sopenharmony_ci 4273b8021494Sopenharmony_ci uint32_t state; 4274b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 4275b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 4276b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 4277b8021494Sopenharmony_ci 4278b8021494Sopenharmony_ci END(); 4279b8021494Sopenharmony_ci if (CAN_RUN()) { 4280b8021494Sopenharmony_ci RUN(); 4281b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 4282b8021494Sopenharmony_ci 0x6482d75c, 4283b8021494Sopenharmony_ci 0x48d9bd2f, 4284b8021494Sopenharmony_ci 0xd6bd52ae, 4285b8021494Sopenharmony_ci 0x56be94f0, 4286b8021494Sopenharmony_ci 0x620cfb69, 4287b8021494Sopenharmony_ci 0xb646e0fe, 4288b8021494Sopenharmony_ci 0x6034718f, 4289b8021494Sopenharmony_ci 0xd8187657, 4290b8021494Sopenharmony_ci 0x211218bb, 4291b8021494Sopenharmony_ci 0xc973a707, 4292b8021494Sopenharmony_ci 0x6020dcc9, 4293b8021494Sopenharmony_ci 0x8fadad0c, 4294b8021494Sopenharmony_ci 0x0132ecbc, 4295b8021494Sopenharmony_ci 0x3a07eb63, 4296b8021494Sopenharmony_ci 0x5c20eb82, 4297b8021494Sopenharmony_ci 0xc92d6cb2, 4298b8021494Sopenharmony_ci }; 4299b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 4300b8021494Sopenharmony_ci } 4301b8021494Sopenharmony_ci} 4302b8021494Sopenharmony_ci 4303b8021494Sopenharmony_ciTEST_SVE(sve2_bit_permute) { 4304b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 4305b8021494Sopenharmony_ci CPUFeatures::kSVE2, 4306b8021494Sopenharmony_ci CPUFeatures::kSVEBitPerm, 4307b8021494Sopenharmony_ci CPUFeatures::kNEON, 4308b8021494Sopenharmony_ci CPUFeatures::kCRC32); 4309b8021494Sopenharmony_ci START(); 4310b8021494Sopenharmony_ci 4311b8021494Sopenharmony_ci SetInitialMachineState(&masm); 4312b8021494Sopenharmony_ci // state = 0xe2bd2480 4313b8021494Sopenharmony_ci 4314b8021494Sopenharmony_ci { 4315b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 4316b8021494Sopenharmony_ci __ dci(0x455fbb1a); // bgrp z26.h, z24.h, z31.h 4317b8021494Sopenharmony_ci // vl128 state = 0x39fb8e5b 4318b8021494Sopenharmony_ci __ dci(0x451fbb58); // bgrp z24.b, z26.b, z31.b 4319b8021494Sopenharmony_ci // vl128 state = 0x7fbccdbd 4320b8021494Sopenharmony_ci __ dci(0x4517bb19); // bgrp z25.b, z24.b, z23.b 4321b8021494Sopenharmony_ci // vl128 state = 0x67caf176 4322b8021494Sopenharmony_ci __ dci(0x4517bb18); // bgrp z24.b, z24.b, z23.b 4323b8021494Sopenharmony_ci // vl128 state = 0x665fd977 4324b8021494Sopenharmony_ci __ dci(0x4517ba5c); // bgrp z28.b, z18.b, z23.b 4325b8021494Sopenharmony_ci // vl128 state = 0x0f2c1473 4326b8021494Sopenharmony_ci __ dci(0x4517ba38); // bgrp z24.b, z17.b, z23.b 4327b8021494Sopenharmony_ci // vl128 state = 0x253789a0 4328b8021494Sopenharmony_ci __ dci(0x4517ba3c); // bgrp z28.b, z17.b, z23.b 4329b8021494Sopenharmony_ci // vl128 state = 0xd3b26fd2 4330b8021494Sopenharmony_ci __ dci(0x4515ba6c); // bgrp z12.b, z19.b, z21.b 4331b8021494Sopenharmony_ci // vl128 state = 0x4bad6941 4332b8021494Sopenharmony_ci __ dci(0x4515bac4); // bgrp z4.b, z22.b, z21.b 4333b8021494Sopenharmony_ci // vl128 state = 0x7c70d2d2 4334b8021494Sopenharmony_ci __ dci(0x4517ba86); // bgrp z6.b, z20.b, z23.b 4335b8021494Sopenharmony_ci // vl128 state = 0x5794816b 4336b8021494Sopenharmony_ci __ dci(0x4517ba87); // bgrp z7.b, z20.b, z23.b 4337b8021494Sopenharmony_ci // vl128 state = 0xe67993b1 4338b8021494Sopenharmony_ci __ dci(0x4515b297); // bext z23.b, z20.b, z21.b 4339b8021494Sopenharmony_ci // vl128 state = 0x3041b7ee 4340b8021494Sopenharmony_ci __ dci(0x4517b396); // bext z22.b, z28.b, z23.b 4341b8021494Sopenharmony_ci // vl128 state = 0xb571d524 4342b8021494Sopenharmony_ci __ dci(0x451bb386); // bext z6.b, z28.b, z27.b 4343b8021494Sopenharmony_ci // vl128 state = 0x73ce1823 4344b8021494Sopenharmony_ci __ dci(0x4513b784); // bdep z4.b, z28.b, z19.b 4345b8021494Sopenharmony_ci // vl128 state = 0x4264f0f2 4346b8021494Sopenharmony_ci __ dci(0x4593b7ac); // bdep z12.s, z29.s, z19.s 4347b8021494Sopenharmony_ci // vl128 state = 0xf9cb9d26 4348b8021494Sopenharmony_ci __ dci(0x4593b7a8); // bdep z8.s, z29.s, z19.s 4349b8021494Sopenharmony_ci // vl128 state = 0xa2b310a0 4350b8021494Sopenharmony_ci __ dci(0x4597b780); // bdep z0.s, z28.s, z23.s 4351b8021494Sopenharmony_ci // vl128 state = 0xee25c82f 4352b8021494Sopenharmony_ci __ dci(0x4597b781); // bdep z1.s, z28.s, z23.s 4353b8021494Sopenharmony_ci // vl128 state = 0xdca7577f 4354b8021494Sopenharmony_ci __ dci(0x4597b7e3); // bdep z3.s, z31.s, z23.s 4355b8021494Sopenharmony_ci // vl128 state = 0x32294429 4356b8021494Sopenharmony_ci __ dci(0x45dfb7e1); // bdep z1.d, z31.d, z31.d 4357b8021494Sopenharmony_ci // vl128 state = 0xc147e511 4358b8021494Sopenharmony_ci __ dci(0x455db7e5); // bdep z5.h, z31.h, z29.h 4359b8021494Sopenharmony_ci // vl128 state = 0x7a51d422 4360b8021494Sopenharmony_ci __ dci(0x45d5b7e4); // bdep z4.d, z31.d, z21.d 4361b8021494Sopenharmony_ci // vl128 state = 0x512ad92a 4362b8021494Sopenharmony_ci __ dci(0x45c7b7ec); // bdep z12.d, z31.d, z7.d 4363b8021494Sopenharmony_ci // vl128 state = 0xe59fbf5c 4364b8021494Sopenharmony_ci __ dci(0x4547b7a8); // bdep z8.h, z29.h, z7.h 4365b8021494Sopenharmony_ci // vl128 state = 0xb85fd3b1 4366b8021494Sopenharmony_ci __ dci(0x454fb72c); // bdep z12.h, z25.h, z15.h 4367b8021494Sopenharmony_ci // vl128 state = 0xc820e9d0 4368b8021494Sopenharmony_ci __ dci(0x4557b724); // bdep z4.h, z25.h, z23.h 4369b8021494Sopenharmony_ci // vl128 state = 0x814ff3f4 4370b8021494Sopenharmony_ci __ dci(0x4557bb20); // bgrp z0.h, z25.h, z23.h 4371b8021494Sopenharmony_ci // vl128 state = 0xc58dee50 4372b8021494Sopenharmony_ci __ dci(0x4556b321); // bext z1.h, z25.h, z22.h 4373b8021494Sopenharmony_ci // vl128 state = 0xf19c0956 4374b8021494Sopenharmony_ci __ dci(0x4556b3e3); // bext z3.h, z31.h, z22.h 4375b8021494Sopenharmony_ci // vl128 state = 0x2a256808 4376b8021494Sopenharmony_ci __ dci(0x4546b367); // bext z7.h, z27.h, z6.h 4377b8021494Sopenharmony_ci // vl128 state = 0x1c6696f4 4378b8021494Sopenharmony_ci __ dci(0x4556bb66); // bgrp z6.h, z27.h, z22.h 4379b8021494Sopenharmony_ci // vl128 state = 0x32522ca2 4380b8021494Sopenharmony_ci __ dci(0x4556bb76); // bgrp z22.h, z27.h, z22.h 4381b8021494Sopenharmony_ci // vl128 state = 0x33fe6590 4382b8021494Sopenharmony_ci __ dci(0x45c6bb66); // bgrp z6.d, z27.d, z6.d 4383b8021494Sopenharmony_ci // vl128 state = 0x45d26723 4384b8021494Sopenharmony_ci __ dci(0x45c2b976); // bgrp z22.d, z11.d, z2.d 4385b8021494Sopenharmony_ci // vl128 state = 0x364d9885 4386b8021494Sopenharmony_ci __ dci(0x4540b974); // bgrp z20.h, z11.h, z0.h 4387b8021494Sopenharmony_ci // vl128 state = 0x36a0bd94 4388b8021494Sopenharmony_ci __ dci(0x45c0b164); // bext z4.d, z11.d, z0.d 4389b8021494Sopenharmony_ci // vl128 state = 0x4ee9a90c 4390b8021494Sopenharmony_ci __ dci(0x45ccb16c); // bext z12.d, z11.d, z12.d 4391b8021494Sopenharmony_ci // vl128 state = 0x30c32d69 4392b8021494Sopenharmony_ci __ dci(0x458cb368); // bext z8.s, z27.s, z12.s 4393b8021494Sopenharmony_ci // vl128 state = 0xfc2c912f 4394b8021494Sopenharmony_ci __ dci(0x450cb769); // bdep z9.b, z27.b, z12.b 4395b8021494Sopenharmony_ci // vl128 state = 0xef976b44 4396b8021494Sopenharmony_ci __ dci(0x458cb7eb); // bdep z11.s, z31.s, z12.s 4397b8021494Sopenharmony_ci // vl128 state = 0x6f9e21b8 4398b8021494Sopenharmony_ci __ dci(0x4588b5ef); // bdep z15.s, z15.s, z8.s 4399b8021494Sopenharmony_ci // vl128 state = 0xa1f212e2 4400b8021494Sopenharmony_ci __ dci(0x4598b5ad); // bdep z13.s, z13.s, z24.s 4401b8021494Sopenharmony_ci // vl128 state = 0xe4286a40 4402b8021494Sopenharmony_ci __ dci(0x4598b5af); // bdep z15.s, z13.s, z24.s 4403b8021494Sopenharmony_ci // vl128 state = 0x7d6622e5 4404b8021494Sopenharmony_ci __ dci(0x4598b6ad); // bdep z13.s, z21.s, z24.s 4405b8021494Sopenharmony_ci // vl128 state = 0xcd00829c 4406b8021494Sopenharmony_ci __ dci(0x4518b2af); // bext z15.b, z21.b, z24.b 4407b8021494Sopenharmony_ci // vl128 state = 0xa8d58b2d 4408b8021494Sopenharmony_ci __ dci(0x4519b2e7); // bext z7.b, z23.b, z25.b 4409b8021494Sopenharmony_ci // vl128 state = 0x2b7b7c44 4410b8021494Sopenharmony_ci __ dci(0x4518b2a6); // bext z6.b, z21.b, z24.b 4411b8021494Sopenharmony_ci // vl128 state = 0x09c81b7e 4412b8021494Sopenharmony_ci __ dci(0x4518b2a7); // bext z7.b, z21.b, z24.b 4413b8021494Sopenharmony_ci // vl128 state = 0xab1b2b22 4414b8021494Sopenharmony_ci __ dci(0x4519b6a5); // bdep z5.b, z21.b, z25.b 4415b8021494Sopenharmony_ci // vl128 state = 0x03476e4c 4416b8021494Sopenharmony_ci } 4417b8021494Sopenharmony_ci 4418b8021494Sopenharmony_ci uint32_t state; 4419b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 4420b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 4421b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 4422b8021494Sopenharmony_ci 4423b8021494Sopenharmony_ci END(); 4424b8021494Sopenharmony_ci if (CAN_RUN()) { 4425b8021494Sopenharmony_ci RUN(); 4426b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 4427b8021494Sopenharmony_ci 0x03476e4c, 4428b8021494Sopenharmony_ci 0xcc54e76f, 4429b8021494Sopenharmony_ci 0x08324d66, 4430b8021494Sopenharmony_ci 0xcc289ee1, 4431b8021494Sopenharmony_ci 0xacd3ba43, 4432b8021494Sopenharmony_ci 0xe961aeda, 4433b8021494Sopenharmony_ci 0x60a204b1, 4434b8021494Sopenharmony_ci 0xde020904, 4435b8021494Sopenharmony_ci 0x0652d1e5, 4436b8021494Sopenharmony_ci 0x7982dc25, 4437b8021494Sopenharmony_ci 0x02a2c1cb, 4438b8021494Sopenharmony_ci 0x4dd9e71b, 4439b8021494Sopenharmony_ci 0xb57f587f, 4440b8021494Sopenharmony_ci 0xb75e0d62, 4441b8021494Sopenharmony_ci 0x78330809, 4442b8021494Sopenharmony_ci 0xbc7046ae, 4443b8021494Sopenharmony_ci }; 4444b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 4445b8021494Sopenharmony_ci } 4446b8021494Sopenharmony_ci} 4447b8021494Sopenharmony_ci 4448b8021494Sopenharmony_ciTEST_SVE(sve2_smullb_smullt_umullb_umullt_vector) { 4449b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 4450b8021494Sopenharmony_ci CPUFeatures::kSVE2, 4451b8021494Sopenharmony_ci CPUFeatures::kNEON, 4452b8021494Sopenharmony_ci CPUFeatures::kCRC32); 4453b8021494Sopenharmony_ci START(); 4454b8021494Sopenharmony_ci 4455b8021494Sopenharmony_ci SetInitialMachineState(&masm); 4456b8021494Sopenharmony_ci // state = 0xe2bd2480 4457b8021494Sopenharmony_ci 4458b8021494Sopenharmony_ci { 4459b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 4460b8021494Sopenharmony_ci __ dci(0x455a7bc2); // umullb z2.h, z30.b, z26.b 4461b8021494Sopenharmony_ci // vl128 state = 0xe2a2b611 4462b8021494Sopenharmony_ci __ dci(0x454a7b92); // umullb z18.h, z28.b, z10.b 4463b8021494Sopenharmony_ci // vl128 state = 0x12b3b0c6 4464b8021494Sopenharmony_ci __ dci(0x45427bda); // umullb z26.h, z30.b, z2.b 4465b8021494Sopenharmony_ci // vl128 state = 0x74f4a891 4466b8021494Sopenharmony_ci __ dci(0x45c67bde); // umullb z30.d, z30.s, z6.s 4467b8021494Sopenharmony_ci // vl128 state = 0x20402d9f 4468b8021494Sopenharmony_ci __ dci(0x45467b56); // umullb z22.h, z26.b, z6.b 4469b8021494Sopenharmony_ci // vl128 state = 0x75e15413 4470b8021494Sopenharmony_ci __ dci(0x45427f54); // umullt z20.h, z26.b, z2.b 4471b8021494Sopenharmony_ci // vl128 state = 0x51478ee1 4472b8021494Sopenharmony_ci __ dci(0x45427fe4); // umullt z4.h, z31.b, z2.b 4473b8021494Sopenharmony_ci // vl128 state = 0x63381b63 4474b8021494Sopenharmony_ci __ dci(0x45567fe5); // umullt z5.h, z31.b, z22.b 4475b8021494Sopenharmony_ci // vl128 state = 0x0967f882 4476b8021494Sopenharmony_ci __ dci(0x45467df5); // umullt z21.h, z15.b, z6.b 4477b8021494Sopenharmony_ci // vl128 state = 0x753e96b9 4478b8021494Sopenharmony_ci __ dci(0x454279f1); // umullb z17.h, z15.b, z2.b 4479b8021494Sopenharmony_ci // vl128 state = 0xcff906e6 4480b8021494Sopenharmony_ci __ dci(0x454078f5); // umullb z21.h, z7.b, z0.b 4481b8021494Sopenharmony_ci // vl128 state = 0x5609bd14 4482b8021494Sopenharmony_ci __ dci(0x454070d4); // smullb z20.h, z6.b, z0.b 4483b8021494Sopenharmony_ci // vl128 state = 0xf284d300 4484b8021494Sopenharmony_ci __ dci(0x45407016); // smullb z22.h, z0.b, z0.b 4485b8021494Sopenharmony_ci // vl128 state = 0xbb549bf7 4486b8021494Sopenharmony_ci __ dci(0x45487086); // smullb z6.h, z4.b, z8.b 4487b8021494Sopenharmony_ci // vl128 state = 0x6ef99ff1 4488b8021494Sopenharmony_ci __ dci(0x454070c7); // smullb z7.h, z6.b, z0.b 4489b8021494Sopenharmony_ci // vl128 state = 0x90177a84 4490b8021494Sopenharmony_ci __ dci(0x45407846); // umullb z6.h, z2.b, z0.b 4491b8021494Sopenharmony_ci // vl128 state = 0xd3dbb2fe 4492b8021494Sopenharmony_ci __ dci(0x45417a56); // umullb z22.h, z18.b, z1.b 4493b8021494Sopenharmony_ci // vl128 state = 0x7d30cf73 4494b8021494Sopenharmony_ci __ dci(0x45417877); // umullb z23.h, z3.b, z1.b 4495b8021494Sopenharmony_ci // vl128 state = 0x0623e678 4496b8021494Sopenharmony_ci __ dci(0x45417807); // umullb z7.h, z0.b, z1.b 4497b8021494Sopenharmony_ci // vl128 state = 0xe849cf35 4498b8021494Sopenharmony_ci __ dci(0x454178a3); // umullb z3.h, z5.b, z1.b 4499b8021494Sopenharmony_ci // vl128 state = 0xcad236a9 4500b8021494Sopenharmony_ci __ dci(0x45437cab); // umullt z11.h, z5.b, z3.b 4501b8021494Sopenharmony_ci // vl128 state = 0xc8dfcb1d 4502b8021494Sopenharmony_ci __ dci(0x454b7c3b); // umullt z27.h, z1.b, z11.b 4503b8021494Sopenharmony_ci // vl128 state = 0x6136e2d6 4504b8021494Sopenharmony_ci __ dci(0x454b7a3a); // umullb z26.h, z17.b, z11.b 4505b8021494Sopenharmony_ci // vl128 state = 0x091beb5a 4506b8021494Sopenharmony_ci __ dci(0x454b72b2); // smullb z18.h, z21.b, z11.b 4507b8021494Sopenharmony_ci // vl128 state = 0x932b30ec 4508b8021494Sopenharmony_ci __ dci(0x454b7622); // smullt z2.h, z17.b, z11.b 4509b8021494Sopenharmony_ci // vl128 state = 0xee51239c 4510b8021494Sopenharmony_ci __ dci(0x454b76ea); // smullt z10.h, z23.b, z11.b 4511b8021494Sopenharmony_ci // vl128 state = 0xf4fcc577 4512b8021494Sopenharmony_ci __ dci(0x454b74ab); // smullt z11.h, z5.b, z11.b 4513b8021494Sopenharmony_ci // vl128 state = 0xcf0c8028 4514b8021494Sopenharmony_ci __ dci(0x454d74bb); // smullt z27.h, z5.b, z13.b 4515b8021494Sopenharmony_ci // vl128 state = 0x0f8523c8 4516b8021494Sopenharmony_ci __ dci(0x454d740b); // smullt z11.h, z0.b, z13.b 4517b8021494Sopenharmony_ci // vl128 state = 0xc02b2f52 4518b8021494Sopenharmony_ci __ dci(0x454d7403); // smullt z3.h, z0.b, z13.b 4519b8021494Sopenharmony_ci // vl128 state = 0x11b4180c 4520b8021494Sopenharmony_ci __ dci(0x45557413); // smullt z19.h, z0.b, z21.b 4521b8021494Sopenharmony_ci // vl128 state = 0x26eef57a 4522b8021494Sopenharmony_ci __ dci(0x45557531); // smullt z17.h, z9.b, z21.b 4523b8021494Sopenharmony_ci // vl128 state = 0x6f3fce98 4524b8021494Sopenharmony_ci __ dci(0x455574b9); // smullt z25.h, z5.b, z21.b 4525b8021494Sopenharmony_ci // vl128 state = 0x0d4ac272 4526b8021494Sopenharmony_ci __ dci(0x455571b1); // smullb z17.h, z13.b, z21.b 4527b8021494Sopenharmony_ci // vl128 state = 0x7c866a41 4528b8021494Sopenharmony_ci __ dci(0x455573e1); // smullb z1.h, z31.b, z21.b 4529b8021494Sopenharmony_ci // vl128 state = 0x9c724758 4530b8021494Sopenharmony_ci __ dci(0x455473c9); // smullb z9.h, z30.b, z20.b 4531b8021494Sopenharmony_ci // vl128 state = 0xa9a8d0aa 4532b8021494Sopenharmony_ci __ dci(0x455473cb); // smullb z11.h, z30.b, z20.b 4533b8021494Sopenharmony_ci // vl128 state = 0xd7eec117 4534b8021494Sopenharmony_ci __ dci(0x455473a9); // smullb z9.h, z29.b, z20.b 4535b8021494Sopenharmony_ci // vl128 state = 0x35caaa62 4536b8021494Sopenharmony_ci __ dci(0x455473a8); // smullb z8.h, z29.b, z20.b 4537b8021494Sopenharmony_ci // vl128 state = 0x97a1d399 4538b8021494Sopenharmony_ci __ dci(0x455473b8); // smullb z24.h, z29.b, z20.b 4539b8021494Sopenharmony_ci // vl128 state = 0x3adce4ee 4540b8021494Sopenharmony_ci __ dci(0x455673fa); // smullb z26.h, z31.b, z22.b 4541b8021494Sopenharmony_ci // vl128 state = 0xd17120ea 4542b8021494Sopenharmony_ci __ dci(0x455e77ea); // smullt z10.h, z31.b, z30.b 4543b8021494Sopenharmony_ci // vl128 state = 0x1e238a9e 4544b8021494Sopenharmony_ci __ dci(0x455677da); // smullt z26.h, z30.b, z22.b 4545b8021494Sopenharmony_ci // vl128 state = 0xfbccf6c2 4546b8021494Sopenharmony_ci __ dci(0x454673d8); // smullb z24.h, z30.b, z6.b 4547b8021494Sopenharmony_ci // vl128 state = 0xa47583be 4548b8021494Sopenharmony_ci __ dci(0x45c67359); // smullb z25.d, z26.s, z6.s 4549b8021494Sopenharmony_ci // vl128 state = 0x4e8a9b37 4550b8021494Sopenharmony_ci __ dci(0x45c47751); // smullt z17.d, z26.s, z4.s 4551b8021494Sopenharmony_ci // vl128 state = 0xe3c06571 4552b8021494Sopenharmony_ci __ dci(0x45d67741); // smullt z1.d, z26.s, z22.s 4553b8021494Sopenharmony_ci // vl128 state = 0x6629e034 4554b8021494Sopenharmony_ci __ dci(0x45d67b45); // umullb z5.d, z26.s, z22.s 4555b8021494Sopenharmony_ci // vl128 state = 0x66a99e85 4556b8021494Sopenharmony_ci __ dci(0x45867b47); // umullb z7.s, z26.h, z6.h 4557b8021494Sopenharmony_ci // vl128 state = 0xf1cc3339 4558b8021494Sopenharmony_ci __ dci(0x45867b45); // umullb z5.s, z26.h, z6.h 4559b8021494Sopenharmony_ci // vl128 state = 0x8bf658d7 4560b8021494Sopenharmony_ci } 4561b8021494Sopenharmony_ci 4562b8021494Sopenharmony_ci uint32_t state; 4563b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 4564b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 4565b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 4566b8021494Sopenharmony_ci 4567b8021494Sopenharmony_ci END(); 4568b8021494Sopenharmony_ci if (CAN_RUN()) { 4569b8021494Sopenharmony_ci RUN(); 4570b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 4571b8021494Sopenharmony_ci 0x8bf658d7, 4572b8021494Sopenharmony_ci 0x82fac555, 4573b8021494Sopenharmony_ci 0x07c3d434, 4574b8021494Sopenharmony_ci 0x25d2ee2b, 4575b8021494Sopenharmony_ci 0xe70f4394, 4576b8021494Sopenharmony_ci 0x79223404, 4577b8021494Sopenharmony_ci 0x368ed35f, 4578b8021494Sopenharmony_ci 0x6565d842, 4579b8021494Sopenharmony_ci 0xead08c30, 4580b8021494Sopenharmony_ci 0xae35e083, 4581b8021494Sopenharmony_ci 0xe1959b85, 4582b8021494Sopenharmony_ci 0x94ad31e7, 4583b8021494Sopenharmony_ci 0x9caeda4d, 4584b8021494Sopenharmony_ci 0x7611d6dc, 4585b8021494Sopenharmony_ci 0x22977911, 4586b8021494Sopenharmony_ci 0xcf3754ec, 4587b8021494Sopenharmony_ci }; 4588b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 4589b8021494Sopenharmony_ci } 4590b8021494Sopenharmony_ci} 4591b8021494Sopenharmony_ci 4592b8021494Sopenharmony_ciTEST_SVE(sve2_sqdmullb_sqdmullt_pmullb_pmullb_vector) { 4593b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 4594b8021494Sopenharmony_ci CPUFeatures::kSVE2, 4595b8021494Sopenharmony_ci CPUFeatures::kNEON, 4596b8021494Sopenharmony_ci CPUFeatures::kCRC32); 4597b8021494Sopenharmony_ci START(); 4598b8021494Sopenharmony_ci 4599b8021494Sopenharmony_ci SetInitialMachineState(&masm); 4600b8021494Sopenharmony_ci // state = 0xe2bd2480 4601b8021494Sopenharmony_ci 4602b8021494Sopenharmony_ci { 4603b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 4604b8021494Sopenharmony_ci __ dci(0x45936164); // sqdmullb z4.s, z11.h, z19.h 4605b8021494Sopenharmony_ci // vl128 state = 0xacc89592 4606b8021494Sopenharmony_ci __ dci(0x459161f4); // sqdmullb z20.s, z15.h, z17.h 4607b8021494Sopenharmony_ci // vl128 state = 0x142c66e5 4608b8021494Sopenharmony_ci __ dci(0x459563f5); // sqdmullb z21.s, z31.h, z21.h 4609b8021494Sopenharmony_ci // vl128 state = 0x5cfcb839 4610b8021494Sopenharmony_ci __ dci(0x45956265); // sqdmullb z5.s, z19.h, z21.h 4611b8021494Sopenharmony_ci // vl128 state = 0x33616223 4612b8021494Sopenharmony_ci __ dci(0x45d56235); // sqdmullb z21.d, z17.s, z21.s 4613b8021494Sopenharmony_ci // vl128 state = 0x987a4a0d 4614b8021494Sopenharmony_ci __ dci(0x45556031); // sqdmullb z17.h, z1.b, z21.b 4615b8021494Sopenharmony_ci // vl128 state = 0xf7dd9b01 4616b8021494Sopenharmony_ci __ dci(0x45506035); // sqdmullb z21.h, z1.b, z16.b 4617b8021494Sopenharmony_ci // vl128 state = 0x6fa54cf3 4618b8021494Sopenharmony_ci __ dci(0x45506334); // sqdmullb z20.h, z25.b, z16.b 4619b8021494Sopenharmony_ci // vl128 state = 0x04398c6e 4620b8021494Sopenharmony_ci __ dci(0x45486336); // sqdmullb z22.h, z25.b, z8.b 4621b8021494Sopenharmony_ci // vl128 state = 0x4cda753c 4622b8021494Sopenharmony_ci __ dci(0x45486334); // sqdmullb z20.h, z25.b, z8.b 4623b8021494Sopenharmony_ci // vl128 state = 0x53993d4a 4624b8021494Sopenharmony_ci __ dci(0x45496b35); // pmullb z21.h, z25.b, z9.b 4625b8021494Sopenharmony_ci // vl128 state = 0xa591f97c 4626b8021494Sopenharmony_ci __ dci(0x45496b37); // pmullb z23.h, z25.b, z9.b 4627b8021494Sopenharmony_ci // vl128 state = 0x5cb91e99 4628b8021494Sopenharmony_ci __ dci(0x45496fb3); // pmullt z19.h, z29.b, z9.b 4629b8021494Sopenharmony_ci // vl128 state = 0x5031ac4d 4630b8021494Sopenharmony_ci __ dci(0x45596f3b); // pmullt z27.h, z25.b, z25.b 4631b8021494Sopenharmony_ci // vl128 state = 0xb0a76e75 4632b8021494Sopenharmony_ci __ dci(0x455d6f13); // pmullt z19.h, z24.b, z29.b 4633b8021494Sopenharmony_ci // vl128 state = 0xe84ca196 4634b8021494Sopenharmony_ci __ dci(0x455d6fb2); // pmullt z18.h, z29.b, z29.b 4635b8021494Sopenharmony_ci // vl128 state = 0xd294ce54 4636b8021494Sopenharmony_ci __ dci(0x455c6bb0); // pmullb z16.h, z29.b, z28.b 4637b8021494Sopenharmony_ci // vl128 state = 0x90f01471 4638b8021494Sopenharmony_ci __ dci(0x45546bf8); // pmullb z24.h, z31.b, z20.b 4639b8021494Sopenharmony_ci // vl128 state = 0xd15f23fa 4640b8021494Sopenharmony_ci __ dci(0x45546bf9); // pmullb z25.h, z31.b, z20.b 4641b8021494Sopenharmony_ci // vl128 state = 0x62ca83ea 4642b8021494Sopenharmony_ci __ dci(0x45546bfb); // pmullb z27.h, z31.b, z20.b 4643b8021494Sopenharmony_ci // vl128 state = 0xf786c1e4 4644b8021494Sopenharmony_ci __ dci(0x454469eb); // pmullb z11.h, z15.b, z4.b 4645b8021494Sopenharmony_ci // vl128 state = 0x3cc8c789 4646b8021494Sopenharmony_ci __ dci(0x455069fb); // pmullb z27.h, z15.b, z16.b 4647b8021494Sopenharmony_ci // vl128 state = 0xb14709ca 4648b8021494Sopenharmony_ci __ dci(0x45546dfa); // pmullt z26.h, z15.b, z20.b 4649b8021494Sopenharmony_ci // vl128 state = 0x38257820 4650b8021494Sopenharmony_ci __ dci(0x45546df8); // pmullt z24.h, z15.b, z20.b 4651b8021494Sopenharmony_ci // vl128 state = 0x9cc5cd3a 4652b8021494Sopenharmony_ci __ dci(0x45576dfc); // pmullt z28.h, z15.b, z23.b 4653b8021494Sopenharmony_ci // vl128 state = 0x704543ec 4654b8021494Sopenharmony_ci __ dci(0x45d76d6c); // pmullt z12.d, z11.s, z23.s 4655b8021494Sopenharmony_ci // vl128 state = 0x15ec8e77 4656b8021494Sopenharmony_ci __ dci(0x455f6d68); // pmullt z8.h, z11.b, z31.b 4657b8021494Sopenharmony_ci // vl128 state = 0xfa379a67 4658b8021494Sopenharmony_ci __ dci(0x45596d6a); // pmullt z10.h, z11.b, z25.b 4659b8021494Sopenharmony_ci // vl128 state = 0x27fcfa49 4660b8021494Sopenharmony_ci __ dci(0x45596d7a); // pmullt z26.h, z11.b, z25.b 4661b8021494Sopenharmony_ci // vl128 state = 0x13883ef0 4662b8021494Sopenharmony_ci __ dci(0x45596532); // sqdmullt z18.h, z9.b, z25.b 4663b8021494Sopenharmony_ci // vl128 state = 0x667f8699 4664b8021494Sopenharmony_ci __ dci(0x45596536); // sqdmullt z22.h, z9.b, z25.b 4665b8021494Sopenharmony_ci // vl128 state = 0x477ded37 4666b8021494Sopenharmony_ci __ dci(0x45d16537); // sqdmullt z23.d, z9.s, z17.s 4667b8021494Sopenharmony_ci // vl128 state = 0x3323eb48 4668b8021494Sopenharmony_ci __ dci(0x45c16515); // sqdmullt z21.d, z8.s, z1.s 4669b8021494Sopenharmony_ci // vl128 state = 0x3f581e83 4670b8021494Sopenharmony_ci __ dci(0x45456517); // sqdmullt z23.h, z8.b, z5.b 4671b8021494Sopenharmony_ci // vl128 state = 0xd844e48b 4672b8021494Sopenharmony_ci __ dci(0x45556555); // sqdmullt z21.h, z10.b, z21.b 4673b8021494Sopenharmony_ci // vl128 state = 0x95e6094e 4674b8021494Sopenharmony_ci __ dci(0x45c56554); // sqdmullt z20.d, z10.s, z5.s 4675b8021494Sopenharmony_ci // vl128 state = 0x198a6f75 4676b8021494Sopenharmony_ci __ dci(0x45cd6456); // sqdmullt z22.d, z2.s, z13.s 4677b8021494Sopenharmony_ci // vl128 state = 0x4d6b7178 4678b8021494Sopenharmony_ci __ dci(0x45c96406); // sqdmullt z6.d, z0.s, z9.s 4679b8021494Sopenharmony_ci // vl128 state = 0xd989cd0f 4680b8021494Sopenharmony_ci __ dci(0x45d96482); // sqdmullt z2.d, z4.s, z25.s 4681b8021494Sopenharmony_ci // vl128 state = 0xa80fdf92 4682b8021494Sopenharmony_ci __ dci(0x45dd6406); // sqdmullt z6.d, z0.s, z29.s 4683b8021494Sopenharmony_ci // vl128 state = 0x9876a20d 4684b8021494Sopenharmony_ci __ dci(0x45596404); // sqdmullt z4.h, z0.b, z25.b 4685b8021494Sopenharmony_ci // vl128 state = 0x5ad5787c 4686b8021494Sopenharmony_ci __ dci(0x454b6414); // sqdmullt z20.h, z0.b, z11.b 4687b8021494Sopenharmony_ci // vl128 state = 0x86c077d7 4688b8021494Sopenharmony_ci __ dci(0x454a601c); // sqdmullb z28.h, z0.b, z10.b 4689b8021494Sopenharmony_ci // vl128 state = 0xfe867841 4690b8021494Sopenharmony_ci __ dci(0x4542641d); // sqdmullt z29.h, z0.b, z2.b 4691b8021494Sopenharmony_ci // vl128 state = 0x7bf363f1 4692b8021494Sopenharmony_ci __ dci(0x4552643c); // sqdmullt z28.h, z1.b, z18.b 4693b8021494Sopenharmony_ci // vl128 state = 0x7cf26ed3 4694b8021494Sopenharmony_ci __ dci(0x4552673d); // sqdmullt z29.h, z25.b, z18.b 4695b8021494Sopenharmony_ci // vl128 state = 0x748f1a99 4696b8021494Sopenharmony_ci __ dci(0x45d6673f); // sqdmullt z31.d, z25.s, z22.s 4697b8021494Sopenharmony_ci // vl128 state = 0xbb15fd07 4698b8021494Sopenharmony_ci __ dci(0x45d2633d); // sqdmullb z29.d, z25.s, z18.s 4699b8021494Sopenharmony_ci // vl128 state = 0x28e0985a 4700b8021494Sopenharmony_ci __ dci(0x455a6339); // sqdmullb z25.h, z25.b, z26.b 4701b8021494Sopenharmony_ci // vl128 state = 0x9c0da0fd 4702b8021494Sopenharmony_ci __ dci(0x45526738); // sqdmullt z24.h, z25.b, z18.b 4703b8021494Sopenharmony_ci // vl128 state = 0xa970ebb8 4704b8021494Sopenharmony_ci } 4705b8021494Sopenharmony_ci 4706b8021494Sopenharmony_ci uint32_t state; 4707b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 4708b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 4709b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 4710b8021494Sopenharmony_ci 4711b8021494Sopenharmony_ci END(); 4712b8021494Sopenharmony_ci if (CAN_RUN()) { 4713b8021494Sopenharmony_ci RUN(); 4714b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 4715b8021494Sopenharmony_ci 0xa970ebb8, 4716b8021494Sopenharmony_ci 0xc665eff5, 4717b8021494Sopenharmony_ci 0x8cc21595, 4718b8021494Sopenharmony_ci 0x0ea984f6, 4719b8021494Sopenharmony_ci 0x1dbce326, 4720b8021494Sopenharmony_ci 0x0845e911, 4721b8021494Sopenharmony_ci 0xa6fb6cf4, 4722b8021494Sopenharmony_ci 0x8544239a, 4723b8021494Sopenharmony_ci 0x2412d23d, 4724b8021494Sopenharmony_ci 0xbce6f5e0, 4725b8021494Sopenharmony_ci 0x780ff264, 4726b8021494Sopenharmony_ci 0xcf6cf172, 4727b8021494Sopenharmony_ci 0xef93a3b4, 4728b8021494Sopenharmony_ci 0x94080541, 4729b8021494Sopenharmony_ci 0xa0aedeba, 4730b8021494Sopenharmony_ci 0x8e8bddaa, 4731b8021494Sopenharmony_ci }; 4732b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 4733b8021494Sopenharmony_ci } 4734b8021494Sopenharmony_ci} 4735b8021494Sopenharmony_ci 4736b8021494Sopenharmony_ciTEST_SVE(sve2_sqdmullt_sqdmullb_z_zzi) { 4737b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 4738b8021494Sopenharmony_ci CPUFeatures::kSVE2, 4739b8021494Sopenharmony_ci CPUFeatures::kNEON, 4740b8021494Sopenharmony_ci CPUFeatures::kCRC32); 4741b8021494Sopenharmony_ci START(); 4742b8021494Sopenharmony_ci 4743b8021494Sopenharmony_ci SetInitialMachineState(&masm); 4744b8021494Sopenharmony_ci // state = 0xe2bd2480 4745b8021494Sopenharmony_ci 4746b8021494Sopenharmony_ci { 4747b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 30 * kInstructionSize); 4748b8021494Sopenharmony_ci __ dci(0x44eae5a9); // sqdmullt z9.d, z13.s, z10.s[#0] 4749b8021494Sopenharmony_ci // vl128 state = 0x311dfe35 4750b8021494Sopenharmony_ci __ dci(0x44eae9a1); // sqdmullb z1.d, z13.s, z10.s[#1] 4751b8021494Sopenharmony_ci // vl128 state = 0x559243c3 4752b8021494Sopenharmony_ci __ dci(0x44eae9a5); // sqdmullb z5.d, z13.s, z10.s[#1] 4753b8021494Sopenharmony_ci // vl128 state = 0x44d6824c 4754b8021494Sopenharmony_ci __ dci(0x44e2edad); // sqdmullt z13.d, z13.s, z2.s[#1] 4755b8021494Sopenharmony_ci // vl128 state = 0xb5539592 4756b8021494Sopenharmony_ci __ dci(0x44e6e9ac); // sqdmullb z12.d, z13.s, z6.s[#1] 4757b8021494Sopenharmony_ci // vl128 state = 0x5e66b9f8 4758b8021494Sopenharmony_ci __ dci(0x44e4ebae); // sqdmullb z14.d, z29.s, z4.s[#1] 4759b8021494Sopenharmony_ci // vl128 state = 0x4347620a 4760b8021494Sopenharmony_ci __ dci(0x44e4ebaf); // sqdmullb z15.d, z29.s, z4.s[#1] 4761b8021494Sopenharmony_ci // vl128 state = 0xe7cfe898 4762b8021494Sopenharmony_ci __ dci(0x44a5ebad); // sqdmullb z13.s, z29.h, z5.h[#1] 4763b8021494Sopenharmony_ci // vl128 state = 0x0ca455c7 4764b8021494Sopenharmony_ci __ dci(0x44a5e9fd); // sqdmullb z29.s, z15.h, z5.h[#1] 4765b8021494Sopenharmony_ci // vl128 state = 0xcac072a9 4766b8021494Sopenharmony_ci __ dci(0x44e5e8fc); // sqdmullb z28.d, z7.s, z5.s[#1] 4767b8021494Sopenharmony_ci // vl128 state = 0xe18e8c66 4768b8021494Sopenharmony_ci __ dci(0x44ede9ec); // sqdmullb z12.d, z15.s, z13.s[#1] 4769b8021494Sopenharmony_ci // vl128 state = 0x32f642cb 4770b8021494Sopenharmony_ci __ dci(0x44ede9fc); // sqdmullb z28.d, z15.s, z13.s[#1] 4771b8021494Sopenharmony_ci // vl128 state = 0xa0467c8a 4772b8021494Sopenharmony_ci __ dci(0x44fce9f4); // sqdmullb z20.d, z15.s, z12.s[#3] 4773b8021494Sopenharmony_ci // vl128 state = 0x7ada4130 4774b8021494Sopenharmony_ci __ dci(0x44e4e9f6); // sqdmullb z22.d, z15.s, z4.s[#1] 4775b8021494Sopenharmony_ci // vl128 state = 0xc87deb44 4776b8021494Sopenharmony_ci __ dci(0x44f4e9d2); // sqdmullb z18.d, z14.s, z4.s[#3] 4777b8021494Sopenharmony_ci // vl128 state = 0x6dc052ca 4778b8021494Sopenharmony_ci __ dci(0x44f5e9e2); // sqdmullb z2.d, z15.s, z5.s[#3] 4779b8021494Sopenharmony_ci // vl128 state = 0xe05110d4 4780b8021494Sopenharmony_ci __ dci(0x44f5ebb2); // sqdmullb z18.d, z29.s, z5.s[#3] 4781b8021494Sopenharmony_ci // vl128 state = 0x7ed21594 4782b8021494Sopenharmony_ci __ dci(0x44b5efba); // sqdmullt z26.s, z29.h, z5.h[#5] 4783b8021494Sopenharmony_ci // vl128 state = 0x7d5dad40 4784b8021494Sopenharmony_ci __ dci(0x44b5ef78); // sqdmullt z24.s, z27.h, z5.h[#5] 4785b8021494Sopenharmony_ci // vl128 state = 0x418f84bc 4786b8021494Sopenharmony_ci __ dci(0x44f5eb70); // sqdmullb z16.d, z27.s, z5.s[#3] 4787b8021494Sopenharmony_ci // vl128 state = 0x72d78d32 4788b8021494Sopenharmony_ci __ dci(0x44e5ebf4); // sqdmullb z20.d, z31.s, z5.s[#1] 4789b8021494Sopenharmony_ci // vl128 state = 0x391fad35 4790b8021494Sopenharmony_ci __ dci(0x44e5efbc); // sqdmullt z28.d, z29.s, z5.s[#1] 4791b8021494Sopenharmony_ci // vl128 state = 0xb2143633 4792b8021494Sopenharmony_ci __ dci(0x44e1ebbd); // sqdmullb z29.d, z29.s, z1.s[#1] 4793b8021494Sopenharmony_ci // vl128 state = 0x468dac6e 4794b8021494Sopenharmony_ci __ dci(0x44f1ebed); // sqdmullb z13.d, z31.s, z1.s[#3] 4795b8021494Sopenharmony_ci // vl128 state = 0x9ab292bd 4796b8021494Sopenharmony_ci __ dci(0x44f5efe5); // sqdmullt z5.d, z31.s, z5.s[#3] 4797b8021494Sopenharmony_ci // vl128 state = 0x4f2bd5d1 4798b8021494Sopenharmony_ci __ dci(0x44fdeee7); // sqdmullt z7.d, z23.s, z13.s[#3] 4799b8021494Sopenharmony_ci // vl128 state = 0x7a810779 4800b8021494Sopenharmony_ci __ dci(0x44fdee25); // sqdmullt z5.d, z17.s, z13.s[#3] 4801b8021494Sopenharmony_ci // vl128 state = 0x05d23734 4802b8021494Sopenharmony_ci __ dci(0x44f5ea27); // sqdmullb z7.d, z17.s, z5.s[#3] 4803b8021494Sopenharmony_ci // vl128 state = 0x878580f5 4804b8021494Sopenharmony_ci __ dci(0x44f1e225); // sqdmullb z5.d, z17.s, z1.s[#2] 4805b8021494Sopenharmony_ci // vl128 state = 0x5fa56f94 4806b8021494Sopenharmony_ci __ dci(0x44e1ea21); // sqdmullb z1.d, z17.s, z1.s[#1] 4807b8021494Sopenharmony_ci // vl128 state = 0x05f1cdf0 4808b8021494Sopenharmony_ci } 4809b8021494Sopenharmony_ci 4810b8021494Sopenharmony_ci uint32_t state; 4811b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 4812b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 4813b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 4814b8021494Sopenharmony_ci 4815b8021494Sopenharmony_ci END(); 4816b8021494Sopenharmony_ci if (CAN_RUN()) { 4817b8021494Sopenharmony_ci RUN(); 4818b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 4819b8021494Sopenharmony_ci 0x05f1cdf0, 4820b8021494Sopenharmony_ci 0x6b88d4f2, 4821b8021494Sopenharmony_ci 0x83bf279d, 4822b8021494Sopenharmony_ci 0x12f21868, 4823b8021494Sopenharmony_ci 0x6c68a5ce, 4824b8021494Sopenharmony_ci 0x5710343f, 4825b8021494Sopenharmony_ci 0xa4d0d0ee, 4826b8021494Sopenharmony_ci 0x335b20c5, 4827b8021494Sopenharmony_ci 0x0dd491c5, 4828b8021494Sopenharmony_ci 0x98966292, 4829b8021494Sopenharmony_ci 0xb68cdacd, 4830b8021494Sopenharmony_ci 0xa26f9914, 4831b8021494Sopenharmony_ci 0x6dd60ced, 4832b8021494Sopenharmony_ci 0x5cd0d62c, 4833b8021494Sopenharmony_ci 0xebe3fb25, 4834b8021494Sopenharmony_ci 0xb264d998, 4835b8021494Sopenharmony_ci }; 4836b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 4837b8021494Sopenharmony_ci } 4838b8021494Sopenharmony_ci} 4839b8021494Sopenharmony_ci 4840b8021494Sopenharmony_ciTEST_SVE(sve2_xar) { 4841b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 4842b8021494Sopenharmony_ci CPUFeatures::kSVE2, 4843b8021494Sopenharmony_ci CPUFeatures::kNEON, 4844b8021494Sopenharmony_ci CPUFeatures::kCRC32); 4845b8021494Sopenharmony_ci START(); 4846b8021494Sopenharmony_ci 4847b8021494Sopenharmony_ci SetInitialMachineState(&masm); 4848b8021494Sopenharmony_ci // state = 0xe2bd2480 4849b8021494Sopenharmony_ci 4850b8021494Sopenharmony_ci { 4851b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 20 * kInstructionSize); 4852b8021494Sopenharmony_ci __ dci(0x04293719); // xar z25.b, z25.b, z24.b, #7 4853b8021494Sopenharmony_ci // vl128 state = 0x596046c4 4854b8021494Sopenharmony_ci __ dci(0x04293531); // xar z17.b, z17.b, z9.b, #7 4855b8021494Sopenharmony_ci // vl128 state = 0x38332d55 4856b8021494Sopenharmony_ci __ dci(0x04e93533); // xar z19.d, z19.d, z9.d, #23 4857b8021494Sopenharmony_ci // vl128 state = 0x535c8af7 4858b8021494Sopenharmony_ci __ dci(0x046b3523); // xar z3.s, z3.s, z9.s, #21 4859b8021494Sopenharmony_ci // vl128 state = 0x879a489f 4860b8021494Sopenharmony_ci __ dci(0x04eb3427); // xar z7.d, z7.d, z1.d, #21 4861b8021494Sopenharmony_ci // vl128 state = 0xfbac317f 4862b8021494Sopenharmony_ci __ dci(0x04ea3463); // xar z3.d, z3.d, z3.d, #22 4863b8021494Sopenharmony_ci // vl128 state = 0xfb44482e 4864b8021494Sopenharmony_ci __ dci(0x04fa3447); // xar z7.d, z7.d, z2.d, #6 4865b8021494Sopenharmony_ci // vl128 state = 0xa59e324c 4866b8021494Sopenharmony_ci __ dci(0x04f8346f); // xar z15.d, z15.d, z3.d, #8 4867b8021494Sopenharmony_ci // vl128 state = 0x7f064300 4868b8021494Sopenharmony_ci __ dci(0x0479346b); // xar z11.s, z11.s, z3.s, #7 4869b8021494Sopenharmony_ci // vl128 state = 0x0c0d3573 4870b8021494Sopenharmony_ci __ dci(0x0461346a); // xar z10.s, z10.s, z3.s, #31 4871b8021494Sopenharmony_ci // vl128 state = 0x3c61530d 4872b8021494Sopenharmony_ci __ dci(0x0464346b); // xar z11.s, z11.s, z3.s, #28 4873b8021494Sopenharmony_ci // vl128 state = 0x137c1433 4874b8021494Sopenharmony_ci __ dci(0x04643469); // xar z9.s, z9.s, z3.s, #28 4875b8021494Sopenharmony_ci // vl128 state = 0x81d55bb1 4876b8021494Sopenharmony_ci __ dci(0x0464346b); // xar z11.s, z11.s, z3.s, #28 4877b8021494Sopenharmony_ci // vl128 state = 0xad2ac5c0 4878b8021494Sopenharmony_ci __ dci(0x0434346a); // xar z10.h, z10.h, z3.h, #12 4879b8021494Sopenharmony_ci // vl128 state = 0x2997a1d9 4880b8021494Sopenharmony_ci __ dci(0x04b434fa); // xar z26.d, z26.d, z7.d, #44 4881b8021494Sopenharmony_ci // vl128 state = 0x715f758d 4882b8021494Sopenharmony_ci __ dci(0x04e434f2); // xar z18.d, z18.d, z7.d, #28 4883b8021494Sopenharmony_ci // vl128 state = 0x8bfa19ef 4884b8021494Sopenharmony_ci __ dci(0x04ec34b3); // xar z19.d, z19.d, z5.d, #20 4885b8021494Sopenharmony_ci // vl128 state = 0xa8d646a5 4886b8021494Sopenharmony_ci __ dci(0x04ae34b7); // xar z23.d, z23.d, z5.d, #50 4887b8021494Sopenharmony_ci // vl128 state = 0xf590c489 4888b8021494Sopenharmony_ci __ dci(0x04ae34a7); // xar z7.d, z7.d, z5.d, #50 4889b8021494Sopenharmony_ci // vl128 state = 0xd6aafb5e 4890b8021494Sopenharmony_ci __ dci(0x04ae3417); // xar z23.d, z23.d, z0.d, #50 4891b8021494Sopenharmony_ci // vl128 state = 0xd40a8d1a 4892b8021494Sopenharmony_ci } 4893b8021494Sopenharmony_ci 4894b8021494Sopenharmony_ci uint32_t state; 4895b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 4896b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 4897b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 4898b8021494Sopenharmony_ci 4899b8021494Sopenharmony_ci END(); 4900b8021494Sopenharmony_ci if (CAN_RUN()) { 4901b8021494Sopenharmony_ci RUN(); 4902b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 4903b8021494Sopenharmony_ci 0xd40a8d1a, 4904b8021494Sopenharmony_ci 0x834982b0, 4905b8021494Sopenharmony_ci 0x6fd8c07b, 4906b8021494Sopenharmony_ci 0x2654e6f3, 4907b8021494Sopenharmony_ci 0x79fa44fb, 4908b8021494Sopenharmony_ci 0xc8a60223, 4909b8021494Sopenharmony_ci 0xd12f35f0, 4910b8021494Sopenharmony_ci 0x1e0a3315, 4911b8021494Sopenharmony_ci 0x6970dcd2, 4912b8021494Sopenharmony_ci 0x62305aed, 4913b8021494Sopenharmony_ci 0xb9846a55, 4914b8021494Sopenharmony_ci 0x1147e436, 4915b8021494Sopenharmony_ci 0x97a8ceaa, 4916b8021494Sopenharmony_ci 0xe8f80c0e, 4917b8021494Sopenharmony_ci 0xea3ab3e7, 4918b8021494Sopenharmony_ci 0xb2abd654, 4919b8021494Sopenharmony_ci }; 4920b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 4921b8021494Sopenharmony_ci } 4922b8021494Sopenharmony_ci} 4923b8021494Sopenharmony_ci 4924b8021494Sopenharmony_ciTEST_SVE(sve2_histcnt) { 4925b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 4926b8021494Sopenharmony_ci CPUFeatures::kSVE2, 4927b8021494Sopenharmony_ci CPUFeatures::kNEON, 4928b8021494Sopenharmony_ci CPUFeatures::kCRC32); 4929b8021494Sopenharmony_ci START(); 4930b8021494Sopenharmony_ci 4931b8021494Sopenharmony_ci SetInitialMachineState(&masm); 4932b8021494Sopenharmony_ci // state = 0xe2bd2480 4933b8021494Sopenharmony_ci 4934b8021494Sopenharmony_ci { 4935b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 100 * kInstructionSize); 4936b8021494Sopenharmony_ci __ dci(0x45e8c2f9); // histcnt z25.d, p0/z, z23.d, z8.d 4937b8021494Sopenharmony_ci // vl128 state = 0x892c6962 4938b8021494Sopenharmony_ci __ dci(0x45e8c1f1); // histcnt z17.d, p0/z, z15.d, z8.d 4939b8021494Sopenharmony_ci // vl128 state = 0x6ef7d729 4940b8021494Sopenharmony_ci __ dci(0x45e8c3a1); // histcnt z1.d, p0/z, z29.d, z8.d 4941b8021494Sopenharmony_ci // vl128 state = 0x17654f81 4942b8021494Sopenharmony_ci __ dci(0x45e8c3a9); // histcnt z9.d, p0/z, z29.d, z8.d 4943b8021494Sopenharmony_ci // vl128 state = 0xe1a0067e 4944b8021494Sopenharmony_ci __ dci(0x45e8c0a8); // histcnt z8.d, p0/z, z5.d, z8.d 4945b8021494Sopenharmony_ci // vl128 state = 0xd41f511b 4946b8021494Sopenharmony_ci __ dci(0x45e8d0f8); // histcnt z24.d, p4/z, z7.d, z8.d 4947b8021494Sopenharmony_ci // vl128 state = 0x8b73945a 4948b8021494Sopenharmony_ci __ dci(0x45e8d0fa); // histcnt z26.d, p4/z, z7.d, z8.d 4949b8021494Sopenharmony_ci // vl128 state = 0xc175acec 4950b8021494Sopenharmony_ci __ dci(0x45aad0fb); // histcnt z27.s, p4/z, z7.s, z10.s 4951b8021494Sopenharmony_ci // vl128 state = 0x44f8385b 4952b8021494Sopenharmony_ci __ dci(0x45aad2df); // histcnt z31.s, p4/z, z22.s, z10.s 4953b8021494Sopenharmony_ci // vl128 state = 0x52cd5d17 4954b8021494Sopenharmony_ci __ dci(0x45aad2dd); // histcnt z29.s, p4/z, z22.s, z10.s 4955b8021494Sopenharmony_ci // vl128 state = 0x9f8d9611 4956b8021494Sopenharmony_ci __ dci(0x45abd2f5); // histcnt z21.s, p4/z, z23.s, z11.s 4957b8021494Sopenharmony_ci // vl128 state = 0x5cc45fb0 4958b8021494Sopenharmony_ci __ dci(0x45aad0f7); // histcnt z23.s, p4/z, z7.s, z10.s 4959b8021494Sopenharmony_ci // vl128 state = 0x5096a07f 4960b8021494Sopenharmony_ci __ dci(0x45aad1b3); // histcnt z19.s, p4/z, z13.s, z10.s 4961b8021494Sopenharmony_ci // vl128 state = 0xf25781a6 4962b8021494Sopenharmony_ci __ dci(0x45a8d1f2); // histcnt z18.s, p4/z, z15.s, z8.s 4963b8021494Sopenharmony_ci // vl128 state = 0xc7025934 4964b8021494Sopenharmony_ci __ dci(0x45a0d0f6); // histcnt z22.s, p4/z, z7.s, z0.s 4965b8021494Sopenharmony_ci // vl128 state = 0xcda9c72a 4966b8021494Sopenharmony_ci __ dci(0x45a0d87e); // histcnt z30.s, p6/z, z3.s, z0.s 4967b8021494Sopenharmony_ci // vl128 state = 0x75f6bbcc 4968b8021494Sopenharmony_ci __ dci(0x45a0dc4e); // histcnt z14.s, p7/z, z2.s, z0.s 4969b8021494Sopenharmony_ci // vl128 state = 0x5e4e9fe0 4970b8021494Sopenharmony_ci __ dci(0x45a0dc4a); // histcnt z10.s, p7/z, z2.s, z0.s 4971b8021494Sopenharmony_ci // vl128 state = 0x0ec8d2b8 4972b8021494Sopenharmony_ci __ dci(0x45b0cc4b); // histcnt z11.s, p3/z, z2.s, z16.s 4973b8021494Sopenharmony_ci // vl128 state = 0x1228c442 4974b8021494Sopenharmony_ci __ dci(0x45b0cc43); // histcnt z3.s, p3/z, z2.s, z16.s 4975b8021494Sopenharmony_ci // vl128 state = 0xc6067f7b 4976b8021494Sopenharmony_ci __ dci(0x45b8cc73); // histcnt z19.s, p3/z, z3.s, z24.s 4977b8021494Sopenharmony_ci // vl128 state = 0xf04f9753 4978b8021494Sopenharmony_ci __ dci(0x45b8d877); // histcnt z23.s, p6/z, z3.s, z24.s 4979b8021494Sopenharmony_ci // vl128 state = 0xdeb83b41 4980b8021494Sopenharmony_ci __ dci(0x45b8d47f); // histcnt z31.s, p5/z, z3.s, z24.s 4981b8021494Sopenharmony_ci // vl128 state = 0x8ab3905f 4982b8021494Sopenharmony_ci __ dci(0x45b8d46f); // histcnt z15.s, p5/z, z3.s, z24.s 4983b8021494Sopenharmony_ci // vl128 state = 0x762bf277 4984b8021494Sopenharmony_ci __ dci(0x45b8d16d); // histcnt z13.s, p4/z, z11.s, z24.s 4985b8021494Sopenharmony_ci // vl128 state = 0x9a670783 4986b8021494Sopenharmony_ci __ dci(0x45bcd125); // histcnt z5.s, p4/z, z9.s, z28.s 4987b8021494Sopenharmony_ci // vl128 state = 0x3e399489 4988b8021494Sopenharmony_ci __ dci(0x45b8d021); // histcnt z1.s, p4/z, z1.s, z24.s 4989b8021494Sopenharmony_ci // vl128 state = 0x7fc8f1e7 4990b8021494Sopenharmony_ci __ dci(0x45f8d220); // histcnt z0.d, p4/z, z17.d, z24.d 4991b8021494Sopenharmony_ci // vl128 state = 0x9cb004db 4992b8021494Sopenharmony_ci __ dci(0x45f0d621); // histcnt z1.d, p5/z, z17.d, z16.d 4993b8021494Sopenharmony_ci // vl128 state = 0xdd4161b5 4994b8021494Sopenharmony_ci __ dci(0x45a0d625); // histcnt z5.s, p5/z, z17.s, z0.s 4995b8021494Sopenharmony_ci // vl128 state = 0xb5cb70bb 4996b8021494Sopenharmony_ci __ dci(0x45a0d4a1); // histcnt z1.s, p5/z, z5.s, z0.s 4997b8021494Sopenharmony_ci // vl128 state = 0x4452182b 4998b8021494Sopenharmony_ci __ dci(0x45a0d4a3); // histcnt z3.s, p5/z, z5.s, z0.s 4999b8021494Sopenharmony_ci // vl128 state = 0x71298d3c 5000b8021494Sopenharmony_ci __ dci(0x45a0d4a2); // histcnt z2.s, p5/z, z5.s, z0.s 5001b8021494Sopenharmony_ci // vl128 state = 0xa22914e1 5002b8021494Sopenharmony_ci __ dci(0x45a2d6a3); // histcnt z3.s, p5/z, z21.s, z2.s 5003b8021494Sopenharmony_ci // vl128 state = 0x6183bfbc 5004b8021494Sopenharmony_ci __ dci(0x45a2de21); // histcnt z1.s, p7/z, z17.s, z2.s 5005b8021494Sopenharmony_ci // vl128 state = 0xd1ebb242 5006b8021494Sopenharmony_ci __ dci(0x45e2dc20); // histcnt z0.d, p7/z, z1.d, z2.d 5007b8021494Sopenharmony_ci // vl128 state = 0x297a432d 5008b8021494Sopenharmony_ci __ dci(0x45e2d8b0); // histcnt z16.d, p6/z, z5.d, z2.d 5009b8021494Sopenharmony_ci // vl128 state = 0x1d2557c0 5010b8021494Sopenharmony_ci __ dci(0x45eed8b8); // histcnt z24.d, p6/z, z5.d, z14.d 5011b8021494Sopenharmony_ci // vl128 state = 0xe6ef07fa 5012b8021494Sopenharmony_ci __ dci(0x45eed8a8); // histcnt z8.d, p6/z, z5.d, z14.d 5013b8021494Sopenharmony_ci // vl128 state = 0xaf3665bb 5014b8021494Sopenharmony_ci __ dci(0x45aed88c); // histcnt z12.s, p6/z, z4.s, z14.s 5015b8021494Sopenharmony_ci // vl128 state = 0x5c2b38bc 5016b8021494Sopenharmony_ci __ dci(0x45efd88d); // histcnt z13.d, p6/z, z4.d, z15.d 5017b8021494Sopenharmony_ci // vl128 state = 0x8d5527d8 5018b8021494Sopenharmony_ci __ dci(0x45ffc88f); // histcnt z15.d, p2/z, z4.d, z31.d 5019b8021494Sopenharmony_ci // vl128 state = 0x1d2e08d2 5020b8021494Sopenharmony_ci __ dci(0x45fbc98d); // histcnt z13.d, p2/z, z12.d, z27.d 5021b8021494Sopenharmony_ci // vl128 state = 0x007388b0 5022b8021494Sopenharmony_ci __ dci(0x45bbcd8f); // histcnt z15.s, p3/z, z12.s, z27.s 5023b8021494Sopenharmony_ci // vl128 state = 0x9008a7ba 5024b8021494Sopenharmony_ci __ dci(0x45b3cc9f); // histcnt z31.s, p3/z, z4.s, z19.s 5025b8021494Sopenharmony_ci // vl128 state = 0xc4030ca4 5026b8021494Sopenharmony_ci __ dci(0x45bbc497); // histcnt z23.s, p1/z, z4.s, z27.s 5027b8021494Sopenharmony_ci // vl128 state = 0xeaf4a0b6 5028b8021494Sopenharmony_ci __ dci(0x45fbc415); // histcnt z21.d, p1/z, z0.d, z27.d 5029b8021494Sopenharmony_ci // vl128 state = 0x03d85428 5030b8021494Sopenharmony_ci __ dci(0x45ffc517); // histcnt z23.d, p1/z, z8.d, z31.d 5031b8021494Sopenharmony_ci // vl128 state = 0xa836a751 5032b8021494Sopenharmony_ci __ dci(0x45fbc596); // histcnt z22.d, p1/z, z12.d, z27.d 5033b8021494Sopenharmony_ci // vl128 state = 0x77e33f69 5034b8021494Sopenharmony_ci __ dci(0x45fbc4c6); // histcnt z6.d, p1/z, z6.d, z27.d 5035b8021494Sopenharmony_ci // vl128 state = 0xf47bb379 5036b8021494Sopenharmony_ci __ dci(0x45fbc4ce); // histcnt z14.d, p1/z, z6.d, z27.d 5037b8021494Sopenharmony_ci // vl128 state = 0x6dbfff33 5038b8021494Sopenharmony_ci __ dci(0x45fad4ca); // histcnt z10.d, p5/z, z6.d, z26.d 5039b8021494Sopenharmony_ci // vl128 state = 0xbc04915a 5040b8021494Sopenharmony_ci __ dci(0x45ead45a); // histcnt z26.d, p5/z, z2.d, z10.d 5041b8021494Sopenharmony_ci // vl128 state = 0x8969b1c5 5042b8021494Sopenharmony_ci __ dci(0x45aad4ca); // histcnt z10.s, p5/z, z6.s, z10.s 5043b8021494Sopenharmony_ci // vl128 state = 0x58d2dfac 5044b8021494Sopenharmony_ci __ dci(0x45aed0ce); // histcnt z14.s, p4/z, z6.s, z14.s 5045b8021494Sopenharmony_ci // vl128 state = 0xfa793cc7 5046b8021494Sopenharmony_ci __ dci(0x45aec4c6); // histcnt z6.s, p1/z, z6.s, z14.s 5047b8021494Sopenharmony_ci // vl128 state = 0xff4c99d8 5048b8021494Sopenharmony_ci __ dci(0x45abc4c7); // histcnt z7.s, p1/z, z6.s, z11.s 5049b8021494Sopenharmony_ci // vl128 state = 0x2b44a4ae 5050b8021494Sopenharmony_ci __ dci(0x45abc4cf); // histcnt z15.s, p1/z, z6.s, z11.s 5051b8021494Sopenharmony_ci // vl128 state = 0xbb3f8ba4 5052b8021494Sopenharmony_ci __ dci(0x45a9c44e); // histcnt z14.s, p1/z, z2.s, z9.s 5053b8021494Sopenharmony_ci // vl128 state = 0x5a3a40a6 5054b8021494Sopenharmony_ci __ dci(0x45b9c46f); // histcnt z15.s, p1/z, z3.s, z25.s 5055b8021494Sopenharmony_ci // vl128 state = 0x72e31c5f 5056b8021494Sopenharmony_ci __ dci(0x45b9c46e); // histcnt z14.s, p1/z, z3.s, z25.s 5057b8021494Sopenharmony_ci // vl128 state = 0xde56263e 5058b8021494Sopenharmony_ci __ dci(0x45b1c67e); // histcnt z30.s, p1/z, z19.s, z17.s 5059b8021494Sopenharmony_ci // vl128 state = 0xc570f0b9 5060b8021494Sopenharmony_ci __ dci(0x45b5c63a); // histcnt z26.s, p1/z, z17.s, z21.s 5061b8021494Sopenharmony_ci // vl128 state = 0x72ab1716 5062b8021494Sopenharmony_ci __ dci(0x45a5c72a); // histcnt z10.s, p1/z, z25.s, z5.s 5063b8021494Sopenharmony_ci // vl128 state = 0xe8848b2d 5064b8021494Sopenharmony_ci __ dci(0x45a1c77a); // histcnt z26.s, p1/z, z27.s, z1.s 5065b8021494Sopenharmony_ci // vl128 state = 0x2975ac38 5066b8021494Sopenharmony_ci __ dci(0x45a1c77b); // histcnt z27.s, p1/z, z27.s, z1.s 5067b8021494Sopenharmony_ci // vl128 state = 0xb0638363 5068b8021494Sopenharmony_ci __ dci(0x45a1c773); // histcnt z19.s, p1/z, z27.s, z1.s 5069b8021494Sopenharmony_ci // vl128 state = 0xc9620a45 5070b8021494Sopenharmony_ci __ dci(0x45e9c777); // histcnt z23.d, p1/z, z27.d, z9.d 5071b8021494Sopenharmony_ci // vl128 state = 0x0414c679 5072b8021494Sopenharmony_ci __ dci(0x45ebc67f); // histcnt z31.d, p1/z, z19.d, z11.d 5073b8021494Sopenharmony_ci // vl128 state = 0xc1d4410e 5074b8021494Sopenharmony_ci __ dci(0x45ebc37b); // histcnt z27.d, p0/z, z27.d, z11.d 5075b8021494Sopenharmony_ci // vl128 state = 0x3ae32e36 5076b8021494Sopenharmony_ci __ dci(0x45abd373); // histcnt z19.s, p4/z, z27.s, z11.s 5077b8021494Sopenharmony_ci // vl128 state = 0x75ffe12c 5078b8021494Sopenharmony_ci __ dci(0x45fbd363); // histcnt z3.d, p4/z, z27.d, z27.d 5079b8021494Sopenharmony_ci // vl128 state = 0x4084743b 5080b8021494Sopenharmony_ci __ dci(0x45ffc36b); // histcnt z11.d, p0/z, z27.d, z31.d 5081b8021494Sopenharmony_ci // vl128 state = 0xfade136b 5082b8021494Sopenharmony_ci __ dci(0x45ffc3ca); // histcnt z10.d, p0/z, z30.d, z31.d 5083b8021494Sopenharmony_ci // vl128 state = 0x60f18f50 5084b8021494Sopenharmony_ci __ dci(0x45efc2ce); // histcnt z14.d, p0/z, z22.d, z15.d 5085b8021494Sopenharmony_ci // vl128 state = 0x162ed112 5086b8021494Sopenharmony_ci __ dci(0x45adc2c6); // histcnt z6.s, p0/z, z22.s, z13.s 5087b8021494Sopenharmony_ci // vl128 state = 0x4f84cb96 5088b8021494Sopenharmony_ci __ dci(0x45adc2c4); // histcnt z4.s, p0/z, z22.s, z13.s 5089b8021494Sopenharmony_ci // vl128 state = 0x5d04ccb6 5090b8021494Sopenharmony_ci __ dci(0x45a7c2d4); // histcnt z20.s, p0/z, z22.s, z7.s 5091b8021494Sopenharmony_ci // vl128 state = 0x38efdab7 5092b8021494Sopenharmony_ci __ dci(0x45a6c0c4); // histcnt z4.s, p0/z, z6.s, z6.s 5093b8021494Sopenharmony_ci // vl128 state = 0xff7a0a24 5094b8021494Sopenharmony_ci __ dci(0x45a7c2c0); // histcnt z0.s, p0/z, z22.s, z7.s 5095b8021494Sopenharmony_ci // vl128 state = 0x5f7b0a31 5096b8021494Sopenharmony_ci __ dci(0x45a7d6c1); // histcnt z1.s, p5/z, z22.s, z7.s 5097b8021494Sopenharmony_ci // vl128 state = 0x1e8a6f5f 5098b8021494Sopenharmony_ci __ dci(0x45afd7c5); // histcnt z5.s, p5/z, z30.s, z15.s 5099b8021494Sopenharmony_ci // vl128 state = 0x655ed237 5100b8021494Sopenharmony_ci __ dci(0x45add3d5); // histcnt z21.s, p4/z, z30.s, z13.s 5101b8021494Sopenharmony_ci // vl128 state = 0x8c7226a9 5102b8021494Sopenharmony_ci __ dci(0x45add3d4); // histcnt z20.s, p4/z, z30.s, z13.s 5103b8021494Sopenharmony_ci // vl128 state = 0x727304ad 5104b8021494Sopenharmony_ci __ dci(0x45bcd3dc); // histcnt z28.s, p4/z, z30.s, z28.s 5105b8021494Sopenharmony_ci // vl128 state = 0xce4e49d0 5106b8021494Sopenharmony_ci __ dci(0x45bcd3cc); // histcnt z12.s, p4/z, z30.s, z28.s 5107b8021494Sopenharmony_ci // vl128 state = 0x5c252d7d 5108b8021494Sopenharmony_ci __ dci(0x45bcd15c); // histcnt z28.s, p4/z, z10.s, z28.s 5109b8021494Sopenharmony_ci // vl128 state = 0x5e1163f7 5110b8021494Sopenharmony_ci __ dci(0x45b5d154); // histcnt z20.s, p4/z, z10.s, z21.s 5111b8021494Sopenharmony_ci // vl128 state = 0xf77c50ee 5112b8021494Sopenharmony_ci __ dci(0x45b5d156); // histcnt z22.s, p4/z, z10.s, z21.s 5113b8021494Sopenharmony_ci // vl128 state = 0xe35c8438 5114b8021494Sopenharmony_ci __ dci(0x45b3d157); // histcnt z23.s, p4/z, z10.s, z19.s 5115b8021494Sopenharmony_ci // vl128 state = 0xf6926673 5116b8021494Sopenharmony_ci __ dci(0x45b3d156); // histcnt z22.s, p4/z, z10.s, z19.s 5117b8021494Sopenharmony_ci // vl128 state = 0xf9022ad2 5118b8021494Sopenharmony_ci __ dci(0x45b3c554); // histcnt z20.s, p1/z, z10.s, z19.s 5119b8021494Sopenharmony_ci // vl128 state = 0xb90dfe28 5120b8021494Sopenharmony_ci __ dci(0x45bbd55c); // histcnt z28.s, p5/z, z10.s, z27.s 5121b8021494Sopenharmony_ci // vl128 state = 0x9a939b84 5122b8021494Sopenharmony_ci __ dci(0x45abd57e); // histcnt z30.s, p5/z, z11.s, z11.s 5123b8021494Sopenharmony_ci // vl128 state = 0xd9ad8be7 5124b8021494Sopenharmony_ci __ dci(0x45abcd7a); // histcnt z26.s, p3/z, z11.s, z11.s 5125b8021494Sopenharmony_ci // vl128 state = 0x14869e4f 5126b8021494Sopenharmony_ci __ dci(0x45bbc57b); // histcnt z27.s, p1/z, z11.s, z27.s 5127b8021494Sopenharmony_ci // vl128 state = 0x25130793 5128b8021494Sopenharmony_ci __ dci(0x45bfcd73); // histcnt z19.s, p3/z, z11.s, z31.s 5129b8021494Sopenharmony_ci // vl128 state = 0x53adf455 5130b8021494Sopenharmony_ci __ dci(0x45bfc863); // histcnt z3.s, p2/z, z3.s, z31.s 5131b8021494Sopenharmony_ci // vl128 state = 0x82fa6c44 5132b8021494Sopenharmony_ci __ dci(0x45b7cc62); // histcnt z2.s, p3/z, z3.s, z23.s 5133b8021494Sopenharmony_ci // vl128 state = 0xfaefda71 5134b8021494Sopenharmony_ci __ dci(0x45b6cce3); // histcnt z3.s, p3/z, z7.s, z22.s 5135b8021494Sopenharmony_ci // vl128 state = 0xdd697c2a 5136b8021494Sopenharmony_ci } 5137b8021494Sopenharmony_ci 5138b8021494Sopenharmony_ci uint32_t state; 5139b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 5140b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 5141b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 5142b8021494Sopenharmony_ci 5143b8021494Sopenharmony_ci END(); 5144b8021494Sopenharmony_ci if (CAN_RUN()) { 5145b8021494Sopenharmony_ci RUN(); 5146b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 5147b8021494Sopenharmony_ci 0xdd697c2a, 5148b8021494Sopenharmony_ci 0x1415ff61, 5149b8021494Sopenharmony_ci 0xb9e154c8, 5150b8021494Sopenharmony_ci 0x566a2af5, 5151b8021494Sopenharmony_ci 0xef7574b4, 5152b8021494Sopenharmony_ci 0x6da83471, 5153b8021494Sopenharmony_ci 0x356d5c4d, 5154b8021494Sopenharmony_ci 0x798a2403, 5155b8021494Sopenharmony_ci 0x2c16e862, 5156b8021494Sopenharmony_ci 0x6fa84021, 5157b8021494Sopenharmony_ci 0x6e09e8ff, 5158b8021494Sopenharmony_ci 0xc13a0eb6, 5159b8021494Sopenharmony_ci 0x88c92928, 5160b8021494Sopenharmony_ci 0xe51672fe, 5161b8021494Sopenharmony_ci 0x229b8ed5, 5162b8021494Sopenharmony_ci 0x9e662757, 5163b8021494Sopenharmony_ci }; 5164b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 5165b8021494Sopenharmony_ci } 5166b8021494Sopenharmony_ci} 5167b8021494Sopenharmony_ci 5168b8021494Sopenharmony_ciTEST_SVE(sve2_histseg) { 5169b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 5170b8021494Sopenharmony_ci CPUFeatures::kSVE2, 5171b8021494Sopenharmony_ci CPUFeatures::kNEON, 5172b8021494Sopenharmony_ci CPUFeatures::kCRC32); 5173b8021494Sopenharmony_ci START(); 5174b8021494Sopenharmony_ci 5175b8021494Sopenharmony_ci SetInitialMachineState(&masm); 5176b8021494Sopenharmony_ci // state = 0xe2bd2480 5177b8021494Sopenharmony_ci 5178b8021494Sopenharmony_ci { 5179b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 100 * kInstructionSize); 5180b8021494Sopenharmony_ci __ dci(0x4524a228); // histseg z8.b, z17.b, z4.b 5181b8021494Sopenharmony_ci // vl128 state = 0x21ed28a1 5182b8021494Sopenharmony_ci __ dci(0x452ca20c); // histseg z12.b, z16.b, z12.b 5183b8021494Sopenharmony_ci // vl128 state = 0xc135d593 5184b8021494Sopenharmony_ci __ dci(0x453ca288); // histseg z8.b, z20.b, z28.b 5185b8021494Sopenharmony_ci // vl128 state = 0xb86cd6e7 5186b8021494Sopenharmony_ci __ dci(0x4538a380); // histseg z0.b, z28.b, z24.b 5187b8021494Sopenharmony_ci // vl128 state = 0xd28ddd71 5188b8021494Sopenharmony_ci __ dci(0x452aa388); // histseg z8.b, z28.b, z10.b 5189b8021494Sopenharmony_ci // vl128 state = 0x322d3aa8 5190b8021494Sopenharmony_ci __ dci(0x452aa38c); // histseg z12.b, z28.b, z10.b 5191b8021494Sopenharmony_ci // vl128 state = 0x67d668fc 5192b8021494Sopenharmony_ci __ dci(0x4532a384); // histseg z4.b, z28.b, z18.b 5193b8021494Sopenharmony_ci // vl128 state = 0xc57505d4 5194b8021494Sopenharmony_ci __ dci(0x4537a380); // histseg z0.b, z28.b, z23.b 5195b8021494Sopenharmony_ci // vl128 state = 0xb47d0a11 5196b8021494Sopenharmony_ci __ dci(0x4535a3a8); // histseg z8.b, z29.b, z21.b 5197b8021494Sopenharmony_ci // vl128 state = 0x347adf6f 5198b8021494Sopenharmony_ci __ dci(0x4535a3ac); // histseg z12.b, z29.b, z21.b 5199b8021494Sopenharmony_ci // vl128 state = 0xb763510c 5200b8021494Sopenharmony_ci __ dci(0x4535a3ae); // histseg z14.b, z29.b, z21.b 5201b8021494Sopenharmony_ci // vl128 state = 0xb28319d5 5202b8021494Sopenharmony_ci __ dci(0x4525a39e); // histseg z30.b, z28.b, z5.b 5203b8021494Sopenharmony_ci // vl128 state = 0x0adc6533 5204b8021494Sopenharmony_ci __ dci(0x4525a38e); // histseg z14.b, z28.b, z5.b 5205b8021494Sopenharmony_ci // vl128 state = 0x248409c6 5206b8021494Sopenharmony_ci __ dci(0x452da3c6); // histseg z6.b, z30.b, z13.b 5207b8021494Sopenharmony_ci // vl128 state = 0xa71c85d6 5208b8021494Sopenharmony_ci __ dci(0x452da187); // histseg z7.b, z12.b, z13.b 5209b8021494Sopenharmony_ci // vl128 state = 0x7314b8a0 5210b8021494Sopenharmony_ci __ dci(0x4525a1a6); // histseg z6.b, z13.b, z5.b 5211b8021494Sopenharmony_ci // vl128 state = 0x129013d5 5212b8021494Sopenharmony_ci __ dci(0x4527a18e); // histseg z14.b, z12.b, z7.b 5213b8021494Sopenharmony_ci // vl128 state = 0xc6b207b7 5214b8021494Sopenharmony_ci __ dci(0x4521a18c); // histseg z12.b, z12.b, z1.b 5215b8021494Sopenharmony_ci // vl128 state = 0x03957bb5 5216b8021494Sopenharmony_ci __ dci(0x4524a18d); // histseg z13.b, z12.b, z4.b 5217b8021494Sopenharmony_ci // vl128 state = 0x379af1c6 5218b8021494Sopenharmony_ci __ dci(0x4524a125); // histseg z5.b, z9.b, z4.b 5219b8021494Sopenharmony_ci // vl128 state = 0x93c462cc 5220b8021494Sopenharmony_ci __ dci(0x4522a127); // histseg z7.b, z9.b, z2.b 5221b8021494Sopenharmony_ci // vl128 state = 0xc95cb1a9 5222b8021494Sopenharmony_ci __ dci(0x4532a117); // histseg z23.b, z8.b, z18.b 5223b8021494Sopenharmony_ci // vl128 state = 0xc50e4e66 5224b8021494Sopenharmony_ci __ dci(0x4533a15f); // histseg z31.b, z10.b, z19.b 5225b8021494Sopenharmony_ci // vl128 state = 0x76663e3e 5226b8021494Sopenharmony_ci __ dci(0x4533a14f); // histseg z15.b, z10.b, z19.b 5227b8021494Sopenharmony_ci // vl128 state = 0x84f5ca5f 5228b8021494Sopenharmony_ci __ dci(0x4533a0ce); // histseg z14.b, z6.b, z19.b 5229b8021494Sopenharmony_ci // vl128 state = 0x50d7de3d 5230b8021494Sopenharmony_ci __ dci(0x453ba1cc); // histseg z12.b, z14.b, z27.b 5231b8021494Sopenharmony_ci // vl128 state = 0x32e3b53f 5232b8021494Sopenharmony_ci __ dci(0x453ba0fc); // histseg z28.b, z7.b, z27.b 5233b8021494Sopenharmony_ci // vl128 state = 0x0a5d4180 5234b8021494Sopenharmony_ci __ dci(0x452ba2f4); // histseg z20.b, z23.b, z11.b 5235b8021494Sopenharmony_ci // vl128 state = 0x91b77585 5236b8021494Sopenharmony_ci __ dci(0x453ba2c4); // histseg z4.b, z22.b, z27.b 5237b8021494Sopenharmony_ci // vl128 state = 0x5cd0c690 5238b8021494Sopenharmony_ci __ dci(0x453ba2cc); // histseg z12.b, z22.b, z27.b 5239b8021494Sopenharmony_ci // vl128 state = 0xa6a5f749 5240b8021494Sopenharmony_ci __ dci(0x453ba1c8); // histseg z8.b, z14.b, z27.b 5241b8021494Sopenharmony_ci // vl128 state = 0xe5036937 5242b8021494Sopenharmony_ci __ dci(0x4529a1c9); // histseg z9.b, z14.b, z9.b 5243b8021494Sopenharmony_ci // vl128 state = 0x13c620c8 5244b8021494Sopenharmony_ci __ dci(0x4529a1a8); // histseg z8.b, z13.b, z9.b 5245b8021494Sopenharmony_ci // vl128 state = 0xbf71d421 5246b8021494Sopenharmony_ci __ dci(0x4521a198); // histseg z24.b, z12.b, z1.b 5247b8021494Sopenharmony_ci // vl128 state = 0xe01d1160 5248b8021494Sopenharmony_ci __ dci(0x4529a1ba); // histseg z26.b, z13.b, z9.b 5249b8021494Sopenharmony_ci // vl128 state = 0xaa1b29d6 5250b8021494Sopenharmony_ci __ dci(0x452fa1bb); // histseg z27.b, z13.b, z15.b 5251b8021494Sopenharmony_ci // vl128 state = 0x2f96bd61 5252b8021494Sopenharmony_ci __ dci(0x452fa0ff); // histseg z31.b, z7.b, z15.b 5253b8021494Sopenharmony_ci // vl128 state = 0x5aeb6bec 5254b8021494Sopenharmony_ci __ dci(0x4527a0de); // histseg z30.b, z6.b, z7.b 5255b8021494Sopenharmony_ci // vl128 state = 0xbcb1b299 5256b8021494Sopenharmony_ci __ dci(0x4525a1d6); // histseg z22.b, z14.b, z5.b 5257b8021494Sopenharmony_ci // vl128 state = 0x0f89ea9b 5258b8021494Sopenharmony_ci __ dci(0x4525a1d7); // histseg z23.b, z14.b, z5.b 5259b8021494Sopenharmony_ci // vl128 state = 0xe40f30a2 5260b8021494Sopenharmony_ci __ dci(0x4521a3df); // histseg z31.b, z30.b, z1.b 5261b8021494Sopenharmony_ci // vl128 state = 0x342ff33b 5262b8021494Sopenharmony_ci __ dci(0x4521a197); // histseg z23.b, z12.b, z1.b 5263b8021494Sopenharmony_ci // vl128 state = 0xdfa92902 5264b8021494Sopenharmony_ci __ dci(0x4521a187); // histseg z7.b, z12.b, z1.b 5265b8021494Sopenharmony_ci // vl128 state = 0x8531fa67 5266b8021494Sopenharmony_ci __ dci(0x4535a186); // histseg z6.b, z12.b, z21.b 5267b8021494Sopenharmony_ci // vl128 state = 0xe4b55112 5268b8021494Sopenharmony_ci __ dci(0x4535a196); // histseg z22.b, z12.b, z21.b 5269b8021494Sopenharmony_ci // vl128 state = 0x5d26970e 5270b8021494Sopenharmony_ci __ dci(0x4525a097); // histseg z23.b, z4.b, z5.b 5271b8021494Sopenharmony_ci // vl128 state = 0x7dcb1d13 5272b8021494Sopenharmony_ci __ dci(0x4525a095); // histseg z21.b, z4.b, z5.b 5273b8021494Sopenharmony_ci // vl128 state = 0x5fb0789c 5274b8021494Sopenharmony_ci __ dci(0x452da017); // histseg z23.b, z0.b, z13.b 5275b8021494Sopenharmony_ci // vl128 state = 0x7f5df281 5276b8021494Sopenharmony_ci __ dci(0x452da295); // histseg z21.b, z20.b, z13.b 5277b8021494Sopenharmony_ci // vl128 state = 0x9e6f5eaf 5278b8021494Sopenharmony_ci __ dci(0x453da39d); // histseg z29.b, z28.b, z29.b 5279b8021494Sopenharmony_ci // vl128 state = 0x532f95a9 5280b8021494Sopenharmony_ci __ dci(0x453da39c); // histseg z28.b, z28.b, z29.b 5281b8021494Sopenharmony_ci // vl128 state = 0x64202514 5282b8021494Sopenharmony_ci __ dci(0x4535a29e); // histseg z30.b, z20.b, z21.b 5283b8021494Sopenharmony_ci // vl128 state = 0x44bda972 5284b8021494Sopenharmony_ci __ dci(0x4535a0bf); // histseg z31.b, z5.b, z21.b 5285b8021494Sopenharmony_ci // vl128 state = 0x258125d6 5286b8021494Sopenharmony_ci __ dci(0x4535a0bb); // histseg z27.b, z5.b, z21.b 5287b8021494Sopenharmony_ci // vl128 state = 0xec63caaf 5288b8021494Sopenharmony_ci __ dci(0x4537a2b3); // histseg z19.b, z21.b, z23.b 5289b8021494Sopenharmony_ci // vl128 state = 0xb937b6e8 5290b8021494Sopenharmony_ci __ dci(0x4525a2b1); // histseg z17.b, z21.b, z5.b 5291b8021494Sopenharmony_ci // vl128 state = 0x1515ee94 5292b8021494Sopenharmony_ci __ dci(0x4525a2b5); // histseg z21.b, z21.b, z5.b 5293b8021494Sopenharmony_ci // vl128 state = 0x4bb06873 5294b8021494Sopenharmony_ci __ dci(0x4525a0fd); // histseg z29.b, z7.b, z5.b 5295b8021494Sopenharmony_ci // vl128 state = 0x23446114 5296b8021494Sopenharmony_ci __ dci(0x4524a079); // histseg z25.b, z3.b, z4.b 5297b8021494Sopenharmony_ci // vl128 state = 0x48d52cf6 5298b8021494Sopenharmony_ci __ dci(0x4524a0d8); // histseg z24.b, z6.b, z4.b 5299b8021494Sopenharmony_ci // vl128 state = 0x0deef019 5300b8021494Sopenharmony_ci __ dci(0x452ca09c); // histseg z28.b, z4.b, z12.b 5301b8021494Sopenharmony_ci // vl128 state = 0xaba6e202 5302b8021494Sopenharmony_ci __ dci(0x453ca018); // histseg z24.b, z0.b, z28.b 5303b8021494Sopenharmony_ci // vl128 state = 0xee9d3eed 5304b8021494Sopenharmony_ci __ dci(0x4539a008); // histseg z8.b, z0.b, z25.b 5305b8021494Sopenharmony_ci // vl128 state = 0x254c57f3 5306b8021494Sopenharmony_ci __ dci(0x4539a00c); // histseg z12.b, z0.b, z25.b 5307b8021494Sopenharmony_ci // vl128 state = 0x28fea24d 5308b8021494Sopenharmony_ci __ dci(0x4531a048); // histseg z8.b, z2.b, z17.b 5309b8021494Sopenharmony_ci // vl128 state = 0xe32fcb53 5310b8021494Sopenharmony_ci __ dci(0x4530a0ca); // histseg z10.b, z6.b, z16.b 5311b8021494Sopenharmony_ci // vl128 state = 0xb3a9860b 5312b8021494Sopenharmony_ci __ dci(0x4520a0ee); // histseg z14.b, z7.b, z0.b 5313b8021494Sopenharmony_ci // vl128 state = 0xef9e57fa 5314b8021494Sopenharmony_ci __ dci(0x4520a1de); // histseg z30.b, z14.b, z0.b 5315b8021494Sopenharmony_ci // vl128 state = 0x295902e9 5316b8021494Sopenharmony_ci __ dci(0x4520a38e); // histseg z14.b, z28.b, z0.b 5317b8021494Sopenharmony_ci // vl128 state = 0x756ed318 5318b8021494Sopenharmony_ci __ dci(0x4528a30f); // histseg z15.b, z24.b, z8.b 5319b8021494Sopenharmony_ci // vl128 state = 0x8591dff9 5320b8021494Sopenharmony_ci __ dci(0x4538a39f); // histseg z31.b, z28.b, z24.b 5321b8021494Sopenharmony_ci // vl128 state = 0xe4ad535d 5322b8021494Sopenharmony_ci __ dci(0x4538a39b); // histseg z27.b, z28.b, z24.b 5323b8021494Sopenharmony_ci // vl128 state = 0x2d4fbc24 5324b8021494Sopenharmony_ci __ dci(0x4538a093); // histseg z19.b, z4.b, z24.b 5325b8021494Sopenharmony_ci // vl128 state = 0xd8ee932a 5326b8021494Sopenharmony_ci __ dci(0x453aa0a3); // histseg z3.b, z5.b, z26.b 5327b8021494Sopenharmony_ci // vl128 state = 0x768b71a6 5328b8021494Sopenharmony_ci __ dci(0x453aa0ab); // histseg z11.b, z5.b, z26.b 5329b8021494Sopenharmony_ci // vl128 state = 0xa78673d7 5330b8021494Sopenharmony_ci __ dci(0x452ea0bb); // histseg z27.b, z5.b, z14.b 5331b8021494Sopenharmony_ci // vl128 state = 0x6e649cae 5332b8021494Sopenharmony_ci __ dci(0x452fa1bf); // histseg z31.b, z13.b, z15.b 5333b8021494Sopenharmony_ci // vl128 state = 0x0f58100a 5334b8021494Sopenharmony_ci __ dci(0x452fa1be); // histseg z30.b, z13.b, z15.b 5335b8021494Sopenharmony_ci // vl128 state = 0xc99f4519 5336b8021494Sopenharmony_ci __ dci(0x452fa3f6); // histseg z22.b, z31.b, z15.b 5337b8021494Sopenharmony_ci // vl128 state = 0x700c8305 5338b8021494Sopenharmony_ci __ dci(0x452fa3f4); // histseg z20.b, z31.b, z15.b 5339b8021494Sopenharmony_ci // vl128 state = 0xbdecfddc 5340b8021494Sopenharmony_ci __ dci(0x453fa3b0); // histseg z16.b, z29.b, z31.b 5341b8021494Sopenharmony_ci // vl128 state = 0x3f5b7578 5342b8021494Sopenharmony_ci __ dci(0x453fa3b8); // histseg z24.b, z29.b, z31.b 5343b8021494Sopenharmony_ci // vl128 state = 0xf0076715 5344b8021494Sopenharmony_ci __ dci(0x453fa228); // histseg z8.b, z17.b, z31.b 5345b8021494Sopenharmony_ci // vl128 state = 0x3bd60e0b 5346b8021494Sopenharmony_ci __ dci(0x4536a22a); // histseg z10.b, z17.b, z22.b 5347b8021494Sopenharmony_ci // vl128 state = 0x1171f63c 5348b8021494Sopenharmony_ci __ dci(0x4530a23a); // histseg z26.b, z17.b, z16.b 5349b8021494Sopenharmony_ci // vl128 state = 0x3fef270c 5350b8021494Sopenharmony_ci __ dci(0x4522a23e); // histseg z30.b, z17.b, z2.b 5351b8021494Sopenharmony_ci // vl128 state = 0xf928721f 5352b8021494Sopenharmony_ci __ dci(0x4524a23c); // histseg z28.b, z17.b, z4.b 5353b8021494Sopenharmony_ci // vl128 state = 0xecec697b 5354b8021494Sopenharmony_ci __ dci(0x4527a238); // histseg z24.b, z17.b, z7.b 5355b8021494Sopenharmony_ci // vl128 state = 0x23b07b16 5356b8021494Sopenharmony_ci __ dci(0x4525a210); // histseg z16.b, z16.b, z5.b 5357b8021494Sopenharmony_ci // vl128 state = 0x9c1c2ac5 5358b8021494Sopenharmony_ci __ dci(0x4525a200); // histseg z0.b, z16.b, z5.b 5359b8021494Sopenharmony_ci // vl128 state = 0xc446f89b 5360b8021494Sopenharmony_ci __ dci(0x4520a202); // histseg z2.b, z16.b, z0.b 5361b8021494Sopenharmony_ci // vl128 state = 0x8afba046 5362b8021494Sopenharmony_ci __ dci(0x4521a303); // histseg z3.b, z24.b, z1.b 5363b8021494Sopenharmony_ci // vl128 state = 0xf0b0f9f3 5364b8021494Sopenharmony_ci __ dci(0x4520a201); // histseg z1.b, z16.b, z0.b 5365b8021494Sopenharmony_ci // vl128 state = 0x8922615b 5366b8021494Sopenharmony_ci __ dci(0x4528a223); // histseg z3.b, z17.b, z8.b 5367b8021494Sopenharmony_ci // vl128 state = 0xf36938ee 5368b8021494Sopenharmony_ci __ dci(0x4528a367); // histseg z7.b, z27.b, z8.b 5369b8021494Sopenharmony_ci // vl128 state = 0xc2d96c41 5370b8021494Sopenharmony_ci __ dci(0x452ca3e6); // histseg z6.b, z31.b, z12.b 5371b8021494Sopenharmony_ci // vl128 state = 0xf15e835f 5372b8021494Sopenharmony_ci __ dci(0x452ea3c4); // histseg z4.b, z30.b, z14.b 5373b8021494Sopenharmony_ci // vl128 state = 0xb3964bd8 5374b8021494Sopenharmony_ci __ dci(0x452da3c6); // histseg z6.b, z30.b, z13.b 5375b8021494Sopenharmony_ci // vl128 state = 0x8011a4c6 5376b8021494Sopenharmony_ci __ dci(0x452da0c4); // histseg z4.b, z6.b, z13.b 5377b8021494Sopenharmony_ci // vl128 state = 0x0fbedf54 5378b8021494Sopenharmony_ci __ dci(0x4529a0ec); // histseg z12.b, z7.b, z9.b 5379b8021494Sopenharmony_ci // vl128 state = 0x9a4d7031 5380b8021494Sopenharmony_ci } 5381b8021494Sopenharmony_ci 5382b8021494Sopenharmony_ci uint32_t state; 5383b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 5384b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 5385b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 5386b8021494Sopenharmony_ci 5387b8021494Sopenharmony_ci END(); 5388b8021494Sopenharmony_ci if (CAN_RUN()) { 5389b8021494Sopenharmony_ci RUN(); 5390b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 5391b8021494Sopenharmony_ci 0x9a4d7031, 5392b8021494Sopenharmony_ci 0xebaa80ad, 5393b8021494Sopenharmony_ci 0x702155a3, 5394b8021494Sopenharmony_ci 0x181fff8d, 5395b8021494Sopenharmony_ci 0x7b071373, 5396b8021494Sopenharmony_ci 0x1bf0af96, 5397b8021494Sopenharmony_ci 0x9ca15297, 5398b8021494Sopenharmony_ci 0x615d2f4a, 5399b8021494Sopenharmony_ci 0x7658b554, 5400b8021494Sopenharmony_ci 0xd2bf7319, 5401b8021494Sopenharmony_ci 0xddf8d492, 5402b8021494Sopenharmony_ci 0xf5938d08, 5403b8021494Sopenharmony_ci 0xbe354cb1, 5404b8021494Sopenharmony_ci 0xfe2d5d63, 5405b8021494Sopenharmony_ci 0x29818684, 5406b8021494Sopenharmony_ci 0x2c862ef9, 5407b8021494Sopenharmony_ci }; 5408b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 5409b8021494Sopenharmony_ci } 5410b8021494Sopenharmony_ci} 5411b8021494Sopenharmony_ci 5412b8021494Sopenharmony_ciTEST_SVE(sve2_table) { 5413b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 5414b8021494Sopenharmony_ci CPUFeatures::kSVE2, 5415b8021494Sopenharmony_ci CPUFeatures::kNEON, 5416b8021494Sopenharmony_ci CPUFeatures::kCRC32); 5417b8021494Sopenharmony_ci START(); 5418b8021494Sopenharmony_ci 5419b8021494Sopenharmony_ci SetInitialMachineState(&masm); 5420b8021494Sopenharmony_ci // state = 0xe2bd2480 5421b8021494Sopenharmony_ci 5422b8021494Sopenharmony_ci { 5423b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 5424b8021494Sopenharmony_ci __ dci(0x05212a38); // tbl z24.b, {z17.b, z18.b}, z1.b 5425b8021494Sopenharmony_ci // vl128 state = 0xbdd1e1c1 5426b8021494Sopenharmony_ci __ dci(0x05212810); // tbl z16.b, {z0.b, z1.b}, z1.b 5427b8021494Sopenharmony_ci // vl128 state = 0x80ca38b6 5428b8021494Sopenharmony_ci __ dci(0x05e12812); // tbl z18.d, {z0.d, z1.d}, z1.d 5429b8021494Sopenharmony_ci // vl128 state = 0xb59fe024 5430b8021494Sopenharmony_ci __ dci(0x05632802); // tbl z2.h, {z0.h, z1.h}, z3.h 5431b8021494Sopenharmony_ci // vl128 state = 0xfb22b8f9 5432b8021494Sopenharmony_ci __ dci(0x05e32906); // tbl z6.d, {z8.d, z9.d}, z3.d 5433b8021494Sopenharmony_ci // vl128 state = 0x78ba34e9 5434b8021494Sopenharmony_ci __ dci(0x05e22942); // tbl z2.d, {z10.d, z11.d}, z2.d 5435b8021494Sopenharmony_ci // vl128 state = 0x000b006f 5436b8021494Sopenharmony_ci __ dci(0x05f22d46); // tbx z6.d, z10.d, z18.d 5437b8021494Sopenharmony_ci // vl128 state = 0x28b746e5 5438b8021494Sopenharmony_ci __ dci(0x05f32947); // tbl z7.d, {z10.d, z11.d}, z19.d 5439b8021494Sopenharmony_ci // vl128 state = 0xfcbf7b93 5440b8021494Sopenharmony_ci __ dci(0x05e32963); // tbl z3.d, {z11.d, z12.d}, z3.d 5441b8021494Sopenharmony_ci // vl128 state = 0x2891c0aa 5442b8021494Sopenharmony_ci __ dci(0x05e33161); // tbl z1.d, {z11.d}, z3.d 5443b8021494Sopenharmony_ci // vl128 state = 0x3468b9d4 5444b8021494Sopenharmony_ci __ dci(0x05e13149); // tbl z9.d, {z10.d}, z1.d 5445b8021494Sopenharmony_ci // vl128 state = 0xc2adf02b 5446b8021494Sopenharmony_ci __ dci(0x0560314d); // tbl z13.h, {z10.h}, z0.h 5447b8021494Sopenharmony_ci // vl128 state = 0xff9f1abb 5448b8021494Sopenharmony_ci __ dci(0x0578314c); // tbl z12.h, {z10.h}, z24.h 5449b8021494Sopenharmony_ci // vl128 state = 0x2cffcd38 5450b8021494Sopenharmony_ci __ dci(0x05e83144); // tbl z4.d, {z10.d}, z8.d 5451b8021494Sopenharmony_ci // vl128 state = 0x8e5ca010 5452b8021494Sopenharmony_ci __ dci(0x05e83146); // tbl z6.d, {z10.d}, z8.d 5453b8021494Sopenharmony_ci // vl128 state = 0xa6e0e69a 5454b8021494Sopenharmony_ci __ dci(0x05b83147); // tbl z7.s, {z10.s}, z24.s 5455b8021494Sopenharmony_ci // vl128 state = 0x513e6328 5456b8021494Sopenharmony_ci __ dci(0x053831d7); // tbl z23.b, {z14.b}, z24.b 5457b8021494Sopenharmony_ci // vl128 state = 0xe2bd7bdf 5458b8021494Sopenharmony_ci __ dci(0x056831df); // tbl z31.h, {z14.h}, z8.h 5459b8021494Sopenharmony_ci // vl128 state = 0xf4881e93 5460b8021494Sopenharmony_ci __ dci(0x0560319e); // tbl z30.h, {z12.h}, z0.h 5461b8021494Sopenharmony_ci // vl128 state = 0x4cd76275 5462b8021494Sopenharmony_ci __ dci(0x0522319a); // tbl z26.b, {z12.b}, z2.b 5463b8021494Sopenharmony_ci // vl128 state = 0x06d15ac3 5464b8021494Sopenharmony_ci __ dci(0x0522318a); // tbl z10.b, {z12.b}, z2.b 5465b8021494Sopenharmony_ci // vl128 state = 0x5657179b 5466b8021494Sopenharmony_ci __ dci(0x0522318e); // tbl z14.b, {z12.b}, z2.b 5467b8021494Sopenharmony_ci // vl128 state = 0x7def33b7 5468b8021494Sopenharmony_ci __ dci(0x05a6318a); // tbl z10.s, {z12.s}, z6.s 5469b8021494Sopenharmony_ci // vl128 state = 0x38ee6756 5470b8021494Sopenharmony_ci __ dci(0x05b2318b); // tbl z11.s, {z12.s}, z18.s 5471b8021494Sopenharmony_ci // vl128 state = 0x6ba1d599 5472b8021494Sopenharmony_ci __ dci(0x05a231bb); // tbl z27.s, {z13.s}, z2.s 5473b8021494Sopenharmony_ci // vl128 state = 0xee2c412e 5474b8021494Sopenharmony_ci __ dci(0x05a231ab); // tbl z11.s, {z13.s}, z2.s 5475b8021494Sopenharmony_ci // vl128 state = 0xa183e51b 5476b8021494Sopenharmony_ci __ dci(0x05a831af); // tbl z15.s, {z13.s}, z8.s 5477b8021494Sopenharmony_ci // vl128 state = 0xcd60a839 5478b8021494Sopenharmony_ci __ dci(0x05ea31a7); // tbl z7.d, {z13.d}, z10.d 5479b8021494Sopenharmony_ci // vl128 state = 0x3abe2d8b 5480b8021494Sopenharmony_ci __ dci(0x05fa33af); // tbl z15.d, {z29.d}, z26.d 5481b8021494Sopenharmony_ci // vl128 state = 0xf596f00c 5482b8021494Sopenharmony_ci __ dci(0x05fe32ae); // tbl z14.d, {z21.d}, z30.d 5483b8021494Sopenharmony_ci // vl128 state = 0x3e791a5a 5484b8021494Sopenharmony_ci __ dci(0x057a32be); // tbl z30.h, {z21.h}, z26.h 5485b8021494Sopenharmony_ci // vl128 state = 0x27f4086e 5486b8021494Sopenharmony_ci __ dci(0x05fe32ae); // tbl z14.d, {z21.d}, z30.d 5487b8021494Sopenharmony_ci // vl128 state = 0xec1be238 5488b8021494Sopenharmony_ci __ dci(0x05fe32aa); // tbl z10.d, {z21.d}, z30.d 5489b8021494Sopenharmony_ci // vl128 state = 0xa91ab6d9 5490b8021494Sopenharmony_ci __ dci(0x057e32e2); // tbl z2.h, {z23.h}, z30.h 5491b8021494Sopenharmony_ci // vl128 state = 0xd1ab825f 5492b8021494Sopenharmony_ci __ dci(0x057e32e0); // tbl z0.h, {z23.h}, z30.h 5493b8021494Sopenharmony_ci // vl128 state = 0xca42860c 5494b8021494Sopenharmony_ci __ dci(0x057f3270); // tbl z16.h, {z19.h}, z31.h 5495b8021494Sopenharmony_ci // vl128 state = 0xff27daa0 5496b8021494Sopenharmony_ci __ dci(0x05673271); // tbl z17.h, {z19.h}, z7.h 5497b8021494Sopenharmony_ci // vl128 state = 0x9b358bbf 5498b8021494Sopenharmony_ci __ dci(0x05e73379); // tbl z25.d, {z27.d}, z7.d 5499b8021494Sopenharmony_ci // vl128 state = 0xf0a4c65d 5500b8021494Sopenharmony_ci __ dci(0x05e3333d); // tbl z29.d, {z25.d}, z3.d 5501b8021494Sopenharmony_ci // vl128 state = 0x3de40d5b 5502b8021494Sopenharmony_ci __ dci(0x05e33335); // tbl z21.d, {z25.d}, z3.d 5503b8021494Sopenharmony_ci // vl128 state = 0xfeadc4fa 5504b8021494Sopenharmony_ci __ dci(0x05f33137); // tbl z23.d, {z9.d}, z19.d 5505b8021494Sopenharmony_ci // vl128 state = 0x417c23c2 5506b8021494Sopenharmony_ci __ dci(0x05b33336); // tbl z22.s, {z25.s}, z19.s 5507b8021494Sopenharmony_ci // vl128 state = 0x4bd7bddc 5508b8021494Sopenharmony_ci __ dci(0x05b1323e); // tbl z30.s, {z17.s}, z17.s 5509b8021494Sopenharmony_ci // vl128 state = 0x525aafe8 5510b8021494Sopenharmony_ci __ dci(0x05b0303c); // tbl z28.s, {z1.s}, z16.s 5511b8021494Sopenharmony_ci // vl128 state = 0xee67e295 5512b8021494Sopenharmony_ci __ dci(0x05b0308c); // tbl z12.s, {z4.s}, z16.s 5513b8021494Sopenharmony_ci // vl128 state = 0xce1a6811 5514b8021494Sopenharmony_ci __ dci(0x05b030e8); // tbl z8.s, {z7.s}, z16.s 5515b8021494Sopenharmony_ci // vl128 state = 0xfba53f74 5516b8021494Sopenharmony_ci __ dci(0x05a030b8); // tbl z24.s, {z5.s}, z0.s 5517b8021494Sopenharmony_ci // vl128 state = 0x56a69350 5518b8021494Sopenharmony_ci __ dci(0x05e830b0); // tbl z16.d, {z5.d}, z8.d 5519b8021494Sopenharmony_ci // vl128 state = 0xe0665941 5520b8021494Sopenharmony_ci __ dci(0x05e830b2); // tbl z18.d, {z5.d}, z8.d 5521b8021494Sopenharmony_ci // vl128 state = 0xc6680470 5522b8021494Sopenharmony_ci __ dci(0x05e931b3); // tbl z19.d, {z13.d}, z9.d 5523b8021494Sopenharmony_ci // vl128 state = 0x64a925a9 5524b8021494Sopenharmony_ci } 5525b8021494Sopenharmony_ci 5526b8021494Sopenharmony_ci uint32_t state; 5527b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 5528b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 5529b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 5530b8021494Sopenharmony_ci 5531b8021494Sopenharmony_ci END(); 5532b8021494Sopenharmony_ci if (CAN_RUN()) { 5533b8021494Sopenharmony_ci RUN(); 5534b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 5535b8021494Sopenharmony_ci 0x64a925a9, 5536b8021494Sopenharmony_ci 0x89750b9d, 5537b8021494Sopenharmony_ci 0xb803659e, 5538b8021494Sopenharmony_ci 0xa21efc63, 5539b8021494Sopenharmony_ci 0x67f967b8, 5540b8021494Sopenharmony_ci 0x4e52e209, 5541b8021494Sopenharmony_ci 0x42c1692f, 5542b8021494Sopenharmony_ci 0x4d8539c7, 5543b8021494Sopenharmony_ci 0x6828f0f4, 5544b8021494Sopenharmony_ci 0x3c75d27a, 5545b8021494Sopenharmony_ci 0x2e3341c9, 5546b8021494Sopenharmony_ci 0xfe4a8f4f, 5547b8021494Sopenharmony_ci 0xd27b47ae, 5548b8021494Sopenharmony_ci 0x665d8f8b, 5549b8021494Sopenharmony_ci 0x3230c584, 5550b8021494Sopenharmony_ci 0xcf1d6e82, 5551b8021494Sopenharmony_ci }; 5552b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 5553b8021494Sopenharmony_ci } 5554b8021494Sopenharmony_ci} 5555b8021494Sopenharmony_ci 5556b8021494Sopenharmony_ciTEST_SVE(sve2_cdot) { 5557b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 5558b8021494Sopenharmony_ci CPUFeatures::kSVE2, 5559b8021494Sopenharmony_ci CPUFeatures::kNEON, 5560b8021494Sopenharmony_ci CPUFeatures::kCRC32); 5561b8021494Sopenharmony_ci START(); 5562b8021494Sopenharmony_ci 5563b8021494Sopenharmony_ci SetInitialMachineState(&masm); 5564b8021494Sopenharmony_ci // state = 0xe2bd2480 5565b8021494Sopenharmony_ci 5566b8021494Sopenharmony_ci { 5567b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 5568b8021494Sopenharmony_ci __ dci(0x4488104f); // cdot z15.s, z2.b, z8.b, #0 5569b8021494Sopenharmony_ci // vl128 state = 0x25fd51d1 5570b8021494Sopenharmony_ci __ dci(0x448a106e); // cdot z14.s, z3.b, z10.b, #0 5571b8021494Sopenharmony_ci // vl128 state = 0x490576d5 5572b8021494Sopenharmony_ci __ dci(0x448a1246); // cdot z6.s, z18.b, z10.b, #0 5573b8021494Sopenharmony_ci // vl128 state = 0x25a6fe4b 5574b8021494Sopenharmony_ci __ dci(0x448e12ce); // cdot z14.s, z22.b, z14.b, #0 5575b8021494Sopenharmony_ci // vl128 state = 0xc378b2df 5576b8021494Sopenharmony_ci __ dci(0x448412cf); // cdot z15.s, z22.b, z4.b, #0 5577b8021494Sopenharmony_ci // vl128 state = 0xe92a358d 5578b8021494Sopenharmony_ci __ dci(0x448412c7); // cdot z7.s, z22.b, z4.b, #0 5579b8021494Sopenharmony_ci // vl128 state = 0x7408b292 5580b8021494Sopenharmony_ci __ dci(0x44c41257); // cdot z23.d, z18.h, z4.h, #0 5581b8021494Sopenharmony_ci // vl128 state = 0xebc02289 5582b8021494Sopenharmony_ci __ dci(0x448412d5); // cdot z21.s, z22.b, z4.b, #0 5583b8021494Sopenharmony_ci // vl128 state = 0x9a7c2f1a 5584b8021494Sopenharmony_ci __ dci(0x448712d7); // cdot z23.s, z22.b, z7.b, #0 5585b8021494Sopenharmony_ci // vl128 state = 0xed91e0b4 5586b8021494Sopenharmony_ci __ dci(0x44831295); // cdot z21.s, z20.b, z3.b, #0 5587b8021494Sopenharmony_ci // vl128 state = 0x3dae4184 5588b8021494Sopenharmony_ci __ dci(0x44821385); // cdot z5.s, z28.b, z2.b, #0 5589b8021494Sopenharmony_ci // vl128 state = 0x213fb541 5590b8021494Sopenharmony_ci __ dci(0x44c213c1); // cdot z1.d, z30.h, z2.h, #0 5591b8021494Sopenharmony_ci // vl128 state = 0xcba3207a 5592b8021494Sopenharmony_ci __ dci(0x44c61340); // cdot z0.d, z26.h, z6.h, #0 5593b8021494Sopenharmony_ci // vl128 state = 0x9d6041f3 5594b8021494Sopenharmony_ci __ dci(0x44c413d0); // cdot z16.d, z30.h, z4.h, #0 5595b8021494Sopenharmony_ci // vl128 state = 0x4b931738 5596b8021494Sopenharmony_ci __ dci(0x44cc12d8); // cdot z24.d, z22.h, z12.h, #0 5597b8021494Sopenharmony_ci // vl128 state = 0x2503fbcc 5598b8021494Sopenharmony_ci __ dci(0x448c1ac8); // cdot z8.s, z22.b, z12.b, #180 5599b8021494Sopenharmony_ci // vl128 state = 0x53bc5303 5600b8021494Sopenharmony_ci __ dci(0x448c12ec); // cdot z12.s, z23.b, z12.b, #0 5601b8021494Sopenharmony_ci // vl128 state = 0xb3bf45c7 5602b8021494Sopenharmony_ci __ dci(0x448812ad); // cdot z13.s, z21.b, z8.b, #0 5603b8021494Sopenharmony_ci // vl128 state = 0x938b4e4f 5604b8021494Sopenharmony_ci __ dci(0x44881689); // cdot z9.s, z20.b, z8.b, #90 5605b8021494Sopenharmony_ci // vl128 state = 0x70106ddd 5606b8021494Sopenharmony_ci __ dci(0x4498128b); // cdot z11.s, z20.b, z24.b, #0 5607b8021494Sopenharmony_ci // vl128 state = 0x92108bb2 5608b8021494Sopenharmony_ci __ dci(0x4498129b); // cdot z27.s, z20.b, z24.b, #0 5609b8021494Sopenharmony_ci // vl128 state = 0x545230eb 5610b8021494Sopenharmony_ci __ dci(0x449a12bf); // cdot z31.s, z21.b, z26.b, #0 5611b8021494Sopenharmony_ci // vl128 state = 0x5cd2fb12 5612b8021494Sopenharmony_ci __ dci(0x44da10af); // cdot z15.d, z5.h, z26.h, #0 5613b8021494Sopenharmony_ci // vl128 state = 0xc03d9146 5614b8021494Sopenharmony_ci __ dci(0x44da10ae); // cdot z14.d, z5.h, z26.h, #0 5615b8021494Sopenharmony_ci // vl128 state = 0xbc2712f7 5616b8021494Sopenharmony_ci __ dci(0x44db12be); // cdot z30.d, z21.h, z27.h, #0 5617b8021494Sopenharmony_ci // vl128 state = 0xccf9d667 5618b8021494Sopenharmony_ci __ dci(0x449b12ee); // cdot z14.s, z23.b, z27.b, #0 5619b8021494Sopenharmony_ci // vl128 state = 0x2c1e08f1 5620b8021494Sopenharmony_ci __ dci(0x449b12ef); // cdot z15.s, z23.b, z27.b, #0 5621b8021494Sopenharmony_ci // vl128 state = 0x159d17d7 5622b8021494Sopenharmony_ci __ dci(0x449b14ee); // cdot z14.s, z7.b, z27.b, #90 5623b8021494Sopenharmony_ci // vl128 state = 0x892c97d3 5624b8021494Sopenharmony_ci __ dci(0x449b1cac); // cdot z12.s, z5.b, z27.b, #270 5625b8021494Sopenharmony_ci // vl128 state = 0x3841ce24 5626b8021494Sopenharmony_ci __ dci(0x449b1aae); // cdot z14.s, z21.b, z27.b, #180 5627b8021494Sopenharmony_ci // vl128 state = 0x30a24868 5628b8021494Sopenharmony_ci __ dci(0x449a1aec); // cdot z12.s, z23.b, z26.b, #180 5629b8021494Sopenharmony_ci // vl128 state = 0x2b836c8a 5630b8021494Sopenharmony_ci __ dci(0x44981ace); // cdot z14.s, z22.b, z24.b, #180 5631b8021494Sopenharmony_ci // vl128 state = 0x16a81963 5632b8021494Sopenharmony_ci __ dci(0x44901a86); // cdot z6.s, z20.b, z16.b, #180 5633b8021494Sopenharmony_ci // vl128 state = 0x924ac9ee 5634b8021494Sopenharmony_ci __ dci(0x44981b8e); // cdot z14.s, z28.b, z24.b, #180 5635b8021494Sopenharmony_ci // vl128 state = 0x3953da61 5636b8021494Sopenharmony_ci __ dci(0x44891b8a); // cdot z10.s, z28.b, z9.b, #180 5637b8021494Sopenharmony_ci // vl128 state = 0xad72b6d5 5638b8021494Sopenharmony_ci __ dci(0x4499138b); // cdot z11.s, z28.b, z25.b, #0 5639b8021494Sopenharmony_ci // vl128 state = 0x569b1b2c 5640b8021494Sopenharmony_ci __ dci(0x4498119b); // cdot z27.s, z12.b, z24.b, #0 5641b8021494Sopenharmony_ci // vl128 state = 0xdbb36925 5642b8021494Sopenharmony_ci __ dci(0x449c199a); // cdot z26.s, z12.b, z28.b, #180 5643b8021494Sopenharmony_ci // vl128 state = 0x4be861d1 5644b8021494Sopenharmony_ci __ dci(0x44901992); // cdot z18.s, z12.b, z16.b, #180 5645b8021494Sopenharmony_ci // vl128 state = 0x1e83ddb5 5646b8021494Sopenharmony_ci __ dci(0x44901a90); // cdot z16.s, z20.b, z16.b, #180 5647b8021494Sopenharmony_ci // vl128 state = 0x180556e0 5648b8021494Sopenharmony_ci __ dci(0x44911ac0); // cdot z0.s, z22.b, z17.b, #180 5649b8021494Sopenharmony_ci // vl128 state = 0x2cbf5db5 5650b8021494Sopenharmony_ci __ dci(0x44951bc1); // cdot z1.s, z30.b, z21.b, #180 5651b8021494Sopenharmony_ci // vl128 state = 0x428f97bd 5652b8021494Sopenharmony_ci __ dci(0x44851b40); // cdot z0.s, z26.b, z5.b, #180 5653b8021494Sopenharmony_ci // vl128 state = 0xe0f0659f 5654b8021494Sopenharmony_ci __ dci(0x44851a70); // cdot z16.s, z19.b, z5.b, #180 5655b8021494Sopenharmony_ci // vl128 state = 0x4142d23c 5656b8021494Sopenharmony_ci __ dci(0x44861a74); // cdot z20.s, z19.b, z6.b, #180 5657b8021494Sopenharmony_ci // vl128 state = 0x74f7d373 5658b8021494Sopenharmony_ci __ dci(0x44921a76); // cdot z22.s, z19.b, z18.b, #180 5659b8021494Sopenharmony_ci // vl128 state = 0x5b4ef670 5660b8021494Sopenharmony_ci __ dci(0x44921246); // cdot z6.s, z18.b, z18.b, #0 5661b8021494Sopenharmony_ci // vl128 state = 0x1fe5d31d 5662b8021494Sopenharmony_ci __ dci(0x44981247); // cdot z7.s, z18.b, z24.b, #0 5663b8021494Sopenharmony_ci // vl128 state = 0x782a0559 5664b8021494Sopenharmony_ci __ dci(0x44981746); // cdot z6.s, z26.b, z24.b, #90 5665b8021494Sopenharmony_ci // vl128 state = 0x84cbc61d 5666b8021494Sopenharmony_ci __ dci(0x449816c4); // cdot z4.s, z22.b, z24.b, #90 5667b8021494Sopenharmony_ci // vl128 state = 0x078aa009 5668b8021494Sopenharmony_ci } 5669b8021494Sopenharmony_ci 5670b8021494Sopenharmony_ci uint32_t state; 5671b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 5672b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 5673b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 5674b8021494Sopenharmony_ci 5675b8021494Sopenharmony_ci END(); 5676b8021494Sopenharmony_ci if (CAN_RUN()) { 5677b8021494Sopenharmony_ci RUN(); 5678b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 5679b8021494Sopenharmony_ci 0x078aa009, 5680b8021494Sopenharmony_ci 0x3c4026df, 5681b8021494Sopenharmony_ci 0x3ae8e644, 5682b8021494Sopenharmony_ci 0x514dfdcd, 5683b8021494Sopenharmony_ci 0x2649444a, 5684b8021494Sopenharmony_ci 0x74a87bbe, 5685b8021494Sopenharmony_ci 0x14b8e9b3, 5686b8021494Sopenharmony_ci 0x92c65f4d, 5687b8021494Sopenharmony_ci 0xa3015fc1, 5688b8021494Sopenharmony_ci 0xab48b8fa, 5689b8021494Sopenharmony_ci 0x9e80ef05, 5690b8021494Sopenharmony_ci 0xb59b0dde, 5691b8021494Sopenharmony_ci 0xbcf04e6f, 5692b8021494Sopenharmony_ci 0xa7fa54a1, 5693b8021494Sopenharmony_ci 0xaed81dfc, 5694b8021494Sopenharmony_ci 0xdc7ffb07, 5695b8021494Sopenharmony_ci }; 5696b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 5697b8021494Sopenharmony_ci } 5698b8021494Sopenharmony_ci} 5699b8021494Sopenharmony_ci 5700b8021494Sopenharmony_ciTEST_SVE(sve2_bitwise_ternary) { 5701b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 5702b8021494Sopenharmony_ci CPUFeatures::kSVE2, 5703b8021494Sopenharmony_ci CPUFeatures::kNEON, 5704b8021494Sopenharmony_ci CPUFeatures::kCRC32); 5705b8021494Sopenharmony_ci START(); 5706b8021494Sopenharmony_ci 5707b8021494Sopenharmony_ci SetInitialMachineState(&masm); 5708b8021494Sopenharmony_ci // state = 0xe2bd2480 5709b8021494Sopenharmony_ci 5710b8021494Sopenharmony_ci { 5711b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 5712b8021494Sopenharmony_ci __ dci(0x04793f99); // bsl1n z25.d, z25.d, z25.d, z28.d 5713b8021494Sopenharmony_ci // vl128 state = 0x70294e62 5714b8021494Sopenharmony_ci __ dci(0x04b93f9b); // bsl2n z27.d, z27.d, z25.d, z28.d 5715b8021494Sopenharmony_ci // vl128 state = 0x0a3f0dc1 5716b8021494Sopenharmony_ci __ dci(0x04b93f93); // bsl2n z19.d, z19.d, z25.d, z28.d 5717b8021494Sopenharmony_ci // vl128 state = 0x46500e35 5718b8021494Sopenharmony_ci __ dci(0x04b93dbb); // bsl2n z27.d, z27.d, z25.d, z13.d 5719b8021494Sopenharmony_ci // vl128 state = 0x25bdcc83 5720b8021494Sopenharmony_ci __ dci(0x04b53db9); // bsl2n z25.d, z25.d, z21.d, z13.d 5721b8021494Sopenharmony_ci // vl128 state = 0x6d33b943 5722b8021494Sopenharmony_ci __ dci(0x04bd3d29); // bsl2n z9.d, z9.d, z29.d, z9.d 5723b8021494Sopenharmony_ci // vl128 state = 0xa218e11a 5724b8021494Sopenharmony_ci __ dci(0x04ad3d0d); // bsl2n z13.d, z13.d, z13.d, z8.d 5725b8021494Sopenharmony_ci // vl128 state = 0xc5e2f5a2 5726b8021494Sopenharmony_ci __ dci(0x04a53d4f); // bsl2n z15.d, z15.d, z5.d, z10.d 5727b8021494Sopenharmony_ci // vl128 state = 0x519e4735 5728b8021494Sopenharmony_ci __ dci(0x04653d47); // bsl1n z7.d, z7.d, z5.d, z10.d 5729b8021494Sopenharmony_ci // vl128 state = 0x132f7ce6 5730b8021494Sopenharmony_ci __ dci(0x04613dc6); // bsl1n z6.d, z6.d, z1.d, z14.d 5731b8021494Sopenharmony_ci // vl128 state = 0x91bcf19b 5732b8021494Sopenharmony_ci __ dci(0x04673dc7); // bsl1n z7.d, z7.d, z7.d, z14.d 5733b8021494Sopenharmony_ci // vl128 state = 0x3bd0ba20 5734b8021494Sopenharmony_ci __ dci(0x04673dc5); // bsl1n z5.d, z5.d, z7.d, z14.d 5735b8021494Sopenharmony_ci // vl128 state = 0xbf3b39fa 5736b8021494Sopenharmony_ci __ dci(0x04e73cc1); // nbsl z1.d, z1.d, z7.d, z6.d 5737b8021494Sopenharmony_ci // vl128 state = 0xd304b643 5738b8021494Sopenharmony_ci __ dci(0x04773cc5); // bsl1n z5.d, z5.d, z23.d, z6.d 5739b8021494Sopenharmony_ci // vl128 state = 0xdd6cd3ce 5740b8021494Sopenharmony_ci __ dci(0x04773ac1); // bcax z1.d, z1.d, z23.d, z22.d 5741b8021494Sopenharmony_ci // vl128 state = 0x3f456acf 5742b8021494Sopenharmony_ci __ dci(0x04773ac3); // bcax z3.d, z3.d, z23.d, z22.d 5743b8021494Sopenharmony_ci // vl128 state = 0xbe117f80 5744b8021494Sopenharmony_ci __ dci(0x047739c7); // bcax z7.d, z7.d, z23.d, z14.d 5745b8021494Sopenharmony_ci // vl128 state = 0xd3cd3dcd 5746b8021494Sopenharmony_ci __ dci(0x047439c5); // bcax z5.d, z5.d, z20.d, z14.d 5747b8021494Sopenharmony_ci // vl128 state = 0xee4f636d 5748b8021494Sopenharmony_ci __ dci(0x04743841); // bcax z1.d, z1.d, z20.d, z2.d 5749b8021494Sopenharmony_ci // vl128 state = 0xf21b00a1 5750b8021494Sopenharmony_ci __ dci(0x04753811); // bcax z17.d, z17.d, z21.d, z0.d 5751b8021494Sopenharmony_ci // vl128 state = 0x597ab14d 5752b8021494Sopenharmony_ci __ dci(0x04753815); // bcax z21.d, z21.d, z21.d, z0.d 5753b8021494Sopenharmony_ci // vl128 state = 0xf5d56322 5754b8021494Sopenharmony_ci __ dci(0x04713917); // bcax z23.d, z23.d, z17.d, z8.d 5755b8021494Sopenharmony_ci // vl128 state = 0x17f3cedf 5756b8021494Sopenharmony_ci __ dci(0x04793987); // bcax z7.d, z7.d, z25.d, z12.d 5757b8021494Sopenharmony_ci // vl128 state = 0x7492c4e5 5758b8021494Sopenharmony_ci __ dci(0x04693885); // bcax z5.d, z5.d, z9.d, z4.d 5759b8021494Sopenharmony_ci // vl128 state = 0xb796548c 5760b8021494Sopenharmony_ci __ dci(0x046838d5); // bcax z21.d, z21.d, z8.d, z6.d 5761b8021494Sopenharmony_ci // vl128 state = 0xf4e12422 5762b8021494Sopenharmony_ci __ dci(0x046838d4); // bcax z20.d, z20.d, z8.d, z6.d 5763b8021494Sopenharmony_ci // vl128 state = 0x16187a4c 5764b8021494Sopenharmony_ci __ dci(0x043838d6); // eor3 z22.d, z22.d, z24.d, z6.d 5765b8021494Sopenharmony_ci // vl128 state = 0xd95e6713 5766b8021494Sopenharmony_ci __ dci(0x043c39de); // eor3 z30.d, z30.d, z28.d, z14.d 5767b8021494Sopenharmony_ci // vl128 state = 0xb8322807 5768b8021494Sopenharmony_ci __ dci(0x047c38ce); // bcax z14.d, z14.d, z28.d, z6.d 5769b8021494Sopenharmony_ci // vl128 state = 0x6871619d 5770b8021494Sopenharmony_ci __ dci(0x047c38cf); // bcax z15.d, z15.d, z28.d, z6.d 5771b8021494Sopenharmony_ci // vl128 state = 0x57c5a4af 5772b8021494Sopenharmony_ci __ dci(0x043c384e); // eor3 z14.d, z14.d, z28.d, z2.d 5773b8021494Sopenharmony_ci // vl128 state = 0x1a62efdf 5774b8021494Sopenharmony_ci __ dci(0x0474385e); // bcax z30.d, z30.d, z20.d, z2.d 5775b8021494Sopenharmony_ci // vl128 state = 0xc9d1ea1e 5776b8021494Sopenharmony_ci __ dci(0x047c3a4e); // bcax z14.d, z14.d, z28.d, z18.d 5777b8021494Sopenharmony_ci // vl128 state = 0xd5ced43e 5778b8021494Sopenharmony_ci __ dci(0x047c3c4f); // bsl1n z15.d, z15.d, z28.d, z2.d 5779b8021494Sopenharmony_ci // vl128 state = 0x79f22e16 5780b8021494Sopenharmony_ci __ dci(0x047d3d4b); // bsl1n z11.d, z11.d, z29.d, z10.d 5781b8021494Sopenharmony_ci // vl128 state = 0xc4ee5d6e 5782b8021494Sopenharmony_ci __ dci(0x04793c49); // bsl1n z9.d, z9.d, z25.d, z2.d 5783b8021494Sopenharmony_ci // vl128 state = 0xea11e840 5784b8021494Sopenharmony_ci __ dci(0x04793c99); // bsl1n z25.d, z25.d, z25.d, z4.d 5785b8021494Sopenharmony_ci // vl128 state = 0x95221bc2 5786b8021494Sopenharmony_ci __ dci(0x04613c91); // bsl1n z17.d, z17.d, z1.d, z4.d 5787b8021494Sopenharmony_ci // vl128 state = 0xa40acfbe 5788b8021494Sopenharmony_ci __ dci(0x04233c90); // bsl z16.d, z16.d, z3.d, z4.d 5789b8021494Sopenharmony_ci // vl128 state = 0x8d3ef22f 5790b8021494Sopenharmony_ci __ dci(0x04233c80); // bsl z0.d, z0.d, z3.d, z4.d 5791b8021494Sopenharmony_ci // vl128 state = 0xd07d1bb2 5792b8021494Sopenharmony_ci __ dci(0x04223ca4); // bsl z4.d, z4.d, z2.d, z5.d 5793b8021494Sopenharmony_ci // vl128 state = 0xa2c4169c 5794b8021494Sopenharmony_ci __ dci(0x04223ca5); // bsl z5.d, z5.d, z2.d, z5.d 5795b8021494Sopenharmony_ci // vl128 state = 0x3c6415e5 5796b8021494Sopenharmony_ci __ dci(0x04a03ca1); // bsl2n z1.d, z1.d, z0.d, z5.d 5797b8021494Sopenharmony_ci // vl128 state = 0x55b93add 5798b8021494Sopenharmony_ci __ dci(0x04a03cb1); // bsl2n z17.d, z17.d, z0.d, z5.d 5799b8021494Sopenharmony_ci // vl128 state = 0x9b86e5b3 5800b8021494Sopenharmony_ci __ dci(0x04a13cf9); // bsl2n z25.d, z25.d, z1.d, z7.d 5801b8021494Sopenharmony_ci // vl128 state = 0xdd310e8f 5802b8021494Sopenharmony_ci __ dci(0x04a13cfd); // bsl2n z29.d, z29.d, z1.d, z7.d 5803b8021494Sopenharmony_ci // vl128 state = 0xae66fb44 5804b8021494Sopenharmony_ci __ dci(0x04a13ced); // bsl2n z13.d, z13.d, z1.d, z7.d 5805b8021494Sopenharmony_ci // vl128 state = 0xc69dd926 5806b8021494Sopenharmony_ci __ dci(0x04b93ce9); // bsl2n z9.d, z9.d, z25.d, z7.d 5807b8021494Sopenharmony_ci // vl128 state = 0x15592b37 5808b8021494Sopenharmony_ci __ dci(0x04b93dcb); // bsl2n z11.d, z11.d, z25.d, z14.d 5809b8021494Sopenharmony_ci // vl128 state = 0xbfcda4d3 5810b8021494Sopenharmony_ci __ dci(0x04b83d4f); // bsl2n z15.d, z15.d, z24.d, z10.d 5811b8021494Sopenharmony_ci // vl128 state = 0xaef1e0b6 5812b8021494Sopenharmony_ci } 5813b8021494Sopenharmony_ci 5814b8021494Sopenharmony_ci uint32_t state; 5815b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 5816b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 5817b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 5818b8021494Sopenharmony_ci 5819b8021494Sopenharmony_ci END(); 5820b8021494Sopenharmony_ci if (CAN_RUN()) { 5821b8021494Sopenharmony_ci RUN(); 5822b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 5823b8021494Sopenharmony_ci 0xaef1e0b6, 5824b8021494Sopenharmony_ci 0xc9b3303f, 5825b8021494Sopenharmony_ci 0xc547c948, 5826b8021494Sopenharmony_ci 0x0fc817f7, 5827b8021494Sopenharmony_ci 0x22d2eab3, 5828b8021494Sopenharmony_ci 0x225b3ecd, 5829b8021494Sopenharmony_ci 0xf7a34a06, 5830b8021494Sopenharmony_ci 0xa07e68ed, 5831b8021494Sopenharmony_ci 0xdba0f9fa, 5832b8021494Sopenharmony_ci 0x64199691, 5833b8021494Sopenharmony_ci 0xa650bfa3, 5834b8021494Sopenharmony_ci 0xc6bfeab9, 5835b8021494Sopenharmony_ci 0x7efe63c4, 5836b8021494Sopenharmony_ci 0x66e4139c, 5837b8021494Sopenharmony_ci 0xc580dcf5, 5838b8021494Sopenharmony_ci 0x95687693, 5839b8021494Sopenharmony_ci }; 5840b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 5841b8021494Sopenharmony_ci } 5842b8021494Sopenharmony_ci} 5843b8021494Sopenharmony_ci 5844b8021494Sopenharmony_ciTEST_SVE(sve2_while) { 5845b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 5846b8021494Sopenharmony_ci CPUFeatures::kSVE2, 5847b8021494Sopenharmony_ci CPUFeatures::kNEON, 5848b8021494Sopenharmony_ci CPUFeatures::kCRC32); 5849b8021494Sopenharmony_ci START(); 5850b8021494Sopenharmony_ci 5851b8021494Sopenharmony_ci SetInitialMachineState(&masm); 5852b8021494Sopenharmony_ci // state = 0xe2bd2480 5853b8021494Sopenharmony_ci 5854b8021494Sopenharmony_ci { 5855b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 5856b8021494Sopenharmony_ci __ dci(0x257109e3); // whilehs p3.h, w15, w17 5857b8021494Sopenharmony_ci // vl128 state = 0x4568cc4c 5858b8021494Sopenharmony_ci __ dci(0x257709f3); // whilehi p3.h, w15, w23 5859b8021494Sopenharmony_ci // vl128 state = 0xf148a8ac 5860b8021494Sopenharmony_ci __ dci(0x25f509f7); // whilehi p7.d, w15, w21 5861b8021494Sopenharmony_ci // vl128 state = 0x2fe3dcb9 5862b8021494Sopenharmony_ci __ dci(0x257508f5); // whilehi p5.h, w7, w21 5863b8021494Sopenharmony_ci // vl128 state = 0x88429dee 5864b8021494Sopenharmony_ci __ dci(0x257100f1); // whilegt p1.h, w7, w17 5865b8021494Sopenharmony_ci // vl128 state = 0x5a3b89ec 5866b8021494Sopenharmony_ci __ dci(0x253108f0); // whilehi p0.b, w7, w17 5867b8021494Sopenharmony_ci // vl128 state = 0x73276c52 5868b8021494Sopenharmony_ci __ dci(0x253108f1); // whilehi p1.b, w7, w17 5869b8021494Sopenharmony_ci // vl128 state = 0xa278d7f0 5870b8021494Sopenharmony_ci __ dci(0x257508f9); // whilehi p9.h, w7, w21 5871b8021494Sopenharmony_ci // vl128 state = 0xa438aefc 5872b8021494Sopenharmony_ci __ dci(0x25750858); // whilehi p8.h, w2, w21 5873b8021494Sopenharmony_ci // vl128 state = 0x33e13c17 5874b8021494Sopenharmony_ci __ dci(0x25770a50); // whilehi p0.h, w18, w23 5875b8021494Sopenharmony_ci // vl128 state = 0x01947abe 5876b8021494Sopenharmony_ci __ dci(0x25751a52); // whilehi p2.h, x18, x21 5877b8021494Sopenharmony_ci // vl128 state = 0x2cf410f2 5878b8021494Sopenharmony_ci __ dci(0x25711a7a); // whilehi p10.h, x19, x17 5879b8021494Sopenharmony_ci // vl128 state = 0x4bb6efc1 5880b8021494Sopenharmony_ci __ dci(0x25391a78); // whilehi p8.b, x19, x25 5881b8021494Sopenharmony_ci // vl128 state = 0xec1afdd6 5882b8021494Sopenharmony_ci __ dci(0x25290a70); // whilehi p0.b, w19, w9 5883b8021494Sopenharmony_ci // vl128 state = 0xde6fbb7f 5884b8021494Sopenharmony_ci __ dci(0x25290a78); // whilehi p8.b, w19, w9 5885b8021494Sopenharmony_ci // vl128 state = 0x79c3a968 5886b8021494Sopenharmony_ci __ dci(0x25a90b68); // whilehs p8.s, w27, w9 5887b8021494Sopenharmony_ci // vl128 state = 0x4b32e81a 5888b8021494Sopenharmony_ci __ dci(0x25a903e9); // whilege p9.s, wzr, w9 5889b8021494Sopenharmony_ci // vl128 state = 0x994bfc18 5890b8021494Sopenharmony_ci __ dci(0x25a909ed); // whilehs p13.s, w15, w9 5891b8021494Sopenharmony_ci // vl128 state = 0x6d6e231f 5892b8021494Sopenharmony_ci __ dci(0x25a909ef); // whilehs p15.s, w15, w9 5893b8021494Sopenharmony_ci // vl128 state = 0x41945298 5894b8021494Sopenharmony_ci __ dci(0x25a909eb); // whilehs p11.s, w15, w9 5895b8021494Sopenharmony_ci // vl128 state = 0x659ccb75 5896b8021494Sopenharmony_ci __ dci(0x25b909c9); // whilehs p9.s, w14, w25 5897b8021494Sopenharmony_ci // vl128 state = 0xd078a7ed 5898b8021494Sopenharmony_ci __ dci(0x25bd098d); // whilehs p13.s, w12, w29 5899b8021494Sopenharmony_ci // vl128 state = 0xf6f2d8ae 5900b8021494Sopenharmony_ci __ dci(0x25b90909); // whilehs p9.s, w8, w25 5901b8021494Sopenharmony_ci // vl128 state = 0x248bccac 5902b8021494Sopenharmony_ci __ dci(0x25fb090b); // whilehs p11.d, w8, w27 5903b8021494Sopenharmony_ci // vl128 state = 0x09b0b9cc 5904b8021494Sopenharmony_ci __ dci(0x25fb090a); // whilehs p10.d, w8, w27 5905b8021494Sopenharmony_ci // vl128 state = 0xfa811fef 5906b8021494Sopenharmony_ci __ dci(0x25eb0b02); // whilehs p2.d, w24, w11 5907b8021494Sopenharmony_ci // vl128 state = 0xdcb96f30 5908b8021494Sopenharmony_ci __ dci(0x25eb0bc3); // whilehs p3.d, w30, w11 5909b8021494Sopenharmony_ci // vl128 state = 0xbae01fd2 5910b8021494Sopenharmony_ci __ dci(0x25e30acb); // whilehs p11.d, w22, w3 5911b8021494Sopenharmony_ci // vl128 state = 0xbcfdc2b8 5912b8021494Sopenharmony_ci __ dci(0x25eb08c9); // whilehs p9.d, w6, w11 5913b8021494Sopenharmony_ci // vl128 state = 0xdb60ba22 5914b8021494Sopenharmony_ci __ dci(0x25a308c1); // whilehs p1.s, w6, w3 5915b8021494Sopenharmony_ci // vl128 state = 0xe895df80 5916b8021494Sopenharmony_ci __ dci(0x25a108e5); // whilehs p5.s, w7, w1 5917b8021494Sopenharmony_ci // vl128 state = 0x3aeccb82 5918b8021494Sopenharmony_ci __ dci(0x25a009e4); // whilehs p4.s, w15, w0 5919b8021494Sopenharmony_ci // vl128 state = 0xe6b1b3b3 5920b8021494Sopenharmony_ci __ dci(0x25a009ec); // whilehs p12.s, w15, w0 5921b8021494Sopenharmony_ci // vl128 state = 0xd2e10d82 5922b8021494Sopenharmony_ci __ dci(0x25a019ae); // whilehs p14.s, x13, x0 5923b8021494Sopenharmony_ci // vl128 state = 0x4bf596b8 5924b8021494Sopenharmony_ci __ dci(0x25e018af); // whilehs p15.d, x5, x0 5925b8021494Sopenharmony_ci // vl128 state = 0xb8d27541 5926b8021494Sopenharmony_ci __ dci(0x25e918ad); // whilehs p13.d, x5, x9 5927b8021494Sopenharmony_ci // vl128 state = 0x01b6f92f 5928b8021494Sopenharmony_ci __ dci(0x25eb188c); // whilehs p12.d, x4, x11 5929b8021494Sopenharmony_ci // vl128 state = 0xd3cfed2d 5930b8021494Sopenharmony_ci __ dci(0x25eb188e); // whilehs p14.d, x4, x11 5931b8021494Sopenharmony_ci // vl128 state = 0x9947e07e 5932b8021494Sopenharmony_ci __ dci(0x25e21886); // whilehs p6.d, x4, x2 5933b8021494Sopenharmony_ci // vl128 state = 0xd9995e11 5934b8021494Sopenharmony_ci __ dci(0x25a21084); // whilege p4.s, x4, x2 5935b8021494Sopenharmony_ci // vl128 state = 0xd45d81ed 5936b8021494Sopenharmony_ci __ dci(0x25b31085); // whilege p5.s, x4, x19 5937b8021494Sopenharmony_ci // vl128 state = 0x4d67b543 5938b8021494Sopenharmony_ci __ dci(0x25a3100d); // whilege p13.s, x0, x3 5939b8021494Sopenharmony_ci // vl128 state = 0x00f0526c 5940b8021494Sopenharmony_ci __ dci(0x252b101d); // whilegt p13.b, x0, x11 5941b8021494Sopenharmony_ci // vl128 state = 0x9d176025 5942b8021494Sopenharmony_ci __ dci(0x253b1095); // whilegt p5.b, x4, x27 5943b8021494Sopenharmony_ci // vl128 state = 0xd6544089 5944b8021494Sopenharmony_ci __ dci(0x253b1091); // whilegt p1.b, x4, x27 5945b8021494Sopenharmony_ci // vl128 state = 0x37d83129 5946b8021494Sopenharmony_ci __ dci(0x253f10d5); // whilegt p5.b, x6, xzr 5947b8021494Sopenharmony_ci // vl128 state = 0x8e121615 5948b8021494Sopenharmony_ci __ dci(0x252f11d4); // whilegt p4.b, x14, x15 5949b8021494Sopenharmony_ci // vl128 state = 0x83d6c9e9 5950b8021494Sopenharmony_ci __ dci(0x25af01d5); // whilegt p5.s, w14, w15 5951b8021494Sopenharmony_ci // vl128 state = 0xe865fad7 5952b8021494Sopenharmony_ci __ dci(0x25eb01c5); // whilege p5.d, w14, w11 5953b8021494Sopenharmony_ci // vl128 state = 0x5eaf208e 5954b8021494Sopenharmony_ci __ dci(0x25fb0144); // whilege p4.d, w10, w27 5955b8021494Sopenharmony_ci // vl128 state = 0x8cd6348c 5956b8021494Sopenharmony_ci } 5957b8021494Sopenharmony_ci 5958b8021494Sopenharmony_ci uint32_t state; 5959b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 5960b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 5961b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 5962b8021494Sopenharmony_ci 5963b8021494Sopenharmony_ci END(); 5964b8021494Sopenharmony_ci if (CAN_RUN()) { 5965b8021494Sopenharmony_ci RUN(); 5966b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 5967b8021494Sopenharmony_ci 0x8cd6348c, 5968b8021494Sopenharmony_ci 0x42a1f9b4, 5969b8021494Sopenharmony_ci 0x13fc2001, 5970b8021494Sopenharmony_ci 0x492cb2ac, 5971b8021494Sopenharmony_ci 0xa67cfb65, 5972b8021494Sopenharmony_ci 0x80d4639f, 5973b8021494Sopenharmony_ci 0xfa388a09, 5974b8021494Sopenharmony_ci 0x8c7ad8d9, 5975b8021494Sopenharmony_ci 0x299c5bfe, 5976b8021494Sopenharmony_ci 0x9183808a, 5977b8021494Sopenharmony_ci 0x3fc14d86, 5978b8021494Sopenharmony_ci 0x7cc08a05, 5979b8021494Sopenharmony_ci 0x9c85cd48, 5980b8021494Sopenharmony_ci 0xd06e8299, 5981b8021494Sopenharmony_ci 0x6a107152, 5982b8021494Sopenharmony_ci 0x81d99d7c, 5983b8021494Sopenharmony_ci }; 5984b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 5985b8021494Sopenharmony_ci } 5986b8021494Sopenharmony_ci} 5987b8021494Sopenharmony_ci 5988b8021494Sopenharmony_ciTEST_SVE(sve2_cdot_index) { 5989b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 5990b8021494Sopenharmony_ci CPUFeatures::kSVE2, 5991b8021494Sopenharmony_ci CPUFeatures::kNEON, 5992b8021494Sopenharmony_ci CPUFeatures::kCRC32); 5993b8021494Sopenharmony_ci START(); 5994b8021494Sopenharmony_ci 5995b8021494Sopenharmony_ci SetInitialMachineState(&masm); 5996b8021494Sopenharmony_ci // state = 0xe2bd2480 5997b8021494Sopenharmony_ci 5998b8021494Sopenharmony_ci { 5999b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 6000b8021494Sopenharmony_ci __ dci(0x44bb4ef6); // cdot z22.s, z23.b, z3.b[3], #270 6001b8021494Sopenharmony_ci // vl128 state = 0x452d1d6e 6002b8021494Sopenharmony_ci __ dci(0x44b94ff7); // cdot z23.s, z31.b, z1.b[3], #270 6003b8021494Sopenharmony_ci // vl128 state = 0x546c9569 6004b8021494Sopenharmony_ci __ dci(0x44b94dd5); // cdot z21.s, z14.b, z1.b[3], #270 6005b8021494Sopenharmony_ci // vl128 state = 0xa2abf834 6006b8021494Sopenharmony_ci __ dci(0x44bd45d7); // cdot z23.s, z14.b, z5.b[3], #90 6007b8021494Sopenharmony_ci // vl128 state = 0xba77ed64 6008b8021494Sopenharmony_ci __ dci(0x44fc45df); // cdot z31.d, z14.h, z12.h[1], #90 6009b8021494Sopenharmony_ci // vl128 state = 0xe78163f2 6010b8021494Sopenharmony_ci __ dci(0x44f441db); // cdot z27.d, z14.h, z4.h[1], #0 6011b8021494Sopenharmony_ci // vl128 state = 0xca3b116d 6012b8021494Sopenharmony_ci __ dci(0x44f44dd3); // cdot z19.d, z14.h, z4.h[1], #270 6013b8021494Sopenharmony_ci // vl128 state = 0x57ba3771 6014b8021494Sopenharmony_ci __ dci(0x44b44d83); // cdot z3.s, z12.b, z4.b[2], #270 6015b8021494Sopenharmony_ci // vl128 state = 0x4edccb88 6016b8021494Sopenharmony_ci __ dci(0x44ac4d82); // cdot z2.s, z12.b, z4.b[1], #270 6017b8021494Sopenharmony_ci // vl128 state = 0xc9543499 6018b8021494Sopenharmony_ci __ dci(0x44a84f8a); // cdot z10.s, z28.b, z0.b[1], #270 6019b8021494Sopenharmony_ci // vl128 state = 0x9d8fe439 6020b8021494Sopenharmony_ci __ dci(0x44a84d08); // cdot z8.s, z8.b, z0.b[1], #270 6021b8021494Sopenharmony_ci // vl128 state = 0x3c1bf0cc 6022b8021494Sopenharmony_ci __ dci(0x44ba4d09); // cdot z9.s, z8.b, z2.b[3], #270 6023b8021494Sopenharmony_ci // vl128 state = 0x983716f1 6024b8021494Sopenharmony_ci __ dci(0x44ea4d0d); // cdot z13.d, z8.h, z10.h[0], #270 6025b8021494Sopenharmony_ci // vl128 state = 0x2df96300 6026b8021494Sopenharmony_ci __ dci(0x44eb491d); // cdot z29.d, z8.h, z11.h[0], #180 6027b8021494Sopenharmony_ci // vl128 state = 0xc23edde3 6028b8021494Sopenharmony_ci __ dci(0x44e9499f); // cdot z31.d, z12.h, z9.h[0], #180 6029b8021494Sopenharmony_ci // vl128 state = 0xef0ace9d 6030b8021494Sopenharmony_ci __ dci(0x44e84b9d); // cdot z29.d, z28.h, z8.h[0], #180 6031b8021494Sopenharmony_ci // vl128 state = 0x2cce8002 6032b8021494Sopenharmony_ci __ dci(0x44e84b99); // cdot z25.d, z28.h, z8.h[0], #180 6033b8021494Sopenharmony_ci // vl128 state = 0xd07f46a1 6034b8021494Sopenharmony_ci __ dci(0x44f84a9d); // cdot z29.d, z20.h, z8.h[1], #180 6035b8021494Sopenharmony_ci // vl128 state = 0x239831e8 6036b8021494Sopenharmony_ci __ dci(0x44f84a99); // cdot z25.d, z20.h, z8.h[1], #180 6037b8021494Sopenharmony_ci // vl128 state = 0xa110988d 6038b8021494Sopenharmony_ci __ dci(0x44e84a09); // cdot z9.d, z16.h, z8.h[0], #180 6039b8021494Sopenharmony_ci // vl128 state = 0x2b9ef292 6040b8021494Sopenharmony_ci __ dci(0x44e84a19); // cdot z25.d, z16.h, z8.h[0], #180 6041b8021494Sopenharmony_ci // vl128 state = 0x50eeb818 6042b8021494Sopenharmony_ci __ dci(0x44e04b1b); // cdot z27.d, z24.h, z0.h[0], #180 6043b8021494Sopenharmony_ci // vl128 state = 0xc33ce03b 6044b8021494Sopenharmony_ci __ dci(0x44e04a2b); // cdot z11.d, z17.h, z0.h[0], #180 6045b8021494Sopenharmony_ci // vl128 state = 0xe163b5c9 6046b8021494Sopenharmony_ci __ dci(0x44e04b0f); // cdot z15.d, z24.h, z0.h[0], #180 6047b8021494Sopenharmony_ci // vl128 state = 0x052a34eb 6048b8021494Sopenharmony_ci __ dci(0x44e04b1f); // cdot z31.d, z24.h, z0.h[0], #180 6049b8021494Sopenharmony_ci // vl128 state = 0x0660afb4 6050b8021494Sopenharmony_ci __ dci(0x44e84b4f); // cdot z15.d, z26.h, z8.h[0], #180 6051b8021494Sopenharmony_ci // vl128 state = 0x0ae01233 6052b8021494Sopenharmony_ci __ dci(0x44ee4b4e); // cdot z14.d, z26.h, z14.h[0], #180 6053b8021494Sopenharmony_ci // vl128 state = 0xde7bdd15 6054b8021494Sopenharmony_ci __ dci(0x44ae4b7e); // cdot z30.s, z27.b, z6.b[1], #180 6055b8021494Sopenharmony_ci // vl128 state = 0x758973a1 6056b8021494Sopenharmony_ci __ dci(0x44a6497f); // cdot z31.s, z11.b, z6.b[0], #180 6057b8021494Sopenharmony_ci // vl128 state = 0xb3c5df37 6058b8021494Sopenharmony_ci __ dci(0x44a64df7); // cdot z23.s, z15.b, z6.b[0], #270 6059b8021494Sopenharmony_ci // vl128 state = 0xe652f054 6060b8021494Sopenharmony_ci __ dci(0x44a64c73); // cdot z19.s, z3.b, z6.b[0], #270 6061b8021494Sopenharmony_ci // vl128 state = 0xc4b58041 6062b8021494Sopenharmony_ci __ dci(0x44a64de3); // cdot z3.s, z15.b, z6.b[0], #270 6063b8021494Sopenharmony_ci // vl128 state = 0x1239ca90 6064b8021494Sopenharmony_ci __ dci(0x44a749e2); // cdot z2.s, z15.b, z7.b[0], #180 6065b8021494Sopenharmony_ci // vl128 state = 0x4a01cdcb 6066b8021494Sopenharmony_ci __ dci(0x44a740e0); // cdot z0.s, z7.b, z7.b[0], #0 6067b8021494Sopenharmony_ci // vl128 state = 0x604e45cf 6068b8021494Sopenharmony_ci __ dci(0x44a344e2); // cdot z2.s, z7.b, z3.b[0], #90 6069b8021494Sopenharmony_ci // vl128 state = 0x12fe2972 6070b8021494Sopenharmony_ci __ dci(0x44a34ca3); // cdot z3.s, z5.b, z3.b[0], #270 6071b8021494Sopenharmony_ci // vl128 state = 0x78e0bb2e 6072b8021494Sopenharmony_ci __ dci(0x44e14cb3); // cdot z19.d, z5.h, z1.h[0], #270 6073b8021494Sopenharmony_ci // vl128 state = 0xe3a69b46 6074b8021494Sopenharmony_ci __ dci(0x44e14d31); // cdot z17.d, z9.h, z1.h[0], #270 6075b8021494Sopenharmony_ci // vl128 state = 0xe6b58aa4 6076b8021494Sopenharmony_ci __ dci(0x44f14d01); // cdot z1.d, z8.h, z1.h[1], #270 6077b8021494Sopenharmony_ci // vl128 state = 0xffcfb597 6078b8021494Sopenharmony_ci __ dci(0x44f14551); // cdot z17.d, z10.h, z1.h[1], #90 6079b8021494Sopenharmony_ci // vl128 state = 0x2745934b 6080b8021494Sopenharmony_ci __ dci(0x44f345d5); // cdot z21.d, z14.h, z3.h[1], #90 6081b8021494Sopenharmony_ci // vl128 state = 0xa38b5571 6082b8021494Sopenharmony_ci __ dci(0x44f34574); // cdot z20.d, z11.h, z3.h[1], #90 6083b8021494Sopenharmony_ci // vl128 state = 0x978afd92 6084b8021494Sopenharmony_ci __ dci(0x44f34576); // cdot z22.d, z11.h, z3.h[1], #90 6085b8021494Sopenharmony_ci // vl128 state = 0x9f1b19c9 6086b8021494Sopenharmony_ci __ dci(0x44f34f77); // cdot z23.d, z27.h, z3.h[1], #270 6087b8021494Sopenharmony_ci // vl128 state = 0x61a31d64 6088b8021494Sopenharmony_ci __ dci(0x44f24f5f); // cdot z31.d, z26.h, z2.h[1], #270 6089b8021494Sopenharmony_ci // vl128 state = 0x1e71023e 6090b8021494Sopenharmony_ci __ dci(0x44fa4fcf); // cdot z15.d, z30.h, z10.h[1], #270 6091b8021494Sopenharmony_ci // vl128 state = 0xdbe5ffb3 6092b8021494Sopenharmony_ci __ dci(0x44ba4f4e); // cdot z14.s, z26.b, z2.b[3], #270 6093b8021494Sopenharmony_ci // vl128 state = 0x51390e81 6094b8021494Sopenharmony_ci __ dci(0x44ba470c); // cdot z12.s, z24.b, z2.b[3], #90 6095b8021494Sopenharmony_ci // vl128 state = 0x59ad5198 6096b8021494Sopenharmony_ci __ dci(0x44b2479c); // cdot z28.s, z28.b, z2.b[2], #90 6097b8021494Sopenharmony_ci // vl128 state = 0xe997de49 6098b8021494Sopenharmony_ci __ dci(0x44b24fbd); // cdot z29.s, z29.b, z2.b[2], #270 6099b8021494Sopenharmony_ci // vl128 state = 0x5533cefa 6100b8021494Sopenharmony_ci } 6101b8021494Sopenharmony_ci 6102b8021494Sopenharmony_ci uint32_t state; 6103b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 6104b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 6105b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 6106b8021494Sopenharmony_ci 6107b8021494Sopenharmony_ci END(); 6108b8021494Sopenharmony_ci if (CAN_RUN()) { 6109b8021494Sopenharmony_ci RUN(); 6110b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 6111b8021494Sopenharmony_ci 0x5533cefa, 6112b8021494Sopenharmony_ci 0x1462a298, 6113b8021494Sopenharmony_ci 0x1acb4ead, 6114b8021494Sopenharmony_ci 0xeb05ddf0, 6115b8021494Sopenharmony_ci 0x23fe8c86, 6116b8021494Sopenharmony_ci 0xbb1e9f8c, 6117b8021494Sopenharmony_ci 0x4a933f43, 6118b8021494Sopenharmony_ci 0x4cd64b55, 6119b8021494Sopenharmony_ci 0x84a4b8b7, 6120b8021494Sopenharmony_ci 0x52019619, 6121b8021494Sopenharmony_ci 0x4442432b, 6122b8021494Sopenharmony_ci 0x9b353ce8, 6123b8021494Sopenharmony_ci 0x333c9eef, 6124b8021494Sopenharmony_ci 0x291eac87, 6125b8021494Sopenharmony_ci 0x110f7371, 6126b8021494Sopenharmony_ci 0x009b25cb, 6127b8021494Sopenharmony_ci }; 6128b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 6129b8021494Sopenharmony_ci } 6130b8021494Sopenharmony_ci} 6131b8021494Sopenharmony_ci 6132b8021494Sopenharmony_ciTEST_SVE(sve2_splice) { 6133b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 6134b8021494Sopenharmony_ci CPUFeatures::kSVE2, 6135b8021494Sopenharmony_ci CPUFeatures::kNEON, 6136b8021494Sopenharmony_ci CPUFeatures::kCRC32); 6137b8021494Sopenharmony_ci START(); 6138b8021494Sopenharmony_ci 6139b8021494Sopenharmony_ci SetInitialMachineState(&masm); 6140b8021494Sopenharmony_ci // state = 0xe2bd2480 6141b8021494Sopenharmony_ci 6142b8021494Sopenharmony_ci { 6143b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 6144b8021494Sopenharmony_ci __ dci(0x05ed89a7); // splice z7.d, p2, {z13.d, z14.d} 6145b8021494Sopenharmony_ci // vl128 state = 0x6acff994 6146b8021494Sopenharmony_ci __ dci(0x05ed81e5); // splice z5.d, p0, {z15.d, z16.d} 6147b8021494Sopenharmony_ci // vl128 state = 0x2c8b3e5d 6148b8021494Sopenharmony_ci __ dci(0x05ed8375); // splice z21.d, p0, {z27.d, z28.d} 6149b8021494Sopenharmony_ci // vl128 state = 0x2588e208 6150b8021494Sopenharmony_ci __ dci(0x05ed9174); // splice z20.d, p4, {z11.d, z12.d} 6151b8021494Sopenharmony_ci // vl128 state = 0x4d6fa6b3 6152b8021494Sopenharmony_ci __ dci(0x056d91f6); // splice z22.h, p4, {z15.h, z16.h} 6153b8021494Sopenharmony_ci // vl128 state = 0x9f00a308 6154b8021494Sopenharmony_ci __ dci(0x056d92f2); // splice z18.h, p4, {z23.h, z24.h} 6155b8021494Sopenharmony_ci // vl128 state = 0x5479cc74 6156b8021494Sopenharmony_ci __ dci(0x056d96a2); // splice z2.h, p5, {z21.h, z22.h} 6157b8021494Sopenharmony_ci // vl128 state = 0xca7a6a63 6158b8021494Sopenharmony_ci __ dci(0x056d9fa6); // splice z6.h, p7, {z29.h, z30.h} 6159b8021494Sopenharmony_ci // vl128 state = 0x007fc934 6160b8021494Sopenharmony_ci __ dci(0x056d9be4); // splice z4.h, p6, {z31.h, z0.h} 6161b8021494Sopenharmony_ci // vl128 state = 0x8186741b 6162b8021494Sopenharmony_ci __ dci(0x056d97ec); // splice z12.h, p5, {z31.h, z0.h} 6163b8021494Sopenharmony_ci // vl128 state = 0x26ab76b9 6164b8021494Sopenharmony_ci __ dci(0x056d979c); // splice z28.h, p5, {z28.h, z29.h} 6165b8021494Sopenharmony_ci // vl128 state = 0x933201f4 6166b8021494Sopenharmony_ci __ dci(0x056d9794); // splice z20.h, p5, {z28.h, z29.h} 6167b8021494Sopenharmony_ci // vl128 state = 0x42cf6784 6168b8021494Sopenharmony_ci __ dci(0x052d9f96); // splice z22.b, p7, {z28.b, z29.b} 6169b8021494Sopenharmony_ci // vl128 state = 0x0838e776 6170b8021494Sopenharmony_ci __ dci(0x056d8f9e); // splice z30.h, p3, {z28.h, z29.h} 6171b8021494Sopenharmony_ci // vl128 state = 0x89637e78 6172b8021494Sopenharmony_ci __ dci(0x056d9fd6); // splice z22.h, p7, {z30.h, z31.h} 6173b8021494Sopenharmony_ci // vl128 state = 0xb94dbb49 6174b8021494Sopenharmony_ci __ dci(0x056d8dd7); // splice z23.h, p3, {z14.h, z15.h} 6175b8021494Sopenharmony_ci // vl128 state = 0x260f8127 6176b8021494Sopenharmony_ci __ dci(0x05ad8ddf); // splice z31.s, p3, {z14.s, z15.s} 6177b8021494Sopenharmony_ci // vl128 state = 0x16257a12 6178b8021494Sopenharmony_ci __ dci(0x05ad8ddd); // splice z29.s, p3, {z14.s, z15.s} 6179b8021494Sopenharmony_ci // vl128 state = 0x803d0766 6180b8021494Sopenharmony_ci __ dci(0x05ad8d7c); // splice z28.s, p3, {z11.s, z12.s} 6181b8021494Sopenharmony_ci // vl128 state = 0xcc405331 6182b8021494Sopenharmony_ci __ dci(0x05ad8d74); // splice z20.s, p3, {z11.s, z12.s} 6183b8021494Sopenharmony_ci // vl128 state = 0x0ed25e4c 6184b8021494Sopenharmony_ci __ dci(0x05ad8d64); // splice z4.s, p3, {z11.s, z12.s} 6185b8021494Sopenharmony_ci // vl128 state = 0x167daf8b 6186b8021494Sopenharmony_ci __ dci(0x05ed8c6c); // splice z12.d, p3, {z3.d, z4.d} 6187b8021494Sopenharmony_ci // vl128 state = 0x435f3bb9 6188b8021494Sopenharmony_ci __ dci(0x05ed8cad); // splice z13.d, p3, {z5.d, z6.d} 6189b8021494Sopenharmony_ci // vl128 state = 0xe49df619 6190b8021494Sopenharmony_ci __ dci(0x056d8dbd); // splice z29.h, p3, {z13.h, z14.h} 6191b8021494Sopenharmony_ci // vl128 state = 0x1f54e928 6192b8021494Sopenharmony_ci __ dci(0x056d8f2d); // splice z13.h, p3, {z25.h, z26.h} 6193b8021494Sopenharmony_ci // vl128 state = 0x24adbe77 6194b8021494Sopenharmony_ci __ dci(0x056d8f9d); // splice z29.h, p3, {z28.h, z29.h} 6195b8021494Sopenharmony_ci // vl128 state = 0xcc2ec3e6 6196b8021494Sopenharmony_ci __ dci(0x056d8f95); // splice z21.h, p3, {z28.h, z29.h} 6197b8021494Sopenharmony_ci // vl128 state = 0xb71c64f7 6198b8021494Sopenharmony_ci __ dci(0x056d8f34); // splice z20.h, p3, {z25.h, z26.h} 6199b8021494Sopenharmony_ci // vl128 state = 0xb32756f0 6200b8021494Sopenharmony_ci __ dci(0x05ed8f64); // splice z4.d, p3, {z27.d, z28.d} 6201b8021494Sopenharmony_ci // vl128 state = 0x3f7d1f13 6202b8021494Sopenharmony_ci __ dci(0x05ad8e60); // splice z0.s, p3, {z19.s, z20.s} 6203b8021494Sopenharmony_ci // vl128 state = 0x9a7ffbde 6204b8021494Sopenharmony_ci __ dci(0x052d8e50); // splice z16.b, p3, {z18.b, z19.b} 6205b8021494Sopenharmony_ci // vl128 state = 0x5c82ed17 6206b8021494Sopenharmony_ci __ dci(0x052d9652); // splice z18.b, p5, {z18.b, z19.b} 6207b8021494Sopenharmony_ci // vl128 state = 0x28b9cd60 6208b8021494Sopenharmony_ci __ dci(0x052d9ed0); // splice z16.b, p7, {z22.b, z23.b} 6209b8021494Sopenharmony_ci // vl128 state = 0xab0238ba 6210b8021494Sopenharmony_ci __ dci(0x052d9ed4); // splice z20.b, p7, {z22.b, z23.b} 6211b8021494Sopenharmony_ci // vl128 state = 0x9f0e0ef9 6212b8021494Sopenharmony_ci __ dci(0x056d9cc4); // splice z4.h, p7, {z6.h, z7.h} 6213b8021494Sopenharmony_ci // vl128 state = 0xec31d5e7 6214b8021494Sopenharmony_ci __ dci(0x056d98e6); // splice z6.h, p6, {z7.h, z8.h} 6215b8021494Sopenharmony_ci // vl128 state = 0xbc9c0048 6216b8021494Sopenharmony_ci __ dci(0x056d9ee4); // splice z4.h, p7, {z23.h, z24.h} 6217b8021494Sopenharmony_ci // vl128 state = 0xe2e9c9a3 6218b8021494Sopenharmony_ci __ dci(0x056d9ef4); // splice z20.h, p7, {z23.h, z24.h} 6219b8021494Sopenharmony_ci // vl128 state = 0x60ffa98a 6220b8021494Sopenharmony_ci __ dci(0x056d9ab6); // splice z22.h, p6, {z21.h, z22.h} 6221b8021494Sopenharmony_ci // vl128 state = 0xae70ed0f 6222b8021494Sopenharmony_ci __ dci(0x056d9294); // splice z20.h, p4, {z20.h, z21.h} 6223b8021494Sopenharmony_ci // vl128 state = 0x5736c563 6224b8021494Sopenharmony_ci __ dci(0x056d9284); // splice z4.h, p4, {z20.h, z21.h} 6225b8021494Sopenharmony_ci // vl128 state = 0xf31dd2d9 6226b8021494Sopenharmony_ci __ dci(0x052d920c); // splice z12.b, p4, {z16.b, z17.b} 6227b8021494Sopenharmony_ci // vl128 state = 0x04502fea 6228b8021494Sopenharmony_ci __ dci(0x052d921c); // splice z28.b, p4, {z16.b, z17.b} 6229b8021494Sopenharmony_ci // vl128 state = 0x852f98b1 6230b8021494Sopenharmony_ci __ dci(0x052d9094); // splice z20.b, p4, {z4.b, z5.b} 6231b8021494Sopenharmony_ci // vl128 state = 0xb40c5931 6232b8021494Sopenharmony_ci __ dci(0x052d90f6); // splice z22.b, p4, {z7.b, z8.b} 6233b8021494Sopenharmony_ci // vl128 state = 0x64d6138d 6234b8021494Sopenharmony_ci __ dci(0x052d88e6); // splice z6.b, p2, {z7.b, z8.b} 6235b8021494Sopenharmony_ci // vl128 state = 0x51bb6564 6236b8021494Sopenharmony_ci __ dci(0x052d88e4); // splice z4.b, p2, {z7.b, z8.b} 6237b8021494Sopenharmony_ci // vl128 state = 0x7ed599b0 6238b8021494Sopenharmony_ci __ dci(0x05ad8865); // splice z5.s, p2, {z3.s, z4.s} 6239b8021494Sopenharmony_ci // vl128 state = 0xa201547d 6240b8021494Sopenharmony_ci __ dci(0x05ad9961); // splice z1.s, p6, {z11.s, z12.s} 6241b8021494Sopenharmony_ci // vl128 state = 0x9508f19c 6242b8021494Sopenharmony_ci __ dci(0x05ed9945); // splice z5.d, p6, {z10.d, z11.d} 6243b8021494Sopenharmony_ci // vl128 state = 0x95399cfd 6244b8021494Sopenharmony_ci } 6245b8021494Sopenharmony_ci 6246b8021494Sopenharmony_ci uint32_t state; 6247b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 6248b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 6249b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 6250b8021494Sopenharmony_ci 6251b8021494Sopenharmony_ci END(); 6252b8021494Sopenharmony_ci if (CAN_RUN()) { 6253b8021494Sopenharmony_ci RUN(); 6254b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 6255b8021494Sopenharmony_ci 0x95399cfd, 6256b8021494Sopenharmony_ci 0xa960b01e, 6257b8021494Sopenharmony_ci 0x1fedaa18, 6258b8021494Sopenharmony_ci 0xe2fd3ec3, 6259b8021494Sopenharmony_ci 0x3edc353b, 6260b8021494Sopenharmony_ci 0xd809efd8, 6261b8021494Sopenharmony_ci 0x2a04f527, 6262b8021494Sopenharmony_ci 0xe4b9bb4a, 6263b8021494Sopenharmony_ci 0x72e5ed3e, 6264b8021494Sopenharmony_ci 0x63d6fe93, 6265b8021494Sopenharmony_ci 0xd2ad18fa, 6266b8021494Sopenharmony_ci 0x522fe057, 6267b8021494Sopenharmony_ci 0xc7ba2f7d, 6268b8021494Sopenharmony_ci 0x2dd44bd3, 6269b8021494Sopenharmony_ci 0x68b62ae6, 6270b8021494Sopenharmony_ci 0x06ea6854, 6271b8021494Sopenharmony_ci }; 6272b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 6273b8021494Sopenharmony_ci } 6274b8021494Sopenharmony_ci} 6275b8021494Sopenharmony_ci 6276b8021494Sopenharmony_ciTEST_SVE(sve2_whilerw_whilewr) { 6277b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 6278b8021494Sopenharmony_ci CPUFeatures::kSVE2, 6279b8021494Sopenharmony_ci CPUFeatures::kNEON, 6280b8021494Sopenharmony_ci CPUFeatures::kCRC32); 6281b8021494Sopenharmony_ci START(); 6282b8021494Sopenharmony_ci 6283b8021494Sopenharmony_ci SetInitialMachineState(&masm); 6284b8021494Sopenharmony_ci // state = 0xe2bd2480 6285b8021494Sopenharmony_ci 6286b8021494Sopenharmony_ci { 6287b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 6288b8021494Sopenharmony_ci __ dci(0x25ac3026); // whilewr p6.s, x1, x12 6289b8021494Sopenharmony_ci // vl128 state = 0x91e301ae 6290b8021494Sopenharmony_ci __ dci(0x25ac3024); // whilewr p4.s, x1, x12 6291b8021494Sopenharmony_ci // vl128 state = 0x9203b261 6292b8021494Sopenharmony_ci __ dci(0x25af3020); // whilewr p0.s, x1, x15 6293b8021494Sopenharmony_ci // vl128 state = 0x87505080 6294b8021494Sopenharmony_ci __ dci(0x25ef3222); // whilewr p2.d, x17, x15 6295b8021494Sopenharmony_ci // vl128 state = 0x4ba695cb 6296b8021494Sopenharmony_ci __ dci(0x25eb320a); // whilewr p10.d, x16, x11 6297b8021494Sopenharmony_ci // vl128 state = 0x5909d726 6298b8021494Sopenharmony_ci __ dci(0x25e33308); // whilewr p8.d, x24, x3 6299b8021494Sopenharmony_ci // vl128 state = 0x52766071 6300b8021494Sopenharmony_ci __ dci(0x25ea3309); // whilewr p9.d, x24, x10 6301b8021494Sopenharmony_ci // vl128 state = 0xe906a65a 6302b8021494Sopenharmony_ci __ dci(0x25aa3101); // whilewr p1.s, x8, x10 6303b8021494Sopenharmony_ci // vl128 state = 0xd9d56c58 6304b8021494Sopenharmony_ci __ dci(0x252b3100); // whilewr p0.b, x8, x11 6305b8021494Sopenharmony_ci // vl128 state = 0xcc868eb9 6306b8021494Sopenharmony_ci __ dci(0x252a3008); // whilewr p8.b, x0, x10 6307b8021494Sopenharmony_ci // vl128 state = 0xf78cb912 6308b8021494Sopenharmony_ci __ dci(0x2528304c); // whilewr p12.b, x2, x8 6309b8021494Sopenharmony_ci // vl128 state = 0x5493a6c4 6310b8021494Sopenharmony_ci __ dci(0x25203004); // whilewr p4.b, x0, x0 6311b8021494Sopenharmony_ci // vl128 state = 0xb3d754b6 6312b8021494Sopenharmony_ci __ dci(0x25303105); // whilewr p5.b, x8, x16 6313b8021494Sopenharmony_ci // vl128 state = 0x7fc526df 6314b8021494Sopenharmony_ci __ dci(0x25b4310d); // whilewr p13.s, x8, x20 6315b8021494Sopenharmony_ci // vl128 state = 0x5999edda 6316b8021494Sopenharmony_ci __ dci(0x25ac310c); // whilewr p12.s, x8, x12 6317b8021494Sopenharmony_ci // vl128 state = 0x46a86248 6318b8021494Sopenharmony_ci __ dci(0x25ac310e); // whilewr p14.s, x8, x12 6319b8021494Sopenharmony_ci // vl128 state = 0x0dc5ed70 6320b8021494Sopenharmony_ci __ dci(0x252c330a); // whilewr p10.b, x24, x12 6321b8021494Sopenharmony_ci // vl128 state = 0x453a1aa9 6322b8021494Sopenharmony_ci __ dci(0x252f330b); // whilewr p11.b, x24, x15 6323b8021494Sopenharmony_ci // vl128 state = 0x98fbdcdf 6324b8021494Sopenharmony_ci __ dci(0x256e330f); // whilewr p15.h, x24, x14 6325b8021494Sopenharmony_ci // vl128 state = 0x84699750 6326b8021494Sopenharmony_ci __ dci(0x252e334d); // whilewr p13.b, x26, x14 6327b8021494Sopenharmony_ci // vl128 state = 0x198ea519 6328b8021494Sopenharmony_ci __ dci(0x252e3349); // whilewr p9.b, x26, x14 6329b8021494Sopenharmony_ci // vl128 state = 0xb4956673 6330b8021494Sopenharmony_ci __ dci(0x253e33c1); // whilewr p1.b, x30, x30 6331b8021494Sopenharmony_ci // vl128 state = 0xfd88dd74 6332b8021494Sopenharmony_ci __ dci(0x252e33e3); // whilewr p3.b, xzr, x14 6333b8021494Sopenharmony_ci // vl128 state = 0x68cda9df 6334b8021494Sopenharmony_ci __ dci(0x25ae33cb); // whilewr p11.s, x30, x14 6335b8021494Sopenharmony_ci // vl128 state = 0x9104f644 6336b8021494Sopenharmony_ci __ dci(0x25ae33ca); // whilewr p10.s, x30, x14 6337b8021494Sopenharmony_ci // vl128 state = 0xd9079300 6338b8021494Sopenharmony_ci __ dci(0x25ea33da); // whilerw p10.d, x30, x10 6339b8021494Sopenharmony_ci // vl128 state = 0xd9fb019d 6340b8021494Sopenharmony_ci __ dci(0x25ae33d8); // whilerw p8.s, x30, x14 6341b8021494Sopenharmony_ci // vl128 state = 0x9edf46fa 6342b8021494Sopenharmony_ci __ dci(0x25ae32f9); // whilerw p9.s, x23, x14 6343b8021494Sopenharmony_ci // vl128 state = 0x3b10562f 6344b8021494Sopenharmony_ci __ dci(0x25ee32d8); // whilerw p8.d, x22, x14 6345b8021494Sopenharmony_ci // vl128 state = 0x473e26e3 6346b8021494Sopenharmony_ci __ dci(0x25ec3299); // whilerw p9.d, x20, x12 6347b8021494Sopenharmony_ci // vl128 state = 0x4feaf55c 6348b8021494Sopenharmony_ci __ dci(0x25ec329d); // whilerw p13.d, x20, x12 6349b8021494Sopenharmony_ci // vl128 state = 0x9f9a203a 6350b8021494Sopenharmony_ci __ dci(0x25e8321c); // whilerw p12.d, x16, x8 6351b8021494Sopenharmony_ci // vl128 state = 0xd8f32d11 6352b8021494Sopenharmony_ci __ dci(0x2568301d); // whilerw p13.h, x0, x8 6353b8021494Sopenharmony_ci // vl128 state = 0xf04b6bb8 6354b8021494Sopenharmony_ci __ dci(0x2528320d); // whilewr p13.b, x16, x8 6355b8021494Sopenharmony_ci // vl128 state = 0x0883f877 6356b8021494Sopenharmony_ci __ dci(0x25a8323d); // whilerw p13.s, x17, x8 6357b8021494Sopenharmony_ci // vl128 state = 0x9564ca3e 6358b8021494Sopenharmony_ci __ dci(0x25a8323f); // whilerw p15.s, x17, x8 6359b8021494Sopenharmony_ci // vl128 state = 0xa50cf036 6360b8021494Sopenharmony_ci __ dci(0x25e8303d); // whilerw p13.d, x1, x8 6361b8021494Sopenharmony_ci // vl128 state = 0xe89b1719 6362b8021494Sopenharmony_ci __ dci(0x25e83175); // whilerw p5.d, x11, x8 6363b8021494Sopenharmony_ci // vl128 state = 0xe79bea7c 6364b8021494Sopenharmony_ci __ dci(0x256a3174); // whilerw p4.h, x11, x10 6365b8021494Sopenharmony_ci // vl128 state = 0xc8ca3b74 6366b8021494Sopenharmony_ci __ dci(0x256a317c); // whilerw p12.h, x11, x10 6367b8021494Sopenharmony_ci // vl128 state = 0xc3c88548 6368b8021494Sopenharmony_ci __ dci(0x256a33f8); // whilerw p8.h, xzr, x10 6369b8021494Sopenharmony_ci // vl128 state = 0x8b25acc6 6370b8021494Sopenharmony_ci __ dci(0x256a33f0); // whilerw p0.h, xzr, x10 6371b8021494Sopenharmony_ci // vl128 state = 0x904c0fd1 6372b8021494Sopenharmony_ci __ dci(0x25e833e0); // whilewr p0.d, xzr, x8 6373b8021494Sopenharmony_ci // vl128 state = 0xc893f4c8 6374b8021494Sopenharmony_ci __ dci(0x25ec32e8); // whilewr p8.d, x23, x12 6375b8021494Sopenharmony_ci // vl128 state = 0x807edd46 6376b8021494Sopenharmony_ci __ dci(0x25ed326c); // whilewr p12.d, x19, x13 6377b8021494Sopenharmony_ci // vl128 state = 0x8b7c637a 6378b8021494Sopenharmony_ci __ dci(0x256d32ed); // whilewr p13.h, x23, x13 6379b8021494Sopenharmony_ci // vl128 state = 0xa3c425d3 6380b8021494Sopenharmony_ci __ dci(0x252d30e9); // whilewr p9.b, x7, x13 6381b8021494Sopenharmony_ci // vl128 state = 0x0edfe6b9 6382b8021494Sopenharmony_ci __ dci(0x252531eb); // whilewr p11.b, x15, x5 6383b8021494Sopenharmony_ci // vl128 state = 0xf716b922 6384b8021494Sopenharmony_ci __ dci(0x252733ef); // whilewr p15.b, xzr, x7 6385b8021494Sopenharmony_ci // vl128 state = 0xbf9aea3e 6386b8021494Sopenharmony_ci __ dci(0x25253367); // whilewr p7.b, x27, x5 6387b8021494Sopenharmony_ci // vl128 state = 0x357fc408 6388b8021494Sopenharmony_ci } 6389b8021494Sopenharmony_ci 6390b8021494Sopenharmony_ci uint32_t state; 6391b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 6392b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 6393b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 6394b8021494Sopenharmony_ci 6395b8021494Sopenharmony_ci END(); 6396b8021494Sopenharmony_ci if (CAN_RUN()) { 6397b8021494Sopenharmony_ci RUN(); 6398b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 6399b8021494Sopenharmony_ci 0x357fc408, 6400b8021494Sopenharmony_ci 0x8d6fc283, 6401b8021494Sopenharmony_ci 0x5f73c1df, 6402b8021494Sopenharmony_ci 0x2963d995, 6403b8021494Sopenharmony_ci 0x80713760, 6404b8021494Sopenharmony_ci 0x4638fc82, 6405b8021494Sopenharmony_ci 0x23955ead, 6406b8021494Sopenharmony_ci 0x52e4c002, 6407b8021494Sopenharmony_ci 0xd56ab65c, 6408b8021494Sopenharmony_ci 0x0e5bb2f2, 6409b8021494Sopenharmony_ci 0x8c78ec14, 6410b8021494Sopenharmony_ci 0xd9b634d2, 6411b8021494Sopenharmony_ci 0x83adc3a2, 6412b8021494Sopenharmony_ci 0x3b664eea, 6413b8021494Sopenharmony_ci 0x3d1f5422, 6414b8021494Sopenharmony_ci 0x7cdcd310, 6415b8021494Sopenharmony_ci }; 6416b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 6417b8021494Sopenharmony_ci } 6418b8021494Sopenharmony_ci} 6419b8021494Sopenharmony_ci 6420b8021494Sopenharmony_ciTEST_SVE(sve2_mul_index) { 6421b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 6422b8021494Sopenharmony_ci CPUFeatures::kSVE2, 6423b8021494Sopenharmony_ci CPUFeatures::kNEON, 6424b8021494Sopenharmony_ci CPUFeatures::kCRC32); 6425b8021494Sopenharmony_ci START(); 6426b8021494Sopenharmony_ci 6427b8021494Sopenharmony_ci SetInitialMachineState(&masm); 6428b8021494Sopenharmony_ci // state = 0xe2bd2480 6429b8021494Sopenharmony_ci 6430b8021494Sopenharmony_ci { 6431b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 6432b8021494Sopenharmony_ci __ dci(0x4468fb6e); // mul z14.h, z27.h, z0.h[5] 6433b8021494Sopenharmony_ci // vl128 state = 0xcbe81b96 6434b8021494Sopenharmony_ci __ dci(0x4468f93e); // mul z30.h, z9.h, z0.h[5] 6435b8021494Sopenharmony_ci // vl128 state = 0x8a75362d 6436b8021494Sopenharmony_ci __ dci(0x4428f976); // mul z22.h, z11.h, z0.h[1] 6437b8021494Sopenharmony_ci // vl128 state = 0x1e3c5184 6438b8021494Sopenharmony_ci __ dci(0x4428fa77); // mul z23.h, z19.h, z0.h[1] 6439b8021494Sopenharmony_ci // vl128 state = 0x173f58b5 6440b8021494Sopenharmony_ci __ dci(0x4429fb67); // mul z7.h, z27.h, z1.h[1] 6441b8021494Sopenharmony_ci // vl128 state = 0x15686c87 6442b8021494Sopenharmony_ci __ dci(0x4429fb63); // mul z3.h, z27.h, z1.h[1] 6443b8021494Sopenharmony_ci // vl128 state = 0x41068a87 6444b8021494Sopenharmony_ci __ dci(0x4428fb53); // mul z19.h, z26.h, z0.h[1] 6445b8021494Sopenharmony_ci // vl128 state = 0xcfd6e02c 6446b8021494Sopenharmony_ci __ dci(0x4429fbd1); // mul z17.h, z30.h, z1.h[1] 6447b8021494Sopenharmony_ci // vl128 state = 0xfd3e0e3c 6448b8021494Sopenharmony_ci __ dci(0x442afbd9); // mul z25.h, z30.h, z2.h[1] 6449b8021494Sopenharmony_ci // vl128 state = 0x1e660bf7 6450b8021494Sopenharmony_ci __ dci(0x442afa5b); // mul z27.h, z18.h, z2.h[1] 6451b8021494Sopenharmony_ci // vl128 state = 0xb5378f4e 6452b8021494Sopenharmony_ci __ dci(0x44abfa4b); // mul z11.s, z18.s, z3.s[1] 6453b8021494Sopenharmony_ci // vl128 state = 0xf34416fe 6454b8021494Sopenharmony_ci __ dci(0x44abfa4f); // mul z15.s, z18.s, z3.s[1] 6455b8021494Sopenharmony_ci // vl128 state = 0xc80d6ad9 6456b8021494Sopenharmony_ci __ dci(0x44a9f84e); // mul z14.s, z2.s, z1.s[1] 6457b8021494Sopenharmony_ci // vl128 state = 0xa4fe2be7 6458b8021494Sopenharmony_ci __ dci(0x44e9fa46); // mul z6.d, z18.d, z9.d[0] 6459b8021494Sopenharmony_ci // vl128 state = 0xaf461ebb 6460b8021494Sopenharmony_ci __ dci(0x44e9fa8e); // mul z14.d, z20.d, z9.d[0] 6461b8021494Sopenharmony_ci // vl128 state = 0x9f7acd20 6462b8021494Sopenharmony_ci __ dci(0x44f1fa8f); // mul z15.d, z20.d, z1.d[1] 6463b8021494Sopenharmony_ci // vl128 state = 0x1b710469 6464b8021494Sopenharmony_ci __ dci(0x4471fa07); // mul z7.h, z16.h, z1.h[6] 6465b8021494Sopenharmony_ci // vl128 state = 0xa2120b4c 6466b8021494Sopenharmony_ci __ dci(0x4470fa43); // mul z3.h, z18.h, z0.h[6] 6467b8021494Sopenharmony_ci // vl128 state = 0xb6d6ce4c 6468b8021494Sopenharmony_ci __ dci(0x4474fb47); // mul z7.h, z26.h, z4.h[6] 6469b8021494Sopenharmony_ci // vl128 state = 0xeec634bf 6470b8021494Sopenharmony_ci __ dci(0x4476fa57); // mul z23.h, z18.h, z6.h[6] 6471b8021494Sopenharmony_ci // vl128 state = 0x893bbe37 6472b8021494Sopenharmony_ci __ dci(0x447cfa53); // mul z19.h, z18.h, z4.h[7] 6473b8021494Sopenharmony_ci // vl128 state = 0x8373940b 6474b8021494Sopenharmony_ci __ dci(0x447dfb52); // mul z18.h, z26.h, z5.h[7] 6475b8021494Sopenharmony_ci // vl128 state = 0xd1c86434 6476b8021494Sopenharmony_ci __ dci(0x4477fb56); // mul z22.h, z26.h, z7.h[6] 6477b8021494Sopenharmony_ci // vl128 state = 0xb247cf9e 6478b8021494Sopenharmony_ci __ dci(0x4476fb77); // mul z23.h, z27.h, z6.h[6] 6479b8021494Sopenharmony_ci // vl128 state = 0x6106a868 6480b8021494Sopenharmony_ci __ dci(0x4467fb7f); // mul z31.h, z27.h, z7.h[4] 6481b8021494Sopenharmony_ci // vl128 state = 0xc0a11edf 6482b8021494Sopenharmony_ci __ dci(0x446ffa77); // mul z23.h, z19.h, z7.h[5] 6483b8021494Sopenharmony_ci // vl128 state = 0xe1879a44 6484b8021494Sopenharmony_ci __ dci(0x442bfa76); // mul z22.h, z19.h, z3.h[1] 6485b8021494Sopenharmony_ci // vl128 state = 0xc773115b 6486b8021494Sopenharmony_ci __ dci(0x442bfa7e); // mul z30.h, z19.h, z3.h[1] 6487b8021494Sopenharmony_ci // vl128 state = 0x5f5b4793 6488b8021494Sopenharmony_ci __ dci(0x442afa2e); // mul z14.h, z17.h, z2.h[1] 6489b8021494Sopenharmony_ci // vl128 state = 0x144b30b2 6490b8021494Sopenharmony_ci __ dci(0x442afa26); // mul z6.h, z17.h, z2.h[1] 6491b8021494Sopenharmony_ci // vl128 state = 0x905f8608 6492b8021494Sopenharmony_ci __ dci(0x442afb6e); // mul z14.h, z27.h, z2.h[1] 6493b8021494Sopenharmony_ci // vl128 state = 0x0f826c19 6494b8021494Sopenharmony_ci __ dci(0x44aefb66); // mul z6.s, z27.s, z6.s[1] 6495b8021494Sopenharmony_ci // vl128 state = 0x7043c090 6496b8021494Sopenharmony_ci __ dci(0x44aefba4); // mul z4.s, z29.s, z6.s[1] 6497b8021494Sopenharmony_ci // vl128 state = 0xab3921a9 6498b8021494Sopenharmony_ci __ dci(0x44aefbb4); // mul z20.s, z29.s, z6.s[1] 6499b8021494Sopenharmony_ci // vl128 state = 0x7d420495 6500b8021494Sopenharmony_ci __ dci(0x44acfbf0); // mul z16.s, z31.s, z4.s[1] 6501b8021494Sopenharmony_ci // vl128 state = 0xceb17a45 6502b8021494Sopenharmony_ci __ dci(0x44a4fb60); // mul z0.s, z27.s, z4.s[0] 6503b8021494Sopenharmony_ci // vl128 state = 0x97ed0929 6504b8021494Sopenharmony_ci __ dci(0x44a5fb30); // mul z16.s, z25.s, z5.s[0] 6505b8021494Sopenharmony_ci // vl128 state = 0xb7fa54a5 6506b8021494Sopenharmony_ci __ dci(0x4425f938); // mul z24.h, z9.h, z5.h[0] 6507b8021494Sopenharmony_ci // vl128 state = 0xfcc1c192 6508b8021494Sopenharmony_ci __ dci(0x442df830); // mul z16.h, z1.h, z5.h[1] 6509b8021494Sopenharmony_ci // vl128 state = 0x933ed51d 6510b8021494Sopenharmony_ci __ dci(0x4427f832); // mul z18.h, z1.h, z7.h[0] 6511b8021494Sopenharmony_ci // vl128 state = 0x2129d4f0 6512b8021494Sopenharmony_ci __ dci(0x442ef822); // mul z2.h, z1.h, z6.h[1] 6513b8021494Sopenharmony_ci // vl128 state = 0x76f6854c 6514b8021494Sopenharmony_ci __ dci(0x442af803); // mul z3.h, z0.h, z2.h[1] 6515b8021494Sopenharmony_ci // vl128 state = 0xe763df2d 6516b8021494Sopenharmony_ci __ dci(0x442af801); // mul z1.h, z0.h, z2.h[1] 6517b8021494Sopenharmony_ci // vl128 state = 0x61db5a87 6518b8021494Sopenharmony_ci __ dci(0x442bf900); // mul z0.h, z8.h, z3.h[1] 6519b8021494Sopenharmony_ci // vl128 state = 0x90883cfb 6520b8021494Sopenharmony_ci __ dci(0x442bf881); // mul z1.h, z4.h, z3.h[1] 6521b8021494Sopenharmony_ci // vl128 state = 0xb4afb9b2 6522b8021494Sopenharmony_ci __ dci(0x4427f885); // mul z5.h, z4.h, z7.h[0] 6523b8021494Sopenharmony_ci // vl128 state = 0xe512adca 6524b8021494Sopenharmony_ci __ dci(0x4425f8ad); // mul z13.h, z5.h, z5.h[0] 6525b8021494Sopenharmony_ci // vl128 state = 0xd820475a 6526b8021494Sopenharmony_ci __ dci(0x4420f8a5); // mul z5.h, z5.h, z0.h[0] 6527b8021494Sopenharmony_ci // vl128 state = 0xea9a6f50 6528b8021494Sopenharmony_ci __ dci(0x4431f8a4); // mul z4.h, z5.h, z1.h[2] 6529b8021494Sopenharmony_ci // vl128 state = 0x9343e341 6530b8021494Sopenharmony_ci __ dci(0x4425f8a0); // mul z0.h, z5.h, z5.h[0] 6531b8021494Sopenharmony_ci // vl128 state = 0x20a5f202 6532b8021494Sopenharmony_ci } 6533b8021494Sopenharmony_ci 6534b8021494Sopenharmony_ci uint32_t state; 6535b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 6536b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 6537b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 6538b8021494Sopenharmony_ci 6539b8021494Sopenharmony_ci END(); 6540b8021494Sopenharmony_ci if (CAN_RUN()) { 6541b8021494Sopenharmony_ci RUN(); 6542b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 6543b8021494Sopenharmony_ci 0x20a5f202, 6544b8021494Sopenharmony_ci 0xdb7b10ee, 6545b8021494Sopenharmony_ci 0x0607441b, 6546b8021494Sopenharmony_ci 0x4966f0ff, 6547b8021494Sopenharmony_ci 0x5f750338, 6548b8021494Sopenharmony_ci 0x9be09ff4, 6549b8021494Sopenharmony_ci 0x8805a320, 6550b8021494Sopenharmony_ci 0x52cf70b0, 6551b8021494Sopenharmony_ci 0x5f4c6d92, 6552b8021494Sopenharmony_ci 0xf8009f1f, 6553b8021494Sopenharmony_ci 0x56cd1ff6, 6554b8021494Sopenharmony_ci 0x345f063d, 6555b8021494Sopenharmony_ci 0x3807ccf3, 6556b8021494Sopenharmony_ci 0xf7eb85a8, 6557b8021494Sopenharmony_ci 0x1600c143, 6558b8021494Sopenharmony_ci 0x97be6c01, 6559b8021494Sopenharmony_ci }; 6560b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 6561b8021494Sopenharmony_ci } 6562b8021494Sopenharmony_ci} 6563b8021494Sopenharmony_ci 6564b8021494Sopenharmony_ciTEST_SVE(sve2_mla_mls_index) { 6565b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 6566b8021494Sopenharmony_ci CPUFeatures::kSVE2, 6567b8021494Sopenharmony_ci CPUFeatures::kNEON, 6568b8021494Sopenharmony_ci CPUFeatures::kCRC32); 6569b8021494Sopenharmony_ci START(); 6570b8021494Sopenharmony_ci 6571b8021494Sopenharmony_ci SetInitialMachineState(&masm); 6572b8021494Sopenharmony_ci // state = 0xe2bd2480 6573b8021494Sopenharmony_ci 6574b8021494Sopenharmony_ci { 6575b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 6576b8021494Sopenharmony_ci __ dci(0x44200800); // mla z0.h, z0.h, z0.h[0] 6577b8021494Sopenharmony_ci // vl128 state = 0x06aac22e 6578b8021494Sopenharmony_ci __ dci(0x44200a28); // mla z8.h, z17.h, z0.h[0] 6579b8021494Sopenharmony_ci // vl128 state = 0xde2255a4 6580b8021494Sopenharmony_ci __ dci(0x44e00a2a); // mla z10.d, z17.d, z0.d[0] 6581b8021494Sopenharmony_ci // vl128 state = 0x9bf1bae6 6582b8021494Sopenharmony_ci __ dci(0x44600e3a); // mls z26.h, z17.h, z0.h[4] 6583b8021494Sopenharmony_ci // vl128 state = 0x28b58feb 6584b8021494Sopenharmony_ci __ dci(0x44e20e2a); // mls z10.d, z17.d, z2.d[0] 6585b8021494Sopenharmony_ci // vl128 state = 0x0ac8fcc8 6586b8021494Sopenharmony_ci __ dci(0x44620f2e); // mls z14.h, z25.h, z2.h[4] 6587b8021494Sopenharmony_ci // vl128 state = 0x955da860 6588b8021494Sopenharmony_ci __ dci(0x44630f6a); // mls z10.h, z27.h, z3.h[4] 6589b8021494Sopenharmony_ci // vl128 state = 0x654ee915 6590b8021494Sopenharmony_ci __ dci(0x44730b6e); // mla z14.h, z27.h, z3.h[6] 6591b8021494Sopenharmony_ci // vl128 state = 0x3fd3e02c 6592b8021494Sopenharmony_ci __ dci(0x44720f6f); // mls z15.h, z27.h, z2.h[6] 6593b8021494Sopenharmony_ci // vl128 state = 0x46031098 6594b8021494Sopenharmony_ci __ dci(0x44620f4b); // mls z11.h, z26.h, z2.h[4] 6595b8021494Sopenharmony_ci // vl128 state = 0xd49183cf 6596b8021494Sopenharmony_ci __ dci(0x446a0b5b); // mla z27.h, z26.h, z2.h[5] 6597b8021494Sopenharmony_ci // vl128 state = 0x4fe290c1 6598b8021494Sopenharmony_ci __ dci(0x44680b73); // mla z19.h, z27.h, z0.h[5] 6599b8021494Sopenharmony_ci // vl128 state = 0xf6fccd86 6600b8021494Sopenharmony_ci __ dci(0x44e90b77); // mla z23.d, z27.d, z9.d[0] 6601b8021494Sopenharmony_ci // vl128 state = 0x57b2090d 6602b8021494Sopenharmony_ci __ dci(0x44f10b76); // mla z22.d, z27.d, z1.d[1] 6603b8021494Sopenharmony_ci // vl128 state = 0x5a6932eb 6604b8021494Sopenharmony_ci __ dci(0x44f40b77); // mla z23.d, z27.d, z4.d[1] 6605b8021494Sopenharmony_ci // vl128 state = 0x8e33d7d5 6606b8021494Sopenharmony_ci __ dci(0x44640b7f); // mla z31.h, z27.h, z4.h[4] 6607b8021494Sopenharmony_ci // vl128 state = 0xaa01885d 6608b8021494Sopenharmony_ci __ dci(0x44640b7d); // mla z29.h, z27.h, z4.h[4] 6609b8021494Sopenharmony_ci // vl128 state = 0x2ef00e60 6610b8021494Sopenharmony_ci __ dci(0x44640b7f); // mla z31.h, z27.h, z4.h[4] 6611b8021494Sopenharmony_ci // vl128 state = 0x94ac10d3 6612b8021494Sopenharmony_ci __ dci(0x44340b7e); // mla z30.h, z27.h, z4.h[2] 6613b8021494Sopenharmony_ci // vl128 state = 0x48211118 6614b8021494Sopenharmony_ci __ dci(0x44340e7a); // mls z26.h, z19.h, z4.h[2] 6615b8021494Sopenharmony_ci // vl128 state = 0x72cc2767 6616b8021494Sopenharmony_ci __ dci(0x44b40eea); // mls z10.s, z23.s, z4.s[2] 6617b8021494Sopenharmony_ci // vl128 state = 0x3855f70f 6618b8021494Sopenharmony_ci __ dci(0x44e40ee2); // mls z2.d, z23.d, z4.d[0] 6619b8021494Sopenharmony_ci // vl128 state = 0xf9225160 6620b8021494Sopenharmony_ci __ dci(0x44ec0ea3); // mls z3.d, z21.d, z12.d[0] 6621b8021494Sopenharmony_ci // vl128 state = 0xf9b94fd0 6622b8021494Sopenharmony_ci __ dci(0x44ae0ea7); // mls z7.s, z21.s, z6.s[1] 6623b8021494Sopenharmony_ci // vl128 state = 0x06070917 6624b8021494Sopenharmony_ci __ dci(0x44ae0eb7); // mls z23.s, z21.s, z6.s[1] 6625b8021494Sopenharmony_ci // vl128 state = 0x26ecdd18 6626b8021494Sopenharmony_ci __ dci(0x44ae0e07); // mls z7.s, z16.s, z6.s[1] 6627b8021494Sopenharmony_ci // vl128 state = 0xaa8e3a32 6628b8021494Sopenharmony_ci __ dci(0x44ae0a85); // mla z5.s, z20.s, z6.s[1] 6629b8021494Sopenharmony_ci // vl128 state = 0x2379cba0 6630b8021494Sopenharmony_ci __ dci(0x44ae0a81); // mla z1.s, z20.s, z6.s[1] 6631b8021494Sopenharmony_ci // vl128 state = 0x3cc8a61c 6632b8021494Sopenharmony_ci __ dci(0x442a0a85); // mla z5.h, z20.h, z2.h[1] 6633b8021494Sopenharmony_ci // vl128 state = 0x96f118ef 6634b8021494Sopenharmony_ci __ dci(0x443e0a84); // mla z4.h, z20.h, z6.h[3] 6635b8021494Sopenharmony_ci // vl128 state = 0xa3f8cb41 6636b8021494Sopenharmony_ci __ dci(0x443f0b8c); // mla z12.h, z28.h, z7.h[3] 6637b8021494Sopenharmony_ci // vl128 state = 0x97fcb1da 6638b8021494Sopenharmony_ci __ dci(0x442f0bbc); // mla z28.h, z29.h, z7.h[1] 6639b8021494Sopenharmony_ci // vl128 state = 0x761e9499 6640b8021494Sopenharmony_ci __ dci(0x44270fac); // mls z12.h, z29.h, z7.h[0] 6641b8021494Sopenharmony_ci // vl128 state = 0xfb28f943 6642b8021494Sopenharmony_ci __ dci(0x442f0ead); // mls z13.h, z21.h, z7.h[1] 6643b8021494Sopenharmony_ci // vl128 state = 0x387a2623 6644b8021494Sopenharmony_ci __ dci(0x44270fa9); // mls z9.h, z29.h, z7.h[0] 6645b8021494Sopenharmony_ci // vl128 state = 0x22f03847 6646b8021494Sopenharmony_ci __ dci(0x44270f68); // mls z8.h, z27.h, z7.h[0] 6647b8021494Sopenharmony_ci // vl128 state = 0xada4998b 6648b8021494Sopenharmony_ci __ dci(0x44270f6c); // mls z12.h, z27.h, z7.h[0] 6649b8021494Sopenharmony_ci // vl128 state = 0xdf80a034 6650b8021494Sopenharmony_ci __ dci(0x44270f7c); // mls z28.h, z27.h, z7.h[0] 6651b8021494Sopenharmony_ci // vl128 state = 0x3ccddaa6 6652b8021494Sopenharmony_ci __ dci(0x44250f2c); // mls z12.h, z25.h, z5.h[0] 6653b8021494Sopenharmony_ci // vl128 state = 0x588502cb 6654b8021494Sopenharmony_ci __ dci(0x442f0f28); // mls z8.h, z25.h, z7.h[1] 6655b8021494Sopenharmony_ci // vl128 state = 0x79c90307 6656b8021494Sopenharmony_ci __ dci(0x446f0d2c); // mls z12.h, z9.h, z7.h[5] 6657b8021494Sopenharmony_ci // vl128 state = 0xaa0b21a9 6658b8021494Sopenharmony_ci __ dci(0x44af0d2e); // mls z14.s, z9.s, z7.s[1] 6659b8021494Sopenharmony_ci // vl128 state = 0xd5ccc60c 6660b8021494Sopenharmony_ci __ dci(0x44ed0d26); // mls z6.d, z9.d, z13.d[0] 6661b8021494Sopenharmony_ci // vl128 state = 0x15037cbe 6662b8021494Sopenharmony_ci __ dci(0x44fd0f2e); // mls z14.d, z25.d, z13.d[1] 6663b8021494Sopenharmony_ci // vl128 state = 0x9f481fdf 6664b8021494Sopenharmony_ci __ dci(0x44f90e2f); // mls z15.d, z17.d, z9.d[1] 6665b8021494Sopenharmony_ci // vl128 state = 0x93fe8537 6666b8021494Sopenharmony_ci __ dci(0x447d0e3f); // mls z31.h, z17.h, z5.h[7] 6667b8021494Sopenharmony_ci // vl128 state = 0x14b9edf2 6668b8021494Sopenharmony_ci __ dci(0x44f90e2f); // mls z15.d, z17.d, z9.d[1] 6669b8021494Sopenharmony_ci // vl128 state = 0xde1c0d1c 6670b8021494Sopenharmony_ci __ dci(0x44790c27); // mls z7.h, z1.h, z1.h[7] 6671b8021494Sopenharmony_ci // vl128 state = 0x563d614a 6672b8021494Sopenharmony_ci __ dci(0x44790c23); // mls z3.h, z1.h, z1.h[7] 6673b8021494Sopenharmony_ci // vl128 state = 0x8c6d9baf 6674b8021494Sopenharmony_ci __ dci(0x44f90c6b); // mls z11.d, z3.d, z9.d[1] 6675b8021494Sopenharmony_ci // vl128 state = 0x1a25c073 6676b8021494Sopenharmony_ci } 6677b8021494Sopenharmony_ci 6678b8021494Sopenharmony_ci uint32_t state; 6679b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 6680b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 6681b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 6682b8021494Sopenharmony_ci 6683b8021494Sopenharmony_ci END(); 6684b8021494Sopenharmony_ci if (CAN_RUN()) { 6685b8021494Sopenharmony_ci RUN(); 6686b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 6687b8021494Sopenharmony_ci 0x1a25c073, 6688b8021494Sopenharmony_ci 0xfbb2c945, 6689b8021494Sopenharmony_ci 0x932b8ab7, 6690b8021494Sopenharmony_ci 0x99370bee, 6691b8021494Sopenharmony_ci 0x44a15f80, 6692b8021494Sopenharmony_ci 0xae898f1d, 6693b8021494Sopenharmony_ci 0x97382827, 6694b8021494Sopenharmony_ci 0xafec059e, 6695b8021494Sopenharmony_ci 0xf11bc007, 6696b8021494Sopenharmony_ci 0x34c49b30, 6697b8021494Sopenharmony_ci 0x73b95606, 6698b8021494Sopenharmony_ci 0x77324772, 6699b8021494Sopenharmony_ci 0x9ad7d21b, 6700b8021494Sopenharmony_ci 0x0d0958a7, 6701b8021494Sopenharmony_ci 0xee4accc3, 6702b8021494Sopenharmony_ci 0x31d34df8, 6703b8021494Sopenharmony_ci }; 6704b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 6705b8021494Sopenharmony_ci } 6706b8021494Sopenharmony_ci} 6707b8021494Sopenharmony_ci 6708b8021494Sopenharmony_ciTEST_SVE(sve2_mla_long) { 6709b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 6710b8021494Sopenharmony_ci CPUFeatures::kSVE2, 6711b8021494Sopenharmony_ci CPUFeatures::kNEON, 6712b8021494Sopenharmony_ci CPUFeatures::kCRC32); 6713b8021494Sopenharmony_ci START(); 6714b8021494Sopenharmony_ci 6715b8021494Sopenharmony_ci SetInitialMachineState(&masm); 6716b8021494Sopenharmony_ci // state = 0xe2bd2480 6717b8021494Sopenharmony_ci 6718b8021494Sopenharmony_ci { 6719b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 6720b8021494Sopenharmony_ci __ dci(0x44935abe); // umlslb z30.s, z21.h, z19.h 6721b8021494Sopenharmony_ci // vl128 state = 0x4fac8e49 6722b8021494Sopenharmony_ci __ dci(0x449358fa); // umlslb z26.s, z7.h, z19.h 6723b8021494Sopenharmony_ci // vl128 state = 0xca971f04 6724b8021494Sopenharmony_ci __ dci(0x44935adb); // umlslb z27.s, z22.h, z19.h 6725b8021494Sopenharmony_ci // vl128 state = 0x5652564b 6726b8021494Sopenharmony_ci __ dci(0x449359da); // umlslb z26.s, z14.h, z19.h 6727b8021494Sopenharmony_ci // vl128 state = 0xf2d81244 6728b8021494Sopenharmony_ci __ dci(0x448349de); // umlalb z30.s, z14.h, z3.h 6729b8021494Sopenharmony_ci // vl128 state = 0x7cbaa548 6730b8021494Sopenharmony_ci __ dci(0x448349d6); // umlalb z22.s, z14.h, z3.h 6731b8021494Sopenharmony_ci // vl128 state = 0x9e7b4915 6732b8021494Sopenharmony_ci __ dci(0x44c34952); // umlalb z18.d, z10.s, z3.s 6733b8021494Sopenharmony_ci // vl128 state = 0x550af70e 6734b8021494Sopenharmony_ci __ dci(0x44d349d3); // umlalb z19.d, z14.s, z19.s 6735b8021494Sopenharmony_ci // vl128 state = 0x676743b2 6736b8021494Sopenharmony_ci __ dci(0x44d549d7); // umlalb z23.d, z14.s, z21.s 6737b8021494Sopenharmony_ci // vl128 state = 0x602e09e4 6738b8021494Sopenharmony_ci __ dci(0x44d55ddf); // umlslt z31.d, z14.s, z21.s 6739b8021494Sopenharmony_ci // vl128 state = 0xd4c245de 6740b8021494Sopenharmony_ci __ dci(0x44d55d1b); // umlslt z27.d, z8.s, z21.s 6741b8021494Sopenharmony_ci // vl128 state = 0x9c2c1cb4 6742b8021494Sopenharmony_ci __ dci(0x44d5490b); // umlalb z11.d, z8.s, z21.s 6743b8021494Sopenharmony_ci // vl128 state = 0x8a702002 6744b8021494Sopenharmony_ci __ dci(0x44554d0a); // umlalt z10.h, z8.b, z21.b 6745b8021494Sopenharmony_ci // vl128 state = 0x6758ce3c 6746b8021494Sopenharmony_ci __ dci(0x4455452b); // smlalt z11.h, z9.b, z21.b 6747b8021494Sopenharmony_ci // vl128 state = 0x967e596e 6748b8021494Sopenharmony_ci __ dci(0x44554529); // smlalt z9.h, z9.b, z21.b 6749b8021494Sopenharmony_ci // vl128 state = 0x1300909a 6750b8021494Sopenharmony_ci __ dci(0x44474521); // smlalt z1.h, z9.b, z7.b 6751b8021494Sopenharmony_ci // vl128 state = 0x01ca26c1 6752b8021494Sopenharmony_ci __ dci(0x44c74d25); // umlalt z5.d, z9.s, z7.s 6753b8021494Sopenharmony_ci // vl128 state = 0x8e6313b9 6754b8021494Sopenharmony_ci __ dci(0x44cb4d24); // umlalt z4.d, z9.s, z11.s 6755b8021494Sopenharmony_ci // vl128 state = 0xdb41e004 6756b8021494Sopenharmony_ci __ dci(0x44cb4d2c); // umlalt z12.d, z9.s, z11.s 6757b8021494Sopenharmony_ci // vl128 state = 0x941401ca 6758b8021494Sopenharmony_ci __ dci(0x44c94da8); // umlalt z8.d, z13.s, z9.s 6759b8021494Sopenharmony_ci // vl128 state = 0x8a57334b 6760b8021494Sopenharmony_ci __ dci(0x44594db8); // umlalt z24.h, z13.b, z25.b 6761b8021494Sopenharmony_ci // vl128 state = 0x94333fae 6762b8021494Sopenharmony_ci __ dci(0x44585db0); // umlslt z16.h, z13.b, z24.b 6763b8021494Sopenharmony_ci // vl128 state = 0xf4fbe251 6764b8021494Sopenharmony_ci __ dci(0x44585f80); // umlslt z0.h, z28.b, z24.b 6765b8021494Sopenharmony_ci // vl128 state = 0x1f5aeef3 6766b8021494Sopenharmony_ci __ dci(0x445a5fc2); // umlslt z2.h, z30.b, z26.b 6767b8021494Sopenharmony_ci // vl128 state = 0x4b153d20 6768b8021494Sopenharmony_ci __ dci(0x445a5fd2); // umlslt z18.h, z30.b, z26.b 6769b8021494Sopenharmony_ci // vl128 state = 0xbd82f0a2 6770b8021494Sopenharmony_ci __ dci(0x445a5fd3); // umlslt z19.h, z30.b, z26.b 6771b8021494Sopenharmony_ci // vl128 state = 0x72d7083d 6772b8021494Sopenharmony_ci __ dci(0x44525bd2); // umlslb z18.h, z30.b, z18.b 6773b8021494Sopenharmony_ci // vl128 state = 0x5018a138 6774b8021494Sopenharmony_ci __ dci(0x44525bd6); // umlslb z22.h, z30.b, z18.b 6775b8021494Sopenharmony_ci // vl128 state = 0xcaf48a01 6776b8021494Sopenharmony_ci __ dci(0x445053d2); // smlslb z18.h, z30.b, z16.b 6777b8021494Sopenharmony_ci // vl128 state = 0x76e2d850 6778b8021494Sopenharmony_ci __ dci(0x44d153c2); // smlslb z2.d, z30.s, z17.s 6779b8021494Sopenharmony_ci // vl128 state = 0x8594d6c9 6780b8021494Sopenharmony_ci __ dci(0x449353c3); // smlslb z3.s, z30.h, z19.h 6781b8021494Sopenharmony_ci // vl128 state = 0x8e0da89d 6782b8021494Sopenharmony_ci __ dci(0x449152c7); // smlslb z7.s, z22.h, z17.h 6783b8021494Sopenharmony_ci // vl128 state = 0xe7d08864 6784b8021494Sopenharmony_ci __ dci(0x44995285); // smlslb z5.s, z20.h, z25.h 6785b8021494Sopenharmony_ci // vl128 state = 0xd7c49fca 6786b8021494Sopenharmony_ci __ dci(0x449953c1); // smlslb z1.s, z30.h, z25.h 6787b8021494Sopenharmony_ci // vl128 state = 0x3b648b39 6788b8021494Sopenharmony_ci __ dci(0x449152c9); // smlslb z9.s, z22.h, z17.h 6789b8021494Sopenharmony_ci // vl128 state = 0x5b5bab94 6790b8021494Sopenharmony_ci __ dci(0x449542cd); // smlalb z13.s, z22.h, z21.h 6791b8021494Sopenharmony_ci // vl128 state = 0x65282d76 6792b8021494Sopenharmony_ci __ dci(0x449c42c9); // smlalb z9.s, z22.h, z28.h 6793b8021494Sopenharmony_ci // vl128 state = 0x94a92486 6794b8021494Sopenharmony_ci __ dci(0x449c52f9); // smlslb z25.s, z23.h, z28.h 6795b8021494Sopenharmony_ci // vl128 state = 0xd4f62835 6796b8021494Sopenharmony_ci __ dci(0x44dc5afd); // umlslb z29.d, z23.s, z28.s 6797b8021494Sopenharmony_ci // vl128 state = 0xf124c6a1 6798b8021494Sopenharmony_ci __ dci(0x44dd58ff); // umlslb z31.d, z7.s, z29.s 6799b8021494Sopenharmony_ci // vl128 state = 0xbc694f1c 6800b8021494Sopenharmony_ci __ dci(0x44dc587b); // umlslb z27.d, z3.s, z28.s 6801b8021494Sopenharmony_ci // vl128 state = 0xf1621eb2 6802b8021494Sopenharmony_ci __ dci(0x44de596b); // umlslb z11.d, z11.s, z30.s 6803b8021494Sopenharmony_ci // vl128 state = 0x944b4b75 6804b8021494Sopenharmony_ci __ dci(0x44de5969); // umlslb z9.d, z11.s, z30.s 6805b8021494Sopenharmony_ci // vl128 state = 0xa98a2c38 6806b8021494Sopenharmony_ci __ dci(0x44db596d); // umlslb z13.d, z11.s, z27.s 6807b8021494Sopenharmony_ci // vl128 state = 0x6bd60807 6808b8021494Sopenharmony_ci __ dci(0x44db5d5d); // umlslt z29.d, z10.s, z27.s 6809b8021494Sopenharmony_ci // vl128 state = 0x9c377b51 6810b8021494Sopenharmony_ci __ dci(0x449b555f); // smlslt z31.s, z10.h, z27.h 6811b8021494Sopenharmony_ci // vl128 state = 0x7c81f1d5 6812b8021494Sopenharmony_ci __ dci(0x449b555d); // smlslt z29.s, z10.h, z27.h 6813b8021494Sopenharmony_ci // vl128 state = 0xdaab1edb 6814b8021494Sopenharmony_ci __ dci(0x44d35559); // smlslt z25.d, z10.s, z19.s 6815b8021494Sopenharmony_ci // vl128 state = 0xdc3f25f1 6816b8021494Sopenharmony_ci __ dci(0x44d355f8); // smlslt z24.d, z15.s, z19.s 6817b8021494Sopenharmony_ci // vl128 state = 0x9c75a3cf 6818b8021494Sopenharmony_ci __ dci(0x44d356f9); // smlslt z25.d, z23.s, z19.s 6819b8021494Sopenharmony_ci // vl128 state = 0x5b999178 6820b8021494Sopenharmony_ci } 6821b8021494Sopenharmony_ci 6822b8021494Sopenharmony_ci uint32_t state; 6823b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 6824b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 6825b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 6826b8021494Sopenharmony_ci 6827b8021494Sopenharmony_ci END(); 6828b8021494Sopenharmony_ci if (CAN_RUN()) { 6829b8021494Sopenharmony_ci RUN(); 6830b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 6831b8021494Sopenharmony_ci 0x5b999178, 6832b8021494Sopenharmony_ci 0xd6191e64, 6833b8021494Sopenharmony_ci 0x1f3bd2a1, 6834b8021494Sopenharmony_ci 0x1e0ac282, 6835b8021494Sopenharmony_ci 0x8d13f5d3, 6836b8021494Sopenharmony_ci 0x97157e8f, 6837b8021494Sopenharmony_ci 0x5d6e4134, 6838b8021494Sopenharmony_ci 0x8d2186b4, 6839b8021494Sopenharmony_ci 0x88078c65, 6840b8021494Sopenharmony_ci 0x6dd92db3, 6841b8021494Sopenharmony_ci 0xfcd02d21, 6842b8021494Sopenharmony_ci 0x81738dc2, 6843b8021494Sopenharmony_ci 0x644e3c06, 6844b8021494Sopenharmony_ci 0x9c9d2ac8, 6845b8021494Sopenharmony_ci 0xaaa43548, 6846b8021494Sopenharmony_ci 0x871e9b08, 6847b8021494Sopenharmony_ci }; 6848b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 6849b8021494Sopenharmony_ci } 6850b8021494Sopenharmony_ci} 6851b8021494Sopenharmony_ci 6852b8021494Sopenharmony_ciTEST_SVE(sve2_complex_integer_multiply_add_vector) { 6853b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 6854b8021494Sopenharmony_ci CPUFeatures::kSVE2, 6855b8021494Sopenharmony_ci CPUFeatures::kNEON, 6856b8021494Sopenharmony_ci CPUFeatures::kCRC32); 6857b8021494Sopenharmony_ci START(); 6858b8021494Sopenharmony_ci 6859b8021494Sopenharmony_ci SetInitialMachineState(&masm); 6860b8021494Sopenharmony_ci // state = 0xe2bd2480 6861b8021494Sopenharmony_ci 6862b8021494Sopenharmony_ci { 6863b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 40 * kInstructionSize); 6864b8021494Sopenharmony_ci __ dci(0x44dd2f34); // cmla z20.d, z25.d, z29.d, #270 6865b8021494Sopenharmony_ci // vl128 state = 0x12e9bd68 6866b8021494Sopenharmony_ci __ dci(0x44dd2f3c); // cmla z28.d, z25.d, z29.d, #270 6867b8021494Sopenharmony_ci // vl128 state = 0x4fd8ba3e 6868b8021494Sopenharmony_ci __ dci(0x44dc2734); // cmla z20.d, z25.d, z28.d, #90 6869b8021494Sopenharmony_ci // vl128 state = 0x9b11d64f 6870b8021494Sopenharmony_ci __ dci(0x44dc2e36); // cmla z22.d, z17.d, z28.d, #270 6871b8021494Sopenharmony_ci // vl128 state = 0x4658e6ae 6872b8021494Sopenharmony_ci __ dci(0x44dd2f34); // cmla z20.d, z25.d, z29.d, #270 6873b8021494Sopenharmony_ci // vl128 state = 0x5151ea16 6874b8021494Sopenharmony_ci __ dci(0x44dc2fb5); // cmla z21.d, z29.d, z28.d, #270 6875b8021494Sopenharmony_ci // vl128 state = 0x21c497cc 6876b8021494Sopenharmony_ci __ dci(0x44dc2fbd); // cmla z29.d, z29.d, z28.d, #270 6877b8021494Sopenharmony_ci // vl128 state = 0xe823fd46 6878b8021494Sopenharmony_ci __ dci(0x44dc2e3c); // cmla z28.d, z17.d, z28.d, #270 6879b8021494Sopenharmony_ci // vl128 state = 0xcc35cda6 6880b8021494Sopenharmony_ci __ dci(0x44dc2e34); // cmla z20.d, z17.d, z28.d, #270 6881b8021494Sopenharmony_ci // vl128 state = 0x963047c0 6882b8021494Sopenharmony_ci __ dci(0x44d42c30); // cmla z16.d, z1.d, z20.d, #270 6883b8021494Sopenharmony_ci // vl128 state = 0x5d2c5643 6884b8021494Sopenharmony_ci __ dci(0x44c42c60); // cmla z0.d, z3.d, z4.d, #270 6885b8021494Sopenharmony_ci // vl128 state = 0xfd400169 6886b8021494Sopenharmony_ci __ dci(0x44842464); // cmla z4.s, z3.s, z4.s, #90 6887b8021494Sopenharmony_ci // vl128 state = 0x00116098 6888b8021494Sopenharmony_ci __ dci(0x44842d60); // cmla z0.s, z11.s, z4.s, #270 6889b8021494Sopenharmony_ci // vl128 state = 0x582d46e3 6890b8021494Sopenharmony_ci __ dci(0x44042562); // cmla z2.b, z11.b, z4.b, #90 6891b8021494Sopenharmony_ci // vl128 state = 0x1bd70bf0 6892b8021494Sopenharmony_ci __ dci(0x44042420); // cmla z0.b, z1.b, z4.b, #90 6893b8021494Sopenharmony_ci // vl128 state = 0x7682807d 6894b8021494Sopenharmony_ci __ dci(0x44062401); // cmla z1.b, z0.b, z6.b, #90 6895b8021494Sopenharmony_ci // vl128 state = 0xaa3e2c64 6896b8021494Sopenharmony_ci __ dci(0x44042449); // cmla z9.b, z2.b, z4.b, #90 6897b8021494Sopenharmony_ci // vl128 state = 0xd81638f9 6898b8021494Sopenharmony_ci __ dci(0x44052059); // cmla z25.b, z2.b, z5.b, #0 6899b8021494Sopenharmony_ci // vl128 state = 0x38cb5d96 6900b8021494Sopenharmony_ci __ dci(0x4415305d); // sqrdcmlah z29.b, z2.b, z21.b, #0 6901b8021494Sopenharmony_ci // vl128 state = 0x4c6b85e0 6902b8021494Sopenharmony_ci __ dci(0x44153819); // sqrdcmlah z25.b, z0.b, z21.b, #180 6903b8021494Sopenharmony_ci // vl128 state = 0x229b5be9 6904b8021494Sopenharmony_ci __ dci(0x4405391b); // sqrdcmlah z27.b, z8.b, z5.b, #180 6905b8021494Sopenharmony_ci // vl128 state = 0x82611aec 6906b8021494Sopenharmony_ci __ dci(0x4405314b); // sqrdcmlah z11.b, z10.b, z5.b, #0 6907b8021494Sopenharmony_ci // vl128 state = 0xe58c48e0 6908b8021494Sopenharmony_ci __ dci(0x4407316a); // sqrdcmlah z10.b, z11.b, z7.b, #0 6909b8021494Sopenharmony_ci // vl128 state = 0x5282838a 6910b8021494Sopenharmony_ci __ dci(0x4407347a); // sqrdcmlah z26.b, z3.b, z7.b, #90 6911b8021494Sopenharmony_ci // vl128 state = 0x134a0891 6912b8021494Sopenharmony_ci __ dci(0x4413347e); // sqrdcmlah z30.b, z3.b, z19.b, #90 6913b8021494Sopenharmony_ci // vl128 state = 0x455ab9e0 6914b8021494Sopenharmony_ci __ dci(0x4443347f); // sqrdcmlah z31.h, z3.h, z3.h, #90 6915b8021494Sopenharmony_ci // vl128 state = 0x030d9d2c 6916b8021494Sopenharmony_ci __ dci(0x444b307e); // sqrdcmlah z30.h, z3.h, z11.h, #0 6917b8021494Sopenharmony_ci // vl128 state = 0x91a95a2c 6918b8021494Sopenharmony_ci __ dci(0x444b301f); // sqrdcmlah z31.h, z0.h, z11.h, #0 6919b8021494Sopenharmony_ci // vl128 state = 0x0f1c8468 6920b8021494Sopenharmony_ci __ dci(0x4409300f); // sqrdcmlah z15.b, z0.b, z9.b, #0 6921b8021494Sopenharmony_ci // vl128 state = 0x95f802b7 6922b8021494Sopenharmony_ci __ dci(0x440c300e); // sqrdcmlah z14.b, z0.b, z12.b, #0 6923b8021494Sopenharmony_ci // vl128 state = 0x5fa6d2c6 6924b8021494Sopenharmony_ci __ dci(0x4404310c); // sqrdcmlah z12.b, z8.b, z4.b, #0 6925b8021494Sopenharmony_ci // vl128 state = 0x192b05a4 6926b8021494Sopenharmony_ci __ dci(0x4415310d); // sqrdcmlah z13.b, z8.b, z21.b, #0 6927b8021494Sopenharmony_ci // vl128 state = 0xa8a8d37f 6928b8021494Sopenharmony_ci __ dci(0x4414350f); // sqrdcmlah z15.b, z8.b, z20.b, #90 6929b8021494Sopenharmony_ci // vl128 state = 0xcd890d8c 6930b8021494Sopenharmony_ci __ dci(0x4454354d); // sqrdcmlah z13.h, z10.h, z20.h, #90 6931b8021494Sopenharmony_ci // vl128 state = 0x91ab863e 6932b8021494Sopenharmony_ci __ dci(0x444435c5); // sqrdcmlah z5.h, z14.h, z4.h, #90 6933b8021494Sopenharmony_ci // vl128 state = 0x41bbc90c 6934b8021494Sopenharmony_ci __ dci(0x444c34c7); // sqrdcmlah z7.h, z6.h, z12.h, #90 6935b8021494Sopenharmony_ci // vl128 state = 0xb6329344 6936b8021494Sopenharmony_ci __ dci(0x444836c6); // sqrdcmlah z6.h, z22.h, z8.h, #90 6937b8021494Sopenharmony_ci // vl128 state = 0xdf5f443c 6938b8021494Sopenharmony_ci __ dci(0x444836d6); // sqrdcmlah z22.h, z22.h, z8.h, #90 6939b8021494Sopenharmony_ci // vl128 state = 0x719a2e70 6940b8021494Sopenharmony_ci __ dci(0x44403694); // sqrdcmlah z20.h, z20.h, z0.h, #90 6941b8021494Sopenharmony_ci // vl128 state = 0x28a64934 6942b8021494Sopenharmony_ci __ dci(0x4449369c); // sqrdcmlah z28.h, z20.h, z9.h, #90 6943b8021494Sopenharmony_ci // vl128 state = 0x5d41ba84 6944b8021494Sopenharmony_ci } 6945b8021494Sopenharmony_ci 6946b8021494Sopenharmony_ci uint32_t state; 6947b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 6948b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 6949b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 6950b8021494Sopenharmony_ci 6951b8021494Sopenharmony_ci END(); 6952b8021494Sopenharmony_ci if (CAN_RUN()) { 6953b8021494Sopenharmony_ci RUN(); 6954b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 6955b8021494Sopenharmony_ci 0x5d41ba84, 6956b8021494Sopenharmony_ci 0xd5e52f4d, 6957b8021494Sopenharmony_ci 0x9f627c0d, 6958b8021494Sopenharmony_ci 0x111f21a7, 6959b8021494Sopenharmony_ci 0x5d7b356e, 6960b8021494Sopenharmony_ci 0x1f345c0e, 6961b8021494Sopenharmony_ci 0xd881296e, 6962b8021494Sopenharmony_ci 0x819f9091, 6963b8021494Sopenharmony_ci 0x59823550, 6964b8021494Sopenharmony_ci 0xbe2162c7, 6965b8021494Sopenharmony_ci 0x5f5dca40, 6966b8021494Sopenharmony_ci 0xad7e429e, 6967b8021494Sopenharmony_ci 0x4f66661f, 6968b8021494Sopenharmony_ci 0x7c5fbca0, 6969b8021494Sopenharmony_ci 0x819ff997, 6970b8021494Sopenharmony_ci 0x68ebdb56, 6971b8021494Sopenharmony_ci }; 6972b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 6973b8021494Sopenharmony_ci } 6974b8021494Sopenharmony_ci} 6975b8021494Sopenharmony_ci 6976b8021494Sopenharmony_ciTEST_SVE(sve2_complex_integer_multiply_add_indexed) { 6977b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 6978b8021494Sopenharmony_ci CPUFeatures::kSVE2, 6979b8021494Sopenharmony_ci CPUFeatures::kNEON, 6980b8021494Sopenharmony_ci CPUFeatures::kCRC32); 6981b8021494Sopenharmony_ci START(); 6982b8021494Sopenharmony_ci 6983b8021494Sopenharmony_ci SetInitialMachineState(&masm); 6984b8021494Sopenharmony_ci // state = 0xe2bd2480 6985b8021494Sopenharmony_ci 6986b8021494Sopenharmony_ci { 6987b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 20 * kInstructionSize); 6988b8021494Sopenharmony_ci __ dci(0x44fd7d52); // sqrdcmlah z18.s, z10.s, z13.s[1], #270 6989b8021494Sopenharmony_ci // vl128 state = 0x5c66baad 6990b8021494Sopenharmony_ci __ dci(0x44fd7c13); // sqrdcmlah z19.s, z0.s, z13.s[1], #270 6991b8021494Sopenharmony_ci // vl128 state = 0xac8c451b 6992b8021494Sopenharmony_ci __ dci(0x44f97e11); // sqrdcmlah z17.s, z16.s, z9.s[1], #270 6993b8021494Sopenharmony_ci // vl128 state = 0x02ebccdb 6994b8021494Sopenharmony_ci __ dci(0x44e97615); // sqrdcmlah z21.s, z16.s, z9.s[0], #90 6995b8021494Sopenharmony_ci // vl128 state = 0xe43b1032 6996b8021494Sopenharmony_ci __ dci(0x44e97614); // sqrdcmlah z20.s, z16.s, z9.s[0], #90 6997b8021494Sopenharmony_ci // vl128 state = 0xa28d9898 6998b8021494Sopenharmony_ci __ dci(0x44e17635); // sqrdcmlah z21.s, z17.s, z1.s[0], #90 6999b8021494Sopenharmony_ci // vl128 state = 0x021764c6 7000b8021494Sopenharmony_ci __ dci(0x44e17634); // sqrdcmlah z20.s, z17.s, z1.s[0], #90 7001b8021494Sopenharmony_ci // vl128 state = 0x812dbf22 7002b8021494Sopenharmony_ci __ dci(0x44f07635); // sqrdcmlah z21.s, z17.s, z0.s[1], #90 7003b8021494Sopenharmony_ci // vl128 state = 0x5e87a59e 7004b8021494Sopenharmony_ci __ dci(0x44f07465); // sqrdcmlah z5.s, z3.s, z0.s[1], #90 7005b8021494Sopenharmony_ci // vl128 state = 0xd1a78d9d 7006b8021494Sopenharmony_ci __ dci(0x44f87675); // sqrdcmlah z21.s, z19.s, z8.s[1], #90 7007b8021494Sopenharmony_ci // vl128 state = 0xd4500975 7008b8021494Sopenharmony_ci __ dci(0x44b87e7d); // sqrdcmlah z29.h, z19.h, z0.h[3], #270 7009b8021494Sopenharmony_ci // vl128 state = 0x765230ab 7010b8021494Sopenharmony_ci __ dci(0x44b876f9); // sqrdcmlah z25.h, z23.h, z0.h[3], #90 7011b8021494Sopenharmony_ci // vl128 state = 0xca9c5bb4 7012b8021494Sopenharmony_ci __ dci(0x44f874fb); // sqrdcmlah z27.s, z7.s, z8.s[1], #90 7013b8021494Sopenharmony_ci // vl128 state = 0xa4bc044a 7014b8021494Sopenharmony_ci __ dci(0x44f070fa); // sqrdcmlah z26.s, z7.s, z0.s[1], #0 7015b8021494Sopenharmony_ci // vl128 state = 0xd0eaa1df 7016b8021494Sopenharmony_ci __ dci(0x44f07038); // sqrdcmlah z24.s, z1.s, z0.s[1], #0 7017b8021494Sopenharmony_ci // vl128 state = 0x80836f9f 7018b8021494Sopenharmony_ci __ dci(0x44b17030); // sqrdcmlah z16.h, z1.h, z1.h[2], #0 7019b8021494Sopenharmony_ci // vl128 state = 0x59ffa1ce 7020b8021494Sopenharmony_ci __ dci(0x44b17032); // sqrdcmlah z18.h, z1.h, z1.h[2], #0 7021b8021494Sopenharmony_ci // vl128 state = 0xdb8beca5 7022b8021494Sopenharmony_ci __ dci(0x44b07430); // sqrdcmlah z16.h, z1.h, z0.h[2], #90 7023b8021494Sopenharmony_ci // vl128 state = 0xe5b6a0e3 7024b8021494Sopenharmony_ci __ dci(0x44b07438); // sqrdcmlah z24.h, z1.h, z0.h[2], #90 7025b8021494Sopenharmony_ci // vl128 state = 0x19cc8c20 7026b8021494Sopenharmony_ci __ dci(0x44b0743a); // sqrdcmlah z26.h, z1.h, z0.h[2], #90 7027b8021494Sopenharmony_ci // vl128 state = 0x19c819af 7028b8021494Sopenharmony_ci } 7029b8021494Sopenharmony_ci 7030b8021494Sopenharmony_ci uint32_t state; 7031b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 7032b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 7033b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 7034b8021494Sopenharmony_ci 7035b8021494Sopenharmony_ci END(); 7036b8021494Sopenharmony_ci if (CAN_RUN()) { 7037b8021494Sopenharmony_ci RUN(); 7038b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 7039b8021494Sopenharmony_ci 0x19c819af, 7040b8021494Sopenharmony_ci 0xbb2225f2, 7041b8021494Sopenharmony_ci 0x7e54f513, 7042b8021494Sopenharmony_ci 0xdcbf6f0f, 7043b8021494Sopenharmony_ci 0x2bfdc97d, 7044b8021494Sopenharmony_ci 0x48890c54, 7045b8021494Sopenharmony_ci 0x65542c02, 7046b8021494Sopenharmony_ci 0xaef6b224, 7047b8021494Sopenharmony_ci 0x993b14fd, 7048b8021494Sopenharmony_ci 0x244d27c5, 7049b8021494Sopenharmony_ci 0xe8767ba8, 7050b8021494Sopenharmony_ci 0x4397a148, 7051b8021494Sopenharmony_ci 0xb3efcd2e, 7052b8021494Sopenharmony_ci 0xb5894aba, 7053b8021494Sopenharmony_ci 0x2a0f6f7a, 7054b8021494Sopenharmony_ci 0xbe45142c, 7055b8021494Sopenharmony_ci }; 7056b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 7057b8021494Sopenharmony_ci } 7058b8021494Sopenharmony_ci} 7059b8021494Sopenharmony_ci 7060b8021494Sopenharmony_ciTEST_SVE(sve2_saturating_multiply_add_long_vector) { 7061b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 7062b8021494Sopenharmony_ci CPUFeatures::kSVE2, 7063b8021494Sopenharmony_ci CPUFeatures::kNEON, 7064b8021494Sopenharmony_ci CPUFeatures::kCRC32); 7065b8021494Sopenharmony_ci START(); 7066b8021494Sopenharmony_ci 7067b8021494Sopenharmony_ci SetInitialMachineState(&masm); 7068b8021494Sopenharmony_ci // state = 0xe2bd2480 7069b8021494Sopenharmony_ci 7070b8021494Sopenharmony_ci { 7071b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 40 * kInstructionSize); 7072b8021494Sopenharmony_ci __ dci(0x44db629b); // sqdmlalb z27.d, z20.s, z27.s 7073b8021494Sopenharmony_ci // vl128 state = 0x61e408e4 7074b8021494Sopenharmony_ci __ dci(0x44db631f); // sqdmlalb z31.d, z24.s, z27.s 7075b8021494Sopenharmony_ci // vl128 state = 0xf146813f 7076b8021494Sopenharmony_ci __ dci(0x44da6b1d); // sqdmlslb z29.d, z24.s, z26.s 7077b8021494Sopenharmony_ci // vl128 state = 0xb8d07371 7078b8021494Sopenharmony_ci __ dci(0x44da6a35); // sqdmlslb z21.d, z17.s, z26.s 7079b8021494Sopenharmony_ci // vl128 state = 0xaf43cc88 7080b8021494Sopenharmony_ci __ dci(0x444a6a3d); // sqdmlslb z29.h, z17.b, z10.b 7081b8021494Sopenharmony_ci // vl128 state = 0xba4c5067 7082b8021494Sopenharmony_ci __ dci(0x444a6a39); // sqdmlslb z25.h, z17.b, z10.b 7083b8021494Sopenharmony_ci // vl128 state = 0x396202c3 7084b8021494Sopenharmony_ci __ dci(0x445a6829); // sqdmlslb z9.h, z1.b, z26.b 7085b8021494Sopenharmony_ci // vl128 state = 0x22095f7f 7086b8021494Sopenharmony_ci __ dci(0x445a6b28); // sqdmlslb z8.h, z25.b, z26.b 7087b8021494Sopenharmony_ci // vl128 state = 0xa9516b4b 7088b8021494Sopenharmony_ci __ dci(0x44da6b69); // sqdmlslb z9.d, z27.s, z26.s 7089b8021494Sopenharmony_ci // vl128 state = 0x1f048226 7090b8021494Sopenharmony_ci __ dci(0x44da616d); // sqdmlalb z13.d, z11.s, z26.s 7091b8021494Sopenharmony_ci // vl128 state = 0x0fdd982f 7092b8021494Sopenharmony_ci __ dci(0x4458616f); // sqdmlalb z15.h, z11.b, z24.b 7093b8021494Sopenharmony_ci // vl128 state = 0x461ba137 7094b8021494Sopenharmony_ci __ dci(0x4449617f); // sqdmlalb z31.h, z11.b, z9.b 7095b8021494Sopenharmony_ci // vl128 state = 0xd1071b0c 7096b8021494Sopenharmony_ci __ dci(0x4459614f); // sqdmlalb z15.h, z10.b, z25.b 7097b8021494Sopenharmony_ci // vl128 state = 0x0fa6bae7 7098b8021494Sopenharmony_ci __ dci(0x4458654d); // sqdmlalt z13.h, z10.b, z24.b 7099b8021494Sopenharmony_ci // vl128 state = 0xebd08a80 7100b8021494Sopenharmony_ci __ dci(0x44586d05); // sqdmlslt z5.h, z8.b, z24.b 7101b8021494Sopenharmony_ci // vl128 state = 0xd4c41665 7102b8021494Sopenharmony_ci __ dci(0x44506d84); // sqdmlslt z4.h, z12.b, z16.b 7103b8021494Sopenharmony_ci // vl128 state = 0x80f619f9 7104b8021494Sopenharmony_ci __ dci(0x44506fc6); // sqdmlslt z6.h, z30.b, z16.b 7105b8021494Sopenharmony_ci // vl128 state = 0xb588af21 7106b8021494Sopenharmony_ci __ dci(0x44566fc4); // sqdmlslt z4.h, z30.b, z22.b 7107b8021494Sopenharmony_ci // vl128 state = 0x4dd8437a 7108b8021494Sopenharmony_ci __ dci(0x44566f0c); // sqdmlslt z12.h, z24.b, z22.b 7109b8021494Sopenharmony_ci // vl128 state = 0x48ca6e5c 7110b8021494Sopenharmony_ci __ dci(0x44566f0e); // sqdmlslt z14.h, z24.b, z22.b 7111b8021494Sopenharmony_ci // vl128 state = 0x02d6f977 7112b8021494Sopenharmony_ci __ dci(0x44566746); // sqdmlalt z6.h, z26.b, z22.b 7113b8021494Sopenharmony_ci // vl128 state = 0x179f59f4 7114b8021494Sopenharmony_ci __ dci(0x445767c4); // sqdmlalt z4.h, z30.b, z23.b 7115b8021494Sopenharmony_ci // vl128 state = 0xf2d2823c 7116b8021494Sopenharmony_ci __ dci(0x44d667c0); // sqdmlalt z0.d, z30.s, z22.s 7117b8021494Sopenharmony_ci // vl128 state = 0x404c277e 7118b8021494Sopenharmony_ci __ dci(0x44566742); // sqdmlalt z2.h, z26.b, z22.b 7119b8021494Sopenharmony_ci // vl128 state = 0x986a72c1 7120b8021494Sopenharmony_ci __ dci(0x44c6674a); // sqdmlalt z10.d, z26.s, z6.s 7121b8021494Sopenharmony_ci // vl128 state = 0xbb8044ab 7122b8021494Sopenharmony_ci __ dci(0x44c66742); // sqdmlalt z2.d, z26.s, z6.s 7123b8021494Sopenharmony_ci // vl128 state = 0x9f5b244b 7124b8021494Sopenharmony_ci __ dci(0x44ce6706); // sqdmlalt z6.d, z24.s, z14.s 7125b8021494Sopenharmony_ci // vl128 state = 0xc6ce6266 7126b8021494Sopenharmony_ci __ dci(0x44ce670e); // sqdmlalt z14.d, z24.s, z14.s 7127b8021494Sopenharmony_ci // vl128 state = 0xc9e1a461 7128b8021494Sopenharmony_ci __ dci(0x44de6746); // sqdmlalt z6.d, z26.s, z30.s 7129b8021494Sopenharmony_ci // vl128 state = 0x9f133504 7130b8021494Sopenharmony_ci __ dci(0x44dc6342); // sqdmlalb z2.d, z26.s, z28.s 7131b8021494Sopenharmony_ci // vl128 state = 0x42deb468 7132b8021494Sopenharmony_ci __ dci(0x44d46366); // sqdmlalb z6.d, z27.s, z20.s 7133b8021494Sopenharmony_ci // vl128 state = 0xb3436cd4 7134b8021494Sopenharmony_ci __ dci(0x44d5626e); // sqdmlalb z14.d, z19.s, z21.s 7135b8021494Sopenharmony_ci // vl128 state = 0x0e0533ac 7136b8021494Sopenharmony_ci __ dci(0x44d5646f); // sqdmlalt z15.d, z3.s, z21.s 7137b8021494Sopenharmony_ci // vl128 state = 0x92d04e7b 7138b8021494Sopenharmony_ci __ dci(0x44d36467); // sqdmlalt z7.d, z3.s, z19.s 7139b8021494Sopenharmony_ci // vl128 state = 0xd9fa8b4d 7140b8021494Sopenharmony_ci __ dci(0x44d360ef); // sqdmlalb z15.d, z7.s, z19.s 7141b8021494Sopenharmony_ci // vl128 state = 0x9c9a5778 7142b8021494Sopenharmony_ci __ dci(0x44d3646b); // sqdmlalt z11.d, z3.s, z19.s 7143b8021494Sopenharmony_ci // vl128 state = 0x40d7c923 7144b8021494Sopenharmony_ci __ dci(0x4492646f); // sqdmlalt z15.s, z3.h, z18.h 7145b8021494Sopenharmony_ci // vl128 state = 0x0b5b2334 7146b8021494Sopenharmony_ci __ dci(0x4492647f); // sqdmlalt z31.s, z3.h, z18.h 7147b8021494Sopenharmony_ci // vl128 state = 0xfe6302c1 7148b8021494Sopenharmony_ci __ dci(0x4494647d); // sqdmlalt z29.s, z3.h, z20.h 7149b8021494Sopenharmony_ci // vl128 state = 0xe3c05a37 7150b8021494Sopenharmony_ci __ dci(0x4484666d); // sqdmlalt z13.s, z19.h, z4.h 7151b8021494Sopenharmony_ci // vl128 state = 0x15169e94 7152b8021494Sopenharmony_ci } 7153b8021494Sopenharmony_ci 7154b8021494Sopenharmony_ci uint32_t state; 7155b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 7156b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 7157b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 7158b8021494Sopenharmony_ci 7159b8021494Sopenharmony_ci END(); 7160b8021494Sopenharmony_ci if (CAN_RUN()) { 7161b8021494Sopenharmony_ci RUN(); 7162b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 7163b8021494Sopenharmony_ci 0x15169e94, 7164b8021494Sopenharmony_ci 0x6101102c, 7165b8021494Sopenharmony_ci 0xa5586d26, 7166b8021494Sopenharmony_ci 0x3fbf4f9f, 7167b8021494Sopenharmony_ci 0x8e62994d, 7168b8021494Sopenharmony_ci 0x4d77a9e5, 7169b8021494Sopenharmony_ci 0x4ceadc9e, 7170b8021494Sopenharmony_ci 0x8247db61, 7171b8021494Sopenharmony_ci 0x4aa10859, 7172b8021494Sopenharmony_ci 0x0b3280b3, 7173b8021494Sopenharmony_ci 0x015d75ea, 7174b8021494Sopenharmony_ci 0x1cf4825e, 7175b8021494Sopenharmony_ci 0xda7d3fea, 7176b8021494Sopenharmony_ci 0xc24bd624, 7177b8021494Sopenharmony_ci 0x60ee565a, 7178b8021494Sopenharmony_ci 0x7ac92c39, 7179b8021494Sopenharmony_ci }; 7180b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 7181b8021494Sopenharmony_ci } 7182b8021494Sopenharmony_ci} 7183b8021494Sopenharmony_ci 7184b8021494Sopenharmony_ciTEST_SVE(sve2_saturating_multiply_add_interleaved_long) { 7185b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 7186b8021494Sopenharmony_ci CPUFeatures::kSVE2, 7187b8021494Sopenharmony_ci CPUFeatures::kNEON, 7188b8021494Sopenharmony_ci CPUFeatures::kCRC32); 7189b8021494Sopenharmony_ci START(); 7190b8021494Sopenharmony_ci 7191b8021494Sopenharmony_ci SetInitialMachineState(&masm); 7192b8021494Sopenharmony_ci // state = 0xe2bd2480 7193b8021494Sopenharmony_ci 7194b8021494Sopenharmony_ci { 7195b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 30 * kInstructionSize); 7196b8021494Sopenharmony_ci __ dci(0x449e0ac6); // sqdmlalbt z6.s, z22.h, z30.h 7197b8021494Sopenharmony_ci // vl128 state = 0x1f0ef37c 7198b8021494Sopenharmony_ci __ dci(0x449c0ae4); // sqdmlalbt z4.s, z23.h, z28.h 7199b8021494Sopenharmony_ci // vl128 state = 0xa80bf2c8 7200b8021494Sopenharmony_ci __ dci(0x449c0ae6); // sqdmlalbt z6.s, z23.h, z28.h 7201b8021494Sopenharmony_ci // vl128 state = 0x4c5b0e8f 7202b8021494Sopenharmony_ci __ dci(0x449e0aae); // sqdmlalbt z14.s, z21.h, z30.h 7203b8021494Sopenharmony_ci // vl128 state = 0xa6482041 7204b8021494Sopenharmony_ci __ dci(0x449e0aaf); // sqdmlalbt z15.s, z21.h, z30.h 7205b8021494Sopenharmony_ci // vl128 state = 0x6ef82b7a 7206b8021494Sopenharmony_ci __ dci(0x449c0a2b); // sqdmlalbt z11.s, z17.h, z28.h 7207b8021494Sopenharmony_ci // vl128 state = 0x0070a7fa 7208b8021494Sopenharmony_ci __ dci(0x449e0829); // sqdmlalbt z9.s, z1.h, z30.h 7209b8021494Sopenharmony_ci // vl128 state = 0x08b9efc6 7210b8021494Sopenharmony_ci __ dci(0x449e0c61); // sqdmlslbt z1.s, z3.h, z30.h 7211b8021494Sopenharmony_ci // vl128 state = 0xebd25c16 7212b8021494Sopenharmony_ci __ dci(0x449e0c60); // sqdmlslbt z0.s, z3.h, z30.h 7213b8021494Sopenharmony_ci // vl128 state = 0x0926abbe 7214b8021494Sopenharmony_ci __ dci(0x449e0c70); // sqdmlslbt z16.s, z3.h, z30.h 7215b8021494Sopenharmony_ci // vl128 state = 0xe9d3e5a7 7216b8021494Sopenharmony_ci __ dci(0x449f0cf4); // sqdmlslbt z20.s, z7.h, z31.h 7217b8021494Sopenharmony_ci // vl128 state = 0xf062523d 7218b8021494Sopenharmony_ci __ dci(0x449f08b5); // sqdmlalbt z21.s, z5.h, z31.h 7219b8021494Sopenharmony_ci // vl128 state = 0x6034c14e 7220b8021494Sopenharmony_ci __ dci(0x449f08a5); // sqdmlalbt z5.s, z5.h, z31.h 7221b8021494Sopenharmony_ci // vl128 state = 0x0a73c74b 7222b8021494Sopenharmony_ci __ dci(0x448e08b5); // sqdmlalbt z21.s, z5.h, z14.h 7223b8021494Sopenharmony_ci // vl128 state = 0xa4af2700 7224b8021494Sopenharmony_ci __ dci(0x448c08e5); // sqdmlalbt z5.s, z7.h, z12.h 7225b8021494Sopenharmony_ci // vl128 state = 0x7499c587 7226b8021494Sopenharmony_ci __ dci(0x448c08e1); // sqdmlalbt z1.s, z7.h, z12.h 7227b8021494Sopenharmony_ci // vl128 state = 0x968bca0e 7228b8021494Sopenharmony_ci __ dci(0x448c0971); // sqdmlalbt z17.s, z11.h, z12.h 7229b8021494Sopenharmony_ci // vl128 state = 0xd7890449 7230b8021494Sopenharmony_ci __ dci(0x448f0975); // sqdmlalbt z21.s, z11.h, z15.h 7231b8021494Sopenharmony_ci // vl128 state = 0xa2393863 7232b8021494Sopenharmony_ci __ dci(0x448f0977); // sqdmlalbt z23.s, z11.h, z15.h 7233b8021494Sopenharmony_ci // vl128 state = 0x0f7d9688 7234b8021494Sopenharmony_ci __ dci(0x449f093f); // sqdmlalbt z31.s, z9.h, z31.h 7235b8021494Sopenharmony_ci // vl128 state = 0xeb16ca99 7236b8021494Sopenharmony_ci __ dci(0x449f09f7); // sqdmlalbt z23.s, z15.h, z31.h 7237b8021494Sopenharmony_ci // vl128 state = 0x5eca8b00 7238b8021494Sopenharmony_ci __ dci(0x449f0987); // sqdmlalbt z7.s, z12.h, z31.h 7239b8021494Sopenharmony_ci // vl128 state = 0xf8f22744 7240b8021494Sopenharmony_ci __ dci(0x449f0a83); // sqdmlalbt z3.s, z20.h, z31.h 7241b8021494Sopenharmony_ci // vl128 state = 0xc20d54f5 7242b8021494Sopenharmony_ci __ dci(0x449b0ac1); // sqdmlalbt z1.s, z22.h, z27.h 7243b8021494Sopenharmony_ci // vl128 state = 0xf371a13b 7244b8021494Sopenharmony_ci __ dci(0x449b0aa9); // sqdmlalbt z9.s, z21.h, z27.h 7245b8021494Sopenharmony_ci // vl128 state = 0xffae55ce 7246b8021494Sopenharmony_ci __ dci(0x449b0ab9); // sqdmlalbt z25.s, z21.h, z27.h 7247b8021494Sopenharmony_ci // vl128 state = 0x0c5ab866 7248b8021494Sopenharmony_ci __ dci(0x44d30aa9); // sqdmlalbt z9.d, z21.s, z19.s 7249b8021494Sopenharmony_ci // vl128 state = 0x388bfe27 7250b8021494Sopenharmony_ci __ dci(0x44d30aab); // sqdmlalbt z11.d, z21.s, z19.s 7251b8021494Sopenharmony_ci // vl128 state = 0x6dc15ec8 7252b8021494Sopenharmony_ci __ dci(0x44d70baf); // sqdmlalbt z15.d, z29.s, z23.s 7253b8021494Sopenharmony_ci // vl128 state = 0x6a858021 7254b8021494Sopenharmony_ci __ dci(0x44d70ba7); // sqdmlalbt z7.d, z29.s, z23.s 7255b8021494Sopenharmony_ci // vl128 state = 0x52416517 7256b8021494Sopenharmony_ci } 7257b8021494Sopenharmony_ci 7258b8021494Sopenharmony_ci uint32_t state; 7259b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 7260b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 7261b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 7262b8021494Sopenharmony_ci 7263b8021494Sopenharmony_ci END(); 7264b8021494Sopenharmony_ci if (CAN_RUN()) { 7265b8021494Sopenharmony_ci RUN(); 7266b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 7267b8021494Sopenharmony_ci 0x52416517, 7268b8021494Sopenharmony_ci 0x1a625e10, 7269b8021494Sopenharmony_ci 0x3eaaa30f, 7270b8021494Sopenharmony_ci 0x0eefe820, 7271b8021494Sopenharmony_ci 0x9e2f7744, 7272b8021494Sopenharmony_ci 0x3dbc3206, 7273b8021494Sopenharmony_ci 0xca85b926, 7274b8021494Sopenharmony_ci 0x9428c809, 7275b8021494Sopenharmony_ci 0x7c35818c, 7276b8021494Sopenharmony_ci 0xb8bc3648, 7277b8021494Sopenharmony_ci 0x5b215c50, 7278b8021494Sopenharmony_ci 0xbdb56ba5, 7279b8021494Sopenharmony_ci 0xe4e4bc54, 7280b8021494Sopenharmony_ci 0x69ba132f, 7281b8021494Sopenharmony_ci 0xa498b17a, 7282b8021494Sopenharmony_ci 0xf482b2a6, 7283b8021494Sopenharmony_ci }; 7284b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 7285b8021494Sopenharmony_ci } 7286b8021494Sopenharmony_ci} 7287b8021494Sopenharmony_ci 7288b8021494Sopenharmony_ciTEST_SVE(sve2_saturating_multiply_add_long_indexed) { 7289b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 7290b8021494Sopenharmony_ci CPUFeatures::kSVE2, 7291b8021494Sopenharmony_ci CPUFeatures::kNEON, 7292b8021494Sopenharmony_ci CPUFeatures::kCRC32); 7293b8021494Sopenharmony_ci START(); 7294b8021494Sopenharmony_ci 7295b8021494Sopenharmony_ci SetInitialMachineState(&masm); 7296b8021494Sopenharmony_ci // state = 0xe2bd2480 7297b8021494Sopenharmony_ci 7298b8021494Sopenharmony_ci { 7299b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 7300b8021494Sopenharmony_ci __ dci(0x44f52e3d); // sqdmlalt z29.d, z17.s, z5.s[3] 7301b8021494Sopenharmony_ci // vl128 state = 0x2a284ede 7302b8021494Sopenharmony_ci __ dci(0x44f52e3c); // sqdmlalt z28.d, z17.s, z5.s[3] 7303b8021494Sopenharmony_ci // vl128 state = 0x48a615e9 7304b8021494Sopenharmony_ci __ dci(0x44f72c3d); // sqdmlalt z29.d, z1.s, z7.s[3] 7305b8021494Sopenharmony_ci // vl128 state = 0x1bbe9cc5 7306b8021494Sopenharmony_ci __ dci(0x44b62c35); // sqdmlalt z21.s, z1.h, z6.h[5] 7307b8021494Sopenharmony_ci // vl128 state = 0x99966225 7308b8021494Sopenharmony_ci __ dci(0x44b624b7); // sqdmlalt z23.s, z5.h, z6.h[4] 7309b8021494Sopenharmony_ci // vl128 state = 0x36da4a3a 7310b8021494Sopenharmony_ci __ dci(0x44f626b6); // sqdmlalt z22.d, z21.s, z6.s[2] 7311b8021494Sopenharmony_ci // vl128 state = 0xc009e514 7312b8021494Sopenharmony_ci __ dci(0x44f62226); // sqdmlalb z6.d, z17.s, z6.s[2] 7313b8021494Sopenharmony_ci // vl128 state = 0x2140ee4b 7314b8021494Sopenharmony_ci __ dci(0x44fa222e); // sqdmlalb z14.d, z17.s, z10.s[2] 7315b8021494Sopenharmony_ci // vl128 state = 0xf78c8bec 7316b8021494Sopenharmony_ci __ dci(0x44fa2aac); // sqdmlalb z12.d, z21.s, z10.s[3] 7317b8021494Sopenharmony_ci // vl128 state = 0x329238c6 7318b8021494Sopenharmony_ci __ dci(0x44fa2abc); // sqdmlalb z28.d, z21.s, z10.s[3] 7319b8021494Sopenharmony_ci // vl128 state = 0xadc9f9db 7320b8021494Sopenharmony_ci __ dci(0x44fa2aac); // sqdmlalb z12.d, z21.s, z10.s[3] 7321b8021494Sopenharmony_ci // vl128 state = 0x877f64cf 7322b8021494Sopenharmony_ci __ dci(0x44ba2a88); // sqdmlalb z8.s, z20.h, z2.h[7] 7323b8021494Sopenharmony_ci // vl128 state = 0x4e4a3117 7324b8021494Sopenharmony_ci __ dci(0x44fb2a89); // sqdmlalb z9.d, z20.s, z11.s[3] 7325b8021494Sopenharmony_ci // vl128 state = 0xe26b041b 7326b8021494Sopenharmony_ci __ dci(0x44f32ab9); // sqdmlalb z25.d, z21.s, z3.s[3] 7327b8021494Sopenharmony_ci // vl128 state = 0xbcf4e0b2 7328b8021494Sopenharmony_ci __ dci(0x44e328bd); // sqdmlalb z29.d, z5.s, z3.s[1] 7329b8021494Sopenharmony_ci // vl128 state = 0x31391cc2 7330b8021494Sopenharmony_ci __ dci(0x44f228ad); // sqdmlalb z13.d, z5.s, z2.s[3] 7331b8021494Sopenharmony_ci // vl128 state = 0xf4c6c098 7332b8021494Sopenharmony_ci __ dci(0x44e238af); // sqdmlslb z15.d, z5.s, z2.s[1] 7333b8021494Sopenharmony_ci // vl128 state = 0x6e7cb20c 7334b8021494Sopenharmony_ci __ dci(0x44e639ad); // sqdmlslb z13.d, z13.s, z6.s[1] 7335b8021494Sopenharmony_ci // vl128 state = 0xed16e292 7336b8021494Sopenharmony_ci __ dci(0x44a63daf); // sqdmlslt z15.s, z13.h, z6.h[1] 7337b8021494Sopenharmony_ci // vl128 state = 0x7c0c3a9a 7338b8021494Sopenharmony_ci __ dci(0x44ae3cbf); // sqdmlslt z31.s, z5.h, z6.h[3] 7339b8021494Sopenharmony_ci // vl128 state = 0x0e2dce8d 7340b8021494Sopenharmony_ci __ dci(0x44a634b7); // sqdmlslt z23.s, z5.h, z6.h[0] 7341b8021494Sopenharmony_ci // vl128 state = 0xf3eeab27 7342b8021494Sopenharmony_ci __ dci(0x44e234b5); // sqdmlslt z21.d, z5.s, z2.s[0] 7343b8021494Sopenharmony_ci // vl128 state = 0x55193209 7344b8021494Sopenharmony_ci __ dci(0x44a23437); // sqdmlslt z23.s, z1.h, z2.h[0] 7345b8021494Sopenharmony_ci // vl128 state = 0x7652b538 7346b8021494Sopenharmony_ci __ dci(0x44a63535); // sqdmlslt z21.s, z9.h, z6.h[0] 7347b8021494Sopenharmony_ci // vl128 state = 0x76046ab4 7348b8021494Sopenharmony_ci __ dci(0x44a235b4); // sqdmlslt z20.s, z13.h, z2.h[0] 7349b8021494Sopenharmony_ci // vl128 state = 0x2f23fd0d 7350b8021494Sopenharmony_ci __ dci(0x44a234e4); // sqdmlslt z4.s, z7.h, z2.h[0] 7351b8021494Sopenharmony_ci // vl128 state = 0x2a50774c 7352b8021494Sopenharmony_ci __ dci(0x44a234ec); // sqdmlslt z12.s, z7.h, z2.h[0] 7353b8021494Sopenharmony_ci // vl128 state = 0x01ea8843 7354b8021494Sopenharmony_ci __ dci(0x44a324e8); // sqdmlalt z8.s, z7.h, z3.h[0] 7355b8021494Sopenharmony_ci // vl128 state = 0xed54a157 7356b8021494Sopenharmony_ci __ dci(0x44a334c9); // sqdmlslt z9.s, z6.h, z3.h[0] 7357b8021494Sopenharmony_ci // vl128 state = 0x39e0227b 7358b8021494Sopenharmony_ci __ dci(0x44a324f9); // sqdmlalt z25.s, z7.h, z3.h[0] 7359b8021494Sopenharmony_ci // vl128 state = 0xf163fa0b 7360b8021494Sopenharmony_ci __ dci(0x44a224d8); // sqdmlalt z24.s, z6.h, z2.h[0] 7361b8021494Sopenharmony_ci // vl128 state = 0xbb4e0d24 7362b8021494Sopenharmony_ci __ dci(0x44b22448); // sqdmlalt z8.s, z2.h, z2.h[4] 7363b8021494Sopenharmony_ci // vl128 state = 0x26c102cc 7364b8021494Sopenharmony_ci __ dci(0x44f224d8); // sqdmlalt z24.d, z6.s, z2.s[2] 7365b8021494Sopenharmony_ci // vl128 state = 0x40f79dde 7366b8021494Sopenharmony_ci __ dci(0x44f220f9); // sqdmlalb z25.d, z7.s, z2.s[2] 7367b8021494Sopenharmony_ci // vl128 state = 0xf9d62034 7368b8021494Sopenharmony_ci __ dci(0x44f020a9); // sqdmlalb z9.d, z5.s, z0.s[2] 7369b8021494Sopenharmony_ci // vl128 state = 0x2b78be2f 7370b8021494Sopenharmony_ci __ dci(0x44f424ad); // sqdmlalt z13.d, z5.s, z4.s[2] 7371b8021494Sopenharmony_ci // vl128 state = 0xf0701e23 7372b8021494Sopenharmony_ci __ dci(0x44f430a5); // sqdmlslb z5.d, z5.s, z4.s[2] 7373b8021494Sopenharmony_ci // vl128 state = 0x992b12d6 7374b8021494Sopenharmony_ci __ dci(0x44f130a4); // sqdmlslb z4.d, z5.s, z1.s[2] 7375b8021494Sopenharmony_ci // vl128 state = 0x50292759 7376b8021494Sopenharmony_ci __ dci(0x44f130ac); // sqdmlslb z12.d, z5.s, z1.s[2] 7377b8021494Sopenharmony_ci // vl128 state = 0x795462f2 7378b8021494Sopenharmony_ci __ dci(0x44f3302d); // sqdmlslb z13.d, z1.s, z3.s[2] 7379b8021494Sopenharmony_ci // vl128 state = 0x8ac29815 7380b8021494Sopenharmony_ci __ dci(0x44e3300c); // sqdmlslb z12.d, z0.s, z3.s[0] 7381b8021494Sopenharmony_ci // vl128 state = 0x842471eb 7382b8021494Sopenharmony_ci __ dci(0x44e3300d); // sqdmlslb z13.d, z0.s, z3.s[0] 7383b8021494Sopenharmony_ci // vl128 state = 0x28762af1 7384b8021494Sopenharmony_ci __ dci(0x44eb321d); // sqdmlslb z29.d, z16.s, z11.s[0] 7385b8021494Sopenharmony_ci // vl128 state = 0x352de071 7386b8021494Sopenharmony_ci __ dci(0x44ef3259); // sqdmlslb z25.d, z18.s, z15.s[0] 7387b8021494Sopenharmony_ci // vl128 state = 0x90a4cf15 7388b8021494Sopenharmony_ci __ dci(0x44ff3349); // sqdmlslb z9.d, z26.s, z15.s[2] 7389b8021494Sopenharmony_ci // vl128 state = 0x6be7e76a 7390b8021494Sopenharmony_ci __ dci(0x44fb3319); // sqdmlslb z25.d, z24.s, z11.s[2] 7391b8021494Sopenharmony_ci // vl128 state = 0x7023e2de 7392b8021494Sopenharmony_ci __ dci(0x44bb3b18); // sqdmlslb z24.s, z24.h, z3.h[7] 7393b8021494Sopenharmony_ci // vl128 state = 0xad48664c 7394b8021494Sopenharmony_ci __ dci(0x44bb3b19); // sqdmlslb z25.s, z24.h, z3.h[7] 7395b8021494Sopenharmony_ci // vl128 state = 0xc7d8239b 7396b8021494Sopenharmony_ci __ dci(0x44bb3b11); // sqdmlslb z17.s, z24.h, z3.h[7] 7397b8021494Sopenharmony_ci // vl128 state = 0x0d9b2b9b 7398b8021494Sopenharmony_ci __ dci(0x44f33b15); // sqdmlslb z21.d, z24.s, z3.s[3] 7399b8021494Sopenharmony_ci // vl128 state = 0xbdb9c559 7400b8021494Sopenharmony_ci } 7401b8021494Sopenharmony_ci 7402b8021494Sopenharmony_ci uint32_t state; 7403b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 7404b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 7405b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 7406b8021494Sopenharmony_ci 7407b8021494Sopenharmony_ci END(); 7408b8021494Sopenharmony_ci if (CAN_RUN()) { 7409b8021494Sopenharmony_ci RUN(); 7410b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 7411b8021494Sopenharmony_ci 0xbdb9c559, 7412b8021494Sopenharmony_ci 0x0c2f83d5, 7413b8021494Sopenharmony_ci 0x3e1f2607, 7414b8021494Sopenharmony_ci 0x2db954ea, 7415b8021494Sopenharmony_ci 0xff33857d, 7416b8021494Sopenharmony_ci 0xd567c205, 7417b8021494Sopenharmony_ci 0x8b5ced4c, 7418b8021494Sopenharmony_ci 0x19ecc4d9, 7419b8021494Sopenharmony_ci 0x8581949e, 7420b8021494Sopenharmony_ci 0x30f1a921, 7421b8021494Sopenharmony_ci 0x8c94071b, 7422b8021494Sopenharmony_ci 0xb9ad4919, 7423b8021494Sopenharmony_ci 0x32dbb108, 7424b8021494Sopenharmony_ci 0x634f9cd4, 7425b8021494Sopenharmony_ci 0x2a122429, 7426b8021494Sopenharmony_ci 0xdae127f1, 7427b8021494Sopenharmony_ci }; 7428b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 7429b8021494Sopenharmony_ci } 7430b8021494Sopenharmony_ci} 7431b8021494Sopenharmony_ci 7432b8021494Sopenharmony_ciTEST_SVE(sve2_floating_multiply_add_long_vector) { 7433b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 7434b8021494Sopenharmony_ci CPUFeatures::kSVE2, 7435b8021494Sopenharmony_ci CPUFeatures::kNEON, 7436b8021494Sopenharmony_ci CPUFeatures::kCRC32); 7437b8021494Sopenharmony_ci START(); 7438b8021494Sopenharmony_ci 7439b8021494Sopenharmony_ci SetInitialMachineState(&masm, kFpInputSet); 7440b8021494Sopenharmony_ci // state = 0x1e5cbcac 7441b8021494Sopenharmony_ci 7442b8021494Sopenharmony_ci { 7443b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 30 * kInstructionSize); 7444b8021494Sopenharmony_ci __ dci(0x64bfa635); // fmlslt z21.s, z17.h, z31.h 7445b8021494Sopenharmony_ci // vl128 state = 0x48383595 7446b8021494Sopenharmony_ci __ dci(0x64bf867d); // fmlalt z29.s, z19.h, z31.h 7447b8021494Sopenharmony_ci // vl128 state = 0xf2812c0e 7448b8021494Sopenharmony_ci __ dci(0x64af877c); // fmlalt z28.s, z27.h, z15.h 7449b8021494Sopenharmony_ci // vl128 state = 0x161daf06 7450b8021494Sopenharmony_ci __ dci(0x64af8774); // fmlalt z20.s, z27.h, z15.h 7451b8021494Sopenharmony_ci // vl128 state = 0x8146f2bf 7452b8021494Sopenharmony_ci __ dci(0x64be877c); // fmlalt z28.s, z27.h, z30.h 7453b8021494Sopenharmony_ci // vl128 state = 0x90bcd864 7454b8021494Sopenharmony_ci __ dci(0x64bd876c); // fmlalt z12.s, z27.h, z29.h 7455b8021494Sopenharmony_ci // vl128 state = 0x22b60b78 7456b8021494Sopenharmony_ci __ dci(0x64bf8728); // fmlalt z8.s, z25.h, z31.h 7457b8021494Sopenharmony_ci // vl128 state = 0x2c9ce51a 7458b8021494Sopenharmony_ci __ dci(0x64bf836a); // fmlalb z10.s, z27.h, z31.h 7459b8021494Sopenharmony_ci // vl128 state = 0x40e6b398 7460b8021494Sopenharmony_ci __ dci(0x64bf87eb); // fmlalt z11.s, z31.h, z31.h 7461b8021494Sopenharmony_ci // vl128 state = 0x479c4a98 7462b8021494Sopenharmony_ci __ dci(0x64bf87e9); // fmlalt z9.s, z31.h, z31.h 7463b8021494Sopenharmony_ci // vl128 state = 0x25c987ad 7464b8021494Sopenharmony_ci __ dci(0x64b78779); // fmlalt z25.s, z27.h, z23.h 7465b8021494Sopenharmony_ci // vl128 state = 0xb4fbc429 7466b8021494Sopenharmony_ci __ dci(0x64b1877b); // fmlalt z27.s, z27.h, z17.h 7467b8021494Sopenharmony_ci // vl128 state = 0x390616d8 7468b8021494Sopenharmony_ci __ dci(0x64b1871f); // fmlalt z31.s, z24.h, z17.h 7469b8021494Sopenharmony_ci // vl128 state = 0x7f24d2bf 7470b8021494Sopenharmony_ci __ dci(0x64b5878f); // fmlalt z15.s, z28.h, z21.h 7471b8021494Sopenharmony_ci // vl128 state = 0x01a90318 7472b8021494Sopenharmony_ci __ dci(0x64b4870d); // fmlalt z13.s, z24.h, z20.h 7473b8021494Sopenharmony_ci // vl128 state = 0x08789c2c 7474b8021494Sopenharmony_ci __ dci(0x64b48709); // fmlalt z9.s, z24.h, z20.h 7475b8021494Sopenharmony_ci // vl128 state = 0x169f9b57 7476b8021494Sopenharmony_ci __ dci(0x64b48779); // fmlalt z25.s, z27.h, z20.h 7477b8021494Sopenharmony_ci // vl128 state = 0xad4f23d7 7478b8021494Sopenharmony_ci __ dci(0x64bc8671); // fmlalt z17.s, z19.h, z28.h 7479b8021494Sopenharmony_ci // vl128 state = 0xf86b0a64 7480b8021494Sopenharmony_ci __ dci(0x64b98673); // fmlalt z19.s, z19.h, z25.h 7481b8021494Sopenharmony_ci // vl128 state = 0x78a848b2 7482b8021494Sopenharmony_ci __ dci(0x64b18623); // fmlalt z3.s, z17.h, z17.h 7483b8021494Sopenharmony_ci // vl128 state = 0xcac211c9 7484b8021494Sopenharmony_ci __ dci(0x64b18642); // fmlalt z2.s, z18.h, z17.h 7485b8021494Sopenharmony_ci // vl128 state = 0x9afcbe3f 7486b8021494Sopenharmony_ci __ dci(0x64b1a6c0); // fmlslt z0.s, z22.h, z17.h 7487b8021494Sopenharmony_ci // vl128 state = 0x0047e4b2 7488b8021494Sopenharmony_ci __ dci(0x64b086c4); // fmlalt z4.s, z22.h, z16.h 7489b8021494Sopenharmony_ci // vl128 state = 0x203324b5 7490b8021494Sopenharmony_ci __ dci(0x64b28645); // fmlalt z5.s, z18.h, z18.h 7491b8021494Sopenharmony_ci // vl128 state = 0x7340c432 7492b8021494Sopenharmony_ci __ dci(0x64b28264); // fmlalb z4.s, z19.h, z18.h 7493b8021494Sopenharmony_ci // vl128 state = 0x6dc657a9 7494b8021494Sopenharmony_ci __ dci(0x64b28765); // fmlalt z5.s, z27.h, z18.h 7495b8021494Sopenharmony_ci // vl128 state = 0xa5d3889b 7496b8021494Sopenharmony_ci __ dci(0x64ba8561); // fmlalt z1.s, z11.h, z26.h 7497b8021494Sopenharmony_ci // vl128 state = 0x5bbd2dd9 7498b8021494Sopenharmony_ci __ dci(0x64aa8543); // fmlalt z3.s, z10.h, z10.h 7499b8021494Sopenharmony_ci // vl128 state = 0xa65ec305 7500b8021494Sopenharmony_ci __ dci(0x64ae8141); // fmlalb z1.s, z10.h, z14.h 7501b8021494Sopenharmony_ci // vl128 state = 0xd23d588c 7502b8021494Sopenharmony_ci __ dci(0x64ae80c3); // fmlalb z3.s, z6.h, z14.h 7503b8021494Sopenharmony_ci // vl128 state = 0x5a082bbc 7504b8021494Sopenharmony_ci } 7505b8021494Sopenharmony_ci 7506b8021494Sopenharmony_ci uint32_t state; 7507b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 7508b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 7509b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 7510b8021494Sopenharmony_ci 7511b8021494Sopenharmony_ci END(); 7512b8021494Sopenharmony_ci if (CAN_RUN()) { 7513b8021494Sopenharmony_ci RUN(); 7514b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 7515b8021494Sopenharmony_ci 0x5a082bbc, 7516b8021494Sopenharmony_ci 0x23c41852, 7517b8021494Sopenharmony_ci 0xf462f328, 7518b8021494Sopenharmony_ci 0x6fa4d12b, 7519b8021494Sopenharmony_ci 0x5e5f3e79, 7520b8021494Sopenharmony_ci 0x9939c7e6, 7521b8021494Sopenharmony_ci 0x0ed39313, 7522b8021494Sopenharmony_ci 0x2911107c, 7523b8021494Sopenharmony_ci 0x18f77b9a, 7524b8021494Sopenharmony_ci 0x7226d5b3, 7525b8021494Sopenharmony_ci 0x05df3c07, 7526b8021494Sopenharmony_ci 0x1653749c, 7527b8021494Sopenharmony_ci 0xcb4f6acf, 7528b8021494Sopenharmony_ci 0x4c5f0755, 7529b8021494Sopenharmony_ci 0xc4eed654, 7530b8021494Sopenharmony_ci 0x47893eeb, 7531b8021494Sopenharmony_ci }; 7532b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 7533b8021494Sopenharmony_ci } 7534b8021494Sopenharmony_ci} 7535b8021494Sopenharmony_ci 7536b8021494Sopenharmony_ciTEST_SVE(sve2_mla_long_index) { 7537b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 7538b8021494Sopenharmony_ci CPUFeatures::kSVE2, 7539b8021494Sopenharmony_ci CPUFeatures::kNEON, 7540b8021494Sopenharmony_ci CPUFeatures::kCRC32); 7541b8021494Sopenharmony_ci START(); 7542b8021494Sopenharmony_ci 7543b8021494Sopenharmony_ci SetInitialMachineState(&masm); 7544b8021494Sopenharmony_ci // state = 0xe2bd2480 7545b8021494Sopenharmony_ci 7546b8021494Sopenharmony_ci { 7547b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 7548b8021494Sopenharmony_ci __ dci(0x44ea8d67); // smlalt z7.d, z11.s, z10.s[1] 7549b8021494Sopenharmony_ci // vl128 state = 0xd08dbe24 7550b8021494Sopenharmony_ci __ dci(0x44ea9d2f); // umlalt z15.d, z9.s, z10.s[1] 7551b8021494Sopenharmony_ci // vl128 state = 0x56f6f237 7552b8021494Sopenharmony_ci __ dci(0x44ea9d2d); // umlalt z13.d, z9.s, z10.s[1] 7553b8021494Sopenharmony_ci // vl128 state = 0x00f89e4d 7554b8021494Sopenharmony_ci __ dci(0x44eb992f); // umlalb z15.d, z9.s, z11.s[1] 7555b8021494Sopenharmony_ci // vl128 state = 0xca4e469e 7556b8021494Sopenharmony_ci __ dci(0x44ab99ae); // umlalb z14.s, z13.h, z3.h[3] 7557b8021494Sopenharmony_ci // vl128 state = 0xd4b18276 7558b8021494Sopenharmony_ci __ dci(0x44ad99be); // umlalb z30.s, z13.h, z5.h[3] 7559b8021494Sopenharmony_ci // vl128 state = 0x8650a79e 7560b8021494Sopenharmony_ci __ dci(0x44ad99ba); // umlalb z26.s, z13.h, z5.h[3] 7561b8021494Sopenharmony_ci // vl128 state = 0x6fa1a501 7562b8021494Sopenharmony_ci __ dci(0x44adb9f2); // umlslb z18.s, z15.h, z5.h[3] 7563b8021494Sopenharmony_ci // vl128 state = 0x1a56a5d4 7564b8021494Sopenharmony_ci __ dci(0x44bda9f3); // smlslb z19.s, z15.h, z5.h[7] 7565b8021494Sopenharmony_ci // vl128 state = 0xfdb18057 7566b8021494Sopenharmony_ci __ dci(0x44b9a1fb); // smlslb z27.s, z15.h, z1.h[6] 7567b8021494Sopenharmony_ci // vl128 state = 0xb46b6c28 7568b8021494Sopenharmony_ci __ dci(0x44b8a1b3); // smlslb z19.s, z13.h, z0.h[6] 7569b8021494Sopenharmony_ci // vl128 state = 0x623c62c3 7570b8021494Sopenharmony_ci __ dci(0x44bc81b1); // smlalb z17.s, z13.h, z4.h[6] 7571b8021494Sopenharmony_ci // vl128 state = 0x2abab4d3 7572b8021494Sopenharmony_ci __ dci(0x44bc82b0); // smlalb z16.s, z21.h, z4.h[6] 7573b8021494Sopenharmony_ci // vl128 state = 0x7a028731 7574b8021494Sopenharmony_ci __ dci(0x44ac92b8); // umlalb z24.s, z21.h, z4.h[2] 7575b8021494Sopenharmony_ci // vl128 state = 0xf48f6936 7576b8021494Sopenharmony_ci __ dci(0x44a4923a); // umlalb z26.s, z17.h, z4.h[0] 7577b8021494Sopenharmony_ci // vl128 state = 0xbcdf888d 7578b8021494Sopenharmony_ci __ dci(0x44b49a3e); // umlalb z30.s, z17.h, z4.h[5] 7579b8021494Sopenharmony_ci // vl128 state = 0x5060778e 7580b8021494Sopenharmony_ci __ dci(0x44b69a1c); // umlalb z28.s, z16.h, z6.h[5] 7581b8021494Sopenharmony_ci // vl128 state = 0x16da3835 7582b8021494Sopenharmony_ci __ dci(0x44b6b218); // umlslb z24.s, z16.h, z6.h[4] 7583b8021494Sopenharmony_ci // vl128 state = 0xac7fb4d0 7584b8021494Sopenharmony_ci __ dci(0x44b2b25a); // umlslb z26.s, z18.h, z2.h[4] 7585b8021494Sopenharmony_ci // vl128 state = 0x8d05433b 7586b8021494Sopenharmony_ci __ dci(0x44b2ba0a); // umlslb z10.s, z16.h, z2.h[5] 7587b8021494Sopenharmony_ci // vl128 state = 0x62630101 7588b8021494Sopenharmony_ci __ dci(0x44b29b08); // umlalb z8.s, z24.h, z2.h[5] 7589b8021494Sopenharmony_ci // vl128 state = 0x31ae445b 7590b8021494Sopenharmony_ci __ dci(0x44b29b00); // umlalb z0.s, z24.h, z2.h[5] 7591b8021494Sopenharmony_ci // vl128 state = 0x539a5875 7592b8021494Sopenharmony_ci __ dci(0x44b29e08); // umlalt z8.s, z16.h, z2.h[5] 7593b8021494Sopenharmony_ci // vl128 state = 0x07d4bf73 7594b8021494Sopenharmony_ci __ dci(0x44b29eaa); // umlalt z10.s, z21.h, z2.h[5] 7595b8021494Sopenharmony_ci // vl128 state = 0x314f48a8 7596b8021494Sopenharmony_ci __ dci(0x44b2be2e); // umlslt z14.s, z17.h, z2.h[5] 7597b8021494Sopenharmony_ci // vl128 state = 0x91bd2c17 7598b8021494Sopenharmony_ci __ dci(0x44b2be3e); // umlslt z30.s, z17.h, z2.h[5] 7599b8021494Sopenharmony_ci // vl128 state = 0x4cbf4360 7600b8021494Sopenharmony_ci __ dci(0x44f2be7a); // umlslt z26.d, z19.s, z2.s[3] 7601b8021494Sopenharmony_ci // vl128 state = 0xe94e76a9 7602b8021494Sopenharmony_ci __ dci(0x44f2ae4a); // smlslt z10.d, z18.s, z2.s[3] 7603b8021494Sopenharmony_ci // vl128 state = 0xd0c2c4cc 7604b8021494Sopenharmony_ci __ dci(0x44faae6e); // smlslt z14.d, z19.s, z10.s[3] 7605b8021494Sopenharmony_ci // vl128 state = 0xc64d6839 7606b8021494Sopenharmony_ci __ dci(0x44faae6f); // smlslt z15.d, z19.s, z10.s[3] 7607b8021494Sopenharmony_ci // vl128 state = 0xa74358aa 7608b8021494Sopenharmony_ci __ dci(0x44faae67); // smlslt z7.d, z19.s, z10.s[3] 7609b8021494Sopenharmony_ci // vl128 state = 0xb8d9664b 7610b8021494Sopenharmony_ci __ dci(0x44fa8e57); // smlalt z23.d, z18.s, z10.s[3] 7611b8021494Sopenharmony_ci // vl128 state = 0xf1032ab4 7612b8021494Sopenharmony_ci __ dci(0x44fa8c67); // smlalt z7.d, z3.s, z10.s[3] 7613b8021494Sopenharmony_ci // vl128 state = 0x763732f4 7614b8021494Sopenharmony_ci __ dci(0x44eaac66); // smlslt z6.d, z3.s, z10.s[1] 7615b8021494Sopenharmony_ci // vl128 state = 0xdcf39367 7616b8021494Sopenharmony_ci __ dci(0x44eaa456); // smlslt z22.d, z2.s, z10.s[0] 7617b8021494Sopenharmony_ci // vl128 state = 0x5ea67d82 7618b8021494Sopenharmony_ci __ dci(0x44aea45e); // smlslt z30.s, z2.h, z6.h[2] 7619b8021494Sopenharmony_ci // vl128 state = 0x55da0908 7620b8021494Sopenharmony_ci __ dci(0x44aaa64e); // smlslt z14.s, z18.h, z2.h[2] 7621b8021494Sopenharmony_ci // vl128 state = 0x69d105f5 7622b8021494Sopenharmony_ci __ dci(0x44baa75e); // smlslt z30.s, z26.h, z2.h[6] 7623b8021494Sopenharmony_ci // vl128 state = 0x191bc065 7624b8021494Sopenharmony_ci __ dci(0x44baa75a); // smlslt z26.s, z26.h, z2.h[6] 7625b8021494Sopenharmony_ci // vl128 state = 0xbf62d2a0 7626b8021494Sopenharmony_ci __ dci(0x44eaa75b); // smlslt z27.d, z26.s, z10.s[0] 7627b8021494Sopenharmony_ci // vl128 state = 0x43803a21 7628b8021494Sopenharmony_ci __ dci(0x44eabf5f); // umlslt z31.d, z26.s, z10.s[1] 7629b8021494Sopenharmony_ci // vl128 state = 0x0b33725c 7630b8021494Sopenharmony_ci __ dci(0x44ebbd57); // umlslt z23.d, z10.s, z11.s[1] 7631b8021494Sopenharmony_ci // vl128 state = 0x0059a0f5 7632b8021494Sopenharmony_ci __ dci(0x44abbf55); // umlslt z21.s, z26.h, z3.h[3] 7633b8021494Sopenharmony_ci // vl128 state = 0xb587057f 7634b8021494Sopenharmony_ci __ dci(0x44abab5d); // smlslb z29.s, z26.h, z3.h[3] 7635b8021494Sopenharmony_ci // vl128 state = 0x0bfa30c6 7636b8021494Sopenharmony_ci __ dci(0x44abab5c); // smlslb z28.s, z26.h, z3.h[3] 7637b8021494Sopenharmony_ci // vl128 state = 0x151045b4 7638b8021494Sopenharmony_ci __ dci(0x44abaf78); // smlslt z24.s, z27.h, z3.h[3] 7639b8021494Sopenharmony_ci // vl128 state = 0xedb7fca9 7640b8021494Sopenharmony_ci __ dci(0x44aaa77c); // smlslt z28.s, z27.h, z2.h[2] 7641b8021494Sopenharmony_ci // vl128 state = 0xb68216f9 7642b8021494Sopenharmony_ci __ dci(0x44aaa178); // smlslb z24.s, z11.h, z2.h[2] 7643b8021494Sopenharmony_ci // vl128 state = 0x35447b11 7644b8021494Sopenharmony_ci __ dci(0x44aa81fa); // smlalb z26.s, z15.h, z2.h[2] 7645b8021494Sopenharmony_ci // vl128 state = 0xf532285f 7646b8021494Sopenharmony_ci __ dci(0x44aa8198); // smlalb z24.s, z12.h, z2.h[2] 7647b8021494Sopenharmony_ci // vl128 state = 0xd414889b 7648b8021494Sopenharmony_ci } 7649b8021494Sopenharmony_ci 7650b8021494Sopenharmony_ci uint32_t state; 7651b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 7652b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 7653b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 7654b8021494Sopenharmony_ci 7655b8021494Sopenharmony_ci END(); 7656b8021494Sopenharmony_ci if (CAN_RUN()) { 7657b8021494Sopenharmony_ci RUN(); 7658b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 7659b8021494Sopenharmony_ci 0xd414889b, 7660b8021494Sopenharmony_ci 0x79d8f659, 7661b8021494Sopenharmony_ci 0xe2c8f06b, 7662b8021494Sopenharmony_ci 0x91aadf3d, 7663b8021494Sopenharmony_ci 0xffb92c3e, 7664b8021494Sopenharmony_ci 0xc2d3138e, 7665b8021494Sopenharmony_ci 0xdd9f4396, 7666b8021494Sopenharmony_ci 0xce39a88e, 7667b8021494Sopenharmony_ci 0xfe68a5ca, 7668b8021494Sopenharmony_ci 0xdcb072b2, 7669b8021494Sopenharmony_ci 0x3756ede6, 7670b8021494Sopenharmony_ci 0x5c2eef22, 7671b8021494Sopenharmony_ci 0x01fd02a4, 7672b8021494Sopenharmony_ci 0xdd8d4890, 7673b8021494Sopenharmony_ci 0x87500dc9, 7674b8021494Sopenharmony_ci 0x8c895325, 7675b8021494Sopenharmony_ci }; 7676b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 7677b8021494Sopenharmony_ci } 7678b8021494Sopenharmony_ci} 7679b8021494Sopenharmony_ci 7680b8021494Sopenharmony_ciTEST_SVE(sve2_mul_long_index) { 7681b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 7682b8021494Sopenharmony_ci CPUFeatures::kSVE2, 7683b8021494Sopenharmony_ci CPUFeatures::kNEON, 7684b8021494Sopenharmony_ci CPUFeatures::kCRC32); 7685b8021494Sopenharmony_ci START(); 7686b8021494Sopenharmony_ci 7687b8021494Sopenharmony_ci SetInitialMachineState(&masm); 7688b8021494Sopenharmony_ci // state = 0xe2bd2480 7689b8021494Sopenharmony_ci 7690b8021494Sopenharmony_ci { 7691b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 7692b8021494Sopenharmony_ci __ dci(0x44f1d492); // umullt z18.d, z4.s, z1.s[2] 7693b8021494Sopenharmony_ci // vl128 state = 0x4377a821 7694b8021494Sopenharmony_ci __ dci(0x44fdd490); // umullt z16.d, z4.s, z13.s[2] 7695b8021494Sopenharmony_ci // vl128 state = 0x5879cb00 7696b8021494Sopenharmony_ci __ dci(0x44fdc080); // smullb z0.d, z4.s, z13.s[2] 7697b8021494Sopenharmony_ci // vl128 state = 0xbe0f85f8 7698b8021494Sopenharmony_ci __ dci(0x44fdc081); // smullb z1.d, z4.s, z13.s[2] 7699b8021494Sopenharmony_ci // vl128 state = 0xa0eb0d63 7700b8021494Sopenharmony_ci __ dci(0x44fcc000); // smullb z0.d, z0.s, z12.s[2] 7701b8021494Sopenharmony_ci // vl128 state = 0xf023feb2 7702b8021494Sopenharmony_ci __ dci(0x44ffc001); // smullb z1.d, z0.s, z15.s[2] 7703b8021494Sopenharmony_ci // vl128 state = 0xcc0dcc10 7704b8021494Sopenharmony_ci __ dci(0x44ffc0c9); // smullb z9.d, z6.s, z15.s[2] 7705b8021494Sopenharmony_ci // vl128 state = 0x8e0d2525 7706b8021494Sopenharmony_ci __ dci(0x44f7d0c8); // umullb z8.d, z6.s, z7.s[2] 7707b8021494Sopenharmony_ci // vl128 state = 0xaf711253 7708b8021494Sopenharmony_ci __ dci(0x44b7d080); // umullb z0.s, z4.h, z7.h[4] 7709b8021494Sopenharmony_ci // vl128 state = 0x8cea3501 7710b8021494Sopenharmony_ci __ dci(0x44f7d290); // umullb z16.d, z20.s, z7.s[2] 7711b8021494Sopenharmony_ci // vl128 state = 0x09be9a84 7712b8021494Sopenharmony_ci __ dci(0x44f6da92); // umullb z18.d, z20.s, z6.s[3] 7713b8021494Sopenharmony_ci // vl128 state = 0x3906715f 7714b8021494Sopenharmony_ci __ dci(0x44fed296); // umullb z22.d, z20.s, z14.s[2] 7715b8021494Sopenharmony_ci // vl128 state = 0xf399bb76 7716b8021494Sopenharmony_ci __ dci(0x44f6c292); // smullb z18.d, z20.s, z6.s[2] 7717b8021494Sopenharmony_ci // vl128 state = 0x33ceff98 7718b8021494Sopenharmony_ci __ dci(0x44e6c2a2); // smullb z2.d, z21.s, z6.s[0] 7719b8021494Sopenharmony_ci // vl128 state = 0x00765739 7720b8021494Sopenharmony_ci __ dci(0x44e6c323); // smullb z3.d, z25.s, z6.s[0] 7721b8021494Sopenharmony_ci // vl128 state = 0x3dad5b1f 7722b8021494Sopenharmony_ci __ dci(0x44e6c333); // smullb z19.d, z25.s, z6.s[0] 7723b8021494Sopenharmony_ci // vl128 state = 0xc5b39601 7724b8021494Sopenharmony_ci __ dci(0x44e7c377); // smullb z23.d, z27.s, z7.s[0] 7725b8021494Sopenharmony_ci // vl128 state = 0x134b3d1f 7726b8021494Sopenharmony_ci __ dci(0x44e7d3ff); // umullb z31.d, z31.s, z7.s[0] 7727b8021494Sopenharmony_ci // vl128 state = 0xc4be3961 7728b8021494Sopenharmony_ci __ dci(0x44e7d3fe); // umullb z30.d, z31.s, z7.s[0] 7729b8021494Sopenharmony_ci // vl128 state = 0x195e406b 7730b8021494Sopenharmony_ci __ dci(0x44e7c3da); // smullb z26.d, z30.s, z7.s[0] 7731b8021494Sopenharmony_ci // vl128 state = 0xae2522f9 7732b8021494Sopenharmony_ci __ dci(0x44e7c2fe); // smullb z30.d, z23.s, z7.s[0] 7733b8021494Sopenharmony_ci // vl128 state = 0xed267bfb 7734b8021494Sopenharmony_ci __ dci(0x44e3c3f6); // smullb z22.d, z31.s, z3.s[0] 7735b8021494Sopenharmony_ci // vl128 state = 0x6f6eeec4 7736b8021494Sopenharmony_ci __ dci(0x44f3c2f2); // smullb z18.d, z23.s, z3.s[2] 7737b8021494Sopenharmony_ci // vl128 state = 0x1689afdf 7738b8021494Sopenharmony_ci __ dci(0x44f3c2e2); // smullb z2.d, z23.s, z3.s[2] 7739b8021494Sopenharmony_ci // vl128 state = 0x24999374 7740b8021494Sopenharmony_ci __ dci(0x44f3c06a); // smullb z10.d, z3.s, z3.s[2] 7741b8021494Sopenharmony_ci // vl128 state = 0x046126eb 7742b8021494Sopenharmony_ci __ dci(0x44f3c06b); // smullb z11.d, z3.s, z3.s[2] 7743b8021494Sopenharmony_ci // vl128 state = 0x6b39941f 7744b8021494Sopenharmony_ci __ dci(0x44f3c449); // smullt z9.d, z2.s, z3.s[2] 7745b8021494Sopenharmony_ci // vl128 state = 0xf161bcc6 7746b8021494Sopenharmony_ci __ dci(0x44f3ccc8); // smullt z8.d, z6.s, z3.s[3] 7747b8021494Sopenharmony_ci // vl128 state = 0xbdc67c89 7748b8021494Sopenharmony_ci __ dci(0x44f9ccd8); // smullt z24.d, z6.s, z9.s[3] 7749b8021494Sopenharmony_ci // vl128 state = 0xfed59871 7750b8021494Sopenharmony_ci __ dci(0x44ffccdc); // smullt z28.d, z6.s, z15.s[3] 7751b8021494Sopenharmony_ci // vl128 state = 0x72746ff6 7752b8021494Sopenharmony_ci __ dci(0x44fecc58); // smullt z24.d, z2.s, z14.s[3] 7753b8021494Sopenharmony_ci // vl128 state = 0xa15ee8f2 7754b8021494Sopenharmony_ci __ dci(0x44bfcc48); // smullt z8.s, z2.h, z7.h[7] 7755b8021494Sopenharmony_ci // vl128 state = 0x3dccd2d6 7756b8021494Sopenharmony_ci __ dci(0x44b7c84a); // smullb z10.s, z2.h, z7.h[5] 7757b8021494Sopenharmony_ci // vl128 state = 0x4537f0b2 7758b8021494Sopenharmony_ci __ dci(0x44a5c84e); // smullb z14.s, z2.h, z5.h[1] 7759b8021494Sopenharmony_ci // vl128 state = 0x60e30690 7760b8021494Sopenharmony_ci __ dci(0x44adca46); // smullb z6.s, z18.h, z5.h[3] 7761b8021494Sopenharmony_ci // vl128 state = 0xaef15cb5 7762b8021494Sopenharmony_ci __ dci(0x44add847); // umullb z7.s, z2.h, z5.h[3] 7763b8021494Sopenharmony_ci // vl128 state = 0xe7df553d 7764b8021494Sopenharmony_ci __ dci(0x44bdd04f); // umullb z15.s, z2.h, z5.h[6] 7765b8021494Sopenharmony_ci // vl128 state = 0xa713f809 7766b8021494Sopenharmony_ci __ dci(0x44bdc007); // smullb z7.s, z0.h, z5.h[6] 7767b8021494Sopenharmony_ci // vl128 state = 0x4907c6b7 7768b8021494Sopenharmony_ci __ dci(0x44bdc005); // smullb z5.s, z0.h, z5.h[6] 7769b8021494Sopenharmony_ci // vl128 state = 0x98a83fd0 7770b8021494Sopenharmony_ci __ dci(0x44bdc0b5); // smullb z21.s, z5.h, z5.h[6] 7771b8021494Sopenharmony_ci // vl128 state = 0x3e6cb588 7772b8021494Sopenharmony_ci __ dci(0x44bcc094); // smullb z20.s, z4.h, z4.h[6] 7773b8021494Sopenharmony_ci // vl128 state = 0x37e5a4ce 7774b8021494Sopenharmony_ci __ dci(0x44bcc09c); // smullb z28.s, z4.h, z4.h[6] 7775b8021494Sopenharmony_ci // vl128 state = 0x719de631 7776b8021494Sopenharmony_ci __ dci(0x44acc88c); // smullb z12.s, z4.h, z4.h[3] 7777b8021494Sopenharmony_ci // vl128 state = 0xf0f3dffe 7778b8021494Sopenharmony_ci __ dci(0x44aac884); // smullb z4.s, z4.h, z2.h[3] 7779b8021494Sopenharmony_ci // vl128 state = 0x61a714ff 7780b8021494Sopenharmony_ci __ dci(0x44a8c8ac); // smullb z12.s, z5.h, z0.h[3] 7781b8021494Sopenharmony_ci // vl128 state = 0xc47542ea 7782b8021494Sopenharmony_ci __ dci(0x44a8cea4); // smullt z4.s, z21.h, z0.h[3] 7783b8021494Sopenharmony_ci // vl128 state = 0x37865031 7784b8021494Sopenharmony_ci __ dci(0x44a8daa5); // umullb z5.s, z21.h, z0.h[3] 7785b8021494Sopenharmony_ci // vl128 state = 0x28cf4dc6 7786b8021494Sopenharmony_ci __ dci(0x44b8dae4); // umullb z4.s, z23.h, z0.h[7] 7787b8021494Sopenharmony_ci // vl128 state = 0x6fe181d0 7788b8021494Sopenharmony_ci __ dci(0x44b9da6c); // umullb z12.s, z19.h, z1.h[7] 7789b8021494Sopenharmony_ci // vl128 state = 0xde65c7e3 7790b8021494Sopenharmony_ci __ dci(0x44b9da64); // umullb z4.s, z19.h, z1.h[7] 7791b8021494Sopenharmony_ci // vl128 state = 0x040a7e45 7792b8021494Sopenharmony_ci } 7793b8021494Sopenharmony_ci 7794b8021494Sopenharmony_ci uint32_t state; 7795b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 7796b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 7797b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 7798b8021494Sopenharmony_ci 7799b8021494Sopenharmony_ci END(); 7800b8021494Sopenharmony_ci if (CAN_RUN()) { 7801b8021494Sopenharmony_ci RUN(); 7802b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 7803b8021494Sopenharmony_ci 0x040a7e45, 7804b8021494Sopenharmony_ci 0x48fc4c2b, 7805b8021494Sopenharmony_ci 0x9a1c67d1, 7806b8021494Sopenharmony_ci 0xcb88ffdd, 7807b8021494Sopenharmony_ci 0xcda205bc, 7808b8021494Sopenharmony_ci 0x7a47b6fb, 7809b8021494Sopenharmony_ci 0x68ae16c8, 7810b8021494Sopenharmony_ci 0x483353c9, 7811b8021494Sopenharmony_ci 0x91d91835, 7812b8021494Sopenharmony_ci 0x17a9ca4a, 7813b8021494Sopenharmony_ci 0x4f3d394f, 7814b8021494Sopenharmony_ci 0x5182776c, 7815b8021494Sopenharmony_ci 0xc03c1d3b, 7816b8021494Sopenharmony_ci 0xe52799db, 7817b8021494Sopenharmony_ci 0x1ddd328e, 7818b8021494Sopenharmony_ci 0xe33903de, 7819b8021494Sopenharmony_ci }; 7820b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 7821b8021494Sopenharmony_ci } 7822b8021494Sopenharmony_ci} 7823b8021494Sopenharmony_ci 7824b8021494Sopenharmony_ciTEST_SVE(sve2_sat_double_mul_high) { 7825b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 7826b8021494Sopenharmony_ci CPUFeatures::kSVE2, 7827b8021494Sopenharmony_ci CPUFeatures::kNEON, 7828b8021494Sopenharmony_ci CPUFeatures::kCRC32); 7829b8021494Sopenharmony_ci START(); 7830b8021494Sopenharmony_ci 7831b8021494Sopenharmony_ci SetInitialMachineState(&masm); 7832b8021494Sopenharmony_ci // state = 0xe2bd2480 7833b8021494Sopenharmony_ci 7834b8021494Sopenharmony_ci { 7835b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 7836b8021494Sopenharmony_ci __ dci(0x046c711a); // sqdmulh z26.h, z8.h, z12.h 7837b8021494Sopenharmony_ci // vl128 state = 0xe962209c 7838b8021494Sopenharmony_ci __ dci(0x047c7138); // sqdmulh z24.h, z9.h, z28.h 7839b8021494Sopenharmony_ci // vl128 state = 0x06a43320 7840b8021494Sopenharmony_ci __ dci(0x04fc7539); // sqrdmulh z25.d, z9.d, z28.d 7841b8021494Sopenharmony_ci // vl128 state = 0x8ce1cad6 7842b8021494Sopenharmony_ci __ dci(0x04fc7029); // sqdmulh z9.d, z1.d, z28.d 7843b8021494Sopenharmony_ci // vl128 state = 0x6f3d1b22 7844b8021494Sopenharmony_ci __ dci(0x04ac702d); // sqdmulh z13.s, z1.s, z12.s 7845b8021494Sopenharmony_ci // vl128 state = 0x14b0451c 7846b8021494Sopenharmony_ci __ dci(0x04a4742c); // sqrdmulh z12.s, z1.s, z4.s 7847b8021494Sopenharmony_ci // vl128 state = 0x60206a6a 7848b8021494Sopenharmony_ci __ dci(0x04a574ad); // sqrdmulh z13.s, z5.s, z5.s 7849b8021494Sopenharmony_ci // vl128 state = 0x388a9786 7850b8021494Sopenharmony_ci __ dci(0x04a574a9); // sqrdmulh z9.s, z5.s, z5.s 7851b8021494Sopenharmony_ci // vl128 state = 0xee590c43 7852b8021494Sopenharmony_ci __ dci(0x04e574e8); // sqrdmulh z8.d, z7.d, z5.d 7853b8021494Sopenharmony_ci // vl128 state = 0x8d16295c 7854b8021494Sopenharmony_ci __ dci(0x04e570ca); // sqdmulh z10.d, z6.d, z5.d 7855b8021494Sopenharmony_ci // vl128 state = 0x2a5c234c 7856b8021494Sopenharmony_ci __ dci(0x04e670cb); // sqdmulh z11.d, z6.d, z6.d 7857b8021494Sopenharmony_ci // vl128 state = 0xfacc9e06 7858b8021494Sopenharmony_ci __ dci(0x04f6708f); // sqdmulh z15.d, z4.d, z22.d 7859b8021494Sopenharmony_ci // vl128 state = 0x2167ca56 7860b8021494Sopenharmony_ci __ dci(0x04f67087); // sqdmulh z7.d, z4.d, z22.d 7861b8021494Sopenharmony_ci // vl128 state = 0xc7d7af1d 7862b8021494Sopenharmony_ci __ dci(0x04f77185); // sqdmulh z5.d, z12.d, z23.d 7863b8021494Sopenharmony_ci // vl128 state = 0x15f82ac2 7864b8021494Sopenharmony_ci __ dci(0x04f67104); // sqdmulh z4.d, z8.d, z22.d 7865b8021494Sopenharmony_ci // vl128 state = 0xb2484707 7866b8021494Sopenharmony_ci __ dci(0x04f6710c); // sqdmulh z12.d, z8.d, z22.d 7867b8021494Sopenharmony_ci // vl128 state = 0x5a53b8e7 7868b8021494Sopenharmony_ci __ dci(0x04f6708d); // sqdmulh z13.d, z4.d, z22.d 7869b8021494Sopenharmony_ci // vl128 state = 0xa9affac2 7870b8021494Sopenharmony_ci __ dci(0x04f67085); // sqdmulh z5.d, z4.d, z22.d 7871b8021494Sopenharmony_ci // vl128 state = 0xa425052d 7872b8021494Sopenharmony_ci __ dci(0x04fe7281); // sqdmulh z1.d, z20.d, z30.d 7873b8021494Sopenharmony_ci // vl128 state = 0x1c0f565c 7874b8021494Sopenharmony_ci __ dci(0x04ee72d1); // sqdmulh z17.d, z22.d, z14.d 7875b8021494Sopenharmony_ci // vl128 state = 0xff12c401 7876b8021494Sopenharmony_ci __ dci(0x04ee7393); // sqdmulh z19.d, z28.d, z14.d 7877b8021494Sopenharmony_ci // vl128 state = 0xcd1d9d3a 7878b8021494Sopenharmony_ci __ dci(0x04ec73b2); // sqdmulh z18.d, z29.d, z12.d 7879b8021494Sopenharmony_ci // vl128 state = 0x2aa94767 7880b8021494Sopenharmony_ci __ dci(0x04ee73fa); // sqdmulh z26.d, z31.d, z14.d 7881b8021494Sopenharmony_ci // vl128 state = 0x5ca68e9c 7882b8021494Sopenharmony_ci __ dci(0x04ef77ea); // sqrdmulh z10.d, z31.d, z15.d 7883b8021494Sopenharmony_ci // vl128 state = 0xe5b65473 7884b8021494Sopenharmony_ci __ dci(0x04ff76e8); // sqrdmulh z8.d, z23.d, z31.d 7885b8021494Sopenharmony_ci // vl128 state = 0xcc4e8803 7886b8021494Sopenharmony_ci __ dci(0x04fd76c9); // sqrdmulh z9.d, z22.d, z29.d 7887b8021494Sopenharmony_ci // vl128 state = 0x19fff884 7888b8021494Sopenharmony_ci __ dci(0x04fd73d9); // sqdmulh z25.d, z30.d, z29.d 7889b8021494Sopenharmony_ci // vl128 state = 0xb99d6147 7890b8021494Sopenharmony_ci __ dci(0x04e973dd); // sqdmulh z29.d, z30.d, z9.d 7891b8021494Sopenharmony_ci // vl128 state = 0xe8f11301 7892b8021494Sopenharmony_ci __ dci(0x04b973dc); // sqdmulh z28.s, z30.s, z25.s 7893b8021494Sopenharmony_ci // vl128 state = 0x24af5ffe 7894b8021494Sopenharmony_ci __ dci(0x04b177dd); // sqrdmulh z29.s, z30.s, z17.s 7895b8021494Sopenharmony_ci // vl128 state = 0x5c32a08e 7896b8021494Sopenharmony_ci __ dci(0x04b177bc); // sqrdmulh z28.s, z29.s, z17.s 7897b8021494Sopenharmony_ci // vl128 state = 0x12c8c1c4 7898b8021494Sopenharmony_ci __ dci(0x04f377ac); // sqrdmulh z12.d, z29.d, z19.d 7899b8021494Sopenharmony_ci // vl128 state = 0x7bc1f2e6 7900b8021494Sopenharmony_ci __ dci(0x04f677ad); // sqrdmulh z13.d, z29.d, z22.d 7901b8021494Sopenharmony_ci // vl128 state = 0x67d2640f 7902b8021494Sopenharmony_ci __ dci(0x04fe76af); // sqrdmulh z15.d, z21.d, z30.d 7903b8021494Sopenharmony_ci // vl128 state = 0x98035fbd 7904b8021494Sopenharmony_ci __ dci(0x04ef76ae); // sqrdmulh z14.d, z21.d, z15.d 7905b8021494Sopenharmony_ci // vl128 state = 0x5e561fd3 7906b8021494Sopenharmony_ci __ dci(0x04ee72ac); // sqdmulh z12.d, z21.d, z14.d 7907b8021494Sopenharmony_ci // vl128 state = 0xb56c3914 7908b8021494Sopenharmony_ci __ dci(0x04ae72ee); // sqdmulh z14.s, z23.s, z14.s 7909b8021494Sopenharmony_ci // vl128 state = 0x6bb1c4b1 7910b8021494Sopenharmony_ci __ dci(0x04be7266); // sqdmulh z6.s, z19.s, z30.s 7911b8021494Sopenharmony_ci // vl128 state = 0x5a5bdda6 7912b8021494Sopenharmony_ci __ dci(0x04b67364); // sqdmulh z4.s, z27.s, z22.s 7913b8021494Sopenharmony_ci // vl128 state = 0x09a447ea 7914b8021494Sopenharmony_ci __ dci(0x04b27165); // sqdmulh z5.s, z11.s, z18.s 7915b8021494Sopenharmony_ci // vl128 state = 0xee84be35 7916b8021494Sopenharmony_ci __ dci(0x04b27175); // sqdmulh z21.s, z11.s, z18.s 7917b8021494Sopenharmony_ci // vl128 state = 0x84146d85 7918b8021494Sopenharmony_ci __ dci(0x04ba7137); // sqdmulh z23.s, z9.s, z26.s 7919b8021494Sopenharmony_ci // vl128 state = 0x92c2e5f6 7920b8021494Sopenharmony_ci __ dci(0x04b3713f); // sqdmulh z31.s, z9.s, z19.s 7921b8021494Sopenharmony_ci // vl128 state = 0xe3836fb8 7922b8021494Sopenharmony_ci __ dci(0x04b37017); // sqdmulh z23.s, z0.s, z19.s 7923b8021494Sopenharmony_ci // vl128 state = 0xb5225206 7924b8021494Sopenharmony_ci __ dci(0x04b37615); // sqrdmulh z21.s, z16.s, z19.s 7925b8021494Sopenharmony_ci // vl128 state = 0x157484c7 7926b8021494Sopenharmony_ci __ dci(0x04b37491); // sqrdmulh z17.s, z4.s, z19.s 7927b8021494Sopenharmony_ci // vl128 state = 0x586c4bbf 7928b8021494Sopenharmony_ci __ dci(0x04b37481); // sqrdmulh z1.s, z4.s, z19.s 7929b8021494Sopenharmony_ci // vl128 state = 0xf5dc07cb 7930b8021494Sopenharmony_ci __ dci(0x04b37489); // sqrdmulh z9.s, z4.s, z19.s 7931b8021494Sopenharmony_ci // vl128 state = 0x591875a8 7932b8021494Sopenharmony_ci __ dci(0x04b5748d); // sqrdmulh z13.s, z4.s, z21.s 7933b8021494Sopenharmony_ci // vl128 state = 0xb01f8fd5 7934b8021494Sopenharmony_ci __ dci(0x043d748f); // sqrdmulh z15.b, z4.b, z29.b 7935b8021494Sopenharmony_ci // vl128 state = 0xd466a58c 7936b8021494Sopenharmony_ci } 7937b8021494Sopenharmony_ci 7938b8021494Sopenharmony_ci uint32_t state; 7939b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 7940b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 7941b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 7942b8021494Sopenharmony_ci 7943b8021494Sopenharmony_ci END(); 7944b8021494Sopenharmony_ci if (CAN_RUN()) { 7945b8021494Sopenharmony_ci RUN(); 7946b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 7947b8021494Sopenharmony_ci 0xd466a58c, 7948b8021494Sopenharmony_ci 0xe2ec7fba, 7949b8021494Sopenharmony_ci 0x1644e93a, 7950b8021494Sopenharmony_ci 0x7c3ecb2e, 7951b8021494Sopenharmony_ci 0xed4ecd78, 7952b8021494Sopenharmony_ci 0xfd5b5783, 7953b8021494Sopenharmony_ci 0xa7094efe, 7954b8021494Sopenharmony_ci 0x92bd623f, 7955b8021494Sopenharmony_ci 0x6da5e423, 7956b8021494Sopenharmony_ci 0x1648b588, 7957b8021494Sopenharmony_ci 0x63ce5947, 7958b8021494Sopenharmony_ci 0xba9c7d90, 7959b8021494Sopenharmony_ci 0x756ae20d, 7960b8021494Sopenharmony_ci 0x6d4032ba, 7961b8021494Sopenharmony_ci 0x87ae8b8f, 7962b8021494Sopenharmony_ci 0x722b2f6f, 7963b8021494Sopenharmony_ci }; 7964b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 7965b8021494Sopenharmony_ci } 7966b8021494Sopenharmony_ci} 7967b8021494Sopenharmony_ci 7968b8021494Sopenharmony_ciTEST_SVE(sve2_cmla_index) { 7969b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 7970b8021494Sopenharmony_ci CPUFeatures::kSVE2, 7971b8021494Sopenharmony_ci CPUFeatures::kNEON, 7972b8021494Sopenharmony_ci CPUFeatures::kCRC32); 7973b8021494Sopenharmony_ci START(); 7974b8021494Sopenharmony_ci 7975b8021494Sopenharmony_ci SetInitialMachineState(&masm); 7976b8021494Sopenharmony_ci // state = 0xe2bd2480 7977b8021494Sopenharmony_ci 7978b8021494Sopenharmony_ci { 7979b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 7980b8021494Sopenharmony_ci __ dci(0x44e867e6); // cmla z6.s, z31.s, z8.s[0], #90 7981b8021494Sopenharmony_ci // vl128 state = 0xee56e69b 7982b8021494Sopenharmony_ci __ dci(0x44e86de4); // cmla z4.s, z15.s, z8.s[0], #270 7983b8021494Sopenharmony_ci // vl128 state = 0x0ed2e9f5 7984b8021494Sopenharmony_ci __ dci(0x44e86be5); // cmla z5.s, z31.s, z8.s[0], #180 7985b8021494Sopenharmony_ci // vl128 state = 0x9074e2a6 7986b8021494Sopenharmony_ci __ dci(0x44eb6bf5); // cmla z21.s, z31.s, z11.s[0], #180 7987b8021494Sopenharmony_ci // vl128 state = 0x8f43b8a8 7988b8021494Sopenharmony_ci __ dci(0x44eb6b31); // cmla z17.s, z25.s, z11.s[0], #180 7989b8021494Sopenharmony_ci // vl128 state = 0xb6c51b97 7990b8021494Sopenharmony_ci __ dci(0x44eb6135); // cmla z21.s, z9.s, z11.s[0], #0 7991b8021494Sopenharmony_ci // vl128 state = 0x4236beed 7992b8021494Sopenharmony_ci __ dci(0x44e9633d); // cmla z29.s, z25.s, z9.s[0], #0 7993b8021494Sopenharmony_ci // vl128 state = 0x21879fe6 7994b8021494Sopenharmony_ci __ dci(0x44f96379); // cmla z25.s, z27.s, z9.s[1], #0 7995b8021494Sopenharmony_ci // vl128 state = 0x78172805 7996b8021494Sopenharmony_ci __ dci(0x44fd6349); // cmla z9.s, z26.s, z13.s[1], #0 7997b8021494Sopenharmony_ci // vl128 state = 0x242a3ae5 7998b8021494Sopenharmony_ci __ dci(0x44f76341); // cmla z1.s, z26.s, z7.s[1], #0 7999b8021494Sopenharmony_ci // vl128 state = 0xa734ef3b 8000b8021494Sopenharmony_ci __ dci(0x44f36305); // cmla z5.s, z24.s, z3.s[1], #0 8001b8021494Sopenharmony_ci // vl128 state = 0x00a035b1 8002b8021494Sopenharmony_ci __ dci(0x44f76381); // cmla z1.s, z28.s, z7.s[1], #0 8003b8021494Sopenharmony_ci // vl128 state = 0xbdfda3d4 8004b8021494Sopenharmony_ci __ dci(0x44f763e3); // cmla z3.s, z31.s, z7.s[1], #0 8005b8021494Sopenharmony_ci // vl128 state = 0xe1ed6ed9 8006b8021494Sopenharmony_ci __ dci(0x44b763cb); // cmla z11.h, z30.h, z7.h[2], #0 8007b8021494Sopenharmony_ci // vl128 state = 0xae645ea8 8008b8021494Sopenharmony_ci __ dci(0x44a763e9); // cmla z9.h, z31.h, z7.h[0], #0 8009b8021494Sopenharmony_ci // vl128 state = 0x392b3511 8010b8021494Sopenharmony_ci __ dci(0x44a762ab); // cmla z11.h, z21.h, z7.h[0], #0 8011b8021494Sopenharmony_ci // vl128 state = 0x3a05f729 8012b8021494Sopenharmony_ci __ dci(0x44a66aaf); // cmla z15.h, z21.h, z6.h[0], #180 8013b8021494Sopenharmony_ci // vl128 state = 0x7cfa0c08 8014b8021494Sopenharmony_ci __ dci(0x44a66aa7); // cmla z7.h, z21.h, z6.h[0], #180 8015b8021494Sopenharmony_ci // vl128 state = 0x91749f43 8016b8021494Sopenharmony_ci __ dci(0x44a663a5); // cmla z5.h, z29.h, z6.h[0], #0 8017b8021494Sopenharmony_ci // vl128 state = 0x438479ab 8018b8021494Sopenharmony_ci __ dci(0x44a66bed); // cmla z13.h, z31.h, z6.h[0], #180 8019b8021494Sopenharmony_ci // vl128 state = 0xc25ce86d 8020b8021494Sopenharmony_ci __ dci(0x44f66be9); // cmla z9.s, z31.s, z6.s[1], #180 8021b8021494Sopenharmony_ci // vl128 state = 0x6e8bdeca 8022b8021494Sopenharmony_ci __ dci(0x44b66bd9); // cmla z25.h, z30.h, z6.h[2], #180 8023b8021494Sopenharmony_ci // vl128 state = 0x04745a63 8024b8021494Sopenharmony_ci __ dci(0x44b66bd8); // cmla z24.h, z30.h, z6.h[2], #180 8025b8021494Sopenharmony_ci // vl128 state = 0xbfc59a82 8026b8021494Sopenharmony_ci __ dci(0x44b66b7c); // cmla z28.h, z27.h, z6.h[2], #180 8027b8021494Sopenharmony_ci // vl128 state = 0x12d70fc2 8028b8021494Sopenharmony_ci __ dci(0x44b6617e); // cmla z30.h, z11.h, z6.h[2], #0 8029b8021494Sopenharmony_ci // vl128 state = 0x53f4b9a1 8030b8021494Sopenharmony_ci __ dci(0x44b7697c); // cmla z28.h, z11.h, z7.h[2], #180 8031b8021494Sopenharmony_ci // vl128 state = 0x74e99c24 8032b8021494Sopenharmony_ci __ dci(0x44b3692c); // cmla z12.h, z9.h, z3.h[2], #180 8033b8021494Sopenharmony_ci // vl128 state = 0xdc80a875 8034b8021494Sopenharmony_ci __ dci(0x44a1692e); // cmla z14.h, z9.h, z1.h[0], #180 8035b8021494Sopenharmony_ci // vl128 state = 0x307af313 8036b8021494Sopenharmony_ci __ dci(0x44b169af); // cmla z15.h, z13.h, z1.h[2], #180 8037b8021494Sopenharmony_ci // vl128 state = 0xc92b23fe 8038b8021494Sopenharmony_ci __ dci(0x44b165a7); // cmla z7.h, z13.h, z1.h[2], #90 8039b8021494Sopenharmony_ci // vl128 state = 0x33a52d1c 8040b8021494Sopenharmony_ci __ dci(0x44b165a5); // cmla z5.h, z13.h, z1.h[2], #90 8041b8021494Sopenharmony_ci // vl128 state = 0xbc53ebfc 8042b8021494Sopenharmony_ci __ dci(0x44f161a1); // cmla z1.s, z13.s, z1.s[1], #0 8043b8021494Sopenharmony_ci // vl128 state = 0x7ba34076 8044b8021494Sopenharmony_ci __ dci(0x44f261a0); // cmla z0.s, z13.s, z2.s[1], #0 8045b8021494Sopenharmony_ci // vl128 state = 0x6fa2bab8 8046b8021494Sopenharmony_ci __ dci(0x44b361b0); // cmla z16.h, z13.h, z3.h[2], #0 8047b8021494Sopenharmony_ci // vl128 state = 0xaae67807 8048b8021494Sopenharmony_ci __ dci(0x44b36092); // cmla z18.h, z4.h, z3.h[2], #0 8049b8021494Sopenharmony_ci // vl128 state = 0xf1b05dff 8050b8021494Sopenharmony_ci __ dci(0x44b36202); // cmla z2.h, z16.h, z3.h[2], #0 8051b8021494Sopenharmony_ci // vl128 state = 0xd226bf15 8052b8021494Sopenharmony_ci __ dci(0x44b36a20); // cmla z0.h, z17.h, z3.h[2], #180 8053b8021494Sopenharmony_ci // vl128 state = 0x6a8ade58 8054b8021494Sopenharmony_ci __ dci(0x44b26a10); // cmla z16.h, z16.h, z2.h[2], #180 8055b8021494Sopenharmony_ci // vl128 state = 0x075e00e4 8056b8021494Sopenharmony_ci __ dci(0x44b26a18); // cmla z24.h, z16.h, z2.h[2], #180 8057b8021494Sopenharmony_ci // vl128 state = 0x9bcef7bd 8058b8021494Sopenharmony_ci __ dci(0x44b06a28); // cmla z8.h, z17.h, z0.h[2], #180 8059b8021494Sopenharmony_ci // vl128 state = 0x8ac6d4b3 8060b8021494Sopenharmony_ci __ dci(0x44b06a2a); // cmla z10.h, z17.h, z0.h[2], #180 8061b8021494Sopenharmony_ci // vl128 state = 0x51993d51 8062b8021494Sopenharmony_ci __ dci(0x44b0620b); // cmla z11.h, z16.h, z0.h[2], #0 8063b8021494Sopenharmony_ci // vl128 state = 0x6d134734 8064b8021494Sopenharmony_ci __ dci(0x44b06209); // cmla z9.h, z16.h, z0.h[2], #0 8065b8021494Sopenharmony_ci // vl128 state = 0x0ee4031f 8066b8021494Sopenharmony_ci __ dci(0x44f06a0d); // cmla z13.s, z16.s, z0.s[1], #180 8067b8021494Sopenharmony_ci // vl128 state = 0x08ea247b 8068b8021494Sopenharmony_ci __ dci(0x44f06b2c); // cmla z12.s, z25.s, z0.s[1], #180 8069b8021494Sopenharmony_ci // vl128 state = 0x6acbb19a 8070b8021494Sopenharmony_ci __ dci(0x44f1692d); // cmla z13.s, z9.s, z1.s[1], #180 8071b8021494Sopenharmony_ci // vl128 state = 0x3ea2d161 8072b8021494Sopenharmony_ci __ dci(0x44b36925); // cmla z5.h, z9.h, z3.h[2], #180 8073b8021494Sopenharmony_ci // vl128 state = 0x5b962e9b 8074b8021494Sopenharmony_ci __ dci(0x44b36921); // cmla z1.h, z9.h, z3.h[2], #180 8075b8021494Sopenharmony_ci // vl128 state = 0x029f0eca 8076b8021494Sopenharmony_ci __ dci(0x44b36d69); // cmla z9.h, z11.h, z3.h[2], #270 8077b8021494Sopenharmony_ci // vl128 state = 0x39a63c65 8078b8021494Sopenharmony_ci __ dci(0x44bb6d28); // cmla z8.h, z9.h, z3.h[3], #270 8079b8021494Sopenharmony_ci // vl128 state = 0x6d58c136 8080b8021494Sopenharmony_ci } 8081b8021494Sopenharmony_ci 8082b8021494Sopenharmony_ci uint32_t state; 8083b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 8084b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 8085b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 8086b8021494Sopenharmony_ci 8087b8021494Sopenharmony_ci END(); 8088b8021494Sopenharmony_ci if (CAN_RUN()) { 8089b8021494Sopenharmony_ci RUN(); 8090b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 8091b8021494Sopenharmony_ci 0x6d58c136, 8092b8021494Sopenharmony_ci 0xfbdbae97, 8093b8021494Sopenharmony_ci 0x85c3cf1a, 8094b8021494Sopenharmony_ci 0xe4b53177, 8095b8021494Sopenharmony_ci 0x2f714586, 8096b8021494Sopenharmony_ci 0xde1afee8, 8097b8021494Sopenharmony_ci 0xd9613d2e, 8098b8021494Sopenharmony_ci 0x842c85a6, 8099b8021494Sopenharmony_ci 0xdc285523, 8100b8021494Sopenharmony_ci 0xccba7ba9, 8101b8021494Sopenharmony_ci 0x79e1e6f7, 8102b8021494Sopenharmony_ci 0xb19427f4, 8103b8021494Sopenharmony_ci 0x20d08a3a, 8104b8021494Sopenharmony_ci 0xfb7f4c43, 8105b8021494Sopenharmony_ci 0x0721ed60, 8106b8021494Sopenharmony_ci 0x4ee795ab, 8107b8021494Sopenharmony_ci }; 8108b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 8109b8021494Sopenharmony_ci } 8110b8021494Sopenharmony_ci} 8111b8021494Sopenharmony_ci 8112b8021494Sopenharmony_ciTEST_SVE(sve2_flogb) { 8113b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 8114b8021494Sopenharmony_ci CPUFeatures::kSVE2, 8115b8021494Sopenharmony_ci CPUFeatures::kNEON, 8116b8021494Sopenharmony_ci CPUFeatures::kCRC32); 8117b8021494Sopenharmony_ci START(); 8118b8021494Sopenharmony_ci 8119b8021494Sopenharmony_ci SetInitialMachineState(&masm); 8120b8021494Sopenharmony_ci // state = 0xe2bd2480 8121b8021494Sopenharmony_ci 8122b8021494Sopenharmony_ci { 8123b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 8124b8021494Sopenharmony_ci __ dci(0x651cb31e); // flogb z30.s, p4/m, z24.s 8125b8021494Sopenharmony_ci // vl128 state = 0x161f1855 8126b8021494Sopenharmony_ci __ dci(0x651cb3ae); // flogb z14.s, p4/m, z29.s 8127b8021494Sopenharmony_ci // vl128 state = 0xf9e5ce4d 8128b8021494Sopenharmony_ci __ dci(0x651cb3be); // flogb z30.s, p4/m, z29.s 8129b8021494Sopenharmony_ci // vl128 state = 0xa06176bc 8130b8021494Sopenharmony_ci __ dci(0x651ea3bc); // flogb z28.d, p0/m, z29.d 8131b8021494Sopenharmony_ci // vl128 state = 0xf793f7bb 8132b8021494Sopenharmony_ci __ dci(0x651ea3cc); // flogb z12.d, p0/m, z30.d 8133b8021494Sopenharmony_ci // vl128 state = 0xe5d71081 8134b8021494Sopenharmony_ci __ dci(0x651ea3dc); // flogb z28.d, p0/m, z30.d 8135b8021494Sopenharmony_ci // vl128 state = 0x33ffc09f 8136b8021494Sopenharmony_ci __ dci(0x651ea3d4); // flogb z20.d, p0/m, z30.d 8137b8021494Sopenharmony_ci // vl128 state = 0xd908a72e 8138b8021494Sopenharmony_ci __ dci(0x651ea3d5); // flogb z21.d, p0/m, z30.d 8139b8021494Sopenharmony_ci // vl128 state = 0x9528251a 8140b8021494Sopenharmony_ci __ dci(0x651ca394); // flogb z20.s, p0/m, z28.s 8141b8021494Sopenharmony_ci // vl128 state = 0xb1ac4188 8142b8021494Sopenharmony_ci __ dci(0x651ca396); // flogb z22.s, p0/m, z28.s 8143b8021494Sopenharmony_ci // vl128 state = 0xdc328726 8144b8021494Sopenharmony_ci __ dci(0x651ca1d7); // flogb z23.s, p0/m, z14.s 8145b8021494Sopenharmony_ci // vl128 state = 0xfc232eb7 8146b8021494Sopenharmony_ci __ dci(0x651ca947); // flogb z7.s, p2/m, z10.s 8147b8021494Sopenharmony_ci // vl128 state = 0xa9c53a1a 8148b8021494Sopenharmony_ci __ dci(0x651ca805); // flogb z5.s, p2/m, z0.s 8149b8021494Sopenharmony_ci // vl128 state = 0x9e4a47e9 8150b8021494Sopenharmony_ci __ dci(0x651ea841); // flogb z1.d, p2/m, z2.d 8151b8021494Sopenharmony_ci // vl128 state = 0x7a2aeaf6 8152b8021494Sopenharmony_ci __ dci(0x651ea843); // flogb z3.d, p2/m, z2.d 8153b8021494Sopenharmony_ci // vl128 state = 0xedd4aa97 8154b8021494Sopenharmony_ci __ dci(0x651caa4b); // flogb z11.s, p2/m, z18.s 8155b8021494Sopenharmony_ci // vl128 state = 0x7bfefefb 8156b8021494Sopenharmony_ci __ dci(0x651cab6f); // flogb z15.s, p2/m, z27.s 8157b8021494Sopenharmony_ci // vl128 state = 0x91b5a183 8158b8021494Sopenharmony_ci __ dci(0x651ca86b); // flogb z11.s, p2/m, z3.s 8159b8021494Sopenharmony_ci // vl128 state = 0x7b2776c2 8160b8021494Sopenharmony_ci __ dci(0x651ca47b); // flogb z27.s, p1/m, z3.s 8161b8021494Sopenharmony_ci // vl128 state = 0x46ea46c7 8162b8021494Sopenharmony_ci __ dci(0x651ca47f); // flogb z31.s, p1/m, z3.s 8163b8021494Sopenharmony_ci // vl128 state = 0x6e1d4e89 8164b8021494Sopenharmony_ci __ dci(0x651ca477); // flogb z23.s, p1/m, z3.s 8165b8021494Sopenharmony_ci // vl128 state = 0x5ea1220c 8166b8021494Sopenharmony_ci __ dci(0x651ca035); // flogb z21.s, p0/m, z1.s 8167b8021494Sopenharmony_ci // vl128 state = 0xb06e32be 8168b8021494Sopenharmony_ci __ dci(0x651ca2a5); // flogb z5.s, p0/m, z21.s 8169b8021494Sopenharmony_ci // vl128 state = 0xb856d206 8170b8021494Sopenharmony_ci __ dci(0x651caa2d); // flogb z13.s, p2/m, z17.s 8171b8021494Sopenharmony_ci // vl128 state = 0xebfd587f 8172b8021494Sopenharmony_ci __ dci(0x651caa3d); // flogb z29.s, p2/m, z17.s 8173b8021494Sopenharmony_ci // vl128 state = 0xb029ba8d 8174b8021494Sopenharmony_ci __ dci(0x651eaa7f); // flogb z31.d, p2/m, z19.d 8175b8021494Sopenharmony_ci // vl128 state = 0x07fd3f42 8176b8021494Sopenharmony_ci __ dci(0x651ebb7e); // flogb z30.d, p6/m, z27.d 8177b8021494Sopenharmony_ci // vl128 state = 0x79761d7a 8178b8021494Sopenharmony_ci __ dci(0x651ebb76); // flogb z22.d, p6/m, z27.d 8179b8021494Sopenharmony_ci // vl128 state = 0xdf56dd22 8180b8021494Sopenharmony_ci __ dci(0x651ebb72); // flogb z18.d, p6/m, z27.d 8181b8021494Sopenharmony_ci // vl128 state = 0xce798ad7 8182b8021494Sopenharmony_ci __ dci(0x651eb276); // flogb z22.d, p4/m, z19.d 8183b8021494Sopenharmony_ci // vl128 state = 0x84dd46d6 8184b8021494Sopenharmony_ci __ dci(0x651eb652); // flogb z18.d, p5/m, z18.d 8185b8021494Sopenharmony_ci // vl128 state = 0x2ea4a0df 8186b8021494Sopenharmony_ci __ dci(0x651cbe42); // flogb z2.s, p7/m, z18.s 8187b8021494Sopenharmony_ci // vl128 state = 0x8cdd1250 8188b8021494Sopenharmony_ci __ dci(0x651cb852); // flogb z18.s, p6/m, z2.s 8189b8021494Sopenharmony_ci // vl128 state = 0x5f5b051d 8190b8021494Sopenharmony_ci __ dci(0x651eb956); // flogb z22.d, p6/m, z10.d 8191b8021494Sopenharmony_ci // vl128 state = 0x7a17cdd1 8192b8021494Sopenharmony_ci __ dci(0x651eb11e); // flogb z30.d, p4/m, z8.d 8193b8021494Sopenharmony_ci // vl128 state = 0x7367f8ec 8194b8021494Sopenharmony_ci __ dci(0x651ab016); // flogb z22.h, p4/m, z0.h 8195b8021494Sopenharmony_ci // vl128 state = 0x8e1bfb06 8196b8021494Sopenharmony_ci __ dci(0x651ab014); // flogb z20.h, p4/m, z0.h 8197b8021494Sopenharmony_ci // vl128 state = 0x2bcfa0f0 8198b8021494Sopenharmony_ci __ dci(0x651aa81c); // flogb z28.h, p2/m, z0.h 8199b8021494Sopenharmony_ci // vl128 state = 0xeb9615e8 8200b8021494Sopenharmony_ci __ dci(0x651aa80c); // flogb z12.h, p2/m, z0.h 8201b8021494Sopenharmony_ci // vl128 state = 0x5b55f5cd 8202b8021494Sopenharmony_ci __ dci(0x651aa808); // flogb z8.h, p2/m, z0.h 8203b8021494Sopenharmony_ci // vl128 state = 0xdd1718f2 8204b8021494Sopenharmony_ci __ dci(0x651aa20a); // flogb z10.h, p0/m, z16.h 8205b8021494Sopenharmony_ci // vl128 state = 0x205e88ed 8206b8021494Sopenharmony_ci __ dci(0x651ab24e); // flogb z14.h, p4/m, z18.h 8207b8021494Sopenharmony_ci // vl128 state = 0x1c9f2035 8208b8021494Sopenharmony_ci __ dci(0x651ab36f); // flogb z15.h, p4/m, z27.h 8209b8021494Sopenharmony_ci // vl128 state = 0xea22efaf 8210b8021494Sopenharmony_ci __ dci(0x651ab36b); // flogb z11.h, p4/m, z27.h 8211b8021494Sopenharmony_ci // vl128 state = 0x0cd0b8cd 8212b8021494Sopenharmony_ci __ dci(0x651abb29); // flogb z9.h, p6/m, z25.h 8213b8021494Sopenharmony_ci // vl128 state = 0xa1a017d1 8214b8021494Sopenharmony_ci __ dci(0x651abb2d); // flogb z13.h, p6/m, z25.h 8215b8021494Sopenharmony_ci // vl128 state = 0x37d033d2 8216b8021494Sopenharmony_ci __ dci(0x651aba0c); // flogb z12.h, p6/m, z16.h 8217b8021494Sopenharmony_ci // vl128 state = 0x971bde83 8218b8021494Sopenharmony_ci __ dci(0x651cba1c); // flogb z28.s, p6/m, z16.s 8219b8021494Sopenharmony_ci // vl128 state = 0xb6b23bc2 8220b8021494Sopenharmony_ci __ dci(0x651cba1d); // flogb z29.s, p6/m, z16.s 8221b8021494Sopenharmony_ci // vl128 state = 0x1af298e0 8222b8021494Sopenharmony_ci __ dci(0x651cba15); // flogb z21.s, p6/m, z16.s 8223b8021494Sopenharmony_ci // vl128 state = 0x077a2869 8224b8021494Sopenharmony_ci } 8225b8021494Sopenharmony_ci 8226b8021494Sopenharmony_ci uint32_t state; 8227b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 8228b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 8229b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 8230b8021494Sopenharmony_ci 8231b8021494Sopenharmony_ci END(); 8232b8021494Sopenharmony_ci if (CAN_RUN()) { 8233b8021494Sopenharmony_ci RUN(); 8234b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 8235b8021494Sopenharmony_ci 0x077a2869, 8236b8021494Sopenharmony_ci 0xde5bc452, 8237b8021494Sopenharmony_ci 0xe80f0bc6, 8238b8021494Sopenharmony_ci 0x1c078cf2, 8239b8021494Sopenharmony_ci 0x66064034, 8240b8021494Sopenharmony_ci 0xa9f5264d, 8241b8021494Sopenharmony_ci 0xb19b24c1, 8242b8021494Sopenharmony_ci 0xb394864c, 8243b8021494Sopenharmony_ci 0x42991ea7, 8244b8021494Sopenharmony_ci 0xcf33094e, 8245b8021494Sopenharmony_ci 0xc4656d85, 8246b8021494Sopenharmony_ci 0x4cfa5b7e, 8247b8021494Sopenharmony_ci 0xbb7c121f, 8248b8021494Sopenharmony_ci 0xd2e8c839, 8249b8021494Sopenharmony_ci 0x028134cf, 8250b8021494Sopenharmony_ci 0x2f3e9779, 8251b8021494Sopenharmony_ci }; 8252b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 8253b8021494Sopenharmony_ci } 8254b8021494Sopenharmony_ci} 8255b8021494Sopenharmony_ci 8256b8021494Sopenharmony_ciTEST_SVE(sve2_fp_pair) { 8257b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 8258b8021494Sopenharmony_ci CPUFeatures::kSVE2, 8259b8021494Sopenharmony_ci CPUFeatures::kNEON, 8260b8021494Sopenharmony_ci CPUFeatures::kCRC32); 8261b8021494Sopenharmony_ci START(); 8262b8021494Sopenharmony_ci 8263b8021494Sopenharmony_ci SetInitialMachineState(&masm, kFpInputSet); 8264b8021494Sopenharmony_ci // state = 0x1e5cbcac 8265b8021494Sopenharmony_ci 8266b8021494Sopenharmony_ci { 8267b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 8268b8021494Sopenharmony_ci __ dci(0x64d591aa); // fminnmp z10.d, p4/m, z10.d, z13.d 8269b8021494Sopenharmony_ci // vl128 state = 0x02a0f18c 8270b8021494Sopenharmony_ci __ dci(0x64d59dab); // fminnmp z11.d, p7/m, z11.d, z13.d 8271b8021494Sopenharmony_ci // vl128 state = 0xd6d0a87f 8272b8021494Sopenharmony_ci __ dci(0x64d59d7b); // fminnmp z27.d, p7/m, z27.d, z11.d 8273b8021494Sopenharmony_ci // vl128 state = 0x364f93b4 8274b8021494Sopenharmony_ci __ dci(0x64d59c2b); // fminnmp z11.d, p7/m, z11.d, z1.d 8275b8021494Sopenharmony_ci // vl128 state = 0xc7ed7476 8276b8021494Sopenharmony_ci __ dci(0x64d59f23); // fminnmp z3.d, p7/m, z3.d, z25.d 8277b8021494Sopenharmony_ci // vl128 state = 0x7a1ec868 8278b8021494Sopenharmony_ci __ dci(0x64d59f22); // fminnmp z2.d, p7/m, z2.d, z25.d 8279b8021494Sopenharmony_ci // vl128 state = 0x862a3f3d 8280b8021494Sopenharmony_ci __ dci(0x64d49fa0); // fmaxnmp z0.d, p7/m, z0.d, z29.d 8281b8021494Sopenharmony_ci // vl128 state = 0x11f71743 8282b8021494Sopenharmony_ci __ dci(0x64d49fa8); // fmaxnmp z8.d, p7/m, z8.d, z29.d 8283b8021494Sopenharmony_ci // vl128 state = 0x302e45cd 8284b8021494Sopenharmony_ci __ dci(0x64d49fa9); // fmaxnmp z9.d, p7/m, z9.d, z29.d 8285b8021494Sopenharmony_ci // vl128 state = 0x11cca180 8286b8021494Sopenharmony_ci __ dci(0x64d68fb9); // fmaxp z25.d, p3/m, z25.d, z29.d 8287b8021494Sopenharmony_ci // vl128 state = 0xee6b2d42 8288b8021494Sopenharmony_ci __ dci(0x64d68fb8); // fmaxp z24.d, p3/m, z24.d, z29.d 8289b8021494Sopenharmony_ci // vl128 state = 0x060efb2c 8290b8021494Sopenharmony_ci __ dci(0x64d49fba); // fmaxnmp z26.d, p7/m, z26.d, z29.d 8291b8021494Sopenharmony_ci // vl128 state = 0x4f4232ac 8292b8021494Sopenharmony_ci __ dci(0x649497b2); // fmaxnmp z18.s, p5/m, z18.s, z29.s 8293b8021494Sopenharmony_ci // vl128 state = 0xe3e04479 8294b8021494Sopenharmony_ci __ dci(0x649096b6); // faddp z22.s, p5/m, z22.s, z21.s 8295b8021494Sopenharmony_ci // vl128 state = 0x2a407146 8296b8021494Sopenharmony_ci __ dci(0x64909237); // faddp z23.s, p4/m, z23.s, z17.s 8297b8021494Sopenharmony_ci // vl128 state = 0x6d0b2bb8 8298b8021494Sopenharmony_ci __ dci(0x64d09027); // faddp z7.d, p4/m, z7.d, z1.d 8299b8021494Sopenharmony_ci // vl128 state = 0x5e7d175f 8300b8021494Sopenharmony_ci __ dci(0x64509006); // faddp z6.h, p4/m, z6.h, z0.h 8301b8021494Sopenharmony_ci // vl128 state = 0xa0a4cd20 8302b8021494Sopenharmony_ci __ dci(0x64d0940e); // faddp z14.d, p5/m, z14.d, z0.d 8303b8021494Sopenharmony_ci // vl128 state = 0xf66b9cde 8304b8021494Sopenharmony_ci __ dci(0x64d09c4f); // faddp z15.d, p7/m, z15.d, z2.d 8305b8021494Sopenharmony_ci // vl128 state = 0x5a2d08c9 8306b8021494Sopenharmony_ci __ dci(0x64d09c5f); // faddp z31.d, p7/m, z31.d, z2.d 8307b8021494Sopenharmony_ci // vl128 state = 0x2e390409 8308b8021494Sopenharmony_ci __ dci(0x64d09c57); // faddp z23.d, p7/m, z23.d, z2.d 8309b8021494Sopenharmony_ci // vl128 state = 0xfb4af476 8310b8021494Sopenharmony_ci __ dci(0x64d09c56); // faddp z22.d, p7/m, z22.d, z2.d 8311b8021494Sopenharmony_ci // vl128 state = 0x8d8c621b 8312b8021494Sopenharmony_ci __ dci(0x64d08e5e); // faddp z30.d, p3/m, z30.d, z18.d 8313b8021494Sopenharmony_ci // vl128 state = 0xba8962e6 8314b8021494Sopenharmony_ci __ dci(0x64d0845c); // faddp z28.d, p1/m, z28.d, z2.d 8315b8021494Sopenharmony_ci // vl128 state = 0x224654c6 8316b8021494Sopenharmony_ci __ dci(0x64d0845d); // faddp z29.d, p1/m, z29.d, z2.d 8317b8021494Sopenharmony_ci // vl128 state = 0xef608134 8318b8021494Sopenharmony_ci __ dci(0x64d08e4d); // faddp z13.d, p3/m, z13.d, z18.d 8319b8021494Sopenharmony_ci // vl128 state = 0x5adedbf3 8320b8021494Sopenharmony_ci __ dci(0x64908645); // faddp z5.s, p1/m, z5.s, z18.s 8321b8021494Sopenharmony_ci // vl128 state = 0x04b4f366 8322b8021494Sopenharmony_ci __ dci(0x64908a4d); // faddp z13.s, p2/m, z13.s, z18.s 8323b8021494Sopenharmony_ci // vl128 state = 0xf0a7482a 8324b8021494Sopenharmony_ci __ dci(0x64d08245); // faddp z5.d, p0/m, z5.d, z18.d 8325b8021494Sopenharmony_ci // vl128 state = 0x0f2ccd61 8326b8021494Sopenharmony_ci __ dci(0x64909255); // faddp z21.s, p4/m, z21.s, z18.s 8327b8021494Sopenharmony_ci // vl128 state = 0x7665491f 8328b8021494Sopenharmony_ci __ dci(0x649096c5); // faddp z5.s, p5/m, z5.s, z22.s 8329b8021494Sopenharmony_ci // vl128 state = 0xc3b53fd3 8330b8021494Sopenharmony_ci __ dci(0x649492c1); // fmaxnmp z1.s, p4/m, z1.s, z22.s 8331b8021494Sopenharmony_ci // vl128 state = 0x589fd64a 8332b8021494Sopenharmony_ci __ dci(0x649096d1); // faddp z17.s, p5/m, z17.s, z22.s 8333b8021494Sopenharmony_ci // vl128 state = 0x5a0d0d52 8334b8021494Sopenharmony_ci __ dci(0x649096d5); // faddp z21.s, p5/m, z21.s, z22.s 8335b8021494Sopenharmony_ci // vl128 state = 0xba57cd51 8336b8021494Sopenharmony_ci __ dci(0x649096d4); // faddp z20.s, p5/m, z20.s, z22.s 8337b8021494Sopenharmony_ci // vl128 state = 0xa5d7b29d 8338b8021494Sopenharmony_ci __ dci(0x649093d0); // faddp z16.s, p4/m, z16.s, z30.s 8339b8021494Sopenharmony_ci // vl128 state = 0xa62cce9e 8340b8021494Sopenharmony_ci __ dci(0x64909318); // faddp z24.s, p4/m, z24.s, z24.s 8341b8021494Sopenharmony_ci // vl128 state = 0x8cc209c7 8342b8021494Sopenharmony_ci __ dci(0x64909008); // faddp z8.s, p4/m, z8.s, z0.s 8343b8021494Sopenharmony_ci // vl128 state = 0x56a9af04 8344b8021494Sopenharmony_ci __ dci(0x64969000); // fmaxp z0.s, p4/m, z0.s, z0.s 8345b8021494Sopenharmony_ci // vl128 state = 0xc45f824a 8346b8021494Sopenharmony_ci __ dci(0x64569004); // fmaxp z4.h, p4/m, z4.h, z0.h 8347b8021494Sopenharmony_ci // vl128 state = 0x82da5cb7 8348b8021494Sopenharmony_ci __ dci(0x64569000); // fmaxp z0.h, p4/m, z0.h, z0.h 8349b8021494Sopenharmony_ci // vl128 state = 0xa9fff0bf 8350b8021494Sopenharmony_ci __ dci(0x64569001); // fmaxp z1.h, p4/m, z1.h, z0.h 8351b8021494Sopenharmony_ci // vl128 state = 0x71c2e09a 8352b8021494Sopenharmony_ci __ dci(0x64569605); // fmaxp z5.h, p5/m, z5.h, z16.h 8353b8021494Sopenharmony_ci // vl128 state = 0xe50c8b49 8354b8021494Sopenharmony_ci __ dci(0x64579624); // fminp z4.h, p5/m, z4.h, z17.h 8355b8021494Sopenharmony_ci // vl128 state = 0x4f3817cb 8356b8021494Sopenharmony_ci __ dci(0x6457962c); // fminp z12.h, p5/m, z12.h, z17.h 8357b8021494Sopenharmony_ci // vl128 state = 0x5a773e57 8358b8021494Sopenharmony_ci __ dci(0x64d5963c); // fminnmp z28.d, p5/m, z28.d, z17.d 8359b8021494Sopenharmony_ci // vl128 state = 0xa5c5e37c 8360b8021494Sopenharmony_ci __ dci(0x64d7943e); // fminp z30.d, p5/m, z30.d, z1.d 8361b8021494Sopenharmony_ci // vl128 state = 0xc778f8a3 8362b8021494Sopenharmony_ci __ dci(0x6457953a); // fminp z26.h, p5/m, z26.h, z9.h 8363b8021494Sopenharmony_ci // vl128 state = 0x01abc4af 8364b8021494Sopenharmony_ci __ dci(0x6457952a); // fminp z10.h, p5/m, z10.h, z9.h 8365b8021494Sopenharmony_ci // vl128 state = 0x45483a17 8366b8021494Sopenharmony_ci __ dci(0x64579d7a); // fminp z26.h, p7/m, z26.h, z11.h 8367b8021494Sopenharmony_ci // vl128 state = 0x355b08b3 8368b8021494Sopenharmony_ci } 8369b8021494Sopenharmony_ci 8370b8021494Sopenharmony_ci uint32_t state; 8371b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 8372b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 8373b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 8374b8021494Sopenharmony_ci 8375b8021494Sopenharmony_ci END(); 8376b8021494Sopenharmony_ci if (CAN_RUN()) { 8377b8021494Sopenharmony_ci RUN(); 8378b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 8379b8021494Sopenharmony_ci 0x355b08b3, 8380b8021494Sopenharmony_ci 0x8f7890cd, 8381b8021494Sopenharmony_ci 0x5dddb069, 8382b8021494Sopenharmony_ci 0x030a5f52, 8383b8021494Sopenharmony_ci 0xc569c150, 8384b8021494Sopenharmony_ci 0x060423ba, 8385b8021494Sopenharmony_ci 0x5d729bd0, 8386b8021494Sopenharmony_ci 0x079b4f8b, 8387b8021494Sopenharmony_ci 0x06e75e58, 8388b8021494Sopenharmony_ci 0x6f631884, 8389b8021494Sopenharmony_ci 0xddc735f0, 8390b8021494Sopenharmony_ci 0x7213b8e2, 8391b8021494Sopenharmony_ci 0x8cbf507c, 8392b8021494Sopenharmony_ci 0x40654268, 8393b8021494Sopenharmony_ci 0x3cd7ad6c, 8394b8021494Sopenharmony_ci 0xfba0ee9e, 8395b8021494Sopenharmony_ci }; 8396b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 8397b8021494Sopenharmony_ci } 8398b8021494Sopenharmony_ci} 8399b8021494Sopenharmony_ci 8400b8021494Sopenharmony_ciTEST_SVE(sve2_fmlal_fmlsl_index) { 8401b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 8402b8021494Sopenharmony_ci CPUFeatures::kSVE2, 8403b8021494Sopenharmony_ci CPUFeatures::kNEON, 8404b8021494Sopenharmony_ci CPUFeatures::kCRC32); 8405b8021494Sopenharmony_ci START(); 8406b8021494Sopenharmony_ci 8407b8021494Sopenharmony_ci SetInitialMachineState(&masm); 8408b8021494Sopenharmony_ci // state = 0xe2bd2480 8409b8021494Sopenharmony_ci 8410b8021494Sopenharmony_ci { 8411b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 8412b8021494Sopenharmony_ci __ dci(0x64a94f15); // fmlalt z21.s, z24.h, z1.h[3] 8413b8021494Sopenharmony_ci // vl128 state = 0x0895849b 8414b8021494Sopenharmony_ci __ dci(0x64ab4f9d); // fmlalt z29.s, z28.h, z3.h[3] 8415b8021494Sopenharmony_ci // vl128 state = 0x6e0cf3fe 8416b8021494Sopenharmony_ci __ dci(0x64a74f9c); // fmlalt z28.s, z28.h, z7.h[1] 8417b8021494Sopenharmony_ci // vl128 state = 0x482b4f57 8418b8021494Sopenharmony_ci __ dci(0x64a74dde); // fmlalt z30.s, z14.h, z7.h[1] 8419b8021494Sopenharmony_ci // vl128 state = 0xf047791e 8420b8021494Sopenharmony_ci __ dci(0x64a74cee); // fmlalt z14.s, z7.h, z7.h[1] 8421b8021494Sopenharmony_ci // vl128 state = 0xde33332c 8422b8021494Sopenharmony_ci __ dci(0x64a648ef); // fmlalb z15.s, z7.h, z6.h[1] 8423b8021494Sopenharmony_ci // vl128 state = 0xf7148941 8424b8021494Sopenharmony_ci __ dci(0x64a648ee); // fmlalb z14.s, z7.h, z6.h[1] 8425b8021494Sopenharmony_ci // vl128 state = 0x69f23fcb 8426b8021494Sopenharmony_ci __ dci(0x64b649ea); // fmlalb z10.s, z15.h, z6.h[5] 8427b8021494Sopenharmony_ci // vl128 state = 0x979eea1a 8428b8021494Sopenharmony_ci __ dci(0x64b649ee); // fmlalb z14.s, z15.h, z6.h[5] 8429b8021494Sopenharmony_ci // vl128 state = 0x522917a9 8430b8021494Sopenharmony_ci __ dci(0x64b649e6); // fmlalb z6.s, z15.h, z6.h[5] 8431b8021494Sopenharmony_ci // vl128 state = 0x7d773525 8432b8021494Sopenharmony_ci __ dci(0x64b64ba2); // fmlalb z2.s, z29.h, z6.h[5] 8433b8021494Sopenharmony_ci // vl128 state = 0x220960c6 8434b8021494Sopenharmony_ci __ dci(0x64b46baa); // fmlslb z10.s, z29.h, z4.h[5] 8435b8021494Sopenharmony_ci // vl128 state = 0x2c8e384a 8436b8021494Sopenharmony_ci __ dci(0x64b46dab); // fmlslt z11.s, z13.h, z4.h[5] 8437b8021494Sopenharmony_ci // vl128 state = 0xa592cde1 8438b8021494Sopenharmony_ci __ dci(0x64b467bb); // fmlslt z27.s, z29.h, z4.h[4] 8439b8021494Sopenharmony_ci // vl128 state = 0xba31bd61 8440b8021494Sopenharmony_ci __ dci(0x64b665b3); // fmlslt z19.s, z13.h, z6.h[4] 8441b8021494Sopenharmony_ci // vl128 state = 0x75dade04 8442b8021494Sopenharmony_ci __ dci(0x64b663bb); // fmlslb z27.s, z29.h, z6.h[4] 8443b8021494Sopenharmony_ci // vl128 state = 0xa7358466 8444b8021494Sopenharmony_ci __ dci(0x64a662bf); // fmlslb z31.s, z21.h, z6.h[0] 8445b8021494Sopenharmony_ci // vl128 state = 0x6125ca9d 8446b8021494Sopenharmony_ci __ dci(0x64a7623e); // fmlslb z30.s, z17.h, z7.h[0] 8447b8021494Sopenharmony_ci // vl128 state = 0x4b1cda83 8448b8021494Sopenharmony_ci __ dci(0x64a7462e); // fmlalt z14.s, z17.h, z7.h[0] 8449b8021494Sopenharmony_ci // vl128 state = 0x00d73a44 8450b8021494Sopenharmony_ci __ dci(0x64a6662f); // fmlslt z15.s, z17.h, z6.h[0] 8451b8021494Sopenharmony_ci // vl128 state = 0xc5ea9f30 8452b8021494Sopenharmony_ci __ dci(0x64a666ed); // fmlslt z13.s, z23.h, z6.h[0] 8453b8021494Sopenharmony_ci // vl128 state = 0xe17ba118 8454b8021494Sopenharmony_ci __ dci(0x64a26eec); // fmlslt z12.s, z23.h, z2.h[1] 8455b8021494Sopenharmony_ci // vl128 state = 0xd1962c7a 8456b8021494Sopenharmony_ci __ dci(0x64a26cbc); // fmlslt z28.s, z5.h, z2.h[1] 8457b8021494Sopenharmony_ci // vl128 state = 0xde6f1ace 8458b8021494Sopenharmony_ci __ dci(0x64a26cb4); // fmlslt z20.s, z5.h, z2.h[1] 8459b8021494Sopenharmony_ci // vl128 state = 0x10d69920 8460b8021494Sopenharmony_ci __ dci(0x64a26cbc); // fmlslt z28.s, z5.h, z2.h[1] 8461b8021494Sopenharmony_ci // vl128 state = 0x8d190aec 8462b8021494Sopenharmony_ci __ dci(0x64a26cd8); // fmlslt z24.s, z6.h, z2.h[1] 8463b8021494Sopenharmony_ci // vl128 state = 0x432fdda3 8464b8021494Sopenharmony_ci __ dci(0x64a26c1a); // fmlslt z26.s, z0.h, z2.h[1] 8465b8021494Sopenharmony_ci // vl128 state = 0x9ababf0a 8466b8021494Sopenharmony_ci __ dci(0x64a24d1e); // fmlalt z30.s, z8.h, z2.h[1] 8467b8021494Sopenharmony_ci // vl128 state = 0x609040ae 8468b8021494Sopenharmony_ci __ dci(0x64a24d1c); // fmlalt z28.s, z8.h, z2.h[1] 8469b8021494Sopenharmony_ci // vl128 state = 0x0a047710 8470b8021494Sopenharmony_ci __ dci(0x64a24d1e); // fmlalt z30.s, z8.h, z2.h[1] 8471b8021494Sopenharmony_ci // vl128 state = 0xf273945a 8472b8021494Sopenharmony_ci __ dci(0x64a0490e); // fmlalb z14.s, z8.h, z0.h[1] 8473b8021494Sopenharmony_ci // vl128 state = 0x3a5456f1 8474b8021494Sopenharmony_ci __ dci(0x64a0490c); // fmlalb z12.s, z8.h, z0.h[1] 8475b8021494Sopenharmony_ci // vl128 state = 0xdb948daf 8476b8021494Sopenharmony_ci __ dci(0x64b04b04); // fmlalb z4.s, z24.h, z0.h[5] 8477b8021494Sopenharmony_ci // vl128 state = 0xd2eae2af 8478b8021494Sopenharmony_ci __ dci(0x64b04b06); // fmlalb z6.s, z24.h, z0.h[5] 8479b8021494Sopenharmony_ci // vl128 state = 0x26627a2c 8480b8021494Sopenharmony_ci __ dci(0x64b04b07); // fmlalb z7.s, z24.h, z0.h[5] 8481b8021494Sopenharmony_ci // vl128 state = 0x2841173d 8482b8021494Sopenharmony_ci __ dci(0x64b84b26); // fmlalb z6.s, z25.h, z0.h[7] 8483b8021494Sopenharmony_ci // vl128 state = 0x9b52bcc6 8484b8021494Sopenharmony_ci __ dci(0x64ba4f27); // fmlalt z7.s, z25.h, z2.h[7] 8485b8021494Sopenharmony_ci // vl128 state = 0x813bbabe 8486b8021494Sopenharmony_ci __ dci(0x64ba4923); // fmlalb z3.s, z9.h, z2.h[7] 8487b8021494Sopenharmony_ci // vl128 state = 0xbb608dad 8488b8021494Sopenharmony_ci __ dci(0x64b84d22); // fmlalt z2.s, z9.h, z0.h[7] 8489b8021494Sopenharmony_ci // vl128 state = 0xf4d84ed6 8490b8021494Sopenharmony_ci __ dci(0x64b84d23); // fmlalt z3.s, z9.h, z0.h[7] 8491b8021494Sopenharmony_ci // vl128 state = 0x1cc0784e 8492b8021494Sopenharmony_ci __ dci(0x64bc4527); // fmlalt z7.s, z9.h, z4.h[6] 8493b8021494Sopenharmony_ci // vl128 state = 0x4eece4b7 8494b8021494Sopenharmony_ci __ dci(0x64bc6737); // fmlslt z23.s, z25.h, z4.h[6] 8495b8021494Sopenharmony_ci // vl128 state = 0x00dacf34 8496b8021494Sopenharmony_ci __ dci(0x64bc6fa7); // fmlslt z7.s, z29.h, z4.h[7] 8497b8021494Sopenharmony_ci // vl128 state = 0x597e23d4 8498b8021494Sopenharmony_ci __ dci(0x64bc6e25); // fmlslt z5.s, z17.h, z4.h[7] 8499b8021494Sopenharmony_ci // vl128 state = 0xa66b843c 8500b8021494Sopenharmony_ci __ dci(0x64be6f2d); // fmlslt z13.s, z25.h, z6.h[7] 8501b8021494Sopenharmony_ci // vl128 state = 0xb595ec08 8502b8021494Sopenharmony_ci __ dci(0x64be6765); // fmlslt z5.s, z27.h, z6.h[6] 8503b8021494Sopenharmony_ci // vl128 state = 0xd6c3af0a 8504b8021494Sopenharmony_ci __ dci(0x64be662d); // fmlslt z13.s, z17.h, z6.h[6] 8505b8021494Sopenharmony_ci // vl128 state = 0x864f26a8 8506b8021494Sopenharmony_ci __ dci(0x64bf6225); // fmlslb z5.s, z17.h, z7.h[6] 8507b8021494Sopenharmony_ci // vl128 state = 0xb969be4d 8508b8021494Sopenharmony_ci __ dci(0x64bb626d); // fmlslb z13.s, z19.h, z3.h[6] 8509b8021494Sopenharmony_ci // vl128 state = 0x73329b58 8510b8021494Sopenharmony_ci __ dci(0x64b9622c); // fmlslb z12.s, z17.h, z1.h[6] 8511b8021494Sopenharmony_ci // vl128 state = 0xfb7e2da2 8512b8021494Sopenharmony_ci } 8513b8021494Sopenharmony_ci 8514b8021494Sopenharmony_ci uint32_t state; 8515b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 8516b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 8517b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 8518b8021494Sopenharmony_ci 8519b8021494Sopenharmony_ci END(); 8520b8021494Sopenharmony_ci if (CAN_RUN()) { 8521b8021494Sopenharmony_ci RUN(); 8522b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 8523b8021494Sopenharmony_ci 0xfb7e2da2, 8524b8021494Sopenharmony_ci 0x34ad546c, 8525b8021494Sopenharmony_ci 0xd914c0d4, 8526b8021494Sopenharmony_ci 0xc173287c, 8527b8021494Sopenharmony_ci 0x07db96b2, 8528b8021494Sopenharmony_ci 0xab5ece8c, 8529b8021494Sopenharmony_ci 0xcda13318, 8530b8021494Sopenharmony_ci 0x6e62dc3f, 8531b8021494Sopenharmony_ci 0x0268d9b4, 8532b8021494Sopenharmony_ci 0x15118567, 8533b8021494Sopenharmony_ci 0xf55fb24f, 8534b8021494Sopenharmony_ci 0xc4ab4b56, 8535b8021494Sopenharmony_ci 0x5911f225, 8536b8021494Sopenharmony_ci 0x6d9c320c, 8537b8021494Sopenharmony_ci 0xc69bdedf, 8538b8021494Sopenharmony_ci 0x1635a43f, 8539b8021494Sopenharmony_ci }; 8540b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 8541b8021494Sopenharmony_ci } 8542b8021494Sopenharmony_ci} 8543b8021494Sopenharmony_ci 8544b8021494Sopenharmony_ciTEST_SVE(sve2_fp_convert) { 8545b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 8546b8021494Sopenharmony_ci CPUFeatures::kSVE2, 8547b8021494Sopenharmony_ci CPUFeatures::kNEON, 8548b8021494Sopenharmony_ci CPUFeatures::kCRC32); 8549b8021494Sopenharmony_ci START(); 8550b8021494Sopenharmony_ci 8551b8021494Sopenharmony_ci SetInitialMachineState(&masm); 8552b8021494Sopenharmony_ci // state = 0xe2bd2480 8553b8021494Sopenharmony_ci 8554b8021494Sopenharmony_ci { 8555b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 8556b8021494Sopenharmony_ci __ dci(0x640ab3ee); // fcvtxnt z14.s, p4/m, z31.d 8557b8021494Sopenharmony_ci // vl128 state = 0x3ea71f7a 8558b8021494Sopenharmony_ci __ dci(0x64caa9e0); // fcvtnt z0.s, p2/m, z15.d 8559b8021494Sopenharmony_ci // vl128 state = 0xe9d750a1 8560b8021494Sopenharmony_ci __ dci(0x64cab83d); // fcvtnt z29.s, p6/m, z1.d 8561b8021494Sopenharmony_ci // vl128 state = 0x9ce43257 8562b8021494Sopenharmony_ci __ dci(0x650aad62); // fcvtx z2.s, p3/m, z11.d 8563b8021494Sopenharmony_ci // vl128 state = 0x60283e22 8564b8021494Sopenharmony_ci __ dci(0x64cbb42b); // fcvtlt z11.d, p5/m, z1.s 8565b8021494Sopenharmony_ci // vl128 state = 0xfbecbe4a 8566b8021494Sopenharmony_ci __ dci(0x6488ba54); // fcvtnt z20.h, p6/m, z18.s 8567b8021494Sopenharmony_ci // vl128 state = 0xbb81cc05 8568b8021494Sopenharmony_ci __ dci(0x64cbb730); // fcvtlt z16.d, p5/m, z25.s 8569b8021494Sopenharmony_ci // vl128 state = 0xd9cebdf5 8570b8021494Sopenharmony_ci __ dci(0x640aa5e4); // fcvtxnt z4.s, p1/m, z15.d 8571b8021494Sopenharmony_ci // vl128 state = 0x9dba64db 8572b8021494Sopenharmony_ci __ dci(0x650aa715); // fcvtx z21.s, p1/m, z24.d 8573b8021494Sopenharmony_ci // vl128 state = 0x0e68fab9 8574b8021494Sopenharmony_ci __ dci(0x64cabe86); // fcvtnt z6.s, p7/m, z20.d 8575b8021494Sopenharmony_ci // vl128 state = 0x5936ac32 8576b8021494Sopenharmony_ci __ dci(0x64cba075); // fcvtlt z21.d, p0/m, z3.s 8577b8021494Sopenharmony_ci // vl128 state = 0x2eb8a37b 8578b8021494Sopenharmony_ci __ dci(0x6488b3c5); // fcvtnt z5.h, p4/m, z30.s 8579b8021494Sopenharmony_ci // vl128 state = 0x9f471340 8580b8021494Sopenharmony_ci __ dci(0x6489b24a); // fcvtlt z10.s, p4/m, z18.h 8581b8021494Sopenharmony_ci // vl128 state = 0xcf5e5808 8582b8021494Sopenharmony_ci __ dci(0x64cbb514); // fcvtlt z20.d, p5/m, z8.s 8583b8021494Sopenharmony_ci // vl128 state = 0x870c5b85 8584b8021494Sopenharmony_ci __ dci(0x650ab090); // fcvtx z16.s, p4/m, z4.d 8585b8021494Sopenharmony_ci // vl128 state = 0x305da0a0 8586b8021494Sopenharmony_ci __ dci(0x64cbb2d3); // fcvtlt z19.d, p4/m, z22.s 8587b8021494Sopenharmony_ci // vl128 state = 0x8eb1b5fc 8588b8021494Sopenharmony_ci __ dci(0x64cbb093); // fcvtlt z19.d, p4/m, z4.s 8589b8021494Sopenharmony_ci // vl128 state = 0x3c070332 8590b8021494Sopenharmony_ci __ dci(0x6488b9b8); // fcvtnt z24.h, p6/m, z13.s 8591b8021494Sopenharmony_ci // vl128 state = 0xe0fc3455 8592b8021494Sopenharmony_ci __ dci(0x650aa64d); // fcvtx z13.s, p1/m, z18.d 8593b8021494Sopenharmony_ci // vl128 state = 0x65556c34 8594b8021494Sopenharmony_ci __ dci(0x6488b2d7); // fcvtnt z23.h, p4/m, z22.s 8595b8021494Sopenharmony_ci // vl128 state = 0xc9ccae47 8596b8021494Sopenharmony_ci __ dci(0x650ab36d); // fcvtx z13.s, p4/m, z27.d 8597b8021494Sopenharmony_ci // vl128 state = 0x31d942a1 8598b8021494Sopenharmony_ci __ dci(0x650aba2c); // fcvtx z12.s, p6/m, z17.d 8599b8021494Sopenharmony_ci // vl128 state = 0x27497e26 8600b8021494Sopenharmony_ci __ dci(0x650aa377); // fcvtx z23.s, p0/m, z27.d 8601b8021494Sopenharmony_ci // vl128 state = 0xbe0a7446 8602b8021494Sopenharmony_ci __ dci(0x6489a3a5); // fcvtlt z5.s, p0/m, z29.h 8603b8021494Sopenharmony_ci // vl128 state = 0x454c62cc 8604b8021494Sopenharmony_ci __ dci(0x64cabeb9); // fcvtnt z25.s, p7/m, z21.d 8605b8021494Sopenharmony_ci // vl128 state = 0x808a014f 8606b8021494Sopenharmony_ci __ dci(0x6489b4c2); // fcvtlt z2.s, p5/m, z6.h 8607b8021494Sopenharmony_ci // vl128 state = 0x55ae2250 8608b8021494Sopenharmony_ci __ dci(0x64cba246); // fcvtlt z6.d, p0/m, z18.s 8609b8021494Sopenharmony_ci // vl128 state = 0x7ce05c24 8610b8021494Sopenharmony_ci __ dci(0x650ab2a6); // fcvtx z6.s, p4/m, z21.d 8611b8021494Sopenharmony_ci // vl128 state = 0xa26121f5 8612b8021494Sopenharmony_ci __ dci(0x64cbb239); // fcvtlt z25.d, p4/m, z17.s 8613b8021494Sopenharmony_ci // vl128 state = 0xb40c58e1 8614b8021494Sopenharmony_ci __ dci(0x64cabdd9); // fcvtnt z25.s, p7/m, z14.d 8615b8021494Sopenharmony_ci // vl128 state = 0xf5077a54 8616b8021494Sopenharmony_ci __ dci(0x650ab75a); // fcvtx z26.s, p5/m, z26.d 8617b8021494Sopenharmony_ci // vl128 state = 0x95b006de 8618b8021494Sopenharmony_ci __ dci(0x650aa08b); // fcvtx z11.s, p0/m, z4.d 8619b8021494Sopenharmony_ci // vl128 state = 0x9ca5060c 8620b8021494Sopenharmony_ci __ dci(0x640aafd3); // fcvtxnt z19.s, p3/m, z30.d 8621b8021494Sopenharmony_ci // vl128 state = 0x85c89705 8622b8021494Sopenharmony_ci __ dci(0x64caaf3a); // fcvtnt z26.s, p3/m, z25.d 8623b8021494Sopenharmony_ci // vl128 state = 0x6b6aa4f9 8624b8021494Sopenharmony_ci __ dci(0x640abda1); // fcvtxnt z1.s, p7/m, z13.d 8625b8021494Sopenharmony_ci // vl128 state = 0x769cf76e 8626b8021494Sopenharmony_ci __ dci(0x6489a6f9); // fcvtlt z25.s, p1/m, z23.h 8627b8021494Sopenharmony_ci // vl128 state = 0x0a291b3b 8628b8021494Sopenharmony_ci __ dci(0x6489b38d); // fcvtlt z13.s, p4/m, z28.h 8629b8021494Sopenharmony_ci // vl128 state = 0x6b72e558 8630b8021494Sopenharmony_ci __ dci(0x650aaf63); // fcvtx z3.s, p3/m, z27.d 8631b8021494Sopenharmony_ci // vl128 state = 0xf4a004e0 8632b8021494Sopenharmony_ci __ dci(0x6488bfa4); // fcvtnt z4.h, p7/m, z29.s 8633b8021494Sopenharmony_ci // vl128 state = 0xe01c349e 8634b8021494Sopenharmony_ci __ dci(0x6489a6ee); // fcvtlt z14.s, p1/m, z23.h 8635b8021494Sopenharmony_ci // vl128 state = 0x3b06da53 8636b8021494Sopenharmony_ci __ dci(0x64cabbf8); // fcvtnt z24.s, p6/m, z31.d 8637b8021494Sopenharmony_ci // vl128 state = 0xc60fbbf0 8638b8021494Sopenharmony_ci __ dci(0x6489bc7f); // fcvtlt z31.s, p7/m, z3.h 8639b8021494Sopenharmony_ci // vl128 state = 0x8b281c78 8640b8021494Sopenharmony_ci __ dci(0x64caaf1f); // fcvtnt z31.s, p3/m, z24.d 8641b8021494Sopenharmony_ci // vl128 state = 0x0f17afbb 8642b8021494Sopenharmony_ci __ dci(0x650aac71); // fcvtx z17.s, p3/m, z3.d 8643b8021494Sopenharmony_ci // vl128 state = 0xce0ac3e1 8644b8021494Sopenharmony_ci __ dci(0x650aa1df); // fcvtx z31.s, p0/m, z14.d 8645b8021494Sopenharmony_ci // vl128 state = 0x71ba2085 8646b8021494Sopenharmony_ci __ dci(0x650aaf9f); // fcvtx z31.s, p3/m, z28.d 8647b8021494Sopenharmony_ci // vl128 state = 0xe42caea0 8648b8021494Sopenharmony_ci __ dci(0x640abff9); // fcvtxnt z25.s, p7/m, z31.d 8649b8021494Sopenharmony_ci // vl128 state = 0xec3c032c 8650b8021494Sopenharmony_ci __ dci(0x6489b8e5); // fcvtlt z5.s, p6/m, z7.h 8651b8021494Sopenharmony_ci // vl128 state = 0xe41850f7 8652b8021494Sopenharmony_ci __ dci(0x640aa1a1); // fcvtxnt z1.s, p0/m, z13.d 8653b8021494Sopenharmony_ci // vl128 state = 0xaf3944b4 8654b8021494Sopenharmony_ci __ dci(0x6488bf41); // fcvtnt z1.h, p7/m, z26.s 8655b8021494Sopenharmony_ci // vl128 state = 0xdffd02bd 8656b8021494Sopenharmony_ci } 8657b8021494Sopenharmony_ci 8658b8021494Sopenharmony_ci uint32_t state; 8659b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 8660b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 8661b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 8662b8021494Sopenharmony_ci 8663b8021494Sopenharmony_ci END(); 8664b8021494Sopenharmony_ci if (CAN_RUN()) { 8665b8021494Sopenharmony_ci RUN(); 8666b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 8667b8021494Sopenharmony_ci 0xdffd02bd, 8668b8021494Sopenharmony_ci 0x03d1f711, 8669b8021494Sopenharmony_ci 0x41cf3358, 8670b8021494Sopenharmony_ci 0xa351d0f6, 8671b8021494Sopenharmony_ci 0xffba25ff, 8672b8021494Sopenharmony_ci 0x14092947, 8673b8021494Sopenharmony_ci 0x26b194fe, 8674b8021494Sopenharmony_ci 0x42acd8a3, 8675b8021494Sopenharmony_ci 0xc0498960, 8676b8021494Sopenharmony_ci 0xcccf1171, 8677b8021494Sopenharmony_ci 0x8dca76ed, 8678b8021494Sopenharmony_ci 0xefbda194, 8679b8021494Sopenharmony_ci 0xcf04a23d, 8680b8021494Sopenharmony_ci 0x91e2629f, 8681b8021494Sopenharmony_ci 0xf05e8f52, 8682b8021494Sopenharmony_ci 0x4994ad4a, 8683b8021494Sopenharmony_ci }; 8684b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 8685b8021494Sopenharmony_ci } 8686b8021494Sopenharmony_ci} 8687b8021494Sopenharmony_ci 8688b8021494Sopenharmony_ciTEST_SVE(sve2_saturating_multiply_add_high_indexed) { 8689b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 8690b8021494Sopenharmony_ci CPUFeatures::kSVE2, 8691b8021494Sopenharmony_ci CPUFeatures::kNEON, 8692b8021494Sopenharmony_ci CPUFeatures::kCRC32); 8693b8021494Sopenharmony_ci START(); 8694b8021494Sopenharmony_ci 8695b8021494Sopenharmony_ci SetInitialMachineState(&masm); 8696b8021494Sopenharmony_ci // state = 0xe2bd2480 8697b8021494Sopenharmony_ci 8698b8021494Sopenharmony_ci { 8699b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 40 * kInstructionSize); 8700b8021494Sopenharmony_ci __ dci(0x442b1100); // sqrdmlah z0.h, z8.h, z3.h[1] 8701b8021494Sopenharmony_ci // vl128 state = 0xb012d377 8702b8021494Sopenharmony_ci __ dci(0x44211108); // sqrdmlah z8.h, z8.h, z1.h[0] 8703b8021494Sopenharmony_ci // vl128 state = 0xae399e50 8704b8021494Sopenharmony_ci __ dci(0x4421110c); // sqrdmlah z12.h, z8.h, z1.h[0] 8705b8021494Sopenharmony_ci // vl128 state = 0x1a46b700 8706b8021494Sopenharmony_ci __ dci(0x44291188); // sqrdmlah z8.h, z12.h, z1.h[1] 8707b8021494Sopenharmony_ci // vl128 state = 0x7525090a 8708b8021494Sopenharmony_ci __ dci(0x442811a9); // sqrdmlah z9.h, z13.h, z0.h[1] 8709b8021494Sopenharmony_ci // vl128 state = 0xf2907eb8 8710b8021494Sopenharmony_ci __ dci(0x442c11eb); // sqrdmlah z11.h, z15.h, z4.h[1] 8711b8021494Sopenharmony_ci // vl128 state = 0x65a71d51 8712b8021494Sopenharmony_ci __ dci(0x442c11e3); // sqrdmlah z3.h, z15.h, z4.h[1] 8713b8021494Sopenharmony_ci // vl128 state = 0x8b30e19b 8714b8021494Sopenharmony_ci __ dci(0x442413e1); // sqrdmlah z1.h, z31.h, z4.h[0] 8715b8021494Sopenharmony_ci // vl128 state = 0x448e4c0f 8716b8021494Sopenharmony_ci __ dci(0x44a413a0); // sqrdmlah z0.s, z29.s, z4.s[0] 8717b8021494Sopenharmony_ci // vl128 state = 0x1745e0db 8718b8021494Sopenharmony_ci __ dci(0x44241321); // sqrdmlah z1.h, z25.h, z4.h[0] 8719b8021494Sopenharmony_ci // vl128 state = 0xe07b491b 8720b8021494Sopenharmony_ci __ dci(0x44a413a5); // sqrdmlah z5.s, z29.s, z4.s[0] 8721b8021494Sopenharmony_ci // vl128 state = 0xad39c91c 8722b8021494Sopenharmony_ci __ dci(0x44e41327); // sqrdmlah z7.d, z25.d, z4.d[0] 8723b8021494Sopenharmony_ci // vl128 state = 0xd327dc1c 8724b8021494Sopenharmony_ci __ dci(0x44e4132f); // sqrdmlah z15.d, z25.d, z4.d[0] 8725b8021494Sopenharmony_ci // vl128 state = 0x8da341ca 8726b8021494Sopenharmony_ci __ dci(0x44e5130b); // sqrdmlah z11.d, z24.d, z5.d[0] 8727b8021494Sopenharmony_ci // vl128 state = 0x4dbd3ee1 8728b8021494Sopenharmony_ci __ dci(0x44e3130a); // sqrdmlah z10.d, z24.d, z3.d[0] 8729b8021494Sopenharmony_ci // vl128 state = 0x71452896 8730b8021494Sopenharmony_ci __ dci(0x44e3131a); // sqrdmlah z26.d, z24.d, z3.d[0] 8731b8021494Sopenharmony_ci // vl128 state = 0x4d6d8b90 8732b8021494Sopenharmony_ci __ dci(0x4463135e); // sqrdmlah z30.h, z26.h, z3.h[4] 8733b8021494Sopenharmony_ci // vl128 state = 0x0b53f7b4 8734b8021494Sopenharmony_ci __ dci(0x44e7135c); // sqrdmlah z28.d, z26.d, z7.d[0] 8735b8021494Sopenharmony_ci // vl128 state = 0x78ab2bb9 8736b8021494Sopenharmony_ci __ dci(0x44e7134c); // sqrdmlah z12.d, z26.d, z7.d[0] 8737b8021494Sopenharmony_ci // vl128 state = 0x3773b9e2 8738b8021494Sopenharmony_ci __ dci(0x44e51144); // sqrdmlah z4.d, z10.d, z5.d[0] 8739b8021494Sopenharmony_ci // vl128 state = 0x8f8883da 8740b8021494Sopenharmony_ci __ dci(0x44e411c0); // sqrdmlah z0.d, z14.d, z4.d[0] 8741b8021494Sopenharmony_ci // vl128 state = 0xa27ef92f 8742b8021494Sopenharmony_ci __ dci(0x44ec15c4); // sqrdmlsh z4.d, z14.d, z12.d[0] 8743b8021494Sopenharmony_ci // vl128 state = 0x6cea3cee 8744b8021494Sopenharmony_ci __ dci(0x44ec14e0); // sqrdmlsh z0.d, z7.d, z12.d[0] 8745b8021494Sopenharmony_ci // vl128 state = 0xb5e40d5f 8746b8021494Sopenharmony_ci __ dci(0x44ee16f0); // sqrdmlsh z16.d, z23.d, z14.d[0] 8747b8021494Sopenharmony_ci // vl128 state = 0xacf903eb 8748b8021494Sopenharmony_ci __ dci(0x44ea16d4); // sqrdmlsh z20.d, z22.d, z10.d[0] 8749b8021494Sopenharmony_ci // vl128 state = 0x698246a6 8750b8021494Sopenharmony_ci __ dci(0x44ea16d0); // sqrdmlsh z16.d, z22.d, z10.d[0] 8751b8021494Sopenharmony_ci // vl128 state = 0x58015eeb 8752b8021494Sopenharmony_ci __ dci(0x44ea16d1); // sqrdmlsh z17.d, z22.d, z10.d[0] 8753b8021494Sopenharmony_ci // vl128 state = 0xdbf1d9a6 8754b8021494Sopenharmony_ci __ dci(0x44ab16d3); // sqrdmlsh z19.s, z22.s, z3.s[1] 8755b8021494Sopenharmony_ci // vl128 state = 0xbde312bb 8756b8021494Sopenharmony_ci __ dci(0x44aa17d1); // sqrdmlsh z17.s, z30.s, z2.s[1] 8757b8021494Sopenharmony_ci // vl128 state = 0xc033b9a1 8758b8021494Sopenharmony_ci __ dci(0x44aa1650); // sqrdmlsh z16.s, z18.s, z2.s[1] 8759b8021494Sopenharmony_ci // vl128 state = 0x0e3b4c59 8760b8021494Sopenharmony_ci __ dci(0x44aa1632); // sqrdmlsh z18.s, z17.s, z2.s[1] 8761b8021494Sopenharmony_ci // vl128 state = 0x6f849e01 8762b8021494Sopenharmony_ci __ dci(0x44aa1710); // sqrdmlsh z16.s, z24.s, z2.s[1] 8763b8021494Sopenharmony_ci // vl128 state = 0x701e7316 8764b8021494Sopenharmony_ci __ dci(0x44aa1711); // sqrdmlsh z17.s, z24.s, z2.s[1] 8765b8021494Sopenharmony_ci // vl128 state = 0xbfbc7895 8766b8021494Sopenharmony_ci __ dci(0x44a91715); // sqrdmlsh z21.s, z24.s, z1.s[1] 8767b8021494Sopenharmony_ci // vl128 state = 0x2307c6f3 8768b8021494Sopenharmony_ci __ dci(0x44a91697); // sqrdmlsh z23.s, z20.s, z1.s[1] 8769b8021494Sopenharmony_ci // vl128 state = 0x78db6627 8770b8021494Sopenharmony_ci __ dci(0x44a91696); // sqrdmlsh z22.s, z20.s, z1.s[1] 8771b8021494Sopenharmony_ci // vl128 state = 0x37d25a35 8772b8021494Sopenharmony_ci __ dci(0x44a816de); // sqrdmlsh z30.s, z22.s, z0.s[1] 8773b8021494Sopenharmony_ci // vl128 state = 0xf611db46 8774b8021494Sopenharmony_ci __ dci(0x44ab16dc); // sqrdmlsh z28.s, z22.s, z3.s[1] 8775b8021494Sopenharmony_ci // vl128 state = 0x699a840f 8776b8021494Sopenharmony_ci __ dci(0x44af165d); // sqrdmlsh z29.s, z18.s, z7.s[1] 8777b8021494Sopenharmony_ci // vl128 state = 0x0b5d451f 8778b8021494Sopenharmony_ci __ dci(0x44af16f5); // sqrdmlsh z21.s, z23.s, z7.s[1] 8779b8021494Sopenharmony_ci // vl128 state = 0xe49e3b59 8780b8021494Sopenharmony_ci } 8781b8021494Sopenharmony_ci 8782b8021494Sopenharmony_ci uint32_t state; 8783b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 8784b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 8785b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 8786b8021494Sopenharmony_ci 8787b8021494Sopenharmony_ci END(); 8788b8021494Sopenharmony_ci if (CAN_RUN()) { 8789b8021494Sopenharmony_ci RUN(); 8790b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 8791b8021494Sopenharmony_ci 0xe49e3b59, 8792b8021494Sopenharmony_ci 0xce0062c7, 8793b8021494Sopenharmony_ci 0xf796ec27, 8794b8021494Sopenharmony_ci 0x1f952649, 8795b8021494Sopenharmony_ci 0x4e4354e6, 8796b8021494Sopenharmony_ci 0x90cb0c51, 8797b8021494Sopenharmony_ci 0xf0688aee, 8798b8021494Sopenharmony_ci 0xae9de352, 8799b8021494Sopenharmony_ci 0x652f0c0d, 8800b8021494Sopenharmony_ci 0x0000db74, 8801b8021494Sopenharmony_ci 0xdc23fff7, 8802b8021494Sopenharmony_ci 0x228c116c, 8803b8021494Sopenharmony_ci 0x8477dd7c, 8804b8021494Sopenharmony_ci 0x08377c46, 8805b8021494Sopenharmony_ci 0x6e05a40f, 8806b8021494Sopenharmony_ci 0x874126fb, 8807b8021494Sopenharmony_ci }; 8808b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 8809b8021494Sopenharmony_ci } 8810b8021494Sopenharmony_ci} 8811b8021494Sopenharmony_ci 8812b8021494Sopenharmony_ciTEST_SVE(sve2_sat_double_mul_high_index) { 8813b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 8814b8021494Sopenharmony_ci CPUFeatures::kSVE2, 8815b8021494Sopenharmony_ci CPUFeatures::kNEON, 8816b8021494Sopenharmony_ci CPUFeatures::kCRC32); 8817b8021494Sopenharmony_ci START(); 8818b8021494Sopenharmony_ci 8819b8021494Sopenharmony_ci SetInitialMachineState(&masm); 8820b8021494Sopenharmony_ci // state = 0xe2bd2480 8821b8021494Sopenharmony_ci 8822b8021494Sopenharmony_ci { 8823b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 50 * kInstructionSize); 8824b8021494Sopenharmony_ci __ dci(0x447bf609); // sqrdmulh z9.h, z16.h, z3.h[7] 8825b8021494Sopenharmony_ci // vl128 state = 0xacad7d7c 8826b8021494Sopenharmony_ci __ dci(0x447bf601); // sqrdmulh z1.h, z16.h, z3.h[7] 8827b8021494Sopenharmony_ci // vl128 state = 0xd6a976fe 8828b8021494Sopenharmony_ci __ dci(0x447bf600); // sqrdmulh z0.h, z16.h, z3.h[7] 8829b8021494Sopenharmony_ci // vl128 state = 0x959d4287 8830b8021494Sopenharmony_ci __ dci(0x446bf710); // sqrdmulh z16.h, z24.h, z3.h[5] 8831b8021494Sopenharmony_ci // vl128 state = 0x88b70b0e 8832b8021494Sopenharmony_ci __ dci(0x446af612); // sqrdmulh z18.h, z16.h, z2.h[5] 8833b8021494Sopenharmony_ci // vl128 state = 0xea48068a 8834b8021494Sopenharmony_ci __ dci(0x442af636); // sqrdmulh z22.h, z17.h, z2.h[1] 8835b8021494Sopenharmony_ci // vl128 state = 0x22135bae 8836b8021494Sopenharmony_ci __ dci(0x442af626); // sqrdmulh z6.h, z17.h, z2.h[1] 8837b8021494Sopenharmony_ci // vl128 state = 0x1ed137a8 8838b8021494Sopenharmony_ci __ dci(0x442af624); // sqrdmulh z4.h, z17.h, z2.h[1] 8839b8021494Sopenharmony_ci // vl128 state = 0x37aa44d4 8840b8021494Sopenharmony_ci __ dci(0x4420f625); // sqrdmulh z5.h, z17.h, z0.h[0] 8841b8021494Sopenharmony_ci // vl128 state = 0x9747863a 8842b8021494Sopenharmony_ci __ dci(0x4460f604); // sqrdmulh z4.h, z16.h, z0.h[4] 8843b8021494Sopenharmony_ci // vl128 state = 0xf6487f4b 8844b8021494Sopenharmony_ci __ dci(0x4460f605); // sqrdmulh z5.h, z16.h, z0.h[4] 8845b8021494Sopenharmony_ci // vl128 state = 0xb85302a6 8846b8021494Sopenharmony_ci __ dci(0x4420f641); // sqrdmulh z1.h, z18.h, z0.h[0] 8847b8021494Sopenharmony_ci // vl128 state = 0xfc85ce98 8848b8021494Sopenharmony_ci __ dci(0x4424f669); // sqrdmulh z9.h, z19.h, z4.h[0] 8849b8021494Sopenharmony_ci // vl128 state = 0xf0b36dd3 8850b8021494Sopenharmony_ci __ dci(0x4460f668); // sqrdmulh z8.h, z19.h, z0.h[4] 8851b8021494Sopenharmony_ci // vl128 state = 0x227fe9fe 8852b8021494Sopenharmony_ci __ dci(0x4462f6f8); // sqrdmulh z24.h, z23.h, z2.h[4] 8853b8021494Sopenharmony_ci // vl128 state = 0x7f4d89ab 8854b8021494Sopenharmony_ci __ dci(0x4462f6f0); // sqrdmulh z16.h, z23.h, z2.h[4] 8855b8021494Sopenharmony_ci // vl128 state = 0x61520386 8856b8021494Sopenharmony_ci __ dci(0x4472f6d1); // sqrdmulh z17.h, z22.h, z2.h[6] 8857b8021494Sopenharmony_ci // vl128 state = 0x34d07c81 8858b8021494Sopenharmony_ci __ dci(0x4472f250); // sqdmulh z16.h, z18.h, z2.h[6] 8859b8021494Sopenharmony_ci // vl128 state = 0x74313b89 8860b8021494Sopenharmony_ci __ dci(0x44b2f254); // sqdmulh z20.s, z18.s, z2.s[2] 8861b8021494Sopenharmony_ci // vl128 state = 0x7acc9692 8862b8021494Sopenharmony_ci __ dci(0x44e2f250); // sqdmulh z16.d, z18.d, z2.d[0] 8863b8021494Sopenharmony_ci // vl128 state = 0x3a1f908e 8864b8021494Sopenharmony_ci __ dci(0x44e4f251); // sqdmulh z17.d, z18.d, z4.d[0] 8865b8021494Sopenharmony_ci // vl128 state = 0xd2ae3642 8866b8021494Sopenharmony_ci __ dci(0x44e0f650); // sqrdmulh z16.d, z18.d, z0.d[0] 8867b8021494Sopenharmony_ci // vl128 state = 0x74da2dcc 8868b8021494Sopenharmony_ci __ dci(0x44f8f640); // sqrdmulh z0.d, z18.d, z8.d[1] 8869b8021494Sopenharmony_ci // vl128 state = 0x0273639a 8870b8021494Sopenharmony_ci __ dci(0x44f9f742); // sqrdmulh z2.d, z26.d, z9.d[1] 8871b8021494Sopenharmony_ci // vl128 state = 0x9c5062c9 8872b8021494Sopenharmony_ci __ dci(0x44f9f7e6); // sqrdmulh z6.d, z31.d, z9.d[1] 8873b8021494Sopenharmony_ci // vl128 state = 0x095e8fd7 8874b8021494Sopenharmony_ci __ dci(0x44fdf7ae); // sqrdmulh z14.d, z29.d, z13.d[1] 8875b8021494Sopenharmony_ci // vl128 state = 0x4ab7c261 8876b8021494Sopenharmony_ci __ dci(0x44fdf7af); // sqrdmulh z15.d, z29.d, z13.d[1] 8877b8021494Sopenharmony_ci // vl128 state = 0x7913f02e 8878b8021494Sopenharmony_ci __ dci(0x44f9f7ed); // sqrdmulh z13.d, z31.d, z9.d[1] 8879b8021494Sopenharmony_ci // vl128 state = 0xbbffd120 8880b8021494Sopenharmony_ci __ dci(0x44f9f7e5); // sqrdmulh z5.d, z31.d, z9.d[1] 8881b8021494Sopenharmony_ci // vl128 state = 0xc9cc793f 8882b8021494Sopenharmony_ci __ dci(0x44f5f7e4); // sqrdmulh z4.d, z31.d, z5.d[1] 8883b8021494Sopenharmony_ci // vl128 state = 0xc7cc2e4b 8884b8021494Sopenharmony_ci __ dci(0x44e5f3e0); // sqdmulh z0.d, z31.d, z5.d[0] 8885b8021494Sopenharmony_ci // vl128 state = 0x8a4efda7 8886b8021494Sopenharmony_ci __ dci(0x44e4f364); // sqdmulh z4.d, z27.d, z4.d[0] 8887b8021494Sopenharmony_ci // vl128 state = 0xfa30239a 8888b8021494Sopenharmony_ci __ dci(0x44edf366); // sqdmulh z6.d, z27.d, z13.d[0] 8889b8021494Sopenharmony_ci // vl128 state = 0x9c538671 8890b8021494Sopenharmony_ci __ dci(0x44adf322); // sqdmulh z2.s, z25.s, z5.s[1] 8891b8021494Sopenharmony_ci // vl128 state = 0xafb03157 8892b8021494Sopenharmony_ci __ dci(0x44adf263); // sqdmulh z3.s, z19.s, z5.s[1] 8893b8021494Sopenharmony_ci // vl128 state = 0x6ea1e1ff 8894b8021494Sopenharmony_ci __ dci(0x44bdf22b); // sqdmulh z11.s, z17.s, z5.s[3] 8895b8021494Sopenharmony_ci // vl128 state = 0x0040a3a0 8896b8021494Sopenharmony_ci __ dci(0x44adf62a); // sqrdmulh z10.s, z17.s, z5.s[1] 8897b8021494Sopenharmony_ci // vl128 state = 0x8b3e6419 8898b8021494Sopenharmony_ci __ dci(0x44adf622); // sqrdmulh z2.s, z17.s, z5.s[1] 8899b8021494Sopenharmony_ci // vl128 state = 0x579bf738 8900b8021494Sopenharmony_ci __ dci(0x44abf632); // sqrdmulh z18.s, z17.s, z3.s[1] 8901b8021494Sopenharmony_ci // vl128 state = 0x2678c680 8902b8021494Sopenharmony_ci __ dci(0x44a9f6ba); // sqrdmulh z26.s, z21.s, z1.s[1] 8903b8021494Sopenharmony_ci // vl128 state = 0xee25a322 8904b8021494Sopenharmony_ci __ dci(0x44a9f6aa); // sqrdmulh z10.s, z21.s, z1.s[1] 8905b8021494Sopenharmony_ci // vl128 state = 0x99cfcf9f 8906b8021494Sopenharmony_ci __ dci(0x44b1f6ab); // sqrdmulh z11.s, z21.s, z1.s[2] 8907b8021494Sopenharmony_ci // vl128 state = 0xa6785a38 8908b8021494Sopenharmony_ci __ dci(0x44b1f0bb); // sqdmulh z27.s, z5.s, z1.s[2] 8909b8021494Sopenharmony_ci // vl128 state = 0xfc822233 8910b8021494Sopenharmony_ci __ dci(0x4439f0bf); // sqdmulh z31.h, z5.h, z1.h[3] 8911b8021494Sopenharmony_ci // vl128 state = 0x322d49df 8912b8021494Sopenharmony_ci __ dci(0x4433f0be); // sqdmulh z30.h, z5.h, z3.h[2] 8913b8021494Sopenharmony_ci // vl128 state = 0xbf6733d2 8914b8021494Sopenharmony_ci __ dci(0x4433f0d6); // sqdmulh z22.h, z6.h, z3.h[2] 8915b8021494Sopenharmony_ci // vl128 state = 0x99f11483 8916b8021494Sopenharmony_ci __ dci(0x4437f2d7); // sqdmulh z23.h, z22.h, z7.h[2] 8917b8021494Sopenharmony_ci // vl128 state = 0x9c146ede 8918b8021494Sopenharmony_ci __ dci(0x4426f2d6); // sqdmulh z22.h, z22.h, z6.h[0] 8919b8021494Sopenharmony_ci // vl128 state = 0xc089284f 8920b8021494Sopenharmony_ci __ dci(0x44a6f0de); // sqdmulh z30.s, z6.s, z6.s[0] 8921b8021494Sopenharmony_ci // vl128 state = 0xe962a269 8922b8021494Sopenharmony_ci __ dci(0x44a4f04e); // sqdmulh z14.s, z2.s, z4.s[0] 8923b8021494Sopenharmony_ci // vl128 state = 0xaea2f35e 8924b8021494Sopenharmony_ci } 8925b8021494Sopenharmony_ci 8926b8021494Sopenharmony_ci uint32_t state; 8927b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 8928b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 8929b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 8930b8021494Sopenharmony_ci 8931b8021494Sopenharmony_ci END(); 8932b8021494Sopenharmony_ci if (CAN_RUN()) { 8933b8021494Sopenharmony_ci RUN(); 8934b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 8935b8021494Sopenharmony_ci 0xaea2f35e, 8936b8021494Sopenharmony_ci 0xb4e17c50, 8937b8021494Sopenharmony_ci 0x97dfb966, 8938b8021494Sopenharmony_ci 0x070d3c78, 8939b8021494Sopenharmony_ci 0x5b2f880d, 8940b8021494Sopenharmony_ci 0x8e643be0, 8941b8021494Sopenharmony_ci 0x4d7f006b, 8942b8021494Sopenharmony_ci 0xfbd08185, 8943b8021494Sopenharmony_ci 0x4960a97d, 8944b8021494Sopenharmony_ci 0x1e85903f, 8945b8021494Sopenharmony_ci 0x443b62e4, 8946b8021494Sopenharmony_ci 0xf196453a, 8947b8021494Sopenharmony_ci 0x50dae6ef, 8948b8021494Sopenharmony_ci 0x0e4bb245, 8949b8021494Sopenharmony_ci 0x69d661ab, 8950b8021494Sopenharmony_ci 0x7d6fb839, 8951b8021494Sopenharmony_ci }; 8952b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 8953b8021494Sopenharmony_ci } 8954b8021494Sopenharmony_ci} 8955b8021494Sopenharmony_ci 8956b8021494Sopenharmony_ciTEST_SVE(sve2_extract) { 8957b8021494Sopenharmony_ci SVE_SETUP_WITH_FEATURES(CPUFeatures::kSVE, 8958b8021494Sopenharmony_ci CPUFeatures::kSVE2, 8959b8021494Sopenharmony_ci CPUFeatures::kNEON, 8960b8021494Sopenharmony_ci CPUFeatures::kCRC32); 8961b8021494Sopenharmony_ci START(); 8962b8021494Sopenharmony_ci 8963b8021494Sopenharmony_ci SetInitialMachineState(&masm); 8964b8021494Sopenharmony_ci // state = 0xe2bd2480 8965b8021494Sopenharmony_ci 8966b8021494Sopenharmony_ci { 8967b8021494Sopenharmony_ci ExactAssemblyScope scope(&masm, 60 * kInstructionSize); 8968b8021494Sopenharmony_ci __ dci(0x056a1008); // ext z8.b, {z0.b, z1.b}, #84 8969b8021494Sopenharmony_ci // vl128 state = 0x06ae6d5d 8970b8021494Sopenharmony_ci __ dci(0x05601418); // ext z24.b, {z0.b, z1.b}, #5 8971b8021494Sopenharmony_ci // vl128 state = 0x3b73c922 8972b8021494Sopenharmony_ci __ dci(0x05601708); // ext z8.b, {z24.b, z25.b}, #5 8973b8021494Sopenharmony_ci // vl128 state = 0xc3526a3d 8974b8021494Sopenharmony_ci __ dci(0x05601d0c); // ext z12.b, {z8.b, z9.b}, #7 8975b8021494Sopenharmony_ci // vl128 state = 0xbde17731 8976b8021494Sopenharmony_ci __ dci(0x05600c1c); // ext z28.b, {z0.b, z1.b}, #3 8977b8021494Sopenharmony_ci // vl128 state = 0x9ac72141 8978b8021494Sopenharmony_ci __ dci(0x05600c58); // ext z24.b, {z2.b, z3.b}, #3 8979b8021494Sopenharmony_ci // vl128 state = 0xccecefc0 8980b8021494Sopenharmony_ci __ dci(0x05600410); // ext z16.b, {z0.b, z1.b}, #1 8981b8021494Sopenharmony_ci // vl128 state = 0xe49d5f89 8982b8021494Sopenharmony_ci __ dci(0x05600438); // ext z24.b, {z1.b, z2.b}, #1 8983b8021494Sopenharmony_ci // vl128 state = 0x9967df9d 8984b8021494Sopenharmony_ci __ dci(0x0560067a); // ext z26.b, {z19.b, z20.b}, #1 8985b8021494Sopenharmony_ci // vl128 state = 0x110a8b46 8986b8021494Sopenharmony_ci __ dci(0x05601478); // ext z24.b, {z3.b, z4.b}, #5 8987b8021494Sopenharmony_ci // vl128 state = 0x558f95f2 8988b8021494Sopenharmony_ci __ dci(0x0560117c); // ext z28.b, {z11.b, z12.b}, #4 8989b8021494Sopenharmony_ci // vl128 state = 0x18d0f048 8990b8021494Sopenharmony_ci __ dci(0x0560157e); // ext z30.b, {z11.b, z12.b}, #5 8991b8021494Sopenharmony_ci // vl128 state = 0x1719547f 8992b8021494Sopenharmony_ci __ dci(0x05601c7a); // ext z26.b, {z3.b, z4.b}, #7 8993b8021494Sopenharmony_ci // vl128 state = 0x600cfa8a 8994b8021494Sopenharmony_ci __ dci(0x0560187e); // ext z30.b, {z3.b, z4.b}, #6 8995b8021494Sopenharmony_ci // vl128 state = 0xc93e431e 8996b8021494Sopenharmony_ci __ dci(0x05601876); // ext z22.b, {z3.b, z4.b}, #6 8997b8021494Sopenharmony_ci // vl128 state = 0x5be7af00 8998b8021494Sopenharmony_ci __ dci(0x05601c26); // ext z6.b, {z1.b, z2.b}, #7 8999b8021494Sopenharmony_ci // vl128 state = 0xd3d69d02 9000b8021494Sopenharmony_ci __ dci(0x05601c2e); // ext z14.b, {z1.b, z2.b}, #7 9001b8021494Sopenharmony_ci // vl128 state = 0x1d88c27b 9002b8021494Sopenharmony_ci __ dci(0x05601d3e); // ext z30.b, {z9.b, z10.b}, #7 9003b8021494Sopenharmony_ci // vl128 state = 0x56f91523 9004b8021494Sopenharmony_ci __ dci(0x05601dae); // ext z14.b, {z13.b, z14.b}, #7 9005b8021494Sopenharmony_ci // vl128 state = 0xbc175582 9006b8021494Sopenharmony_ci __ dci(0x056015ef); // ext z15.b, {z15.b, z16.b}, #5 9007b8021494Sopenharmony_ci // vl128 state = 0x9289a9ba 9008b8021494Sopenharmony_ci __ dci(0x0560157f); // ext z31.b, {z11.b, z12.b}, #5 9009b8021494Sopenharmony_ci // vl128 state = 0x46be3725 9010b8021494Sopenharmony_ci __ dci(0x0560157e); // ext z30.b, {z11.b, z12.b}, #5 9011b8021494Sopenharmony_ci // vl128 state = 0xa4fd59e9 9012b8021494Sopenharmony_ci __ dci(0x0560156e); // ext z14.b, {z11.b, z12.b}, #5 9013b8021494Sopenharmony_ci // vl128 state = 0x88b9ba85 9014b8021494Sopenharmony_ci __ dci(0x05601566); // ext z6.b, {z11.b, z12.b}, #5 9015b8021494Sopenharmony_ci // vl128 state = 0x7f3b2a36 9016b8021494Sopenharmony_ci __ dci(0x056017e4); // ext z4.b, {z31.b, z0.b}, #5 9017b8021494Sopenharmony_ci // vl128 state = 0xa71b8fa9 9018b8021494Sopenharmony_ci __ dci(0x05601f74); // ext z20.b, {z27.b, z28.b}, #7 9019b8021494Sopenharmony_ci // vl128 state = 0x89dcdeac 9020b8021494Sopenharmony_ci __ dci(0x05601f44); // ext z4.b, {z26.b, z27.b}, #7 9021b8021494Sopenharmony_ci // vl128 state = 0xa877313f 9022b8021494Sopenharmony_ci __ dci(0x05601e45); // ext z5.b, {z18.b, z19.b}, #7 9023b8021494Sopenharmony_ci // vl128 state = 0x6181834a 9024b8021494Sopenharmony_ci __ dci(0x05601255); // ext z21.b, {z18.b, z19.b}, #4 9025b8021494Sopenharmony_ci // vl128 state = 0x7c3595cd 9026b8021494Sopenharmony_ci __ dci(0x05701a51); // ext z17.b, {z18.b, z19.b}, #134 9027b8021494Sopenharmony_ci // vl128 state = 0x10fdfe4d 9028b8021494Sopenharmony_ci __ dci(0x05701ad3); // ext z19.b, {z22.b, z23.b}, #134 9029b8021494Sopenharmony_ci // vl128 state = 0x08e923c5 9030b8021494Sopenharmony_ci __ dci(0x05701ad1); // ext z17.b, {z22.b, z23.b}, #134 9031b8021494Sopenharmony_ci // vl128 state = 0xefb2c9e9 9032b8021494Sopenharmony_ci __ dci(0x05701b41); // ext z1.b, {z26.b, z27.b}, #134 9033b8021494Sopenharmony_ci // vl128 state = 0xd5dccda9 9034b8021494Sopenharmony_ci __ dci(0x05701b40); // ext z0.b, {z26.b, z27.b}, #134 9035b8021494Sopenharmony_ci // vl128 state = 0xd424c039 9036b8021494Sopenharmony_ci __ dci(0x05701bd0); // ext z16.b, {z30.b, z31.b}, #134 9037b8021494Sopenharmony_ci // vl128 state = 0xd914c077 9038b8021494Sopenharmony_ci __ dci(0x057013d8); // ext z24.b, {z30.b, z31.b}, #132 9039b8021494Sopenharmony_ci // vl128 state = 0x32459b3a 9040b8021494Sopenharmony_ci __ dci(0x05701259); // ext z25.b, {z18.b, z19.b}, #132 9041b8021494Sopenharmony_ci // vl128 state = 0x422ed7bf 9042b8021494Sopenharmony_ci __ dci(0x0570125d); // ext z29.b, {z18.b, z19.b}, #132 9043b8021494Sopenharmony_ci // vl128 state = 0x6bfc46ef 9044b8021494Sopenharmony_ci __ dci(0x05700215); // ext z21.b, {z16.b, z17.b}, #128 9045b8021494Sopenharmony_ci // vl128 state = 0xc53b85ed 9046b8021494Sopenharmony_ci __ dci(0x0560021d); // ext z29.b, {z16.b, z17.b}, #0 9047b8021494Sopenharmony_ci // vl128 state = 0xd391e5ec 9048b8021494Sopenharmony_ci __ dci(0x0570121c); // ext z28.b, {z16.b, z17.b}, #132 9049b8021494Sopenharmony_ci // vl128 state = 0x7990c1d7 9050b8021494Sopenharmony_ci __ dci(0x0570030c); // ext z12.b, {z24.b, z25.b}, #128 9051b8021494Sopenharmony_ci // vl128 state = 0xca0d3db8 9052b8021494Sopenharmony_ci __ dci(0x05700b88); // ext z8.b, {z28.b, z29.b}, #130 9053b8021494Sopenharmony_ci // vl128 state = 0xe5c71442 9054b8021494Sopenharmony_ci __ dci(0x05600b0c); // ext z12.b, {z24.b, z25.b}, #2 9055b8021494Sopenharmony_ci // vl128 state = 0x68510d62 9056b8021494Sopenharmony_ci __ dci(0x05600f1c); // ext z28.b, {z24.b, z25.b}, #3 9057b8021494Sopenharmony_ci // vl128 state = 0x77f9f046 9058b8021494Sopenharmony_ci __ dci(0x05600e14); // ext z20.b, {z16.b, z17.b}, #3 9059b8021494Sopenharmony_ci // vl128 state = 0x7068dedf 9060b8021494Sopenharmony_ci __ dci(0x05600604); // ext z4.b, {z16.b, z17.b}, #1 9061b8021494Sopenharmony_ci // vl128 state = 0x8b70c406 9062b8021494Sopenharmony_ci __ dci(0x05600406); // ext z6.b, {z0.b, z1.b}, #1 9063b8021494Sopenharmony_ci // vl128 state = 0x10e6b48c 9064b8021494Sopenharmony_ci __ dci(0x05600056); // ext z22.b, {z2.b, z3.b}, #0 9065b8021494Sopenharmony_ci // vl128 state = 0xe1294d7a 9066b8021494Sopenharmony_ci __ dci(0x05600052); // ext z18.b, {z2.b, z3.b}, #0 9067b8021494Sopenharmony_ci // vl128 state = 0x0762bbb0 9068b8021494Sopenharmony_ci __ dci(0x056000d6); // ext z22.b, {z6.b, z7.b}, #0 9069b8021494Sopenharmony_ci // vl128 state = 0x58be0ba4 9070b8021494Sopenharmony_ci __ dci(0x057008de); // ext z30.b, {z6.b, z7.b}, #130 9071b8021494Sopenharmony_ci // vl128 state = 0x8a2018e9 9072b8021494Sopenharmony_ci __ dci(0x0570085a); // ext z26.b, {z2.b, z3.b}, #130 9073b8021494Sopenharmony_ci // vl128 state = 0xb019b7e0 9074b8021494Sopenharmony_ci __ dci(0x057009d2); // ext z18.b, {z14.b, z15.b}, #130 9075b8021494Sopenharmony_ci // vl128 state = 0x9e6e14ed 9076b8021494Sopenharmony_ci __ dci(0x057008fa); // ext z26.b, {z7.b, z8.b}, #130 9077b8021494Sopenharmony_ci // vl128 state = 0x4cf64d22 9078b8021494Sopenharmony_ci __ dci(0x057008f2); // ext z18.b, {z7.b, z8.b}, #130 9079b8021494Sopenharmony_ci // vl128 state = 0x048c30f9 9080b8021494Sopenharmony_ci __ dci(0x057002f3); // ext z19.b, {z23.b, z24.b}, #128 9081b8021494Sopenharmony_ci // vl128 state = 0x2d7eb43b 9082b8021494Sopenharmony_ci __ dci(0x057006a3); // ext z3.b, {z21.b, z22.b}, #129 9083b8021494Sopenharmony_ci // vl128 state = 0xa37aeb5e 9084b8021494Sopenharmony_ci __ dci(0x05700687); // ext z7.b, {z20.b, z21.b}, #129 9085b8021494Sopenharmony_ci // vl128 state = 0xd8d7cdc7 9086b8021494Sopenharmony_ci __ dci(0x056006b7); // ext z23.b, {z21.b, z22.b}, #1 9087b8021494Sopenharmony_ci // vl128 state = 0x2480e1d4 9088b8021494Sopenharmony_ci } 9089b8021494Sopenharmony_ci 9090b8021494Sopenharmony_ci uint32_t state; 9091b8021494Sopenharmony_ci ComputeMachineStateHash(&masm, &state); 9092b8021494Sopenharmony_ci __ Mov(x0, reinterpret_cast<uint64_t>(&state)); 9093b8021494Sopenharmony_ci __ Ldr(w0, MemOperand(x0)); 9094b8021494Sopenharmony_ci 9095b8021494Sopenharmony_ci END(); 9096b8021494Sopenharmony_ci if (CAN_RUN()) { 9097b8021494Sopenharmony_ci RUN(); 9098b8021494Sopenharmony_ci uint32_t expected_hashes[] = { 9099b8021494Sopenharmony_ci 0x2480e1d4, 9100b8021494Sopenharmony_ci 0x4dc42cc5, 9101b8021494Sopenharmony_ci 0x7ac24121, 9102b8021494Sopenharmony_ci 0x9eaf5c98, 9103b8021494Sopenharmony_ci 0x1b7b35dc, 9104b8021494Sopenharmony_ci 0x1b1035fc, 9105b8021494Sopenharmony_ci 0xe15f6899, 9106b8021494Sopenharmony_ci 0xaad14717, 9107b8021494Sopenharmony_ci 0x3327c3fc, 9108b8021494Sopenharmony_ci 0x7f349408, 9109b8021494Sopenharmony_ci 0x2d865b00, 9110b8021494Sopenharmony_ci 0x9819cd29, 9111b8021494Sopenharmony_ci 0x7f64cace, 9112b8021494Sopenharmony_ci 0x3751e2c1, 9113b8021494Sopenharmony_ci 0x7e60fc24, 9114b8021494Sopenharmony_ci 0xc6b308fc, 9115b8021494Sopenharmony_ci }; 9116b8021494Sopenharmony_ci ASSERT_EQUAL_64(expected_hashes[core.GetSVELaneCount(kQRegSize) - 1], x0); 9117b8021494Sopenharmony_ci } 9118b8021494Sopenharmony_ci} 9119b8021494Sopenharmony_ci 9120b8021494Sopenharmony_ci} // namespace aarch64 9121b8021494Sopenharmony_ci} // namespace vixl 9122