Path: blob/main/sys/crypto/openssl/aarch64/sm4-armv8.S
39536 views
/* Do not modify. This file is auto-generated from sm4-armv8.pl. */1// Copyright 2022-2025 The OpenSSL Project Authors. All Rights Reserved.2//3// Licensed under the Apache License 2.0 (the "License"). You may not use4// this file except in compliance with the License. You can obtain a copy5// in the file LICENSE in the source distribution or at6// https://www.openssl.org/source/license.html78//9// This module implements support for SM4 hw support on aarch6410// Oct 202111//1213// $output is the last argument if it looks like a file (it has an extension)14// $flavour is the first argument if it doesn't look like a file15#include "arm_arch.h"16.arch armv8-a+crypto17.text1819.section .rodata20.type _sm4_v8_consts,%object21.align 622_sm4_v8_consts:23.Lck:24.long 0x00070E15, 0x1C232A31, 0x383F464D, 0x545B626925.long 0x70777E85, 0x8C939AA1, 0xA8AFB6BD, 0xC4CBD2D926.long 0xE0E7EEF5, 0xFC030A11, 0x181F262D, 0x343B424927.long 0x50575E65, 0x6C737A81, 0x888F969D, 0xA4ABB2B928.long 0xC0C7CED5, 0xDCE3EAF1, 0xF8FF060D, 0x141B222929.long 0x30373E45, 0x4C535A61, 0x686F767D, 0x848B929930.long 0xA0A7AEB5, 0xBCC3CAD1, 0xD8DFE6ED, 0xF4FB020931.long 0x10171E25, 0x2C333A41, 0x484F565D, 0x646B727932.Lfk:33.long 0xa3b1bac6, 0x56aa3350, 0x677d9197, 0xb27022dc34.size _sm4_v8_consts,.-_sm4_v8_consts35.previous3637.globl sm4_v8_set_encrypt_key38.type sm4_v8_set_encrypt_key,%function39.align 540sm4_v8_set_encrypt_key:41AARCH64_VALID_CALL_TARGET42ld1 {v0.4s},[x0]43adrp x2,.Lfk44add x2,x2,#:lo12:.Lfk45ld1 {v24.4s},[x2]46adrp x2,.Lck47add x2,x2,#:lo12:.Lck48ld1 {v16.4s,v17.4s,v18.4s,v19.4s},[x2],6449#ifndef __AARCH64EB__50rev32 v0.16b,v0.16b51#endif52ld1 {v20.4s,v21.4s,v22.4s,v23.4s},[x2]53eor v0.16b,v0.16b,v24.16b;54.inst 0xce70c800 //sm4ekey v0.4S,v0.4S,v16.4S55.inst 0xce71c801 //sm4ekey v1.4S,v0.4S,v17.4S56.inst 0xce72c822 //sm4ekey v2.4S,v1.4S,v18.4S57.inst 0xce73c843 //sm4ekey v3.4S,v2.4S,v19.4S58.inst 0xce74c864 //sm4ekey v4.4S,v3.4S,v20.4S59st1 {v0.4s,v1.4s,v2.4s,v3.4s},[x1],6460.inst 0xce75c885 //sm4ekey v5.4S,v4.4S,v21.4S61.inst 0xce76c8a6 //sm4ekey v6.4S,v5.4S,v22.4S62.inst 0xce77c8c7 //sm4ekey v7.4S,v6.4S,v23.4S63st1 {v4.4s,v5.4s,v6.4s,v7.4s},[x1]64ret65.size sm4_v8_set_encrypt_key,.-sm4_v8_set_encrypt_key66.globl sm4_v8_set_decrypt_key67.type sm4_v8_set_decrypt_key,%function68.align 569sm4_v8_set_decrypt_key:70AARCH64_VALID_CALL_TARGET71ld1 {v7.4s},[x0]72adrp x2,.Lfk73add x2,x2,#:lo12:.Lfk74ld1 {v24.4s},[x2]75adrp x2,.Lck76add x2,x2,#:lo12:.Lck77ld1 {v16.4s,v17.4s,v18.4s,v19.4s},[x2],6478#ifndef __AARCH64EB__79rev32 v7.16b,v7.16b80#endif81ld1 {v20.4s,v21.4s,v22.4s,v23.4s},[x2]82eor v7.16b, v7.16b,v24.16b;83.inst 0xce70c8e7 //sm4ekey v7.4S,v7.4S,v16.4S84.inst 0xce71c8e6 //sm4ekey v6.4S,v7.4S,v17.4S85.inst 0xce72c8c5 //sm4ekey v5.4S,v6.4S,v18.4S86rev64 v7.4s,v7.4s87rev64 v6.4s,v6.4s88ext v7.16b,v7.16b,v7.16b,#889ext v6.16b,v6.16b,v6.16b,#890.inst 0xce73c8a4 //sm4ekey v4.4S,v5.4S,v19.4S91.inst 0xce74c883 //sm4ekey v3.4S,v4.4S,v20.4S92rev64 v5.4s,v5.4s93rev64 v4.4s,v4.4s94ext v5.16b,v5.16b,v5.16b,#895ext v4.16b,v4.16b,v4.16b,#896.inst 0xce75c862 //sm4ekey v2.4S,v3.4S,v21.4S97.inst 0xce76c841 //sm4ekey v1.4S,v2.4S,v22.4S98rev64 v3.4s,v3.4s99rev64 v2.4s,v2.4s100ext v3.16b,v3.16b,v3.16b,#8101ext v2.16b,v2.16b,v2.16b,#8102.inst 0xce77c820 //sm4ekey v0.4S,v1.4S,v23.4S103rev64 v1.4s, v1.4s104rev64 v0.4s, v0.4s105ext v1.16b,v1.16b,v1.16b,#8106ext v0.16b,v0.16b,v0.16b,#8107st1 {v0.4s,v1.4s,v2.4s,v3.4s},[x1],64108st1 {v4.4s,v5.4s,v6.4s,v7.4s},[x1]109ret110.size sm4_v8_set_decrypt_key,.-sm4_v8_set_decrypt_key111.globl sm4_v8_encrypt112.type sm4_v8_encrypt,%function113.align 5114sm4_v8_encrypt:115AARCH64_VALID_CALL_TARGET116ld1 {v16.4s},[x0]117ld1 {v0.4s,v1.4s,v2.4s,v3.4s},[x2],64118ld1 {v4.4s,v5.4s,v6.4s,v7.4s},[x2]119#ifndef __AARCH64EB__120rev32 v16.16b,v16.16b121#endif122.inst 0xcec08410 //sm4e v16.4s,v0.4s123.inst 0xcec08430 //sm4e v16.4s,v1.4s124.inst 0xcec08450 //sm4e v16.4s,v2.4s125.inst 0xcec08470 //sm4e v16.4s,v3.4s126.inst 0xcec08490 //sm4e v16.4s,v4.4s127.inst 0xcec084b0 //sm4e v16.4s,v5.4s128.inst 0xcec084d0 //sm4e v16.4s,v6.4s129.inst 0xcec084f0 //sm4e v16.4s,v7.4s130rev64 v16.4S,v16.4S131ext v16.16b,v16.16b,v16.16b,#8132#ifndef __AARCH64EB__133rev32 v16.16b,v16.16b134#endif135st1 {v16.4s},[x1]136ret137.size sm4_v8_encrypt,.-sm4_v8_encrypt138.globl sm4_v8_decrypt139.type sm4_v8_decrypt,%function140.align 5141sm4_v8_decrypt:142AARCH64_VALID_CALL_TARGET143ld1 {v16.4s},[x0]144ld1 {v0.4s,v1.4s,v2.4s,v3.4s},[x2],64145ld1 {v4.4s,v5.4s,v6.4s,v7.4s},[x2]146#ifndef __AARCH64EB__147rev32 v16.16b,v16.16b148#endif149.inst 0xcec08410 //sm4e v16.4s,v0.4s150.inst 0xcec08430 //sm4e v16.4s,v1.4s151.inst 0xcec08450 //sm4e v16.4s,v2.4s152.inst 0xcec08470 //sm4e v16.4s,v3.4s153.inst 0xcec08490 //sm4e v16.4s,v4.4s154.inst 0xcec084b0 //sm4e v16.4s,v5.4s155.inst 0xcec084d0 //sm4e v16.4s,v6.4s156.inst 0xcec084f0 //sm4e v16.4s,v7.4s157rev64 v16.4S,v16.4S158ext v16.16b,v16.16b,v16.16b,#8159#ifndef __AARCH64EB__160rev32 v16.16b,v16.16b161#endif162st1 {v16.4s},[x1]163ret164.size sm4_v8_decrypt,.-sm4_v8_decrypt165.globl sm4_v8_ecb_encrypt166.type sm4_v8_ecb_encrypt,%function167.align 5168sm4_v8_ecb_encrypt:169AARCH64_VALID_CALL_TARGET170ld1 {v0.4s,v1.4s,v2.4s,v3.4s},[x3],#64171ld1 {v4.4s,v5.4s,v6.4s,v7.4s},[x3]1721:173cmp x2,#64174b.lt 1f175ld1 {v16.4s,v17.4s,v18.4s,v19.4s},[x0],#64176cmp x2,#128177b.lt 2f178ld1 {v20.4s,v21.4s,v22.4s,v23.4s},[x0],#64179// 8 blocks180#ifndef __AARCH64EB__181rev32 v16.16b,v16.16b182#endif183#ifndef __AARCH64EB__184rev32 v17.16b,v17.16b185#endif186#ifndef __AARCH64EB__187rev32 v18.16b,v18.16b188#endif189#ifndef __AARCH64EB__190rev32 v19.16b,v19.16b191#endif192#ifndef __AARCH64EB__193rev32 v20.16b,v20.16b194#endif195#ifndef __AARCH64EB__196rev32 v21.16b,v21.16b197#endif198#ifndef __AARCH64EB__199rev32 v22.16b,v22.16b200#endif201#ifndef __AARCH64EB__202rev32 v23.16b,v23.16b203#endif204.inst 0xcec08410 //sm4e v16.4s,v0.4s205.inst 0xcec08411 //sm4e v17.4s,v0.4s206.inst 0xcec08412 //sm4e v18.4s,v0.4s207.inst 0xcec08413 //sm4e v19.4s,v0.4s208209.inst 0xcec08430 //sm4e v16.4s,v1.4s210.inst 0xcec08431 //sm4e v17.4s,v1.4s211.inst 0xcec08432 //sm4e v18.4s,v1.4s212.inst 0xcec08433 //sm4e v19.4s,v1.4s213214.inst 0xcec08450 //sm4e v16.4s,v2.4s215.inst 0xcec08451 //sm4e v17.4s,v2.4s216.inst 0xcec08452 //sm4e v18.4s,v2.4s217.inst 0xcec08453 //sm4e v19.4s,v2.4s218219.inst 0xcec08470 //sm4e v16.4s,v3.4s220.inst 0xcec08471 //sm4e v17.4s,v3.4s221.inst 0xcec08472 //sm4e v18.4s,v3.4s222.inst 0xcec08473 //sm4e v19.4s,v3.4s223224.inst 0xcec08490 //sm4e v16.4s,v4.4s225.inst 0xcec08491 //sm4e v17.4s,v4.4s226.inst 0xcec08492 //sm4e v18.4s,v4.4s227.inst 0xcec08493 //sm4e v19.4s,v4.4s228229.inst 0xcec084b0 //sm4e v16.4s,v5.4s230.inst 0xcec084b1 //sm4e v17.4s,v5.4s231.inst 0xcec084b2 //sm4e v18.4s,v5.4s232.inst 0xcec084b3 //sm4e v19.4s,v5.4s233234.inst 0xcec084d0 //sm4e v16.4s,v6.4s235.inst 0xcec084d1 //sm4e v17.4s,v6.4s236.inst 0xcec084d2 //sm4e v18.4s,v6.4s237.inst 0xcec084d3 //sm4e v19.4s,v6.4s238239.inst 0xcec084f0 //sm4e v16.4s,v7.4s240rev64 v16.4S,v16.4S241.inst 0xcec084f1 //sm4e v17.4s,v7.4s242ext v16.16b,v16.16b,v16.16b,#8243rev64 v17.4S,v17.4S244.inst 0xcec084f2 //sm4e v18.4s,v7.4s245ext v17.16b,v17.16b,v17.16b,#8246rev64 v18.4S,v18.4S247.inst 0xcec084f3 //sm4e v19.4s,v7.4s248ext v18.16b,v18.16b,v18.16b,#8249rev64 v19.4S,v19.4S250ext v19.16b,v19.16b,v19.16b,#8251.inst 0xcec08414 //sm4e v20.4s,v0.4s252.inst 0xcec08415 //sm4e v21.4s,v0.4s253.inst 0xcec08416 //sm4e v22.4s,v0.4s254.inst 0xcec08417 //sm4e v23.4s,v0.4s255256.inst 0xcec08434 //sm4e v20.4s,v1.4s257.inst 0xcec08435 //sm4e v21.4s,v1.4s258.inst 0xcec08436 //sm4e v22.4s,v1.4s259.inst 0xcec08437 //sm4e v23.4s,v1.4s260261.inst 0xcec08454 //sm4e v20.4s,v2.4s262.inst 0xcec08455 //sm4e v21.4s,v2.4s263.inst 0xcec08456 //sm4e v22.4s,v2.4s264.inst 0xcec08457 //sm4e v23.4s,v2.4s265266.inst 0xcec08474 //sm4e v20.4s,v3.4s267.inst 0xcec08475 //sm4e v21.4s,v3.4s268.inst 0xcec08476 //sm4e v22.4s,v3.4s269.inst 0xcec08477 //sm4e v23.4s,v3.4s270271.inst 0xcec08494 //sm4e v20.4s,v4.4s272.inst 0xcec08495 //sm4e v21.4s,v4.4s273.inst 0xcec08496 //sm4e v22.4s,v4.4s274.inst 0xcec08497 //sm4e v23.4s,v4.4s275276.inst 0xcec084b4 //sm4e v20.4s,v5.4s277.inst 0xcec084b5 //sm4e v21.4s,v5.4s278.inst 0xcec084b6 //sm4e v22.4s,v5.4s279.inst 0xcec084b7 //sm4e v23.4s,v5.4s280281.inst 0xcec084d4 //sm4e v20.4s,v6.4s282.inst 0xcec084d5 //sm4e v21.4s,v6.4s283.inst 0xcec084d6 //sm4e v22.4s,v6.4s284.inst 0xcec084d7 //sm4e v23.4s,v6.4s285286.inst 0xcec084f4 //sm4e v20.4s,v7.4s287rev64 v20.4S,v20.4S288.inst 0xcec084f5 //sm4e v21.4s,v7.4s289ext v20.16b,v20.16b,v20.16b,#8290rev64 v21.4S,v21.4S291.inst 0xcec084f6 //sm4e v22.4s,v7.4s292ext v21.16b,v21.16b,v21.16b,#8293rev64 v22.4S,v22.4S294.inst 0xcec084f7 //sm4e v23.4s,v7.4s295ext v22.16b,v22.16b,v22.16b,#8296rev64 v23.4S,v23.4S297ext v23.16b,v23.16b,v23.16b,#8298#ifndef __AARCH64EB__299rev32 v16.16b,v16.16b300#endif301#ifndef __AARCH64EB__302rev32 v17.16b,v17.16b303#endif304#ifndef __AARCH64EB__305rev32 v18.16b,v18.16b306#endif307#ifndef __AARCH64EB__308rev32 v19.16b,v19.16b309#endif310#ifndef __AARCH64EB__311rev32 v20.16b,v20.16b312#endif313#ifndef __AARCH64EB__314rev32 v21.16b,v21.16b315#endif316st1 {v16.4s,v17.4s,v18.4s,v19.4s},[x1],#64317#ifndef __AARCH64EB__318rev32 v22.16b,v22.16b319#endif320#ifndef __AARCH64EB__321rev32 v23.16b,v23.16b322#endif323st1 {v20.4s,v21.4s,v22.4s,v23.4s},[x1],#64324subs x2,x2,#128325b.gt 1b326ret327// 4 blocks3282:329#ifndef __AARCH64EB__330rev32 v16.16b,v16.16b331#endif332#ifndef __AARCH64EB__333rev32 v17.16b,v17.16b334#endif335#ifndef __AARCH64EB__336rev32 v18.16b,v18.16b337#endif338#ifndef __AARCH64EB__339rev32 v19.16b,v19.16b340#endif341.inst 0xcec08410 //sm4e v16.4s,v0.4s342.inst 0xcec08411 //sm4e v17.4s,v0.4s343.inst 0xcec08412 //sm4e v18.4s,v0.4s344.inst 0xcec08413 //sm4e v19.4s,v0.4s345346.inst 0xcec08430 //sm4e v16.4s,v1.4s347.inst 0xcec08431 //sm4e v17.4s,v1.4s348.inst 0xcec08432 //sm4e v18.4s,v1.4s349.inst 0xcec08433 //sm4e v19.4s,v1.4s350351.inst 0xcec08450 //sm4e v16.4s,v2.4s352.inst 0xcec08451 //sm4e v17.4s,v2.4s353.inst 0xcec08452 //sm4e v18.4s,v2.4s354.inst 0xcec08453 //sm4e v19.4s,v2.4s355356.inst 0xcec08470 //sm4e v16.4s,v3.4s357.inst 0xcec08471 //sm4e v17.4s,v3.4s358.inst 0xcec08472 //sm4e v18.4s,v3.4s359.inst 0xcec08473 //sm4e v19.4s,v3.4s360361.inst 0xcec08490 //sm4e v16.4s,v4.4s362.inst 0xcec08491 //sm4e v17.4s,v4.4s363.inst 0xcec08492 //sm4e v18.4s,v4.4s364.inst 0xcec08493 //sm4e v19.4s,v4.4s365366.inst 0xcec084b0 //sm4e v16.4s,v5.4s367.inst 0xcec084b1 //sm4e v17.4s,v5.4s368.inst 0xcec084b2 //sm4e v18.4s,v5.4s369.inst 0xcec084b3 //sm4e v19.4s,v5.4s370371.inst 0xcec084d0 //sm4e v16.4s,v6.4s372.inst 0xcec084d1 //sm4e v17.4s,v6.4s373.inst 0xcec084d2 //sm4e v18.4s,v6.4s374.inst 0xcec084d3 //sm4e v19.4s,v6.4s375376.inst 0xcec084f0 //sm4e v16.4s,v7.4s377rev64 v16.4S,v16.4S378.inst 0xcec084f1 //sm4e v17.4s,v7.4s379ext v16.16b,v16.16b,v16.16b,#8380rev64 v17.4S,v17.4S381.inst 0xcec084f2 //sm4e v18.4s,v7.4s382ext v17.16b,v17.16b,v17.16b,#8383rev64 v18.4S,v18.4S384.inst 0xcec084f3 //sm4e v19.4s,v7.4s385ext v18.16b,v18.16b,v18.16b,#8386rev64 v19.4S,v19.4S387ext v19.16b,v19.16b,v19.16b,#8388#ifndef __AARCH64EB__389rev32 v16.16b,v16.16b390#endif391#ifndef __AARCH64EB__392rev32 v17.16b,v17.16b393#endif394#ifndef __AARCH64EB__395rev32 v18.16b,v18.16b396#endif397#ifndef __AARCH64EB__398rev32 v19.16b,v19.16b399#endif400st1 {v16.4s,v17.4s,v18.4s,v19.4s},[x1],#64401subs x2,x2,#64402b.gt 1b4031:404subs x2,x2,#16405b.lt 1f406ld1 {v16.4s},[x0],#16407#ifndef __AARCH64EB__408rev32 v16.16b,v16.16b409#endif410.inst 0xcec08410 //sm4e v16.4s,v0.4s411.inst 0xcec08430 //sm4e v16.4s,v1.4s412.inst 0xcec08450 //sm4e v16.4s,v2.4s413.inst 0xcec08470 //sm4e v16.4s,v3.4s414.inst 0xcec08490 //sm4e v16.4s,v4.4s415.inst 0xcec084b0 //sm4e v16.4s,v5.4s416.inst 0xcec084d0 //sm4e v16.4s,v6.4s417.inst 0xcec084f0 //sm4e v16.4s,v7.4s418rev64 v16.4S,v16.4S419ext v16.16b,v16.16b,v16.16b,#8420#ifndef __AARCH64EB__421rev32 v16.16b,v16.16b422#endif423st1 {v16.4s},[x1],#16424b.ne 1b4251:426ret427.size sm4_v8_ecb_encrypt,.-sm4_v8_ecb_encrypt428.globl sm4_v8_cbc_encrypt429.type sm4_v8_cbc_encrypt,%function430.align 5431sm4_v8_cbc_encrypt:432AARCH64_VALID_CALL_TARGET433stp d8,d9,[sp, #-16]!434435ld1 {v0.4s,v1.4s,v2.4s,v3.4s},[x3],#64436ld1 {v4.4s,v5.4s,v6.4s,v7.4s},[x3]437ld1 {v8.4s},[x4]438cmp w5,#0439b.eq .Ldec4401:441cmp x2, #64442b.lt 1f443ld1 {v16.4s,v17.4s,v18.4s,v19.4s},[x0],#64444eor v16.16b,v16.16b,v8.16b445#ifndef __AARCH64EB__446rev32 v17.16b,v17.16b447#endif448#ifndef __AARCH64EB__449rev32 v16.16b,v16.16b450#endif451#ifndef __AARCH64EB__452rev32 v18.16b,v18.16b453#endif454#ifndef __AARCH64EB__455rev32 v19.16b,v19.16b456#endif457.inst 0xcec08410 //sm4e v16.4s,v0.4s458.inst 0xcec08430 //sm4e v16.4s,v1.4s459.inst 0xcec08450 //sm4e v16.4s,v2.4s460.inst 0xcec08470 //sm4e v16.4s,v3.4s461.inst 0xcec08490 //sm4e v16.4s,v4.4s462.inst 0xcec084b0 //sm4e v16.4s,v5.4s463.inst 0xcec084d0 //sm4e v16.4s,v6.4s464.inst 0xcec084f0 //sm4e v16.4s,v7.4s465rev64 v16.4S,v16.4S466ext v16.16b,v16.16b,v16.16b,#8467eor v17.16b,v17.16b,v16.16b468.inst 0xcec08411 //sm4e v17.4s,v0.4s469.inst 0xcec08431 //sm4e v17.4s,v1.4s470.inst 0xcec08451 //sm4e v17.4s,v2.4s471.inst 0xcec08471 //sm4e v17.4s,v3.4s472.inst 0xcec08491 //sm4e v17.4s,v4.4s473.inst 0xcec084b1 //sm4e v17.4s,v5.4s474.inst 0xcec084d1 //sm4e v17.4s,v6.4s475.inst 0xcec084f1 //sm4e v17.4s,v7.4s476rev64 v17.4S,v17.4S477ext v17.16b,v17.16b,v17.16b,#8478#ifndef __AARCH64EB__479rev32 v16.16b,v16.16b480#endif481eor v18.16b,v18.16b,v17.16b482.inst 0xcec08412 //sm4e v18.4s,v0.4s483.inst 0xcec08432 //sm4e v18.4s,v1.4s484.inst 0xcec08452 //sm4e v18.4s,v2.4s485.inst 0xcec08472 //sm4e v18.4s,v3.4s486.inst 0xcec08492 //sm4e v18.4s,v4.4s487.inst 0xcec084b2 //sm4e v18.4s,v5.4s488.inst 0xcec084d2 //sm4e v18.4s,v6.4s489.inst 0xcec084f2 //sm4e v18.4s,v7.4s490rev64 v18.4S,v18.4S491ext v18.16b,v18.16b,v18.16b,#8492#ifndef __AARCH64EB__493rev32 v17.16b,v17.16b494#endif495eor v19.16b,v19.16b,v18.16b496.inst 0xcec08413 //sm4e v19.4s,v0.4s497.inst 0xcec08433 //sm4e v19.4s,v1.4s498.inst 0xcec08453 //sm4e v19.4s,v2.4s499.inst 0xcec08473 //sm4e v19.4s,v3.4s500.inst 0xcec08493 //sm4e v19.4s,v4.4s501.inst 0xcec084b3 //sm4e v19.4s,v5.4s502.inst 0xcec084d3 //sm4e v19.4s,v6.4s503.inst 0xcec084f3 //sm4e v19.4s,v7.4s504rev64 v19.4S,v19.4S505ext v19.16b,v19.16b,v19.16b,#8506#ifndef __AARCH64EB__507rev32 v18.16b,v18.16b508#endif509#ifndef __AARCH64EB__510rev32 v19.16b,v19.16b511#endif512mov v8.16b,v19.16b513st1 {v16.4s,v17.4s,v18.4s,v19.4s},[x1],#64514subs x2,x2,#64515b.ne 1b5161:517subs x2,x2,#16518b.lt 3f519ld1 {v16.4s},[x0],#16520eor v8.16b,v8.16b,v16.16b521#ifndef __AARCH64EB__522rev32 v8.16b,v8.16b523#endif524.inst 0xcec08408 //sm4e v8.4s,v0.4s525.inst 0xcec08428 //sm4e v8.4s,v1.4s526.inst 0xcec08448 //sm4e v8.4s,v2.4s527.inst 0xcec08468 //sm4e v8.4s,v3.4s528.inst 0xcec08488 //sm4e v8.4s,v4.4s529.inst 0xcec084a8 //sm4e v8.4s,v5.4s530.inst 0xcec084c8 //sm4e v8.4s,v6.4s531.inst 0xcec084e8 //sm4e v8.4s,v7.4s532rev64 v8.4S,v8.4S533ext v8.16b,v8.16b,v8.16b,#8534#ifndef __AARCH64EB__535rev32 v8.16b,v8.16b536#endif537st1 {v8.4s},[x1],#16538b.ne 1b539b 3f540.Ldec:5411:542cmp x2, #64543b.lt 1f544ld1 {v16.4s,v17.4s,v18.4s,v19.4s},[x0]545ld1 {v24.4s,v25.4s,v26.4s,v27.4s},[x0],#64546cmp x2,#128547b.lt 2f548// 8 blocks mode549ld1 {v20.4s,v21.4s,v22.4s,v23.4s},[x0]550ld1 {v28.4s,v29.4s,v30.4s,v31.4s},[x0],#64551#ifndef __AARCH64EB__552rev32 v16.16b,v16.16b553#endif554#ifndef __AARCH64EB__555rev32 v17.16b,v17.16b556#endif557#ifndef __AARCH64EB__558rev32 v18.16b,v18.16b559#endif560#ifndef __AARCH64EB__561rev32 v19.16b,v19.16b562#endif563#ifndef __AARCH64EB__564rev32 v20.16b,v20.16b565#endif566#ifndef __AARCH64EB__567rev32 v21.16b,v21.16b568#endif569#ifndef __AARCH64EB__570rev32 v22.16b,v22.16b571#endif572#ifndef __AARCH64EB__573rev32 v23.16b,v23.16b574#endif575.inst 0xcec08410 //sm4e v16.4s,v0.4s576.inst 0xcec08411 //sm4e v17.4s,v0.4s577.inst 0xcec08412 //sm4e v18.4s,v0.4s578.inst 0xcec08413 //sm4e v19.4s,v0.4s579580.inst 0xcec08430 //sm4e v16.4s,v1.4s581.inst 0xcec08431 //sm4e v17.4s,v1.4s582.inst 0xcec08432 //sm4e v18.4s,v1.4s583.inst 0xcec08433 //sm4e v19.4s,v1.4s584585.inst 0xcec08450 //sm4e v16.4s,v2.4s586.inst 0xcec08451 //sm4e v17.4s,v2.4s587.inst 0xcec08452 //sm4e v18.4s,v2.4s588.inst 0xcec08453 //sm4e v19.4s,v2.4s589590.inst 0xcec08470 //sm4e v16.4s,v3.4s591.inst 0xcec08471 //sm4e v17.4s,v3.4s592.inst 0xcec08472 //sm4e v18.4s,v3.4s593.inst 0xcec08473 //sm4e v19.4s,v3.4s594595.inst 0xcec08490 //sm4e v16.4s,v4.4s596.inst 0xcec08491 //sm4e v17.4s,v4.4s597.inst 0xcec08492 //sm4e v18.4s,v4.4s598.inst 0xcec08493 //sm4e v19.4s,v4.4s599600.inst 0xcec084b0 //sm4e v16.4s,v5.4s601.inst 0xcec084b1 //sm4e v17.4s,v5.4s602.inst 0xcec084b2 //sm4e v18.4s,v5.4s603.inst 0xcec084b3 //sm4e v19.4s,v5.4s604605.inst 0xcec084d0 //sm4e v16.4s,v6.4s606.inst 0xcec084d1 //sm4e v17.4s,v6.4s607.inst 0xcec084d2 //sm4e v18.4s,v6.4s608.inst 0xcec084d3 //sm4e v19.4s,v6.4s609610.inst 0xcec084f0 //sm4e v16.4s,v7.4s611rev64 v16.4S,v16.4S612.inst 0xcec084f1 //sm4e v17.4s,v7.4s613ext v16.16b,v16.16b,v16.16b,#8614rev64 v17.4S,v17.4S615.inst 0xcec084f2 //sm4e v18.4s,v7.4s616ext v17.16b,v17.16b,v17.16b,#8617rev64 v18.4S,v18.4S618.inst 0xcec084f3 //sm4e v19.4s,v7.4s619ext v18.16b,v18.16b,v18.16b,#8620rev64 v19.4S,v19.4S621ext v19.16b,v19.16b,v19.16b,#8622.inst 0xcec08414 //sm4e v20.4s,v0.4s623.inst 0xcec08415 //sm4e v21.4s,v0.4s624.inst 0xcec08416 //sm4e v22.4s,v0.4s625.inst 0xcec08417 //sm4e v23.4s,v0.4s626627.inst 0xcec08434 //sm4e v20.4s,v1.4s628.inst 0xcec08435 //sm4e v21.4s,v1.4s629.inst 0xcec08436 //sm4e v22.4s,v1.4s630.inst 0xcec08437 //sm4e v23.4s,v1.4s631632.inst 0xcec08454 //sm4e v20.4s,v2.4s633.inst 0xcec08455 //sm4e v21.4s,v2.4s634.inst 0xcec08456 //sm4e v22.4s,v2.4s635.inst 0xcec08457 //sm4e v23.4s,v2.4s636637.inst 0xcec08474 //sm4e v20.4s,v3.4s638.inst 0xcec08475 //sm4e v21.4s,v3.4s639.inst 0xcec08476 //sm4e v22.4s,v3.4s640.inst 0xcec08477 //sm4e v23.4s,v3.4s641642.inst 0xcec08494 //sm4e v20.4s,v4.4s643.inst 0xcec08495 //sm4e v21.4s,v4.4s644.inst 0xcec08496 //sm4e v22.4s,v4.4s645.inst 0xcec08497 //sm4e v23.4s,v4.4s646647.inst 0xcec084b4 //sm4e v20.4s,v5.4s648.inst 0xcec084b5 //sm4e v21.4s,v5.4s649.inst 0xcec084b6 //sm4e v22.4s,v5.4s650.inst 0xcec084b7 //sm4e v23.4s,v5.4s651652.inst 0xcec084d4 //sm4e v20.4s,v6.4s653.inst 0xcec084d5 //sm4e v21.4s,v6.4s654.inst 0xcec084d6 //sm4e v22.4s,v6.4s655.inst 0xcec084d7 //sm4e v23.4s,v6.4s656657.inst 0xcec084f4 //sm4e v20.4s,v7.4s658rev64 v20.4S,v20.4S659.inst 0xcec084f5 //sm4e v21.4s,v7.4s660ext v20.16b,v20.16b,v20.16b,#8661rev64 v21.4S,v21.4S662.inst 0xcec084f6 //sm4e v22.4s,v7.4s663ext v21.16b,v21.16b,v21.16b,#8664rev64 v22.4S,v22.4S665.inst 0xcec084f7 //sm4e v23.4s,v7.4s666ext v22.16b,v22.16b,v22.16b,#8667rev64 v23.4S,v23.4S668ext v23.16b,v23.16b,v23.16b,#8669#ifndef __AARCH64EB__670rev32 v16.16b,v16.16b671#endif672#ifndef __AARCH64EB__673rev32 v17.16b,v17.16b674#endif675#ifndef __AARCH64EB__676rev32 v18.16b,v18.16b677#endif678#ifndef __AARCH64EB__679rev32 v19.16b,v19.16b680#endif681#ifndef __AARCH64EB__682rev32 v20.16b,v20.16b683#endif684#ifndef __AARCH64EB__685rev32 v21.16b,v21.16b686#endif687#ifndef __AARCH64EB__688rev32 v22.16b,v22.16b689#endif690#ifndef __AARCH64EB__691rev32 v23.16b,v23.16b692#endif693eor v16.16b,v16.16b,v8.16b694eor v17.16b,v17.16b,v24.16b695eor v18.16b,v18.16b,v25.16b696mov v8.16b,v31.16b697eor v19.16b,v19.16b,v26.16b698eor v20.16b,v20.16b,v27.16b699eor v21.16b,v21.16b,v28.16b700eor v22.16b,v22.16b,v29.16b701eor v23.16b,v23.16b,v30.16b702st1 {v16.4s,v17.4s,v18.4s,v19.4s},[x1],#64703st1 {v20.4s,v21.4s,v22.4s,v23.4s},[x1],#64704subs x2,x2,128705b.gt 1b706b 3f707// 4 blocks mode7082:709#ifndef __AARCH64EB__710rev32 v16.16b,v16.16b711#endif712#ifndef __AARCH64EB__713rev32 v17.16b,v17.16b714#endif715#ifndef __AARCH64EB__716rev32 v18.16b,v18.16b717#endif718#ifndef __AARCH64EB__719rev32 v19.16b,v19.16b720#endif721.inst 0xcec08410 //sm4e v16.4s,v0.4s722.inst 0xcec08411 //sm4e v17.4s,v0.4s723.inst 0xcec08412 //sm4e v18.4s,v0.4s724.inst 0xcec08413 //sm4e v19.4s,v0.4s725726.inst 0xcec08430 //sm4e v16.4s,v1.4s727.inst 0xcec08431 //sm4e v17.4s,v1.4s728.inst 0xcec08432 //sm4e v18.4s,v1.4s729.inst 0xcec08433 //sm4e v19.4s,v1.4s730731.inst 0xcec08450 //sm4e v16.4s,v2.4s732.inst 0xcec08451 //sm4e v17.4s,v2.4s733.inst 0xcec08452 //sm4e v18.4s,v2.4s734.inst 0xcec08453 //sm4e v19.4s,v2.4s735736.inst 0xcec08470 //sm4e v16.4s,v3.4s737.inst 0xcec08471 //sm4e v17.4s,v3.4s738.inst 0xcec08472 //sm4e v18.4s,v3.4s739.inst 0xcec08473 //sm4e v19.4s,v3.4s740741.inst 0xcec08490 //sm4e v16.4s,v4.4s742.inst 0xcec08491 //sm4e v17.4s,v4.4s743.inst 0xcec08492 //sm4e v18.4s,v4.4s744.inst 0xcec08493 //sm4e v19.4s,v4.4s745746.inst 0xcec084b0 //sm4e v16.4s,v5.4s747.inst 0xcec084b1 //sm4e v17.4s,v5.4s748.inst 0xcec084b2 //sm4e v18.4s,v5.4s749.inst 0xcec084b3 //sm4e v19.4s,v5.4s750751.inst 0xcec084d0 //sm4e v16.4s,v6.4s752.inst 0xcec084d1 //sm4e v17.4s,v6.4s753.inst 0xcec084d2 //sm4e v18.4s,v6.4s754.inst 0xcec084d3 //sm4e v19.4s,v6.4s755756.inst 0xcec084f0 //sm4e v16.4s,v7.4s757rev64 v16.4S,v16.4S758.inst 0xcec084f1 //sm4e v17.4s,v7.4s759ext v16.16b,v16.16b,v16.16b,#8760rev64 v17.4S,v17.4S761.inst 0xcec084f2 //sm4e v18.4s,v7.4s762ext v17.16b,v17.16b,v17.16b,#8763rev64 v18.4S,v18.4S764.inst 0xcec084f3 //sm4e v19.4s,v7.4s765ext v18.16b,v18.16b,v18.16b,#8766rev64 v19.4S,v19.4S767ext v19.16b,v19.16b,v19.16b,#8768#ifndef __AARCH64EB__769rev32 v16.16b,v16.16b770#endif771#ifndef __AARCH64EB__772rev32 v17.16b,v17.16b773#endif774#ifndef __AARCH64EB__775rev32 v18.16b,v18.16b776#endif777#ifndef __AARCH64EB__778rev32 v19.16b,v19.16b779#endif780eor v16.16b,v16.16b,v8.16b781eor v17.16b,v17.16b,v24.16b782mov v8.16b,v27.16b783eor v18.16b,v18.16b,v25.16b784eor v19.16b,v19.16b,v26.16b785st1 {v16.4s,v17.4s,v18.4s,v19.4s},[x1],#64786subs x2,x2,#64787b.gt 1b7881:789subs x2,x2,#16790b.lt 3f791ld1 {v16.4s},[x0],#16792mov v24.16b,v16.16b793#ifndef __AARCH64EB__794rev32 v16.16b,v16.16b795#endif796.inst 0xcec08410 //sm4e v16.4s,v0.4s797.inst 0xcec08430 //sm4e v16.4s,v1.4s798.inst 0xcec08450 //sm4e v16.4s,v2.4s799.inst 0xcec08470 //sm4e v16.4s,v3.4s800.inst 0xcec08490 //sm4e v16.4s,v4.4s801.inst 0xcec084b0 //sm4e v16.4s,v5.4s802.inst 0xcec084d0 //sm4e v16.4s,v6.4s803.inst 0xcec084f0 //sm4e v16.4s,v7.4s804rev64 v16.4S,v16.4S805ext v16.16b,v16.16b,v16.16b,#8806#ifndef __AARCH64EB__807rev32 v16.16b,v16.16b808#endif809eor v16.16b,v16.16b,v8.16b810mov v8.16b,v24.16b811st1 {v16.4s},[x1],#16812b.ne 1b8133:814// save back IV815st1 {v8.4s},[x4]816ldp d8,d9,[sp],#16817ret818.size sm4_v8_cbc_encrypt,.-sm4_v8_cbc_encrypt819.globl sm4_v8_ctr32_encrypt_blocks820.type sm4_v8_ctr32_encrypt_blocks,%function821.align 5822sm4_v8_ctr32_encrypt_blocks:823AARCH64_VALID_CALL_TARGET824stp d8,d9,[sp, #-16]!825826ld1 {v8.4s},[x4]827ld1 {v0.4s,v1.4s,v2.4s,v3.4s},[x3],64828ld1 {v4.4s,v5.4s,v6.4s,v7.4s},[x3]829#ifndef __AARCH64EB__830rev32 v8.16b,v8.16b831#endif832mov w5,v8.s[3]8331:834cmp x2,#4835b.lt 1f836ld1 {v24.4s,v25.4s,v26.4s,v27.4s},[x0],#64837mov v16.16b,v8.16b838mov v17.16b,v8.16b839mov v18.16b,v8.16b840mov v19.16b,v8.16b841add w5,w5,#1842mov v17.s[3],w5843add w5,w5,#1844mov v18.s[3],w5845add w5,w5,#1846mov v19.s[3],w5847cmp x2,#8848b.lt 2f849ld1 {v28.4s,v29.4s,v30.4s,v31.4s},[x0],#64850mov v20.16b,v8.16b851mov v21.16b,v8.16b852mov v22.16b,v8.16b853mov v23.16b,v8.16b854add w5,w5,#1855mov v20.s[3],w5856add w5,w5,#1857mov v21.s[3],w5858add w5,w5,#1859mov v22.s[3],w5860add w5,w5,#1861mov v23.s[3],w5862.inst 0xcec08410 //sm4e v16.4s,v0.4s863.inst 0xcec08411 //sm4e v17.4s,v0.4s864.inst 0xcec08412 //sm4e v18.4s,v0.4s865.inst 0xcec08413 //sm4e v19.4s,v0.4s866867.inst 0xcec08430 //sm4e v16.4s,v1.4s868.inst 0xcec08431 //sm4e v17.4s,v1.4s869.inst 0xcec08432 //sm4e v18.4s,v1.4s870.inst 0xcec08433 //sm4e v19.4s,v1.4s871872.inst 0xcec08450 //sm4e v16.4s,v2.4s873.inst 0xcec08451 //sm4e v17.4s,v2.4s874.inst 0xcec08452 //sm4e v18.4s,v2.4s875.inst 0xcec08453 //sm4e v19.4s,v2.4s876877.inst 0xcec08470 //sm4e v16.4s,v3.4s878.inst 0xcec08471 //sm4e v17.4s,v3.4s879.inst 0xcec08472 //sm4e v18.4s,v3.4s880.inst 0xcec08473 //sm4e v19.4s,v3.4s881882.inst 0xcec08490 //sm4e v16.4s,v4.4s883.inst 0xcec08491 //sm4e v17.4s,v4.4s884.inst 0xcec08492 //sm4e v18.4s,v4.4s885.inst 0xcec08493 //sm4e v19.4s,v4.4s886887.inst 0xcec084b0 //sm4e v16.4s,v5.4s888.inst 0xcec084b1 //sm4e v17.4s,v5.4s889.inst 0xcec084b2 //sm4e v18.4s,v5.4s890.inst 0xcec084b3 //sm4e v19.4s,v5.4s891892.inst 0xcec084d0 //sm4e v16.4s,v6.4s893.inst 0xcec084d1 //sm4e v17.4s,v6.4s894.inst 0xcec084d2 //sm4e v18.4s,v6.4s895.inst 0xcec084d3 //sm4e v19.4s,v6.4s896897.inst 0xcec084f0 //sm4e v16.4s,v7.4s898rev64 v16.4S,v16.4S899.inst 0xcec084f1 //sm4e v17.4s,v7.4s900ext v16.16b,v16.16b,v16.16b,#8901rev64 v17.4S,v17.4S902.inst 0xcec084f2 //sm4e v18.4s,v7.4s903ext v17.16b,v17.16b,v17.16b,#8904rev64 v18.4S,v18.4S905.inst 0xcec084f3 //sm4e v19.4s,v7.4s906ext v18.16b,v18.16b,v18.16b,#8907rev64 v19.4S,v19.4S908ext v19.16b,v19.16b,v19.16b,#8909.inst 0xcec08414 //sm4e v20.4s,v0.4s910.inst 0xcec08415 //sm4e v21.4s,v0.4s911.inst 0xcec08416 //sm4e v22.4s,v0.4s912.inst 0xcec08417 //sm4e v23.4s,v0.4s913914.inst 0xcec08434 //sm4e v20.4s,v1.4s915.inst 0xcec08435 //sm4e v21.4s,v1.4s916.inst 0xcec08436 //sm4e v22.4s,v1.4s917.inst 0xcec08437 //sm4e v23.4s,v1.4s918919.inst 0xcec08454 //sm4e v20.4s,v2.4s920.inst 0xcec08455 //sm4e v21.4s,v2.4s921.inst 0xcec08456 //sm4e v22.4s,v2.4s922.inst 0xcec08457 //sm4e v23.4s,v2.4s923924.inst 0xcec08474 //sm4e v20.4s,v3.4s925.inst 0xcec08475 //sm4e v21.4s,v3.4s926.inst 0xcec08476 //sm4e v22.4s,v3.4s927.inst 0xcec08477 //sm4e v23.4s,v3.4s928929.inst 0xcec08494 //sm4e v20.4s,v4.4s930.inst 0xcec08495 //sm4e v21.4s,v4.4s931.inst 0xcec08496 //sm4e v22.4s,v4.4s932.inst 0xcec08497 //sm4e v23.4s,v4.4s933934.inst 0xcec084b4 //sm4e v20.4s,v5.4s935.inst 0xcec084b5 //sm4e v21.4s,v5.4s936.inst 0xcec084b6 //sm4e v22.4s,v5.4s937.inst 0xcec084b7 //sm4e v23.4s,v5.4s938939.inst 0xcec084d4 //sm4e v20.4s,v6.4s940.inst 0xcec084d5 //sm4e v21.4s,v6.4s941.inst 0xcec084d6 //sm4e v22.4s,v6.4s942.inst 0xcec084d7 //sm4e v23.4s,v6.4s943944.inst 0xcec084f4 //sm4e v20.4s,v7.4s945rev64 v20.4S,v20.4S946.inst 0xcec084f5 //sm4e v21.4s,v7.4s947ext v20.16b,v20.16b,v20.16b,#8948rev64 v21.4S,v21.4S949.inst 0xcec084f6 //sm4e v22.4s,v7.4s950ext v21.16b,v21.16b,v21.16b,#8951rev64 v22.4S,v22.4S952.inst 0xcec084f7 //sm4e v23.4s,v7.4s953ext v22.16b,v22.16b,v22.16b,#8954rev64 v23.4S,v23.4S955ext v23.16b,v23.16b,v23.16b,#8956#ifndef __AARCH64EB__957rev32 v16.16b,v16.16b958#endif959#ifndef __AARCH64EB__960rev32 v17.16b,v17.16b961#endif962#ifndef __AARCH64EB__963rev32 v18.16b,v18.16b964#endif965#ifndef __AARCH64EB__966rev32 v19.16b,v19.16b967#endif968#ifndef __AARCH64EB__969rev32 v20.16b,v20.16b970#endif971#ifndef __AARCH64EB__972rev32 v21.16b,v21.16b973#endif974#ifndef __AARCH64EB__975rev32 v22.16b,v22.16b976#endif977#ifndef __AARCH64EB__978rev32 v23.16b,v23.16b979#endif980eor v16.16b,v16.16b,v24.16b981eor v17.16b,v17.16b,v25.16b982eor v18.16b,v18.16b,v26.16b983eor v19.16b,v19.16b,v27.16b984eor v20.16b,v20.16b,v28.16b985eor v21.16b,v21.16b,v29.16b986eor v22.16b,v22.16b,v30.16b987eor v23.16b,v23.16b,v31.16b988st1 {v16.4s,v17.4s,v18.4s,v19.4s},[x1],#64989st1 {v20.4s,v21.4s,v22.4s,v23.4s},[x1],#64990subs x2,x2,#8991b.eq 3f992add w5,w5,#1993mov v8.s[3],w5994b 1b9952:996.inst 0xcec08410 //sm4e v16.4s,v0.4s997.inst 0xcec08411 //sm4e v17.4s,v0.4s998.inst 0xcec08412 //sm4e v18.4s,v0.4s999.inst 0xcec08413 //sm4e v19.4s,v0.4s10001001.inst 0xcec08430 //sm4e v16.4s,v1.4s1002.inst 0xcec08431 //sm4e v17.4s,v1.4s1003.inst 0xcec08432 //sm4e v18.4s,v1.4s1004.inst 0xcec08433 //sm4e v19.4s,v1.4s10051006.inst 0xcec08450 //sm4e v16.4s,v2.4s1007.inst 0xcec08451 //sm4e v17.4s,v2.4s1008.inst 0xcec08452 //sm4e v18.4s,v2.4s1009.inst 0xcec08453 //sm4e v19.4s,v2.4s10101011.inst 0xcec08470 //sm4e v16.4s,v3.4s1012.inst 0xcec08471 //sm4e v17.4s,v3.4s1013.inst 0xcec08472 //sm4e v18.4s,v3.4s1014.inst 0xcec08473 //sm4e v19.4s,v3.4s10151016.inst 0xcec08490 //sm4e v16.4s,v4.4s1017.inst 0xcec08491 //sm4e v17.4s,v4.4s1018.inst 0xcec08492 //sm4e v18.4s,v4.4s1019.inst 0xcec08493 //sm4e v19.4s,v4.4s10201021.inst 0xcec084b0 //sm4e v16.4s,v5.4s1022.inst 0xcec084b1 //sm4e v17.4s,v5.4s1023.inst 0xcec084b2 //sm4e v18.4s,v5.4s1024.inst 0xcec084b3 //sm4e v19.4s,v5.4s10251026.inst 0xcec084d0 //sm4e v16.4s,v6.4s1027.inst 0xcec084d1 //sm4e v17.4s,v6.4s1028.inst 0xcec084d2 //sm4e v18.4s,v6.4s1029.inst 0xcec084d3 //sm4e v19.4s,v6.4s10301031.inst 0xcec084f0 //sm4e v16.4s,v7.4s1032rev64 v16.4S,v16.4S1033.inst 0xcec084f1 //sm4e v17.4s,v7.4s1034ext v16.16b,v16.16b,v16.16b,#81035rev64 v17.4S,v17.4S1036.inst 0xcec084f2 //sm4e v18.4s,v7.4s1037ext v17.16b,v17.16b,v17.16b,#81038rev64 v18.4S,v18.4S1039.inst 0xcec084f3 //sm4e v19.4s,v7.4s1040ext v18.16b,v18.16b,v18.16b,#81041rev64 v19.4S,v19.4S1042ext v19.16b,v19.16b,v19.16b,#81043#ifndef __AARCH64EB__1044rev32 v16.16b,v16.16b1045#endif1046#ifndef __AARCH64EB__1047rev32 v17.16b,v17.16b1048#endif1049#ifndef __AARCH64EB__1050rev32 v18.16b,v18.16b1051#endif1052#ifndef __AARCH64EB__1053rev32 v19.16b,v19.16b1054#endif1055eor v16.16b,v16.16b,v24.16b1056eor v17.16b,v17.16b,v25.16b1057eor v18.16b,v18.16b,v26.16b1058eor v19.16b,v19.16b,v27.16b1059st1 {v16.4s,v17.4s,v18.4s,v19.4s},[x1],#641060subs x2,x2,#41061b.eq 3f1062add w5,w5,#11063mov v8.s[3],w51064b 1b10651:1066subs x2,x2,#11067b.lt 3f1068mov v16.16b,v8.16b1069ld1 {v24.4s},[x0],#161070.inst 0xcec08410 //sm4e v16.4s,v0.4s1071.inst 0xcec08430 //sm4e v16.4s,v1.4s1072.inst 0xcec08450 //sm4e v16.4s,v2.4s1073.inst 0xcec08470 //sm4e v16.4s,v3.4s1074.inst 0xcec08490 //sm4e v16.4s,v4.4s1075.inst 0xcec084b0 //sm4e v16.4s,v5.4s1076.inst 0xcec084d0 //sm4e v16.4s,v6.4s1077.inst 0xcec084f0 //sm4e v16.4s,v7.4s1078rev64 v16.4S,v16.4S1079ext v16.16b,v16.16b,v16.16b,#81080#ifndef __AARCH64EB__1081rev32 v16.16b,v16.16b1082#endif1083eor v16.16b,v16.16b,v24.16b1084st1 {v16.4s},[x1],#161085b.eq 3f1086add w5,w5,#11087mov v8.s[3],w51088b 1b10893:1090ldp d8,d9,[sp],#161091ret1092.size sm4_v8_ctr32_encrypt_blocks,.-sm4_v8_ctr32_encrypt_blocks109310941095